@splunk/react-ui 4.38.0 → 4.39.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 (136) hide show
  1. package/Accordion.js +131 -153
  2. package/Anchor.js +50 -58
  3. package/Animation.js +64 -59
  4. package/AnimationToggle.js +59 -61
  5. package/Box.js +59 -67
  6. package/Breadcrumbs.js +113 -127
  7. package/Button.js +151 -169
  8. package/ButtonGroup.js +41 -49
  9. package/ButtonSimple.js +264 -295
  10. package/CHANGELOG.md +28 -0
  11. package/Calendar.js +353 -414
  12. package/Card.js +183 -243
  13. package/CardLayout.js +86 -83
  14. package/Chip.js +104 -122
  15. package/Clickable.js +180 -198
  16. package/CloseButton.js +52 -60
  17. package/Code.js +24 -31
  18. package/CollapsiblePanel.js +172 -202
  19. package/Color.js +371 -412
  20. package/ColumnLayout.js +72 -96
  21. package/ComboBox.js +266 -303
  22. package/Concertina.js +406 -454
  23. package/ControlGroup.js +165 -194
  24. package/Date.js +116 -131
  25. package/DefinitionList.js +125 -149
  26. package/Divider.js +81 -79
  27. package/Dropdown.js +226 -237
  28. package/DualListbox.js +150 -186
  29. package/EventListener.js +4 -1
  30. package/File.js +1032 -955
  31. package/FormRows.js +281 -334
  32. package/Heading.js +27 -35
  33. package/Image.js +101 -116
  34. package/JSONTree.js +301 -344
  35. package/Layer.js +118 -126
  36. package/Link.js +141 -159
  37. package/List.js +61 -77
  38. package/MIGRATION.mdx +92 -38
  39. package/Markdown.js +288 -347
  40. package/Menu.js +506 -532
  41. package/Message.js +173 -196
  42. package/MessageBar.js +58 -66
  43. package/Modal.js +241 -290
  44. package/ModalLayer.js +130 -148
  45. package/Monogram.js +138 -138
  46. package/Multiselect.js +1589 -1902
  47. package/Number.js +159 -178
  48. package/Paginator.js +296 -335
  49. package/Paragraph.js +24 -32
  50. package/Popover.js +448 -441
  51. package/Progress.js +65 -75
  52. package/RadioBar.js +301 -303
  53. package/RadioList.js +77 -119
  54. package/Resize.js +105 -127
  55. package/ResultsMenu.js +373 -385
  56. package/ScreenReaderContent.js +50 -58
  57. package/Scroll.js +209 -244
  58. package/Search.js +379 -391
  59. package/Select.js +1077 -1345
  60. package/SidePanel.js +122 -142
  61. package/Slider.js +132 -145
  62. package/SlidingPanels.js +238 -270
  63. package/SplitButton.js +222 -245
  64. package/StaticContent.js +68 -76
  65. package/StepBar.js +206 -205
  66. package/Switch.js +176 -205
  67. package/TabBar.js +222 -258
  68. package/TabLayout.js +114 -139
  69. package/Table.js +2017 -2180
  70. package/Text.js +379 -493
  71. package/TextArea.js +411 -441
  72. package/Tooltip.js +116 -132
  73. package/TransitionOpen.js +160 -178
  74. package/Tree.js +268 -287
  75. package/Typography.js +48 -52
  76. package/WaitSpinner.js +60 -68
  77. package/cypress/support/commands.ts +9 -0
  78. package/cypress/support/index.d.ts +6 -0
  79. package/cypress/tsconfig.cypress.json +1 -0
  80. package/docker-compose.yml +0 -1
  81. package/package.json +14 -14
  82. package/types/src/Button/Button.d.ts +5 -1
  83. package/types/src/ButtonSimple/ButtonSimple.d.ts +2 -2
  84. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +1 -1
  85. package/types/src/Color/Color.d.ts +2 -2
  86. package/types/src/Color/Palette.d.ts +4 -2
  87. package/types/src/ComboBox/Option.d.ts +1 -1
  88. package/types/src/ControlGroup/ControlGroup.d.ts +1 -2
  89. package/types/src/Date/Date.d.ts +2 -2
  90. package/types/src/File/File.d.ts +2 -3
  91. package/types/src/File/Retry.d.ts +1 -2
  92. package/types/src/Menu/Item.d.ts +18 -5
  93. package/types/src/Menu/Menu.d.ts +3 -3
  94. package/types/src/Menu/docs/examples/Adornments.d.ts +2 -0
  95. package/types/src/Menu/docs/examples/SelectableWithAdornments.d.ts +2 -0
  96. package/types/src/ModalLayer/ModalLayer.d.ts +1 -1
  97. package/types/src/Multiselect/Option.d.ts +2 -0
  98. package/types/src/Number/Number.d.ts +3 -3
  99. package/types/src/Popover/Popover.d.ts +3 -4
  100. package/types/src/RadioBar/RadioBar.d.ts +2 -2
  101. package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
  102. package/types/src/ScrollContainerContext/ScrollContainerContext.d.ts +2 -2
  103. package/types/src/Search/Option.d.ts +9 -3
  104. package/types/src/Select/Option.d.ts +3 -1
  105. package/types/src/Select/OptionBase.d.ts +7 -5
  106. package/types/src/Select/Select.d.ts +1 -1
  107. package/types/src/Select/SelectAllOption.d.ts +4 -4
  108. package/types/src/SidePanel/SidePanel.d.ts +1 -1
  109. package/types/src/Slider/Slider.d.ts +2 -2
  110. package/types/src/SlidingPanels/SlidingPanels.d.ts +1 -1
  111. package/types/src/StepBar/Step.d.ts +1 -2
  112. package/types/src/Switch/Switch.d.ts +0 -1
  113. package/types/src/TabBar/Tab.d.ts +1 -1
  114. package/types/src/TabBar/TabBar.d.ts +3 -1
  115. package/types/src/TabLayout/TabLayout.d.ts +2 -0
  116. package/types/src/Table/HeadDropdownCell.d.ts +2 -0
  117. package/types/src/Table/Table.d.ts +0 -1
  118. package/types/src/Table/docs/examples/StripeRows.d.ts +2 -0
  119. package/types/src/Text/IconOutlinedHide.d.ts +1 -2
  120. package/types/src/Text/IconOutlinedView.d.ts +1 -2
  121. package/types/src/Text/Text.d.ts +2 -2
  122. package/types/src/TextArea/TextArea.d.ts +2 -2
  123. package/types/src/Tooltip/Tooltip.d.ts +4 -4
  124. package/types/src/TransitionOpen/TransitionOpen.d.ts +1 -1
  125. package/useForceUpdate.js +30 -32
  126. package/useKeyPress.js +1 -1
  127. package/types/src/ButtonGroup/docs/examples/prisma/Basic.d.ts +0 -1
  128. package/types/src/File/docs/examples/prisma/Error.d.ts +0 -1
  129. package/types/src/Menu/docs/examples/Icons.d.ts +0 -2
  130. package/types/src/Menu/docs/examples/SelectableWithIcons.d.ts +0 -2
  131. package/types/src/TabBar/docs/examples/prisma/Context.d.ts +0 -2
  132. package/types/src/TabLayout/docs/examples/prisma/Context.d.ts +0 -2
  133. package/types/src/Table/docs/examples/prisma/Basic.d.ts +0 -2
  134. /package/types/src/Message/docs/examples/{prisma/Title.d.ts → Title.d.ts} +0 -0
  135. /package/types/src/StepBar/docs/examples/{prisma/Error.d.ts → Error.d.ts} +0 -0
  136. /package/types/src/TabBar/docs/examples/{prisma/Disabled.d.ts → Disabled.d.ts} +0 -0
