@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.
@@ -17436,7 +17436,7 @@ var LinkOverlay = /*#__PURE__*/styled.a.withConfig({
17436
17436
  position: 'absolute',
17437
17437
  top: 0,
17438
17438
  left: 0,
17439
- zIndex: 0,
17439
+ zIndex: 1,
17440
17440
  width: '100%',
17441
17441
  height: '100%'
17442
17442
  }
@@ -17446,6 +17446,7 @@ var LinkOverlay = /*#__PURE__*/styled.a.withConfig({
17446
17446
  // used for interactive card scale down animation
17447
17447
  var CARD_SCALE_DOWN_VALUE = 0.95;
17448
17448
  var CARD_SCALE_UP_VALUE = 1.05;
17449
+ var CARD_LINK_OVERLAY_ID = 'card-link-overlay';
17449
17450
 
17450
17451
  var useIsMobile = function useIsMobile() {
17451
17452
  var _useTheme = useTheme(),
@@ -17464,6 +17465,7 @@ var StyledCardRoot = /*#__PURE__*/styled(BaseBox).withConfig({
17464
17465
  displayName: "CardRootweb__StyledCardRoot",
17465
17466
  componentId: "sc-1nb70ck-0"
17466
17467
  })(function (_ref) {
17468
+ var _objectSpread2;
17467
17469
  var theme = _ref.theme,
17468
17470
  isSelected = _ref.isSelected,
17469
17471
  isFocused = _ref.isFocused,
@@ -17486,14 +17488,13 @@ var StyledCardRoot = /*#__PURE__*/styled(BaseBox).withConfig({
17486
17488
  '&:hover': {
17487
17489
  transform: "scale(".concat(CARD_SCALE_UP_VALUE, ")")
17488
17490
  }
17489
- }), {}, {
17490
- // uplift all the nested links so they receive clicks and events (except the LinkOverlay)
17491
- // https://www.sarasoueidan.com/blog/nested-links
17492
- '& a[href]:not(a[data-blade-component="card-link-overlay"])': {
17493
- zIndex: 1,
17494
- position: 'relative'
17495
- }
17496
- });
17491
+ }), {}, (_objectSpread2 = {}, _defineProperty$1(_objectSpread2, "& a[href]:not(a[data-blade-component=\"".concat(CARD_LINK_OVERLAY_ID, "\"])"), {
17492
+ zIndex: 2,
17493
+ position: 'relative'
17494
+ }), _defineProperty$1(_objectSpread2, "& button:not(button[data-blade-component=\"".concat(CARD_LINK_OVERLAY_ID, "\"])"), {
17495
+ zIndex: 2,
17496
+ position: 'relative'
17497
+ }), _objectSpread2));
17497
17498
  });
17498
17499
  var CardRoot = function CardRoot(_ref2) {
17499
17500
  var as = _ref2.as,
@@ -17509,7 +17510,7 @@ var CardRoot = function CardRoot(_ref2) {
17509
17510
  as: as
17510
17511
  }, props), {}, {
17511
17512
  isMobile: isMobile,
17512
- isPressed: isPressed,
17513
+ isPressed: props.shouldScaleOnHover ? isPressed : false,
17513
17514
  onTouchStart: function onTouchStart() {
17514
17515
  return setIsPressed(true);
17515
17516
  },
@@ -17576,7 +17577,7 @@ var Card = function Card(_ref) {
17576
17577
  setIsFocused = _React$useState2[1];
17577
17578
  useVerifyAllowedComponents(children, 'Card', [ComponentIds$1.CardHeader, ComponentIds$1.CardBody, ComponentIds$1.CardFooter]);
17578
17579
  var linkOverlayProps = _objectSpread$1c(_objectSpread$1c(_objectSpread$1c({}, metaAttribute({
17579
- name: 'card-link-overlay'
17580
+ name: CARD_LINK_OVERLAY_ID
17580
17581
  })), makeAccessible({
17581
17582
  label: accessibilityLabel,
17582
17583
  pressed: isSelected
@@ -26019,17 +26020,13 @@ var _Amount = function _Amount(_ref4) {
26019
26020
  var currencyWeight = getCurrencyWeight(isAffixSubtle, size);
26020
26021
  var isReactNative = getPlatformType() === 'react-native';
26021
26022
  return /*#__PURE__*/jsx(BaseBox, _objectSpread$j(_objectSpread$j(_objectSpread$j({
26022
- display: isReactNative ? castNativeType('flex') : castWebType('inline-flex')
26023
+ display: isReactNative ? 'flex' : 'inline-flex'
26023
26024
  }, metaAttribute({
26024
26025
  name: MetaConstants.Amount,
26025
26026
  testID: testID
26026
26027
  })), getStyledProps(styledProps)), {}, {
26027
26028
  children: /*#__PURE__*/jsxs(BaseBox, {
26028
- paddingLeft: "spacing.2",
26029
- paddingRight: "spacing.2"
26030
- // @TODO: fix casting of platform types. currently they all become `never` type
26031
- ,
26032
- display: isReactNative ? castNativeType('flex') : castWebType('inline-flex'),
26029
+ display: isReactNative ? 'flex' : 'inline-flex',
26033
26030
  alignItems: "baseline",
26034
26031
  flexDirection: "row",
26035
26032
  children: [/*#__PURE__*/jsx(BaseText, {