@ornikar/kitt-universal 25.52.0 → 25.53.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.
@@ -7623,6 +7623,8 @@ function IconButton({
7623
7623
  testID,
7624
7624
  ariaLabel,
7625
7625
  accessibilityRole = 'button',
7626
+ withBadge,
7627
+ bagdeCount,
7626
7628
  isHoveredInternal,
7627
7629
  isPressedInternal,
7628
7630
  isFocusedInternal,
@@ -7661,26 +7663,55 @@ function IconButton({
7661
7663
  }) => {
7662
7664
  const isCurrentHovered = isHovered || isHoveredInternal;
7663
7665
  const isCurrentPressed = isPressed || isPressedInternal;
7664
- return /*#__PURE__*/jsxs(AnimatedScale, {
7665
- isDisabled: disabled,
7666
- isHovered: isCurrentHovered,
7667
- isPressed: isCurrentPressed,
7668
- scaleStyles: scaleStyles,
7669
- children: [/*#__PURE__*/jsx(AnimatedBackground, {
7670
- color: color,
7666
+ return /*#__PURE__*/jsxs(Fragment, {
7667
+ children: [/*#__PURE__*/jsxs(AnimatedScale, {
7671
7668
  isDisabled: disabled,
7672
7669
  isHovered: isCurrentHovered,
7673
7670
  isPressed: isCurrentPressed,
7674
- isFocused: isFocused || isFocusedInternal,
7675
- opacityStyles: opacityStyles
7676
- }), /*#__PURE__*/jsx(View, {
7677
- alignItems: "center",
7678
- justifyContent: "center",
7679
- children: /*#__PURE__*/jsx(TypographyIcon, {
7680
- color: getIconButtonTextColorByColor(color, disabled),
7681
- icon: icon
7671
+ scaleStyles: scaleStyles,
7672
+ children: [/*#__PURE__*/jsx(AnimatedBackground, {
7673
+ color: color,
7674
+ isDisabled: disabled,
7675
+ isHovered: isCurrentHovered,
7676
+ isPressed: isCurrentPressed,
7677
+ isFocused: isFocused || isFocusedInternal,
7678
+ opacityStyles: opacityStyles
7679
+ }), /*#__PURE__*/jsx(View, {
7680
+ alignItems: "center",
7681
+ justifyContent: "center",
7682
+ children: /*#__PURE__*/jsx(TypographyIcon, {
7683
+ color: getIconButtonTextColorByColor(color, disabled),
7684
+ icon: icon
7685
+ })
7686
+ })]
7687
+ }), withBadge ? /*#__PURE__*/jsx(View, {
7688
+ height: "10px",
7689
+ width: "10px",
7690
+ backgroundColor: lateOceanColorPalette['coral.10'],
7691
+ borderRadius: "kitt.iconButton.borderRadius",
7692
+ position: "absolute",
7693
+ top: "1px",
7694
+ right: "1px"
7695
+ }) : null, !withBadge && bagdeCount && bagdeCount > 0 ? /*#__PURE__*/jsx(View, {
7696
+ height: "20px",
7697
+ width: "20px",
7698
+ backgroundColor: lateOceanColorPalette['coral.10'],
7699
+ borderRadius: "kitt.iconButton.borderRadius",
7700
+ position: "absolute",
7701
+ top: "-6px",
7702
+ right: "-6px",
7703
+ children: /*#__PURE__*/jsx(View, {
7704
+ alignItems: "center",
7705
+ justifyContent: "center",
7706
+ marginTop: "2px",
7707
+ children: /*#__PURE__*/jsx(Typography.Text, {
7708
+ base: "body-xs",
7709
+ variant: "bold",
7710
+ color: "white",
7711
+ children: bagdeCount > 5 ? '+5' : bagdeCount
7712
+ })
7682
7713
  })
7683
- })]
7714
+ }) : null]
7684
7715
  });
7685
7716
  }
7686
7717
  });