@razorpay/blade 10.4.2 → 10.4.4

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.
@@ -17151,7 +17151,7 @@ var LinkOverlay = /*#__PURE__*/styled.a.withConfig({
17151
17151
  position: 'absolute',
17152
17152
  top: 0,
17153
17153
  left: 0,
17154
- zIndex: 0,
17154
+ zIndex: 1,
17155
17155
  width: '100%',
17156
17156
  height: '100%'
17157
17157
  }
@@ -17161,6 +17161,7 @@ var LinkOverlay = /*#__PURE__*/styled.a.withConfig({
17161
17161
  // used for interactive card scale down animation
17162
17162
  var CARD_SCALE_DOWN_VALUE = 0.95;
17163
17163
  var CARD_SCALE_UP_VALUE = 1.05;
17164
+ var CARD_LINK_OVERLAY_ID = 'card-link-overlay';
17164
17165
 
17165
17166
  var useIsMobile = function useIsMobile() {
17166
17167
  var _useTheme = useTheme(),
@@ -17179,6 +17180,7 @@ var StyledCardRoot = /*#__PURE__*/styled(BaseBox).withConfig({
17179
17180
  displayName: "CardRootweb__StyledCardRoot",
17180
17181
  componentId: "sc-1nb70ck-0"
17181
17182
  })(function (_ref) {
17183
+ var _objectSpread2;
17182
17184
  var theme = _ref.theme,
17183
17185
  isSelected = _ref.isSelected,
17184
17186
  isFocused = _ref.isFocused,
@@ -17201,14 +17203,13 @@ var StyledCardRoot = /*#__PURE__*/styled(BaseBox).withConfig({
17201
17203
  '&:hover': {
17202
17204
  transform: "scale(".concat(CARD_SCALE_UP_VALUE, ")")
17203
17205
  }
17204
- }), {}, {
17205
- // uplift all the nested links so they receive clicks and events (except the LinkOverlay)
17206
- // https://www.sarasoueidan.com/blog/nested-links
17207
- '& a[href]:not(a[data-blade-component="card-link-overlay"])': {
17208
- zIndex: 1,
17209
- position: 'relative'
17210
- }
17211
- });
17206
+ }), {}, (_objectSpread2 = {}, _defineProperty$1(_objectSpread2, "& a[href]:not(a[data-blade-component=\"".concat(CARD_LINK_OVERLAY_ID, "\"])"), {
17207
+ zIndex: 2,
17208
+ position: 'relative'
17209
+ }), _defineProperty$1(_objectSpread2, "& button:not(button[data-blade-component=\"".concat(CARD_LINK_OVERLAY_ID, "\"])"), {
17210
+ zIndex: 2,
17211
+ position: 'relative'
17212
+ }), _objectSpread2));
17212
17213
  });
17213
17214
  var CardRoot = function CardRoot(_ref2) {
17214
17215
  var as = _ref2.as,
@@ -17224,7 +17225,7 @@ var CardRoot = function CardRoot(_ref2) {
17224
17225
  as: as
17225
17226
  }, props), {}, {
17226
17227
  isMobile: isMobile,
17227
- isPressed: isPressed,
17228
+ isPressed: props.shouldScaleOnHover ? isPressed : false,
17228
17229
  onTouchStart: function onTouchStart() {
17229
17230
  return setIsPressed(true);
17230
17231
  },
@@ -17291,7 +17292,7 @@ var Card = function Card(_ref) {
17291
17292
  setIsFocused = _React$useState2[1];
17292
17293
  useVerifyAllowedComponents(children, 'Card', [ComponentIds$1.CardHeader, ComponentIds$1.CardBody, ComponentIds$1.CardFooter]);
17293
17294
  var linkOverlayProps = _objectSpread$1c(_objectSpread$1c(_objectSpread$1c({}, metaAttribute({
17294
- name: 'card-link-overlay'
17295
+ name: CARD_LINK_OVERLAY_ID
17295
17296
  })), makeAccessible({
17296
17297
  label: accessibilityLabel,
17297
17298
  pressed: isSelected
@@ -25557,17 +25558,13 @@ var _Amount = function _Amount(_ref4) {
25557
25558
  var currencyWeight = getCurrencyWeight(isAffixSubtle, size);
25558
25559
  var isReactNative = getPlatformType() === 'react-native';
25559
25560
  return /*#__PURE__*/jsx(BaseBox, _objectSpread$j(_objectSpread$j(_objectSpread$j({
25560
- display: isReactNative ? castNativeType('flex') : castWebType('inline-flex')
25561
+ display: isReactNative ? 'flex' : 'inline-flex'
25561
25562
  }, metaAttribute({
25562
25563
  name: MetaConstants.Amount,
25563
25564
  testID: testID
25564
25565
  })), getStyledProps(styledProps)), {}, {
25565
25566
  children: /*#__PURE__*/jsxs(BaseBox, {
25566
- paddingLeft: "spacing.2",
25567
- paddingRight: "spacing.2"
25568
- // @TODO: fix casting of platform types. currently they all become `never` type
25569
- ,
25570
- display: isReactNative ? castNativeType('flex') : castWebType('inline-flex'),
25567
+ display: isReactNative ? 'flex' : 'inline-flex',
25571
25568
  alignItems: "baseline",
25572
25569
  flexDirection: "row",
25573
25570
  children: [/*#__PURE__*/jsx(BaseText, {