@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.
package/dist/index.es.js CHANGED
@@ -8745,6 +8745,8 @@ function IconButton(_ref) {
8745
8745
  ariaLabel = _ref.ariaLabel,
8746
8746
  _ref$accessibilityRol = _ref.accessibilityRole,
8747
8747
  accessibilityRole = _ref$accessibilityRol === void 0 ? 'button' : _ref$accessibilityRol,
8748
+ withBadge = _ref.withBadge,
8749
+ bagdeCount = _ref.bagdeCount,
8748
8750
  isHoveredInternal = _ref.isHoveredInternal,
8749
8751
  isPressedInternal = _ref.isPressedInternal,
8750
8752
  isFocusedInternal = _ref.isFocusedInternal,
@@ -8783,26 +8785,55 @@ function IconButton(_ref) {
8783
8785
  isFocused = _ref2.isFocused;
8784
8786
  var isCurrentHovered = isHovered || isHoveredInternal;
8785
8787
  var isCurrentPressed = isPressed || isPressedInternal;
8786
- return /*#__PURE__*/jsxs(AnimatedScale, {
8787
- isDisabled: disabled,
8788
- isHovered: isCurrentHovered,
8789
- isPressed: isCurrentPressed,
8790
- scaleStyles: scaleStyles,
8791
- children: [/*#__PURE__*/jsx(AnimatedBackground, {
8792
- color: color,
8788
+ return /*#__PURE__*/jsxs(Fragment, {
8789
+ children: [/*#__PURE__*/jsxs(AnimatedScale, {
8793
8790
  isDisabled: disabled,
8794
8791
  isHovered: isCurrentHovered,
8795
8792
  isPressed: isCurrentPressed,
8796
- isFocused: isFocused || isFocusedInternal,
8797
- opacityStyles: opacityStyles
8798
- }), /*#__PURE__*/jsx(View, {
8799
- alignItems: "center",
8800
- justifyContent: "center",
8801
- children: /*#__PURE__*/jsx(TypographyIcon, {
8802
- color: getIconButtonTextColorByColor(color, disabled),
8803
- icon: icon
8793
+ scaleStyles: scaleStyles,
8794
+ children: [/*#__PURE__*/jsx(AnimatedBackground, {
8795
+ color: color,
8796
+ isDisabled: disabled,
8797
+ isHovered: isCurrentHovered,
8798
+ isPressed: isCurrentPressed,
8799
+ isFocused: isFocused || isFocusedInternal,
8800
+ opacityStyles: opacityStyles
8801
+ }), /*#__PURE__*/jsx(View, {
8802
+ alignItems: "center",
8803
+ justifyContent: "center",
8804
+ children: /*#__PURE__*/jsx(TypographyIcon, {
8805
+ color: getIconButtonTextColorByColor(color, disabled),
8806
+ icon: icon
8807
+ })
8808
+ })]
8809
+ }), withBadge ? /*#__PURE__*/jsx(View, {
8810
+ height: "10px",
8811
+ width: "10px",
8812
+ backgroundColor: lateOceanColorPalette['coral.10'],
8813
+ borderRadius: "kitt.iconButton.borderRadius",
8814
+ position: "absolute",
8815
+ top: "1px",
8816
+ right: "1px"
8817
+ }) : null, !withBadge && bagdeCount && bagdeCount > 0 ? /*#__PURE__*/jsx(View, {
8818
+ height: "20px",
8819
+ width: "20px",
8820
+ backgroundColor: lateOceanColorPalette['coral.10'],
8821
+ borderRadius: "kitt.iconButton.borderRadius",
8822
+ position: "absolute",
8823
+ top: "-6px",
8824
+ right: "-6px",
8825
+ children: /*#__PURE__*/jsx(View, {
8826
+ alignItems: "center",
8827
+ justifyContent: "center",
8828
+ marginTop: "2px",
8829
+ children: /*#__PURE__*/jsx(Typography.Text, {
8830
+ base: "body-xs",
8831
+ variant: "bold",
8832
+ color: "white",
8833
+ children: bagdeCount > 5 ? '+5' : bagdeCount
8834
+ })
8804
8835
  })
8805
- })]
8836
+ }) : null]
8806
8837
  });
8807
8838
  }
8808
8839
  });