@@ -62,7 +62,7 @@
62
62
  // EXPORTS
63
63
  e.d(t, {
64
64
  SingleOpenPanelGroup: () => /* reexport */ ce,
65
- default: () => /* reexport */ je
65
+ default: () => /* reexport */ _e
66
66
  });
67
67
  // CONCATENATED MODULE: external "react"
68
68
  const n = require("react");
@@ -90,8 +90,8 @@
90
90
  const m = require("@splunk/react-ui/usePrevious");
91
91
  var y = e.n(m);
92
92
  // CONCATENATED MODULE: external "styled-components"
93
- const h = require("styled-components");
94
- var g = e.n(h);
93
+ const g = require("styled-components");
94
+ var h = e.n(g);
95
95
  // CONCATENATED MODULE: external "@splunk/react-ui/Box"
96
96
  const k = require("@splunk/react-ui/Box");
97
97
  var C = e.n(k);
@@ -100,12 +100,12 @@
100
100
  var O = e.n(x);
101
101
  // CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
102
102
  const S = require("@splunk/react-ui/Clickable");
103
- var I = e.n(S);
103
+ var w = e.n(S);
104
104
  // CONCATENATED MODULE: external "@splunk/themes"
105
105
  const P = require("@splunk/themes");
106
106
  // CONCATENATED MODULE: external "@splunk/react-icons/ChevronRight"
107
- const w = require("@splunk/react-icons/ChevronRight");
108
- var j = e.n(w);
107
+ const I = require("@splunk/react-icons/ChevronRight");
108
+ var j = e.n(I);
109
109
  // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/ChevronRight"
110
110
  const E = require("@splunk/react-icons/enterprise/ChevronRight");
111
111
  var _ = e.n(E);
@@ -113,7 +113,7 @@
113
113
  var q = {
114
114
  className: u().string
115
115
  };
