@seeqdev/qomponents 0.0.120 → 0.0.122

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.
@@ -44,4 +44,5 @@ export interface ModalProps {
44
44
  keepFocusInsideModal?: boolean;
45
45
  submitButtonVariant?: ButtonVariant;
46
46
  onPointerDownOutside?: (e: Event) => void;
47
+ onInteractOutside?: (e: Event) => void;
47
48
  }
package/dist/index.esm.js CHANGED
@@ -13775,7 +13775,7 @@ const DialogTitle = React__default.forwardRef((props, ref) => React__default.cre
13775
13775
  DialogTitle.displayName = $5d3850c4d0b4e6c7$export$f99233281efd08a0.displayName;
13776
13776
  const DialogDescription = React__default.forwardRef((props, ref) => React__default.createElement($5d3850c4d0b4e6c7$export$393edc798c47379d, { ref: ref, ...props }));
13777
13777
  DialogDescription.displayName = $5d3850c4d0b4e6c7$export$393edc798c47379d.displayName;
13778
- 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__default.createElement(React__default.Fragment, null), customButtonVariant = 'outline', submitButtonVariant = 'theme', keepFocusInsideModal = true, onPointerDownOutside, }) => {
13778
+ 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__default.createElement(React__default.Fragment, null), customButtonVariant = 'outline', submitButtonVariant = 'theme', keepFocusInsideModal = true, onPointerDownOutside, onInteractOutside, }) => {
13779
13779
  const [isLoading, setIsLoading] = useState(false);
13780
13780
  // the Dialog is adding pointerEvents: none to body and the dropdowns from the modal does not work anymore
13781
13781
  useEffect(() => {
@@ -13823,7 +13823,7 @@ const Modal = ({ titleIcon, title = 'Modal title example', titleSuffixLabel, sub
13823
13823
  titleIcon && titleIconPosition === 'right' ? React__default.createElement("div", { className: "tw-flex tw-ml-4" }, titleIconElement) : React__default.createElement(React__default.Fragment, null)));
13824
13824
  };
13825
13825
  return open ? (React__default.createElement(Dialog, { open: true, onOpenChange: onClose, modal: keepFocusInsideModal },
13826
- React__default.createElement(DialogContent, { onPointerDownOutside: (e) => (onPointerDownOutside ? 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`, {
13826
+ React__default.createElement(DialogContent, { onPointerDownOutside: (e) => (onPointerDownOutside ? onPointerDownOutside(e) : e.preventDefault()), onInteractOutside: (e) => (onInteractOutside ? onInteractOutside(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`, {
13827
13827
  'tw-max-w-xs': size === 'xs',
13828
13828
  'tw-max-w-sm': size === 'sm',
13829
13829
  'tw-max-w-md': size === 'md',
@@ -14324,7 +14324,7 @@ const Tabs = ({ tabs, defaultActiveTab, activeTab, onTabSelect, extraClassNames,
14324
14324
  React__default.createElement("span", { className: `tw-text-[14px] tw-font-medium ${activeTab === id
14325
14325
  ? 'dark:tw-text-sq-dark-text tw-text-gray-500'
14326
14326
  : 'dark:tw-text-sq-color-dark-dark tw-text-sq-color-dark'}` }, label)))))),
14327
- tabs.map((tab, index) => (React__default.createElement($69cb30bb0017df05$export$7c6e2c02157bb7d2, { className: `tw-bg-sq-white dark:tw-bg-sq-dark-background tw-overflow-y-auto -tw-mt-[1px] tw-border-t-[1px] tw-z-[500] tw-flex tw-flex-col tw-flex-grow focus-visible:tw-outline-none ${tab.tabContentExtraClassNames || ''}`, key: `${tab.label}_${index}_content`, value: tab.id }, tab.content)))));
14327
+ tabs.map((tab, index) => (React__default.createElement($69cb30bb0017df05$export$7c6e2c02157bb7d2, { className: `tw-bg-sq-white dark:tw-bg-sq-dark-background tw-overflow-y-auto -tw-mt-[1px] tw-border-t-[1px] dark:tw-border-gray-700 tw-z-[500] tw-flex tw-flex-col tw-flex-grow focus-visible:tw-outline-none ${tab.tabContentExtraClassNames || ''}`, key: `${tab.label}_${index}_content`, value: tab.id }, tab.content)))));
14328
14328
  };
14329
14329
 
14330
14330
  /* -------------------------------------------------------------------------------------------------