react-dockable-desktop 7.6.1 → 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 +77 -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 +37 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,80 @@ 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
|
+
|
|
63
|
+
## [7.6.2] — 2026-10-04
|
|
64
|
+
|
|
65
|
+
### Fixed
|
|
66
|
+
|
|
67
|
+
- **The taskbar preview's close button drew its × at half width** on a page without a CSS reset
|
|
68
|
+
(a plain MUI app, Bootstrap, or no framework at all). The button is a `<button>`, so it kept the
|
|
69
|
+
browser's own padding (`1px 6px` in Chrome), and with the library's `border-box` sizing that
|
|
70
|
+
padding came out of its 18px: the 12px icon was drawn 6px wide. It now sets `padding: 0`, and
|
|
71
|
+
its icon no longer shrinks.
|
|
72
|
+
- **Workspace toolbar and sidebar rail buttons relied on the same browser padding.** It did not
|
|
73
|
+
show at the default icon size, but it capped the icon at 24px (toolbar) and 32px (rail), so a
|
|
74
|
+
`--rdd-chrome-icon-size` above 24px squeezed toolbar icons. They set `padding: 0` too. Nothing
|
|
75
|
+
changes on a page that already resets button padding.
|
|
76
|
+
|
|
77
|
+
### Tests
|
|
78
|
+
|
|
79
|
+
- `hostPage.browser.ts`: on the harness page, which has no CSS reset, the preview's × draws its
|
|
80
|
+
icon at 12×12, and toolbar and rail buttons have no padding and fit a 28px icon. Each assertion
|
|
81
|
+
was seen failing without its `padding: 0`.
|
|
82
|
+
|
|
9
83
|
## [7.6.1] — 2026-10-04
|
|
10
84
|
|
|
11
85
|
Internal restructuring. No behaviour, API or visual change.
|
|
@@ -806,7 +880,9 @@ All of the above is additive and backward-compatible: every new field is optiona
|
|
|
806
880
|
|
|
807
881
|
---
|
|
808
882
|
|
|
809
|
-
[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
|
|
885
|
+
[7.6.2]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.6.1...v7.6.2
|
|
810
886
|
[7.6.1]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.6.0...v7.6.1
|
|
811
887
|
[7.6.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.5.0...v7.6.0
|
|
812
888
|
[7.5.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.4.1...v7.5.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)
|