react-dockable-desktop 7.4.1 → 7.6.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 +128 -1
- package/README.md +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -3
- package/dist/index.d.ts +12 -3
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/styles.css +97 -62
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,131 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [7.6.0] — 2026-10-04
|
|
10
|
+
|
|
11
|
+
Context menus open with nothing highlighted, the same every time.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- **A context menu opens with focus on the menu itself, no item highlighted.** It used to focus
|
|
16
|
+
its first item, and whether the browser then drew a focus ring depended on the user's previous
|
|
17
|
+
interaction: a menu opened from script (a map library's right-click calling `showContextMenu`,
|
|
18
|
+
say) showed a ring after a page load or a key press and none after a mouse click. ↓ reaches the
|
|
19
|
+
first item and ↑ the last, so keyboard use is unchanged but for that one key press.
|
|
20
|
+
- **Menus opened from the keyboard still start on their first item**: the library's own (the
|
|
21
|
+
ContextMenu key or Shift+F10 on a tab or taskbar item, Enter or Space on a window's ⋮ button),
|
|
22
|
+
a keyboard `contextmenu` event, and any menu shown with `initialFocus: 'first-item'`.
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- **`initialFocus?: 'menu' | 'first-item'`** on `showContextMenu` / `ShowContextMenuOptions`
|
|
27
|
+
(`useContextMenu()`, `useWorkspace().showContextMenu`, a `ContextMenuHandle`). A custom
|
|
28
|
+
`ContextMenuAdapter` receives it too.
|
|
29
|
+
- **`--rdd-context-menu-focus-ring`**: the outline on a menu item with keyboard focus, by default
|
|
30
|
+
`--rdd-focus-ring` (the skin's accent). `--rdd-focus-ring` is now documented with the theming
|
|
31
|
+
tokens; both are read with a fallback rather than declared, so they follow the skin's or your
|
|
32
|
+
brand's accent.
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
|
|
36
|
+
- **↑ from a menu with nothing highlighted went to the second-to-last item**; it goes to the last.
|
|
37
|
+
- **A submenu opened by hovering took focus** when an earlier submenu had been opened from the
|
|
38
|
+
keyboard; a hover-opened submenu never takes focus now.
|
|
39
|
+
- **The focused menu element drew the global focus ring**; it draws none, and items draw the
|
|
40
|
+
skin's ring rather than the browser's default.
|
|
41
|
+
|
|
42
|
+
### Upgrading
|
|
43
|
+
|
|
44
|
+
- Nothing to change for menus opened with the mouse or from script: they now open with no item
|
|
45
|
+
highlighted. If you open a menu from your own keyboard shortcut, pass
|
|
46
|
+
`initialFocus: 'first-item'` (or the keyboard `contextmenu` event) so it starts on an item.
|
|
47
|
+
- Tests that expected the first item to have focus right after `showContextMenu` should press ↓
|
|
48
|
+
first, or open the menu with `initialFocus: 'first-item'`.
|
|
49
|
+
|
|
50
|
+
### Tests
|
|
51
|
+
|
|
52
|
+
- `KeyboardAccess.test.tsx`: the menu itself is focused on open; ↓/↑ from it; `initialFocus`;
|
|
53
|
+
keyboard and mouse `contextmenu` events; the Menu key and a right-click on a tab; a hover-opened
|
|
54
|
+
submenu after a keyboard-opened one. Each new test was seen failing with its part of the fix
|
|
55
|
+
removed. The old "focuses the first enabled item" test passed vacuously (its label helper read
|
|
56
|
+
the first label inside whatever had focus) and is replaced.
|
|
57
|
+
- The branding browser baseline (`tests/browser/fixtures/branding-baseline.json`) is regenerated
|
|
58
|
+
for 7.5.0's intended toolbar changes (toggle "on" colours and edge, the new tokens, the
|
|
59
|
+
vscode/macos light-mode hover), which 7.5.0 shipped without refreshing it. No context-menu
|
|
60
|
+
colour changed.
|
|
61
|
+
|
|
62
|
+
### Docs
|
|
63
|
+
|
|
64
|
+
- Context Menus guide: initial focus, the option, the adapter and `ContextMenuHandle` signatures,
|
|
65
|
+
keyboard behaviour, the focus ring token. Advanced guide keyboard table; Theming token table.
|
|
66
|
+
|
|
67
|
+
## [7.5.0] — 2026-10-04
|
|
68
|
+
|
|
69
|
+
Toolbar buttons: the library now sizes the icon inside its own buttons, and a toggle that is on
|
|
70
|
+
can be told from one that is off at a glance, on chrome and over panel content alike. No props were
|
|
71
|
+
added or removed; everything new is a CSS custom property.
|
|
72
|
+
|
|
73
|
+
### Added
|
|
74
|
+
|
|
75
|
+
- **Icon size tokens.** `--rdd-panel-toolbar-icon-size` (`20px`) sizes icons in `RddPanelToolbar`
|
|
76
|
+
buttons and toggles; `--rdd-chrome-icon-size` (`22px`) sizes them in the workspace toolbar and
|
|
77
|
+
the sidebar rail. Icon fonts follow the button's `font-size`; SVG icons follow the token's
|
|
78
|
+
width and height, even when the SVG has its own `width`/`height` attributes. Apps no longer pass
|
|
79
|
+
a size to each icon.
|
|
80
|
+
- **`soft` chip tokens**: `--rdd-panel-toolbar-btn-bg`, `--rdd-panel-toolbar-btn-bg-hover`,
|
|
81
|
+
`--rdd-panel-toolbar-btn-border`.
|
|
82
|
+
- **Workspace toolbar toggle tokens**: `--rdd-toolbar-btn-toggle-active-color` and
|
|
83
|
+
`--rdd-toolbar-btn-toggle-active-border`, so its "on" icon and edge no longer have to follow the
|
|
84
|
+
sidebar tab colour.
|
|
85
|
+
|
|
86
|
+
### Changed
|
|
87
|
+
|
|
88
|
+
- **Panel toolbar "on" state** is a solid chip with a white icon, the same in every
|
|
89
|
+
`buttonVariant`: in dark the accent mixed 65% with black, in light the plain accent. The icon is
|
|
90
|
+
`--rdd-brand-on-accent` when a brand sets it. It clears WCAG's 3:1 non-text contrast with bright
|
|
91
|
+
and dark accents. Before, it was a 14–15% accent tint.
|
|
92
|
+
- **`buttonVariant="soft"`** is a near-opaque chip (the floating-widget surface) with a hairline
|
|
93
|
+
edge, readable over panel content you don't control. Before, it was a 6% (dark) / 4% (light)
|
|
94
|
+
wash that disappeared over busy content.
|
|
95
|
+
- **Workspace toolbar toggle "on"**: the accent tint goes from 6–8% to 22% (dark) / 16% (light) in
|
|
96
|
+
every skin, with a 1px accent edge and the accent icon.
|
|
97
|
+
- **Icons in toolbar and rail buttons are larger by default**: 20px in panel toolbars and 22px in
|
|
98
|
+
the workspace toolbar and rail, where they used to render at whatever size the app gave them.
|
|
99
|
+
|
|
100
|
+
### Fixed
|
|
101
|
+
|
|
102
|
+
- **`filled` toggles looked the same on and off**: its resting look used the active colours. It
|
|
103
|
+
now rests on an accent tint with an accent edge, and "on" is the solid chip.
|
|
104
|
+
- **vscode and macos painted a white hover tint in light mode** on panel toolbar buttons; it now
|
|
105
|
+
applies in dark only.
|
|
106
|
+
- **`buttonSize` was documented as the icon size.** It sets the button size; the icon follows
|
|
107
|
+
`--rdd-panel-toolbar-icon-size`.
|
|
108
|
+
|
|
109
|
+
### Upgrading
|
|
110
|
+
|
|
111
|
+
- Remove per-icon sizes inside toolbar and rail buttons (`size={16}`, `fontSize`, inline
|
|
112
|
+
`width`/`height`): set `--rdd-panel-toolbar-icon-size` / `--rdd-chrome-icon-size` instead. An
|
|
113
|
+
inline `style` size still wins over the tokens.
|
|
114
|
+
- If you added shadows to keep toolbar icons readable over panel content, remove them and use
|
|
115
|
+
`buttonVariant="soft"` or a `frosted`/`solid` toolbar.
|
|
116
|
+
- If you overrode `--rdd-panel-toolbar-btn-active-color` or `-active-bg` to make "on" visible,
|
|
117
|
+
check whether you still need to: the default is visible in every variant now. To restyle it, see
|
|
118
|
+
[Styling toolbar buttons](https://felipecarrillo100.github.io/react-dockable-desktop/guide/panel-overlay#styling-toolbar-buttons).
|
|
119
|
+
- To get the old look back, set the tokens to their previous values, e.g.
|
|
120
|
+
`--rdd-toolbar-btn-toggle-active-bg: color-mix(in srgb, var(--rdd-accent-color) 8%, transparent)`.
|
|
121
|
+
|
|
122
|
+
### Docs
|
|
123
|
+
|
|
124
|
+
- Panel Overlay guide: new "Styling toolbar buttons" section (what the library owns, icon sizes,
|
|
125
|
+
variants, colour tokens, recipes for your own "on" look); corrected `buttonSize`.
|
|
126
|
+
- Toolbar guide: token table updated for the new toggle defaults and tokens.
|
|
127
|
+
- Sidebar (Modals & Drawers guide): rail icons follow `--rdd-chrome-icon-size`.
|
|
128
|
+
|
|
129
|
+
### Demo
|
|
130
|
+
|
|
131
|
+
- Spawn Tools → Toolbar Buttons: every `buttonVariant` in every state over light, dark and busy
|
|
132
|
+
content, with icon-size sliders.
|
|
133
|
+
|
|
9
134
|
## [7.4.1] — 2026-10-01
|
|
10
135
|
|
|
11
136
|
Fixes from a review of 7.4.0. No API changes.
|
|
@@ -655,7 +780,9 @@ All of the above is additive and backward-compatible: every new field is optiona
|
|
|
655
780
|
|
|
656
781
|
---
|
|
657
782
|
|
|
658
|
-
[Unreleased]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.
|
|
783
|
+
[Unreleased]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.6.0...HEAD
|
|
784
|
+
[7.6.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.5.0...v7.6.0
|
|
785
|
+
[7.5.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.4.1...v7.5.0
|
|
659
786
|
[7.4.1]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.4.0...v7.4.1
|
|
660
787
|
[7.4.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.3.0...v7.4.0
|
|
661
788
|
[7.3.0]: https://github.com/felipecarrillo100/react-dockable-desktop/compare/v7.2.0...v7.3.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)
|