@versini/ui-button 4.0.2 → 4.0.4
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/components/Button/ButtonCopy.js +57 -50
- package/dist/index.js +3 -3
- package/package.json +5 -5
|
@@ -1,132 +1,139 @@
|
|
|
1
|
-
import { jsxs as r, Fragment as w, jsx as
|
|
2
|
-
import u, { useState as
|
|
3
|
-
import { ButtonIcon as
|
|
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:
|
|
7
|
+
fill: o,
|
|
8
8
|
viewBox: s,
|
|
9
9
|
className: i,
|
|
10
|
-
defaultViewBox:
|
|
11
|
-
size:
|
|
12
|
-
title:
|
|
13
|
-
semantic:
|
|
10
|
+
defaultViewBox: c,
|
|
11
|
+
size: a,
|
|
12
|
+
title: l,
|
|
13
|
+
semantic: n = !1,
|
|
14
14
|
...d
|
|
15
15
|
}) => {
|
|
16
|
-
const p = I(
|
|
16
|
+
const p = I(a, i);
|
|
17
17
|
return /* @__PURE__ */ r(w, { children: [
|
|
18
|
-
/* @__PURE__ */
|
|
18
|
+
/* @__PURE__ */ t(
|
|
19
19
|
"svg",
|
|
20
20
|
{
|
|
21
21
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22
22
|
className: p,
|
|
23
|
-
viewBox: s ||
|
|
24
|
-
fill:
|
|
23
|
+
viewBox: s || c,
|
|
24
|
+
fill: o || "currentColor",
|
|
25
25
|
role: "img",
|
|
26
|
-
"aria-hidden": !
|
|
26
|
+
"aria-hidden": !n,
|
|
27
27
|
focusable: !1,
|
|
28
28
|
...d,
|
|
29
29
|
children: e
|
|
30
30
|
}
|
|
31
31
|
),
|
|
32
|
-
|
|
32
|
+
l && n && /* @__PURE__ */ t("span", { className: "sr-only", children: l })
|
|
33
33
|
] });
|
|
34
34
|
};
|
|
35
35
|
/*!
|
|
36
|
-
@versini/ui-svgicon v4.0.
|
|
36
|
+
@versini/ui-svgicon v4.0.1
|
|
37
37
|
© 2025 gizmette.com
|
|
38
38
|
*/
|
|
39
39
|
try {
|
|
40
40
|
window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
|
|
41
|
-
version: "4.0.
|
|
42
|
-
buildTime: "01/
|
|
41
|
+
version: "4.0.1",
|
|
42
|
+
buildTime: "01/06/2025 08:00 PM EST",
|
|
43
43
|
homepage: "https://github.com/aversini/ui-components",
|
|
44
44
|
license: "MIT"
|
|
45
45
|
});
|
|
46
46
|
} catch {
|
|
47
47
|
}
|
|
48
|
-
const
|
|
48
|
+
const N = ({
|
|
49
49
|
className: e,
|
|
50
|
-
viewBox:
|
|
50
|
+
viewBox: o,
|
|
51
51
|
title: s,
|
|
52
52
|
monotone: i,
|
|
53
|
-
...
|
|
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:
|
|
59
|
+
viewBox: o,
|
|
60
60
|
className: e,
|
|
61
61
|
title: s || "Copied",
|
|
62
|
-
...
|
|
62
|
+
...c,
|
|
63
63
|
children: [
|
|
64
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ t(
|
|
65
65
|
"path",
|
|
66
66
|
{
|
|
67
|
+
className: "fa-secondary",
|
|
67
68
|
opacity: "0.4",
|
|
68
|
-
d: "
|
|
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__ */
|
|
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
|
-
),
|
|
81
|
+
), x = ({
|
|
75
82
|
className: e,
|
|
76
|
-
viewBox:
|
|
83
|
+
viewBox: o,
|
|
77
84
|
title: s,
|
|
78
85
|
monotone: i,
|
|
79
|
-
...
|
|
80
|
-
}) => /* @__PURE__ */
|
|
86
|
+
...c
|
|
87
|
+
}) => /* @__PURE__ */ t(
|
|
81
88
|
m,
|
|
82
89
|
{
|
|
83
90
|
defaultViewBox: "0 0 512 512",
|
|
84
91
|
size: "size-5",
|
|
85
|
-
viewBox:
|
|
92
|
+
viewBox: o,
|
|
86
93
|
className: e,
|
|
87
94
|
title: s || "Copy",
|
|
88
|
-
...
|
|
89
|
-
children: /* @__PURE__ */
|
|
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.1
|
|
100
|
+
@versini/ui-icons v4.2.1
|
|
94
101
|
© 2025 gizmette.com
|
|
95
102
|
*/
|
|
96
103
|
try {
|
|
97
104
|
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
98
|
-
version: "4.1
|
|
99
|
-
buildTime: "01/
|
|
105
|
+
version: "4.2.1",
|
|
106
|
+
buildTime: "01/06/2025 08:00 PM EST",
|
|
100
107
|
homepage: "https://github.com/aversini/ui-components",
|
|
101
108
|
license: "MIT"
|
|
102
109
|
});
|
|
103
110
|
} catch {
|
|
104
111
|
}
|
|
105
|
-
const
|
|
106
|
-
const [i,
|
|
107
|
-
typeof e == "string" && (navigator.clipboard.writeText(e),
|
|
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
|
|
110
|
-
let
|
|
111
|
-
return i && (
|
|
112
|
-
|
|
116
|
+
return _(() => {
|
|
117
|
+
let l;
|
|
118
|
+
return i && (l = window.setTimeout(() => {
|
|
119
|
+
c(!1);
|
|
113
120
|
}, 3e3)), () => {
|
|
114
|
-
clearTimeout(
|
|
121
|
+
clearTimeout(l);
|
|
115
122
|
};
|
|
116
|
-
}, [i]), /* @__PURE__ */
|
|
117
|
-
|
|
123
|
+
}, [i]), /* @__PURE__ */ t(
|
|
124
|
+
h,
|
|
118
125
|
{
|
|
119
|
-
...
|
|
126
|
+
...o,
|
|
120
127
|
size: "small",
|
|
121
128
|
ref: s,
|
|
122
129
|
label: i ? "Copied to clipboard" : "Copy to clipboard",
|
|
123
|
-
onClick:
|
|
130
|
+
onClick: a,
|
|
124
131
|
disabled: i,
|
|
125
|
-
children: i ? /* @__PURE__ */
|
|
132
|
+
children: i ? /* @__PURE__ */ t(N, { size: "size-3" }) : /* @__PURE__ */ t(x, { size: "size-3" })
|
|
126
133
|
}
|
|
127
134
|
);
|
|
128
135
|
});
|
|
129
|
-
|
|
136
|
+
z.displayName = "ButtonCopy";
|
|
130
137
|
export {
|
|
131
|
-
|
|
138
|
+
z as ButtonCopy
|
|
132
139
|
};
|
package/dist/index.js
CHANGED
|
@@ -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.
|
|
12
|
+
@versini/ui-button v4.0.4
|
|
13
13
|
© 2025 gizmette.com
|
|
14
14
|
*/
|
|
15
15
|
try {
|
|
16
16
|
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
17
|
-
version: "4.0.
|
|
18
|
-
buildTime: "01/
|
|
17
|
+
version: "4.0.4",
|
|
18
|
+
buildTime: "01/06/2025 08:01 PM EST",
|
|
19
19
|
homepage: "https://github.com/aversini/ui-components",
|
|
20
20
|
license: "MIT"
|
|
21
21
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-button",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.4",
|
|
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.
|
|
41
|
+
"@versini/ui-svgicon": "4.0.1",
|
|
42
|
+
"@versini/ui-types": "4.0.0"
|
|
42
43
|
},
|
|
43
44
|
"dependencies": {
|
|
44
45
|
"@tailwindcss/typography": "0.5.15",
|
|
45
|
-
"@versini/ui-icons": "4.1
|
|
46
|
-
"@versini/ui-types": "4.0.0",
|
|
46
|
+
"@versini/ui-icons": "4.2.1",
|
|
47
47
|
"clsx": "2.1.1",
|
|
48
48
|
"tailwindcss": "3.4.17"
|
|
49
49
|
},
|
|
50
50
|
"sideEffects": [
|
|
51
51
|
"**/*.css"
|
|
52
52
|
],
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "0769d7ea2b70f5ea7b50f587faf90a079d33f9b9"
|
|
54
54
|
}
|