@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
|
@@ -8488,6 +8488,8 @@ function IconButton({
|
|
|
8488
8488
|
testID,
|
|
8489
8489
|
ariaLabel,
|
|
8490
8490
|
accessibilityRole = 'button',
|
|
8491
|
+
withBadge,
|
|
8492
|
+
bagdeCount,
|
|
8491
8493
|
isHoveredInternal,
|
|
8492
8494
|
isPressedInternal,
|
|
8493
8495
|
isFocusedInternal,
|
|
@@ -8529,26 +8531,55 @@ function IconButton({
|
|
|
8529
8531
|
}) => {
|
|
8530
8532
|
const isCurrentHovered = isHovered || isHoveredInternal;
|
|
8531
8533
|
const isCurrentPressed = isPressed || isPressedInternal;
|
|
8532
|
-
return /*#__PURE__*/jsxRuntime.jsxs(
|
|
8533
|
-
|
|
8534
|
-
isHovered: isCurrentHovered,
|
|
8535
|
-
isPressed: isCurrentPressed,
|
|
8536
|
-
scaleStyles: scaleStyles,
|
|
8537
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(AnimatedBackground, {
|
|
8538
|
-
color: color,
|
|
8534
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8535
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(AnimatedScale, {
|
|
8539
8536
|
isDisabled: disabled,
|
|
8540
8537
|
isHovered: isCurrentHovered,
|
|
8541
8538
|
isPressed: isCurrentPressed,
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8546
|
-
|
|
8547
|
-
|
|
8548
|
-
|
|
8549
|
-
|
|
8539
|
+
scaleStyles: scaleStyles,
|
|
8540
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(AnimatedBackground, {
|
|
8541
|
+
color: color,
|
|
8542
|
+
isDisabled: disabled,
|
|
8543
|
+
isHovered: isCurrentHovered,
|
|
8544
|
+
isPressed: isCurrentPressed,
|
|
8545
|
+
isFocused: isFocused || isFocusedInternal,
|
|
8546
|
+
opacityStyles: opacityStyles
|
|
8547
|
+
}), /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
8548
|
+
alignItems: "center",
|
|
8549
|
+
justifyContent: "center",
|
|
8550
|
+
children: /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
|
|
8551
|
+
color: getIconButtonTextColorByColor(color, disabled),
|
|
8552
|
+
icon: icon
|
|
8553
|
+
})
|
|
8554
|
+
})]
|
|
8555
|
+
}), withBadge ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
8556
|
+
height: "10px",
|
|
8557
|
+
width: "10px",
|
|
8558
|
+
backgroundColor: lateOceanColorPalette['coral.10'],
|
|
8559
|
+
borderRadius: "kitt.iconButton.borderRadius",
|
|
8560
|
+
position: "absolute",
|
|
8561
|
+
top: "1px",
|
|
8562
|
+
right: "1px"
|
|
8563
|
+
}) : null, !withBadge && bagdeCount && bagdeCount > 0 ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
8564
|
+
height: "20px",
|
|
8565
|
+
width: "20px",
|
|
8566
|
+
backgroundColor: lateOceanColorPalette['coral.10'],
|
|
8567
|
+
borderRadius: "kitt.iconButton.borderRadius",
|
|
8568
|
+
position: "absolute",
|
|
8569
|
+
top: "-6px",
|
|
8570
|
+
right: "-6px",
|
|
8571
|
+
children: /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
8572
|
+
alignItems: "center",
|
|
8573
|
+
justifyContent: "center",
|
|
8574
|
+
marginTop: "2px",
|
|
8575
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
8576
|
+
base: "body-xs",
|
|
8577
|
+
variant: "bold",
|
|
8578
|
+
color: "white",
|
|
8579
|
+
children: bagdeCount > 5 ? '+5' : bagdeCount
|
|
8580
|
+
})
|
|
8550
8581
|
})
|
|
8551
|
-
})]
|
|
8582
|
+
}) : null]
|
|
8552
8583
|
});
|
|
8553
8584
|
}
|
|
8554
8585
|
});
|