@semcore/ellipsis 17.0.0-prerelease.19 → 17.0.0-prerelease.42
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/CHANGELOG.md +1 -1
- package/lib/esm/Ellipsis.mjs +2 -3
- package/package.json +8 -8
- package/tsconfig.json +3 -3
package/CHANGELOG.md
CHANGED
package/lib/esm/Ellipsis.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
import {
|
|
2
|
+
import { sstyled, Component, assignProps, createComponent } from "@semcore/core";
|
|
3
3
|
import { Box } from "@semcore/base-components";
|
|
4
4
|
import { callAllEventHandlers } from "@semcore/core/lib/utils/assignProps";
|
|
5
5
|
import findComponent, { isAdvanceMode } from "@semcore/core/lib/utils/findComponent";
|
|
@@ -12,7 +12,6 @@ import Tooltip from "@semcore/tooltip";
|
|
|
12
12
|
import React from "react";
|
|
13
13
|
import { useResizeObserver } from "./useResizeObserver.mjs";
|
|
14
14
|
import { isTextOverflowing, setFontSettings } from "./utils.mjs";
|
|
15
|
-
/*!__reshadow-styles__:"./style/ellipsis.shadow.css"*/
|
|
16
15
|
const style = (
|
|
17
16
|
/*__reshadow_css_start__*/
|
|
18
17
|
(sstyled.insert(
|
|
@@ -156,7 +155,7 @@ function EllipsisMiddle(props) {
|
|
|
156
155
|
const [symbolWidth, setSymbolWidth] = React.useState(0);
|
|
157
156
|
const blockWidth = useResizeObserver(resizeElement, containerRect).width;
|
|
158
157
|
useEnhancedEffect(() => {
|
|
159
|
-
const node =
|
|
158
|
+
const node = containerRef?.current || resizeElement?.current;
|
|
160
159
|
if (!node) return;
|
|
161
160
|
const styleElement = window.getComputedStyle(node);
|
|
162
161
|
const dateSpan = document.createElement("temporary-block");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/ellipsis",
|
|
3
3
|
"description": "Semrush Ellipsis Component",
|
|
4
|
-
"version": "17.0.0-prerelease.
|
|
4
|
+
"version": "17.0.0-prerelease.42",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -9,20 +9,20 @@
|
|
|
9
9
|
"author": "UI-KIT team <ui-kit-team@semrush.com>",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"exports": {
|
|
12
|
-
"
|
|
12
|
+
"types": "./lib/types/index.d.ts",
|
|
13
13
|
"import": "./lib/esm/index.mjs",
|
|
14
|
-
"
|
|
14
|
+
"require": "./lib/cjs/index.js"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/tooltip": "^17.0.0-prerelease.
|
|
17
|
+
"@semcore/tooltip": "^17.0.0-prerelease.42"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@semcore/base-components": "^17.0.0-
|
|
20
|
+
"@semcore/base-components": "^17.0.0 || ^17.0.0-0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@semcore/
|
|
24
|
-
"@semcore/base-components": "17.0.0-prerelease.
|
|
25
|
-
"@semcore/
|
|
23
|
+
"@semcore/testing-utils": "1.0.0",
|
|
24
|
+
"@semcore/base-components": "17.0.0-prerelease.42",
|
|
25
|
+
"@semcore/core": "17.0.0-prerelease.42"
|
|
26
26
|
},
|
|
27
27
|
"repository": {
|
|
28
28
|
"type": "git",
|
package/tsconfig.json
CHANGED