@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.
- package/dist/chunks/{utilities.DduOuV9K.js → utilities.YQH_sQYD.js} +32 -19
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/ButtonCopy.js +6 -6
- package/dist/components/Button/ButtonIcon.js +52 -57
- package/dist/components/Button/ButtonLink.js +1 -1
- package/dist/index.js +6 -6
- package/package.json +5 -5
|
@@ -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:
|
|
7
|
+
align: s
|
|
8
8
|
}) => {
|
|
9
|
-
const
|
|
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
|
-
[
|
|
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":
|
|
21
|
-
"justify-start":
|
|
22
|
-
"justify-end":
|
|
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
|
|
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
|
-
[
|
|
44
|
-
[
|
|
43
|
+
[s]: e === "small",
|
|
44
|
+
[i]: e === "medium",
|
|
45
45
|
[n]: e === "large"
|
|
46
46
|
});
|
|
47
47
|
case b:
|
|
48
48
|
return a({
|
|
49
|
-
[
|
|
50
|
-
[
|
|
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
|
-
}),
|
|
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:
|
|
229
|
-
disabled:
|
|
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:
|
|
260
|
-
E({ mode: c, variant: o, disabled:
|
|
261
|
-
N({ mode: c, variant: o, disabled:
|
|
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":
|
|
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.
|
|
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.
|
|
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.
|
|
42
|
-
buildTime: "01/
|
|
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.
|
|
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.
|
|
106
|
-
buildTime: "01/
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
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:
|
|
9
|
-
disabled:
|
|
10
|
-
mode:
|
|
11
|
-
focusMode:
|
|
12
|
-
fullWidth:
|
|
13
|
-
className:
|
|
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:
|
|
14
|
+
raw: r = !1,
|
|
16
15
|
noBorder: i = !1,
|
|
17
|
-
"aria-label":
|
|
18
|
-
label:
|
|
19
|
-
size:
|
|
20
|
-
labelRight:
|
|
21
|
-
labelLeft:
|
|
22
|
-
noBackground:
|
|
23
|
-
align:
|
|
24
|
-
radius:
|
|
25
|
-
variant:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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:
|
|
38
|
-
labelRight:
|
|
39
|
-
labelLeft:
|
|
40
|
-
noBackground:
|
|
41
|
-
align:
|
|
42
|
-
radius:
|
|
43
|
-
variant:
|
|
44
|
-
}),
|
|
45
|
-
|
|
46
|
-
|
|
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:
|
|
54
|
-
className:
|
|
55
|
-
disabled:
|
|
48
|
+
ref: j,
|
|
49
|
+
className: v,
|
|
50
|
+
disabled: e,
|
|
56
51
|
type: p,
|
|
57
|
-
"aria-label":
|
|
58
|
-
...
|
|
52
|
+
"aria-label": f || u,
|
|
53
|
+
...x,
|
|
59
54
|
children: [
|
|
60
|
-
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
|
|
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
|
-
|
|
63
|
+
Y.displayName = "ButtonIcon";
|
|
69
64
|
export {
|
|
70
|
-
|
|
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.
|
|
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.
|
|
2
|
-
import { BUTTON_CLASSNAME as
|
|
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
|
|
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
|
|
18
|
-
buildTime: "01/
|
|
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
|
-
|
|
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
|
|
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.
|
|
42
|
-
"@versini/ui-types": "4.
|
|
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.
|
|
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": "
|
|
53
|
+
"gitHead": "2be4fd5fe7dd74804533efdedcc6cfa4023a739a"
|
|
54
54
|
}
|