@deque/cauldron-react 6.4.2-canary.f51057b7 → 6.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ children: React.ReactNode;
4
+ size?: 'default' | 'small';
5
+ }
6
+ interface BadgeLabelProps extends React.HTMLAttributes<HTMLDivElement> {
7
+ children: React.ReactNode;
8
+ }
9
+ export declare const BadgeLabel: React.ForwardRefExoticComponent<BadgeLabelProps & React.RefAttributes<HTMLDivElement>>;
10
+ declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLDivElement>>;
11
+ export default Badge;
@@ -35,6 +35,9 @@ export default class Dialog extends React.Component<DialogProps, DialogState> {
35
35
  close(): void;
36
36
  handleClickOutside(): void;
37
37
  focusHeading(): void;
38
+ private handleEscape;
39
+ private attachEventListeners;
40
+ private removeEventListeners;
38
41
  }
39
42
  interface DialogAlignmentProps {
40
43
  align?: 'left' | 'center' | 'right';
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import Badge from '../Badge';
3
+ import { ContentNode } from '../../types';
4
+ type ImpactType = 'critical' | 'serious' | 'moderate' | 'minor';
5
+ interface ImpactBadgeProps extends Omit<React.ComponentProps<typeof Badge>, 'children'> {
6
+ type: ImpactType;
7
+ label?: ContentNode;
8
+ }
9
+ declare const ImpactBadge: React.ForwardRefExoticComponent<Omit<ImpactBadgeProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
+ export default ImpactBadge;
@@ -10,6 +10,7 @@ export interface NoticeProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
10
10
  type?: keyof typeof iconTypeMap;
11
11
  title: ContentNode;
12
12
  icon?: IconType;
13
+ variant?: 'default' | 'condensed';
13
14
  children?: ReactNode;
14
15
  }
15
16
  declare const Notice: React.ForwardRefExoticComponent<NoticeProps & React.RefAttributes<HTMLDivElement>>;
