@versini/ui-button 4.0.1 → 4.0.3

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,35 +1,35 @@
1
- import { jsxs as r, Fragment as w, jsx as o } from "react/jsx-runtime";
2
- import u, { useState as _, useEffect as h } from "react";
3
- import { ButtonIcon as f } from "./ButtonIcon.js";
1
+ import { jsxs as r, Fragment as w, jsx as t } from "react/jsx-runtime";
2
+ import u, { useState as f, useEffect as _ } from "react";
3
+ import { ButtonIcon as h } from "./ButtonIcon.js";
4
4
  import I from "clsx";
5
5
  const m = ({
6
6
  children: e,
7
- fill: c,
7
+ fill: o,
8
8
  viewBox: s,
9
9
  className: i,
10
- defaultViewBox: t,
11
- size: l,
12
- title: n,
13
- semantic: a = !1,
10
+ defaultViewBox: c,
11
+ size: a,
12
+ title: l,
13
+ semantic: n = !1,
14
14
  ...d
15
15
  }) => {
16
- const p = I(l, i);
16
+ const p = I(a, i);
17
17
  return /* @__PURE__ */ r(w, { children: [
18
- /* @__PURE__ */ o(
18
+ /* @__PURE__ */ t(
19
19
  "svg",
20
20
  {
21
21
  xmlns: "http://www.w3.org/2000/svg",
22
22
  className: p,
23
- viewBox: s || t,
24
- fill: c || "currentColor",
23
+ viewBox: s || c,
24
+ fill: o || "currentColor",
25
25
  role: "img",
26
- "aria-hidden": !a,
26
+ "aria-hidden": !n,
27
27
  focusable: !1,
28
28
  ...d,
29
29
  children: e
30
30
  }
31
31
  ),
32
- n && a && /* @__PURE__ */ o("span", { className: "sr-only", children: n })
32
+ l && n && /* @__PURE__ */ t("span", { className: "sr-only", children: l })
33
33
  ] });
34
34
  };
35
35
  /*!
@@ -39,94 +39,101 @@ const m = ({
39
39
  try {
40
40
  window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
41
41
  version: "4.0.0",
42
- buildTime: "01/04/2025 10:02 AM EST",
42
+ buildTime: "01/04/2025 04:09 PM EST",
43
43
  homepage: "https://github.com/aversini/ui-components",
44
44
  license: "MIT"
45
45
  });
46
46
  } catch {
47
47
  }
48
- const V = ({
48
+ const N = ({
49
49
  className: e,
50
- viewBox: c,
50
+ viewBox: o,
51
51
  title: s,
52
52
  monotone: i,
53
- ...t
53
+ ...c
54
54
  }) => /* @__PURE__ */ r(
55
55
  m,
56
56
  {
57
57
  defaultViewBox: "0 0 448 512",
58
58
  size: "size-5",
59
- viewBox: c,
59
+ viewBox: o,
60
60
  className: e,
61
61
  title: s || "Copied",
62
- ...t,
62
+ ...c,
63
63
  children: [
64
- /* @__PURE__ */ o(
64
+ /* @__PURE__ */ t(
65
65
  "path",
66
66
  {
67
+ className: "fa-secondary",
67
68
  opacity: "0.4",
68
- d: "M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zM337 209L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"
69
+ d: "M0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32C28.7 32 0 60.7 0 96zM104 256c0-6.1 2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l47 47c37-37 74-74 111-111c4.7-4.7 10.8-7 17-7s12.3 2.3 17 7c2.3 2.3 4.1 5 5.3 7.9c.6 1.5 1 2.9 1.3 4.4c.2 1.1 .3 2.2 .3 2.2c.1 1.2 .1 1.2 .1 2.5c-.1 1.5-.1 1.9-.1 2.3c-.1 .7-.2 1.5-.3 2.2c-.3 1.5-.7 3-1.3 4.4c-1.2 2.9-2.9 5.6-5.3 7.9c-42.7 42.7-85.3 85.3-128 128c-4.7 4.7-10.8 7-17 7s-12.3-2.3-17-7c-21.3-21.3-42.7-42.7-64-64c-4.7-4.7-7-10.8-7-17z"
69
70
  }
70
71
  ),
71
- /* @__PURE__ */ o("path", { d: "M337 175c9.4 9.4 9.4 24.6 0 33.9L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0z" })
72
+ /* @__PURE__ */ t(
73
+ "path",
74
+ {
75
+ className: "fa-primary",
76
+ d: "M337 175c9.4 9.4 9.4 24.6 0 33.9L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0z"
77
+ }
78
+ )
72
79
  ]
73
80
  }
74
- ), v = ({
81
+ ), x = ({
75
82
  className: e,
76
- viewBox: c,
83
+ viewBox: o,
77
84
  title: s,
78
85
  monotone: i,
79
- ...t
80
- }) => /* @__PURE__ */ o(
86
+ ...c
87
+ }) => /* @__PURE__ */ t(
81
88
  m,
82
89
  {
83
90
  defaultViewBox: "0 0 512 512",
84
91
  size: "size-5",
85
- viewBox: c,
92
+ viewBox: o,
86
93
  className: e,
87
94
  title: s || "Copy",
88
- ...t,
89
- children: /* @__PURE__ */ o("path", { d: "M64 464H288c8.8 0 16-7.2 16-16V384h48v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h64v48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM224 304H448c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H224c-8.8 0-16 7.2-16 16V288c0 8.8 7.2 16 16 16zm-64-16V64c0-35.3 28.7-64 64-64H448c35.3 0 64 28.7 64 64V288c0 35.3-28.7 64-64 64H224c-35.3 0-64-28.7-64-64z" })
95
+ ...c,
96
+ children: /* @__PURE__ */ t("path", { d: "M64 464l224 0c8.8 0 16-7.2 16-16l0-64 48 0 0 64c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64l64 0 0 48-64 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16zM224 304l224 0c8.8 0 16-7.2 16-16l0-224c0-8.8-7.2-16-16-16L224 48c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16zm-64-16l0-224c0-35.3 28.7-64 64-64L448 0c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64l-224 0c-35.3 0-64-28.7-64-64z" })
90
97
  }
91
98
  );
92
99
  /*!
93
- @versini/ui-icons v4.0.0
100
+ @versini/ui-icons v4.2.0
94
101
  © 2025 gizmette.com
95
102
  */
96
103
  try {
97
104
  window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
98
- version: "4.0.0",
99
- buildTime: "01/04/2025 10:02 AM EST",
105
+ version: "4.2.0",
106
+ buildTime: "01/04/2025 04:09 PM EST",
100
107
  homepage: "https://github.com/aversini/ui-components",
101
108
  license: "MIT"
102
109
  });
103
110
  } catch {
104
111
  }
