@versini/ui-button 4.0.10 → 4.1.0

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.
@@ -4,22 +4,22 @@ const u = "av-button", b = "icon", y = "button", d = "link", m = ({
4
4
  size: e,
5
5
  labelRight: r,
6
6
  labelLeft: c,
7
- align: i
7
+ align: s
8
8
  }) => {
9
- const s = "max-h-8 py-0 px-2", n = "max-h-9 h-8 px-3", g = "max-h-12 py-2 px-4";
9
+ const i = "max-h-8 py-0 px-2", n = "max-h-9 h-8 px-3", g = "max-h-12 py-2 px-4";
10
10
  switch (t) {
11
11
  case y:
12
12
  case d:
13
13
  return a({
14
- [s]: e === "small",
14
+ [i]: e === "small",
15
15
  [n]: e === "medium",
16
16
  [g]: e === "large"
17
17
  });
18
18
  case b:
19
19
  return a("inline-flex items-center", {
20
- "justify-center": i === "center",
21
- "justify-start": i === "left",
22
- "justify-end": i === "right",
20
+ "justify-center": s === "center",
21
+ "justify-start": s === "left",
22
+ "justify-end": s === "right",
23
23
  "h-6 w-6 p-0": e === "small" && !(r || c),
24
24
  "h-6 px-2": e === "small" && (r || c),
25
25
  "h-8 w-8 p-1": e === "medium" && !(r || c),
@@ -34,20 +34,20 @@ const u = "av-button", b = "icon", y = "button", d = "link", m = ({
34
34
  labelRight: r,
35
35
  labelLeft: c
36
36
  }) => {
37
- const i = "text-sm font-medium", s = "text-base font-medium", n = "text-lg font-medium";
37
+ const s = "text-sm font-medium", i = "text-base font-medium", n = "text-lg font-medium";
38
38
  switch (t) {
39
39
  case y:
40
40
  case d:
41
41
  return a({
42
42
  "text-center": t === d,
43
- [i]: e === "small",
44
- [s]: e === "medium",
43
+ [s]: e === "small",
44
+ [i]: e === "medium",
45
45
  [n]: e === "large"
46
46
  });
47
47
  case b:
48
48
  return a({
49
- [i]: e === "small" && (r || c),
50
- [s]: e === "medium" && (r || c),
49
+ [s]: e === "small" && (r || c),
50
+ [i]: e === "medium" && (r || c),
51
51
  [n]: e === "large" && (r || c)
52
52
  });
53
53
  }
@@ -220,13 +220,25 @@ const u = "av-button", b = "icon", y = "button", d = "link", m = ({
220
220
  "focus:outline-focus-light": t === "light",
221
221
  "focus:outline-focus-light dark:focus:outline-focus-dark": t === "alt-system",
222
222
  "focus:outline-focus-dark dark:focus:outline-focus-light": t === "system"
223
- }), O = ({
223
+ }), I = ({
224
+ mode: t,
225
+ raw: e,
226
+ iconClassName: r
227
+ }) => e ? "" : a(
228
+ {
229
+ "text-copy-accent-dark": t === "light" || t === "alt-system",
230
+ "text-copy-light": t === "dark" || t === "system",
231
+ "dark:text-copy-light": t === "alt-system",
232
+ "dark:text-copy-accent-dark": t === "system"
233
+ },
234
+ r
235
+ ), O = ({
224
236
  type: t,
225
237
  className: e,
226
238
  raw: r,
227
239
  mode: c,
228
- focusMode: i,
229
- disabled: s,
240
+ focusMode: s,
241
+ disabled: i,
230
242
  fullWidth: n,
231
243
  size: g,
232
244
  noBorder: v,
@@ -256,12 +268,12 @@ const u = "av-button", b = "icon", y = "button", d = "link", m = ({
256
268
  }),
257
269
  C({ type: t, size: g, labelRight: l, labelLeft: h }),
258
270
  _({ mode: c, variant: o, noBorder: v }),
259
- j({ focusMode: i }),
260
- E({ mode: c, variant: o, disabled: s }),
261
- N({ mode: c, variant: o, disabled: s }),
271
+ j({ focusMode: s }),
272
+ E({ mode: c, variant: o, disabled: i }),
273
+ N({ mode: c, variant: o, disabled: i }),
262
274
  {
263
275
  "w-full": n,
264
- "disabled:cursor-not-allowed disabled:opacity-50": s
276
+ "disabled:cursor-not-allowed disabled:opacity-50": i
265
277
  },
266
278
  e
267
279
  ));
@@ -270,5 +282,6 @@ export {
270
282
  y as TYPE_BUTTON,
271
283
  b as TYPE_ICON,
272
284
  d as TYPE_LINK,
273
- O as getButtonClasses
285
+ O as getButtonClasses,
286
+ I as getButtonIconClasses
274
287
  };
@@ -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.DduOuV9K.js";
4
+ import { getButtonClasses as g, TYPE_BUTTON as x } from "../../chunks/utilities.YQH_sQYD.js";
5
5
  const C = N.forwardRef(
6
6
  ({
7
7
  children: s,
@@ -33,13 +33,13 @@ const m = ({
33
33
  ] });
34
34
  };
35
35
  /*!
36
- @versini/ui-svgicon v4.0.3
36
+ @versini/ui-svgicon v4.0.4
37
37
  © 2025 gizmette.com
38
38
  */
39
39
  try {
40
40
  window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
41
- version: "4.0.3",
42
- buildTime: "01/14/2025 10:39 AM EST",
41
+ version: "4.0.4",
42
+ buildTime: "01/16/2025 07:57 PM EST",
43
43
  homepage: "https://github.com/aversini/ui-components",
44
44
  license: "MIT"
45
45
  });
@@ -97,13 +97,13 @@ const N = ({
97
97
  }
98
98
  );
99
99
  /*!
100
- @versini/ui-icons v4.4.2
100
+ @versini/ui-icons v4.4.3
101
101
  © 2025 gizmette.com
102
102
  */
103
103
  try {
104
104
  window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
105
- version: "4.4.2",
106
- buildTime: "01/14/2025 10:39 AM EST",
105
+ version: "4.4.3",
106
+ buildTime: "01/16/2025 07:57 PM EST",
107
107
  homepage: "https://github.com/aversini/ui-components",
108
108
  license: "MIT"
109
109
  });
@@ -1,71 +1,66 @@
1
- import { jsxs as I, jsx as r } from "react/jsx-runtime";
2
- import j from "clsx";
3
- import v from "react";
4
- import { BaseButton_private as _ } from "../../chunks/BaseButton.BFKIL4GO.js";
5
- import { getButtonClasses as E, TYPE_ICON as O } from "../../chunks/utilities.DduOuV9K.js";
6
- const P = v.forwardRef(
1
+ import { jsxs as g, jsx as t } from "react/jsx-runtime";
2
+ import h from "react";
3
+ import { BaseButton_private as E } from "../../chunks/BaseButton.BFKIL4GO.js";
4
+ import { getButtonClasses as O, getButtonIconClasses as P, TYPE_ICON as T } from "../../chunks/utilities.YQH_sQYD.js";
5
+ const Y = h.forwardRef(
7
6
  ({
8
- children: o,
9
- disabled: c = !1,
10
- mode: t = "system",
11
- focusMode: n = "system",
12
- fullWidth: l = !1,
13
- className: m,
7
+ children: n,
8
+ disabled: e = !1,
9
+ mode: o = "system",
10
+ focusMode: m = "system",
11
+ fullWidth: c = !1,
12
+ className: l,
14
13
  type: p = "button",
15
- raw: s = !1,
14
+ raw: r = !1,
16
15
  noBorder: i = !1,
17
- "aria-label": y,
18
- label: f,
19
- size: u = "medium",
20
- labelRight: a,
21
- labelLeft: e,
22
- noBackground: x = !1,
23
- align: N = "center",
24
- radius: k = "large",
25
- variant: B = "primary",
26
- ...d
27
- }, h) => {
28
- const C = E({
29
- type: O,
30
- mode: t,
31
- focusMode: n,
32
- fullWidth: l,
33
- disabled: c,
34
- raw: s,
35
- className: m,
16
+ "aria-label": f,
17
+ label: u,
18
+ size: B = "medium",
19
+ labelRight: s,
20
+ labelLeft: a,
21
+ noBackground: N = !1,
22
+ align: y = "center",
23
+ radius: C = "large",
24
+ variant: d = "primary",
25
+ iconClassName: I,
26
+ ...x
27
+ }, j) => {
28
+ const v = O({
29
+ type: T,
30
+ mode: o,
31
+ focusMode: m,
32
+ fullWidth: c,
33
+ disabled: e,
34
+ raw: r,
35
+ className: l,
36
36
  noBorder: i,
37
- size: u,
38
- labelRight: a,
39
- labelLeft: e,
40
- noBackground: x,
41
- align: N,
42
- radius: k,
43
- variant: B
44
- }), g = j({
45
- "text-copy-accent-dark": (t === "light" || t === "alt-system") && !s,
46
- "text-copy-light": (t === "dark" || t === "system") && !s,
47
- "dark:text-copy-light": t === "alt-system" && !s,
48
- "dark:text-copy-accent-dark": t === "system" && !s
49
- });
50
- return /* @__PURE__ */ I(
51
- _,
37
+ size: B,
38
+ labelRight: s,
39
+ labelLeft: a,
40
+ noBackground: N,
41
+ align: y,
42
+ radius: C,
43
+ variant: d
44
+ }), _ = P({ mode: o, raw: r, iconClassName: I });
45
+ return /* @__PURE__ */ g(
46
+ E,
52
47
  {
53
- ref: h,
54
- className: C,
55
- disabled: c,
48
+ ref: j,
49
+ className: v,
50
+ disabled: e,
56
51
  type: p,
57
- "aria-label": y || f,
58
- ...d,
52
+ "aria-label": f || u,
53
+ ...x,
59
54
  children: [
60
- e && /* @__PURE__ */ r("span", { className: "pr-2", children: e }),
61
- /* @__PURE__ */ r("div", { className: g, children: o }),
62
- a && /* @__PURE__ */ r("span", { className: "pl-2", children: a })
55
+ a && /* @__PURE__ */ t("span", { className: "pr-2", children: a }),
56
+ /* @__PURE__ */ t("div", { className: _, children: n }),
57
+ s && /* @__PURE__ */ t("span", { className: "pl-2", children: s })
63
58
  ]
64
59
  }
65
60
  );
66
61
  }
67
62
  );
68
- P.displayName = "ButtonIcon";
63
+ Y.displayName = "ButtonIcon";
69
64
  export {
70
- P as ButtonIcon
65
+ Y as ButtonIcon
71
66
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as e, jsxs as a } from "react/jsx-runtime";
2
2
  import b from "clsx";
3
3
  import v from "react";
4
- import { getButtonClasses as V, TYPE_LINK as C } from "../../chunks/utilities.DduOuV9K.js";
4
+ import { getButtonClasses as V, TYPE_LINK as C } from "../../chunks/utilities.YQH_sQYD.js";
5
5
  const L = v.forwardRef(
6
6
  ({
7
7
  children: r,
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { getButtonClasses as I, TYPE_ICON as v } from "./chunks/utilities.DduOuV9K.js";
2
- import { BUTTON_CLASSNAME as P } from "./chunks/utilities.DduOuV9K.js";
1
+ import { getButtonClasses as I, TYPE_ICON as v } from "./chunks/utilities.YQH_sQYD.js";
2
+ import { BUTTON_CLASSNAME as V } from "./chunks/utilities.YQH_sQYD.js";
3
3
  import { Button as q } from "./components/Button/Button.js";
4
4
  import { ButtonCopy as D } from "./components/Button/ButtonCopy.js";
5
5
  import { ButtonIcon as G } from "./components/Button/ButtonIcon.js";
@@ -9,13 +9,13 @@ import n from "clsx";
9
9
  import S from "react";
10
10
  import { BaseButton_private as E } from "./chunks/BaseButton.BFKIL4GO.js";
11
11
  /*!
12
- @versini/ui-button v4.0.10
12
+ @versini/ui-button v4.1.0
13
13
  © 2025 gizmette.com
14
14
  */
15
15
  try {
16
16
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
17
- version: "4.0.10",
18
- buildTime: "01/14/2025 10:39 AM EST",
17
+ version: "4.1.0",
18
+ buildTime: "01/16/2025 07:57 PM EST",
19
19
  homepage: "https://github.com/aversini/ui-components",
20
20
  license: "MIT"
21
21
  });
@@ -100,7 +100,7 @@ const U = S.forwardRef(
100
100
  );
101
101
  U.displayName = "ButtonSort";
102
102
  export {
103
- P as BUTTON_CLASSNAME,
103
+ V as BUTTON_CLASSNAME,
104
104
  q as Button,
105
105
  D as ButtonCopy,
106
106
  G as ButtonIcon,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-button",
3
- "version": "4.0.10",
3
+ "version": "4.1.0",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -38,17 +38,17 @@
38
38
  "react-dom": "^18.3.1 || ^19.0.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@versini/ui-svgicon": "4.0.3",
42
- "@versini/ui-types": "4.1.0"
41
+ "@versini/ui-svgicon": "4.0.4",
42
+ "@versini/ui-types": "4.2.0"
43
43
  },
44
44
  "dependencies": {
45
45
  "@tailwindcss/typography": "0.5.16",
46
- "@versini/ui-icons": "4.4.2",
46
+ "@versini/ui-icons": "4.4.3",
47
47
  "clsx": "2.1.1",
48
48
  "tailwindcss": "3.4.17"
49
49
  },
50
50
  "sideEffects": [
51
51
  "**/*.css"
52
52
  ],
53
- "gitHead": "4c958ec69e74cca8bba692d7988f47151f39f2b7"
53
+ "gitHead": "2be4fd5fe7dd74804533efdedcc6cfa4023a739a"
54
54
  }