@@ -5,6 +5,7 @@ interface Props extends React.HTMLAttributes<HTMLDivElement> {
5
5
  totalItems: number;
6
6
  itemsPerPage?: number;
7
7
  currentPage?: number;
8
+ hideStartEndPagination?: boolean;
8
9
  statusLabel?: ContentNode;
9
10
  firstPageLabel?: ContentNode;
10
11
  previousPageLabel?: ContentNode;
@@ -7,11 +7,12 @@ export interface TooltipProps extends React.HTMLAttributes<HTMLDivElement> {
7
7
  variant?: 'text' | 'info' | 'big';
8
8
  association?: 'aria-labelledby' | 'aria-describedby' | 'none';
9
9
  show?: boolean | undefined;
10
+ defaultShow?: boolean;
10
11
  placement?: Placement;
11
12
  portal?: React.RefObject<HTMLElement> | HTMLElement;
12
13
  hideElementOnHidden?: boolean;
13
14
  }
14
- declare function Tooltip({ id: propId, placement: initialPlacement, children, portal, target, association, variant, show: initialShow, hideElementOnHidden, className, ...props }: TooltipProps): JSX.Element;
15
+ declare function Tooltip({ id: propId, placement: initialPlacement, children, portal, target, association, variant, show: showProp, defaultShow, hideElementOnHidden, className, ...props }: TooltipProps): JSX.Element;
15
16
  declare namespace Tooltip {
16
17
  var displayName: string;
17
18
  }
package/lib/index.d.ts CHANGED
@@ -38,6 +38,8 @@ export { default as Code } from './components/Code';
38
38
  export { default as LoaderOverlay } from './components/LoaderOverlay';
39
39
  export { default as Line } from './components/Line';
40
40
  export { default as Tag, TagLabel } from './components/Tag';
41
+ export { default as Badge, BadgeLabel } from './components/Badge';
42
+ export { default as ImpactBadge } from './components/ImpactBadge';
41
43
  export { default as TagButton } from './components/TagButton';
42
44
  export { default as Table, TableBody, TableCell, TableHead, TableHeader, TableRow, TableFooter } from './components/Table';
43
45
  export { default as Tabs, Tab, TabPanel } from './components/Tabs';
package/lib/index.js CHANGED
@@ -1386,6 +1386,9 @@ var AriaIsolate = /** @class */ (function () {
1386
1386
  return AriaIsolate;
1387
1387
  }());
1388
1388
 
1389
+ var isEscape = function (event) {
1390
+ return event.key === 'Escape' || event.key === 'Esc' || event.keyCode === 27;
1391
+ };
1389
1392
  var noop = function () {
1390
1393
  //not empty
1391
1394
  };
@@ -1397,24 +1400,29 @@ var Dialog = /** @class */ (function (_super) {
1397
1400
  _this.close = _this.close.bind(_this);
1398
1401
  _this.focusHeading = _this.focusHeading.bind(_this);
1399
1402
  _this.handleClickOutside = _this.handleClickOutside.bind(_this);
1403
+ _this.handleEscape = _this.handleEscape.bind(_this);
1400
1404
  _this.state = {};
1401
1405
  return _this;
1402
1406
  }
1403
1407
  Dialog.prototype.componentDidMount = function () {
1404
1408
  var _this = this;
1405
1409
  if (this.props.show) {
1410
+ this.attachEventListeners();
1406
1411
  this.attachIsolator(function () { return setTimeout(_this.focusHeading); });
1407
1412
  }
1408
1413
  };
1409
1414
  Dialog.prototype.componentWillUnmount = function () {
1410
1415
  var isolator = this.state.isolator;
1411
1416
  isolator === null || isolator === void 0 ? void 0 : isolator.deactivate();
1417
+ this.removeEventListeners();
1412
1418
  };
1413
1419
  Dialog.prototype.componentDidUpdate = function (prevProps) {
1414
1420
  if (!prevProps.show && this.props.show) {
1415
1421
  this.attachIsolator(this.focusHeading);
1422
+ this.attachEventListeners();
1416
1423
  }
1417
1424
  else if (prevProps.show && !this.props.show) {
1425
+ this.removeEventListeners();
1418
1426
  this.close();
1419
1427
  }
1420
1428
  };
@@ -1438,8 +1446,7 @@ var Dialog = /** @class */ (function (_super) {
1438
1446
  : 2);
1439
1447
  var Dialog = (React__default["default"].createElement(FocusTrap__default["default"], { focusTrapOptions: {
1440
1448
  allowOutsideClick: true,
1441
- onDeactivate: this.close,
1442
- escapeDeactivates: !forceAction,
1449
+ escapeDeactivates: false,
1443
1450
  fallbackFocus: '.Dialog__heading'
1444
1451
  } },
1445
1452
  React__default["default"].createElement(ClickOutsideListener, { onClickOutside: this.handleClickOutside },
@@ -1481,6 +1488,24 @@ var Dialog = /** @class */ (function (_super) {
1481
1488
  }
1482
1489
  (_a = this.state.isolator) === null || _a === void 0 ? void 0 : _a.activate();
1483
1490
  };
1491
+ Dialog.prototype.handleEscape = function (keyboardEvent) {
1492
+ if (!keyboardEvent.defaultPrevented && isEscape(keyboardEvent)) {
1493
+ this.close();
1494
+ }
1495
+ };
1496
+ Dialog.prototype.attachEventListeners = function () {
1497
+ var forceAction = this.props.forceAction;
1498
+ if (!forceAction) {
1499
+ var portal = this.props.portal || document.body;
1500
+ var targetElement = portal instanceof HTMLElement ? portal : portal.current;
1501
+ targetElement === null || targetElement === void 0 ? void 0 : targetElement.addEventListener('keyup', this.handleEscape);
1502
+ }
1503
+ };
1504
+ Dialog.prototype.removeEventListeners = function () {
1505
+ var portal = this.props.portal || document.body;
1506
+ var targetElement = portal instanceof HTMLElement ? portal : portal.current;
1507
+ targetElement === null || targetElement === void 0 ? void 0 : targetElement.removeEventListener('keyup', this.handleEscape);
1508
+ };
1484
1509
  Dialog.defaultProps = {
1485
1510
  onClose: noop,
1486
1511
  forceAction: false,
@@ -1654,10 +1679,10 @@ var fireCustomEvent = function (show, button) {
1654
1679
  };
1655
1680
  function Tooltip(_a) {
1656
1681
  var _this = this;
1657
- var propId = _a.id, _b = _a.placement, initialPlacement = _b === void 0 ? 'auto' : _b, children = _a.children, portal = _a.portal, target = _a.target, _c = _a.association, association = _c === void 0 ? 'aria-describedby' : _c, _d = _a.variant, variant = _d === void 0 ? 'text' : _d, _e = _a.show, initialShow = _e === void 0 ? false : _e, _f = _a.hideElementOnHidden, hideElementOnHidden = _f === void 0 ? false : _f, className = _a.className, props = tslib.__rest(_a, ["id", "placement", "children", "portal", "target", "association", "variant", "show", "hideElementOnHidden", "className"]);
1682
+ var propId = _a.id, _b = _a.placement, initialPlacement = _b === void 0 ? 'auto' : _b, children = _a.children, portal = _a.portal, target = _a.target, _c = _a.association, association = _c === void 0 ? 'aria-describedby' : _c, _d = _a.variant, variant = _d === void 0 ? 'text' : _d, showProp = _a.show, _e = _a.defaultShow, defaultShow = _e === void 0 ? false : _e, _f = _a.hideElementOnHidden, hideElementOnHidden = _f === void 0 ? false : _f, className = _a.className, props = tslib.__rest(_a, ["id", "placement", "children", "portal", "target", "association", "variant", "show", "defaultShow", "hideElementOnHidden", "className"]);
1658
1683
  var _g = tslib.__read(propId ? [propId] : nextId.useId(1, 'tooltip'), 1), id = _g[0];
1659
1684
  var hideTimeoutRef = React.useRef(null);
1660
- var _h = tslib.__read(React.useState(!!initialShow), 2), showTooltip = _h[0], setShowTooltip = _h[1];
1685
+ var _h = tslib.__read(React.useState(!!showProp || defaultShow), 2), showTooltip = _h[0], setShowTooltip = _h[1];
1661
1686
  var _j = tslib.__read(React.useState(null), 2), targetElement = _j[0], setTargetElement = _j[1];
1662
1687
  var _k = tslib.__read(React.useState(null), 2), tooltipElement = _k[0], setTooltipElement = _k[1];
1663
1688
  var _l = tslib.__read(React.useState(null), 2), arrowElement = _l[0], setArrowElement = _l[1];
@@ -1709,12 +1734,20 @@ function Tooltip(_a) {
1709
1734
  fireCustomEvent(false, targetElement);
1710
1735
  }, TIP_HIDE_DELAY);
1711
1736
  }
1737
+ return function () {
1738
+ clearTimeout(hideTimeoutRef.current);
1739
+ };
1712
1740
  }, [targetElement]);
1713
1741
  // Keep targetElement in sync with target prop
1714
1742
  React.useEffect(function () {
1715
1743
  var targetElement = target && 'current' in target ? target.current : target;
1716
1744
  setTargetElement(targetElement);
1717
1745
  }, [target]);
1746
+ React.useEffect(function () {
1747
+ if (typeof showProp === 'boolean') {
1748
+ setShowTooltip(showProp);
1749
+ }
1750
+ }, [showProp]);
1718
1751
  // Get popper placement
1719
1752
  var placement = (attributes.popper &&
1720
1753
  attributes.popper['data-popper-placement']) ||
@@ -1725,11 +1758,12 @@ function Tooltip(_a) {
1725
1758
  if (event.key === 'Escape' ||
1726
1759
  event.key === 'Esc' ||
1727
1760
  event.keyCode === 27) {
1761
+ event.preventDefault();
1728
1762
  setShowTooltip(false);
1729
1763
  }
1730
1764
  };
1731
1765
  var targetElement = document.body;
1732
- if (showTooltip) {
1766
+ if (showTooltip && typeof showProp !== 'boolean') {
1733
1767
  targetElement.addEventListener('keyup', handleEscape, { capture: true });
1734
1768
  }
1735
1769
  else {
@@ -1742,29 +1776,33 @@ function Tooltip(_a) {
1742
1776
  capture: true
1743
1777
  });
1744
1778
  };
1745
- }, [showTooltip]);
1779
+ }, [showTooltip, showProp]);
1746
1780
  // Handle hover and focus events for the targetElement
