@synerise/ds-modal 2.0.9 → 2.1.0
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 +19 -0
- package/CLAUDE.md +2 -2
- package/dist/Elements/ModalContent/ModalContent.styles.js +1 -1
- package/dist/Modal.types.d.ts +1 -1
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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.1.0](https://github.com/synerise/synerise-design/compare/@synerise/ds-modal@2.0.10...@synerise/ds-modal@2.1.0) (2026-10-26)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* 24px gutter around fullscreen modal, code-area and wizard ([3931816](https://github.com/synerise/synerise-design/commit/3931816398831f9a647b6ea2dbd26cb415af926c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [2.0.10](https://github.com/synerise/synerise-design/compare/@synerise/ds-modal@2.0.9...@synerise/ds-modal@2.0.10) (2026-10-22)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @synerise/ds-modal
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [2.0.9](https://github.com/synerise/synerise-design/compare/@synerise/ds-modal@2.0.8...@synerise/ds-modal@2.0.9) (2026-10-20)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-modal
|
package/CLAUDE.md
CHANGED
|
@@ -42,7 +42,7 @@ src/
|
|
|
42
42
|
| `open` | `boolean` | `false` | Whether the modal is visible |
|
|
43
43
|
| `destroyOnClose` | `boolean` | `false` | When true, unmounts children on close. When false, keeps mounted but hidden |
|
|
44
44
|
| `title` | `ReactNode` | — | Modal header title |
|
|
45
|
-
| `size` | `ModalSize` | — | Predefined width: `small` (520px), `medium` (792px), `large` (1044px), `extraLarge` (1280px), `fullSize` (100%), `fullScreen` (
|
|
45
|
+
| `size` | `ModalSize` | — | Predefined width: `small` (520px), `medium` (792px), `large` (1044px), `extraLarge` (1280px), `fullSize` (100%), `fullScreen` (fixed, 24px gutter on every side) |
|
|
46
46
|
| `bodyBackground` | `'white' \| 'grey'` | `'white'` | Background colour of the modal body |
|
|
47
47
|
| `blank` | `boolean` | — | Strips header/footer chrome; shows only a close button if `onCancel` is provided |
|
|
48
48
|
| `closable` | `boolean` | `true` | Whether the close button is shown (gated in ModalContent before reaching ModalTitle) |
|
|
@@ -168,7 +168,7 @@ document.body (portal target)
|
|
|
168
168
|
- **Close button:** Rendered by `ModalTitle` when `onCancel` is provided and `closable !== false`. `closable` is evaluated in `ModalContent` which gates `onCancel` before passing to `ModalTitle`.
|
|
169
169
|
- **Title render condition:** Header renders when at least one of `title`, `description`, `headerTabProps` is truthy. `headerBottomBar` renders independently.
|
|
170
170
|
- **Footer render logic:** `footer={null}` suppresses entirely. Explicit `footer` value overrides auto-generated `ModalFooter`. Omitted `footer` renders the default.
|
|
171
|
-
- **`fullScreen`** positions the modal `fixed
|
|
171
|
+
- **`fullScreen`** positions the modal `fixed`, inset 24px from every viewport edge so the mask shows around it; body scrolls via `overflow: scroll`.
|
|
172
172
|
- **`maxViewportHeight`** anchors the modal to the bottom of the viewport (sheet-style), not the centre.
|
|
173
173
|
- **Async handlers:** Both `onOk` and `onCancel` can return `Promise`. `onCancel` awaits the promise then calls `closeModal()`. `onOk` resolves then calls `closeModal()` only if the handler was detected as promise-returning via `'then' in onOk`.
|
|
174
174
|
- **Nested-modal stacking:** `ModalContent` resolves its z-index through `useResolvedOverlayZIndex` from `@synerise/ds-core` and re-publishes the result to its whole subtree via `OverlayZIndexProvider`, so a modal opened from inside another modal renders above it without either side coordinating. This cannot be left to DOM order: every modal portals to `document.body` and React commits the **innermost** portal first, so a nested modal ends up *before* its parent in the document. The provider wraps `ModalRoot` rather than just `children`, so a modal passed through `prefix` / `footer` / `headerActions` stacks too. An explicit `zIndex` always wins and is not clamped; derived values are clamped just below `zindex-dropdown` so a modal can never cover a dropdown, select, popconfirm or tooltip opened inside it. `showModal()` renders at `DSProvider` level, outside any modal's React subtree, so it never derives — pass `zIndex` there if it must stack. See "Overlay z-index" in `@synerise/ds-core`'s CLAUDE.md.
|
|
@@ -19,7 +19,7 @@ const ModalBody = /* @__PURE__ */ styled.div.withConfig({
|
|
|
19
19
|
const ModalContainer = /* @__PURE__ */ styled.div.withConfig({
|
|
20
20
|
displayName: "ModalContentstyles__ModalContainer",
|
|
21
21
|
componentId: "sc-1sk67uc-4"
|
|
22
|
-
})(["background:", ";width:", ";position:absolute;box-shadow:", ";border-radius:3px;", ""], (props) => props.theme.palette["white"], (props) => props.$width, (props) => props.theme.variables["box-shadow-2"], (props) => props.isFullscreen ? css(["&&{position:fixed;top:
|
|
22
|
+
})(["background:", ";width:", ";position:absolute;box-shadow:", ";border-radius:3px;", ""], (props) => props.theme.palette["white"], (props) => props.$width, (props) => props.theme.variables["box-shadow-2"], (props) => props.isFullscreen ? css(["&&{position:fixed;top:24px;left:24px;right:24px;bottom:24px;width:auto;margin:0;max-width:none;padding:0;display:flex;flex-direction:column;", "{flex:1 1 100%;overflow:scroll;}}"], ModalBody) : css(["left:50%;", " ", ""], props.centered ? css(["top:50%;transform:translate(-50%,-50%);"]) : css(["top:100px;transform:translateX(-50%);"]), props.maxHeight && css(["display:flex;flex-direction:column;height:", "vh;", "{flex:1 1 100%;overflow:scroll;padding-right:0;}"], props.maxHeight, ModalBody)));
|
|
23
23
|
const ModalRoot = /* @__PURE__ */ styled.div.withConfig({
|
|
24
24
|
displayName: "ModalContentstyles__ModalRoot",
|
|
25
25
|
componentId: "sc-1sk67uc-5"
|
package/dist/Modal.types.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { TabsProps } from '@synerise/ds-tabs';
|
|
|
9
9
|
* - `large` — 1044px
|
|
10
10
|
* - `extraLarge` — 1280px
|
|
11
11
|
* - `fullSize` — 100% width
|
|
12
|
-
* - `fullScreen` —
|
|
12
|
+
* - `fullScreen` — `fixed`-positioned, inset 24px from every viewport edge
|
|
13
13
|
*/
|
|
14
14
|
export type ModalSize = 'small' | 'medium' | 'large' | 'extraLarge' | 'fullSize' | 'fullScreen';
|
|
15
15
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-modal",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Modal UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -39,16 +39,16 @@
|
|
|
39
39
|
"sideEffects": false,
|
|
40
40
|
"types": "dist/index.d.ts",
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@synerise/ds-button": "^2.1.
|
|
43
|
-
"@synerise/ds-icon": "^2.2.
|
|
44
|
-
"@synerise/ds-scrollbar": "^2.0.
|
|
45
|
-
"@synerise/ds-tabs": "^2.0.
|
|
46
|
-
"@synerise/ds-typography": "^2.0.
|
|
47
|
-
"@synerise/ds-utils": "^2.2.
|
|
42
|
+
"@synerise/ds-button": "^2.1.5",
|
|
43
|
+
"@synerise/ds-icon": "^2.2.3",
|
|
44
|
+
"@synerise/ds-scrollbar": "^2.0.9",
|
|
45
|
+
"@synerise/ds-tabs": "^2.0.11",
|
|
46
|
+
"@synerise/ds-typography": "^2.0.10",
|
|
47
|
+
"@synerise/ds-utils": "^2.2.2"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@synerise/ds-dropdown": "^2.1.
|
|
51
|
-
"@synerise/ds-popconfirm": "^2.0.
|
|
50
|
+
"@synerise/ds-dropdown": "^2.1.7",
|
|
51
|
+
"@synerise/ds-popconfirm": "^2.0.10",
|
|
52
52
|
"vitest": "4"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"react-intl": ">=3.12.0 <= 6.8",
|
|
59
59
|
"styled-components": "^5.3.3"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "5ac0f7dcb7c3995b402c86c087d8f32770f80a1d"
|
|
62
62
|
}
|