@pagamio/frontend-commons-lib 0.8.314 → 0.8.316
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.
|
@@ -26,7 +26,7 @@ const sizeStyles = {
|
|
|
26
26
|
const Spinner = () => (_jsxs("svg", { className: "mr-2 h-4 w-4 animate-spin", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", children: [_jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), _jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z" })] }));
|
|
27
27
|
const Button = React.forwardRef(({ className, variant = 'primary', size = 'default', asChild = false, href, pill = false, loading = false, fullWidth = false, disabled = false, children, ...props }, ref) => {
|
|
28
28
|
const isDisabled = disabled || loading;
|
|
29
|
-
const baseStyles = 'inline-flex items-center justify-center font-semibold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50';
|
|
29
|
+
const baseStyles = 'inline-flex items-center justify-center gap-2 whitespace-nowrap font-semibold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50';
|
|
30
30
|
const classes = cn(baseStyles, variantStyles[variant], sizeStyles[size], pill ? 'rounded-full' : 'rounded-md', fullWidth && 'w-full', loading && 'cursor-wait', isDisabled && !loading && 'bg-gray-400 text-white cursor-not-allowed', className);
|
|
31
31
|
// Render as <a> when href is provided
|
|
32
32
|
if (href) {
|
|
@@ -33,7 +33,7 @@ const MEDIUM_PATTERNS = /^(type|role|category|unit|sku|code|currency|country|met
|
|
|
33
33
|
const LARGE_PATTERNS = /(name|description|address|email|message|label|title|product|item|note)/i;
|
|
34
34
|
function inferColumnSize(id) {
|
|
35
35
|
if (id === 'actions')
|
|
36
|
-
return { size:
|
|
36
|
+
return { size: 130, grow: false };
|
|
37
37
|
if (TINY_PATTERNS.test(id))
|
|
38
38
|
return { size: 60, grow: false };
|
|
39
39
|
if (STATUS_PATTERNS.test(id))
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pagamio/frontend-commons-lib",
|
|
3
3
|
"description": "Pagamio library for Frontend reusable components like the form engine and table container",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.316",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
7
7
|
"provenance": false
|