@versini/ui-truncate 6.0.3 → 6.1.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/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { JSX } from 'react/jsx-runtime';
2
2
 
3
- export declare const Truncate: ({ children, length, mode, focusMode, enableRichTruncation, }: TruncateProps) => JSX.Element;
3
+ export declare const Truncate: ({ children, length, mode, focusMode, enableRichTruncation, noBorder, }: TruncateProps) => JSX.Element;
4
4
 
5
5
  declare type TruncateProps = {
6
6
  /**
@@ -32,6 +32,11 @@ declare type TruncateProps = {
32
32
  * @default "system"
33
33
  */
34
34
  focusMode?: "dark" | "light" | "system" | "alt-system";
35
+ /**
36
+ * Whether or not to render the Button with a border.
37
+ * @default false
38
+ */
39
+ noBorder?: boolean;
35
40
  };
36
41
 
37
42
  export { }
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  /*!
2
- @versini/ui-truncate v6.0.3
2
+ @versini/ui-truncate v6.1.1
3
3
  © 2025 gizmette.com
4
4
  */
5
5
  try {
6
6
  if (!window.__VERSINI_UI_TRUNCATE__) {
7
7
  window.__VERSINI_UI_TRUNCATE__ = {
8
- version: "6.0.3",
9
- buildTime: "12/12/2025 10:31 AM EST",
8
+ version: "6.1.1",
9
+ buildTime: "12/13/2025 02:42 PM EST",
10
10
  homepage: "https://www.npmjs.com/package/@versini/ui-truncate",
11
11
  license: "MIT",
12
12
  };
@@ -136,7 +136,7 @@ const DEFAULT_LENGTH = 200;
136
136
  }
137
137
  /* c8 ignore next 1 */ return false; // Unsupported node types treated as non-block for spacing
138
138
  };
139
- const Truncate = ({ children, length = 200, mode = "system", focusMode = "system", enableRichTruncation = false })=>{
139
+ const Truncate = ({ children, length = 200, mode = "system", focusMode = "system", enableRichTruncation = false, noBorder = false })=>{
140
140
  const [isExpanded, setIsExpanded] = useState(false);
141
141
  const nonStringBypass = typeof children !== "string" && !enableRichTruncation;
142
142
  const fullText = useMemo(()=>{
@@ -196,6 +196,7 @@ const Truncate = ({ children, length = 200, mode = "system", focusMode = "system
196
196
  isTruncated && /*#__PURE__*/ jsx(Button, {
197
197
  mode: mode,
198
198
  focusMode: focusMode,
199
+ noBorder: noBorder,
199
200
  className: needsInlineSpacing ? "ml-2" : undefined,
200
201
  size: "small",
201
202
  onClick: handleToggleExpanded,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-truncate",
3
- "version": "6.0.3",
3
+ "version": "6.1.1",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -39,11 +39,11 @@
39
39
  "dependencies": {
40
40
  "@tailwindcss/typography": "0.5.19",
41
41
  "@testing-library/jest-dom": "6.9.1",
42
- "@versini/ui-button": "10.0.1",
42
+ "@versini/ui-button": "10.0.2",
43
43
  "tailwindcss": "4.1.18"
44
44
  },
45
45
  "sideEffects": [
46
46
  "**/*.css"
47
47
  ],
48
- "gitHead": "012dc1e7cb83b4a3d15b73dd78f9663b8616d8f9"
48
+ "gitHead": "3876da65ac31103a299bd68a2c7a6beb4b5e61e3"
49
49
  }