@adiba-banking-cloud/backoffice 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/build/index.cjs.js/index.js +19 -11
- package/build/index.esm.js/index.js +19 -11
- package/build/typings/components/modals/simple/Simple.stories.d.ts +6 -0
- package/build/typings/shared/hooks/modals/useManagedModals.d.ts +0 -1
- package/build/typings/shared/hooks/modals/useModal.types.d.ts +7 -10
- package/package.json +1 -1
|
@@ -13122,13 +13122,19 @@ const SimpleModal = _ref => {
|
|
|
13122
13122
|
} = _ref;
|
|
13123
13123
|
_objectWithoutProperties(_ref, _excluded$1);
|
|
13124
13124
|
return /*#__PURE__*/React.createElement(core.Stack, {
|
|
13125
|
-
|
|
13126
|
-
}, /*#__PURE__*/React.createElement(core.
|
|
13127
|
-
|
|
13128
|
-
|
|
13129
|
-
|
|
13130
|
-
|
|
13131
|
-
|
|
13125
|
+
p: "md"
|
|
13126
|
+
}, /*#__PURE__*/React.createElement(core.Stack, {
|
|
13127
|
+
align: "center",
|
|
13128
|
+
gap: "lg"
|
|
13129
|
+
}, /*#__PURE__*/React.createElement(core.Title, {
|
|
13130
|
+
order: 3,
|
|
13131
|
+
fw: 500,
|
|
13132
|
+
h: 40
|
|
13133
|
+
}, innerProps.title), /*#__PURE__*/React.createElement(React.Fragment, null, innerProps.modalBody)), /*#__PURE__*/React.createElement(core.Group, _extends({
|
|
13134
|
+
gap: "sm"
|
|
13135
|
+
}, innerProps.groupProps, {
|
|
13136
|
+
grow: true
|
|
13137
|
+
}), /*#__PURE__*/React.createElement(core.Button, _extends({
|
|
13132
13138
|
hidden: !((_innerProps$cancelPro = innerProps.cancelProps) !== null && _innerProps$cancelPro !== void 0 && _innerProps$cancelPro.label)
|
|
13133
13139
|
}, innerProps.cancelProps, {
|
|
13134
13140
|
onClick: () => context.closeModal(id),
|
|
@@ -13184,7 +13190,7 @@ const TwoFactorModal = _ref => {
|
|
|
13184
13190
|
return /*#__PURE__*/React.createElement(core.Stack, {
|
|
13185
13191
|
align: "center",
|
|
13186
13192
|
py: 40,
|
|
13187
|
-
gap: "
|
|
13193
|
+
gap: "lg"
|
|
13188
13194
|
}, /*#__PURE__*/React.createElement(core.Title, {
|
|
13189
13195
|
order: 3,
|
|
13190
13196
|
fw: 500,
|
|
@@ -13298,7 +13304,10 @@ const useModal = () => {
|
|
|
13298
13304
|
title,
|
|
13299
13305
|
message,
|
|
13300
13306
|
size = "md",
|
|
13301
|
-
buttonProps
|
|
13307
|
+
buttonProps = {
|
|
13308
|
+
confirmProps,
|
|
13309
|
+
cancelProps
|
|
13310
|
+
}
|
|
13302
13311
|
} = _ref3;
|
|
13303
13312
|
return modals.modals.openContextModal({
|
|
13304
13313
|
modal: "SimpleModal",
|
|
@@ -13365,8 +13374,7 @@ const useManagedModals = () => {
|
|
|
13365
13374
|
ErrorModal: ErrorModal,
|
|
13366
13375
|
InfoModal: InfoModal,
|
|
13367
13376
|
SimpleModal: SimpleModal,
|
|
13368
|
-
SuccessModal: SuccessModal
|
|
13369
|
-
TwoFactorModal: TwoFactorModal
|
|
13377
|
+
SuccessModal: SuccessModal
|
|
13370
13378
|
};
|
|
13371
13379
|
};
|
|
13372
13380
|
|
|
@@ -13101,13 +13101,19 @@ const SimpleModal = _ref => {
|
|
|
13101
13101
|
} = _ref;
|
|
13102
13102
|
_objectWithoutProperties(_ref, _excluded$1);
|
|
13103
13103
|
return /*#__PURE__*/React.createElement(Stack, {
|
|
13104
|
-
|
|
13105
|
-
}, /*#__PURE__*/React.createElement(
|
|
13106
|
-
|
|
13107
|
-
|
|
13108
|
-
|
|
13109
|
-
|
|
13110
|
-
|
|
13104
|
+
p: "md"
|
|
13105
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
13106
|
+
align: "center",
|
|
13107
|
+
gap: "lg"
|
|
13108
|
+
}, /*#__PURE__*/React.createElement(Title, {
|
|
13109
|
+
order: 3,
|
|
13110
|
+
fw: 500,
|
|
13111
|
+
h: 40
|
|
13112
|
+
}, innerProps.title), /*#__PURE__*/React.createElement(React.Fragment, null, innerProps.modalBody)), /*#__PURE__*/React.createElement(Group, _extends({
|
|
13113
|
+
gap: "sm"
|
|
13114
|
+
}, innerProps.groupProps, {
|
|
13115
|
+
grow: true
|
|
13116
|
+
}), /*#__PURE__*/React.createElement(Button, _extends({
|
|
13111
13117
|
hidden: !((_innerProps$cancelPro = innerProps.cancelProps) !== null && _innerProps$cancelPro !== void 0 && _innerProps$cancelPro.label)
|
|
13112
13118
|
}, innerProps.cancelProps, {
|
|
13113
13119
|
onClick: () => context.closeModal(id),
|
|
@@ -13163,7 +13169,7 @@ const TwoFactorModal = _ref => {
|
|
|
13163
13169
|
return /*#__PURE__*/React.createElement(Stack, {
|
|
13164
13170
|
align: "center",
|
|
13165
13171
|
py: 40,
|
|
13166
|
-
gap: "
|
|
13172
|
+
gap: "lg"
|
|
13167
13173
|
}, /*#__PURE__*/React.createElement(Title, {
|
|
13168
13174
|
order: 3,
|
|
13169
13175
|
fw: 500,
|
|
@@ -13277,7 +13283,10 @@ const useModal = () => {
|
|
|
13277
13283
|
title,
|
|
13278
13284
|
message,
|
|
13279
13285
|
size = "md",
|
|
13280
|
-
buttonProps
|
|
13286
|
+
buttonProps = {
|
|
13287
|
+
confirmProps,
|
|
13288
|
+
cancelProps
|
|
13289
|
+
}
|
|
13281
13290
|
} = _ref3;
|
|
13282
13291
|
return modals.openContextModal({
|
|
13283
13292
|
modal: "SimpleModal",
|
|
@@ -13344,8 +13353,7 @@ const useManagedModals = () => {
|
|
|
13344
13353
|
ErrorModal: ErrorModal,
|
|
13345
13354
|
InfoModal: InfoModal,
|
|
13346
13355
|
SimpleModal: SimpleModal,
|
|
13347
|
-
SuccessModal: SuccessModal
|
|
13348
|
-
TwoFactorModal: TwoFactorModal
|
|
13356
|
+
SuccessModal: SuccessModal
|
|
13349
13357
|
};
|
|
13350
13358
|
};
|
|
13351
13359
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta } from "@storybook/react";
|
|
2
|
+
import "@mantine/core/styles.css";
|
|
3
|
+
import { SimpleModal } from "./Simple";
|
|
4
|
+
declare const _default: Meta<typeof SimpleModal>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const SimpleModalExample: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("@mantine/modals").ContextModalProps<import("./Simple.types").SimpleModalProps>>;
|
|
@@ -17,5 +17,4 @@ export declare const useManagedModals: () => {
|
|
|
17
17
|
onClick: () => void;
|
|
18
18
|
};
|
|
19
19
|
}>) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
TwoFactorModal: ({ children, title, pinLength, }: import("../../../components/modals/twofactor/Twofactor.types").TwoFactorModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
20
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ButtonProps } from "@mantine/core";
|
|
1
2
|
import { OpenConfirmModal } from "@mantine/modals/lib/context";
|
|
2
3
|
export type SuccessModalProps = {
|
|
3
4
|
title?: string;
|
|
@@ -20,16 +21,8 @@ export type SimpleModalProps = {
|
|
|
20
21
|
message?: React.ReactNode;
|
|
21
22
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | number;
|
|
22
23
|
buttonProps?: {
|
|
23
|
-
confirmProps?:
|
|
24
|
-
|
|
25
|
-
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
26
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl" | number;
|
|
27
|
-
};
|
|
28
|
-
cancelProps?: {
|
|
29
|
-
label?: string;
|
|
30
|
-
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
31
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl" | number;
|
|
32
|
-
};
|
|
24
|
+
confirmProps?: SimpleModalButtonProps;
|
|
25
|
+
cancelProps?: SimpleModalButtonProps;
|
|
33
26
|
};
|
|
34
27
|
};
|
|
35
28
|
export interface TwoFactorVerificationModalProps extends OpenConfirmModal {
|
|
@@ -38,3 +31,7 @@ export interface TwoFactorVerificationModalProps extends OpenConfirmModal {
|
|
|
38
31
|
onConfirm?: () => void;
|
|
39
32
|
pinLength?: number;
|
|
40
33
|
}
|
|
34
|
+
interface SimpleModalButtonProps extends ButtonProps {
|
|
35
|
+
label?: string;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
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.
|
|
4
|
+
"version": "0.0.52",
|
|
5
5
|
"description": "An ADIBA component library for backoffice and dashboard applications",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"main": "build/index.cjs.js",
|