react-dockable-desktop 7.6.2 → 7.7.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 +56 -1
- package/README.md +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +118 -34
- package/dist/index.d.ts +118 -34
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/styles.css +26 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,60 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [7.7.0] — 2026-10-05
|
|
10
|
+
|
|
11
|
+
Ready-made dialogs: the confirmation shows an icon, a new alert dialog, and both as promises.
|
|
12
|
+
A confirmation dismissed without its buttons now settles.
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- **`RddConfirm` shows an icon left of its message**: a question mark, coloured by `alertType`
|
|
17
|
+
(info, success, warning, danger) with the toast colour tokens. The new `icon` prop replaces it
|
|
18
|
+
with your own node; `icon: null` hides it.
|
|
19
|
+
- **`RddAlert`**: a message with a single OK button, for telling rather than asking. Its icon
|
|
20
|
+
follows `alertType` (info, success, warning, danger), with the same `icon` override. Props:
|
|
21
|
+
`message`, `title`, `alertType`, `icon`, `okLabel`, `onSettled`. Focus starts on OK and Enter
|
|
22
|
+
presses it; Escape, the backdrop and the × acknowledge it too, unless the modal is
|
|
23
|
+
`closable: false`.
|
|
24
|
+
- **`useModals().confirm(options)` and `useModals().alert(options)`** open those dialogs (size
|
|
25
|
+
`'small'`) and return a promise: `confirm` resolves `true` for the confirm button and `false` for
|
|
26
|
+
cancel or any dismissal; `alert` resolves once it is closed. Option types: `ConfirmOptions`,
|
|
27
|
+
`AlertOptions`.
|
|
28
|
+
- **`RddConfirm` `onSettled(ok)`**: fires exactly once however the dialog ends — `true` for the
|
|
29
|
+
confirm button, `false` for cancel, Escape, the backdrop, the × or a close by code. `onOK` and
|
|
30
|
+
`onCancel` still fire for their buttons only.
|
|
31
|
+
- **Test hooks:** `data-rdd-confirm-ok`, `data-rdd-confirm-cancel`, `data-rdd-alert-ok`.
|
|
32
|
+
- **Message key `alertTitle`** ("Information"), the default title of `modals.alert()`;
|
|
33
|
+
`modals.confirm()` uses the existing `modalTitle` ("Confirmation").
|
|
34
|
+
- **`usePanelEvents().onClose` (and the container contract's `onClose`) now fire in modals and
|
|
35
|
+
side drawers**, whichever way they close. They only fired for docked and floating panels before.
|
|
36
|
+
- New classes: `rdd-dialog-content`, `rdd-dialog-icon`, `rdd-dialog-icon-{info|success|warning|danger}`.
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
|
|
40
|
+
- **An `RddConfirm` closed with Escape, the backdrop, the × or `closeAll()` never answered.**
|
|
41
|
+
Neither `onOK` nor `onCancel` fired, so a promise built on them stayed pending. The library's
|
|
42
|
+
own unsaved-changes prompt was one: after Escape on it, that close request never finished. The
|
|
43
|
+
prompt now resolves from `onSettled`, so a dismissal counts as "keep the panel".
|
|
44
|
+
- **`RddConfirm` overwrote the modal's header icon.** It set a ❓ emoji there on mount, replacing
|
|
45
|
+
any `ModalOptions.icon` you passed. It no longer touches the header.
|
|
46
|
+
|
|
47
|
+
### Changed
|
|
48
|
+
|
|
49
|
+
- The ❓ is gone from a confirmation's header; the question icon is now drawn beside the message.
|
|
50
|
+
To keep a header icon, pass `ModalOptions.icon`.
|
|
51
|
+
|
|
52
|
+
### Tests
|
|
53
|
+
|
|
54
|
+
- `Dialogs.test.tsx`, under `StrictMode`: settle-once for every exit of both dialogs (Escape,
|
|
55
|
+
backdrop, ×, `closeAll`, `closeAllModals`, `close(id)`, each button); the unsaved-changes prompt
|
|
56
|
+
wired to `onSettled`; default, custom and hidden icons; the header icon left alone; alert focus,
|
|
57
|
+
label and `closable: false`; both promise helpers; `onClose` in drawers and modals. Each
|
|
58
|
+
assertion was seen failing with its code removed.
|
|
59
|
+
- The branding and radius browser baselines were regenerated on purpose: their scenes include a
|
|
60
|
+
confirmation, whose header no longer has an icon and whose message now sits in the icon row.
|
|
61
|
+
Nothing outside that modal changed in either baseline.
|
|
62
|
+
|
|
9
63
|
## [7.6.2] — 2026-10-04
|
|
10
64
|
|
|
11
65
|
### Fixed
|
|
@@ -826,7 +880,8 @@ All of the above is additive and backward-compatible: every new field is optiona
|
|
|
826
880
|
|
|
827
881
|
---
|
|
828
882
|
|
|
829
|
-
[Unreleased]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.
|
|
883
|
+
[Unreleased]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.7.0...HEAD
|
|
884
|
+
[7.7.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.6.2...v7.7.0
|
|
830
885
|
[7.6.2]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.6.1...v7.6.2
|
|
831
886
|
[7.6.1]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.6.0...v7.6.1
|
|
832
887
|
[7.6.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.5.0...v7.6.0
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# React Dockable Desktop
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/react-dockable-desktop)
|
|
4
4
|
[](https://www.typescriptlang.org/)
|
|
5
5
|
[](#touch--mobile)
|
|
6
6
|
[](#license)
|