@synerise/ds-confirmation 2.0.2 → 2.0.4
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/CHANGELOG.md +10 -0
- package/dist/Confirmation.d.ts +1 -1
- package/dist/Confirmation.js +7 -2
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.0.4](https://github.com/Synerise/synerise-design/compare/@synerise/ds-confirmation@2.0.3...@synerise/ds-confirmation@2.0.4) (2026-09-16)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **confirmation:** forget the related-objects panel once the modal closes ([78350f2](https://github.com/Synerise/synerise-design/commit/78350f21adde871a8479b9bb0b73dda65c65fe1c))
|
|
11
|
+
|
|
12
|
+
## [2.0.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-confirmation@2.0.2...@synerise/ds-confirmation@2.0.3) (2026-09-08)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @synerise/ds-confirmation
|
|
15
|
+
|
|
6
16
|
## [2.0.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-confirmation@2.0.1...@synerise/ds-confirmation@2.0.2) (2026-09-07)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @synerise/ds-confirmation
|
package/dist/Confirmation.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ListItemProps } from '@synerise/ds-list-item';
|
|
3
3
|
import { ConfirmationProps } from './Confirmation.types';
|
|
4
|
-
declare const Confirmation: <ItemType extends ListItemProps>({ type, texts, title, description, onCancel, onOk, icon, batchActionItems, decisionOptions, relatedObjects, additionalInfo, secondaryButtonProps, mainButtonProps, customFooterComponent, ...modalProps }: ConfirmationProps<ItemType>) => React.JSX.Element;
|
|
4
|
+
declare const Confirmation: <ItemType extends ListItemProps>({ type, texts, title, description, onCancel, onOk, icon, batchActionItems, decisionOptions, relatedObjects, additionalInfo, secondaryButtonProps, mainButtonProps, customFooterComponent, afterClose, ...modalProps }: ConfirmationProps<ItemType>) => React.JSX.Element;
|
|
5
5
|
export default Confirmation;
|
package/dist/Confirmation.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useMemo } from "react";
|
|
2
|
+
import { useState, useCallback, useMemo } from "react";
|
|
3
3
|
import Button from "@synerise/ds-button";
|
|
4
4
|
import { useTheme } from "@synerise/ds-core";
|
|
5
5
|
import Icon, { ShowM, ArrowLeftM } from "@synerise/ds-icon";
|
|
@@ -27,11 +27,16 @@ const Confirmation = ({
|
|
|
27
27
|
secondaryButtonProps,
|
|
28
28
|
mainButtonProps,
|
|
29
29
|
customFooterComponent,
|
|
30
|
+
afterClose,
|
|
30
31
|
...modalProps
|
|
31
32
|
}) => {
|
|
32
33
|
const [mode, setMode] = useState("default");
|
|
33
34
|
const theme = useTheme();
|
|
34
35
|
const allTexts = useDefaultTexts(texts);
|
|
36
|
+
const handleAfterClose = useCallback(() => {
|
|
37
|
+
setMode("default");
|
|
38
|
+
afterClose?.();
|
|
39
|
+
}, [afterClose]);
|
|
35
40
|
const buttonColor = BUTTON_COLOR_MAPPING[type];
|
|
36
41
|
const iconColor = getIconColor(type, theme);
|
|
37
42
|
const modalContent = useMemo(() => {
|
|
@@ -67,7 +72,7 @@ const Confirmation = ({
|
|
|
67
72
|
/* @__PURE__ */ jsx(Icon, { onClick: () => setMode("default"), component: /* @__PURE__ */ jsx(ArrowLeftM, {}) }),
|
|
68
73
|
allTexts.relatedObjectsTitle
|
|
69
74
|
] }) : void 0;
|
|
70
|
-
return /* @__PURE__ */ jsx(Modal, { ...modalProps, onCancel, size: "small", centered: true, blank: mode === "default", footer: modalFooter, bodyFullWidth: true, title: modalTitle, children: modalContent });
|
|
75
|
+
return /* @__PURE__ */ jsx(Modal, { ...modalProps, onCancel, size: "small", centered: true, blank: mode === "default", footer: modalFooter, bodyFullWidth: true, afterClose: handleAfterClose, title: modalTitle, children: modalContent });
|
|
71
76
|
};
|
|
72
77
|
export {
|
|
73
78
|
Confirmation as default
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-confirmation",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "Confirmation UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -42,15 +42,15 @@
|
|
|
42
42
|
],
|
|
43
43
|
"types": "dist/index.d.ts",
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@synerise/ds-button": "^2.0.
|
|
46
|
-
"@synerise/ds-icon": "^2.1.
|
|
47
|
-
"@synerise/ds-list-item": "^2.0
|
|
48
|
-
"@synerise/ds-modal": "^2.0.
|
|
49
|
-
"@synerise/ds-panel": "^2.0.
|
|
50
|
-
"@synerise/ds-radio": "^2.0.
|
|
51
|
-
"@synerise/ds-scrollbar": "^2.0.
|
|
52
|
-
"@synerise/ds-typography": "^2.0.
|
|
53
|
-
"@synerise/ds-utils": "^2.
|
|
45
|
+
"@synerise/ds-button": "^2.0.3",
|
|
46
|
+
"@synerise/ds-icon": "^2.1.1",
|
|
47
|
+
"@synerise/ds-list-item": "^2.1.0",
|
|
48
|
+
"@synerise/ds-modal": "^2.0.4",
|
|
49
|
+
"@synerise/ds-panel": "^2.0.3",
|
|
50
|
+
"@synerise/ds-radio": "^2.0.3",
|
|
51
|
+
"@synerise/ds-scrollbar": "^2.0.2",
|
|
52
|
+
"@synerise/ds-typography": "^2.0.3",
|
|
53
|
+
"@synerise/ds-utils": "^2.1.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@synerise/ds-core": "*",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"styled-components": "^5.3.3",
|
|
60
60
|
"vitest": "4"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "71f08fdaba8e7b80731e29a03883dc6a33f2b9db"
|
|
63
63
|
}
|