karsten-design-system 2.0.2 → 2.0.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.
package/dist/index.js CHANGED
@@ -882,7 +882,7 @@ function MegaMenu({ items }) {
882
882
  }) }));
883
883
  }
884
884
 
885
- function Modal({ isOpen, title, size = 'md', onClose, onConfirm, labelCloseButton = 'Fechar', labelConfirmButton = 'Confirmar', isExpanded = false, ariaLabel = 'Modal de informçoes', children, isLoading = false, shouldRenderButtons = true, }) {
885
+ function Modal({ isOpen, title, size = 'md', onClose, onConfirm, onClear, labelCloseButton = 'Fechar', labelConfirmButton = 'Confirmar', labelClearButton = 'Limpar', isExpanded = false, ariaLabel = 'Modal de informçoes', children, isLoading = false, shouldRenderButtons = true, }) {
886
886
  const [isFullScreen, setIsFullScreen] = useState(false);
887
887
  const toggleFullScreen = () => {
888
888
  setIsFullScreen(!isFullScreen);
@@ -925,7 +925,7 @@ function Modal({ isOpen, title, size = 'md', onClose, onConfirm, labelCloseButto
925
925
  width: '24px',
926
926
  height: '24px',
927
927
  cursor: 'pointer',
928
- }, children: jsx("i", { className: "pi pi-times cursor-pointer dark:text-light-500" }) })] })] }), jsx("div", { className: `flex-1 overflow-y-auto text-primary dark:text-light-500 dark:bg-dark-100 ${isFullScreen ? 'h-full' : 'max-h-[70vh]'} p-2`, children: children }), shouldRenderButtons && (jsxs("div", { className: "w-full flex flex-col sm:flex-row sm:justify-end pt-10 gap-4 px-6 dark:bg-dark-100", children: [onClose && (jsx(Button, { label: labelCloseButton, variant: "outline", onClick: onClose, className: "w-full sm:w-auto lg:min-w-[110px] md:min-w-[110px] px-4", "aria-label": "Fechar modal" })), onConfirm && (jsx(Button, { label: labelConfirmButton, variant: "primary", onClick: onConfirm, className: "w-full sm:w-auto lg:min-w-[110px] md:min-w-[110px] px-4", "aria-label": "Confirmar modal", type: "button", disabled: isLoading }))] }))] })] }));
928
+ }, children: jsx("i", { className: "pi pi-times cursor-pointer dark:text-light-500" }) })] })] }), jsx("div", { className: `flex-1 overflow-y-auto text-primary dark:text-light-500 dark:bg-dark-100 ${isFullScreen ? 'h-full' : 'max-h-[70vh]'} p-2`, children: children }), shouldRenderButtons && (jsxs("div", { className: "w-full flex flex-col sm:flex-row sm:justify-end pt-10 gap-4 px-6 dark:bg-dark-100", children: [onClose && (jsx(Button, { label: labelCloseButton, variant: "outline", onClick: onClose, className: "w-full sm:w-auto lg:min-w-[110px] md:min-w-[110px] px-4", "aria-label": "Fechar modal" })), onClear && (jsx(Button, { label: labelClearButton, variant: "secondary", onClick: onClear, className: "w-full sm:w-auto lg:min-w-[110px] md:min-w-[110px] px-4", "aria-label": "Confirmar modal", type: "button", disabled: isLoading })), onConfirm && (jsx(Button, { label: labelConfirmButton, variant: "primary", onClick: onConfirm, className: "w-full sm:w-auto lg:min-w-[110px] md:min-w-[110px] px-4", "aria-label": "Confirmar modal", type: "button", disabled: isLoading }))] }))] })] }));
929
929
  }
930
930
 
931
931
  function ModalForm({ isOpen, title, description, onClose, children, }) {