116
- var R = function e(t) {
116
+ var A = function e(t) {
117
117
  var n = t.className;
118
118
  var a = (0, P.useSplunkTheme)(), o = a.isEnterprise;
119
119
  return o ? r().createElement(_(), {
@@ -124,51 +124,51 @@
124
124
  className: n
125
125
  });
126
126
  };
127
- R.propTypes = q;
128
- /* harmony default export */ const A = R;
127
+ A.propTypes = q;
128
+ /* harmony default export */ const R = A;
129
129
  // CONCATENATED MODULE: ./src/CollapsiblePanel/CollapsiblePanelStyles.ts
130
- var D = g()(C()).withConfig({
130
+ var T = h()(C()).withConfig({
131
131
  displayName: "CollapsiblePanelStyles__StyledBox",
132
132
  componentId: "sc-1phikbp-0"
133
133
  })([ "display:flex;flex-direction:column;flex-shrink:1;", ";", ";& + &{margin-top:", ";}" ], (0,
134
134
  P.pick)({
135
- enterprise: (0, h.css)([ "min-height:calc(", " + 12px);" ], P.variables.lineHeight),
135
+ enterprise: (0, g.css)([ "min-height:calc(", " + 12px);" ], P.variables.lineHeight),
136
136
  prisma: {
137
- comfortable: (0, h.css)([ "min-height:56px;" ]),
138
- compact: (0, h.css)([ "min-height:48px;" ])
137
+ comfortable: (0, g.css)([ "min-height:56px;" ]),
138
+ compact: (0, g.css)([ "min-height:48px;" ])
139
139
  }
140
140
  }), (0, P.pick)({
141
- prisma: (0, h.css)([ "background-color:", ";" ], P.variables.backgroundColorSection)
141
+ prisma: (0, g.css)([ "background-color:", ";" ], P.variables.backgroundColorSection)
142
142
  }), (0, P.pick)({
143
143
  enterprise: "2px",
144
144
  prisma: "1px"
145
145
  }));
146
- var T = g()(C()).withConfig({
146
+ var D = h()(C()).withConfig({
147
147
  displayName: "CollapsiblePanelStyles__StyledSingleOpenPanelGroupBox",
148
148
  componentId: "sc-1phikbp-1"
149
149
  })([ "", ";flex-direction:column;margin-bottom:0;", "" ], P.mixins.reset("flex"), (0,
150
150
  P.pick)({
151
- enterprise: (0, h.css)([ "background:", ";" ], P.variables.backgroundColor)
151
+ enterprise: (0, g.css)([ "background:", ";" ], P.variables.backgroundColor)
152
152
  }));
153
153
  /*
154
154
  these styles are consistent for both regular and titleWithActions, but applied to different elements
155
155
  * in regular mode, they're on the SVG's span wrapper
156
156
  * in titleWithActionsMode, they're on the button
157
157
  applying them directly to the icon wrapper doesn't work because Enterprise has 1px border around the button
158
- */ var N = (0, h.css)([ "min-width:", ";" ], (0, P.pick)({
158
+ */ var N = (0, g.css)([ "min-width:", ";" ], (0, P.pick)({
159
159
  enterprise: "20px",
160
160
  prisma: "35px"
161
161
  }));
162
- var X = g().span.withConfig({
162
+ var X = h().span.withConfig({
163
163
  displayName: "CollapsiblePanelStyles__StyledIconWrapper",
164
164
  componentId: "sc-1phikbp-2"
165
165
  })([ "display:inline-block;flex:0 auto;", "" ], N);
166
- var W = g().div.withConfig({
166
+ var B = h().div.withConfig({
167
167
  displayName: "CollapsiblePanelStyles__StyledTitleWithActions",
168
168
  componentId: "sc-1phikbp-3"
169
169
  })([ "display:flex;flex-shrink:0;border-bottom:0;position:relative;padding:", ";transition:background-color 0.2s,border 0.2s,box-shadow 0.2s;color:", ";", " ", "" ], (0,
170
170
  P.pick)({
171
- enterprise: (0, h.css)([ "", " ", " ", " ", "" ], P.variables.spacingXSmall, P.variables.spacingSmall, P.variables.spacingXSmall, P.variables.spacingXSmall),
171
+ enterprise: (0, g.css)([ "", " ", " ", " ", "" ], P.variables.spacingXSmall, P.variables.spacingSmall, P.variables.spacingXSmall, P.variables.spacingXSmall),
172
172
  prisma: {
173
173
  comfortable: "8px 10px 8px 11px",
174
174
  compact: "8px 10px 8px 11px"
@@ -177,23 +177,23 @@
177
177
  enterprise: P.variables.textColor,
178
178
  prisma: P.variables.contentColorActive
179
179
  }), (0, P.pick)({
180
- prisma: (0, h.css)([ "background-color:", ";" ], P.variables.interactiveColorBackground),
180
+ prisma: (0, g.css)([ "background-color:", ";" ], P.variables.interactiveColorBackground),
181
181
  enterprise: {
182
- dark: (0, h.css)([ "background-color:", ";" ], P.variables.gray45),
183
- light: (0, h.css)([ "background-color:", ";" ], P.variables.gray96)
182
+ dark: (0, g.css)([ "background-color:", ";" ], P.variables.gray45),
183
+ light: (0, g.css)([ "background-color:", ";" ], P.variables.gray96)
184
184
  }
185
185
  }), (function(e) {
186
186
  var t = e.$disabled;
187
- return t && (0, h.css)([ "cursor:default;color:", ";" ], (0, P.pick)({
187
+ return t && (0, g.css)([ "cursor:default;color:", ";" ], (0, P.pick)({
188
188
  enterprise: P.variables.contentColorDefault,
189
189
  prisma: P.variables.contentColorDisabled
190
190
  }));
191
191
  }));
192
- var B = g()(O()).withConfig({
192
+ var W = h()(O()).withConfig({
193
193
  displayName: "CollapsiblePanelStyles__StyledToggleButton",
194
194
  componentId: "sc-1phikbp-4"
195
195
  })([ "flex:0 auto;padding:0;", "" ], N);
196
- var L = g()(I()).withConfig({
196
+ var L = h()(w()).withConfig({
197
197
  displayName: "CollapsiblePanelStyles__StyledTitleClickable",
198
198
  componentId: "sc-1phikbp-5"
199
199
  })([ "width:100%;flex-shrink:0;border-bottom:0;cursor:pointer;position:relative;display:flex;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:", ";z-index:1;}&:hover:not([disabled]){color:", ";background-color:", ";}" ], (0,
@@ -207,12 +207,12 @@
207
207
  enterprise: P.variables.textColor,
208
208
  prisma: P.variables.contentColorActive
209
209
  }), (0, P.pick)({
210
- prisma: (0, h.css)([ "background-color:", ";" ], P.variables.interactiveColorBackground)
210
+ prisma: (0, g.css)([ "background-color:", ";" ], P.variables.interactiveColorBackground)
211
211
  }), (0, P.pickVariant)("$open", {
212
212
  false: {
213
213
  enterprise: {
214
- dark: (0, h.css)([ "background-color:", ";" ], P.variables.gray45),
215
- light: (0, h.css)([ "background-color:", ";" ], P.variables.gray96)
214
+ dark: (0, g.css)([ "background-color:", ";" ], P.variables.gray45),
215
+ light: (0, g.css)([ "background-color:", ";" ], P.variables.gray96)
216
216
  }
217
217
  }
218
218
  }), (0, P.pick)({
@@ -231,7 +231,7 @@
231
231
  },
232
232
  prisma: P.mixins.overlayColors(P.variables.interactiveColorBackground, P.variables.interactiveColorOverlayHover)
233
233
  }));
234
- var $ = g().span.withConfig({
234
+ var $ = h().span.withConfig({
235
235
  displayName: "CollapsiblePanelStyles__StyledHeadingContent",
236
236
  componentId: "sc-1phikbp-6"
237
237
  })([ "display:flex;justify-content:space-between;margin-left:", ";flex:1 1 auto;", " ", "" ], (0,
@@ -239,17 +239,17 @@
239
239
  enterprise: "5px",
240
240
  prisma: "6px"
241
241
  }), (0, P.pick)({
242
- prisma: (0, h.css)([ "font-weight:", ";" ], P.variables.fontWeightSemiBold)
242
+ prisma: (0, g.css)([ "font-weight:", ";" ], P.variables.fontWeightSemiBold)
243
243
  }), (function(e) {
244
244
  var t = e.$titleWithActions;
245
- return t && (0, h.css)([ "min-height:", ";" ], (0, P.pick)({
245
+ return t && (0, g.css)([ "min-height:", ";" ], (0, P.pick)({
246
246
  prisma: {
247
247
  comfortable: P.variables.spacingXXXLarge,
248
248
  compact: P.variables.spacingXXLarge
249
249
  }
250
250
  }));
251
251
  }));
252
- var M = g().span.withConfig({
252
+ var M = h().span.withConfig({
253
253
  displayName: "CollapsiblePanelStyles__StyledHeadingActions",
254
254
  componentId: "sc-1phikbp-7"
255
255
  })([ "min-height:", ";flex:1 0 auto;" ], (0, P.pick)({
@@ -258,14 +258,14 @@
258
258
  compact: P.variables.spacingXXLarge
259
259
  }
260
260
  }));
261
- var G = g().span.withConfig({
261
+ var G = h().span.withConfig({
262
262
  displayName: "CollapsiblePanelStyles__StyledDescription",
263
263
  componentId: "sc-1phikbp-8"
264
264
  })([ "font-size:", ";margin-left:", ";" ], P.variables.fontSizeSmall, (0, P.pick)({
265
265
  enterprise: P.variables.spacingSmall,
266
266
  prisma: P.variables.spacingLarge
267
267
  }));
268
- var H = g().div.withConfig({
268
+ var H = h().div.withConfig({
269
269
  displayName: "CollapsiblePanelStyles__StyledInsetWrapper",
270
270
  componentId: "sc-1phikbp-9"
271
271
  })([ "", ";padding:", ";" ], P.mixins.reset("block"), (0, P.pickVariant)("$inset", {
@@ -281,7 +281,7 @@
281
281
  }),
282
282
  false: 0
283
283
  }));
284
- var U = g()(A).withConfig({
284
+ var U = h()(R).withConfig({
285
285
  displayName: "CollapsiblePanelStyles__StyledExpandPanelIcon",
286
286
  componentId: "sc-1phikbp-10"
287
287
  })([ "transition:transform ", ";", ";", " width:100%;vertical-align:", ";" ], (0,
@@ -289,14 +289,14 @@
289
289
  enterprise: "300ms",
290
290
  prisma: "200ms"
291
291
  }), (0, P.pick)({
292
- enterprise: (0, h.css)([ "[disabled] &{color:", ";}" ], (0, P.pick)({
292
+ enterprise: (0, g.css)([ "[disabled] &{color:", ";}" ], (0, P.pick)({
293
293
  dark: P.variables.contentColorDefault,
294
294
  light: P.variables.contentColorDisabled
295
295
  })),
296
- prisma: (0, h.css)([ "color:", ";[disabled] &{color:inherit;}" ], P.variables.contentColorDefault)
296
+ prisma: (0, g.css)([ "color:", ";[disabled] &{color:inherit;}" ], P.variables.contentColorDefault)
297
297
  }), (function(e) {
298
298
  var t = e.open;
299
- return t && (0, h.css)([ "transform:rotate(90deg);" ]);
299
+ return t && (0, g.css)([ "transform:rotate(90deg);" ]);
300
300
  }), (0, P.pick)({
301
301
  enterprise: "baseline",
302
302
  prisma: "text-bottom"
@@ -306,18 +306,15 @@
306
306
  /* harmony default export */ const V = z;
307
307
  // CONCATENATED MODULE: ./src/CollapsiblePanel/SingleOpenPanelGroup.tsx
308
308
  function F() {
309
- F = Object.assign || function(e) {
309
+ return F = Object.assign ? Object.assign.bind() : function(e) {
310
310
  for (var t = 1; t < arguments.length; t++) {
311
311
  var n = arguments[t];
312
312
  for (var r in n) {
313
- if (Object.prototype.hasOwnProperty.call(n, r)) {
314
- e[r] = n[r];
315
- }
313
+ ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
316
314
  }
317
315
  }
318
316
  return e;
319
- };
320
- return F.apply(this, arguments);
317
+ }, F.apply(null, arguments);
321
318
  }
322
319
  function J(e) {
323
320
  return Y(e) || Q(e) || te(e) || K();
@@ -326,7 +323,7 @@
326
323
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
327
324
  }
328
325
  function Q(e) {
329
- if (typeof Symbol !== "undefined" && Symbol.iterator in Object(e)) return Array.from(e);
326
+ if ("undefined" != typeof Symbol && null != e[Symbol.iterator] || null != e["@@iterator"]) return Array.from(e);
330
327
  }
331
328
  function Y(e) {
332
329
  if (Array.isArray(e)) return ne(e);
@@ -338,70 +335,63 @@
338
335
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
339
336
  }
340
337
  function te(e, t) {
341
- if (!e) return;
342
- if (typeof e === "string") return ne(e, t);
343
- var n = Object.prototype.toString.call(e).slice(8, -1);
344
- if (n === "Object" && e.constructor) n = e.constructor.name;
345
- if (n === "Map" || n === "Set") return Array.from(e);
346
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return ne(e, t);
338
+ if (e) {
339
+ if ("string" == typeof e) return ne(e, t);
340
+ var n = {}.toString.call(e).slice(8, -1);
341
+ return "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? ne(e, t) : void 0;
342
+ }
347
343
  }
348
344
  function ne(e, t) {
349
- if (t == null || t > e.length) t = e.length;
350
- for (var n = 0, r = new Array(t); n < t; n++) {
345
+ (null == t || t > e.length) && (t = e.length);
346
+ for (var n = 0, r = Array(t); n < t; n++) {
351
347
  r[n] = e[n];
352
348
  }
353
349
  return r;
354
350
  }
355
351
  function re(e, t) {
356
- if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(e))) return;
357
- var n = [];
358
- var r = true;
359
- var a = false;
360
- var o = undefined;
361
- try {
362
- for (var i = e[Symbol.iterator](), l; !(r = (l = i.next()).done); r = true) {
363
- n.push(l.value);
364
- if (t && n.length === t) break;
365
- }
366
- } catch (e) {
367
- a = true;
368
- o = e;
369
- } finally {
352
+ var n = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
353
+ if (null != n) {
354
+ var r, a, o, i, l = [], s = !0, c = !1;
370
355
  try {
371
- if (!r && i["return"] != null) i["return"]();
356
+ if (o = (n = n.call(e)).next, 0 === t) {
357
+ if (Object(n) !== n) return;
358
+ s = !1;
359
+ } else for (;!(s = (r = o.call(n)).done) && (l.push(r.value), l.length !== t); s = !0) {
360
+ }
361
+ } catch (e) {
362
+ c = !0, a = e;
372
363
  } finally {
373
- if (a) throw o;
364
+ try {
365
+ if (!s && null != n["return"] && (i = n["return"](), Object(i) !== i)) return;
366
+ } finally {
367
+ if (c) throw a;
368
+ }
374
369
  }
370
+ return l;
375
371
  }
376
- return n;
377
372
  }
378
373
  function ae(e) {
379
374
  if (Array.isArray(e)) return e;
380
375
  }
381
376
  function oe(e, t) {
382
- if (e == null) return {};
383
- var n = ie(e, t);
384
- var r, a;
377
+ if (null == e) return {};
378
+ var n, r, a = ie(e, t);
385
379
  if (Object.getOwnPropertySymbols) {
386
380
  var o = Object.getOwnPropertySymbols(e);
387
- for (a = 0; a < o.length; a++) {
388
- r = o[a];
389
- if (t.indexOf(r) >= 0) continue;
390
- if (!Object.prototype.propertyIsEnumerable.call(e, r)) continue;
391
- n[r] = e[r];
381
+ for (r = 0; r < o.length; r++) {
382
+ n = o[r], t.includes(n) || {}.propertyIsEnumerable.call(e, n) && (a[n] = e[n]);
392
383
  }
393
384
  }
394
- return n;
385
+ return a;
395
386
  }
396
387
  function ie(e, t) {
397
- if (e == null) return {};
388
+ if (null == e) return {};
398
389
  var n = {};
399
- var r = Object.keys(e);
400
- var a, o;
401
- for (o = 0; o < r.length; o++) {
402
- a = r[o];
403
- if (t.indexOf(a) >= 0) continue;
404
- n[a] = e[a];
390
+ for (var r in e) {
391
+ if ({}.hasOwnProperty.call(e, r)) {
392
+ if (t.includes(r)) continue;
393
+ n[r] = e[r];
394
+ }
405
395
  }
406
396
  return n;
407
397
  }
@@ -419,9 +409,9 @@
419
409
  var f = o()(e, "openPanelId");
420
410
  var b = y()(a);
421
411
  var v = !f ? a : undefined;
422
- var m = (0, n.useState)(v), h = Z(m, 2), g = h[0], k = h[1];
412
+ var m = (0, n.useState)(v), g = Z(m, 2), h = g[0], k = g[1];
423
413
  var C = function e() {
424
- var t = f ? u : g;
414
+ var t = f ? u : h;
425
415
  return t;
426
416
  };
427
417
  var x = (0, n.useCallback)((function(e, t) {
@@ -432,10 +422,10 @@
432
422
  k(a);
433
423
  }
434
424
  p === null || p === void 0 ? void 0 : p(e, t);
435
- }), [ u, f, g, C, p ]);
425
+ }), [ u, f, h, C, p ]);
436
426
  (0, n.useEffect)((function() {
437
427
  if (false) {}
438
- // In this functional component, we want the dependencies to be [], but when we do that
428
+ // In this functional component, we want the dependencies to be [], but when we do that
439
429
  // we get a linting error.
440
430
  // eslint-disable-next-line react-hooks/exhaustive-deps
441
431
  }), []);
@@ -450,12 +440,12 @@
450
440
  var S = (0, n.useMemo)((function() {
451
441
  return {
452
442
  onChange: x,
453
- openPanelId: f ? u : g,
443
+ openPanelId: f ? u : h,
454
444
  inset: s
455
445
  };
456
- }), [ x, f, s, u, g ]);
446
+ }), [ x, f, s, u, h ]);
457
447
 
458
- return r().createElement(T, F({
448
+ return r().createElement(D, F({
459
449
  "data-test": "single-open-panel-group",
460
450
  "data-test-open-panel-id": u,
461
451
  elementRef: i
@@ -468,154 +458,134 @@
468
458
  // CONCATENATED MODULE: ./src/CollapsiblePanel/CollapsiblePanel.tsx
469
459
  function pe(e) {
470
460
  "@babel/helpers - typeof";
471
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
472
- pe = function e(t) {
473
- return typeof t;
474
- };
475
- } else {
476
- pe = function e(t) {
477
- return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
478
- };
479
- }
480
- return pe(e);
461
+ return pe = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
462
+ return typeof e;
463
+ } : function(e) {
464
+ return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
465
+ }, pe(e);
481
466
  }
482
467
  function ue() {
483
- ue = Object.assign || function(e) {
468
+ return ue = Object.assign ? Object.assign.bind() : function(e) {
484
469
  for (var t = 1; t < arguments.length; t++) {
485
470
  var n = arguments[t];
486
471
  for (var r in n) {
487
- if (Object.prototype.hasOwnProperty.call(n, r)) {
488
- e[r] = n[r];
489
- }
472
+ ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
490
473
  }
491
474
  }
492
475
  return e;
493
- };
494
- return ue.apply(this, arguments);
476
+ }, ue.apply(null, arguments);
495
477
  }
496
478
  function de(e, t) {
497
479
  var n = Object.keys(e);
498
480
  if (Object.getOwnPropertySymbols) {
499
481
  var r = Object.getOwnPropertySymbols(e);
500
- if (t) r = r.filter((function(t) {
482
+ t && (r = r.filter((function(t) {
501
483
  return Object.getOwnPropertyDescriptor(e, t).enumerable;
502
- }));
503
- n.push.apply(n, r);
484
+ }))), n.push.apply(n, r);
504
485
  }
505
486
  return n;
506
487
  }
507
488
  function fe(e) {
508
489
  for (var t = 1; t < arguments.length; t++) {
509
- var n = arguments[t] != null ? arguments[t] : {};
510
- if (t % 2) {
511
- de(Object(n), true).forEach((function(t) {
512
- Se(e, t, n[t]);
513
- }));
514
- } else if (Object.getOwnPropertyDescriptors) {
515
- Object.defineProperties(e, Object.getOwnPropertyDescriptors(n));
516
- } else {
517
- de(Object(n)).forEach((function(t) {
518
- Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
519
- }));
520
- }
490
+ var n = null != arguments[t] ? arguments[t] : {};
491
+ t % 2 ? de(Object(n), !0).forEach((function(t) {
492
+ Se(e, t, n[t]);
493
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : de(Object(n)).forEach((function(t) {
494
+ Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
495
+ }));
521
496
  }
522
497
  return e;
523
498
  }
524
499
  function be(e, t) {
525
- if (!(e instanceof t)) {
526
- throw new TypeError("Cannot call a class as a function");
527
- }
500
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
528
501
  }
529
502
  function ve(e, t) {
530
503
  for (var n = 0; n < t.length; n++) {
531
504
  var r = t[n];
532
- r.enumerable = r.enumerable || false;
533
- r.configurable = true;
534
- if ("value" in r) r.writable = true;
535
- Object.defineProperty(e, r.key, r);
505
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0),
506
+ Object.defineProperty(e, we(r.key), r);
536
507
  }
537
508
  }
538
509
  function me(e, t, n) {
539
- if (t) ve(e.prototype, t);
540
- if (n) ve(e, n);
541
- return e;
510
+ return t && ve(e.prototype, t), n && ve(e, n), Object.defineProperty(e, "prototype", {
511
+ writable: !1
512
+ }), e;
542
513
  }
543
514
  function ye(e, t) {
544
- if (typeof t !== "function" && t !== null) {
545
- throw new TypeError("Super expression must either be null or a function");
546
- }
515
+ if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
547
516
  e.prototype = Object.create(t && t.prototype, {
548
517
  constructor: {
549
518
  value: e,
550
- writable: true,
551
- configurable: true
519
+ writable: !0,
520
+ configurable: !0
552
521
  }
553
- });
554
- if (t) he(e, t);
522
+ }), Object.defineProperty(e, "prototype", {
523
+ writable: !1
524
+ }), t && ge(e, t);
555
525
  }
556
- function he(e, t) {
557
- he = Object.setPrototypeOf || function e(t, n) {
558
- t.__proto__ = n;
559
- return t;
560
- };
561
- return he(e, t);
526
+ function ge(e, t) {
527
+ return ge = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
528
+ return e.__proto__ = t, e;
529
+ }, ge(e, t);
562
530
  }
563
- function ge(e) {
531
+ function he(e) {
564
532
  var t = xe();
565
- return function n() {
566
- var r = Oe(e), a;
533
+ return function() {
534
+ var n, r = Oe(e);
567
535
  if (t) {
568
- var o = Oe(this).constructor;
569
- a = Reflect.construct(r, arguments, o);
570
- } else {
571
- a = r.apply(this, arguments);
572
- }
573
- return ke(this, a);
536
+ var a = Oe(this).constructor;
537
+ n = Reflect.construct(r, arguments, a);
538
+ } else n = r.apply(this, arguments);
539
+ return ke(this, n);
574
540
  };
575
541
  }
576
542
  function ke(e, t) {
577
- if (t && (pe(t) === "object" || typeof t === "function")) {
578
- return t;
579
- }
543
+ if (t && ("object" == pe(t) || "function" == typeof t)) return t;
544
+ if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
580
545
  return Ce(e);
581
546
  }
582
547
  function Ce(e) {
583
- if (e === void 0) {
584
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
585
- }
548
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
586
549
  return e;
587
550
  }
588
551
  function xe() {
589
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
590
- if (Reflect.construct.sham) return false;
591
- if (typeof Proxy === "function") return true;
592
552
  try {
593
- Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
594
- return true;
595
- } catch (e) {
596
- return false;
597
- }
553
+ var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
554
+ } catch (e) {}
555
+ return (xe = function t() {
556
+ return !!e;
557
+ })();
598
558
  }
599
559
  function Oe(e) {
600
- Oe = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
601
- return t.__proto__ || Object.getPrototypeOf(t);
602
- };
603
- return Oe(e);
560
+ return Oe = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
561
+ return e.__proto__ || Object.getPrototypeOf(e);
562
+ }, Oe(e);
604
563
  }
605
564
  function Se(e, t, n) {
606
- if (t in e) {
607
- Object.defineProperty(e, t, {
608
- value: n,
609
- enumerable: true,
610
- configurable: true,
611
- writable: true
612
- });
613
- } else {
614
- e[t] = n;
565
+ return (t = we(t)) in e ? Object.defineProperty(e, t, {
566
+ value: n,
567
+ enumerable: !0,
568
+ configurable: !0,
569
+ writable: !0
570
+ }) : e[t] = n, e;
571
+ }
572
+ function we(e) {
573
+ var t = Pe(e, "string");
574
+ return "symbol" == pe(t) ? t : t + "";
575
+ }
576
+ function Pe(e, t) {
577
+ if ("object" != pe(e) || !e) return e;
578
+ var n = e[Symbol.toPrimitive];
579
+ if (void 0 !== n) {
580
+ var r = n.call(e, t || "default");
581
+ if ("object" != pe(r)) return r;
582
+ throw new TypeError("@@toPrimitive must return a primitive value.");
615
583
  }
616
- return e;
584
+ return ("string" === t ? String : Number)(e);
617
585
  }
618
- var Ie = {
586
+ /** @public @deprecated Use `CollapsiblePanelChangeHandler` */
587
+ /** @public @deprecated Use `CollapsiblePanelChangeHandler` */
588
+ /** @public */ var Ie = {
619
589
  innerBodyStyles: u().object,
620
590
  actions: u().node,
621
591
  children: u().node,
@@ -635,16 +605,16 @@
635
605
  title: u().node.isRequired,
636
606
  titleWithActions: u().bool
637
607
  };
638
- var Pe = {
608
+ var je = {
639
609
  disabled: false,
640
610
  overflow: "auto",
641
611
  renderChildrenWhenCollapsed: false,
642
612
  titleWithActions: false,
643
613
  inset: false
644
614
  };
645
- var we = function(e) {
615
+ var Ee = function(e) {
646
616
  ye(n, e);
647
- var t = ge(n);
617
+ var t = he(n);
648
618
  // @docs-props-type CollapsiblePanelPropsBase
649
619
  function n(e) {
650
620
  var r;
@@ -690,7 +660,7 @@
690
660
  reason: "toggleClick",
691
661
  action: s
692
662
  });
693
- // Maintains backwards compatibility until the `handleRequestClose` and `handleRequestOpen` handlers are removed in SUI-5
663
+ // Maintains backwards compatibility until the `handleRequestClose` and `handleRequestOpen` handlers are removed in SUI-5
694
664
  if (l) {
695
665
  r.handleRequestClose(e);
696
666
  } else {
@@ -715,7 +685,7 @@
715
685
  r.toggleId = "toggle-".concat((0, b.createGUID)());
716
686
  return r;
717
687
  }
718
- // Only testing this in the scenario of a SingleOpenPanelGroup.
688
+ // Only testing this in the scenario of a SingleOpenPanelGroup.
719
689
  me(n, [ {
720
690
  key: "componentDidMount",
721
691
  value: function e() {
@@ -752,7 +722,7 @@
752
722
  }, {
753
723
  key: "render",
754
724
  value: function e() {
755
- var t = this.props, a = t.innerBodyStyles, o = t.actions, i = t.children, s = t.description, p = t.disabled, u = t.elementRef, d = t.headingLevel, m = t.overflow, y = t.renderChildrenWhenCollapsed, h = t.title, g = t.titleWithActions, k = t.inset;
725
+ var t = this.props, a = t.innerBodyStyles, o = t.actions, i = t.children, s = t.description, p = t.disabled, u = t.elementRef, d = t.headingLevel, m = t.overflow, y = t.renderChildrenWhenCollapsed, g = t.title, h = t.titleWithActions, k = t.inset;
756
726
  var C = this.state.animating;
757
727
  var x = (0, b.createDOMID)("panel-toggle");
758
728
  var O = this.isOpen();
@@ -766,22 +736,22 @@
766
736
  "data-test": "toggle"
767
737
  };
768
738
 
769
- return r().createElement(D, ue({
739
+ return r().createElement(T, ue({
770
740
  "data-test": "collapsible-panel",
771
741
  elementRef: u
772
- }, c()(this.props, l()(n.propTypes))), g || o != null ? r().createElement(W, {
742
+ }, c()(this.props, l()(n.propTypes))), h || o != null ? r().createElement(B, {
773
743
  $disabled: p
774
- }, r().createElement(B, ue({
744
+ }, r().createElement(W, ue({
775
745
  appearance: "subtle",
776
746
  "aria-label": (0, v._)("Panel"),
777
747
  "aria-labelledby": x
778
748
  }, S), r().createElement(U, {
779
749
  open: !!O
780
750
  })), r().createElement($, {
781
- $titleWithActions: g,
751
+ $titleWithActions: h,
782
752
  "data-test": "title",
783
753
  id: o != null ? x : undefined
784
- }, h), o != null && r().createElement(M, null, o)) :
754
+ }, g), o != null && r().createElement(M, null, o)) :
785
755
 
786
756
  /* Clickable component is not allowed to have role="heading" so it is wrapped with a span */
787
757
  r().createElement("span", {
@@ -792,7 +762,7 @@
792
762
  open: !!O
793
763
  })), r().createElement($, null, r().createElement("span", {
794
764
  "data-test": "title"
795
- }, h), s && r().createElement(G, {
765
+ }, g), s && r().createElement(G, {
796
766
  "data-test": "description"
797
767
  }, s)))), r().createElement(f(), {
798
768
  outerId: this.containerId,
@@ -815,10 +785,10 @@
815
785
  } ]);
816
786
  return n;
817
787
  }(n.Component);
818
- Se(we, "propTypes", Ie);
819
- Se(we, "defaultProps", Pe);
820
- Se(we, "contextType", V);
821
- /* harmony default export */ const je = we;
788
+ Se(Ee, "propTypes", Ie);
789
+ Se(Ee, "defaultProps", je);
790
+ Se(Ee, "contextType", V);
791
+ /* harmony default export */ const _e = Ee;
822
792
  // CONCATENATED MODULE: ./src/CollapsiblePanel/index.ts
823
793
  module.exports = t;
824
794
  /******/})();