@versini/ui-truncate 3.0.28 → 3.0.30

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.
@@ -1,7 +1,7 @@
1
1
  import { jsx as g, jsxs as W } from "react/jsx-runtime";
2
- import T, { useRef as x, useLayoutEffect as A, useMemo as F, useState as D, useEffect as V, useCallback as $ } from "react";
2
+ import B, { useRef as x, useLayoutEffect as A, useMemo as F, useState as D, useEffect as V, useCallback as $ } from "react";
3
3
  import n from "clsx";
4
- const O = "av-button", B = "icon", M = "button", z = "link", ee = ({
4
+ const O = "av-button", T = "icon", M = "button", z = "link", ee = ({
5
5
  type: e,
6
6
  size: t,
7
7
  labelRight: r,
@@ -18,7 +18,7 @@ const O = "av-button", B = "icon", M = "button", z = "link", ee = ({
18
18
  [c]: t === "medium",
19
19
  [s]: t === "large"
20
20
  });
21
- case B:
21
+ case T:
22
22
  return n("flex items-center", {
23
23
  "justify-center": o === "center",
24
24
  "justify-start": o === "left",
@@ -53,7 +53,7 @@ const O = "av-button", B = "icon", M = "button", z = "link", ee = ({
53
53
  [i]: t === "medium",
54
54
  [d]: t === "large"
55
55
  });
56
- case B:
56
+ case T:
57
57
  return n({
58
58
  [o]: t === "small" && (r || a),
59
59
  [i]: t === "medium" && (r || a),
@@ -63,14 +63,14 @@ const O = "av-button", B = "icon", M = "button", z = "link", ee = ({
63
63
  }, te = ({
64
64
  mode: e,
65
65
  noBackground: t,
66
- noTruncate: r,
66
+ truncate: r,
67
67
  variant: a
68
68
  }) => {
69
69
  if (t)
70
70
  return "not-prose";
71
71
  if (a === "primary")
72
72
  return n("not-prose", {
73
- truncate: !r,
73
+ truncate: r,
74
74
  "text-copy-light": e === "dark" || e === "system",
75
75
  "text-copy-lighter": e === "light" || e === "alt-system",
76
76
  "dark:text-copy-lighter": e === "system",
@@ -78,7 +78,7 @@ const O = "av-button", B = "icon", M = "button", z = "link", ee = ({
78
78
  });
79
79
  if (a === "secondary")
80
80
  return n("not-prose", {
81
- truncate: !r,
81
+ truncate: r,
82
82
  "text-copy-light": e === "light" || e === "system",
83
83
  "text-copy-lighter": e === "dark" || e === "alt-system",
84
84
  "dark:text-copy-lighter": e === "alt-system",
@@ -86,7 +86,7 @@ const O = "av-button", B = "icon", M = "button", z = "link", ee = ({
86
86
  });
87
87
  if (a === "danger")
88
88
  return n("not-prose", {
89
- truncate: !r,
89
+ truncate: r,
90
90
  "text-copy-light": e === "dark" || e === "system",
91
91
  "text-copy-lighter": e === "light" || e === "alt-system",
92
92
  "dark:text-copy-lighter": e === "system",
@@ -94,7 +94,7 @@ const O = "av-button", B = "icon", M = "button", z = "link", ee = ({
94
94
  });
95
95
  if (a === "selected")
96
96
  return n("not-prose text-copy-lighter", {
97
- truncate: !r
97
+ truncate: r
98
98
  });
99
99
  }, ae = ({
100
100
  mode: e,
@@ -259,7 +259,7 @@ const O = "av-button", B = "icon", M = "button", z = "link", ee = ({
259
259
  labelLeft: f,
260
260
  noBackground: u,
261
261
  variant: l,
262
- noTruncate: m,
262
+ truncate: m,
263
263
  align: p,
264
264
  radius: R,
265
265
  animated: w
@@ -269,7 +269,7 @@ const O = "av-button", B = "icon", M = "button", z = "link", ee = ({
269
269
  mode: a,
270
270
  variant: l,
271
271
  noBackground: u,
272
- noTruncate: m
272
+ truncate: m
273
273
  }),
274
274
  ae({ mode: a, noBackground: u, variant: l }),
275
275
  ie({ radius: R }),
@@ -291,13 +291,13 @@ const O = "av-button", B = "icon", M = "button", z = "link", ee = ({
291
291
  "disabled:cursor-not-allowed disabled:opacity-50": i
292
292
  },
293
293
  n({
294
- "transition-[width] duration-300 ease-in-out": e === B && w
294
+ "transition-[width] duration-300 ease-in-out": e === T && w
295
295
  }),
296
296
  t
297
297
  )), ue = (e, t, r) => {
298
298
  var a;
299
299
  !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
300
- }, L = T.forwardRef((e, t) => {
300
+ }, L = B.forwardRef((e, t) => {
301
301
  const { onClick: r, noInternalClick: a = !1, ...o } = e;
302
302
  return /* @__PURE__ */ g(
303
303
  "button",
@@ -311,7 +311,7 @@ const O = "av-button", B = "icon", M = "button", z = "link", ee = ({
311
311
  );
312
312
  });
313
313
  L.displayName = "BaseButton";
314
- const P = T.forwardRef(
314
+ const P = B.forwardRef(
315
315
  ({
316
316
  children: e,
317
317
  disabled: t = !1,
@@ -323,7 +323,7 @@ const P = T.forwardRef(
323
323
  raw: c = !1,
324
324
  noBorder: s = !1,
325
325
  variant: h = "primary",
326
- noTruncate: f = !1,
326
+ truncate: f = !1,
327
327
  radius: u = "large",
328
328
  ...l
329
329
  }, m) => {
@@ -338,7 +338,7 @@ const P = T.forwardRef(
338
338
  size: d,
339
339
  noBorder: s,
340
340
  variant: h,
341
- noTruncate: f,
341
+ truncate: f,
342
342
  radius: u
343
343
  });
344
344
  return /* @__PURE__ */ g(
@@ -403,7 +403,7 @@ const be = {
403
403
  // px-3 x 2
404
404
  large: 16 * 2
405
405
  // px-4 x 2
406
- }, ye = 2, G = T.forwardRef(
406
+ }, ye = 2, G = B.forwardRef(
407
407
  ({
408
408
  children: e,
409
409
  disabled: t = !1,
@@ -428,7 +428,7 @@ const be = {
428
428
  ...Z
429
429
  }, J) => {
430
430
  const K = q({
431
- type: B,
431
+ type: T,
432
432
  mode: r,
433
433
  focusMode: a,
434
434
  fullWidth: o,
@@ -499,19 +499,19 @@ const be = {
499
499
  }) => /* @__PURE__ */ g("span", { ref: e, className: t, children: r && /* @__PURE__ */ g("span", { className: a, children: r }) });
500
500
  G.displayName = "ButtonIcon";
501
501
  /*!
502
- @versini/ui-button v4.2.11
502
+ @versini/ui-button v5.0.1
503
503
  © 2025 gizmette.com
504
504
  */
505
505
  try {
506
506
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
507
- version: "4.2.11",
508
- buildTime: "03/10/2025 02:04 PM EDT",
507
+ version: "5.0.1",
508
+ buildTime: "03/14/2025 05:17 PM EDT",
509
509
  homepage: "https://github.com/aversini/ui-components",
510
510
  license: "MIT"
511
511
  });
512
512
  } catch {
513
513
  }
514
- const ve = T.forwardRef(
514
+ const ve = B.forwardRef(
515
515
  ({
516
516
  children: e,
517
517
  mode: t = "system",
@@ -563,7 +563,7 @@ const ke = 200, pe = ({
563
563
  string: e.slice(0, t + o),
564
564
  isTruncated: !0
565
565
  };
566
- }, Te = ({
566
+ }, Be = ({
567
567
  children: e,
568
568
  length: t = 200,
569
569
  mode: r = "system",
@@ -594,5 +594,5 @@ const ke = 200, pe = ({
594
594
  ] });
595
595
  };
596
596
  export {
597
- Te as Truncate
597
+ Be as Truncate
598
598
  };
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 v3.0.28
3
+ @versini/ui-truncate v3.0.30
4
4
  © 2025 gizmette.com
5
5
  */
6
6
  try {
7
7
  window.__VERSINI_UI_TRUNCATE__ || (window.__VERSINI_UI_TRUNCATE__ = {
8
- version: "3.0.28",
9
- buildTime: "03/10/2025 02:05 PM EDT",
8
+ version: "3.0.30",
9
+ buildTime: "03/14/2025 05:18 PM 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": "3.0.28",
3
+ "version": "3.0.30",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -40,11 +40,11 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@tailwindcss/typography": "0.5.16",
43
- "@versini/ui-button": "4.2.11",
43
+ "@versini/ui-button": "5.0.1",
44
44
  "tailwindcss": "3.4.17"
45
45
  },
46
46
  "sideEffects": [
47
47
  "**/*.css"
48
48
  ],
49
- "gitHead": "fc7e720b770c5ee2e8537eabf9b2f458dba07696"
49
+ "gitHead": "37955472858096264438083d812d3b12585b0253"
50
50
  }