@versini/ui-button 4.2.11 → 5.0.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.
@@ -61,14 +61,14 @@ const v = "av-button", l = "icon", p = "button", h = "link", m = ({
61
61
  }, w = ({
62
62
  mode: t,
63
63
  noBackground: e,
64
- noTruncate: r,
64
+ truncate: r,
65
65
  variant: a
66
66
  }) => {
67
67
  if (e)
68
68
  return "not-prose";
69
69
  if (a === "primary")
70
70
  return c("not-prose", {
71
- truncate: !r,
71
+ truncate: r,
72
72
  "text-copy-light": t === "dark" || t === "system",
73
73
  "text-copy-lighter": t === "light" || t === "alt-system",
74
74
  "dark:text-copy-lighter": t === "system",
@@ -76,7 +76,7 @@ const v = "av-button", l = "icon", p = "button", h = "link", m = ({
76
76
  });
77
77
  if (a === "secondary")
78
78
  return c("not-prose", {
79
- truncate: !r,
79
+ truncate: r,
80
80
  "text-copy-light": t === "light" || t === "system",
81
81
  "text-copy-lighter": t === "dark" || t === "alt-system",
82
82
  "dark:text-copy-lighter": t === "alt-system",
@@ -84,7 +84,7 @@ const v = "av-button", l = "icon", p = "button", h = "link", m = ({
84
84
  });
85
85
  if (a === "danger")
86
86
  return c("not-prose", {
87
- truncate: !r,
87
+ truncate: r,
88
88
  "text-copy-light": t === "dark" || t === "system",
89
89
  "text-copy-lighter": t === "light" || t === "alt-system",
90
90
  "dark:text-copy-lighter": t === "system",
@@ -92,7 +92,7 @@ const v = "av-button", l = "icon", p = "button", h = "link", m = ({
92
92
  });
93
93
  if (a === "selected")
94
94
  return c("not-prose text-copy-lighter", {
95
- truncate: !r
95
+ truncate: r
96
96
  });
97
97
  }, T = ({
98
98
  mode: t,
@@ -257,7 +257,7 @@ const v = "av-button", l = "icon", p = "button", h = "link", m = ({
257
257
  labelLeft: u,
258
258
  noBackground: y,
259
259
  variant: i,
260
- noTruncate: x,
260
+ truncate: x,
261
261
  align: f,
262
262
  radius: C,
263
263
  animated: b
@@ -267,7 +267,7 @@ const v = "av-button", l = "icon", p = "button", h = "link", m = ({
267
267
  mode: a,
268
268
  variant: i,
269
269
  noBackground: y,
270
- noTruncate: x
270
+ truncate: x
271
271
  }),
272
272
  T({ mode: a, noBackground: y, variant: i }),
273
273
  E({ radius: C }),
@@ -1,7 +1,7 @@
1
1
  import { jsx as c } from "react/jsx-runtime";
2
2
  import N from "react";
3
3
  import { BaseButton_private as T } from "../../chunks/BaseButton.BFKIL4GO.js";
4
- import { getButtonClasses as g, TYPE_BUTTON as x } from "../../chunks/utilities.CSPyeepO.js";
4
+ import { getButtonClasses as g, TYPE_BUTTON as x } from "../../chunks/utilities.z1Ttwtq4.js";
5
5
  const C = N.forwardRef(
6
6
  ({
7
7
  children: s,
@@ -14,7 +14,7 @@ const C = N.forwardRef(
14
14
  raw: f = !1,
15
15
  noBorder: l = !1,
16
16
  variant: p = "primary",
17
- noTruncate: n = !1,
17
+ truncate: n = !1,
18
18
  radius: i = "large",
19
19
  ...u
20
20
  }, B) => {
@@ -29,7 +29,7 @@ const C = N.forwardRef(
29
29
  size: m,
30
30
  noBorder: l,
31
31
  variant: p,
32
- noTruncate: n,
32
+ truncate: n,
33
33
  radius: i
34
34
  });
35
35
  return /* @__PURE__ */ c(
@@ -1,7 +1,7 @@
1
1
  import { jsxs as G, jsx as i } from "react/jsx-runtime";
2
2
  import H, { useRef as m, useEffect as E, useCallback as M, useMemo as A, useState as W, useLayoutEffect as B } from "react";
3
3
  import { BaseButton_private as Y } from "../../chunks/BaseButton.BFKIL4GO.js";
4
- import { getButtonClasses as J, getIconClasses as K, getButtonIconLabelClasses as Q, TYPE_ICON as U } from "../../chunks/utilities.CSPyeepO.js";
4
+ import { getButtonClasses as J, getIconClasses as K, getButtonIconLabelClasses as Q, TYPE_ICON as U } from "../../chunks/utilities.z1Ttwtq4.js";
5
5
  function V() {
6
6
  const t = m(!1);
7
7
  return E(() => (t.current = !0, () => {
@@ -1,49 +1,47 @@
1
- import { jsx as e, jsxs as a } from "react/jsx-runtime";
2
- import b from "clsx";
1
+ import { jsx as s, jsxs as n } from "react/jsx-runtime";
2
+ import o from "clsx";
3
3
  import V from "react";
4
- import { getButtonClasses as v, TYPE_LINK as C } from "../../chunks/utilities.CSPyeepO.js";
4
+ import { getButtonClasses as v, TYPE_LINK as C } from "../../chunks/utilities.z1Ttwtq4.js";
5
5
  const L = V.forwardRef(
6
6
  ({
7
7
  children: r,
8
- mode: n = "system",
8
+ mode: t = "system",
9
9
  focusMode: c = "system",
10
- fullWidth: o = !1,
11
- className: i,
12
- size: m = "small",
13
- raw: d = !1,
14
- noBorder: f = !1,
15
- target: t,
16
- noTruncate: l = !1,
17
- noNewWindowIcon: p = !1,
10
+ fullWidth: i = !1,
11
+ className: m,
12
+ size: d = "small",
13
+ raw: f = !1,
14
+ noBorder: p = !1,
15
+ target: a,
16
+ truncate: l = !1,
17
+ noNewWindowIcon: w = !1,
18
18
  radius: h = "large",
19
- ...w
20
- }, x) => {
21
- const u = v({
19
+ ...x
20
+ }, u) => {
21
+ const y = v({
22
22
  type: C,
23
- mode: n,
23
+ mode: t,
24
24
  focusMode: c,
25
- fullWidth: o,
25
+ fullWidth: i,
26
26
  disabled: !1,
27
- raw: d,
28
- className: i,
29
- size: m,
30
- noBorder: f,
31
- noTruncate: l,
27
+ raw: f,
28
+ className: m,
29
+ size: d,
30
+ noBorder: p,
31
+ truncate: l,
32
32
  radius: h
33
- }), s = t === "_blank", y = {
34
- target: t,
35
- rel: s ? "noopener noreferrer" : void 0,
36
- ...w
37
- }, N = b({
38
- truncate: !l,
39
- "basis-11/12": !l && s
33
+ }), e = a === "_blank", N = {
34
+ target: a,
35
+ rel: e ? "noopener noreferrer" : void 0,
36
+ ...x
37
+ }, b = o({
38
+ truncate: l,
39
+ "basis-11/12": l && e
40
40
  });
41
- return /* @__PURE__ */ e("a", { ref: x, className: u, ...y, children: /* @__PURE__ */ a("div", { role: "text", className: "flex items-center justify-center", children: [
42
- /* @__PURE__ */ a("div", { className: N, children: [
43
- r,
44
- s && /* @__PURE__ */ e("span", { className: "sr-only", children: ", opens in a new window" })
45
- ] }),
46
- s && !p && /* @__PURE__ */ a(
41
+ return /* @__PURE__ */ s("a", { ref: u, className: y, ...N, children: /* @__PURE__ */ n("div", { role: "text", className: o("flex items-center justify-center"), children: [
42
+ /* @__PURE__ */ s("div", { className: b, children: r }),
43
+ e && /* @__PURE__ */ s("span", { className: "sr-only", children: ", opens in a new window" }),
44
+ e && !w && /* @__PURE__ */ n(
47
45
  "svg",
48
46
  {
49
47
  xmlns: "http://www.w3.org/2000/svg",
@@ -52,14 +50,14 @@ const L = V.forwardRef(
52
50
  fill: "currentColor",
53
51
  "aria-hidden": "true",
54
52
  children: [
55
- /* @__PURE__ */ e(
53
+ /* @__PURE__ */ s(
56
54
  "path",
57
55
  {
58
56
  opacity: ".4",
59
57
  d: "M384 32c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96C0 60.7 28.7 32 64 32H384zM160 144c-13.3 0-24 10.7-24 24s10.7 24 24 24h94.1L119 327c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l135-135V328c0 13.3 10.7 24 24 24s24-10.7 24-24V168c0-13.3-10.7-24-24-24H160z"
60
58
  }
61
59
  ),
62
- /* @__PURE__ */ e("path", { d: "M312 144H160c-13.3 0-24 10.7-24 24s10.7 24 24 24h94.1L119 327c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l135-135V328c0 13.3 10.7 24 24 24s24-10.7 24-24V168c0-13.3-10.7-24-24-24z" })
60
+ /* @__PURE__ */ s("path", { d: "M312 144H160c-13.3 0-24 10.7-24 24s10.7 24 24 24h94.1L119 327c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l135-135V328c0 13.3 10.7 24 24 24s24-10.7 24-24V168c0-13.3-10.7-24-24-24z" })
63
61
  ]
64
62
  }
65
63
  )
package/dist/index.d.ts CHANGED
@@ -7,7 +7,7 @@ declare const BUTTON_CLASSNAME = "av-button";
7
7
  declare const Button: React.ForwardRefExoticComponent<{
8
8
  children: React.ReactNode;
9
9
  disabled?: boolean;
10
- noTruncate?: boolean;
10
+ truncate?: boolean;
11
11
  onClick?: React.MouseEventHandler<HTMLButtonElement>;
12
12
  variant?: "primary" | "secondary" | "danger" | "selected";
13
13
  } & {
@@ -35,7 +35,7 @@ declare const ButtonLink: React.ForwardRefExoticComponent<{
35
35
  } & {
36
36
  children: React.ReactNode;
37
37
  disabled?: boolean;
38
- noTruncate?: boolean;
38
+ truncate?: boolean;
39
39
  onClick?: React.MouseEventHandler<HTMLButtonElement>;
40
40
  variant?: "primary" | "secondary" | "danger" | "selected";
41
41
  } & {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { BUTTON_CLASSNAME as B } from "./chunks/utilities.CSPyeepO.js";
1
+ import { BUTTON_CLASSNAME as B } from "./chunks/utilities.z1Ttwtq4.js";
2
2
  import { Button as T } from "./components/Button/Button.js";
3
3
  import { ButtonCopy as I } from "./components/Button/ButtonCopy.js";
4
4
  import { ButtonIcon as l } from "./components/Button/ButtonIcon.js";
@@ -7,13 +7,13 @@ import { jsx as e } from "react/jsx-runtime";
7
7
  import a from "clsx";
8
8
  import m from "react";
9
9
  /*!
10
- @versini/ui-button v4.2.11
10
+ @versini/ui-button v5.0.1
11
11
  © 2025 gizmette.com
12
12
  */
13
13
  try {
14
14
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
15
- version: "4.2.11",
16
- buildTime: "03/10/2025 02:04 PM EDT",
15
+ version: "5.0.1",
16
+ buildTime: "03/14/2025 05:17 PM EDT",
17
17
  homepage: "https://github.com/aversini/ui-components",
18
18
  license: "MIT"
19
19
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-button",
3
- "version": "4.2.11",
3
+ "version": "5.0.1",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -39,7 +39,7 @@
39
39
  "react-dom": "^18.3.1 || ^19.0.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@versini/ui-types": "4.5.3"
42
+ "@versini/ui-types": "5.0.0"
43
43
  },
44
44
  "dependencies": {
45
45
  "@tailwindcss/typography": "0.5.16",
@@ -51,5 +51,5 @@
51
51
  "sideEffects": [
52
52
  "**/*.css"
53
53
  ],
54
- "gitHead": "fc7e720b770c5ee2e8537eabf9b2f458dba07696"
54
+ "gitHead": "37955472858096264438083d812d3b12585b0253"
55
55
  }