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