1747
1781
  React.useEffect(function () {
1748
- targetElement === null || targetElement === void 0 ? void 0 : targetElement.addEventListener('mouseenter', show);
1749
- targetElement === null || targetElement === void 0 ? void 0 : targetElement.addEventListener('mouseleave', hide);
1750
- targetElement === null || targetElement === void 0 ? void 0 : targetElement.addEventListener('focusin', show);
1751
- targetElement === null || targetElement === void 0 ? void 0 : targetElement.addEventListener('focusout', hide);
1782
+ if (typeof showProp !== 'boolean') {
1783
+ targetElement === null || targetElement === void 0 ? void 0 : targetElement.addEventListener('mouseenter', show);
1784
+ targetElement === null || targetElement === void 0 ? void 0 : targetElement.addEventListener('mouseleave', hide);
1785
+ targetElement === null || targetElement === void 0 ? void 0 : targetElement.addEventListener('focusin', show);
1786
+ targetElement === null || targetElement === void 0 ? void 0 : targetElement.addEventListener('focusout', hide);
1787
+ }
1752
1788
  return function () {
1753
1789
  targetElement === null || targetElement === void 0 ? void 0 : targetElement.removeEventListener('mouseenter', show);
1754
1790
  targetElement === null || targetElement === void 0 ? void 0 : targetElement.removeEventListener('mouseleave', hide);
1755
1791
  targetElement === null || targetElement === void 0 ? void 0 : targetElement.removeEventListener('focusin', show);
1756
1792
  targetElement === null || targetElement === void 0 ? void 0 : targetElement.removeEventListener('focusout', hide);
1757
1793
  };
1758
- }, [targetElement, show, hide]);
1794
+ }, [targetElement, show, hide, showProp]);
1759
1795
  // Handle hover events for the tooltipElement
