@versini/ui-truncate 4.0.13 → 4.0.15
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/README.md +1 -2
- package/dist/components/Truncate/Truncate.js +9 -9
- package/dist/index.js +3 -3
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
|
|
7
7
|
The Truncate component provides intelligent text truncation with toggle functionality for managing long text content. Perfect for article previews, descriptions, and any content that needs length management.
|
|
8
8
|
|
|
9
|
-
|
|
10
9
|
## Table of Contents
|
|
11
10
|
|
|
12
11
|
- [Features](#features)
|
|
@@ -28,7 +27,7 @@ The Truncate component provides intelligent text truncation with toggle function
|
|
|
28
27
|
npm install @versini/ui-truncate
|
|
29
28
|
```
|
|
30
29
|
|
|
31
|
-
> **Note**: This component requires TailwindCSS and the `@versini/ui-styles` plugin for proper styling. See the [
|
|
30
|
+
> **Note**: This component requires TailwindCSS and the `@versini/ui-styles` plugin for proper styling. See the [installation documentation](https://versini-org.github.io/ui-components/?path=/docs/getting-started-installation--docs) for complete setup instructions.
|
|
32
31
|
|
|
33
32
|
## Usage
|
|
34
33
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as m, jsxs as q } from "react/jsx-runtime";
|
|
2
|
-
import E, { useRef as w, useLayoutEffect as F, useEffect as A, useState as G, useMemo as
|
|
2
|
+
import E, { useRef as w, useLayoutEffect as F, useEffect as A, useState as G, useMemo as V, useCallback as ae } from "react";
|
|
3
3
|
import n from "clsx";
|
|
4
4
|
const H = "av-button", I = "icon", O = "button", j = "link", ie = ({
|
|
5
5
|
type: e,
|
|
@@ -276,7 +276,7 @@ const H = "av-button", I = "icon", O = "button", j = "link", ie = ({
|
|
|
276
276
|
animated: e
|
|
277
277
|
}) => n({
|
|
278
278
|
"transition-opacity duration-300 ease-in-out": e
|
|
279
|
-
}),
|
|
279
|
+
}), P = ({
|
|
280
280
|
type: e,
|
|
281
281
|
className: t,
|
|
282
282
|
raw: r,
|
|
@@ -357,7 +357,7 @@ const J = E.forwardRef(
|
|
|
357
357
|
radius: u = "large",
|
|
358
358
|
...d
|
|
359
359
|
}, g) => {
|
|
360
|
-
const N =
|
|
360
|
+
const N = P({
|
|
361
361
|
type: O,
|
|
362
362
|
mode: r,
|
|
363
363
|
focusMode: a,
|
|
@@ -391,7 +391,7 @@ function be() {
|
|
|
391
391
|
}), []), ae(() => e.current, []);
|
|
392
392
|
}
|
|
393
393
|
function fe(e) {
|
|
394
|
-
return
|
|
394
|
+
return V(() => e.every((t) => t == null) ? () => {
|
|
395
395
|
} : (t) => {
|
|
396
396
|
e.forEach((r) => {
|
|
397
397
|
typeof r == "function" ? r(t) : r != null && (r.current = t);
|
|
@@ -409,7 +409,7 @@ const ve = {
|
|
|
409
409
|
right: 0
|
|
410
410
|
};
|
|
411
411
|
function M(e) {
|
|
412
|
-
const t = be(), r = w(0), a = w(null), [i, o] = G(ve), s =
|
|
412
|
+
const t = be(), r = w(0), a = w(null), [i, o] = G(ve), s = V(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((l) => {
|
|
413
413
|
const c = l[0];
|
|
414
414
|
c && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
415
415
|
a.current && t() && o(c.contentRect);
|
|
@@ -457,7 +457,7 @@ const C = {
|
|
|
457
457
|
animated: f = !1,
|
|
458
458
|
...X
|
|
459
459
|
}, Y) => {
|
|
460
|
-
const Z =
|
|
460
|
+
const Z = P({
|
|
461
461
|
type: I,
|
|
462
462
|
mode: r,
|
|
463
463
|
focusMode: a,
|
|
@@ -547,13 +547,13 @@ const C = {
|
|
|
547
547
|
);
|
|
548
548
|
K.displayName = "ButtonIcon";
|
|
549
549
|
/*!
|
|
550
|
-
@versini/ui-button v7.1.
|
|
550
|
+
@versini/ui-button v7.1.4
|
|
551
551
|
© 2025 gizmette.com
|
|
552
552
|
*/
|
|
553
553
|
try {
|
|
554
554
|
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
555
|
-
version: "7.1.
|
|
556
|
-
buildTime: "08/
|
|
555
|
+
version: "7.1.4",
|
|
556
|
+
buildTime: "08/23/2025 10:05 AM EDT",
|
|
557
557
|
homepage: "https://github.com/aversini/ui-components",
|
|
558
558
|
license: "MIT"
|
|
559
559
|
});
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Truncate as o } from "./components/Truncate/Truncate.js";
|
|
2
2
|
/*!
|
|
3
|
-
@versini/ui-truncate v4.0.
|
|
3
|
+
@versini/ui-truncate v4.0.15
|
|
4
4
|
© 2025 gizmette.com
|
|
5
5
|
*/
|
|
6
6
|
try {
|
|
7
7
|
window.__VERSINI_UI_TRUNCATE__ || (window.__VERSINI_UI_TRUNCATE__ = {
|
|
8
|
-
version: "4.0.
|
|
9
|
-
buildTime: "08/
|
|
8
|
+
version: "4.0.15",
|
|
9
|
+
buildTime: "08/23/2025 10:07 AM EDT",
|
|
10
10
|
homepage: "https://github.com/aversini/ui-components",
|
|
11
11
|
license: "MIT"
|
|
12
12
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-truncate",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.15",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"main": "dist/index.js",
|
|
16
16
|
"types": "dist/index.d.ts",
|
|
17
17
|
"files": [
|
|
18
|
-
"dist"
|
|
18
|
+
"dist",
|
|
19
|
+
"README.md"
|
|
19
20
|
],
|
|
20
21
|
"scripts": {
|
|
21
22
|
"build:check": "tsc",
|
|
@@ -41,12 +42,12 @@
|
|
|
41
42
|
},
|
|
42
43
|
"dependencies": {
|
|
43
44
|
"@tailwindcss/typography": "0.5.16",
|
|
44
|
-
"@testing-library/jest-dom": "6.
|
|
45
|
+
"@testing-library/jest-dom": "6.8.0",
|
|
45
46
|
"@versini/ui-button": "../ui-button",
|
|
46
47
|
"tailwindcss": "4.1.12"
|
|
47
48
|
},
|
|
48
49
|
"sideEffects": [
|
|
49
50
|
"**/*.css"
|
|
50
51
|
],
|
|
51
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "a1afd6e4613b1da7abf61d10a72614611521fb39"
|
|
52
53
|
}
|