@televet/kibble-ui 1.20.1 → 1.20.2

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/build/index.js CHANGED
@@ -6577,113 +6577,14 @@ var Icon = React.forwardRef(function (_a, ref) {
6577
6577
  });
6578
6578
  Icon.displayName = 'Icon';
6579
6579
 
6580
- var camelCaseToLabel = function (s) {
6581
- return s.replace(/([A-Z])/g, ' $1').replace(/^\w/, function (c) { return c.toUpperCase(); });
6582
- };
6583
- var toTitleCase = function (s) {
6584
- var smallWords = /^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|v.?|vs.?|via)$/i;
6585
- var alphanumericPattern = /([A-Za-z0-9\u00C0-\u00FF])/;
6586
- var wordSeparators = /([ :–—-])/;
6587
- return s
6588
- .split(wordSeparators)
6589
- .map(function (current, index, array) {
6590
- if (
6591
- /* Check for small words */
6592
- current.search(smallWords) > -1 &&
6593
- /* Skip first and last word */
6594
- index !== 0 &&
6595
- index !== array.length - 1 &&
6596
- /* Ignore title end and subtitle start */
6597
- array[index - 3] !== ':' &&
6598
- array[index + 1] !== ':' &&
6599
- /* Ignore small words that start a hyphenated phrase */
6600
- (array[index + 1] !== '-' || (array[index - 1] === '-' && array[index + 1] === '-'))) {
6601
- return current.toLowerCase();
6602
- }
6603
- /* Ignore intentional capitalization */
6604
- if (current.substring(1).search(/[A-Z]|\../) > -1) {
6605
- return current;
6606
- }
6607
- /* Ignore URLs */
6608
- if (array[index + 1] === ':' && array[index + 2] !== '') {
6609
- return current;
6610
- }
6611
- /* Capitalize the first letter */
6612
- return current.replace(alphanumericPattern, function (match) { return match.toUpperCase(); });
6613
- })
6614
- .join('');
6615
- };
6616
-
6617
- var getNextIconSize = function (size, larger, count) {
6618
- if (larger === void 0) { larger = true; }
6619
- if (count === void 0) { count = 1; }
6620
- var nextSize;
6621
- switch (size) {
6622
- case 'xs':
6623
- nextSize = larger ? 'sm' : 'xs';
6624
- break;
6625
- case 'sm':
6626
- nextSize = larger ? 'md' : 'xs';
6627
- break;
6628
- case 'md':
6629
- nextSize = larger ? 'lg' : 'sm';
6630
- break;
6631
- case 'lg':
6632
- nextSize = larger ? 'xl' : 'md';
6633
- break;
6634
- case 'xl':
6635
- nextSize = larger ? '2xl' : 'lg';
6636
- break;
6637
- case '2xl':
6638
- nextSize = larger ? '2xl' : 'xl';
6639
- break;
6640
- default:
6641
- nextSize = size;
6642
- break;
6643
- }
6644
- if (count > 1) {
6645
- nextSize = getNextIconSize(nextSize, larger, count - 1);
6646
- }
6647
- return nextSize;
6648
- };
6649
-
6650
- var Tooltip = function (_a) {
6651
- var children = _a.children, label = _a.label, _b = _a.openDelay, openDelay = _b === void 0 ? 350 : _b, _c = _a.placement, placement = _c === void 0 ? 'top' : _c, _d = _a.titleCaseLabel, titleCaseLabel = _d === void 0 ? true : _d, rest = __rest(_a, ["children", "label", "openDelay", "placement", "titleCaseLabel"]);
6652
- var components = useTheme().components;
6653
- var bg = useAdaptiveColor(components.Tooltip.color);
6654
- var l = titleCaseLabel ? toTitleCase(label.toLowerCase()) : label;
6655
- return (React__default["default"].createElement(react.Tooltip, __assign({ hasArrow: true, arrowSize: 10, label: l, bg: bg, openDelay: openDelay, placement: placement }, rest), children));
6656
- };
6657
-
6658
- var TooltipGlobalStyle = {
6659
- '[id^=tooltip]': {
6660
- padding: '4px 8px 4px 8px !important',
6661
- borderRadius: '4px !important',
6662
- },
6663
- };
6664
- var TooltipConfig = {
6665
- color: { light: semanticColors.background.dark, dark: semanticColors.background.light },
6666
- baseStyle: {
6667
- zIndex: 'tooltipExtra',
6668
- },
6669
- };
6670
-
6671
6580
  var AvatarConfig = {
6672
6581
  baseStyle: {
6673
6582
  container: {
6674
6583
  backgroundColor: coreColors.white,
6675
- borderWidth: '2px',
6676
- boxShadow: "0 0 0 1px ".concat(coreColors.white),
6677
- _hover: {
6678
- backgroundColor: coreColors.gray[50],
6679
- zIndex: 2,
6680
- },
6681
- _active: {
6682
- backgroundColor: coreColors.gray[100],
6683
- },
6684
6584
  },
6685
6585
  label: {
6686
6586
  paddingTop: '1px',
6587
+ fontWeight: 'semibold',
6687
6588
  },
6688
6589
  },
6689
6590
  sizes: {
@@ -6736,25 +6637,19 @@ var AvatarConfig = {
6736
6637
  variants: {
6737
6638
  red: {
6738
6639
  container: {
6739
- borderColor: coreColors.red[300],
6740
- },
6741
- label: {
6742
6640
  color: coreColors.red[300],
6641
+ borderColor: coreColors.red[300],
6743
6642
  },
6744
6643
  },
6745
6644
  green: {
6746
6645
  container: {
6747
6646
  borderColor: coreColors.green[400],
6748
- },
6749
- label: {
6750
6647
  color: coreColors.green[400],
6751
6648
  },
6752
6649
  },
6753
6650
  blue: {
6754
6651
  container: {
6755
6652
  borderColor: coreColors.blue[300],
6756
- },
6757
- label: {
6758
6653
  color: coreColors.blue[300],
6759
6654
  },
6760
6655
  },
@@ -6762,74 +6657,49 @@ var AvatarConfig = {
6762
6657
  container: {
6763
6658
  backgroundColor: coreColors.comet[50],
6764
6659
  borderColor: coreColors.comet[400],
6765
- _hover: {
6766
- backgroundColor: coreColors.comet[100],
6767
- },
6768
- _active: {
6769
- backgroundColor: coreColors.comet[200],
6770
- },
6771
- },
6772
- label: {
6773
- color: coreColors.comet[800],
6660
+ color: coreColors.comet[700],
6774
6661
  },
6775
6662
  },
6776
- number: {
6663
+ dark: {
6777
6664
  container: {
6778
6665
  backgroundColor: coreColors.blue[800],
6779
6666
  border: 0,
6780
- _hover: {
6781
- backgroundColor: coreColors.blue[800], // 700
6782
- },
6783
- _active: {
6784
- backgroundColor: coreColors.blue[800], // 600
6785
- },
6786
- },
6787
- label: {
6788
6667
  color: coreColors.white,
6789
6668
  },
6790
6669
  },
6791
6670
  dashed: {
6792
6671
  container: {
6793
- backgroundColor: coreColors.transparent,
6794
- border: '1px dashed',
6795
- borderColor: semanticColors.border.dark,
6796
- boxShadow: 0,
6797
- _hover: {
6798
- backgroundColor: coreColors.blackAlpha[100],
6799
- zIndex: 0,
6800
- },
6801
- _active: {
6802
- backgroundColor: coreColors.blackAlpha[200],
6803
- },
6804
- },
6805
- label: {
6672
+ backgroundColor: coreColors.white,
6673
+ borderColor: coreColors.white,
6674
+ overflow: 'visible',
6806
6675
  color: adaptiveColors.icon.light.subtle,
6807
- },
6808
- },
6809
- image: {
6810
- container: {
6811
- border: 0,
6812
- _hover: {
6813
- backgroundColor: coreColors.black,
6814
- img: { opacity: 0.94 },
6815
- },
6816
- _active: {
6817
- backgroundColor: coreColors.black,
6818
- img: { opacity: 0.92 },
6676
+ _after: {
6677
+ content: "''",
6678
+ position: 'absolute',
6679
+ top: '-2px',
6680
+ right: '-2px',
6681
+ bottom: '-2px',
6682
+ left: '-2px',
6683
+ border: "1px dashed ".concat(semanticColors.border.light.heavy),
6684
+ borderRadius: '100%',
6819
6685
  },
6820
6686
  },
6821
6687
  },
6822
- icon: {
6688
+ test: {
6823
6689
  container: {
6824
- border: 0,
6825
- color: adaptiveColors.icon.light.default,
6826
- backgroundColor: coreColors.comet[50],
6827
- opacity: 1,
6828
- _hover: {
6829
- backgroundColor: coreColors.comet[100],
6830
- },
6831
- _active: {
6832
- backgroundColor: coreColors.comet[200],
6690
+ backgroundColor: coreColors.orange['50'],
6691
+ borderColor: coreColors.orange['200'],
6692
+ overflow: 'visible',
6693
+ color: adaptiveColors.icon.light.subtle,
6694
+ _after: {
6695
+ content: "''",
6696
+ position: 'absolute',
6697
+ top: '-2px',
6698
+ right: '-2px',
6699
+ bottom: '-2px',
6700
+ left: '-2px',
6701
+ border: "2px dashed ".concat(coreColors.blackAlpha['200']),
6702
+ borderRadius: '100%',
6833
6703
  },
6834
6704
  },
6835
6705
  },
@@ -6844,7 +6714,7 @@ exports.AvatarBadgePosition = void 0;
6844
6714
  AvatarBadgePosition["BottomRight"] = "bottomRight";
6845
6715
  })(exports.AvatarBadgePosition || (exports.AvatarBadgePosition = {}));
6846
6716
  var AvatarBadge = function (_a) {
6847
- var avatarSize = _a.avatarSize, badgeIconName = _a.badgeIconName, badgeBackgroundColor = _a.badgeBackgroundColor, badgeBorderColor = _a.badgeBorderColor, badgeIconColor = _a.badgeIconColor, badgePosition = _a.badgePosition;
6717
+ var avatarSize = _a.avatarSize, badgeIconName = _a.badgeIconName, _b = _a.badgeBackgroundColor, badgeBackgroundColor = _b === void 0 ? semanticColors.background.info : _b, _c = _a.badgeBorderColor, badgeBorderColor = _c === void 0 ? coreColors.white : _c, _d = _a.badgeIconColor, badgeIconColor = _d === void 0 ? adaptiveColors.icon.light.active : _d, _e = _a.badgePosition, badgePosition = _e === void 0 ? exports.AvatarBadgePosition.BottomRight : _e;
6848
6718
  var useSmallBadge = React.useMemo(function () { return avatarSize === 'xs' || !badgeIconName; }, [badgeIconName, avatarSize]);
6849
6719
  var getBadgeTransform = function (position) {
6850
6720
  var _a, _b, _c, _d;
@@ -6859,7 +6729,7 @@ var AvatarBadge = function (_a) {
6859
6729
  case exports.AvatarBadgePosition.TopRight:
6860
6730
  return useSmallBadge && avatarSize !== 'xs'
6861
6731
  ? "translate(".concat(translation / 10, "px, ").concat(translation * -1.35, "px)")
6862
- : "translate(".concat(translation / 5, "px, ").concat(translation * -1.2, "px)");
6732
+ : "translate(".concat(translation / 3, "px, ").concat(translation * -1.2, "px)");
6863
6733
  case exports.AvatarBadgePosition.BottomLeft:
6864
6734
  return useSmallBadge && avatarSize !== 'xs'
6865
6735
  ? "translate(".concat(translation * -1.35, "px, ").concat(translation / 10, "px)")
@@ -6870,7 +6740,98 @@ var AvatarBadge = function (_a) {
6870
6740
  : "translate(".concat(translation / 3, "px, ").concat(translation / 3, "px)");
6871
6741
  }
6872
6742
  };
6873
- return (React__default["default"].createElement(react.AvatarBadge, { color: badgeIconColor || adaptiveColors.icon.light.active, borderColor: badgeBorderColor || coreColors.white, borderWidth: "1px", bg: badgeBackgroundColor || semanticColors.background.info, boxSize: useSmallBadge ? '10px' : '18px', transform: getBadgeTransform(badgePosition || exports.AvatarBadgePosition.BottomRight) }, !useSmallBadge && badgeIconName && React__default["default"].createElement(Icon, { name: badgeIconName, size: 'xs' })));
6743
+ return (React__default["default"].createElement(react.AvatarBadge, { color: badgeIconColor, borderColor: badgeBorderColor, borderWidth: "1px", bg: badgeBackgroundColor, boxSize: useSmallBadge ? '10px' : '18px', transform: getBadgeTransform(badgePosition) }, !useSmallBadge && badgeIconName && React__default["default"].createElement(Icon, { name: badgeIconName, size: 'xs' })));
6744
+ };
6745
+
6746
+ var camelCaseToLabel = function (s) {
6747
+ return s.replace(/([A-Z])/g, ' $1').replace(/^\w/, function (c) { return c.toUpperCase(); });
6748
+ };
6749
+ var toTitleCase = function (s) {
6750
+ var smallWords = /^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|v.?|vs.?|via)$/i;
6751
+ var alphanumericPattern = /([A-Za-z0-9\u00C0-\u00FF])/;
6752
+ var wordSeparators = /([ :–—-])/;
6753
+ return s
6754
+ .split(wordSeparators)
6755
+ .map(function (current, index, array) {
6756
+ if (
6757
+ /* Check for small words */
6758
+ current.search(smallWords) > -1 &&
6759
+ /* Skip first and last word */
6760
+ index !== 0 &&
6761
+ index !== array.length - 1 &&
6762
+ /* Ignore title end and subtitle start */
6763
+ array[index - 3] !== ':' &&
6764
+ array[index + 1] !== ':' &&
6765
+ /* Ignore small words that start a hyphenated phrase */
6766
+ (array[index + 1] !== '-' || (array[index - 1] === '-' && array[index + 1] === '-'))) {
6767
+ return current.toLowerCase();
6768
+ }
6769
+ /* Ignore intentional capitalization */
6770
+ if (current.substring(1).search(/[A-Z]|\../) > -1) {
6771
+ return current;
6772
+ }
6773
+ /* Ignore URLs */
6774
+ if (array[index + 1] === ':' && array[index + 2] !== '') {
6775
+ return current;
6776
+ }
6777
+ /* Capitalize the first letter */
6778
+ return current.replace(alphanumericPattern, function (match) { return match.toUpperCase(); });
6779
+ })
6780
+ .join('');
6781
+ };
6782
+
6783
+ var getNextIconSize = function (size, larger, count) {
6784
+ if (larger === void 0) { larger = true; }
6785
+ if (count === void 0) { count = 1; }
6786
+ var nextSize;
6787
+ switch (size) {
6788
+ case 'xs':
6789
+ nextSize = larger ? 'sm' : 'xs';
6790
+ break;
6791
+ case 'sm':
6792
+ nextSize = larger ? 'md' : 'xs';
6793
+ break;
6794
+ case 'md':
6795
+ nextSize = larger ? 'lg' : 'sm';
6796
+ break;
6797
+ case 'lg':
6798
+ nextSize = larger ? 'xl' : 'md';
6799
+ break;
6800
+ case 'xl':
6801
+ nextSize = larger ? '2xl' : 'lg';
6802
+ break;
6803
+ case '2xl':
6804
+ nextSize = larger ? '2xl' : 'xl';
6805
+ break;
6806
+ default:
6807
+ nextSize = size;
6808
+ break;
6809
+ }
6810
+ if (count > 1) {
6811
+ nextSize = getNextIconSize(nextSize, larger, count - 1);
6812
+ }
6813
+ return nextSize;
6814
+ };
6815
+
6816
+ var Tooltip = function (_a) {
6817
+ var children = _a.children, label = _a.label, _b = _a.openDelay, openDelay = _b === void 0 ? 350 : _b, _c = _a.placement, placement = _c === void 0 ? 'top' : _c, _d = _a.titleCaseLabel, titleCaseLabel = _d === void 0 ? true : _d, rest = __rest(_a, ["children", "label", "openDelay", "placement", "titleCaseLabel"]);
6818
+ var components = useTheme().components;
6819
+ var bg = useAdaptiveColor(components.Tooltip.color);
6820
+ var l = titleCaseLabel ? toTitleCase(label.toLowerCase()) : label;
6821
+ return (React__default["default"].createElement(react.Tooltip, __assign({ hasArrow: true, arrowSize: 10, label: l, bg: bg, openDelay: openDelay, placement: placement }, rest), children));
6822
+ };
6823
+
6824
+ var TooltipGlobalStyle = {
6825
+ '[id^=tooltip]': {
6826
+ padding: '4px 8px 4px 8px !important',
6827
+ borderRadius: '4px !important',
6828
+ },
6829
+ };
6830
+ var TooltipConfig = {
6831
+ color: { light: semanticColors.background.dark, dark: semanticColors.background.light },
6832
+ baseStyle: {
6833
+ zIndex: 'tooltipExtra',
6834
+ },
6874
6835
  };
6875
6836
 
6876
6837
  exports.AvatarVariant = void 0;
@@ -6879,11 +6840,11 @@ exports.AvatarVariant = void 0;
6879
6840
  AvatarVariant["Red"] = "red";
6880
6841
  AvatarVariant["Blue"] = "blue";
6881
6842
  AvatarVariant["Comet"] = "comet";
6882
- AvatarVariant["Number"] = "number";
6843
+ AvatarVariant["Dark"] = "dark";
6883
6844
  AvatarVariant["Dashed"] = "dashed";
6884
- AvatarVariant["Image"] = "image";
6885
- AvatarVariant["Icon"] = "icon";
6886
- })(exports.AvatarVariant || (exports.AvatarVariant = {}));
6845
+ AvatarVariant["Test"] = "test";
6846
+ })(exports.AvatarVariant || (exports.AvatarVariant = {}));
6847
+
6887
6848
  var getAvatarVariant = function (charCode) {
6888
6849
  if (charCode >= 65 && charCode <= 71) {
6889
6850
  return exports.AvatarVariant.Blue;
@@ -6899,24 +6860,59 @@ var getAvatarVariant = function (charCode) {
6899
6860
  }
6900
6861
  };
6901
6862
  var Avatar = function (_a) {
6902
- var name = _a.name, src = _a.src, _b = _a.isClinic, isClinic = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? 'md' : _c, _d = _a.showTooltip, showTooltip = _d === void 0 ? true : _d, _e = _a.tooltipPlacement, tooltipPlacement = _e === void 0 ? 'bottom' : _e, style = _a.style, handleClick = _a.handleClick, showRemoveButton = _a.showRemoveButton, handleRemoveButtonClick = _a.handleRemoveButtonClick, variant = _a.variant, iconName = _a.iconName, tooltipText = _a.tooltipText, showBadge = _a.showBadge, badgeProps = _a.badgeProps, rest = __rest(_a, ["name", "src", "isClinic", "size", "showTooltip", "tooltipPlacement", "style", "handleClick", "showRemoveButton", "handleRemoveButtonClick", "variant", "iconName", "tooltipText", "showBadge", "badgeProps"]);
6903
- var theme = useTheme();
6904
- var _f = __read(React.useState(!!src), 2), isSrcValid = _f[0], setIsSrcValid = _f[1];
6905
- var _g = __read(React.useState(false), 2), isHoveringAvatar = _g[0], setIsHoveringAvatar = _g[1];
6906
- var _h = __read(React.useState(false), 2), isHoveringRemoveButton = _h[0], setIsHoveringRemoveButton = _h[1];
6907
- var shouldHideRemoveButton = size === 'xs' || variant === exports.AvatarVariant.Dashed || variant === exports.AvatarVariant.Number;
6908
- var _variant = isClinic ? 'comet' : getAvatarVariant(name.charCodeAt(0));
6909
- if (isSrcValid) {
6910
- _variant = exports.AvatarVariant.Image;
6911
- }
6912
- if (iconName) {
6913
- _variant = exports.AvatarVariant.Icon;
6863
+ var badgeProps = _a.badgeProps, handleClick = _a.handleClick, handleRemoveButtonClick = _a.handleRemoveButtonClick, _b = _a.hideBorder, hideBorder = _b === void 0 ? false : _b, iconName = _a.iconName, _c = _a.name, name = _c === void 0 ? '' : _c, _d = _a.randomizeVariant, randomizeVariant = _d === void 0 ? false : _d, _e = _a.showBadge, showBadge = _e === void 0 ? false : _e, _f = _a.showRemoveButton, showRemoveButton = _f === void 0 ? false : _f, _g = _a.showTooltip, showTooltip = _g === void 0 ? true : _g, _h = _a.size, size = _h === void 0 ? 'md' : _h, src = _a.src, _j = _a.tooltipPlacement, tooltipPlacement = _j === void 0 ? 'bottom' : _j, tooltipText = _a.tooltipText, _k = _a.variant, variant = _k === void 0 ? exports.AvatarVariant.Comet : _k, rest = __rest(_a, ["badgeProps", "handleClick", "handleRemoveButtonClick", "hideBorder", "iconName", "name", "randomizeVariant", "showBadge", "showRemoveButton", "showTooltip", "size", "src", "tooltipPlacement", "tooltipText", "variant"]);
6864
+ var colors = useTheme().colors;
6865
+ var _l = __read(React.useState(!!src), 2), isSrcValid = _l[0], setIsSrcValid = _l[1];
6866
+ var _m = __read(React.useState(false), 2), isHoveringAvatar = _m[0], setIsHoveringAvatar = _m[1];
6867
+ var _o = __read(React.useState(false), 2), isHoveringRemoveButton = _o[0], setIsHoveringRemoveButton = _o[1];
6868
+ var shouldHideRemoveButton = size === 'xs';
6869
+ var _variant = variant;
6870
+ if (randomizeVariant) {
6871
+ _variant = getAvatarVariant(name.charCodeAt(0));
6914
6872
  }
6915
- var avatarDynamicStyles = __assign({ cursor: handleClick ? 'pointer' : 'auto' }, style);
6916
- var avatarMarkup = (React__default["default"].createElement(react.Avatar, __assign({}, rest, { name: iconName ? '' : name, src: src, size: size, style: avatarDynamicStyles, variant: variant || _variant }, (iconName && {
6873
+ var hoverActiveStyles = React.useMemo(function () {
6874
+ var styles = {
6875
+ _hover: {
6876
+ backgroundColor: colors.gray[50],
6877
+ img: { opacity: 1 },
6878
+ zIndex: 2,
6879
+ },
6880
+ _active: {
6881
+ backgroundColor: colors.gray[100],
6882
+ img: { opacity: 1 },
6883
+ },
6884
+ };
6885
+ switch (_variant) {
6886
+ case exports.AvatarVariant.Comet:
6887
+ styles._hover.backgroundColor = colors.gray[100];
6888
+ styles._active.backgroundColor = colors.gray[200];
6889
+ break;
6890
+ case exports.AvatarVariant.Dark:
6891
+ styles._hover.backgroundColor = colors.blue[700];
6892
+ styles._active.backgroundColor = colors.blue[600];
6893
+ break;
6894
+ case exports.AvatarVariant.Dashed:
6895
+ styles._hover.backgroundColor = colors.blackAlpha[100];
6896
+ styles._hover.zIndex = 0;
6897
+ styles._active.backgroundColor = colors.blackAlpha[200];
6898
+ break;
6899
+ case exports.AvatarVariant.Test:
6900
+ styles._hover.backgroundColor = colors.orange[100];
6901
+ styles._active.backgroundColor = colors.orange[200];
6902
+ break;
6903
+ }
6904
+ if (isSrcValid) {
6905
+ styles._hover.backgroundColor = colors.black;
6906
+ styles._hover.img.opacity = 0.94;
6907
+ styles._active.backgroundColor = colors.gray[200];
6908
+ styles._active.img.opacity = 0.92;
6909
+ }
6910
+ return styles;
6911
+ }, [_variant, isSrcValid, colors]);
6912
+ var avatarMarkup = (React__default["default"].createElement(react.Avatar, __assign({ name: iconName ? '' : name, src: src, size: size, variant: _variant, boxShadow: "0 0 0 1px ".concat(hideBorder ? colors.transparent : colors.white), borderWidth: isSrcValid || hideBorder ? '0px' : '2px' }, (iconName && {
6917
6913
  icon: React__default["default"].createElement(Icon, { name: iconName, size: getNextIconSize(size, true, size === 'sm' || size === 'xs' ? 2 : 1) }),
6918
- }), { icon: iconName && React__default["default"].createElement(Icon, { name: iconName, size: getNextIconSize(size, true, size === 'sm' || size === 'xs' ? 2 : 1) }), onClick: handleClick, onError: function () { return setIsSrcValid(false); }, onMouseEnter: function () { return setIsHoveringAvatar(true); }, onMouseLeave: function () { return setIsHoveringAvatar(false); } }),
6919
- showRemoveButton && isHoveringAvatar && !shouldHideRemoveButton && (React__default["default"].createElement(react.Box, { backgroundColor: theme.colors.white, borderRadius: "9999px", cursor: "pointer", position: "absolute", top: "-4px", right: "-4px", onClick: handleRemoveButtonClick, onMouseEnter: function () { return setIsHoveringRemoveButton(true); }, onMouseLeave: function () { return setIsHoveringRemoveButton(false); } },
6914
+ }), (handleClick && __assign({ onClick: handleClick, cursor: 'pointer' }, hoverActiveStyles)), { onError: function () { return setIsSrcValid(false); }, onMouseEnter: function () { return setIsHoveringAvatar(true); }, onMouseLeave: function () { return setIsHoveringAvatar(false); } }, rest),
6915
+ showRemoveButton && isHoveringAvatar && !shouldHideRemoveButton && (React__default["default"].createElement(react.Box, { backgroundColor: colors.white, borderRadius: "9999px", cursor: "pointer", position: "absolute", top: "-4px", right: "-5px", onClick: handleRemoveButtonClick, onMouseEnter: function () { return setIsHoveringRemoveButton(true); }, zIndex: 2, onMouseLeave: function () { return setIsHoveringRemoveButton(false); } },
6920
6916
  React__default["default"].createElement(Icon, { name: "closeCircle", size: isHoveringRemoveButton ? 'sm' : 'xs', colorToken: "default" }))),
6921
6917
  showBadge && React__default["default"].createElement(AvatarBadge, __assign({ avatarSize: size }, badgeProps))));
6922
6918
  if (showTooltip) {
@@ -6925,15 +6921,6 @@ var Avatar = function (_a) {
6925
6921
  return avatarMarkup;
6926
6922
  };
6927
6923
 
6928
- var AvatarGroup = function (_a) {
6929
- var avatars = _a.avatars, _b = _a.max, max = _b === void 0 ? 3 : _b, _c = _a.size, size = _c === void 0 ? 'md' : _c, handleAddButtonClick = _a.handleAddButtonClick, _d = _a.showAddButton, showAddButton = _d === void 0 ? true : _d, addButtonTooltipText = _a.addButtonTooltipText, _e = _a.showRemoveAvatarButton, showRemoveAvatarButton = _e === void 0 ? false : _e, handleRemoveButtonClick = _a.handleRemoveButtonClick;
6930
- var mergedNames = React.useMemo(function () { return avatars.map(function (avatar) { return avatar.name; }).join(', '); }, [avatars]);
6931
- var spacing = size === 'lg' || size === 'md' ? -2 : -1;
6932
- return (React__default["default"].createElement(react.AvatarGroup, { size: size, spacing: spacing },
6933
- avatars.length > max ? (React__default["default"].createElement(Avatar, { name: "".concat(avatars.length), size: size, variant: exports.AvatarVariant.Number, tooltipText: mergedNames })) : (avatars.map(function (avatar) { return (React__default["default"].createElement(Avatar, __assign({}, avatar, { key: avatar.name, size: size, showRemoveButton: showRemoveAvatarButton, handleRemoveButtonClick: handleRemoveButtonClick }))); })),
6934
- showAddButton && (React__default["default"].createElement(Avatar, { name: "", variant: exports.AvatarVariant.Dashed, icon: React__default["default"].createElement(Icon, { name: "plus", colorToken: "subtle", size: size }), onClick: handleAddButtonClick, tooltipText: addButtonTooltipText, size: size }))));
6935
- };
6936
-
6937
6924
  var _path$5, _path2;
6938
6925
 
6939
6926
  function _extends$a() { _extends$a = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
@@ -28668,7 +28655,6 @@ exports.AlertConfig = AlertConfig;
28668
28655
  exports.AlertIconColorMap = AlertIconColorMap;
28669
28656
  exports.Avatar = Avatar;
28670
28657
  exports.AvatarConfig = AvatarConfig;
28671
- exports.AvatarGroup = AvatarGroup;
28672
28658
  exports.Button = Button;
28673
28659
  exports.ButtonSizeConfig = ButtonSizeConfig;
28674
28660
  exports.ButtonVariantConfig = ButtonVariantConfig;