@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 +4 -4
- package/web/index.js +32 -2
- package/web/index.js.map +1 -1
- package/web/index.mjs +32 -2
- package/web/index.mjs.map +1 -1
package/web/index.mjs
CHANGED
|
@@ -3561,7 +3561,11 @@ var ADDITIONAL_BLOCKED_PROPS = /* @__PURE__ */ new Set([
|
|
|
3561
3561
|
"fontSize",
|
|
3562
3562
|
"fontWeight",
|
|
3563
3563
|
"fontFamily",
|
|
3564
|
-
"textDecoration"
|
|
3564
|
+
"textDecoration",
|
|
3565
|
+
// Cross-platform layout prop that Text consumes as CSS, never as an
|
|
3566
|
+
// attribute. Pinned explicitly because it is now spread into the styled
|
|
3567
|
+
// component rather than destructured away before it can reach the DOM.
|
|
3568
|
+
"numberOfLines"
|
|
3565
3569
|
]);
|
|
3566
3570
|
function shouldForwardProp(key) {
|
|
3567
3571
|
if (ADDITIONAL_BLOCKED_PROPS.has(key)) return false;
|
|
@@ -3766,6 +3770,30 @@ var Box = React3.forwardRef(
|
|
|
3766
3770
|
);
|
|
3767
3771
|
Box.displayName = "Box";
|
|
3768
3772
|
|
|
3773
|
+
// ../../foundation/primitives-web/src/textTruncation.ts
|
|
3774
|
+
var truncationStyles = (numberOfLines) => {
|
|
3775
|
+
if (!numberOfLines || numberOfLines < 1) return "";
|
|
3776
|
+
if (numberOfLines === 1) {
|
|
3777
|
+
return `
|
|
3778
|
+
display: block;
|
|
3779
|
+
max-width: 100%;
|
|
3780
|
+
min-width: 0;
|
|
3781
|
+
overflow: hidden;
|
|
3782
|
+
text-overflow: ellipsis;
|
|
3783
|
+
white-space: nowrap;
|
|
3784
|
+
`;
|
|
3785
|
+
}
|
|
3786
|
+
return `
|
|
3787
|
+
display: -webkit-box;
|
|
3788
|
+
-webkit-box-orient: vertical;
|
|
3789
|
+
-webkit-line-clamp: ${numberOfLines};
|
|
3790
|
+
line-clamp: ${numberOfLines};
|
|
3791
|
+
max-width: 100%;
|
|
3792
|
+
min-width: 0;
|
|
3793
|
+
overflow: hidden;
|
|
3794
|
+
`;
|
|
3795
|
+
};
|
|
3796
|
+
|
|
3769
3797
|
// ../../foundation/primitives-web/src/Text.tsx
|
|
3770
3798
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
3771
3799
|
var FilteredSpan = createFilteredElement("span");
|
|
@@ -3778,6 +3806,9 @@ var StyledText = styled_components_esm_default(FilteredSpan)`
|
|
|
3778
3806
|
white-space: ${(props) => props.whiteSpace || "normal"};
|
|
3779
3807
|
text-align: ${(props) => props.textAlign || "inherit"};
|
|
3780
3808
|
text-decoration: ${(props) => props.textDecoration || "none"};
|
|
3809
|
+
|
|
3810
|
+
/* Keep last: single-line truncation has to win over white-space above. */
|
|
3811
|
+
${(props) => truncationStyles(props.numberOfLines)}
|
|
3781
3812
|
`;
|
|
3782
3813
|
var Text = ({
|
|
3783
3814
|
style,
|
|
@@ -3786,7 +3817,6 @@ var Text = ({
|
|
|
3786
3817
|
role,
|
|
3787
3818
|
testID,
|
|
3788
3819
|
"data-testid": dataTestId,
|
|
3789
|
-
numberOfLines: _numberOfLines,
|
|
3790
3820
|
...props
|
|
3791
3821
|
}) => {
|
|
3792
3822
|
return /* @__PURE__ */ jsx2(
|