@adiba-banking-cloud/backoffice 0.0.80 → 0.0.82

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.
@@ -1,2 +1,2 @@
1
- import { ConfirmModalProps } from "@mantine/modals/lib/ConfirmModal";
2
- export declare const ConfirmModal: ({ children }: ConfirmModalProps) => import("react/jsx-runtime").JSX.Element;
1
+ import { BackofficeConfirmModalProps } from "./Confim.types";
2
+ export declare const ConfirmModal: ({ children, loading }: BackofficeConfirmModalProps) => import("react/jsx-runtime").JSX.Element;
@@ -3,4 +3,4 @@ import { ConfirmModal } from "./Confim";
3
3
  import '@mantine/core/styles.css';
4
4
  declare const _default: Meta<typeof ConfirmModal>;
5
5
  export default _default;
6
- export declare const ConfirmModalExample: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("@mantine/modals/lib/ConfirmModal").ConfirmModalProps>;
6
+ export declare const ConfirmModalExample: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./Confim.types").BackofficeConfirmModalProps>;
@@ -0,0 +1,4 @@
1
+ import { ConfirmModalProps } from "@mantine/modals/lib/ConfirmModal";
2
+ export interface BackofficeConfirmModalProps extends ConfirmModalProps {
3
+ loading?: boolean;
4
+ }
@@ -11,6 +11,7 @@ export interface SimpleModalProps {
11
11
  confirmProps?: SimpleModalButtonProps;
12
12
  cancelProps?: SimpleModalButtonProps;
13
13
  groupProps?: GroupProps;
14
+ isLoading?: boolean;
14
15
  }
15
16
  interface SimpleModalButtonProps extends ButtonProps {
16
17
  label?: string;
@@ -1,10 +1,9 @@
1
- import { OpenConfirmModal } from "@mantine/modals/lib/context";
2
- import { ErrorModalProps, SimpleModalProps, SuccessModalProps, TwoFactorVerificationModalProps } from "./useModal.types";
1
+ import { ConfirmationModalProps, ErrorModalProps, SimpleModalProps, SuccessModalProps, TwoFactorVerificationModalProps } from "./useModal.types";
3
2
  export declare const useModal: () => {
4
- ConfirmationModal: ({ title, children, onConfirm, labels, ...rest }: OpenConfirmModal) => string;
3
+ ConfirmationModal: ({ title, children, onConfirm, labels, loading, ...rest }: ConfirmationModalProps) => string;
5
4
  ErrorModal: ({ title, message, button, }: ErrorModalProps) => string;
6
5
  InfoModal: () => string;
7
- SimpleModal: ({ title, message, size, labels, }: SimpleModalProps) => string;
6
+ SimpleModal: ({ title, message, loading, size, labels, }: SimpleModalProps) => string;
8
7
  SuccessModal: ({ title, message, button, }: SuccessModalProps) => string;
9
- TwoFactorVerificationModal: ({ title, children, onConfirm, labels, pinLength, ...rest }: TwoFactorVerificationModalProps) => string;
8
+ TwoFactorVerificationModal: ({ title, children, loading, onConfirm, labels, pinLength, ...rest }: TwoFactorVerificationModalProps) => string;
10
9
  };
@@ -17,6 +17,7 @@ export type ErrorModalProps = {
17
17
  };
18
18
  };
19
19
  export type SimpleModalProps = {
20
+ loading?: boolean;
20
21
  title?: string;
21
22
  message?: React.ReactNode;
22
23
  size?: "xs" | "sm" | "md" | "lg" | "xl" | number;
@@ -31,8 +32,12 @@ export type SimpleModalProps = {
31
32
  };
32
33
  };
33
34
  export interface TwoFactorVerificationModalProps extends OpenConfirmModal {
35
+ loading?: boolean;
34
36
  title?: string;
35
37
  children?: React.ReactNode;
36
38
  onConfirm?: () => void;
37
39
  pinLength?: number;
38
40
  }
41
+ export interface ConfirmationModalProps extends OpenConfirmModal {
42
+ loading?: boolean;
43
+ }
@@ -6,6 +6,7 @@ export interface DrawerActionProps {
6
6
  drawerProps?: DrawerProps;
7
7
  }
8
8
  export interface ModalActionProps {
9
+ type: "confirmation" | "error" | "simple" | "success" | "2fa";
9
10
  title: string;
10
11
  children?: React.ReactNode;
11
12
  confirm?: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@adiba-banking-cloud/backoffice",
3
3
  "author": "TUROG Technologies",
4
- "version": "0.0.80",
4
+ "version": "0.0.82",
5
5
  "description": "An ADIBA component library for backoffice and dashboard applications",
6
6
  "license": "ISC",
7
7
  "main": "build/index.cjs.js",