@seeqdev/qomponents 0.0.88 → 0.0.90

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.
Binary file
Binary file
@@ -7,3 +7,4 @@ export declare const AllModalsVariants: React.FunctionComponent;
7
7
  export declare const ModalsWithDisabledSubmit: React.FunctionComponent;
8
8
  export declare const ModalsWithEditableTitle: React.FunctionComponent;
9
9
  export declare const ModalsWithCustomButton: React.FunctionComponent;
10
+ export declare const ModalsWithVariantButton: React.FunctionComponent;
@@ -42,4 +42,5 @@ export interface ModalProps {
42
42
  middleFooterSection?: React.ReactElement;
43
43
  customButtonVariant?: ButtonVariant;
44
44
  keepFocusInsideModal?: boolean;
45
+ submitButtonVariant?: ButtonVariant;
45
46
  }
package/dist/index.esm.js CHANGED
@@ -14109,7 +14109,7 @@ const DialogTitle = React__default.forwardRef((props, ref) => React__default.cre
14109
14109
  DialogTitle.displayName = $5d3850c4d0b4e6c7$export$f99233281efd08a0.displayName;
14110
14110
  const DialogDescription = React__default.forwardRef((props, ref) => React__default.createElement($5d3850c4d0b4e6c7$export$393edc798c47379d, { ref: ref, ...props }));
14111
14111
  DialogDescription.displayName = $5d3850c4d0b4e6c7$export$393edc798c47379d.displayName;
14112
- 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', keepFocusInsideModal = true, }) => {
14112
+ 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, }) => {
14113
14113
  const [isLoading, setIsLoading] = useState(false);
14114
14114
  // the Dialog is adding pointerEvents: none to body and the dropdowns from the modal does not work anymore
14115
14115
  useEffect(() => {
@@ -14180,7 +14180,7 @@ const Modal = ({ titleIcon, title = 'Modal title example', titleSuffixLabel, sub
14180
14180
  React__default.createElement("div", { className: "tw-flex tw-items-center" }, middleFooterSection),
14181
14181
  !hideCancelButton && (React__default.createElement(DialogClose, { asChild: true },
14182
14182
  React__default.createElement(Button, { label: cancelButtonLabel, extraClassNames: "tw-mr-5 tw-min-w-[100px]", tooltip: cancelButtonTooltip, variant: "outline", stopPropagation: false, testId: "cancelButton" }))),
14183
- !hideSubmitButton && (React__default.createElement(Button, { label: submitButtonLabel, onClick: handleSubmit, disabled: disableSubmitButton || isLoading, variant: "theme", stopPropagation: stopPropagationSubmitButton, tooltip: submitButtonTooltip, icon: isLoading ? 'fc-loading-notch tw-animate-spin' : undefined, iconPosition: "left", testId: "submitButton", extraClassNames: "tw-min-w-[100px]" })))))))))) : (React__default.createElement(React__default.Fragment, null));
14183
+ !hideSubmitButton && (React__default.createElement(Button, { label: submitButtonLabel, onClick: handleSubmit, disabled: disableSubmitButton || isLoading, variant: submitButtonVariant, stopPropagation: stopPropagationSubmitButton, tooltip: submitButtonTooltip, icon: isLoading ? 'fc-loading-notch tw-animate-spin' : undefined, iconPosition: "left", testId: "submitButton", extraClassNames: "tw-min-w-[100px]" })))))))))) : (React__default.createElement(React__default.Fragment, null));
14184
14184
  };
14185
14185
 
14186
14186
  // We have resorted to returning slots directly rather than exposing primitives that can then