@deque/cauldron-react 4.5.0-canary.7f6a304a → 4.5.0-canary.7fd7d095

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');
@@ -151,6 +151,7 @@ var iconTypes = [
151
151
  'exchange',
152
152
  'external-link',
153
153
  'eye',
154
+ 'filter-solid',
154
155
  'filter',
155
156
  'flag',
156
157
  'gears',
@@ -170,10 +171,12 @@ var iconTypes = [
170
171
  'new',
171
172
  'no',
172
173
  'pencil',
174
+ 'play',
173
175
  'plus',
174
176
  'question-circle',
175
177
  'radio-checked',
176
178
  'radio-unchecked',
179
+ 'recycle-square',
177
180
  'recycle',
178
181
  'resend',
179
182
  'robot',
@@ -218,6 +221,7 @@ function __variableDynamicImportRuntime0__(path) {
218
221
  case './icons/exchange.svg': return Promise.resolve().then(function () { return require('./exchange.js'); });
219
222
  case './icons/external-link.svg': return Promise.resolve().then(function () { return require('./external-link.js'); });
220
223
  case './icons/eye.svg': return Promise.resolve().then(function () { return require('./eye.js'); });
224
+ case './icons/filter-solid.svg': return Promise.resolve().then(function () { return require('./filter-solid.js'); });
221
225
  case './icons/filter.svg': return Promise.resolve().then(function () { return require('./filter.js'); });
222
226
  case './icons/flag.svg': return Promise.resolve().then(function () { return require('./flag.js'); });
223
227
  case './icons/gears.svg': return Promise.resolve().then(function () { return require('./gears.js'); });
@@ -237,10 +241,12 @@ function __variableDynamicImportRuntime0__(path) {
237
241
  case './icons/new.svg': return Promise.resolve().then(function () { return require('./new.js'); });
238
242
  case './icons/no.svg': return Promise.resolve().then(function () { return require('./no.js'); });
239
243
  case './icons/pencil.svg': return Promise.resolve().then(function () { return require('./pencil.js'); });
244
+ case './icons/play.svg': return Promise.resolve().then(function () { return require('./play.js'); });
240
245
  case './icons/plus.svg': return Promise.resolve().then(function () { return require('./plus.js'); });
241
246
  case './icons/question-circle.svg': return Promise.resolve().then(function () { return require('./question-circle.js'); });
242
247
  case './icons/radio-checked.svg': return Promise.resolve().then(function () { return require('./radio-checked.js'); });
243
248
  case './icons/radio-unchecked.svg': return Promise.resolve().then(function () { return require('./radio-unchecked.js'); });
249
+ case './icons/recycle-square.svg': return Promise.resolve().then(function () { return require('./recycle-square.js'); });
244
250
  case './icons/recycle.svg': return Promise.resolve().then(function () { return require('./recycle.js'); });
245
251
  case './icons/resend.svg': return Promise.resolve().then(function () { return require('./resend.js'); });
246
252
  case './icons/robot.svg': return Promise.resolve().then(function () { return require('./robot.js'); });
@@ -279,19 +285,19 @@ var Icon = React.forwardRef(function (_a, ref) {
279
285
  if (process.env.NODE_ENV === 'test') {
280
286
  return;
281
287
  }
282
- __variableDynamicImportRuntime0__("./icons/" + name + ".svg")
288
+ __variableDynamicImportRuntime0__("./icons/".concat(name, ".svg"))
283
289
  .then(function (icon) {
284
290
  isMounted.current && setIcon(function () { return icon["default"]; });
285
291
  })["catch"](function () {
286
- console.error("Could not find icon type \"" + type + "\".");
292
+ console.error("Could not find icon type \"".concat(type, "\"."));
287
293
  isMounted.current && setIcon(null);
288
294
  });
289
295
  return function () {
290
296
  isMounted.current = false;
291
297
  };
292
298
  }, [type]);
293
- var data = tslib.__assign(tslib.__assign({}, other), { 'aria-hidden': !label, className: classNames('Icon', "Icon--" + type, className, (_b = {},
294
- _b["Icon__" + direction] = !!direction,
299
+ var data = tslib.__assign(tslib.__assign({}, other), { 'aria-hidden': !label, className: classNames('Icon', "Icon--".concat(type), className, (_b = {},
300
+ _b["Icon__".concat(direction)] = !!direction,
295
301
  _b)) });
296
302
  return (React__default.createElement("div", tslib.__assign({ ref: ref }, data),
297
303
  label && React__default.createElement(Offscreen, null, label),
@@ -305,6 +311,207 @@ Icon.propTypes = {
305
311
  };
306
312
  Icon.displayName = 'Icon';
307
313
 
314
+ var PanelTrigger = function (_a) {
315
+ 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"]);
316
+ var Header = typeof heading === 'object' && 'level' in heading && !!heading.level
317
+ ? "h".concat(heading.level)
318
+ : React__default.Fragment;
319
+ return (React__default.createElement(Header, null,
320
+ React__default.createElement("button", tslib.__assign({ className: classNames(className, 'ExpandCollapse__trigger', {
321
+ fullWidth: fullWidth
322
+ }), type: "button", "aria-expanded": open, onClick: onClick }, otherProps),
323
+ React__default.createElement("div", { className: "ExpandCollapse__trigger-title" }, typeof children === 'function'
324
+ ? children({ open: !!open })
325
+ : children),
326
+ React__default.createElement(Icon, { type: open ? iconExpanded : iconCollapsed }))));
327
+ };
328
+ PanelTrigger.propTypes = {
329
+ children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
330
+ open: PropTypes.bool,
331
+ iconExpanded: PropTypes.string,
332
+ iconCollapsed: PropTypes.string,
333
+ heading: PropTypes.number
334
+ };
335
+ PanelTrigger.displayName = 'PanelTrigger';
336
+ var PanelTrigger$1 = React__default.memo(PanelTrigger);
337
+
338
+ var injectStyleTag = function () {
339
+ var style = document.createElement('style');
340
+ document.head.appendChild(style);
341
+ return style;
342
+ };
343
+ var setStyle = function (tag, cssString) {
344
+ tag.textContent = cssString;
345
+ };
346
+ var removeStyleTag = function (tag) {
347
+ document.head.removeChild(tag);
348
+ };
349
+
350
+ var ExpandCollapsePanel = /** @class */ (function (_super) {
351
+ tslib.__extends(ExpandCollapsePanel, _super);
352
+ function ExpandCollapsePanel() {
353
+ var _this = _super !== null && _super.apply(this, arguments) || this;
354
+ _this.state = {
355
+ controlled: typeof _this.props.open !== 'undefined',
356
+ isOpen: typeof _this.props.open !== 'undefined' ? _this.props.open : false
357
+ };
358
+ _this.panel = React__default.createRef();
359
+ _this.handleToggle = function (e) {
360
+ var onToggle = _this.props.onToggle;
361
+ var _a = _this.state, isOpen = _a.isOpen, controlled = _a.controlled;
362
+ onToggle(e);
363
+ if (!controlled) {
364
+ _this.setState({ isOpen: !isOpen, isAnimating: true });
365
+ }
366
+ };
367
+ _this.animateOpen = function () {
368
+ var panel = _this.panel.current;
369
+ var animationTiming = _this.props.animationTiming;
370
+ if (!animationTiming) {
371
+ _this.setState({ isAnimating: false });
372
+ return;
373
+ }
374
+ var rect = panel === null || panel === void 0 ? void 0 : panel.getBoundingClientRect();
375
+ if (!rect) {
376
+ return;
377
+ }
378
+ if (!_this.styleTag) {
379
+ _this.styleTag = injectStyleTag();
380
+ }
381
+ 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 "));
382
+ _this.setState({ animationClass: 'cauldron-expand-open' }, function () {
383
+ setTimeout(function () {
384
+ _this.setState({ animationClass: '', isAnimating: false });
385
+ setStyle(_this.styleTag, '');
386
+ }, animationTiming);
387
+ });
388
+ };
389
+ _this.animateClose = function () {
390
+ var panel = _this.panel.current;
391
+ var animationTiming = _this.props.animationTiming;
392
+ if (!animationTiming) {
393
+ _this.setState({ isAnimating: false });
394
+ return;
395
+ }
396
+ if (!_this.styleTag) {
397
+ _this.styleTag = injectStyleTag();
398
+ }
399
+ var rect = panel === null || panel === void 0 ? void 0 : panel.getBoundingClientRect();
400
+ if (!rect)
401
+ return;
402
+ 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 "));
403
+ _this.setState({ animationClass: 'cauldron-collapse-close' }, function () {
404
+ setTimeout(function () {
405
+ _this.setState({ animationClass: '', isAnimating: false });
406
+ setStyle(_this.styleTag, '');
407
+ }, animationTiming);
408
+ });
409
+ };
410
+ return _this;
411
+ }
412
+ ExpandCollapsePanel.prototype.componentWillUnmount = function () {
413
+ var styleTag = this.styleTag;
414
+ if (styleTag) {
415
+ removeStyleTag(styleTag);
416
+ }
417
+ };
418
+ ExpandCollapsePanel.prototype.componentDidUpdate = function (prevProps, prevState) {
419
+ var _a = this.state, openState = _a.isOpen, controlled = _a.controlled;
420
+ var openProp = this.props.open;
421
+ if (controlled && openState !== openProp) {
422
+ this.setState({ isOpen: !!openProp, isAnimating: true });
423
+ }
424
+ if (typeof openProp !== typeof prevProps.open) {
425
+ this.setState({ controlled: typeof openProp !== 'undefined' });
426
+ }
427
+ if (prevState.isOpen !== openState && openState) {
428
+ this.animateOpen();
429
+ }
430
+ else if (prevState.isOpen !== openState && !openState) {
431
+ this.animateClose();
432
+ }
433
+ };
434
+ ExpandCollapsePanel.prototype.render = function () {
435
+ 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"]);
436
+ var _b = this.state, isOpen = _b.isOpen, isAnimating = _b.isAnimating, animationClass = _b.animationClass;
437
+ var trigger = React__default.Children.toArray(children).find(function (child) { return child.type === PanelTrigger$1; });
438
+ var panelElements = React__default.Children.toArray(children).filter(function (child) {
439
+ return typeof child === 'string' ||
440
+ child.type !== PanelTrigger$1;
441
+ });
442
+ return (React__default.createElement(React__default.Fragment, null,
443
+ trigger &&
444
+ React__default.cloneElement(trigger, {
445
+ open: isOpen,
446
+ onClick: this.handleToggle
447
+ }),
448
+ React__default.createElement("div", tslib.__assign({ className: classNames(className, 'ExpandCollapse__panel', animationClass, {
449
+ 'is--hidden': !isOpen && !isAnimating
450
+ }), ref: this.panel }, otherProps), panelElements)));
451
+ };
452
+ ExpandCollapsePanel.defaultProps = {
453
+ animationTiming: 250,
454
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
455
+ onToggle: function () { }
456
+ };
457
+ ExpandCollapsePanel.propTypes = {
458
+ open: PropTypes.bool,
459
+ children: PropTypes.node.isRequired,
460
+ className: PropTypes.string,
461
+ animationTiming: PropTypes.oneOfType([PropTypes.number, PropTypes.bool]),
462
+ onToggle: PropTypes.func
463
+ };
464
+ return ExpandCollapsePanel;
465
+ }(React__default.Component));
466
+
467
+ var AccordionTrigger = function (_a) {
468
+ var children = _a.children, triggerProps = tslib.__rest(_a, ["children"]);
469
+ return React__default.createElement(React__default.Fragment, null, children);
470
+ };
471
+ var AccordionContent = function (_a) {
472
+ var children = _a.children, className = _a.className, otherProps = tslib.__rest(_a, ["children", "className"]);
473
+ return (React__default.createElement("div", tslib.__assign({ className: classNames('Accordion__panel', className) }, otherProps), children));
474
+ };
475
+ var Accordion = function (_a) {
476
+ var children = _a.children;
477
+ var childrenArray = React__default.Children.toArray(children);
478
+ var trigger = childrenArray.find(function (child) { return child.type === AccordionTrigger; });
479
+ var panelElement = childrenArray.find(function (child) {
480
+ return typeof child === 'string' ||
481
+ child.type === AccordionContent;
482
+ });
483
+ var isValid = !!(React__default.isValidElement(trigger) && React__default.isValidElement(panelElement));
484
+ if (!isValid) {
485
+ console.warn('Must provide <AccordionTrigger /> and <AccordionContent /> element(s). You provided:', {
486
+ trigger: trigger,
487
+ panelElement: panelElement,
488
+ isValid: isValid
489
+ });
490
+ return null;
491
+ }
492
+ var _b = trigger.props, triggerClassName = _b.className, triggerProps = tslib.__rest(_b, ["className"]);
493
+ var elementId = nextId.useId();
494
+ return (React__default.createElement("div", { className: "Accordion" },
495
+ React__default.createElement(ExpandCollapsePanel, tslib.__assign({ id: panelElement.props.id || "".concat(elementId, "-panel") }, panelElement.props),
496
+ 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),
497
+ panelElement)));
498
+ };
499
+ Accordion.displayName = 'Accordion';
500
+ AccordionContent.displayName = 'AccordionContent';
501
+ AccordionTrigger.displayName = 'AccordionTrigger';
502
+ Accordion.propTypes = {
503
+ children: PropTypes.node,
504
+ className: PropTypes.string
505
+ };
506
+ AccordionTrigger.propTypes = {
507
+ children: PropTypes.node,
508
+ heading: PropTypes.oneOf(['h1', 'h2', 'h3', 'h4', 'h5', 'h6', undefined])
509
+ };
510
+ AccordionContent.propTypes = {
511
+ children: PropTypes.node.isRequired,
512
+ className: PropTypes.string
513
+ };
514
+
308
515
  var Scrim = /** @class */ (function (_super) {
309
516
  tslib.__extends(Scrim, _super);
310
517
  function Scrim(props) {
@@ -364,7 +571,7 @@ var Scrim = /** @class */ (function (_super) {
364
571
  if (destroy) {
365
572
  return null;
366
573
  }
367
- return (React__default.createElement("div", { ref: function (el) { return (_this.el = el); }, className: "Scrim " + animationClass }));
574
+ return (React__default.createElement("div", { ref: function (el) { return (_this.el = el); }, className: "Scrim ".concat(animationClass) }));
368
575
  };
369
576
  Scrim.propTypes = {
370
577
  show: PropTypes.bool.isRequired
@@ -498,9 +705,9 @@ var TopBar = /** @class */ (function (_super) {
498
705
  args[_i] = arguments[_i];
499
706
  }
500
707
  // @ts-ignore we're just spreading the original args
501
- _this.onKeyDown.apply(_this, tslib.__spread(args));
708
+ _this.onKeyDown.apply(_this, tslib.__spreadArray([], tslib.__read(args), false));
502
709
  if (child.props.onKeyDown) {
503
- (_a = child.props).onKeyDown.apply(_a, tslib.__spread(args));
710
+ (_a = child.props).onKeyDown.apply(_a, tslib.__spreadArray([], tslib.__read(args), false));
504
711
  }
505
712
  },
506
713
  tabIndex: 0,
@@ -536,7 +743,7 @@ var TopBar = /** @class */ (function (_super) {
536
743
  };
537
744
  TopBar.prototype.onKeyDown = function (e) {
538
745
  var key = keyname(e.which);
539
- var menuItems = tslib.__spread(this.menuItems);
746
+ var menuItems = tslib.__spreadArray([], tslib.__read(this.menuItems), false);
540
747
  // account for hidden side bar trigger (hamburger)
541
748
  if (this.state.wide && this.props.hasTrigger) {
542
749
  menuItems.shift();
@@ -592,6 +799,7 @@ var TopBarTrigger = function (_a) {
592
799
  };
593
800
  TopBarTrigger.displayName = 'TopBarTrigger';
594
801
  TopBarTrigger.propTypes = {
802
+ // @ts-expect-error
595
803
  children: PropTypes.node.isRequired,
596
804
  className: PropTypes.string
597
805
  };
@@ -787,7 +995,7 @@ var OptionsMenuList = /** @class */ (function (_super) {
787
995
  /* eslint-enable @typescript-eslint/no-unused-vars */
788
996
  var items = React__default.Children.toArray(children).map(function (child, i) {
789
997
  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));
998
+ 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
999
  });
792
1000
  // Key event is being handled in componentDidMount
793
1001
  /* eslint-disable jsx-a11y/click-events-have-key-events */
@@ -1167,7 +1375,8 @@ var SideBar = /** @class */ (function (_super) {
1167
1375
  setTimeout(function () {
1168
1376
  var _a, _b;
1169
1377
  _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));
1378
+ var firstFocusable = show &&
1379
+ ((_b = (_a = _this.navList) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.querySelector(focusableSelector));
1171
1380
  if (firstFocusable) {
1172
1381
  firstFocusable.focus();
1173
1382
  }
@@ -1216,6 +1425,7 @@ SideBarItem.defaultProps = {
1216
1425
  autoClickLink: true
1217
1426
  };
1218
1427
  SideBarItem.propTypes = {
1428
+ // @ts-expect-error
1219
1429
  children: PropTypes.node.isRequired,
1220
1430
  autoClickLink: PropTypes.bool
1221
1431
  };
@@ -1305,7 +1515,7 @@ var Dialog = /** @class */ (function (_super) {
1305
1515
  var close = !forceAction ? (React__default.createElement("button", { className: "Dialog__close", type: "button", onClick: this.close },
1306
1516
  React__default.createElement(Icon, { type: "close", "aria-hidden": "true" }),
1307
1517
  React__default.createElement(Offscreen, null, closeButtonText))) : null;
1308
- var Heading = "h" + (typeof heading === 'object' && 'level' in heading && !!heading.level
1518
+ var Heading = "h".concat(typeof heading === 'object' && 'level' in heading && !!heading.level
1309
1519
  ? heading.level
1310
1520
  : 2);
1311
1521
  var Dialog = (React__default.createElement(FocusTrap, { focusTrapOptions: {
@@ -1464,7 +1674,7 @@ var SkipLink = /** @class */ (function (_super) {
1464
1674
  target: function (props, propName, componentName) {
1465
1675
  var value = props[propName];
1466
1676
  if (!value || typeof value !== 'string' || value[0] !== '#') {
1467
- return new Error("Invalid prop " + propName + " supplied to " + componentName + " (must be string starting with \"#\")");
1677
+ return new Error("Invalid prop ".concat(propName, " supplied to ").concat(componentName, " (must be string starting with \"#\")"));
1468
1678
  }
1469
1679
  },
1470
1680
  skipText: PropTypes.string,
@@ -1480,6 +1690,8 @@ var Button = React.forwardRef(function (_a, ref) {
1480
1690
  'Button--secondary': variant === 'secondary',
1481
1691
  'Button--error': variant === 'error',
1482
1692
  Link: variant === 'link',
1693
+ Tag: variant === 'tag',
1694
+ 'Button--tag': variant === 'tag',
1483
1695
  'Button--thin': thin
1484
1696
  }), ref: ref || buttonRef }, other), children));
1485
1697
  });
@@ -1609,8 +1821,8 @@ function Tooltip(_a) {
1609
1821
  targetElement === null || targetElement === void 0 ? void 0 : targetElement.setAttribute(association, [id, attrText].filter(Boolean).join(' '));
1610
1822
  }
1611
1823
  }, [targetElement, id]);
1612
- return (showTooltip || hideElementOnHidden) && isBrowser()
1613
- ? reactDom.createPortal(React__default.createElement("div", tslib.__assign({ id: id, className: classNames('Tooltip', "Tooltip--" + placement, className, {
1824
+ return (React__default.createElement(React__default.Fragment, null, (showTooltip || hideElementOnHidden) && isBrowser()
1825
+ ? reactDom.createPortal(React__default.createElement("div", tslib.__assign({ id: id, className: classNames('Tooltip', "Tooltip--".concat(placement), className, {
1614
1826
  TooltipInfo: variant === 'info',
1615
1827
  'Tooltip--hidden': !showTooltip && hideElementOnHidden,
1616
1828
  'Tooltip--big': variant === 'big'
@@ -1618,7 +1830,7 @@ function Tooltip(_a) {
1618
1830
  variant !== 'big' && (React__default.createElement("div", { className: "TooltipArrow", ref: setArrowElement, style: styles.arrow })),
1619
1831
  children), (portal && 'current' in portal ? portal.current : portal) ||
1620
1832
  document.body)
1621
- : null;
1833
+ : null));
1622
1834
  }
1623
1835
  Tooltip.displayName = 'Tooltip';
1624
1836
  Tooltip.propTypes = {
@@ -1681,6 +1893,7 @@ IconButton.propTypes = {
1681
1893
  as: PropTypes.elementType,
1682
1894
  // @ts-expect-error
1683
1895
  icon: PropTypes.string.isRequired,
1896
+ // @ts-expect-error
1684
1897
  label: PropTypes.node.isRequired,
1685
1898
  // @ts-expect-error
1686
1899
  tooltipPlacement: PropTypes.string,
@@ -1695,7 +1908,7 @@ IconButton.displayName = 'IconButton';
1695
1908
  var i = 0;
1696
1909
  var randomId = function () {
1697
1910
  var num = Math.floor(Math.random() * 10000) + 1;
1698
- return "x_" + i++ + "_" + num;
1911
+ return "x_".concat(i++, "_").concat(num);
1699
1912
  };
1700
1913
 
1701
1914
  /*
@@ -1790,16 +2003,15 @@ var Pointout = /** @class */ (function (_super) {
1790
2003
  visibleFocusable[elementIndex].classList.remove('Pointout--focus-active');
1791
2004
  };
1792
2005
  _this.positionRelativeToTarget = function () {
1793
- var _a, _b;
1794
- var _c = _this.props, target = _c.target, portal = _c.portal, arrowPosition = _c.arrowPosition, position = _c.position;
2006
+ var _a = _this.props, target = _a.target, portal = _a.portal, arrowPosition = _a.arrowPosition, position = _a.position;
1795
2007
  if (!target) {
1796
2008
  return;
1797
2009
  }
1798
- var targetNode = ((_a = target) === null || _a === void 0 ? void 0 : _a.current) ||
2010
+ var targetNode = (target === null || target === void 0 ? void 0 : target.current) ||
1799
2011
  target;
1800
- var portalNode = ((_b = portal) === null || _b === void 0 ? void 0 : _b.current) ||
2012
+ var portalNode = (portal === null || portal === void 0 ? void 0 : portal.current) ||
1801
2013
  portal;
1802
- var _d = targetNode.getBoundingClientRect(), top = _d.top, left = _d.left, width = _d.width, height = _d.height;
2014
+ var _b = targetNode.getBoundingClientRect(), top = _b.top, left = _b.left, width = _b.width, height = _b.height;
1803
2015
  if (portalNode && portalNode !== document.body) {
1804
2016
  // If the portal is not placed on document.body
1805
2017
  // position the FTPO relative to the portal
@@ -1807,48 +2019,48 @@ var Pointout = /** @class */ (function (_super) {
1807
2019
  top -= rect.top - portalNode.scrollTop;
1808
2020
  left -= rect.left - portalNode.scrollLeft;
1809
2021
  }
1810
- var _e = tslib.__read(arrowPosition.split('-'), 1), arrowBoxSide = _e[0];
2022
+ var _c = tslib.__read(arrowPosition.split('-'), 1), arrowBoxSide = _c[0];
1811
2023
  var style;
1812
2024
  switch (arrowBoxSide) {
1813
2025
  case 'right':
1814
2026
  style = {
1815
- left: left + "px",
1816
- top: (position === 'center'
2027
+ left: "".concat(left, "px"),
2028
+ top: "".concat(position === 'center'
1817
2029
  ? top + height / 2
1818
2030
  : position === 'start'
1819
2031
  ? top
1820
- : top + height) + "px"
2032
+ : top + height, "px")
1821
2033
  };
1822
2034
  break;
1823
2035
  case 'bottom':
1824
2036
  style = {
1825
- top: top + "px",
1826
- left: (position === 'center'
2037
+ top: "".concat(top, "px"),
2038
+ left: "".concat(position === 'center'
1827
2039
  ? left + width / 2
1828
2040
  : position === 'start'
1829
2041
  ? left
1830
- : left + width) + "px"
2042
+ : left + width, "px")
1831
2043
  };
1832
2044
  break;
1833
2045
  case 'left':
1834
2046
  style = {
1835
- left: left + width + "px",
1836
- top: (position === 'center'
2047
+ left: "".concat(left + width, "px"),
2048
+ top: "".concat(position === 'center'
1837
2049
  ? top + height / 2
1838
2050
  : position === 'start'
1839
2051
  ? top
1840
- : top + height) + "px"
2052
+ : top + height, "px")
1841
2053
  };
1842
2054
  break;
1843
2055
  case 'top':
1844
2056
  default:
1845
2057
  style = {
1846
- top: top + height + "px",
1847
- left: (position === 'center'
2058
+ top: "".concat(top + height, "px"),
2059
+ left: "".concat(position === 'center'
1848
2060
  ? left + width / 2
1849
2061
  : position === 'start'
1850
2062
  ? left
1851
- : left + width) + "px"
2063
+ : left + width, "px")
1852
2064
  };
1853
2065
  break;
1854
2066
  }
@@ -1860,7 +2072,7 @@ var Pointout = /** @class */ (function (_super) {
1860
2072
  }
1861
2073
  Pointout.prototype.getFocusableElements = function (root) {
1862
2074
  return root
1863
- ? Array.from(root.querySelectorAll(focusable + ", [data-focusable]"))
2075
+ ? Array.from(root.querySelectorAll("".concat(focusable, ", [data-focusable]")))
1864
2076
  : [];
1865
2077
  };
1866
2078
  Pointout.prototype.componentDidMount = function () {
@@ -1930,11 +2142,11 @@ var Pointout = /** @class */ (function (_super) {
1930
2142
  'Pointout--no-arrow': noArrow,
1931
2143
  'Pointout--auto': !!target
1932
2144
  },
1933
- _a["Pointout__arrow--" + arrowPosition] = !!arrowPosition && !noArrow,
1934
- _a["Pointout--" + position] = !!target,
2145
+ _a["Pointout__arrow--".concat(arrowPosition)] = !!arrowPosition && !noArrow,
2146
+ _a["Pointout--".concat(position)] = !!target,
1935
2147
  _a)), style: style, role: target ? undefined : 'region', "aria-labelledby": heading ? headingId : undefined, "aria-hidden": !!target && !disableOffscreenPointout, ref: function (el) { return (_this.visibleRef = el); } },
1936
2148
  noArrow ? null : (React__default.createElement("div", { className: classNames('Pointout__arrow', (_b = {},
1937
- _b["Pointout__arrow--" + arrowPosition] = !!arrowPosition && !noArrow,
2149
+ _b["Pointout__arrow--".concat(arrowPosition)] = !!arrowPosition && !noArrow,
1938
2150
  _b)) },
1939
2151
  React__default.createElement("div", { className: "Pointout__arrow-pointer" }))),
1940
2152
  React__default.createElement("div", { className: "Pointout__box" },
@@ -2115,7 +2327,7 @@ var Toast = /** @class */ (function (_super) {
2115
2327
  var scrim = type === 'action-needed' && show ? (React__default.createElement("div", { className: "Scrim--light Scrim--show Scrim--fade-in" })) : null;
2116
2328
  var defaultProps = {
2117
2329
  tabIndex: -1,
2118
- className: "Toast Toast--" + typeMap[type].className + " " + animationClass
2330
+ className: "Toast Toast--".concat(typeMap[type].className, " ").concat(animationClass)
2119
2331
  };
2120
2332
  if (!focus) {
2121
2333
  defaultProps.role = 'alert';
@@ -2301,9 +2513,10 @@ var Select = React__default.forwardRef(function (_a, ref) {
2301
2513
  'Field__select--disabled': disabled,
2302
2514
  'Field--has-error': !!error
2303
2515
  }) },
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
- })
2516
+ 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)
2517
+ ? options.map(function (option) {
2518
+ return (React__default.createElement("option", { className: "Field__option", key: option.key, value: option.value, disabled: option.disabled }, option.label || option.value));
2519
+ })
2307
2520
  : children),
2308
2521
  React__default.createElement("div", { className: "arrow-down" })),
2309
2522
  error && (React__default.createElement("div", { id: errorId, className: "Error" }, error))));
@@ -2352,7 +2565,7 @@ var RadioGroup = function (_a) {
2352
2565
  var _a;
2353
2566
  handleChange(radioValue);
2354
2567
  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)),
2568
+ }, disabled: disabled, checked: isChecked, "aria-describedby": labelDescription ? "".concat(id, "Desc") : undefined }, other)),
2356
2569
  React__default.createElement("label", { htmlFor: id, className: classNames('Field__label', {
2357
2570
  'Field__label--disabled': disabled
2358
2571
  }) }, label),
@@ -2360,7 +2573,7 @@ var RadioGroup = function (_a) {
2360
2573
  'Radio__overlay--focused': isFocused,
2361
2574
  'Radio__overlay--disabled': disabled
2362
2575
  }), 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', {
2576
+ labelDescription && (React__default.createElement("span", { id: "".concat(id, "Desc"), className: classNames('Field__labelDescription', {
2364
2577
  'Field__labelDescription--disabled': disabled
2365
2578
  }) }, labelDescription))));
2366
2579
  });
@@ -2380,7 +2593,7 @@ RadioGroup.propTypes = {
2380
2593
  })).isRequired,
2381
2594
  hasLabel: function (props, propName, componentName) {
2382
2595
  if (!props['aria-label'] && !props['aria-labelledby']) {
2383
- return new Error(componentName + " must have an \"aria-label\" or \"aria-labelledby\" prop");
2596
+ return new Error("".concat(componentName, " must have an \"aria-label\" or \"aria-labelledby\" prop"));
2384
2597
  }
2385
2598
  },
2386
2599
  className: PropTypes.string,
@@ -2389,6 +2602,125 @@ RadioGroup.propTypes = {
2389
2602
  };
2390
2603
  RadioGroup.displayName = 'RadioGroup';
2391
2604
 
2605
+ var Card = function (_a) {
2606
+ var className = _a.className, variant = _a.variant, other = tslib.__rest(_a, ["className", "variant"]);
2607
+ return (React__default.createElement("div", tslib.__assign({ className: classNames(className, {
2608
+ 'Card--simple': variant === 'simple',
2609
+ Card: !variant
2610
+ }) }, other)));
2611
+ };
2612
+ Card.displayName = 'Card';
2613
+ Card.propTypes = {
2614
+ className: PropTypes.string,
2615
+ variant: PropTypes.string
2616
+ };
2617
+
2618
+ var CardHeader = function (_a) {
2619
+ var className = _a.className, other = tslib.__rest(_a, ["className"]);
2620
+ return (React__default.createElement("div", tslib.__assign({ className: classNames('Card__header', className) }, other)));
2621
+ };
2622
+ CardHeader.displayName = 'CardHeader';
2623
+ CardHeader.propTypes = {
2624
+ className: PropTypes.string
2625
+ };
2626
+
2627
+ var CardContent = function (_a) {
2628
+ var className = _a.className, other = tslib.__rest(_a, ["className"]);
2629
+ return (React__default.createElement("div", tslib.__assign({ className: classNames('Card__content', className) }, other)));
2630
+ };
2631
+ CardContent.displayName = 'CardContent';
2632
+ CardContent.propTypes = {
2633
+ className: PropTypes.string
2634
+ };
2635
+
2636
+ var CardFooter = function (_a) {
2637
+ var className = _a.className, other = tslib.__rest(_a, ["className"]);
2638
+ return (React__default.createElement("div", tslib.__assign({ className: classNames('Card__footer', className) }, other)));
2639
+ };
2640
+ CardFooter.displayName = 'CardFooter';
2641
+ CardFooter.propTypes = {
2642
+ className: PropTypes.string
2643
+ };
2644
+
2645
+ var RadioCardGroup = function (_a) {
2646
+ var name = _a.name, radios = _a.radios, defaultValue = _a.defaultValue, value = _a.value,
2647
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
2648
+ _b = _a.onChange,
2649
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
2650
+ onChange = _b === void 0 ? function () { } : _b, className = _a.className, other = tslib.__rest(_a, ["name", "radios", "defaultValue", "value", "onChange", "className"]);
2651
+ var _c = tslib.__read(React.useState(value !== null && value !== void 0 ? value : defaultValue), 2), currentValue = _c[0], setCurrentValue = _c[1];
2652
+ var _d = tslib.__read(React.useState(null), 2), focusIndex = _d[0], setFocusIndex = _d[1];
2653
+ var inputs = React.useRef([]);
2654
+ var handleChange = function (value) { return setCurrentValue(value); };
2655
+ var onRadioFocus = function (index) { return setFocusIndex(index); };
2656
+ var onRadioBlur = function () { return setFocusIndex(null); };
2657
+ var onRadioClick = function (index) {
2658
+ var _a;
2659
+ var radio = (_a = inputs.current) === null || _a === void 0 ? void 0 : _a[index];
2660
+ if (!radio) {
2661
+ return;
2662
+ }
2663
+ radio.click();
2664
+ radio.focus();
2665
+ };
2666
+ React.useEffect(function () {
2667
+ if (typeof value === 'undefined') {
2668
+ return;
2669
+ }
2670
+ setCurrentValue(value);
2671
+ }, [value]);
2672
+ var radioButtons = radios.map(function (radio, index) {
2673
+ var label = radio.label, disabled = radio.disabled, radioValue = radio.value, cardImg = radio.cardImg, cardIcon = radio.cardIcon, id = radio.id, className = radio.className, other = tslib.__rest(radio, ["label", "disabled", "value", "cardImg", "cardIcon", "id", "className"]);
2674
+ var isChecked = currentValue === radioValue;
2675
+ var isFocused = focusIndex === index;
2676
+ return (React__default.createElement("div", { className: classNames('RadioCard'), key: index },
2677
+ React__default.createElement(Card, { variant: "simple", className: classNames('RadioCardGroup__Card RadioCard__overlay', {
2678
+ 'RadioCard__overlay--focused': isFocused,
2679
+ 'RadioCard__overlay--checked': isChecked,
2680
+ 'RadioCard__overlay--disabled': disabled
2681
+ }), onClick: function () { return onRadioClick(index); } },
2682
+ React__default.createElement("input", tslib.__assign({ type: "radio", name: name, value: radioValue, id: id, ref: function (input) {
2683
+ if (!input) {
2684
+ return;
2685
+ }
2686
+ inputs.current.push(input);
2687
+ }, onFocus: function () { return onRadioFocus(index); }, onBlur: function () { return onRadioBlur(); }, onChange: function () {
2688
+ var _a;
2689
+ handleChange(radioValue);
2690
+ onChange(radio, (_a = inputs.current) === null || _a === void 0 ? void 0 : _a[index]);
2691
+ }, disabled: disabled, checked: isChecked }, other)),
2692
+ React__default.createElement(CardContent, null,
2693
+ React__default.createElement("div", { className: classNames('RadioCardGroup__Checked') }, isChecked && (React__default.createElement(Icon, { className: classNames('RadioCardGroup__Icon'), type: cardIcon }))),
2694
+ React__default.createElement("div", { className: classNames('RadioCardGroup__Base') },
2695
+ React__default.createElement("div", { className: classNames('RadioCardGroup__Image') }, cardImg),
2696
+ React__default.createElement("label", { htmlFor: id, className: classNames('RadioCardGroup__Label') }, label))))));
2697
+ });
2698
+ // reset the input refs array
2699
+ // refs get clobbered every re-render anyway and this supports "dynamic" radios
2700
+ // (changing the number of radio buttons for example)
2701
+ inputs.current = [];
2702
+ return (React__default.createElement("div", tslib.__assign({ className: classNames('RadioCardGroup'), role: "radiogroup" }, other), radioButtons));
2703
+ };
2704
+ RadioCardGroup.propTypes = {
2705
+ name: PropTypes.string,
2706
+ radios: PropTypes.arrayOf(PropTypes.shape({
2707
+ value: PropTypes.string.isRequired,
2708
+ id: PropTypes.string.isRequired,
2709
+ label: PropTypes.string.isRequired,
2710
+ cardImg: PropTypes.element.isRequired,
2711
+ cardIcon: PropTypes.string.isRequired
2712
+ })).isRequired,
2713
+ hasLabel: function (props, propName, componentName) {
2714
+ if (!props['aria-label'] && !props['aria-labelledby']) {
2715
+ return new Error("".concat(componentName, " must have an \"aria-label\" or \"aria-labelledby\" prop"));
2716
+ }
2717
+ },
2718
+ className: PropTypes.string,
2719
+ defaultValue: PropTypes.string,
2720
+ onChange: PropTypes.func
2721
+ };
2722
+ RadioCardGroup.displayName = 'RadioCardGroup';
2723
+
2392
2724
  var Checkbox = React.forwardRef(function (_a, ref) {
2393
2725
  var id = _a.id, label = _a.label, labelDescription = _a.labelDescription, error = _a.error, checkboxRef = _a.checkboxRef, className = _a.className, onChange = _a.onChange, ariaDescribedby = _a["aria-describedby"], _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.checked, checked = _c === void 0 ? false : _c, other = tslib.__rest(_a, ["id", "label", "labelDescription", "error", "checkboxRef", "className", "onChange", 'aria-describedby', "disabled", "checked"]);
2394
2726
  var _d = tslib.__read(React.useState(checked), 2), isChecked = _d[0], setIsChecked = _d[1];
@@ -2458,46 +2790,6 @@ function TooltipTabstop(_a) {
2458
2790
  }
2459
2791
  TooltipTabstop.displayName = 'TooltipTabstop';
2460
2792
 
2461
- var Card = function (_a) {
2462
- var className = _a.className, variant = _a.variant, other = tslib.__rest(_a, ["className", "variant"]);
2463
- return (React__default.createElement("div", tslib.__assign({ className: classNames(className, {
2464
- 'Card--simple': variant === 'simple',
2465
- Card: !variant
2466
- }) }, other)));
2467
- };
2468
- Card.displayName = 'Card';
2469
- Card.propTypes = {
2470
- className: PropTypes.string,
2471
- variant: PropTypes.string
2472
- };
2473
-
2474
- var CardHeader = function (_a) {
2475
- var className = _a.className, other = tslib.__rest(_a, ["className"]);
2476
- return (React__default.createElement("div", tslib.__assign({ className: classNames('Card__header', className) }, other)));
2477
- };
2478
- CardHeader.displayName = 'CardHeader';
2479
- CardHeader.propTypes = {
2480
- className: PropTypes.string
2481
- };
2482
-
2483
- var CardContent = function (_a) {
2484
- var className = _a.className, other = tslib.__rest(_a, ["className"]);
2485
- return (React__default.createElement("div", tslib.__assign({ className: classNames('Card__content', className) }, other)));
2486
- };
2487
- CardContent.displayName = 'CardContent';
2488
- CardContent.propTypes = {
2489
- className: PropTypes.string
2490
- };
2491
-
2492
- var CardFooter = function (_a) {
2493
- var className = _a.className, other = tslib.__rest(_a, ["className"]);
2494
- return (React__default.createElement("div", tslib.__assign({ className: classNames('Card__footer', className) }, other)));
2495
- };
2496
- CardFooter.displayName = 'CardFooter';
2497
- CardFooter.propTypes = {
2498
- className: PropTypes.string
2499
- };
2500
-
2501
2793
  var TextField = /** @class */ (function (_super) {
2502
2794
  tslib.__extends(TextField, _super);
2503
2795
  function TextField(props) {
@@ -2591,152 +2883,6 @@ var TextField = /** @class */ (function (_super) {
2591
2883
  return TextField;
2592
2884
  }(React__default.Component));
2593
2885
 
2594
- function PanelTrigger(_a) {
2595
- 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"]);
2596
- return (React__default.createElement("button", tslib.__assign({}, other, { className: classNames('ExpandCollapse__trigger', fullWidth ? 'fullWidth' : '', className), type: "button", "aria-expanded": open, onClick: onClick }),
2597
- React__default.createElement("div", { className: "ExpandCollapse__trigger-title" }, typeof children === 'function' ? children({ open: !!open }) : children),
2598
- React__default.createElement(Icon, { type: open ? iconExpanded : iconCollapsed })));
2599
- }
2600
- PanelTrigger.propTypes = {
2601
- children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
2602
- open: PropTypes.bool,
2603
- onClick: PropTypes.func,
2604
- className: PropTypes.string,
2605
- iconExpanded: PropTypes.string,
2606
- iconCollapsed: PropTypes.string
2607
- };
2608
- var PanelTrigger$1 = React__default.memo(PanelTrigger);
2609
-
2610
- var injectStyleTag = function () {
2611
- var style = document.createElement('style');
2612
- document.head.appendChild(style);
2613
- return style;
2614
- };
2615
- var setStyle = function (tag, cssString) {
2616
- tag.textContent = cssString;
2617
- };
2618
- var removeStyleTag = function (tag) {
2619
- document.head.removeChild(tag);
2620
- };
2621
-
2622
- var ExpandCollapsePanel = /** @class */ (function (_super) {
2623
- tslib.__extends(ExpandCollapsePanel, _super);
2624
- function ExpandCollapsePanel() {
2625
- var _this = _super !== null && _super.apply(this, arguments) || this;
2626
- _this.state = {
2627
- controlled: typeof _this.props.open !== 'undefined',
2628
- isOpen: typeof _this.props.open !== 'undefined' ? _this.props.open : false
2629
- };
2630
- _this.panel = React__default.createRef();
2631
- _this.handleToggle = function (e) {
2632
- var onToggle = _this.props.onToggle;
2633
- var _a = _this.state, isOpen = _a.isOpen, controlled = _a.controlled;
2634
- onToggle(e);
2635
- if (!controlled) {
2636
- _this.setState({ isOpen: !isOpen, isAnimating: true });
2637
- }
2638
- };
2639
- _this.animateOpen = function () {
2640
- var panel = _this.panel.current;
2641
- var animationTiming = _this.props.animationTiming;
2642
- if (!animationTiming) {
2643
- _this.setState({ isAnimating: false });
2644
- return;
2645
- }
2646
- var rect = panel === null || panel === void 0 ? void 0 : panel.getBoundingClientRect();
2647
- if (!rect) {
2648
- return;
2649
- }
2650
- if (!_this.styleTag) {
2651
- _this.styleTag = injectStyleTag();
2652
- }
2653
- 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 ");
2654
- _this.setState({ animationClass: 'cauldron-expand-open' }, function () {
2655
- setTimeout(function () {
2656
- _this.setState({ animationClass: '', isAnimating: false });
2657
- setStyle(_this.styleTag, '');
2658
- }, animationTiming);
2659
- });
2660
- };
2661
- _this.animateClose = function () {
2662
- var panel = _this.panel.current;
2663
- var animationTiming = _this.props.animationTiming;
2664
- if (!animationTiming) {
2665
- _this.setState({ isAnimating: false });
2666
- return;
2667
- }
2668
- if (!_this.styleTag) {
2669
- _this.styleTag = injectStyleTag();
2670
- }
2671
- var rect = panel === null || panel === void 0 ? void 0 : panel.getBoundingClientRect();
2672
- if (!rect)
2673
- return;
2674
- 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 ");
2675
- _this.setState({ animationClass: 'cauldron-collapse-close' }, function () {
2676
- setTimeout(function () {
2677
- _this.setState({ animationClass: '', isAnimating: false });
2678
- setStyle(_this.styleTag, '');
2679
- }, animationTiming);
2680
- });
2681
- };
2682
- return _this;
2683
- }
2684
- ExpandCollapsePanel.prototype.componentWillUnmount = function () {
2685
- var styleTag = this.styleTag;
2686
- if (styleTag) {
2687
- removeStyleTag(styleTag);
2688
- }
2689
- };
2690
- ExpandCollapsePanel.prototype.componentDidUpdate = function (prevProps, prevState) {
2691
- var _a = this.state, openState = _a.isOpen, controlled = _a.controlled;
2692
- var openProp = this.props.open;
2693
- if (controlled && openState !== openProp) {
2694
- this.setState({ isOpen: !!openProp, isAnimating: true });
2695
- }
2696
- if (typeof openProp !== typeof prevProps.open) {
2697
- this.setState({ controlled: typeof openProp !== 'undefined' });
2698
- }
2699
- if (prevState.isOpen !== openState && openState) {
2700
- this.animateOpen();
2701
- }
2702
- else if (prevState.isOpen !== openState && !openState) {
2703
- this.animateClose();
2704
- }
2705
- };
2706
- ExpandCollapsePanel.prototype.render = function () {
2707
- /* eslint-disable no-unused-vars */
2708
- 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"]);
2709
- /* eslint-enable no-unused-vars */
2710
- var _b = this.state, isOpen = _b.isOpen, isAnimating = _b.isAnimating, animationClass = _b.animationClass;
2711
- var trigger = React__default.Children.toArray(children).find(function (child) { return child.type === PanelTrigger$1; });
2712
- var panelElements = React__default.Children.toArray(children).filter(function (child) {
2713
- return typeof child === 'string' ||
2714
- child.type !== PanelTrigger$1;
2715
- });
2716
- return (React__default.createElement(React__default.Fragment, null,
2717
- trigger &&
2718
- React__default.cloneElement(trigger, {
2719
- open: isOpen,
2720
- onClick: this.handleToggle
2721
- }),
2722
- React__default.createElement("div", tslib.__assign({}, other, { className: classNames('ExpandCollapse__panel', animationClass, className, {
2723
- 'is--hidden': !isOpen && !isAnimating
2724
- }), ref: this.panel }), panelElements)));
2725
- };
2726
- ExpandCollapsePanel.defaultProps = {
2727
- animationTiming: 250,
2728
- onToggle: function () { }
2729
- };
2730
- ExpandCollapsePanel.propTypes = {
2731
- open: PropTypes.bool,
2732
- children: PropTypes.node.isRequired,
2733
- className: PropTypes.string,
2734
- animationTiming: PropTypes.oneOfType([PropTypes.number, PropTypes.bool]),
2735
- onToggle: PropTypes.func
2736
- };
2737
- return ExpandCollapsePanel;
2738
- }(React__default.Component));
2739
-
2740
2886
  function _objectWithoutPropertiesLoose(source, excluded) {
2741
2887
  if (source == null) return {};
2742
2888
  var target = {};
@@ -2839,27 +2985,6 @@ function _defineProperty(obj, key, value) {
2839
2985
 
2840
2986
  var defineProperty = _defineProperty;
2841
2987
 
2842
- function _objectSpread(target) {
2843
- for (var i = 1; i < arguments.length; i++) {
2844
- var source = arguments[i] != null ? Object(arguments[i]) : {};
2845
- var ownKeys = Object.keys(source);
2846
-
2847
- if (typeof Object.getOwnPropertySymbols === 'function') {
2848
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
2849
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
2850
- }));
2851
- }
2852
-
2853
- ownKeys.forEach(function (key) {
2854
- defineProperty(target, key, source[key]);
2855
- });
2856
- }
2857
-
2858
- return target;
2859
- }
2860
-
2861
- var objectSpread = _objectSpread;
2862
-
2863
2988
  function createCommonjsModule(fn, basedir, module) {
2864
2989
  return module = {
2865
2990
  path: basedir,
@@ -2896,6 +3021,9 @@ function _extends() {
2896
3021
  module.exports = _extends;
2897
3022
  });
2898
3023
 
3024
+ 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; }
3025
+
3026
+ 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; }
2899
3027
  //
2900
3028
  // Super simple, non-algorithmic solution since the
2901
3029
  // number of class names will not be greater than 4
@@ -2941,7 +3069,7 @@ function createStyleObject(classNames) {
2941
3069
  });
2942
3070
  var classNamesCombinations = getClassNameCombinations(nonTokenClassNames);
2943
3071
  return classNamesCombinations.reduce(function (styleObject, className) {
2944
- return objectSpread({}, styleObject, stylesheet[className]);
3072
+ return _objectSpread(_objectSpread({}, styleObject), stylesheet[className]);
2945
3073
  }, elementStyle);
2946
3074
  }
2947
3075
  function createClassNameString(classNames) {
@@ -2980,7 +3108,7 @@ function createElement(_ref) {
2980
3108
  var props;
2981
3109
 
2982
3110
  if (!useInlineStyles) {
2983
- props = objectSpread({}, properties, {
3111
+ props = _objectSpread(_objectSpread({}, properties), {}, {
2984
3112
  className: createClassNameString(properties.className)
2985
3113
  });
2986
3114
  } else {
@@ -2995,14 +3123,14 @@ function createElement(_ref) {
2995
3123
  var className = properties.className && startingClassName.concat(properties.className.filter(function (className) {
2996
3124
  return !allStylesheetSelectors.includes(className);
2997
3125
  }));
2998
- props = objectSpread({}, properties, {
3126
+ props = _objectSpread(_objectSpread({}, properties), {}, {
2999
3127
  className: createClassNameString(className) || undefined,
3000
3128
  style: createStyleObject(properties.className, Object.assign({}, properties.style, style), stylesheet)
3001
3129
  });
3002
3130
  }
3003
3131
 
3004
3132
  var children = childrenCreator(node.children);
3005
- return React__default.createElement(TagName, _extends_1({
3133
+ return /*#__PURE__*/React__default.createElement(TagName, _extends_1({
3006
3134
  key: key
3007
3135
  }, props), children);
3008
3136
  }
@@ -3013,6 +3141,11 @@ var checkForListedLanguage = (function (astGenerator, language) {
3013
3141
  return langs.indexOf(language) !== -1;
3014
3142
  });
3015
3143
 
3144
+ var _excluded = ["language", "children", "style", "customStyle", "codeTagProps", "useInlineStyles", "showLineNumbers", "showInlineLineNumbers", "startingLineNumber", "lineNumberContainerStyle", "lineNumberStyle", "wrapLines", "wrapLongLines", "lineProps", "renderer", "PreTag", "CodeTag", "code", "astGenerator"];
3145
+
3146
+ 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; }
3147
+
3148
+ 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; }
3016
3149
  var newLineRegex = /\n/g;
3017
3150
 
3018
3151
  function getNewLines(str) {
@@ -3025,7 +3158,7 @@ function getAllLineNumbers(_ref) {
3025
3158
  style = _ref.style;
3026
3159
  return lines.map(function (_, i) {
3027
3160
  var number = i + startingLineNumber;
3028
- return React__default.createElement("span", {
3161
+ return /*#__PURE__*/React__default.createElement("span", {
3029
3162
  key: "line-".concat(i),
3030
3163
  className: "react-syntax-highlighter-line-number",
3031
3164
  style: typeof style === 'function' ? style(number) : style
@@ -3038,13 +3171,13 @@ function AllLineNumbers(_ref2) {
3038
3171
  codeStyle = _ref2.codeStyle,
3039
3172
  _ref2$containerStyle = _ref2.containerStyle,
3040
3173
  containerStyle = _ref2$containerStyle === void 0 ? {
3041
- float: 'left',
3174
+ "float": 'left',
3042
3175
  paddingRight: '10px'
3043
3176
  } : _ref2$containerStyle,
3044
3177
  _ref2$numberStyle = _ref2.numberStyle,
3045
3178
  numberStyle = _ref2$numberStyle === void 0 ? {} : _ref2$numberStyle,
3046
3179
  startingLineNumber = _ref2.startingLineNumber;
3047
- return React__default.createElement("code", {
3180
+ return /*#__PURE__*/React__default.createElement("code", {
3048
3181
  style: Object.assign({}, codeStyle, containerStyle)
3049
3182
  }, getAllLineNumbers({
3050
3183
  lines: codeString.replace(/\n$/, '').split('\n'),
@@ -3085,7 +3218,7 @@ function assembleLineNumberStyles(lineNumberStyle, lineNumber, largestLineNumber
3085
3218
 
3086
3219
  var customLineNumberStyle = typeof lineNumberStyle === 'function' ? lineNumberStyle(lineNumber) : lineNumberStyle; // combine
3087
3220
 
3088
- var assembledStyle = objectSpread({}, defaultLineNumberStyle, customLineNumberStyle);
3221
+ var assembledStyle = _objectSpread$1(_objectSpread$1({}, defaultLineNumberStyle), customLineNumberStyle);
3089
3222
 
3090
3223
  return assembledStyle;
3091
3224
  }
@@ -3111,7 +3244,7 @@ function createLineElement(_ref3) {
3111
3244
  }
3112
3245
 
3113
3246
  if (wrapLongLines & showLineNumbers) {
3114
- properties.style = objectSpread({}, properties.style, {
3247
+ properties.style = _objectSpread$1(_objectSpread$1({}, properties.style), {}, {
3115
3248
  display: 'flex'
3116
3249
  });
3117
3250
  }
@@ -3138,7 +3271,9 @@ function flattenCodeTree(tree) {
3138
3271
  }));
3139
3272
  } else if (node.children) {
3140
3273
  var classNames = className.concat(node.properties.className);
3141
- newTree = newTree.concat(flattenCodeTree(node.children, classNames));
3274
+ flattenCodeTree(node.children, classNames).forEach(function (i) {
3275
+ return newTree.push(i);
3276
+ });
3142
3277
  }
3143
3278
  }
3144
3279
 
@@ -3207,19 +3342,19 @@ function processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlin
3207
3342
  newTree.push(_line); // if it's the last line
3208
3343
  } else if (i === splitValue.length - 1) {
3209
3344
  var stringChild = tree[index + 1] && tree[index + 1].children && tree[index + 1].children[0];
3345
+ var lastLineInPreviousSpan = {
3346
+ type: 'text',
3347
+ value: "".concat(text)
3348
+ };
3210
3349
 
3211
3350
  if (stringChild) {
3212
- var lastLineInPreviousSpan = {
3213
- type: 'text',
3214
- value: "".concat(text)
3215
- };
3216
3351
  var newElem = createLineElement({
3217
3352
  children: [lastLineInPreviousSpan],
3218
3353
  className: node.properties.className
3219
3354
  });
3220
3355
  tree.splice(index + 1, 0, newElem);
3221
3356
  } else {
3222
- var _children2 = [newChild];
3357
+ var _children2 = [lastLineInPreviousSpan];
3223
3358
 
3224
3359
  var _line2 = createLine(_children2, lineNumber, node.properties.className);
3225
3360
 
@@ -3325,7 +3460,7 @@ function highlight (defaultAstGenerator, defaultStyle) {
3325
3460
  _ref7$codeTagProps = _ref7.codeTagProps,
3326
3461
  codeTagProps = _ref7$codeTagProps === void 0 ? {
3327
3462
  className: language ? "language-".concat(language) : undefined,
3328
- style: objectSpread({}, style['code[class*="language-"]'], style["code[class*=\"language-".concat(language, "\"]")])
3463
+ style: _objectSpread$1(_objectSpread$1({}, style['code[class*="language-"]']), style["code[class*=\"language-".concat(language, "\"]")])
3329
3464
  } : _ref7$codeTagProps,
3330
3465
  _ref7$useInlineStyles = _ref7.useInlineStyles,
3331
3466
  useInlineStyles = _ref7$useInlineStyles === void 0 ? true : _ref7$useInlineStyles,
@@ -3349,12 +3484,12 @@ function highlight (defaultAstGenerator, defaultStyle) {
3349
3484
  _ref7$CodeTag = _ref7.CodeTag,
3350
3485
  CodeTag = _ref7$CodeTag === void 0 ? 'code' : _ref7$CodeTag,
3351
3486
  _ref7$code = _ref7.code,
3352
- code = _ref7$code === void 0 ? Array.isArray(children) ? children[0] : children : _ref7$code,
3487
+ code = _ref7$code === void 0 ? (Array.isArray(children) ? children[0] : children) || '' : _ref7$code,
3353
3488
  astGenerator = _ref7.astGenerator,
3354
- rest = objectWithoutProperties(_ref7, ["language", "children", "style", "customStyle", "codeTagProps", "useInlineStyles", "showLineNumbers", "showInlineLineNumbers", "startingLineNumber", "lineNumberContainerStyle", "lineNumberStyle", "wrapLines", "wrapLongLines", "lineProps", "renderer", "PreTag", "CodeTag", "code", "astGenerator"]);
3489
+ rest = objectWithoutProperties(_ref7, _excluded);
3355
3490
 
3356
3491
  astGenerator = astGenerator || defaultAstGenerator;
3357
- var allLineNumbers = showLineNumbers ? React__default.createElement(AllLineNumbers, {
3492
+ var allLineNumbers = showLineNumbers ? /*#__PURE__*/React__default.createElement(AllLineNumbers, {
3358
3493
  containerStyle: lineNumberContainerStyle,
3359
3494
  codeStyle: codeTagProps.style || {},
3360
3495
  numberStyle: lineNumberStyle,
@@ -3372,8 +3507,18 @@ function highlight (defaultAstGenerator, defaultStyle) {
3372
3507
  style: Object.assign({}, customStyle)
3373
3508
  });
3374
3509
 
3510
+ if (wrapLongLines) {
3511
+ codeTagProps.style = _objectSpread$1(_objectSpread$1({}, codeTagProps.style), {}, {
3512
+ whiteSpace: 'pre-wrap'
3513
+ });
3514
+ } else {
3515
+ codeTagProps.style = _objectSpread$1(_objectSpread$1({}, codeTagProps.style), {}, {
3516
+ whiteSpace: 'pre'
3517
+ });
3518
+ }
3519
+
3375
3520
  if (!astGenerator) {
3376
- return React__default.createElement(PreTag, preProps, allLineNumbers, React__default.createElement(CodeTag, codeTagProps, code));
3521
+ return /*#__PURE__*/React__default.createElement(PreTag, preProps, allLineNumbers, /*#__PURE__*/React__default.createElement(CodeTag, codeTagProps, code));
3377
3522
  }
3378
3523
  /*
3379
3524
  * Some custom renderers rely on individual row elements so we need to turn wrapLines on
@@ -3401,18 +3546,7 @@ function highlight (defaultAstGenerator, defaultStyle) {
3401
3546
 
3402
3547
  var largestLineNumber = codeTree.value.length + startingLineNumber;
3403
3548
  var rows = processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlineLineNumbers, startingLineNumber, largestLineNumber, lineNumberStyle, wrapLongLines);
3404
-
3405
- if (wrapLongLines) {
3406
- codeTagProps.style = objectSpread({}, codeTagProps.style, {
3407
- whiteSpace: 'pre-wrap'
3408
- });
3409
- } else {
3410
- codeTagProps.style = objectSpread({}, codeTagProps.style, {
3411
- whiteSpace: 'pre'
3412
- });
3413
- }
3414
-
3415
- return React__default.createElement(PreTag, preProps, React__default.createElement(CodeTag, codeTagProps, !showInlineLineNumbers && allLineNumbers, renderer({
3549
+ return /*#__PURE__*/React__default.createElement(PreTag, preProps, /*#__PURE__*/React__default.createElement(CodeTag, codeTagProps, !showInlineLineNumbers && allLineNumbers, renderer({
3416
3550
  rows: rows,
3417
3551
  stylesheet: style,
3418
3552
  useInlineStyles: useInlineStyles
@@ -7977,15 +8111,19 @@ SyntaxHighlighter.registerLanguage('javascript', javascript_1);
7977
8111
  SyntaxHighlighter.registerLanguage('css', css_1);
7978
8112
  SyntaxHighlighter.registerLanguage('html', xml_1);
7979
8113
  SyntaxHighlighter.registerLanguage('yaml', yaml_1);
8114
+ // HACK: This is a workaround for a bug in react-syntax-highlighter's types.
8115
+ var Highlighter = SyntaxHighlighter;
7980
8116
  var Code = function (_a) {
7981
8117
  var children = _a.children, className = _a.className, tabIndex = _a.tabIndex, props = tslib.__rest(_a, ["children", "className", "tabIndex"]);
7982
- return (React__default.createElement(SyntaxHighlighter, tslib.__assign({}, props, { useInlineStyles: false, className: classNames('Code', className), tabIndex: tabIndex }), children));
8118
+ return (React__default.createElement(React__default.Fragment, null,
8119
+ React__default.createElement(Highlighter, tslib.__assign({}, props, { useInlineStyles: false, className: classNames('Code', className), tabIndex: tabIndex }), children)));
7983
8120
  };
7984
8121
  Code.displayName = 'Code';
7985
8122
  Code.propTypes = {
7986
8123
  children: PropTypes.string.isRequired,
7987
8124
  language: PropTypes.oneOf(['javascript', 'css', 'html', 'yaml']),
7988
- className: PropTypes.string
8125
+ className: PropTypes.string,
8126
+ tabIndex: PropTypes.number
7989
8127
  };
7990
8128
 
7991
8129
  function AxeLoader() {
@@ -8064,6 +8202,7 @@ LoaderOverlay.propTypes = {
8064
8202
  variant: PropTypes.oneOf(['large', 'small']),
8065
8203
  label: PropTypes.string,
8066
8204
  focusOnInitialRender: PropTypes.bool,
8205
+ // @ts-expect-error
8067
8206
  children: PropTypes.node
8068
8207
  };
8069
8208
  LoaderOverlay.displayName = 'LoaderOverlay';
@@ -8183,6 +8322,7 @@ Tab.displayName = 'Tab';
8183
8322
  Tab.propTypes = {
8184
8323
  target: PropTypes.any.isRequired,
8185
8324
  id: PropTypes.string,
8325
+ // @ts-expect-error
8186
8326
  children: PropTypes.node
8187
8327
  };
8188
8328
 
@@ -8277,7 +8417,8 @@ var Tabs = function (_a) {
8277
8417
  React.useEffect(function () {
8278
8418
  var _a, _b;
8279
8419
  index === activeIndex
8280
- ? (_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');
8420
+ ? (_a = target.current) === null || _a === void 0 ? void 0 : _a.classList.remove('TabPanel--hidden')
8421
+ : (_b = target.current) === null || _b === void 0 ? void 0 : _b.classList.add('TabPanel--hidden');
8281
8422
  }, [activeIndex]);
8282
8423
  var config = tslib.__assign((_a = { id: id, className: classNames('Tab', {
8283
8424
  'Tab--active': selected
@@ -8317,6 +8458,7 @@ var TabPanel = React.forwardRef(function (_a, ref) {
8317
8458
  TabPanel.displayName = 'TabPanel';
8318
8459
  TabPanel.propTypes = {
8319
8460
  id: PropTypes.string,
8461
+ // @ts-expect-error
8320
8462
  children: PropTypes.node,
8321
8463
  className: PropTypes.string
8322
8464
  };
@@ -8363,12 +8505,12 @@ var Step = function (props) {
8363
8505
  var liProps;
8364
8506
  var isTooltip = isTooltipProps(other);
8365
8507
  if (isTooltip) {
8366
- (_a = other, (tooltip = _a.tooltip, tooltipText = _a.tooltipText, _a), liProps = tslib.__rest(_a, ["tooltip", "tooltipText"]));
8508
+ (_a = other, (tooltip = _a.tooltip, tooltipText = _a.tooltipText), liProps = tslib.__rest(_a, ["tooltip", "tooltipText"]));
8367
8509
  }
8368
8510
  else {
8369
8511
  liProps = other;
8370
8512
  }
8371
- return (React__default.createElement("li", tslib.__assign({ className: classNames('Stepper__step', "Stepper__step--" + status, className), "aria-current": status === 'current' ? 'step' : 'false' }, liProps),
8513
+ return (React__default.createElement("li", tslib.__assign({ className: classNames('Stepper__step', "Stepper__step--".concat(status), className), "aria-current": status === 'current' ? 'step' : 'false' }, liProps),
8372
8514
  React__default.createElement("div", { className: "Stepper__step-line" }),
8373
8515
  React__default.createElement("div", { className: "Stepper__step-content" }, isTooltip ? (React__default.createElement(TooltipTabstop, { placement: "bottom", tooltip: tooltip,
8374
8516
  // the pseudo content (ex: "1") is conveyed
@@ -8410,7 +8552,7 @@ var Panel = React.forwardRef(function (_a, ref) {
8410
8552
  if (!headingId) {
8411
8553
  return null;
8412
8554
  }
8413
- var HeadingComponent = "h" + (heading &&
8555
+ var HeadingComponent = "h".concat(heading &&
8414
8556
  typeof heading === 'object' &&
8415
8557
  'level' in heading &&
8416
8558
  !!heading.level
@@ -8428,7 +8570,9 @@ var Panel = React.forwardRef(function (_a, ref) {
8428
8570
  });
8429
8571
  Panel.displayName = 'Panel';
8430
8572
  Panel.propTypes = {
8573
+ // @ts-expect-error
8431
8574
  children: PropTypes.node.isRequired,
8575
+ // @ts-expect-error
8432
8576
  heading: PropTypes.oneOfType([PropTypes.object, PropTypes.node]),
8433
8577
  className: PropTypes.string
8434
8578
  };
@@ -8438,7 +8582,7 @@ var IssuePanel = function (_a) {
8438
8582
  return (React__default.createElement("div", { className: classNames('IssuePanel', className) },
8439
8583
  React__default.createElement("div", { className: "IssuePanel__Header" },
8440
8584
  title && React__default.createElement("div", { className: "IssuePanel__Header-title" }, title),
8441
- actions && React__default.createElement("div", { className: "IssuePanel__Header-actions" }, actions)),
8585
+ actions && (React__default.createElement("div", { className: "IssuePanel__Header-actions" }, actions))),
8442
8586
  React__default.createElement("div", { className: "IssuePanel__Content" }, children)));
8443
8587
  };
8444
8588
  IssuePanel.displayName = 'IssuePanel';
@@ -8451,7 +8595,7 @@ var ProgressBar = React.forwardRef(function (_a, ref) {
8451
8595
  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"]);
8452
8596
  var className = props.className, otherProps = tslib.__rest(props, ["className"]);
8453
8597
  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),
8454
- React__default.createElement("div", { className: "ProgressBar--fill", style: { width: Math.min((progress / progressMax) * 100, 100) + "%" } })));
8598
+ React__default.createElement("div", { className: "ProgressBar--fill", style: { width: "".concat(Math.min((progress / progressMax) * 100, 100), "%") } })));
8455
8599
  });
8456
8600
  ProgressBar.displayName = 'ProgressBar';
8457
8601
 
@@ -8566,6 +8710,7 @@ var FieldWrap = React__default.forwardRef(function (_a, ref) {
8566
8710
  });
8567
8711
  FieldWrap.displayName = 'FieldWrap';
8568
8712
  FieldWrap.propTypes = {
8713
+ // @ts-expect-error
8569
8714
  children: PropTypes.node.isRequired,
8570
8715
  className: PropTypes.string,
8571
8716
  as: PropTypes.string
@@ -8586,7 +8731,7 @@ var Breadcrumb = React.forwardRef(function (_a, ref) {
8586
8731
  }
8587
8732
  });
8588
8733
  return (React__default.createElement("nav", tslib.__assign({ className: classNames('Breadcrumb', className), ref: ref }, props),
8589
- React__default.createElement("ol", null, childrenWithSeparators.map(function (child, index) { return (React__default.createElement("li", { className: "Breadcrumb__Item", key: "breadcrumb-" + index }, child)); }))));
8734
+ React__default.createElement("ol", null, childrenWithSeparators.map(function (child, index) { return (React__default.createElement("li", { className: "Breadcrumb__Item", key: "breadcrumb-".concat(index) }, child)); }))));
8590
8735
  });
8591
8736
  Breadcrumb.displayName = 'Breadcrumb';
8592
8737
 
@@ -8599,6 +8744,7 @@ var BreadcrumbLink = React.forwardRef(function (_a, ref) {
8599
8744
  var className = _a.className, _b = _a.as, ElementType = _b === void 0 ? 'a' : _b, children = _a.children, props = tslib.__rest(_a, ["className", "as", "children"]);
8600
8745
  return (React__default.createElement(ElementType, tslib.__assign({ className: classNames('Link', 'Breadcrumb__Link', className), ref: ref }, props), children));
8601
8746
  });
8747
+ BreadcrumbLink.displayName = 'BreadcrumbLink';
8602
8748
 
8603
8749
  var ColumnLeft = React.forwardRef(function (_a, ref) {
8604
8750
  var className = _a.className, children = _a.children, props = tslib.__rest(_a, ["className", "children"]);
@@ -8617,6 +8763,11 @@ var TwoColumnPanel = React.forwardRef(function (_a, ref) {
8617
8763
  var _f = tslib.__read(React.useState(initialCollapsed), 2), isCollapsed = _f[0], setCollapsed = _f[1];
8618
8764
  var _g = tslib.__read(React.useState(false), 2), isFocusTrap = _g[0], setIsFocusTrap = _g[1];
8619
8765
  var _h = tslib.__read(React.useState(!initialCollapsed), 2), showPanel = _h[0], setShowPanel = _h[1];
8766
+ var toggleButtonRef = React.useRef(null);
8767
+ var closeButtonRef = React.useRef(null);
8768
+ var columnLeftRef = React.useRef(null);
8769
+ var columnRightRef = React.useRef(null);
8770
+ var columnLeft = React__default.Children.toArray(children).find(function (child) { return child.type === ColumnLeft; });
8620
8771
  var togglePanel = function () {
8621
8772
  if (isCollapsed) {
8622
8773
  setShowPanel(true);
@@ -8634,11 +8785,6 @@ var TwoColumnPanel = React.forwardRef(function (_a, ref) {
8634
8785
  }
8635
8786
  });
8636
8787
  };
8637
- var toggleButtonRef = React.useRef(null);
8638
- var closeButtonRef = React.useRef(null);
8639
- var columnLeftRef = React.useRef(null);
8640
- var columnRightRef = React.useRef(null);
8641
- var columnLeft = React__default.Children.toArray(children).find(function (child) { return child.type === ColumnLeft; });
8642
8788
  // The ColumnLeftComponent will end up being a focus trap when < 720px
8643
8789
  // This component also gets unmounted when not visible meaning that any
8644
8790
  // aria relationships cannot be set to items inside the component since
@@ -8653,11 +8799,11 @@ var TwoColumnPanel = React.forwardRef(function (_a, ref) {
8653
8799
  React__default.createElement("button", { type: "button", onClick: togglePanel, ref: closeButtonRef, "aria-label": hideCollapsedPanelLabel },
8654
8800
  React__default.createElement(Icon, { type: "close" })),
8655
8801
  React__default.createElement(Tooltip, { target: closeButtonRef, association: "aria-labelledby", hideElementOnHidden: true }, hideCollapsedPanelLabel)));
8656
- var children_1 = tslib.__spread([
8802
+ var children_1 = tslib.__spreadArray([
8657
8803
  CloseButton
8658
- ], React__default.Children.toArray(columnLeft.props.children));
8804
+ ], tslib.__read(React__default.Children.toArray(columnLeft.props.children)), false);
8659
8805
  ColumnLeftComponent = React.cloneElement(columnLeft, { id: id, ref: ref_1, tabIndex: -1 }, children_1.map(function (child, index) {
8660
- return React.cloneElement(child, { key: "left-" + index });
8806
+ return React.cloneElement(child, { key: "left-".concat(index) });
8661
8807
  }));
8662
8808
  }
8663
8809
  var columnRight = React__default.Children.toArray(children).find(function (child) { return child.type === ColumnRight; });
@@ -8668,11 +8814,11 @@ var TwoColumnPanel = React.forwardRef(function (_a, ref) {
8668
8814
  React__default.createElement("button", { type: "button", onClick: togglePanel, ref: toggleButtonRef, "aria-label": !isCollapsed ? hideCollapsedPanelLabel : showCollapsedPanelLabel, "aria-expanded": !isCollapsed, "aria-controls": columnLeftId },
8669
8815
  React__default.createElement(Icon, { type: !isCollapsed ? 'chevron-double-left' : 'chevron-double-right' })),
8670
8816
  React__default.createElement(Tooltip, { target: toggleButtonRef, association: "aria-labelledby", hideElementOnHidden: true }, !isCollapsed ? hideCollapsedPanelLabel : showCollapsedPanelLabel)));
8671
- var children_2 = tslib.__spread([
8817
+ var children_2 = tslib.__spreadArray([
8672
8818
  ToggleButton
8673
- ], React__default.Children.toArray(columnRight.props.children));
8819
+ ], tslib.__read(React__default.Children.toArray(columnRight.props.children)), false);
8674
8820
  ColumnRightComponent = React.cloneElement(columnRight, { ref: ref_2, tabIndex: -1 }, children_2.map(function (child, index) {
8675
- return React.cloneElement(child, { key: "right-" + index });
8821
+ return React.cloneElement(child, { key: "right-".concat(index) });
8676
8822
  }));
8677
8823
  }
8678
8824
  React.useLayoutEffect(function () {
@@ -8737,15 +8883,16 @@ var TwoColumnPanel = React.forwardRef(function (_a, ref) {
8737
8883
  'TwoColumnPanel--show': !isCollapsed,
8738
8884
  'TwoColumnPanel--hide': isCollapsed
8739
8885
  }) }, props, { ref: ref }),
8740
- React__default.createElement(FocusTrap, { active: !isCollapsed && isFocusTrap, focusTrapOptions: {
8741
- escapeDeactivates: true,
8742
- allowOutsideClick: true,
8743
- fallbackFocus: columnLeftRef.current
8744
- }, containerElements: [columnLeftRef.current] }),
8745
- React__default.createElement(ClickOutsideListener, { onClickOutside: handleClickOutside, target: columnLeftRef.current }),
8746
- isCollapsed ? null : skipLink,
8747
- showPanel ? ColumnLeftComponent : null,
8748
- ColumnRightComponent));
8886
+ React__default.createElement(React__default.Fragment, null,
8887
+ React__default.createElement(FocusTrap, { active: !isCollapsed && isFocusTrap, focusTrapOptions: {
8888
+ escapeDeactivates: true,
8889
+ allowOutsideClick: true,
8890
+ fallbackFocus: columnLeftRef.current
8891
+ }, containerElements: [columnLeftRef.current] }),
8892
+ React__default.createElement(ClickOutsideListener, { onClickOutside: handleClickOutside, target: columnLeftRef.current }),
8893
+ isCollapsed ? null : skipLink,
8894
+ showPanel ? ColumnLeftComponent : null,
8895
+ ColumnRightComponent)));
8749
8896
  });
8750
8897
  TwoColumnPanel.displayName = 'TwoColumnPanel';
8751
8898
 
@@ -8826,6 +8973,9 @@ ThemeProvider.propTypes = {
8826
8973
  initialTheme: PropTypes.string
8827
8974
  };
8828
8975
 
8976
+ exports.Accordion = Accordion;
8977
+ exports.AccordionContent = AccordionContent;
8978
+ exports.AccordionTrigger = AccordionTrigger;
8829
8979
  exports.Address = Address;
8830
8980
  exports.AddressCityStateZip = AddressCityStateZip;
8831
8981
  exports.AddressLine = AddressLine;
@@ -8885,6 +9035,7 @@ exports.Panel = Panel;
8885
9035
  exports.PanelTrigger = PanelTrigger$1;
8886
9036
  exports.Pointout = Pointout;
8887
9037
  exports.ProgressBar = ProgressBar;
9038
+ exports.RadioCardGroup = RadioCardGroup;
8888
9039
  exports.RadioGroup = RadioGroup;
8889
9040
  exports.Scrim = Scrim;
8890
9041
  exports.Select = Select;