allaw-ui 4.2.2 → 4.2.3

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.
@@ -49,6 +49,7 @@ export interface ModalProps {
49
49
  left?: number;
50
50
  right?: number;
51
51
  };
52
+ confirmDisabled?: boolean;
52
53
  }
53
54
  declare const Modal: React.FC<ModalProps>;
54
55
  export default Modal;
@@ -26,7 +26,7 @@ import SecondaryButton from "../../atoms/buttons/SecondaryButton";
26
26
  import Heading from "../../atoms/typography/Heading";
27
27
  import Paragraph from "../../atoms/typography/Paragraph";
28
28
  var Modal = function (_a) {
29
- var show = _a.show, title = _a.title, description = _a.description, confirmLabel = _a.confirmLabel, cancelLabel = _a.cancelLabel, onConfirm = _a.onConfirm, onCancel = _a.onCancel, _b = _a.isDanger, isDanger = _b === void 0 ? false : _b, _c = _a.confirmIconName, confirmIconName = _c === void 0 ? "allaw-icon-check" : _c, imageConfig = _a.imageConfig, children = _a.children, customContent = _a.customContent, renderContent = _a.renderContent, maxWidthConfig = _a.maxWidthConfig, verticalOffset = _a.verticalOffset, horizontalOffset = _a.horizontalOffset;
29
+ var show = _a.show, title = _a.title, description = _a.description, confirmLabel = _a.confirmLabel, cancelLabel = _a.cancelLabel, onConfirm = _a.onConfirm, onCancel = _a.onCancel, _b = _a.isDanger, isDanger = _b === void 0 ? false : _b, _c = _a.confirmIconName, confirmIconName = _c === void 0 ? "allaw-icon-check" : _c, imageConfig = _a.imageConfig, children = _a.children, customContent = _a.customContent, renderContent = _a.renderContent, maxWidthConfig = _a.maxWidthConfig, verticalOffset = _a.verticalOffset, horizontalOffset = _a.horizontalOffset, confirmDisabled = _a.confirmDisabled;
30
30
  var _d = useState(false), isVisible = _d[0], setIsVisible = _d[1];
31
31
  var _e = useState(false), imgError = _e[0], setImgError = _e[1];
32
32
  var portalContainerRef = useRef(null);
@@ -106,7 +106,7 @@ var Modal = function (_a) {
106
106
  React.createElement("img", { src: imageConfig.url, alt: imageConfig.alt || "", width: imageConfig.width, height: imageConfig.height, onError: handleImageError, className: style.modalImage })))),
107
107
  React.createElement("footer", { className: style.modalFooter },
108
108
  cancelLabel && (React.createElement(SecondaryButton, { label: cancelLabel, onClick: onCancel, startIconName: "allaw-icon-close", startIcon: true })),
109
- React.createElement(PrimaryButton, { label: confirmLabel, variant: isDanger ? "warning" : "default", onClick: onConfirm, startIconName: confirmIconName, startIcon: true }))));
109
+ React.createElement(PrimaryButton, { label: confirmLabel, variant: isDanger ? "warning" : "default", onClick: onConfirm, startIconName: confirmIconName, startIcon: true, disabled: confirmDisabled }))));
110
110
  };
111
111
  // Générer les styles pour la largeur maximale responsive
112
112
  var getMaxWidthStyles = function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "4.2.2",
3
+ "version": "4.2.3",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",