@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/CHANGELOG.md +9 -0
- package/dist/definitions/IconButton/IconButton.d.ts +3 -1
- package/dist/definitions/IconButton/IconButton.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +47 -16
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +47 -16
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-20.10.cjs.js +47 -16
- package/dist/index-node-20.10.cjs.js.map +1 -1
- package/dist/index-node-20.10.cjs.web.js +47 -16
- package/dist/index-node-20.10.cjs.web.js.map +1 -1
- package/dist/index-node-20.10.es.mjs +47 -16
- package/dist/index-node-20.10.es.mjs.map +1 -1
- package/dist/index-node-20.10.es.web.mjs +47 -16
- package/dist/index-node-20.10.es.web.mjs.map +1 -1
- package/dist/index.es.js +47 -16
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +47 -16
- package/dist/index.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -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(
|
|
7665
|
-
|
|
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
|
-
|
|
7675
|
-
|
|
7676
|
-
|
|
7677
|
-
|
|
7678
|
-
|
|
7679
|
-
|
|
7680
|
-
|
|
7681
|
-
|
|
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
|
});
|