105
- const x = u.forwardRef(({ copyToClipboard: e, ...c }, s) => {
106
- const [i, t] = _(!1), l = () => {
107
- typeof e == "string" && (navigator.clipboard.writeText(e), t(!0)), typeof e == "function" && (navigator.clipboard.writeText(e()), t(!0));
112
+ const z = u.forwardRef(({ copyToClipboard: e, ...o }, s) => {
113
+ const [i, c] = f(!1), a = () => {
114
+ typeof e == "string" && (navigator.clipboard.writeText(e), c(!0)), typeof e == "function" && (navigator.clipboard.writeText(e()), c(!0));
108
115
  };
109
- return h(() => {
110
- let n;
111
- return i && (n = window.setTimeout(() => {
112
- t(!1);
116
+ return _(() => {
117
+ let l;
118
+ return i && (l = window.setTimeout(() => {
119
+ c(!1);
113
120
  }, 3e3)), () => {
114
- clearTimeout(n);
121
+ clearTimeout(l);
115
122
  };
116
- }, [i]), /* @__PURE__ */ o(
117
- f,
123
+ }, [i]), /* @__PURE__ */ t(
124
+ h,
118
125
  {
119
- ...c,
126
+ ...o,
120
127
  size: "small",
121
128
  ref: s,
122
129
  label: i ? "Copied to clipboard" : "Copy to clipboard",
123
- onClick: l,
130
+ onClick: a,
124
131
  disabled: i,
125
- children: i ? /* @__PURE__ */ o(V, { size: "size-3" }) : /* @__PURE__ */ o(v, { size: "size-3" })
132
+ children: i ? /* @__PURE__ */ t(N, { size: "size-3" }) : /* @__PURE__ */ t(x, { size: "size-3" })
126
133
  }
127
134
  );
128
135
  });
129
- x.displayName = "ButtonCopy";
136
+ z.displayName = "ButtonCopy";
130
137
  export {
131
- x as ButtonCopy
138
+ z as ButtonCopy
132
139
  };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { getButtonClasses as I, TYPE_ICON as v } from "./chunks/utilities.CPchA_my.js";
2
- import { BUTTON_CLASSNAME as P } from "./chunks/utilities.CPchA_my.js";
2
+ import { BUTTON_CLASSNAME as V } from "./chunks/utilities.CPchA_my.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.1
12
+ @versini/ui-button v4.0.3
13
13
  © 2025 gizmette.com
14
14
  */
15
15
  try {
16
16
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
17
- version: "4.0.1",
18
- buildTime: "01/04/2025 10:02 AM EST",
17
+ version: "4.0.3",
18
+ buildTime: "01/04/2025 04:09 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.1",
3
+ "version": "4.0.3",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@tailwindcss/typography": "0.5.15",
45
- "@versini/ui-icons": "4.0.0",
45
+ "@versini/ui-icons": "4.2.0",
46
46
  "@versini/ui-types": "4.0.0",
47
47
  "clsx": "2.1.1",
48
48
  "tailwindcss": "3.4.17"
@@ -50,5 +50,5 @@
50
50
  "sideEffects": [
51
51
  "**/*.css"
52
52
  ],
53
- "gitHead": "8d426172a7405edff487d08c0fae260d4df0b56e"
53
+ "gitHead": "88ad6c4972e02710471fede5712f5c94b67a3db9"
54
54
  }