@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.
- package/dist/chunks/{utilities.CSPyeepO.js → utilities.z1Ttwtq4.js} +7 -7
- package/dist/components/Button/Button.js +3 -3
- package/dist/components/Button/ButtonIcon.js +1 -1
- package/dist/components/Button/ButtonLink.js +35 -37
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/package.json +3 -3
|
@@ -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
|
-
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
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
|
|
2
|
-
import
|
|
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.
|
|
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:
|
|
8
|
+
mode: t = "system",
|
|
9
9
|
focusMode: c = "system",
|
|
10
|
-
fullWidth:
|
|
11
|
-
className:
|
|
12
|
-
size:
|
|
13
|
-
raw:
|
|
14
|
-
noBorder:
|
|
15
|
-
target:
|
|
16
|
-
|
|
17
|
-
noNewWindowIcon:
|
|
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
|
-
...
|
|
20
|
-
},
|
|
21
|
-
const
|
|
19
|
+
...x
|
|
20
|
+
}, u) => {
|
|
21
|
+
const y = v({
|
|
22
22
|
type: C,
|
|
23
|
-
mode:
|
|
23
|
+
mode: t,
|
|
24
24
|
focusMode: c,
|
|
25
|
-
fullWidth:
|
|
25
|
+
fullWidth: i,
|
|
26
26
|
disabled: !1,
|
|
27
|
-
raw:
|
|
28
|
-
className:
|
|
29
|
-
size:
|
|
30
|
-
noBorder:
|
|
31
|
-
|
|
27
|
+
raw: f,
|
|
28
|
+
className: m,
|
|
29
|
+
size: d,
|
|
30
|
+
noBorder: p,
|
|
31
|
+
truncate: l,
|
|
32
32
|
radius: h
|
|
33
|
-
}),
|
|
34
|
-
target:
|
|
35
|
-
rel:
|
|
36
|
-
...
|
|
37
|
-
},
|
|
38
|
-
truncate:
|
|
39
|
-
"basis-11/12":
|
|
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__ */
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
|
|
44
|
-
|
|
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__ */
|
|
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__ */
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
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
|
|
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: "
|
|
16
|
-
buildTime: "03/
|
|
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": "
|
|
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": "
|
|
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": "
|
|
54
|
+
"gitHead": "37955472858096264438083d812d3b12585b0253"
|
|
55
55
|
}
|