@deque/cauldron-react 4.5.0-canary.f4c1c3dd → 4.6.0-canary.120c94c7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -9,9 +9,9 @@ var React = require('react');
9
9
  var React__default = _interopDefault(React);
10
10
  var PropTypes = _interopDefault(require('prop-types'));
11
11
  var classNames = _interopDefault(require('classnames'));
12
- var keyname = _interopDefault(require('keyname'));
13
12
  var nextId = require('react-id-generator');
14
13
  var nextId__default = _interopDefault(nextId);
14
+ var keyname = _interopDefault(require('keyname'));
15
15
  var reactDom = require('react-dom');
16
16
  var FocusTrap = _interopDefault(require('focus-trap-react'));
17
17
  var reactPopper = require('react-popper');
@@ -143,14 +143,17 @@ var iconTypes = [
143
143
  'chevron-down',
144
144
  'chevron-left',
145
145
  'chevron-right',
146
+ 'clipboard',
146
147
  'close',
147
148
  'code',
148
149
  'copy',
149
150
  'download',
150
151
  'dropper',
151
152
  'exchange',
153
+ 'export-solid',
152
154
  'external-link',
153
155
  'eye',
156
+ 'filter-solid',
154
157
  'filter',
155
158
  'flag',
156
159
  'gears',
@@ -170,10 +173,12 @@ var iconTypes = [
170
173
  'new',
171
174
  'no',
172
175
  'pencil',
176
+ 'play',
173
177
  'plus',
174
178
  'question-circle',
175
179
  'radio-checked',
176
180
  'radio-unchecked',
181
+ 'recycle-square',
177
182
  'recycle',
178
183
  'resend',
179
184
  'robot',
@@ -210,14 +215,17 @@ function __variableDynamicImportRuntime0__(path) {
210
215
  case './icons/checkbox-unchecked.svg': return Promise.resolve().then(function () { return require('./checkbox-unchecked.js'); });
211
216
  case './icons/chevron-double.svg': return Promise.resolve().then(function () { return require('./chevron-double.js'); });
212
217
  case './icons/chevron.svg': return Promise.resolve().then(function () { return require('./chevron.js'); });
218
+ case './icons/clipboard.svg': return Promise.resolve().then(function () { return require('./clipboard.js'); });
213
219
  case './icons/close.svg': return Promise.resolve().then(function () { return require('./close.js'); });
214
220
  case './icons/code.svg': return Promise.resolve().then(function () { return require('./code.js'); });
215
221
  case './icons/copy.svg': return Promise.resolve().then(function () { return require('./copy.js'); });
216
222
  case './icons/download.svg': return Promise.resolve().then(function () { return require('./download.js'); });
217
223
  case './icons/dropper.svg': return Promise.resolve().then(function () { return require('./dropper.js'); });
218
224
  case './icons/exchange.svg': return Promise.resolve().then(function () { return require('./exchange.js'); });
225
+ case './icons/export-solid.svg': return Promise.resolve().then(function () { return require('./export-solid.js'); });
219
226
  case './icons/external-link.svg': return Promise.resolve().then(function () { return require('./external-link.js'); });
220
227
  case './icons/eye.svg': return Promise.resolve().then(function () { return require('./eye.js'); });
228
+ case './icons/filter-solid.svg': return Promise.resolve().then(function () { return require('./filter-solid.js'); });
221
229
  case './icons/filter.svg': return Promise.resolve().then(function () { return require('./filter.js'); });
222
230
  case './icons/flag.svg': return Promise.resolve().then(function () { return require('./flag.js'); });
223
231
  case './icons/gears.svg': return Promise.resolve().then(function () { return require('./gears.js'); });
@@ -237,10 +245,12 @@ function __variableDynamicImportRuntime0__(path) {
237
245
  case './icons/new.svg': return Promise.resolve().then(function () { return require('./new.js'); });
238
246
  case './icons/no.svg': return Promise.resolve().then(function () { return require('./no.js'); });
239
247
  case './icons/pencil.svg': return Promise.resolve().then(function () { return require('./pencil.js'); });
248
+ case './icons/play.svg': return Promise.resolve().then(function () { return require('./play.js'); });
240
249
  case './icons/plus.svg': return Promise.resolve().then(function () { return require('./plus.js'); });
241
250
  case './icons/question-circle.svg': return Promise.resolve().then(function () { return require('./question-circle.js'); });
242
251
  case './icons/radio-checked.svg': return Promise.resolve().then(function () { return require('./radio-checked.js'); });
243
252
  case './icons/radio-unchecked.svg': return Promise.resolve().then(function () { return require('./radio-unchecked.js'); });
253
+ case './icons/recycle-square.svg': return Promise.resolve().then(function () { return require('./recycle-square.js'); });
244
254
  case './icons/recycle.svg': return Promise.resolve().then(function () { return require('./recycle.js'); });
245
255
  case './icons/resend.svg': return Promise.resolve().then(function () { return require('./resend.js'); });
246
256
  case './icons/robot.svg': return Promise.resolve().then(function () { return require('./robot.js'); });
@@ -279,19 +289,19 @@ var Icon = React.forwardRef(function (_a, ref) {
279
289
  if (process.env.NODE_ENV === 'test') {
280
290
  return;
281
291
  }
282
- __variableDynamicImportRuntime0__("./icons/" + name + ".svg")
292
+ __variableDynamicImportRuntime0__("./icons/".concat(name, ".svg"))
283
293
  .then(function (icon) {
284
294
  isMounted.current && setIcon(function () { return icon["default"]; });
285
295
  })["catch"](function () {
286
- console.error("Could not find icon type \"" + type + "\".");
296
+ console.error("Could not find icon type \"".concat(type, "\"."));
287
297
  isMounted.current && setIcon(null);
288
298
  });
289
299
  return function () {
290
300
  isMounted.current = false;
291
301
  };
292
302
  }, [type]);
293
- var data = tslib.__assign(tslib.__assign({}, other), { 'aria-hidden': !label, className: classNames('Icon', "Icon--" + type, className, (_b = {},
294
- _b["Icon__" + direction] = !!direction,
303
+ var data = tslib.__assign(tslib.__assign({}, other), { 'aria-hidden': !label, className: classNames('Icon', "Icon--".concat(type), className, (_b = {},
304
+ _b["Icon__".concat(direction)] = !!direction,
295
305
  _b)) });
296
306
  return (React__default.createElement("div", tslib.__assign({ ref: ref }, data),
297
307
  label && React__default.createElement(Offscreen, null, label),
@@ -305,6 +315,214 @@ Icon.propTypes = {
305
315
  };
306
316
  Icon.displayName = 'Icon';
307
317
 
318
+ var PanelTrigger = function (_a) {
319
+ var children = _a.children, className = _a.className, open = _a.open, fullWidth = _a.fullWidth, onClick = _a.onClick, _b = _a.iconExpanded, iconExpanded = _b === void 0 ? 'chevron-down' : _b, _c = _a.iconCollapsed, iconCollapsed = _c === void 0 ? 'chevron-right' : _c, heading = _a.heading, otherProps = tslib.__rest(_a, ["children", "className", "open", "fullWidth", "onClick", "iconExpanded", "iconCollapsed", "heading"]);
320
+ var Header = typeof heading === 'object' && 'level' in heading && !!heading.level
321
+ ? "h".concat(heading.level)
322
+ : React__default.Fragment;
323
+ return (React__default.createElement(Header, null,
324
+ React__default.createElement("button", tslib.__assign({ className: classNames(className, 'ExpandCollapse__trigger', {
325
+ fullWidth: fullWidth
326
+ }), type: "button", "aria-expanded": open, onClick: onClick }, otherProps),
327
+ React__default.createElement("div", { className: "ExpandCollapse__trigger-title" }, typeof children === 'function'
328
+ ? children({ open: !!open })
329
+ : children),
330
+ React__default.createElement(Icon, { type: open ? iconExpanded : iconCollapsed }))));
331
+ };
332
+ PanelTrigger.propTypes = {
333
+ children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
334
+ open: PropTypes.bool,
335
+ iconExpanded: PropTypes.string,
336
+ iconCollapsed: PropTypes.string,
337
+ heading: PropTypes.shape({
338
+ level: PropTypes.number
339
+ })
340
+ };
341
+ PanelTrigger.displayName = 'PanelTrigger';
342
+ var PanelTrigger$1 = React__default.memo(PanelTrigger);
343
+
344
+ var injectStyleTag = function () {
345
+ var style = document.createElement('style');
346
+ document.head.appendChild(style);
347
+ return style;
348
+ };
349
+ var setStyle = function (tag, cssString) {
350
+ tag.textContent = cssString;
351
+ };
352
+ var removeStyleTag = function (tag) {
353
+ document.head.removeChild(tag);
354
+ };
355
+
356
+ var ExpandCollapsePanel = /** @class */ (function (_super) {
357
+ tslib.__extends(ExpandCollapsePanel, _super);
358
+ function ExpandCollapsePanel() {
359
+ var _this = _super !== null && _super.apply(this, arguments) || this;
360
+ _this.state = {
361
+ controlled: typeof _this.props.open !== 'undefined',
362
+ isOpen: typeof _this.props.open !== 'undefined' ? _this.props.open : false
363
+ };
364
+ _this.panel = React__default.createRef();
365
+ _this.handleToggle = function (e) {
366
+ var _a = _this.props.onToggle, onToggle = _a === void 0 ? function () { } : _a;
367
+ var _b = _this.state, isOpen = _b.isOpen, controlled = _b.controlled;
368
+ onToggle(e);
369
+ if (!controlled) {
370
+ _this.setState({ isOpen: !isOpen, isAnimating: true });
371
+ }
372
+ };
373
+ _this.animateOpen = function () {
374
+ var panel = _this.panel.current;
375
+ var animationTiming = _this.props.animationTiming;
376
+ if (!animationTiming) {
377
+ _this.setState({ isAnimating: false });
378
+ return;
379
+ }
380
+ var rect = panel === null || panel === void 0 ? void 0 : panel.getBoundingClientRect();
381
+ if (!rect) {
382
+ return;
383
+ }
384
+ if (!_this.styleTag) {
385
+ _this.styleTag = injectStyleTag();
386
+ }
387
+ setStyle(_this.styleTag, "\n @keyframes expandOpenAnimation {\n 0% { opacity: 0; height: 0; }\n 100% { opacity: 1; height: ".concat(rect.height, "px; }\n }\n\n .cauldron-expand-open {\n will-change: opacity, height;\n overflow: hidden;\n animation: expandOpenAnimation ease-in-out ").concat(animationTiming, "ms forwards;\n }\n "));
388
+ _this.setState({ animationClass: 'cauldron-expand-open' }, function () {
389
+ setTimeout(function () {
390
+ _this.setState({ animationClass: '', isAnimating: false });
391
+ setStyle(_this.styleTag, '');
392
+ }, animationTiming);
393
+ });
394
+ };
395
+ _this.animateClose = function () {
396
+ var panel = _this.panel.current;
397
+ var animationTiming = _this.props.animationTiming;
398
+ if (!animationTiming) {
399
+ _this.setState({ isAnimating: false });
400
+ return;
401
+ }
402
+ if (!_this.styleTag) {
403
+ _this.styleTag = injectStyleTag();
404
+ }
405
+ var rect = panel === null || panel === void 0 ? void 0 : panel.getBoundingClientRect();
406
+ if (!rect)
407
+ return;
408
+ setStyle(_this.styleTag, "\n @keyframes collapseCloseAnimation {\n 0% { opacity: 1; height: ".concat(rect.height, "px; }\n 100% { opacity: 0; height: 0; }\n }\n\n .cauldron-collapse-close {\n will-change: opacity, height;\n overflow: hidden;\n animation: collapseCloseAnimation ease-in-out ").concat(animationTiming, "ms forwards;\n }\n "));
409
+ _this.setState({ animationClass: 'cauldron-collapse-close' }, function () {
410
+ setTimeout(function () {
411
+ _this.setState({ animationClass: '', isAnimating: false });
412
+ setStyle(_this.styleTag, '');
413
+ }, animationTiming);
414
+ });
415
+ };
416
+ return _this;
417
+ }
418
+ ExpandCollapsePanel.prototype.componentWillUnmount = function () {
419
+ var styleTag = this.styleTag;
420
+ if (styleTag) {
421
+ removeStyleTag(styleTag);
422
+ }
423
+ };
424
+ ExpandCollapsePanel.prototype.componentDidUpdate = function (prevProps, prevState) {
425
+ var _a = this.state, openState = _a.isOpen, controlled = _a.controlled;
426
+ var openProp = this.props.open;
427
+ if (controlled && openState !== openProp) {
428
+ this.setState({ isOpen: !!openProp, isAnimating: true });
429
+ }
430
+ if (typeof openProp !== typeof prevProps.open) {
431
+ this.setState({ controlled: typeof openProp !== 'undefined' });
432
+ }
433
+ if (prevState.isOpen !== openState && openState) {
434
+ this.animateOpen();
435
+ }
436
+ else if (prevState.isOpen !== openState && !openState) {
437
+ this.animateClose();
438
+ }
439
+ };
440
+ ExpandCollapsePanel.prototype.render = function () {
441
+ var _a = this.props, children = _a.children, animationTiming = _a.animationTiming, className = _a.className, onToggle = _a.onToggle, open = _a.open, otherProps = tslib.__rest(_a, ["children", "animationTiming", "className", "onToggle", "open"]);
442
+ var _b = this.state, isOpen = _b.isOpen, isAnimating = _b.isAnimating, animationClass = _b.animationClass;
443
+ var trigger = React__default.Children.toArray(children).find(function (child) { return child.type === PanelTrigger$1; });
444
+ var panelElements = React__default.Children.toArray(children).filter(function (child) {
445
+ return typeof child === 'string' ||
446
+ child.type !== PanelTrigger$1;
447
+ });
448
+ return (React__default.createElement(React__default.Fragment, null,
449
+ trigger &&
450
+ React__default.cloneElement(trigger, {
451
+ open: isOpen,
452
+ onClick: this.handleToggle
453
+ }),
454
+ React__default.createElement("div", tslib.__assign({ className: classNames(className, 'ExpandCollapse__panel', animationClass, {
455
+ 'is--hidden': !isOpen && !isAnimating
456
+ }), ref: this.panel }, otherProps), panelElements)));
457
+ };
458
+ ExpandCollapsePanel.defaultProps = {
459
+ animationTiming: 250,
460
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
461
+ onToggle: function () { }
462
+ };
463
+ ExpandCollapsePanel.propTypes = {
464
+ open: PropTypes.bool,
465
+ children: PropTypes.node.isRequired,
466
+ className: PropTypes.string,
467
+ animationTiming: PropTypes.oneOfType([PropTypes.number, PropTypes.bool]),
468
+ onToggle: PropTypes.func
469
+ };
470
+ return ExpandCollapsePanel;
471
+ }(React__default.Component));
472
+
473
+ var AccordionTrigger = function (_a) {
474
+ var children = _a.children, triggerProps = tslib.__rest(_a, ["children"]);
475
+ return React__default.createElement(React__default.Fragment, null, children);
476
+ };
477
+ var AccordionContent = function (_a) {
478
+ var children = _a.children, className = _a.className, otherProps = tslib.__rest(_a, ["children", "className"]);
479
+ return (React__default.createElement("div", tslib.__assign({ className: classNames('Accordion__panel', className) }, otherProps), children));
480
+ };
481
+ var Accordion = function (_a) {
482
+ var children = _a.children;
483
+ var childrenArray = React__default.Children.toArray(children);
484
+ var trigger = childrenArray.find(function (child) {
485
+ return typeof child === 'string' ||
486
+ child.type === AccordionTrigger;
487
+ });
488
+ var panelElement = childrenArray.find(function (child) {
489
+ return typeof child === 'string' ||
490
+ child.type === AccordionContent;
491
+ });
492
+ var isValid = !!(React__default.isValidElement(trigger) && React__default.isValidElement(panelElement));
493
+ if (!isValid) {
494
+ console.warn('Must provide <AccordionTrigger /> and <AccordionContent /> element(s). You provided:', {
495
+ trigger: trigger,
496
+ panelElement: panelElement,
497
+ isValid: isValid
498
+ });
499
+ return null;
500
+ }
501
+ var _b = trigger.props, triggerClassName = _b.className, triggerProps = tslib.__rest(_b, ["className"]);
502
+ var elementId = nextId.useId();
503
+ return (React__default.createElement("div", { className: "Accordion" },
504
+ React__default.createElement(ExpandCollapsePanel, tslib.__assign({ id: panelElement.props.id || "".concat(elementId, "-panel") }, panelElement.props),
505
+ React__default.createElement(PanelTrigger$1, tslib.__assign({ iconCollapsed: "triangle-right", iconExpanded: "triangle-down", className: classNames('Accordion__trigger', trigger.props.className), "aria-controls": panelElement.props.id || "".concat(elementId, "-panel"), heading: trigger.props.heading }, trigger.props), trigger),
506
+ panelElement)));
507
+ };
508
+ Accordion.displayName = 'Accordion';
509
+ AccordionContent.displayName = 'AccordionContent';
510
+ AccordionTrigger.displayName = 'AccordionTrigger';
511
+ Accordion.propTypes = {
512
+ children: PropTypes.node,
513
+ className: PropTypes.string
514
+ };
515
+ AccordionTrigger.propTypes = {
516
+ children: PropTypes.node,
517
+ heading: PropTypes.shape({
518
+ level: PropTypes.number
519
+ })
520
+ };
521
+ AccordionContent.propTypes = {
522
+ children: PropTypes.node.isRequired,
523
+ className: PropTypes.string
524
+ };
525
+
308
526
  var Scrim = /** @class */ (function (_super) {
309
527
  tslib.__extends(Scrim, _super);
310
528
  function Scrim(props) {
@@ -364,7 +582,7 @@ var Scrim = /** @class */ (function (_super) {
364
582
  if (destroy) {
365
583
  return null;
366
584
  }
367
- return (React__default.createElement("div", { ref: function (el) { return (_this.el = el); }, className: "Scrim " + animationClass }));
585
+ return (React__default.createElement("div", { ref: function (el) { return (_this.el = el); }, className: "Scrim ".concat(animationClass) }));
368
586
  };
369
587
  Scrim.propTypes = {
370
588
  show: PropTypes.bool.isRequired
@@ -498,9 +716,9 @@ var TopBar = /** @class */ (function (_super) {
498
716
  args[_i] = arguments[_i];
499
717
  }
500
718
  // @ts-ignore we're just spreading the original args
501
- _this.onKeyDown.apply(_this, tslib.__spread(args));
719
+ _this.onKeyDown.apply(_this, tslib.__spreadArray([], tslib.__read(args), false));
502
720
  if (child.props.onKeyDown) {
503
- (_a = child.props).onKeyDown.apply(_a, tslib.__spread(args));
721
+ (_a = child.props).onKeyDown.apply(_a, tslib.__spreadArray([], tslib.__read(args), false));
504
722
  }
505
723
  },
506
724
  tabIndex: 0,
@@ -536,7 +754,7 @@ var TopBar = /** @class */ (function (_super) {
536
754
  };
537
755
  TopBar.prototype.onKeyDown = function (e) {
538
756
  var key = keyname(e.which);
539
- var menuItems = tslib.__spread(this.menuItems);
757
+ var menuItems = tslib.__spreadArray([], tslib.__read(this.menuItems), false);
540
758
  // account for hidden side bar trigger (hamburger)
541
759
  if (this.state.wide && this.props.hasTrigger) {
542
760
  menuItems.shift();
@@ -592,6 +810,7 @@ var TopBarTrigger = function (_a) {
592
810
  };
593
811
  TopBarTrigger.displayName = 'TopBarTrigger';
594
812
  TopBarTrigger.propTypes = {
813
+ // @ts-expect-error
595
814
  children: PropTypes.node.isRequired,
596
815
  className: PropTypes.string
597
816
  };
@@ -787,11 +1006,15 @@ var OptionsMenuList = /** @class */ (function (_super) {
787
1006
  /* eslint-enable @typescript-eslint/no-unused-vars */
788
1007
  var items = React__default.Children.toArray(children).map(function (child, i) {
789
1008
  var _a = child.props, className = _a.className, other = tslib.__rest(_a, ["className"]);
790
- return React__default.cloneElement(child, tslib.__assign({ key: "list-item-" + i, className: classNames('OptionsMenu__list-item', className), tabIndex: -1, role: 'menuitem', ref: function (el) { return (_this.itemRefs[i] = el); } }, other));
1009
+ return React__default.cloneElement(child, tslib.__assign({ key: "list-item-".concat(i), className: classNames('OptionsMenu__list-item', className), tabIndex: -1, role: 'menuitem', ref: function (el) { return (_this.itemRefs[i] = el); } }, other));
791
1010
  });
1011
+ // This allows the ClickOutsideListener to only be activated when the menu is
1012
+ // currently open. This prevents an obscure behavior where the activation of a
1013
+ // different menu would cause all menus to close
1014
+ var clickOutsideEventActive = !show ? false : undefined;
792
1015
  // Key event is being handled in componentDidMount
793
1016
  /* eslint-disable jsx-a11y/click-events-have-key-events */
794
- return (React__default.createElement(ClickOutsideListener, { onClickOutside: this.handleClickOutside },
1017
+ return (React__default.createElement(ClickOutsideListener, { onClickOutside: this.handleClickOutside, mouseEvent: clickOutsideEventActive, touchEvent: clickOutsideEventActive },
795
1018
  React__default.createElement("ul", tslib.__assign({}, other, { className: classNames('OptionsMenu__list', className), "aria-expanded": show, role: "menu", onClick: handleClick, ref: function (el) {
796
1019
  _this.menuRef = el;
797
1020
  if (menuRef) {
@@ -830,7 +1053,6 @@ var OptionsMenu = /** @class */ (function (_super) {
830
1053
  var show = _a.show;
831
1054
  return ({ show: !show });
832
1055
  });
833
- event.preventDefault();
834
1056
  };
835
1057
  _this.handleClose = function () {
836
1058
  var _a;
@@ -1167,7 +1389,8 @@ var SideBar = /** @class */ (function (_super) {
1167
1389
  setTimeout(function () {
1168
1390
  var _a, _b;
1169
1391
  _this.setState({ animateClass: second });
1170
- var firstFocusable = show && ((_b = (_a = _this.navList) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.querySelector(focusableSelector));
1392
+ var firstFocusable = show &&
1393
+ ((_b = (_a = _this.navList) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.querySelector(focusableSelector));
1171
1394
  if (firstFocusable) {
1172
1395
  firstFocusable.focus();
1173
1396
  }
@@ -1216,6 +1439,7 @@ SideBarItem.defaultProps = {
1216
1439
  autoClickLink: true
1217
1440
  };
1218
1441
  SideBarItem.propTypes = {
1442
+ // @ts-expect-error
1219
1443
  children: PropTypes.node.isRequired,
1220
1444
  autoClickLink: PropTypes.bool
1221
1445
  };
@@ -1305,7 +1529,7 @@ var Dialog = /** @class */ (function (_super) {
1305
1529
  var close = !forceAction ? (React__default.createElement("button", { className: "Dialog__close", type: "button", onClick: this.close },
1306
1530
  React__default.createElement(Icon, { type: "close", "aria-hidden": "true" }),
1307
1531
  React__default.createElement(Offscreen, null, closeButtonText))) : null;
1308
- var Heading = "h" + (typeof heading === 'object' && 'level' in heading && !!heading.level
1532
+ var Heading = "h".concat(typeof heading === 'object' && 'level' in heading && !!heading.level
1309
1533
  ? heading.level
1310
1534
  : 2);
1311
1535
  var Dialog = (React__default.createElement(FocusTrap, { focusTrapOptions: {
@@ -1464,7 +1688,7 @@ var SkipLink = /** @class */ (function (_super) {
1464
1688
  target: function (props, propName, componentName) {
1465
1689
  var value = props[propName];
1466
1690
  if (!value || typeof value !== 'string' || value[0] !== '#') {
1467
- return new Error("Invalid prop " + propName + " supplied to " + componentName + " (must be string starting with \"#\")");
1691
+ return new Error("Invalid prop ".concat(propName, " supplied to ").concat(componentName, " (must be string starting with \"#\")"));
1468
1692
  }
1469
1693
  },
1470
1694
  skipText: PropTypes.string,
@@ -1480,6 +1704,8 @@ var Button = React.forwardRef(function (_a, ref) {
1480
1704
  'Button--secondary': variant === 'secondary',
1481
1705
  'Button--error': variant === 'error',
1482
1706
  Link: variant === 'link',
1707
+ Tag: variant === 'tag',
1708
+ 'Button--tag': variant === 'tag',
1483
1709
  'Button--thin': thin
1484
1710
  }), ref: ref || buttonRef }, other), children));
1485
1711
  });
@@ -1609,8 +1835,8 @@ function Tooltip(_a) {
1609
1835
  targetElement === null || targetElement === void 0 ? void 0 : targetElement.setAttribute(association, [id, attrText].filter(Boolean).join(' '));
1610
1836
  }
1611
1837
  }, [targetElement, id]);
1612
- return (showTooltip || hideElementOnHidden) && isBrowser()
1613
- ? reactDom.createPortal(React__default.createElement("div", tslib.__assign({ id: id, className: classNames('Tooltip', "Tooltip--" + placement, className, {
1838
+ return (React__default.createElement(React__default.Fragment, null, (showTooltip || hideElementOnHidden) && isBrowser()
1839
+ ? reactDom.createPortal(React__default.createElement("div", tslib.__assign({ id: id, className: classNames('Tooltip', "Tooltip--".concat(placement), className, {
1614
1840
  TooltipInfo: variant === 'info',
1615
1841
  'Tooltip--hidden': !showTooltip && hideElementOnHidden,
1616
1842
  'Tooltip--big': variant === 'big'
@@ -1618,7 +1844,7 @@ function Tooltip(_a) {
1618
1844
  variant !== 'big' && (React__default.createElement("div", { className: "TooltipArrow", ref: setArrowElement, style: styles.arrow })),
1619
1845
  children), (portal && 'current' in portal ? portal.current : portal) ||
1620
1846
  document.body)
1621
- : null;
1847
+ : null));
1622
1848
  }
1623
1849
  Tooltip.displayName = 'Tooltip';
1624
1850
  Tooltip.propTypes = {
@@ -1681,6 +1907,7 @@ IconButton.propTypes = {
1681
1907
  as: PropTypes.elementType,
1682
1908
  // @ts-expect-error
1683
1909
  icon: PropTypes.string.isRequired,
1910
+ // @ts-expect-error
1684
1911
  label: PropTypes.node.isRequired,
1685
1912
  // @ts-expect-error
1686
1913
  tooltipPlacement: PropTypes.string,
@@ -1695,7 +1922,7 @@ IconButton.displayName = 'IconButton';
1695
1922
  var i = 0;
1696
1923
  var randomId = function () {
1697
1924
  var num = Math.floor(Math.random() * 10000) + 1;
1698
- return "x_" + i++ + "_" + num;
1925
+ return "x_".concat(i++, "_").concat(num);
1699
1926
  };
1700
1927
 
1701
1928
  /*
@@ -1790,16 +2017,15 @@ var Pointout = /** @class */ (function (_super) {
1790
2017
  visibleFocusable[elementIndex].classList.remove('Pointout--focus-active');
1791
2018
  };
1792
2019
  _this.positionRelativeToTarget = function () {
1793
- var _a, _b;
1794
- var _c = _this.props, target = _c.target, portal = _c.portal, arrowPosition = _c.arrowPosition, position = _c.position;
2020
+ var _a = _this.props, target = _a.target, portal = _a.portal, arrowPosition = _a.arrowPosition, position = _a.position;
1795
2021
  if (!target) {
1796
2022
  return;
1797
2023
  }
1798
- var targetNode = ((_a = target) === null || _a === void 0 ? void 0 : _a.current) ||
2024
+ var targetNode = (target === null || target === void 0 ? void 0 : target.current) ||
1799
2025
  target;
1800
- var portalNode = ((_b = portal) === null || _b === void 0 ? void 0 : _b.current) ||
2026
+ var portalNode = (portal === null || portal === void 0 ? void 0 : portal.current) ||
1801
2027
  portal;
1802
- var _d = targetNode.getBoundingClientRect(), top = _d.top, left = _d.left, width = _d.width, height = _d.height;
2028
+ var _b = targetNode.getBoundingClientRect(), top = _b.top, left = _b.left, width = _b.width, height = _b.height;
1803
2029
  if (portalNode && portalNode !== document.body) {
1804
2030
  // If the portal is not placed on document.body
1805
2031
  // position the FTPO relative to the portal
@@ -1807,48 +2033,48 @@ var Pointout = /** @class */ (function (_super) {
1807
2033
  top -= rect.top - portalNode.scrollTop;
1808
2034
  left -= rect.left - portalNode.scrollLeft;
1809
2035
  }
1810
- var _e = tslib.__read(arrowPosition.split('-'), 1), arrowBoxSide = _e[0];
2036
+ var _c = tslib.__read(arrowPosition.split('-'), 1), arrowBoxSide = _c[0];
1811
2037
  var style;
1812
2038
  switch (arrowBoxSide) {
1813
2039
  case 'right':
1814
2040
  style = {
1815
- left: left + "px",
1816
- top: (position === 'center'
2041
+ left: "".concat(left, "px"),
2042
+ top: "".concat(position === 'center'
1817
2043
  ? top + height / 2
1818
2044
  : position === 'start'
1819
2045
  ? top
1820
- : top + height) + "px"
2046
+ : top + height, "px")
1821
2047
  };
1822
2048
  break;
1823
2049
  case 'bottom':
1824
2050
  style = {
1825
- top: top + "px",
1826
- left: (position === 'center'
2051
+ top: "".concat(top, "px"),
2052
+ left: "".concat(position === 'center'
1827
2053
  ? left + width / 2
1828
2054
  : position === 'start'
1829
2055
  ? left
1830
- : left + width) + "px"
2056
+ : left + width, "px")
1831
2057
  };
1832
2058
  break;
1833
2059
  case 'left':
1834
2060
  style = {
1835
- left: left + width + "px",
1836
- top: (position === 'center'
2061
+ left: "".concat(left + width, "px"),
2062
+ top: "".concat(position === 'center'
1837
2063
  ? top + height / 2
1838
2064
  : position === 'start'
1839
2065
  ? top
1840
- : top + height) + "px"
2066
+ : top + height, "px")
1841
2067
  };
1842
2068
  break;
1843
2069
  case 'top':
1844
2070
  default:
1845
2071
  style = {
1846
- top: top + height + "px",
1847
- left: (position === 'center'
2072
+ top: "".concat(top + height, "px"),
2073
+ left: "".concat(position === 'center'
1848
2074
  ? left + width / 2
1849
2075
  : position === 'start'
1850
2076
  ? left
1851
- : left + width) + "px"
2077
+ : left + width, "px")
1852
2078
  };
1853
2079
  break;
1854
2080
  }
@@ -1860,7 +2086,7 @@ var Pointout = /** @class */ (function (_super) {
1860
2086
  }
1861
2087
  Pointout.prototype.getFocusableElements = function (root) {
1862
2088
  return root
1863
- ? Array.from(root.querySelectorAll(focusable + ", [data-focusable]"))
2089
+ ? Array.from(root.querySelectorAll("".concat(focusable, ", [data-focusable]")))
1864
2090
  : [];
1865
2091
  };
1866
2092
  Pointout.prototype.componentDidMount = function () {
@@ -1930,11 +2156,11 @@ var Pointout = /** @class */ (function (_super) {
1930
2156
  'Pointout--no-arrow': noArrow,
1931
2157
  'Pointout--auto': !!target
1932
2158
  },
1933
- _a["Pointout__arrow--" + arrowPosition] = !!arrowPosition && !noArrow,
1934
- _a["Pointout--" + position] = !!target,
2159
+ _a["Pointout__arrow--".concat(arrowPosition)] = !!arrowPosition && !noArrow,
2160
+ _a["Pointout--".concat(position)] = !!target,
1935
2161
  _a)), style: style, role: target ? undefined : 'region', "aria-labelledby": heading ? headingId : undefined, "aria-hidden": !!target && !disableOffscreenPointout, ref: function (el) { return (_this.visibleRef = el); } },
1936
2162
  noArrow ? null : (React__default.createElement("div", { className: classNames('Pointout__arrow', (_b = {},
1937
- _b["Pointout__arrow--" + arrowPosition] = !!arrowPosition && !noArrow,
2163
+ _b["Pointout__arrow--".concat(arrowPosition)] = !!arrowPosition && !noArrow,
1938
2164
  _b)) },
1939
2165
  React__default.createElement("div", { className: "Pointout__arrow-pointer" }))),
1940
2166
  React__default.createElement("div", { className: "Pointout__box" },
@@ -2115,7 +2341,7 @@ var Toast = /** @class */ (function (_super) {
2115
2341
  var scrim = type === 'action-needed' && show ? (React__default.createElement("div", { className: "Scrim--light Scrim--show Scrim--fade-in" })) : null;
2116
2342
  var defaultProps = {
2117
2343
  tabIndex: -1,
2118
- className: "Toast Toast--" + typeMap[type].className + " " + animationClass
2344
+ className: "Toast Toast--".concat(typeMap[type].className, " ").concat(animationClass)
2119
2345
  };
2120
2346
  if (!focus) {
2121
2347
  defaultProps.role = 'alert';
@@ -2301,9 +2527,10 @@ var Select = React__default.forwardRef(function (_a, ref) {
2301
2527
  'Field__select--disabled': disabled,
2302
2528
  'Field--has-error': !!error
2303
2529
  }) },
2304
- React__default.createElement("select", tslib.__assign({ ref: ref, id: selectId, disabled: disabled, required: required, onChange: handleChange }, dynamicProps, rest), (options === null || options === void 0 ? void 0 : options.length) ? options.map(function (option) {
2305
- return (React__default.createElement("option", { className: "Field__option", key: option.key, value: option.value, disabled: option.disabled }, option.label || option.value));
2306
- })
2530
+ React__default.createElement("select", tslib.__assign({ ref: ref, id: selectId, disabled: disabled, required: required, onChange: handleChange }, dynamicProps, rest), (options === null || options === void 0 ? void 0 : options.length)
2531
+ ? options.map(function (option) {
2532
+ return (React__default.createElement("option", { className: "Field__option", key: option.key, value: option.value, disabled: option.disabled }, option.label || option.value));
2533
+ })
2307
2534
  : children),
2308
2535
  React__default.createElement("div", { className: "arrow-down" })),
2309
2536
  error && (React__default.createElement("div", { id: errorId, className: "Error" }, error))));
@@ -2352,7 +2579,7 @@ var RadioGroup = function (_a) {
2352
2579
  var _a;
2353
2580
  handleChange(radioValue);
2354
2581
  onChange(radio, (_a = inputs.current) === null || _a === void 0 ? void 0 : _a[index]);
2355
- }, disabled: disabled, checked: isChecked, "aria-describedby": labelDescription ? id + "Desc" : undefined }, other)),
2582
+ }, disabled: disabled, checked: isChecked, "aria-describedby": labelDescription ? "".concat(id, "Desc") : undefined }, other)),
2356
2583
  React__default.createElement("label", { htmlFor: id, className: classNames('Field__label', {
2357
2584
  'Field__label--disabled': disabled
2358
2585
  }) }, label),
@@ -2360,7 +2587,7 @@ var RadioGroup = function (_a) {
2360
2587
  'Radio__overlay--focused': isFocused,
2361
2588
  'Radio__overlay--disabled': disabled
2362
2589
  }), type: isChecked ? 'radio-checked' : 'radio-unchecked', "aria-hidden": "true", onClick: function () { return onRadioClick(index); } }),
2363
- labelDescription && (React__default.createElement("span", { id: id + "Desc", className: classNames('Field__labelDescription', {
2590
+ labelDescription && (React__default.createElement("span", { id: "".concat(id, "Desc"), className: classNames('Field__labelDescription', {
2364
2591
  'Field__labelDescription--disabled': disabled
2365
2592
  }) }, labelDescription))));
2366
2593
  });
@@ -2380,7 +2607,7 @@ RadioGroup.propTypes = {
2380
2607
  })).isRequired,
2381
2608
  hasLabel: function (props, propName, componentName) {
2382
2609
  if (!props['aria-label'] && !props['aria-labelledby']) {
2383
- return new Error(componentName + " must have an \"aria-label\" or \"aria-labelledby\" prop");
2610
+ return new Error("".concat(componentName, " must have an \"aria-label\" or \"aria-labelledby\" prop"));
2384
2611
  }
2385
2612
  },
2386
2613
  className: PropTypes.string,
@@ -2499,7 +2726,7 @@ RadioCardGroup.propTypes = {
2499
2726
  })).isRequired,
2500
2727
  hasLabel: function (props, propName, componentName) {
2501
2728
  if (!props['aria-label'] && !props['aria-labelledby']) {
2502
- return new Error(componentName + " must have an \"aria-label\" or \"aria-labelledby\" prop");
2729
+ return new Error("".concat(componentName, " must have an \"aria-label\" or \"aria-labelledby\" prop"));
2503
2730
  }
2504
2731
  },
2505
2732
  className: PropTypes.string,
@@ -2670,152 +2897,6 @@ var TextField = /** @class */ (function (_super) {
2670
2897
  return TextField;
2671
2898
  }(React__default.Component));
2672
2899
 
2673
- function PanelTrigger(_a) {
2674
- var children = _a.children, className = _a.className, open = _a.open, fullWidth = _a.fullWidth, onClick = _a.onClick, _b = _a.iconExpanded, iconExpanded = _b === void 0 ? 'chevron-down' : _b, _c = _a.iconCollapsed, iconCollapsed = _c === void 0 ? 'chevron-right' : _c, other = tslib.__rest(_a, ["children", "className", "open", "fullWidth", "onClick", "iconExpanded", "iconCollapsed"]);
2675
- return (React__default.createElement("button", tslib.__assign({}, other, { className: classNames('ExpandCollapse__trigger', fullWidth ? 'fullWidth' : '', className), type: "button", "aria-expanded": open, onClick: onClick }),
2676
- React__default.createElement("div", { className: "ExpandCollapse__trigger-title" }, typeof children === 'function' ? children({ open: !!open }) : children),
2677
- React__default.createElement(Icon, { type: open ? iconExpanded : iconCollapsed })));
2678
- }
2679
- PanelTrigger.propTypes = {
2680
- children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
2681
- open: PropTypes.bool,
2682
- onClick: PropTypes.func,
2683
- className: PropTypes.string,
2684
- iconExpanded: PropTypes.string,
2685
- iconCollapsed: PropTypes.string
2686
- };
2687
- var PanelTrigger$1 = React__default.memo(PanelTrigger);
2688
-
2689
- var injectStyleTag = function () {
2690
- var style = document.createElement('style');
2691
- document.head.appendChild(style);
2692
- return style;
2693
- };
2694
- var setStyle = function (tag, cssString) {
2695
- tag.textContent = cssString;
2696
- };
2697
- var removeStyleTag = function (tag) {
2698
- document.head.removeChild(tag);
2699
- };
2700
-
2701
- var ExpandCollapsePanel = /** @class */ (function (_super) {
2702
- tslib.__extends(ExpandCollapsePanel, _super);
2703
- function ExpandCollapsePanel() {
2704
- var _this = _super !== null && _super.apply(this, arguments) || this;
2705
- _this.state = {
2706
- controlled: typeof _this.props.open !== 'undefined',
2707
- isOpen: typeof _this.props.open !== 'undefined' ? _this.props.open : false
2708
- };
2709
- _this.panel = React__default.createRef();
2710
- _this.handleToggle = function (e) {
2711
- var onToggle = _this.props.onToggle;
2712
- var _a = _this.state, isOpen = _a.isOpen, controlled = _a.controlled;
2713
- onToggle(e);
2714
- if (!controlled) {
2715
- _this.setState({ isOpen: !isOpen, isAnimating: true });
2716
- }
2717
- };
2718
- _this.animateOpen = function () {
2719
- var panel = _this.panel.current;
2720
- var animationTiming = _this.props.animationTiming;
2721
- if (!animationTiming) {
2722
- _this.setState({ isAnimating: false });
2723
- return;
2724
- }
2725
- var rect = panel === null || panel === void 0 ? void 0 : panel.getBoundingClientRect();
2726
- if (!rect) {
2727
- return;
2728
- }
2729
- if (!_this.styleTag) {
2730
- _this.styleTag = injectStyleTag();
2731
- }
2732
- setStyle(_this.styleTag, "\n @keyframes expandOpenAnimation {\n 0% { opacity: 0; height: 0; }\n 100% { opacity: 1; height: " + rect.height + "px; }\n }\n\n .cauldron-expand-open {\n will-change: opacity, height;\n overflow: hidden;\n animation: expandOpenAnimation ease-in-out " + animationTiming + "ms forwards;\n }\n ");
2733
- _this.setState({ animationClass: 'cauldron-expand-open' }, function () {
2734
- setTimeout(function () {
2735
- _this.setState({ animationClass: '', isAnimating: false });
2736
- setStyle(_this.styleTag, '');
2737
- }, animationTiming);
2738
- });
2739
- };
2740
- _this.animateClose = function () {
2741
- var panel = _this.panel.current;
2742
- var animationTiming = _this.props.animationTiming;
2743
- if (!animationTiming) {
2744
- _this.setState({ isAnimating: false });
2745
- return;
2746
- }
2747
- if (!_this.styleTag) {
2748
- _this.styleTag = injectStyleTag();
2749
- }
2750
- var rect = panel === null || panel === void 0 ? void 0 : panel.getBoundingClientRect();
2751
- if (!rect)
2752
- return;
2753
- setStyle(_this.styleTag, "\n @keyframes collapseCloseAnimation {\n 0% { opacity: 1; height: " + rect.height + "px; }\n 100% { opacity: 0; height: 0; }\n }\n\n .cauldron-collapse-close {\n will-change: opacity, height;\n overflow: hidden;\n animation: collapseCloseAnimation ease-in-out " + animationTiming + "ms forwards;\n }\n ");
2754
- _this.setState({ animationClass: 'cauldron-collapse-close' }, function () {
2755
- setTimeout(function () {
2756
- _this.setState({ animationClass: '', isAnimating: false });
2757
- setStyle(_this.styleTag, '');
2758
- }, animationTiming);
2759
- });
2760
- };
2761
- return _this;
2762
- }
2763
- ExpandCollapsePanel.prototype.componentWillUnmount = function () {
2764
- var styleTag = this.styleTag;
2765
- if (styleTag) {
2766
- removeStyleTag(styleTag);
2767
- }
2768
- };
2769
- ExpandCollapsePanel.prototype.componentDidUpdate = function (prevProps, prevState) {
2770
- var _a = this.state, openState = _a.isOpen, controlled = _a.controlled;
2771
- var openProp = this.props.open;
2772
- if (controlled && openState !== openProp) {
2773
- this.setState({ isOpen: !!openProp, isAnimating: true });
2774
- }
2775
- if (typeof openProp !== typeof prevProps.open) {
2776
- this.setState({ controlled: typeof openProp !== 'undefined' });
2777
- }
2778
- if (prevState.isOpen !== openState && openState) {
2779
- this.animateOpen();
2780
- }
2781
- else if (prevState.isOpen !== openState && !openState) {
2782
- this.animateClose();
2783
- }
2784
- };
2785
- ExpandCollapsePanel.prototype.render = function () {
2786
- /* eslint-disable no-unused-vars */
2787
- var _a = this.props, children = _a.children, animationTiming = _a.animationTiming, className = _a.className, onToggle = _a.onToggle, open = _a.open, other = tslib.__rest(_a, ["children", "animationTiming", "className", "onToggle", "open"]);
2788
- /* eslint-enable no-unused-vars */
2789
- var _b = this.state, isOpen = _b.isOpen, isAnimating = _b.isAnimating, animationClass = _b.animationClass;
2790
- var trigger = React__default.Children.toArray(children).find(function (child) { return child.type === PanelTrigger$1; });
2791
- var panelElements = React__default.Children.toArray(children).filter(function (child) {
2792
- return typeof child === 'string' ||
2793
- child.type !== PanelTrigger$1;
2794
- });
2795
- return (React__default.createElement(React__default.Fragment, null,
2796
- trigger &&
2797
- React__default.cloneElement(trigger, {
2798
- open: isOpen,
2799
- onClick: this.handleToggle
2800
- }),
2801
- React__default.createElement("div", tslib.__assign({}, other, { className: classNames('ExpandCollapse__panel', animationClass, className, {
2802
- 'is--hidden': !isOpen && !isAnimating
2803
- }), ref: this.panel }), panelElements)));
2804
- };
2805
- ExpandCollapsePanel.defaultProps = {
2806
- animationTiming: 250,
2807
- onToggle: function () { }
2808
- };
2809
- ExpandCollapsePanel.propTypes = {
2810
- open: PropTypes.bool,
2811
- children: PropTypes.node.isRequired,
2812
- className: PropTypes.string,
2813
- animationTiming: PropTypes.oneOfType([PropTypes.number, PropTypes.bool]),
2814
- onToggle: PropTypes.func
2815
- };
2816
- return ExpandCollapsePanel;
2817
- }(React__default.Component));
2818
-
2819
2900
  function _objectWithoutPropertiesLoose(source, excluded) {
2820
2901
  if (source == null) return {};
2821
2902
  var target = {};
@@ -2918,27 +2999,6 @@ function _defineProperty(obj, key, value) {
2918
2999
 
2919
3000
  var defineProperty = _defineProperty;
2920
3001
 
2921
- function _objectSpread(target) {
2922
- for (var i = 1; i < arguments.length; i++) {
2923
- var source = arguments[i] != null ? Object(arguments[i]) : {};
2924
- var ownKeys = Object.keys(source);
2925
-
2926
- if (typeof Object.getOwnPropertySymbols === 'function') {
2927
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
2928
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
2929
- }));
2930
- }
2931
-
2932
- ownKeys.forEach(function (key) {
2933
- defineProperty(target, key, source[key]);
2934
- });
2935
- }
2936
-
2937
- return target;
2938
- }
2939
-
2940
- var objectSpread = _objectSpread;
2941
-
2942
3002
  function createCommonjsModule(fn, basedir, module) {
2943
3003
  return module = {
2944
3004
  path: basedir,
@@ -2975,6 +3035,9 @@ function _extends() {
2975
3035
  module.exports = _extends;
2976
3036
  });
2977
3037
 
3038
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3039
+
3040
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2978
3041
  //
2979
3042
  // Super simple, non-algorithmic solution since the
2980
3043
  // number of class names will not be greater than 4
@@ -3020,7 +3083,7 @@ function createStyleObject(classNames) {
3020
3083
  });
3021
3084
  var classNamesCombinations = getClassNameCombinations(nonTokenClassNames);
3022
3085
  return classNamesCombinations.reduce(function (styleObject, className) {
3023
- return objectSpread({}, styleObject, stylesheet[className]);
3086
+ return _objectSpread(_objectSpread({}, styleObject), stylesheet[className]);
3024
3087
  }, elementStyle);
3025
3088
  }
3026
3089
  function createClassNameString(classNames) {
@@ -3059,7 +3122,7 @@ function createElement(_ref) {
3059
3122
  var props;
3060
3123
 
3061
3124
  if (!useInlineStyles) {
3062
- props = objectSpread({}, properties, {
3125
+ props = _objectSpread(_objectSpread({}, properties), {}, {
3063
3126
  className: createClassNameString(properties.className)
3064
3127
  });
3065
3128
  } else {
@@ -3074,14 +3137,14 @@ function createElement(_ref) {
3074
3137
  var className = properties.className && startingClassName.concat(properties.className.filter(function (className) {
3075
3138
  return !allStylesheetSelectors.includes(className);
3076
3139
  }));
3077
- props = objectSpread({}, properties, {
3140
+ props = _objectSpread(_objectSpread({}, properties), {}, {
3078
3141
  className: createClassNameString(className) || undefined,
3079
3142
  style: createStyleObject(properties.className, Object.assign({}, properties.style, style), stylesheet)
3080
3143
  });
3081
3144
  }
3082
3145
 
3083
3146
  var children = childrenCreator(node.children);
3084
- return React__default.createElement(TagName, _extends_1({
3147
+ return /*#__PURE__*/React__default.createElement(TagName, _extends_1({
3085
3148
  key: key
3086
3149
  }, props), children);
3087
3150
  }
@@ -3092,6 +3155,11 @@ var checkForListedLanguage = (function (astGenerator, language) {
3092
3155
  return langs.indexOf(language) !== -1;
3093
3156
  });
3094
3157
 
3158
+ var _excluded = ["language", "children", "style", "customStyle", "codeTagProps", "useInlineStyles", "showLineNumbers", "showInlineLineNumbers", "startingLineNumber", "lineNumberContainerStyle", "lineNumberStyle", "wrapLines", "wrapLongLines", "lineProps", "renderer", "PreTag", "CodeTag", "code", "astGenerator"];
3159
+
3160
+ function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3161
+
3162
+ function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
3095
3163
  var newLineRegex = /\n/g;
3096
3164
 
3097
3165
  function getNewLines(str) {
@@ -3104,7 +3172,7 @@ function getAllLineNumbers(_ref) {
3104
3172
  style = _ref.style;
3105
3173
  return lines.map(function (_, i) {
3106
3174
  var number = i + startingLineNumber;
3107
- return React__default.createElement("span", {
3175
+ return /*#__PURE__*/React__default.createElement("span", {
3108
3176
  key: "line-".concat(i),
3109
3177
  className: "react-syntax-highlighter-line-number",
3110
3178
  style: typeof style === 'function' ? style(number) : style
@@ -3117,13 +3185,13 @@ function AllLineNumbers(_ref2) {
3117
3185
  codeStyle = _ref2.codeStyle,
3118
3186
  _ref2$containerStyle = _ref2.containerStyle,
3119
3187
  containerStyle = _ref2$containerStyle === void 0 ? {
3120
- float: 'left',
3188
+ "float": 'left',
3121
3189
  paddingRight: '10px'
3122
3190
  } : _ref2$containerStyle,
3123
3191
  _ref2$numberStyle = _ref2.numberStyle,
3124
3192
  numberStyle = _ref2$numberStyle === void 0 ? {} : _ref2$numberStyle,
3125
3193
  startingLineNumber = _ref2.startingLineNumber;
3126
- return React__default.createElement("code", {
3194
+ return /*#__PURE__*/React__default.createElement("code", {
3127
3195
  style: Object.assign({}, codeStyle, containerStyle)
3128
3196
  }, getAllLineNumbers({
3129
3197
  lines: codeString.replace(/\n$/, '').split('\n'),
@@ -3164,7 +3232,7 @@ function assembleLineNumberStyles(lineNumberStyle, lineNumber, largestLineNumber
3164
3232
 
3165
3233
  var customLineNumberStyle = typeof lineNumberStyle === 'function' ? lineNumberStyle(lineNumber) : lineNumberStyle; // combine
3166
3234
 
3167
- var assembledStyle = objectSpread({}, defaultLineNumberStyle, customLineNumberStyle);
3235
+ var assembledStyle = _objectSpread$1(_objectSpread$1({}, defaultLineNumberStyle), customLineNumberStyle);
3168
3236
 
3169
3237
  return assembledStyle;
3170
3238
  }
@@ -3190,7 +3258,7 @@ function createLineElement(_ref3) {
3190
3258
  }
3191
3259
 
3192
3260
  if (wrapLongLines & showLineNumbers) {
3193
- properties.style = objectSpread({}, properties.style, {
3261
+ properties.style = _objectSpread$1(_objectSpread$1({}, properties.style), {}, {
3194
3262
  display: 'flex'
3195
3263
  });
3196
3264
  }
@@ -3217,7 +3285,9 @@ function flattenCodeTree(tree) {
3217
3285
  }));
3218
3286
  } else if (node.children) {
3219
3287
  var classNames = className.concat(node.properties.className);
3220
- newTree = newTree.concat(flattenCodeTree(node.children, classNames));
3288
+ flattenCodeTree(node.children, classNames).forEach(function (i) {
3289
+ return newTree.push(i);
3290
+ });
3221
3291
  }
3222
3292
  }
3223
3293
 
@@ -3286,19 +3356,19 @@ function processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlin
3286
3356
  newTree.push(_line); // if it's the last line
3287
3357
  } else if (i === splitValue.length - 1) {
3288
3358
  var stringChild = tree[index + 1] && tree[index + 1].children && tree[index + 1].children[0];
3359
+ var lastLineInPreviousSpan = {
3360
+ type: 'text',
3361
+ value: "".concat(text)
3362
+ };
3289
3363
 
3290
3364
  if (stringChild) {
3291
- var lastLineInPreviousSpan = {
3292
- type: 'text',
3293
- value: "".concat(text)
3294
- };
3295
3365
  var newElem = createLineElement({
3296
3366
  children: [lastLineInPreviousSpan],
3297
3367
  className: node.properties.className
3298
3368
  });
3299
3369
  tree.splice(index + 1, 0, newElem);
3300
3370
  } else {
3301
- var _children2 = [newChild];
3371
+ var _children2 = [lastLineInPreviousSpan];
3302
3372
 
3303
3373
  var _line2 = createLine(_children2, lineNumber, node.properties.className);
3304
3374
 
@@ -3404,7 +3474,7 @@ function highlight (defaultAstGenerator, defaultStyle) {
3404
3474
  _ref7$codeTagProps = _ref7.codeTagProps,
3405
3475
  codeTagProps = _ref7$codeTagProps === void 0 ? {
3406
3476
  className: language ? "language-".concat(language) : undefined,
3407
- style: objectSpread({}, style['code[class*="language-"]'], style["code[class*=\"language-".concat(language, "\"]")])
3477
+ style: _objectSpread$1(_objectSpread$1({}, style['code[class*="language-"]']), style["code[class*=\"language-".concat(language, "\"]")])
3408
3478
  } : _ref7$codeTagProps,
3409
3479
  _ref7$useInlineStyles = _ref7.useInlineStyles,
3410
3480
  useInlineStyles = _ref7$useInlineStyles === void 0 ? true : _ref7$useInlineStyles,
@@ -3428,12 +3498,12 @@ function highlight (defaultAstGenerator, defaultStyle) {
3428
3498
  _ref7$CodeTag = _ref7.CodeTag,
3429
3499
  CodeTag = _ref7$CodeTag === void 0 ? 'code' : _ref7$CodeTag,
3430
3500
  _ref7$code = _ref7.code,
3431
- code = _ref7$code === void 0 ? Array.isArray(children) ? children[0] : children : _ref7$code,
3501
+ code = _ref7$code === void 0 ? (Array.isArray(children) ? children[0] : children) || '' : _ref7$code,
3432
3502
  astGenerator = _ref7.astGenerator,
3433
- rest = objectWithoutProperties(_ref7, ["language", "children", "style", "customStyle", "codeTagProps", "useInlineStyles", "showLineNumbers", "showInlineLineNumbers", "startingLineNumber", "lineNumberContainerStyle", "lineNumberStyle", "wrapLines", "wrapLongLines", "lineProps", "renderer", "PreTag", "CodeTag", "code", "astGenerator"]);
3503
+ rest = objectWithoutProperties(_ref7, _excluded);
3434
3504
 
3435
3505
  astGenerator = astGenerator || defaultAstGenerator;
3436
- var allLineNumbers = showLineNumbers ? React__default.createElement(AllLineNumbers, {
3506
+ var allLineNumbers = showLineNumbers ? /*#__PURE__*/React__default.createElement(AllLineNumbers, {
3437
3507
  containerStyle: lineNumberContainerStyle,
3438
3508
  codeStyle: codeTagProps.style || {},
3439
3509
  numberStyle: lineNumberStyle,
@@ -3451,8 +3521,18 @@ function highlight (defaultAstGenerator, defaultStyle) {
3451
3521
  style: Object.assign({}, customStyle)
3452
3522
  });
3453
3523
 
3524
+ if (wrapLongLines) {
3525
+ codeTagProps.style = _objectSpread$1(_objectSpread$1({}, codeTagProps.style), {}, {
3526
+ whiteSpace: 'pre-wrap'
3527
+ });
3528
+ } else {
3529
+ codeTagProps.style = _objectSpread$1(_objectSpread$1({}, codeTagProps.style), {}, {
3530
+ whiteSpace: 'pre'
3531
+ });
3532
+ }
3533
+
3454
3534
  if (!astGenerator) {
3455
- return React__default.createElement(PreTag, preProps, allLineNumbers, React__default.createElement(CodeTag, codeTagProps, code));
3535
+ return /*#__PURE__*/React__default.createElement(PreTag, preProps, allLineNumbers, /*#__PURE__*/React__default.createElement(CodeTag, codeTagProps, code));
3456
3536
  }
3457
3537
  /*
3458
3538
  * Some custom renderers rely on individual row elements so we need to turn wrapLines on
@@ -3480,18 +3560,7 @@ function highlight (defaultAstGenerator, defaultStyle) {
3480
3560
 
3481
3561
  var largestLineNumber = codeTree.value.length + startingLineNumber;
3482
3562
  var rows = processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlineLineNumbers, startingLineNumber, largestLineNumber, lineNumberStyle, wrapLongLines);
3483
-
3484
- if (wrapLongLines) {
3485
- codeTagProps.style = objectSpread({}, codeTagProps.style, {
3486
- whiteSpace: 'pre-wrap'
3487
- });
3488
- } else {
3489
- codeTagProps.style = objectSpread({}, codeTagProps.style, {
3490
- whiteSpace: 'pre'
3491
- });
3492
- }
3493
-
3494
- return React__default.createElement(PreTag, preProps, React__default.createElement(CodeTag, codeTagProps, !showInlineLineNumbers && allLineNumbers, renderer({
3563
+ return /*#__PURE__*/React__default.createElement(PreTag, preProps, /*#__PURE__*/React__default.createElement(CodeTag, codeTagProps, !showInlineLineNumbers && allLineNumbers, renderer({
3495
3564
  rows: rows,
3496
3565
  stylesheet: style,
3497
3566
  useInlineStyles: useInlineStyles
@@ -8056,15 +8125,19 @@ SyntaxHighlighter.registerLanguage('javascript', javascript_1);
8056
8125
  SyntaxHighlighter.registerLanguage('css', css_1);
8057
8126
  SyntaxHighlighter.registerLanguage('html', xml_1);
8058
8127
  SyntaxHighlighter.registerLanguage('yaml', yaml_1);
8128
+ // HACK: This is a workaround for a bug in react-syntax-highlighter's types.
8129
+ var Highlighter = SyntaxHighlighter;
8059
8130
  var Code = function (_a) {
8060
8131
  var children = _a.children, className = _a.className, tabIndex = _a.tabIndex, props = tslib.__rest(_a, ["children", "className", "tabIndex"]);
8061
- return (React__default.createElement(SyntaxHighlighter, tslib.__assign({}, props, { useInlineStyles: false, className: classNames('Code', className), tabIndex: tabIndex }), children));
8132
+ return (React__default.createElement(React__default.Fragment, null,
8133
+ React__default.createElement(Highlighter, tslib.__assign({}, props, { useInlineStyles: false, className: classNames('Code', className), tabIndex: tabIndex }), children)));
8062
8134
  };
8063
8135
  Code.displayName = 'Code';
8064
8136
  Code.propTypes = {
8065
8137
  children: PropTypes.string.isRequired,
8066
8138
  language: PropTypes.oneOf(['javascript', 'css', 'html', 'yaml']),
8067
- className: PropTypes.string
8139
+ className: PropTypes.string,
8140
+ tabIndex: PropTypes.number
8068
8141
  };
8069
8142
 
8070
8143
  function AxeLoader() {
@@ -8143,6 +8216,7 @@ LoaderOverlay.propTypes = {
8143
8216
  variant: PropTypes.oneOf(['large', 'small']),
8144
8217
  label: PropTypes.string,
8145
8218
  focusOnInitialRender: PropTypes.bool,
8219
+ // @ts-expect-error
8146
8220
  children: PropTypes.node
8147
8221
  };
8148
8222
  LoaderOverlay.displayName = 'LoaderOverlay';
@@ -8262,6 +8336,7 @@ Tab.displayName = 'Tab';
8262
8336
  Tab.propTypes = {
8263
8337
  target: PropTypes.any.isRequired,
8264
8338
  id: PropTypes.string,
8339
+ // @ts-expect-error
8265
8340
  children: PropTypes.node
8266
8341
  };
8267
8342
 
@@ -8356,7 +8431,8 @@ var Tabs = function (_a) {
8356
8431
  React.useEffect(function () {
8357
8432
  var _a, _b;
8358
8433
  index === activeIndex
8359
- ? (_a = target.current) === null || _a === void 0 ? void 0 : _a.classList.remove('TabPanel--hidden') : (_b = target.current) === null || _b === void 0 ? void 0 : _b.classList.add('TabPanel--hidden');
8434
+ ? (_a = target.current) === null || _a === void 0 ? void 0 : _a.classList.remove('TabPanel--hidden')
8435
+ : (_b = target.current) === null || _b === void 0 ? void 0 : _b.classList.add('TabPanel--hidden');
8360
8436
  }, [activeIndex]);
8361
8437
  var config = tslib.__assign((_a = { id: id, className: classNames('Tab', {
8362
8438
  'Tab--active': selected
@@ -8396,6 +8472,7 @@ var TabPanel = React.forwardRef(function (_a, ref) {
8396
8472
  TabPanel.displayName = 'TabPanel';
8397
8473
  TabPanel.propTypes = {
8398
8474
  id: PropTypes.string,
8475
+ // @ts-expect-error
8399
8476
  children: PropTypes.node,
8400
8477
  className: PropTypes.string
8401
8478
  };
@@ -8442,12 +8519,12 @@ var Step = function (props) {
8442
8519
  var liProps;
8443
8520
  var isTooltip = isTooltipProps(other);
8444
8521
  if (isTooltip) {
8445
- (_a = other, (tooltip = _a.tooltip, tooltipText = _a.tooltipText, _a), liProps = tslib.__rest(_a, ["tooltip", "tooltipText"]));
8522
+ (_a = other, (tooltip = _a.tooltip, tooltipText = _a.tooltipText), liProps = tslib.__rest(_a, ["tooltip", "tooltipText"]));
8446
8523
  }
8447
8524
  else {
8448
8525
  liProps = other;
8449
8526
  }
8450
- return (React__default.createElement("li", tslib.__assign({ className: classNames('Stepper__step', "Stepper__step--" + status, className), "aria-current": status === 'current' ? 'step' : 'false' }, liProps),
8527
+ return (React__default.createElement("li", tslib.__assign({ className: classNames('Stepper__step', "Stepper__step--".concat(status), className), "aria-current": status === 'current' ? 'step' : 'false' }, liProps),
8451
8528
  React__default.createElement("div", { className: "Stepper__step-line" }),
8452
8529
  React__default.createElement("div", { className: "Stepper__step-content" }, isTooltip ? (React__default.createElement(TooltipTabstop, { placement: "bottom", tooltip: tooltip,
8453
8530
  // the pseudo content (ex: "1") is conveyed
@@ -8489,7 +8566,7 @@ var Panel = React.forwardRef(function (_a, ref) {
8489
8566
  if (!headingId) {
8490
8567
  return null;
8491
8568
  }
8492
- var HeadingComponent = "h" + (heading &&
8569
+ var HeadingComponent = "h".concat(heading &&
8493
8570
  typeof heading === 'object' &&
8494
8571
  'level' in heading &&
8495
8572
  !!heading.level
@@ -8507,7 +8584,9 @@ var Panel = React.forwardRef(function (_a, ref) {
8507
8584
  });
8508
8585
  Panel.displayName = 'Panel';
8509
8586
  Panel.propTypes = {
8587
+ // @ts-expect-error
8510
8588
  children: PropTypes.node.isRequired,
8589
+ // @ts-expect-error
8511
8590
  heading: PropTypes.oneOfType([PropTypes.object, PropTypes.node]),
8512
8591
  className: PropTypes.string
8513
8592
  };
@@ -8517,7 +8596,7 @@ var IssuePanel = function (_a) {
8517
8596
  return (React__default.createElement("div", { className: classNames('IssuePanel', className) },
8518
8597
  React__default.createElement("div", { className: "IssuePanel__Header" },
8519
8598
  title && React__default.createElement("div", { className: "IssuePanel__Header-title" }, title),
8520
- actions && React__default.createElement("div", { className: "IssuePanel__Header-actions" }, actions)),
8599
+ actions && (React__default.createElement("div", { className: "IssuePanel__Header-actions" }, actions))),
8521
8600
  React__default.createElement("div", { className: "IssuePanel__Content" }, children)));
8522
8601
  };
8523
8602
  IssuePanel.displayName = 'IssuePanel';
@@ -8530,7 +8609,7 @@ var ProgressBar = React.forwardRef(function (_a, ref) {
8530
8609
  var _b = _a.progress, progress = _b === void 0 ? 0 : _b, _c = _a.progressMax, progressMax = _c === void 0 ? 100 : _c, _d = _a.progressMin, progressMin = _d === void 0 ? 0 : _d, props = tslib.__rest(_a, ["progress", "progressMax", "progressMin"]);
8531
8610
  var className = props.className, otherProps = tslib.__rest(props, ["className"]);
8532
8611
  return (React__default.createElement("div", tslib.__assign({ className: classNames('ProgressBar', className), role: "progressbar", "aria-valuemin": progressMin, "aria-valuemax": progressMax, "aria-valuenow": progress, ref: ref }, otherProps),
8533
- React__default.createElement("div", { className: "ProgressBar--fill", style: { width: Math.min((progress / progressMax) * 100, 100) + "%" } })));
8612
+ React__default.createElement("div", { className: "ProgressBar--fill", style: { width: "".concat(Math.min((progress / progressMax) * 100, 100), "%") } })));
8534
8613
  });
8535
8614
  ProgressBar.displayName = 'ProgressBar';
8536
8615
 
@@ -8645,6 +8724,7 @@ var FieldWrap = React__default.forwardRef(function (_a, ref) {
8645
8724
  });
8646
8725
  FieldWrap.displayName = 'FieldWrap';
8647
8726
  FieldWrap.propTypes = {
8727
+ // @ts-expect-error
8648
8728
  children: PropTypes.node.isRequired,
8649
8729
  className: PropTypes.string,
8650
8730
  as: PropTypes.string
@@ -8665,7 +8745,7 @@ var Breadcrumb = React.forwardRef(function (_a, ref) {
8665
8745
  }
8666
8746
  });
8667
8747
  return (React__default.createElement("nav", tslib.__assign({ className: classNames('Breadcrumb', className), ref: ref }, props),
8668
- React__default.createElement("ol", null, childrenWithSeparators.map(function (child, index) { return (React__default.createElement("li", { className: "Breadcrumb__Item", key: "breadcrumb-" + index }, child)); }))));
8748
+ React__default.createElement("ol", null, childrenWithSeparators.map(function (child, index) { return (React__default.createElement("li", { className: "Breadcrumb__Item", key: "breadcrumb-".concat(index) }, child)); }))));
8669
8749
  });
8670
8750
  Breadcrumb.displayName = 'Breadcrumb';
8671
8751
 
@@ -8678,6 +8758,7 @@ var BreadcrumbLink = React.forwardRef(function (_a, ref) {
8678
8758
  var className = _a.className, _b = _a.as, ElementType = _b === void 0 ? 'a' : _b, children = _a.children, props = tslib.__rest(_a, ["className", "as", "children"]);
8679
8759
  return (React__default.createElement(ElementType, tslib.__assign({ className: classNames('Link', 'Breadcrumb__Link', className), ref: ref }, props), children));
8680
8760
  });
8761
+ BreadcrumbLink.displayName = 'BreadcrumbLink';
8681
8762
 
8682
8763
  var ColumnLeft = React.forwardRef(function (_a, ref) {
8683
8764
  var className = _a.className, children = _a.children, props = tslib.__rest(_a, ["className", "children"]);
@@ -8696,6 +8777,11 @@ var TwoColumnPanel = React.forwardRef(function (_a, ref) {
8696
8777
  var _f = tslib.__read(React.useState(initialCollapsed), 2), isCollapsed = _f[0], setCollapsed = _f[1];
8697
8778
  var _g = tslib.__read(React.useState(false), 2), isFocusTrap = _g[0], setIsFocusTrap = _g[1];
8698
8779
  var _h = tslib.__read(React.useState(!initialCollapsed), 2), showPanel = _h[0], setShowPanel = _h[1];
8780
+ var toggleButtonRef = React.useRef(null);
8781
+ var closeButtonRef = React.useRef(null);
8782
+ var columnLeftRef = React.useRef(null);
8783
+ var columnRightRef = React.useRef(null);
8784
+ var columnLeft = React__default.Children.toArray(children).find(function (child) { return child.type === ColumnLeft; });
8699
8785
  var togglePanel = function () {
8700
8786
  if (isCollapsed) {
8701
8787
  setShowPanel(true);
@@ -8713,11 +8799,6 @@ var TwoColumnPanel = React.forwardRef(function (_a, ref) {
8713
8799
  }
8714
8800
  });
8715
8801
  };
8716
- var toggleButtonRef = React.useRef(null);
8717
- var closeButtonRef = React.useRef(null);
8718
- var columnLeftRef = React.useRef(null);
8719
- var columnRightRef = React.useRef(null);
8720
- var columnLeft = React__default.Children.toArray(children).find(function (child) { return child.type === ColumnLeft; });
8721
8802
  // The ColumnLeftComponent will end up being a focus trap when < 720px
8722
8803
  // This component also gets unmounted when not visible meaning that any
8723
8804
  // aria relationships cannot be set to items inside the component since
@@ -8732,11 +8813,11 @@ var TwoColumnPanel = React.forwardRef(function (_a, ref) {
8732
8813
  React__default.createElement("button", { type: "button", onClick: togglePanel, ref: closeButtonRef, "aria-label": hideCollapsedPanelLabel },
8733
8814
  React__default.createElement(Icon, { type: "close" })),
8734
8815
  React__default.createElement(Tooltip, { target: closeButtonRef, association: "aria-labelledby", hideElementOnHidden: true }, hideCollapsedPanelLabel)));
8735
- var children_1 = tslib.__spread([
8816
+ var children_1 = tslib.__spreadArray([
8736
8817
  CloseButton
8737
- ], React__default.Children.toArray(columnLeft.props.children));
8818
+ ], tslib.__read(React__default.Children.toArray(columnLeft.props.children)), false);
8738
8819
  ColumnLeftComponent = React.cloneElement(columnLeft, { id: id, ref: ref_1, tabIndex: -1 }, children_1.map(function (child, index) {
8739
- return React.cloneElement(child, { key: "left-" + index });
8820
+ return React.cloneElement(child, { key: "left-".concat(index) });
8740
8821
  }));
8741
8822
  }
8742
8823
  var columnRight = React__default.Children.toArray(children).find(function (child) { return child.type === ColumnRight; });
@@ -8747,11 +8828,11 @@ var TwoColumnPanel = React.forwardRef(function (_a, ref) {
8747
8828
  React__default.createElement("button", { type: "button", onClick: togglePanel, ref: toggleButtonRef, "aria-label": !isCollapsed ? hideCollapsedPanelLabel : showCollapsedPanelLabel, "aria-expanded": !isCollapsed, "aria-controls": columnLeftId },
8748
8829
  React__default.createElement(Icon, { type: !isCollapsed ? 'chevron-double-left' : 'chevron-double-right' })),
8749
8830
  React__default.createElement(Tooltip, { target: toggleButtonRef, association: "aria-labelledby", hideElementOnHidden: true }, !isCollapsed ? hideCollapsedPanelLabel : showCollapsedPanelLabel)));
8750
- var children_2 = tslib.__spread([
8831
+ var children_2 = tslib.__spreadArray([
8751
8832
  ToggleButton
8752
- ], React__default.Children.toArray(columnRight.props.children));
8833
+ ], tslib.__read(React__default.Children.toArray(columnRight.props.children)), false);
8753
8834
  ColumnRightComponent = React.cloneElement(columnRight, { ref: ref_2, tabIndex: -1 }, children_2.map(function (child, index) {
8754
- return React.cloneElement(child, { key: "right-" + index });
8835
+ return React.cloneElement(child, { key: "right-".concat(index) });
8755
8836
  }));
8756
8837
  }
8757
8838
  React.useLayoutEffect(function () {
@@ -8816,15 +8897,16 @@ var TwoColumnPanel = React.forwardRef(function (_a, ref) {
8816
8897
  'TwoColumnPanel--show': !isCollapsed,
8817
8898
  'TwoColumnPanel--hide': isCollapsed
8818
8899
  }) }, props, { ref: ref }),
8819
- React__default.createElement(FocusTrap, { active: !isCollapsed && isFocusTrap, focusTrapOptions: {
8820
- escapeDeactivates: true,
8821
- allowOutsideClick: true,
8822
- fallbackFocus: columnLeftRef.current
8823
- }, containerElements: [columnLeftRef.current] }),
8824
- React__default.createElement(ClickOutsideListener, { onClickOutside: handleClickOutside, target: columnLeftRef.current }),
8825
- isCollapsed ? null : skipLink,
8826
- showPanel ? ColumnLeftComponent : null,
8827
- ColumnRightComponent));
8900
+ React__default.createElement(React__default.Fragment, null,
8901
+ React__default.createElement(FocusTrap, { active: !isCollapsed && isFocusTrap, focusTrapOptions: {
8902
+ escapeDeactivates: true,
8903
+ allowOutsideClick: true,
8904
+ fallbackFocus: columnLeftRef.current
8905
+ }, containerElements: [columnLeftRef.current] }),
8906
+ React__default.createElement(ClickOutsideListener, { onClickOutside: handleClickOutside, target: columnLeftRef.current }),
8907
+ isCollapsed ? null : skipLink,
8908
+ showPanel ? ColumnLeftComponent : null,
8909
+ ColumnRightComponent)));
8828
8910
  });
8829
8911
  TwoColumnPanel.displayName = 'TwoColumnPanel';
8830
8912
 
@@ -8905,6 +8987,9 @@ ThemeProvider.propTypes = {
8905
8987
  initialTheme: PropTypes.string
8906
8988
  };
8907
8989
 
8990
+ exports.Accordion = Accordion;
8991
+ exports.AccordionContent = AccordionContent;
8992
+ exports.AccordionTrigger = AccordionTrigger;
8908
8993
  exports.Address = Address;
8909
8994
  exports.AddressCityStateZip = AddressCityStateZip;
8910
8995
  exports.AddressLine = AddressLine;