1760
1796
  React.useEffect(function () {
1761
- tooltipElement === null || tooltipElement === void 0 ? void 0 : tooltipElement.addEventListener('mouseenter', show);
1762
- tooltipElement === null || tooltipElement === void 0 ? void 0 : tooltipElement.addEventListener('mouseleave', hide);
1797
+ if (typeof showProp !== 'boolean') {
1798
+ tooltipElement === null || tooltipElement === void 0 ? void 0 : tooltipElement.addEventListener('mouseenter', show);
1799
+ tooltipElement === null || tooltipElement === void 0 ? void 0 : tooltipElement.addEventListener('mouseleave', hide);
1800
+ }
1763
1801
  return function () {
1764
1802
  tooltipElement === null || tooltipElement === void 0 ? void 0 : tooltipElement.removeEventListener('mouseenter', show);
1765
1803
  tooltipElement === null || tooltipElement === void 0 ? void 0 : tooltipElement.removeEventListener('mouseleave', hide);
1766
1804
  };
1767
- }, [tooltipElement, show, hide]);
1805
+ }, [tooltipElement, show, hide, showProp]);
1768
1806
  // Keep the target's id in sync
1769
1807
  React.useEffect(function () {
1770
1808
  if (hasAriaAssociation) {
@@ -2601,6 +2639,41 @@ var Tag = function (_a) {
2601
2639
  };
2602
2640
  Tag.displayName = 'Tag';
2603
2641
 
2642
+ var BadgeLabel = React.forwardRef(function (_a, ref) {
2643
+ var children = _a.children, className = _a.className, other = tslib.__rest(_a, ["children", "className"]);
2644
+ return (React__default["default"].createElement("div", tslib.__assign({ ref: ref, className: classNames__default["default"]('Badge__Label', className) }, other), children));
2645
+ });
2646
+ BadgeLabel.displayName = 'BadgeLabel';
2647
+ var Badge = React.forwardRef(function (_a, ref) {
2648
+ var children = _a.children, className = _a.className, _b = _a.size, size = _b === void 0 ? 'default' : _b, other = tslib.__rest(_a, ["children", "className", "size"]);
2649
+ return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('Badge', className, {
2650
+ 'Badge--small': size === 'small'
2651
+ }), ref: ref }, other), children));
2652
+ });
2653
+ Badge.displayName = 'Badge';
2654
+
2655
+ var iconByType = {
2656
+ critical: 'chevron-double-up',
2657
+ serious: 'chevron-up',
2658
+ moderate: 'chevron-down',
2659
+ minor: 'chevron-double-down'
2660
+ };
2661
+ var typeValues = {
2662
+ critical: 'Critical',
2663
+ serious: 'Serious',
2664
+ moderate: 'Moderate',
2665
+ minor: 'Minor'
2666
+ };
2667
+ var ImpactBadge = React.forwardRef(function (_a, ref) {
2668
+ var type = _a.type, label = _a.label, className = _a.className, other = tslib.__rest(_a, ["type", "label", "className"]);
2669
+ return (React__default["default"].createElement(Badge, tslib.__assign({ className: classNames__default["default"]("ImpactBadge", "ImpactBadge--".concat(type), className), ref: ref }, other),
2670
+ React__default["default"].createElement(Icon, { type: iconByType[type] }),
2671
+ label || (React__default["default"].createElement(React__default["default"].Fragment, null,
2672
+ React__default["default"].createElement(BadgeLabel, null, "Impact:"),
2673
+ typeValues[type]))));
2674
+ });
2675
+ ImpactBadge.displayName = 'ImpactBadge';
2676
+
2604
2677
  var TagButton = React__default["default"].forwardRef(function (_a, ref) {
2605
2678
  var label = _a.label, value = _a.value, icon = _a.icon, className = _a.className, rest = tslib.__rest(_a, ["label", "value", "icon", "className"]);
2606
2679
  return (React__default["default"].createElement(Button, tslib.__assign({ variant: "tag", className: classNames__default["default"]('TagButton', className), ref: ref }, rest),
@@ -2881,7 +2954,7 @@ var AddressCityStateZip = function (_a) {
2881
2954
  AddressCityStateZip.displayName = 'AddressCityStateZip';
2882
2955
 
2883
2956
  var Pagination = React__default["default"].forwardRef(function (_a, ref) {
2884
- var totalItems = _a.totalItems, _b = _a.itemsPerPage, itemsPerPage = _b === void 0 ? 10 : _b, _c = _a.currentPage, currentPage = _c === void 0 ? 1 : _c, statusLabel = _a.statusLabel, _d = _a.firstPageLabel, firstPageLabel = _d === void 0 ? 'First page' : _d, _e = _a.previousPageLabel, previousPageLabel = _e === void 0 ? 'Previous page' : _e, _f = _a.nextPageLabel, nextPageLabel = _f === void 0 ? 'Next page' : _f, _g = _a.lastPageLabel, lastPageLabel = _g === void 0 ? 'Last page' : _g, _h = _a.tooltipPlacement, tooltipPlacement = _h === void 0 ? 'bottom' : _h, onNextPageClick = _a.onNextPageClick, onPreviousPageClick = _a.onPreviousPageClick, onFirstPageClick = _a.onFirstPageClick, onLastPageClick = _a.onLastPageClick, className = _a.className, _j = _a.thin, thin = _j === void 0 ? false : _j, other = tslib.__rest(_a, ["totalItems", "itemsPerPage", "currentPage", "statusLabel", "firstPageLabel", "previousPageLabel", "nextPageLabel", "lastPageLabel", "tooltipPlacement", "onNextPageClick", "onPreviousPageClick", "onFirstPageClick", "onLastPageClick", "className", "thin"]);
2957
+ var totalItems = _a.totalItems, _b = _a.itemsPerPage, itemsPerPage = _b === void 0 ? 10 : _b, _c = _a.currentPage, currentPage = _c === void 0 ? 1 : _c, _d = _a.hideStartEndPagination, hideStartEndPagination = _d === void 0 ? false : _d, statusLabel = _a.statusLabel, _e = _a.firstPageLabel, firstPageLabel = _e === void 0 ? 'First page' : _e, _f = _a.previousPageLabel, previousPageLabel = _f === void 0 ? 'Previous page' : _f, _g = _a.nextPageLabel, nextPageLabel = _g === void 0 ? 'Next page' : _g, _h = _a.lastPageLabel, lastPageLabel = _h === void 0 ? 'Last page' : _h, _j = _a.tooltipPlacement, tooltipPlacement = _j === void 0 ? 'bottom' : _j, onNextPageClick = _a.onNextPageClick, onPreviousPageClick = _a.onPreviousPageClick, onFirstPageClick = _a.onFirstPageClick, onLastPageClick = _a.onLastPageClick, className = _a.className, _k = _a.thin, thin = _k === void 0 ? false : _k, other = tslib.__rest(_a, ["totalItems", "itemsPerPage", "currentPage", "hideStartEndPagination", "statusLabel", "firstPageLabel", "previousPageLabel", "nextPageLabel", "lastPageLabel", "tooltipPlacement", "onNextPageClick", "onPreviousPageClick", "onFirstPageClick", "onLastPageClick", "className", "thin"]);
2885
2958
  var itemStart = currentPage * itemsPerPage - itemsPerPage + 1;
2886
2959
  var itemEnd = Math.min(itemStart + itemsPerPage - 1, totalItems);
2887
2960
  var isLastPage = itemEnd === totalItems;
@@ -2890,8 +2963,8 @@ var Pagination = React__default["default"].forwardRef(function (_a, ref) {
2890
2963
  'Pagination--thin': thin
2891
2964
  }) }, other),
2892
2965
  React__default["default"].createElement("ul", null,
2893
- React__default["default"].createElement("li", null,
2894
- React__default["default"].createElement(IconButton, { icon: "chevron-double-left", tooltipProps: { placement: tooltipPlacement }, label: firstPageLabel, "aria-disabled": isFirstPage, onClick: isFirstPage ? undefined : onFirstPageClick })),
2966
+ !hideStartEndPagination && (React__default["default"].createElement("li", null,
2967
+ React__default["default"].createElement(IconButton, { icon: "chevron-double-left", tooltipProps: { placement: tooltipPlacement }, label: firstPageLabel, "aria-disabled": isFirstPage, onClick: isFirstPage ? undefined : onFirstPageClick }))),
2895
2968
  React__default["default"].createElement("li", null,
2896
2969
  React__default["default"].createElement(IconButton, { icon: "chevron-left", tooltipProps: { placement: tooltipPlacement }, label: previousPageLabel, "aria-disabled": isFirstPage, onClick: isFirstPage ? undefined : onPreviousPageClick })),
2897
2970
  React__default["default"].createElement("li", null,
@@ -2905,8 +2978,8 @@ var Pagination = React__default["default"].forwardRef(function (_a, ref) {
2905
2978
  React__default["default"].createElement("strong", null, totalItems))))),
2906
2979
  React__default["default"].createElement("li", null,
2907
2980
  React__default["default"].createElement(IconButton, { icon: "chevron-right", tooltipProps: { placement: tooltipPlacement }, label: nextPageLabel, "aria-disabled": isLastPage, onClick: isLastPage ? undefined : onNextPageClick })),
2908
- React__default["default"].createElement("li", null,
2909
- React__default["default"].createElement(IconButton, { icon: "chevron-double-right", tooltipProps: { placement: tooltipPlacement }, label: lastPageLabel, "aria-disabled": isLastPage, onClick: isLastPage ? undefined : onLastPageClick })))));
2981
+ !hideStartEndPagination && (React__default["default"].createElement("li", null,
2982
+ React__default["default"].createElement(IconButton, { icon: "chevron-double-right", tooltipProps: { placement: tooltipPlacement }, label: lastPageLabel, "aria-disabled": isLastPage, onClick: isLastPage ? undefined : onLastPageClick }))))));
2910
2983
  });
