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