@seeqdev/qomponents 0.0.50 → 0.0.52

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
@@ -13986,7 +13986,7 @@ const DialogTitle = React.forwardRef(({ className, ...props }, ref) => (React.cr
13986
13986
  DialogTitle.displayName = $5d3850c4d0b4e6c7$export$f99233281efd08a0.displayName;
13987
13987
  const DialogDescription = React.forwardRef(({ className, ...props }, ref) => (React.createElement($5d3850c4d0b4e6c7$export$393edc798c47379d, { ref: ref, className: `text-sm text-muted-foreground ${className}`, ...props })));
13988
13988
  DialogDescription.displayName = $5d3850c4d0b4e6c7$export$393edc798c47379d.displayName;
13989
- const Modal = ({ titleIcon, title = 'Modal title example', titleSuffixLabel, subtitle, children, open = false, onClose, customButton = false, customButtonLabel = 'Back', onClickCustomButton, submitButtonLabel = 'Submit', cancelButtonLabel = 'Cancel', disableSubmitButton = false, stopPropagationSubmitButton = false, onSubmit, isTitleEditable = false, onTitleChanged, inputExtraClassNames, hideCloseIcon = false, size = 'xl', titleIconPosition = 'left', hideFooterButtons = false, hideSubmitButton = false, hideCancelButton = false, testId = 'modal', modalFooter, dialogClassName, titlePlaceholder, titleRequired, titleError, submitButtonTooltip, cancelButtonTooltip, disableCustomButton, customHeader, middleFooterSection = React.createElement(React.Fragment, null), customButtonVariant = 'outline', }) => {
13989
+ const Modal = ({ titleIcon, title = 'Modal title example', titleSuffixLabel, subtitle, children, open = false, onClose, customButton = false, customButtonLabel = 'Back', onClickCustomButton, submitButtonLabel = 'Submit', cancelButtonLabel = 'Cancel', disableSubmitButton = false, stopPropagationSubmitButton = false, onSubmit, isTitleEditable = false, onTitleChanged, inputExtraClassNames, hideCloseIcon = false, size = 'xl', titleIconPosition = 'left', hideFooterButtons = false, hideSubmitButton = false, hideCancelButton = false, testId = 'modal', modalFooter, dialogClassName, titlePlaceholder, titleRequired, titleError, submitButtonTooltip, cancelButtonTooltip, disableCustomButton, customHeader, middleFooterSection = React.createElement(React.Fragment, null), customButtonVariant = 'outline', keepFocusInsideModal = true, }) => {
13990
13990
  // the Dialog is adding pointerEvents: none to body and the dropdowns from the modal does not work anymore
13991
13991
  React.useEffect(() => {
13992
13992
  if (open) {
@@ -14028,7 +14028,7 @@ const Modal = ({ titleIcon, title = 'Modal title example', titleSuffixLabel, sub
14028
14028
  titleIcon && titleIconPosition === 'right' ?
14029
14029
  React.createElement("div", { className: "tw-flex tw-ml-4" }, titleIconElement) : React.createElement(React.Fragment, null)));
14030
14030
  };
14031
- return open ? (React.createElement(Dialog, { open: true, onOpenChange: onClose, modal: false },
14031
+ return open ? (React.createElement(Dialog, { open: true, onOpenChange: onClose, modal: keepFocusInsideModal },
14032
14032
  React.createElement(DialogContent, { onPointerDownOutside: (e) => e.preventDefault(), "data-testid": testId, className: classNames(`modalContent tw-w-full !tw-p-0 tw-border-none tw-shadow-none dark:tw-text-sq-dark-text !tw-gap-0`, {
14033
14033
  'tw-max-w-xs': size === 'xs',
14034
14034
  'tw-max-w-sm': size === 'sm',