2911
2984
  Pagination.displayName = 'Pagination';
2912
2985
 
@@ -3167,13 +3240,13 @@ var iconTypeMap = {
3167
3240
  };
3168
3241
  var Notice = React.forwardRef(function (_a, ref) {
3169
3242
  var _b;
3170
- var _c = _a.type, type = _c === void 0 ? 'info' : _c, title = _a.title, icon = _a.icon, children = _a.children, otherProps = tslib.__rest(_a, ["type", "title", "icon", "children"]);
3243
+ var _c = _a.type, type = _c === void 0 ? 'info' : _c, title = _a.title, icon = _a.icon, _d = _a.variant, variant = _d === void 0 ? 'default' : _d, children = _a.children, otherProps = tslib.__rest(_a, ["type", "title", "icon", "variant", "children"]);
3171
3244
  return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('Notice', (_b = {},
3172
3245
  _b["Notice--".concat(type)] = type,
3246
+ _b["Notice--condensed"] = variant === 'condensed',
3173
3247
  _b)), ref: ref }, otherProps),
3174
- React__default["default"].createElement("div", { className: "Notice__title" },
3175
- React__default["default"].createElement(Icon, { type: icon || iconTypeMap[type] }),
3176
- title),
3248
+ React__default["default"].createElement(Icon, { type: icon || iconTypeMap[type] }),
3249
+ React__default["default"].createElement("div", { className: "Notice__title" }, title),
3177
3250
  children && React__default["default"].createElement("div", { className: "Notice__content" }, children)));
