opus-toolkit-components 0.6.4 → 0.6.5
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.
|
@@ -3520,10 +3520,10 @@ function Button(_ref) {
|
|
|
3520
3520
|
const disabledStyles = 'bg-greyLight100 text-greyLight500 cursor-not-allowed';
|
|
3521
3521
|
|
|
3522
3522
|
// Icon animation style (if applicable)
|
|
3523
|
-
const iconClassNames = "
|
|
3523
|
+
const iconClassNames = "inline-block \n transition-transform \n ease-in-out \n duration-200\n h-5 w-5\n ".concat(iconPosition === 'right' ? 'ml-2' : 'mr-2', "\n ").concat(isIconAnimated && !isSaving ? 'group-hover:translate-x-1' : '', "\n ").concat(isSaving ? 'animate-spin' : '', " // Add spinning animation\n ");
|
|
3524
3524
|
|
|
3525
3525
|
// Main button class names
|
|
3526
|
-
const classNames = "\n ".concat(state === 'disabled' || isSaving ? disabledStyles : rankStyles[rank] || rankStyles.primary, "\n group\n transition \n ease-in-out \n duration-700 \n rounded-lg \n px-
|
|
3526
|
+
const classNames = " \n ".concat(state === 'disabled' || isSaving ? disabledStyles : rankStyles[rank] || rankStyles.primary, "\n group \n transition \n ease-in-out \n duration-700 \n rounded-lg \n px-5 \n py-2 \n text-").concat(size, " \n flex \n items-center \n justify-center \n whitespace-nowrap // Prevents text wrapping\n ").concat(isFullWidth ? 'w-full' : '', "\n ").concat(className, "\n ");
|
|
3527
3527
|
return /*#__PURE__*/external_react_default().createElement("button", {
|
|
3528
3528
|
type: type,
|
|
3529
3529
|
title: title,
|
|
@@ -3535,7 +3535,9 @@ function Button(_ref) {
|
|
|
3535
3535
|
className: iconClassNames
|
|
3536
3536
|
}) : iconPosition === 'left' && Icon && /*#__PURE__*/external_react_default().createElement(Icon, {
|
|
3537
3537
|
className: iconClassNames
|
|
3538
|
-
}),
|
|
3538
|
+
}), /*#__PURE__*/external_react_default().createElement("span", {
|
|
3539
|
+
className: isSaving ? 'ml-2' : ''
|
|
3540
|
+
}, isSaving ? savingText : text), !isSaving && iconPosition === 'right' && Icon && /*#__PURE__*/external_react_default().createElement(Icon, {
|
|
3539
3541
|
className: iconClassNames
|
|
3540
3542
|
}));
|
|
3541
3543
|
}
|
|
@@ -12242,7 +12244,7 @@ const Modal = _ref => {
|
|
|
12242
12244
|
footerClassName = "",
|
|
12243
12245
|
headerClassName = ""
|
|
12244
12246
|
} = _ref;
|
|
12245
|
-
if (!isOpen) return
|
|
12247
|
+
if (!isOpen) return true;
|
|
12246
12248
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
12247
12249
|
className: "fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"
|
|
12248
12250
|
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
@@ -12297,4 +12299,4 @@ function Loader(_ref) {
|
|
|
12297
12299
|
/******/ })()
|
|
12298
12300
|
;
|
|
12299
12301
|
});
|
|
12300
|
-
//# sourceMappingURL=main.
|
|
12302
|
+
//# sourceMappingURL=main.244fbb88a3d2e2437cf0.js.map
|