@razorpay/blade 6.6.1 → 6.6.2

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.
@@ -18933,7 +18933,7 @@ var getProps = function getProps(_ref2) {
18933
18933
  isVisited: isVisited
18934
18934
  }),
18935
18935
  fontSize: size === 'medium' ? 100 : 75,
18936
- lineHeight: size === 'medium' ? 'm' : 's',
18936
+ lineHeight: size === 'medium' ? 'l' : 's',
18937
18937
  iconSize: size,
18938
18938
  iconPadding: children !== null && children !== void 0 && children.trim() ? 'spacing.2' : 'spacing.0',
18939
18939
  textColor: getColorToken({
@@ -23482,11 +23482,40 @@ var StyledListItem = /*#__PURE__*/styled(ListItemElement).withConfig({
23482
23482
  };
23483
23483
  });
23484
23484
 
23485
- var _ListItem = function _ListItem(_ref2) {
23485
+ var ListItemContentChildren = function ListItemContentChildren(_ref2) {
23486
23486
  var children = _ref2.children,
23487
- Icon = _ref2.icon,
23488
- _itemNumber = _ref2._itemNumber,
23489
- testID = _ref2.testID;
23487
+ size = _ref2.size;
23488
+
23489
+ /* Having a <View><Text>...</Text><View/> inside <Text /> breaks vertical alignment. Issue: https://github.com/facebook/react-native/issues/31955
23490
+ As a workaround, we wrap individual strings in their own <Text /> and handle alignment with a parent <View> (BaseBox).
23491
+ */
23492
+ return getPlatformType() === 'react-native' ? /*#__PURE__*/jsx(BaseBox, {
23493
+ display: "flex",
23494
+ flexDirection: "row",
23495
+ flexWrap: "wrap",
23496
+ children: children.map(function (child) {
23497
+ if (typeof child === 'string') {
23498
+ return /*#__PURE__*/jsx(Text, {
23499
+ variant: "body",
23500
+ size: size,
23501
+ children: child
23502
+ });
23503
+ }
23504
+
23505
+ return child;
23506
+ })
23507
+ }) : /*#__PURE__*/jsx(Text, {
23508
+ variant: "body",
23509
+ size: size,
23510
+ children: children
23511
+ });
23512
+ };
23513
+
23514
+ var _ListItem = function _ListItem(_ref3) {
23515
+ var children = _ref3.children,
23516
+ Icon = _ref3.icon,
23517
+ _itemNumber = _ref3._itemNumber,
23518
+ testID = _ref3.testID;
23490
23519
 
23491
23520
  var _useListContext = useListContext(),
23492
23521
  level = _useListContext.level,
@@ -23565,8 +23594,7 @@ var _ListItem = function _ListItem(_ref2) {
23565
23594
  level: level !== null && level !== void 0 ? level : 1
23566
23595
  })).concat(variant === 'ordered' ? '.' : '')
23567
23596
  })
23568
- }), /*#__PURE__*/jsx(Text, {
23569
- variant: "body",
23597
+ }), /*#__PURE__*/jsx(ListItemContentChildren, {
23570
23598
  size: size,
23571
23599
  children: validChildItem
23572
23600
  })]