@apify/ui-library 1.101.0 → 1.101.1
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/dist/src/utils/css_utils.d.ts +7 -0
- package/dist/src/utils/css_utils.d.ts.map +1 -0
- package/dist/src/utils/css_utils.js +17 -0
- package/dist/src/utils/css_utils.js.map +1 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/src/utils/index.js +1 -0
- package/dist/src/utils/index.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/utils/css_utils.ts +17 -0
- package/src/utils/index.ts +1 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* To be used in any styled-component styles to limit the number of visible lines of a given text
|
|
3
|
+
* @param nLines number of lines to show
|
|
4
|
+
* @returns css rules to clamp the lines of any text at the given nLines
|
|
5
|
+
*/
|
|
6
|
+
export declare function clampLines(nLines: number): import("styled-components").FlattenSimpleInterpolation;
|
|
7
|
+
//# sourceMappingURL=css_utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css_utils.d.ts","sourceRoot":"","sources":["../../../src/utils/css_utils.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,0DASxC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { css } from 'styled-components';
|
|
2
|
+
/**
|
|
3
|
+
* To be used in any styled-component styles to limit the number of visible lines of a given text
|
|
4
|
+
* @param nLines number of lines to show
|
|
5
|
+
* @returns css rules to clamp the lines of any text at the given nLines
|
|
6
|
+
*/
|
|
7
|
+
export function clampLines(nLines) {
|
|
8
|
+
return css `
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
text-overflow: ellipsis;
|
|
11
|
+
display: -webkit-box;
|
|
12
|
+
-webkit-line-clamp: ${nLines};
|
|
13
|
+
line-clamp: ${nLines};
|
|
14
|
+
-webkit-box-orient: vertical;
|
|
15
|
+
`;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=css_utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css_utils.js","sourceRoot":"","sources":["../../../src/utils/css_utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,MAAc;IACrC,OAAO,GAAG,CAAA;;;;8BAIgB,MAAM;sBACd,MAAM;;KAEvB,CAAC;AACN,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC"}
|
package/dist/src/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC"}
|