3178
3251
  });
3179
3252
  Notice.displayName = 'Notice';
@@ -4100,6 +4173,8 @@ exports.Alert = Alert;
4100
4173
  exports.AlertActions = AlertActions;
4101
4174
  exports.AlertContent = AlertContent;
4102
4175
  exports.AriaIsolate = AriaIsolate;
4176
+ exports.Badge = Badge;
4177
+ exports.BadgeLabel = BadgeLabel;
4103
4178
  exports.Breadcrumb = Breadcrumb;
4104
4179
  exports.BreadcrumbItem = BreadcrumbItem;
4105
4180
  exports.BreadcrumbLink = BreadcrumbLink;
@@ -4126,6 +4201,7 @@ exports.ExpandCollapsePanel = ExpandCollapsePanel;
4126
4201
  exports.FieldWrap = FieldWrap;
4127
4202
  exports.Icon = Icon;
4128
4203
  exports.IconButton = IconButton;
4204
+ exports.ImpactBadge = ImpactBadge;
4129
4205
  exports.Layout = Layout;
4130
4206
  exports.Line = Line;
4131
4207
  exports.Link = Link;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deque/cauldron-react",
3
- "version": "6.4.2-canary.f51057b7",
3
+ "version": "6.5.0",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Fully accessible react components library for Deque Cauldron",
6
6
  "homepage": "https://cauldron.dequelabs.com/",