@versini/ui-button 11.0.0 → 11.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/common/constants.js +3 -3
- package/dist/components/Button/Button.js +3 -3
- package/dist/components/Button/ButtonCopy.js +3 -3
- package/dist/components/Button/ButtonIcon.js +9 -9
- package/dist/components/Button/ButtonLink.js +3 -3
- package/dist/components/Button/utilities.js +16 -15
- package/dist/components/index.js +3 -3
- package/dist/components/private/BaseButton.js +3 -3
- package/dist/components/private/ButtonSort.js +3 -3
- package/package.json +3 -3
package/dist/common/constants.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
@versini/ui-button v11.0.
|
|
2
|
+
@versini/ui-button v11.0.1
|
|
3
3
|
© 2025 gizmette.com
|
|
4
4
|
*/
|
|
5
5
|
try {
|
|
6
6
|
if (!window.__VERSINI_UI_BUTTON__) {
|
|
7
7
|
window.__VERSINI_UI_BUTTON__ = {
|
|
8
|
-
version: "11.0.
|
|
9
|
-
buildTime: "12/
|
|
8
|
+
version: "11.0.1",
|
|
9
|
+
buildTime: "12/24/2025 09:19 AM EST",
|
|
10
10
|
homepage: "https://www.npmjs.com/package/@versini/ui-button",
|
|
11
11
|
license: "MIT",
|
|
12
12
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
@versini/ui-button v11.0.
|
|
2
|
+
@versini/ui-button v11.0.1
|
|
3
3
|
© 2025 gizmette.com
|
|
4
4
|
*/
|
|
5
5
|
try {
|
|
6
6
|
if (!window.__VERSINI_UI_BUTTON__) {
|
|
7
7
|
window.__VERSINI_UI_BUTTON__ = {
|
|
8
|
-
version: "11.0.
|
|
9
|
-
buildTime: "12/
|
|
8
|
+
version: "11.0.1",
|
|
9
|
+
buildTime: "12/24/2025 09:19 AM EST",
|
|
10
10
|
homepage: "https://www.npmjs.com/package/@versini/ui-button",
|
|
11
11
|
license: "MIT",
|
|
12
12
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
@versini/ui-button v11.0.
|
|
2
|
+
@versini/ui-button v11.0.1
|
|
3
3
|
© 2025 gizmette.com
|
|
4
4
|
*/
|
|
5
5
|
try {
|
|
6
6
|
if (!window.__VERSINI_UI_BUTTON__) {
|
|
7
7
|
window.__VERSINI_UI_BUTTON__ = {
|
|
8
|
-
version: "11.0.
|
|
9
|
-
buildTime: "12/
|
|
8
|
+
version: "11.0.1",
|
|
9
|
+
buildTime: "12/24/2025 09:19 AM EST",
|
|
10
10
|
homepage: "https://www.npmjs.com/package/@versini/ui-button",
|
|
11
11
|
license: "MIT",
|
|
12
12
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
@versini/ui-button v11.0.
|
|
2
|
+
@versini/ui-button v11.0.1
|
|
3
3
|
© 2025 gizmette.com
|
|
4
4
|
*/
|
|
5
5
|
try {
|
|
6
6
|
if (!window.__VERSINI_UI_BUTTON__) {
|
|
7
7
|
window.__VERSINI_UI_BUTTON__ = {
|
|
8
|
-
version: "11.0.
|
|
9
|
-
buildTime: "12/
|
|
8
|
+
version: "11.0.1",
|
|
9
|
+
buildTime: "12/24/2025 09:19 AM EST",
|
|
10
10
|
homepage: "https://www.npmjs.com/package/@versini/ui-button",
|
|
11
11
|
license: "MIT",
|
|
12
12
|
};
|
|
@@ -97,14 +97,14 @@ const ButtonIcon = /*#__PURE__*/ react.forwardRef(({ children, disabled = false,
|
|
|
97
97
|
* Effect to calculate the buffer to add to the width of the button to
|
|
98
98
|
* account for the icon, paddings and borders.
|
|
99
99
|
*/ useLayoutEffect(()=>{
|
|
100
|
-
/* v8 ignore
|
|
100
|
+
/* v8 ignore start */ if (iconRef && iconRef.current && animated) {
|
|
101
101
|
bufferRef.current = rectIcon.width + PADDINGS[size] + (noBorder ? 0 : BORDERS);
|
|
102
102
|
// Set initial button width if it hasn't been set yet
|
|
103
103
|
if (buttonRef.current && !buttonRef.current.style.width) {
|
|
104
104
|
buttonRef.current.style.width = `${WIDTH[size]}px`;
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
}, [
|
|
107
|
+
/* v8 ignore stop */ }, [
|
|
108
108
|
rectIcon,
|
|
109
109
|
iconRef,
|
|
110
110
|
size,
|
|
@@ -115,7 +115,7 @@ const ButtonIcon = /*#__PURE__*/ react.forwardRef(({ children, disabled = false,
|
|
|
115
115
|
* Effect to update the width of the button based on the visibility of
|
|
116
116
|
* the right and left labels.
|
|
117
117
|
*/ useLayoutEffect(()=>{
|
|
118
|
-
/* v8 ignore
|
|
118
|
+
/* v8 ignore start */ if (buttonRef && buttonRef.current && animated) {
|
|
119
119
|
// Calculate the target width first
|
|
120
120
|
let newWidth = WIDTH[size];
|
|
121
121
|
if (labelRight && labelRightRef && rectR.width > 0) {
|
|
@@ -161,7 +161,7 @@ const ButtonIcon = /*#__PURE__*/ react.forwardRef(({ children, disabled = false,
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
-
}, [
|
|
164
|
+
/* v8 ignore stop */ }, [
|
|
165
165
|
rectR,
|
|
166
166
|
labelRight,
|
|
167
167
|
labelRightRef,
|
|
@@ -172,14 +172,14 @@ const ButtonIcon = /*#__PURE__*/ react.forwardRef(({ children, disabled = false,
|
|
|
172
172
|
animated
|
|
173
173
|
]);
|
|
174
174
|
// Clean up timeout on unmount
|
|
175
|
-
/* v8 ignore
|
|
175
|
+
/* v8 ignore start */ useEffect(()=>{
|
|
176
176
|
return ()=>{
|
|
177
177
|
if (timeoutRef.current) {
|
|
178
178
|
clearTimeout(timeoutRef.current);
|
|
179
179
|
}
|
|
180
180
|
};
|
|
181
181
|
}, []);
|
|
182
|
-
return /*#__PURE__*/ jsx(BaseButton_private, {
|
|
182
|
+
/* v8 ignore stop */ return /*#__PURE__*/ jsx(BaseButton_private, {
|
|
183
183
|
ref: mergedRef,
|
|
184
184
|
className: buttonClass,
|
|
185
185
|
disabled: disabled,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
@versini/ui-button v11.0.
|
|
2
|
+
@versini/ui-button v11.0.1
|
|
3
3
|
© 2025 gizmette.com
|
|
4
4
|
*/
|
|
5
5
|
try {
|
|
6
6
|
if (!window.__VERSINI_UI_BUTTON__) {
|
|
7
7
|
window.__VERSINI_UI_BUTTON__ = {
|
|
8
|
-
version: "11.0.
|
|
9
|
-
buildTime: "12/
|
|
8
|
+
version: "11.0.1",
|
|
9
|
+
buildTime: "12/24/2025 09:19 AM EST",
|
|
10
10
|
homepage: "https://www.npmjs.com/package/@versini/ui-button",
|
|
11
11
|
license: "MIT",
|
|
12
12
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
@versini/ui-button v11.0.
|
|
2
|
+
@versini/ui-button v11.0.1
|
|
3
3
|
© 2025 gizmette.com
|
|
4
4
|
*/
|
|
5
5
|
try {
|
|
6
6
|
if (!window.__VERSINI_UI_BUTTON__) {
|
|
7
7
|
window.__VERSINI_UI_BUTTON__ = {
|
|
8
|
-
version: "11.0.
|
|
9
|
-
buildTime: "12/
|
|
8
|
+
version: "11.0.1",
|
|
9
|
+
buildTime: "12/24/2025 09:19 AM EST",
|
|
10
10
|
homepage: "https://www.npmjs.com/package/@versini/ui-button",
|
|
11
11
|
license: "MIT",
|
|
12
12
|
};
|
|
@@ -112,12 +112,12 @@ const getButtonTextCopyClasses = ({ mode, noBackground, truncate, variant })=>{
|
|
|
112
112
|
"dark:text-copy-light": mode === "alt-system"
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
|
-
if (variant === "selected") {
|
|
115
|
+
/* v8 ignore start - selected variant edge case */ if (variant === "selected") {
|
|
116
116
|
return clsx("not-prose text-copy-lighter", {
|
|
117
117
|
truncate: truncate
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
|
-
};
|
|
120
|
+
/* v8 ignore stop */ };
|
|
121
121
|
const getButtonBackgroundClasses = ({ mode, noBackground, variant })=>{
|
|
122
122
|
if (noBackground) {
|
|
123
123
|
return;
|
|
@@ -146,10 +146,10 @@ const getButtonBackgroundClasses = ({ mode, noBackground, variant })=>{
|
|
|
146
146
|
"bg-action-danger-light dark:bg-action-danger-dark": mode === "alt-system"
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
|
-
if (variant === "selected") {
|
|
149
|
+
/* v8 ignore start - selected variant edge case */ if (variant === "selected") {
|
|
150
150
|
return "bg-action-selected-dark";
|
|
151
151
|
}
|
|
152
|
-
};
|
|
152
|
+
/* v8 ignore stop */ };
|
|
153
153
|
const getButtonRadiusClasses = ({ radius })=>{
|
|
154
154
|
return clsx({
|
|
155
155
|
"rounded-full": radius === "large",
|
|
@@ -193,10 +193,10 @@ const getButtonHoverClasses = ({ mode, disabled, variant })=>{
|
|
|
193
193
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": mode === "alt-system"
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
|
-
if (variant === "selected") {
|
|
196
|
+
/* v8 ignore start - selected variant edge case */ if (variant === "selected") {
|
|
197
197
|
return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
|
|
198
198
|
}
|
|
199
|
-
};
|
|
199
|
+
/* v8 ignore stop */ };
|
|
200
200
|
const getButtonActiveClasses = ({ mode, disabled, variant })=>{
|
|
201
201
|
if (disabled) {
|
|
202
202
|
return "";
|
|
@@ -233,10 +233,10 @@ const getButtonActiveClasses = ({ mode, disabled, variant })=>{
|
|
|
233
233
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": mode === "alt-system"
|
|
234
234
|
});
|
|
235
235
|
}
|
|
236
|
-
if (variant === "selected") {
|
|
236
|
+
/* v8 ignore start - selected variant edge case */ if (variant === "selected") {
|
|
237
237
|
return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
|
|
238
238
|
}
|
|
239
|
-
};
|
|
239
|
+
/* v8 ignore stop */ };
|
|
240
240
|
const getButtonBorderClasses = ({ mode, noBorder, variant })=>{
|
|
241
241
|
if (noBorder) {
|
|
242
242
|
return "border border-transparent";
|
|
@@ -265,10 +265,10 @@ const getButtonBorderClasses = ({ mode, noBorder, variant })=>{
|
|
|
265
265
|
"border-border-danger-medium dark:border-border-danger-dark": mode === "alt-system"
|
|
266
266
|
});
|
|
267
267
|
}
|
|
268
|
-
if (variant === "selected") {
|
|
268
|
+
/* v8 ignore start - selected variant edge case */ if (variant === "selected") {
|
|
269
269
|
return "border border-border-selected-dark";
|
|
270
270
|
}
|
|
271
|
-
};
|
|
271
|
+
/* v8 ignore stop */ };
|
|
272
272
|
const getButtonFocusClasses = ({ focusMode })=>{
|
|
273
273
|
return clsx("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
274
274
|
"focus:outline-focus-dark": focusMode === "dark",
|
|
@@ -304,12 +304,13 @@ const getIconClasses = ({ mode, raw, iconClassName, variant = "primary" })=>{
|
|
|
304
304
|
"dark:text-copy-lighter": mode === "system",
|
|
305
305
|
"dark:text-copy-light": mode === "alt-system"
|
|
306
306
|
};
|
|
307
|
-
}
|
|
307
|
+
}
|
|
308
|
+
/* v8 ignore start - selected variant edge case */ if (variant === "selected") {
|
|
308
309
|
textColorClasses = {
|
|
309
310
|
"text-copy-lighter": true
|
|
310
311
|
};
|
|
311
312
|
}
|
|
312
|
-
return clsx(textColorClasses, iconClassName);
|
|
313
|
+
/* v8 ignore stop */ return clsx(textColorClasses, iconClassName);
|
|
313
314
|
};
|
|
314
315
|
const getButtonIconLabelClasses = ({ animated })=>{
|
|
315
316
|
return clsx({
|
package/dist/components/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
@versini/ui-button v11.0.
|
|
2
|
+
@versini/ui-button v11.0.1
|
|
3
3
|
© 2025 gizmette.com
|
|
4
4
|
*/
|
|
5
5
|
try {
|
|
6
6
|
if (!window.__VERSINI_UI_BUTTON__) {
|
|
7
7
|
window.__VERSINI_UI_BUTTON__ = {
|
|
8
|
-
version: "11.0.
|
|
9
|
-
buildTime: "12/
|
|
8
|
+
version: "11.0.1",
|
|
9
|
+
buildTime: "12/24/2025 09:19 AM EST",
|
|
10
10
|
homepage: "https://www.npmjs.com/package/@versini/ui-button",
|
|
11
11
|
license: "MIT",
|
|
12
12
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
@versini/ui-button v11.0.
|
|
2
|
+
@versini/ui-button v11.0.1
|
|
3
3
|
© 2025 gizmette.com
|
|
4
4
|
*/
|
|
5
5
|
try {
|
|
6
6
|
if (!window.__VERSINI_UI_BUTTON__) {
|
|
7
7
|
window.__VERSINI_UI_BUTTON__ = {
|
|
8
|
-
version: "11.0.
|
|
9
|
-
buildTime: "12/
|
|
8
|
+
version: "11.0.1",
|
|
9
|
+
buildTime: "12/24/2025 09:19 AM EST",
|
|
10
10
|
homepage: "https://www.npmjs.com/package/@versini/ui-button",
|
|
11
11
|
license: "MIT",
|
|
12
12
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
@versini/ui-button v11.0.
|
|
2
|
+
@versini/ui-button v11.0.1
|
|
3
3
|
© 2025 gizmette.com
|
|
4
4
|
*/
|
|
5
5
|
try {
|
|
6
6
|
if (!window.__VERSINI_UI_BUTTON__) {
|
|
7
7
|
window.__VERSINI_UI_BUTTON__ = {
|
|
8
|
-
version: "11.0.
|
|
9
|
-
buildTime: "12/
|
|
8
|
+
version: "11.0.1",
|
|
9
|
+
buildTime: "12/24/2025 09:19 AM EST",
|
|
10
10
|
homepage: "https://www.npmjs.com/package/@versini/ui-button",
|
|
11
11
|
license: "MIT",
|
|
12
12
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-button",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@tailwindcss/typography": "0.5.19",
|
|
70
|
-
"@versini/ui-hooks": "6.0.
|
|
70
|
+
"@versini/ui-hooks": "6.0.1",
|
|
71
71
|
"@versini/ui-icons": "4.15.1",
|
|
72
72
|
"clsx": "2.1.1",
|
|
73
73
|
"tailwindcss": "4.1.18"
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"sideEffects": [
|
|
76
76
|
"**/*.css"
|
|
77
77
|
],
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "7b2640a0650a4c3aa6ca078888f765cb400f9f13"
|
|
79
79
|
}
|