@xsolla/xui-b2c-transaction-cell 0.196.0 → 0.197.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-b2c-transaction-cell",
3
- "version": "0.196.0",
3
+ "version": "0.197.0",
4
4
  "main": "./web/index.js",
5
5
  "module": "./web/index.mjs",
6
6
  "types": "./web/index.d.ts",
@@ -13,9 +13,9 @@
13
13
  "test:coverage": "vitest run --coverage"
14
14
  },
15
15
  "dependencies": {
16
- "@xsolla/xui-core": "0.196.0",
17
- "@xsolla/xui-icons": "0.196.0",
18
- "@xsolla/xui-primitives-core": "0.196.0"
16
+ "@xsolla/xui-core": "0.197.0",
17
+ "@xsolla/xui-icons": "0.197.0",
18
+ "@xsolla/xui-primitives-core": "0.197.0"
19
19
  },
20
20
  "peerDependencies": {
21
21
  "react": ">=16.8.0"
package/web/index.js CHANGED
@@ -3574,7 +3574,11 @@ var ADDITIONAL_BLOCKED_PROPS = /* @__PURE__ */ new Set([
3574
3574
  "fontSize",
3575
3575
  "fontWeight",
3576
3576
  "fontFamily",
3577
- "textDecoration"
3577
+ "textDecoration",
3578
+ // Cross-platform layout prop that Text consumes as CSS, never as an
3579
+ // attribute. Pinned explicitly because it is now spread into the styled
3580
+ // component rather than destructured away before it can reach the DOM.
3581
+ "numberOfLines"
3578
3582
  ]);
3579
3583
  function shouldForwardProp(key) {
3580
3584
  if (ADDITIONAL_BLOCKED_PROPS.has(key)) return false;
@@ -3779,6 +3783,30 @@ var Box = import_react3.default.forwardRef(
3779
3783
  );
3780
3784
  Box.displayName = "Box";
3781
3785
 
3786
+ // ../../foundation/primitives-web/src/textTruncation.ts
3787
+ var truncationStyles = (numberOfLines) => {
3788
+ if (!numberOfLines || numberOfLines < 1) return "";
3789
+ if (numberOfLines === 1) {
3790
+ return `
3791
+ display: block;
3792
+ max-width: 100%;
3793
+ min-width: 0;
3794
+ overflow: hidden;
3795
+ text-overflow: ellipsis;
3796
+ white-space: nowrap;
3797
+ `;
3798
+ }
3799
+ return `
3800
+ display: -webkit-box;
3801
+ -webkit-box-orient: vertical;
3802
+ -webkit-line-clamp: ${numberOfLines};
3803
+ line-clamp: ${numberOfLines};
3804
+ max-width: 100%;
3805
+ min-width: 0;
3806
+ overflow: hidden;
3807
+ `;
3808
+ };
3809
+
3782
3810
  // ../../foundation/primitives-web/src/Text.tsx
3783
3811
  var import_jsx_runtime2 = require("react/jsx-runtime");
3784
3812
  var FilteredSpan = createFilteredElement("span");
@@ -3791,6 +3819,9 @@ var StyledText = styled_components_esm_default(FilteredSpan)`
3791
3819
  white-space: ${(props) => props.whiteSpace || "normal"};
3792
3820
  text-align: ${(props) => props.textAlign || "inherit"};
3793
3821
  text-decoration: ${(props) => props.textDecoration || "none"};
3822
+
3823
+ /* Keep last: single-line truncation has to win over white-space above. */
3824
+ ${(props) => truncationStyles(props.numberOfLines)}
3794
3825
  `;
3795
3826
  var Text = ({
3796
3827
  style,
@@ -3799,7 +3830,6 @@ var Text = ({
3799
3830
  role,
3800
3831
  testID,
3801
3832
  "data-testid": dataTestId,
3802
- numberOfLines: _numberOfLines,
3803
3833
  ...props
3804
3834
  }) => {
3805
3835
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(