All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
5.1.6 (2023-12-11)
5.1.4 (2022-06-16)
- add missing dependencies (5329812)
5.1.3 (2022-05-07)
- fix typos throughout codebase (725d1a2)
- typos: fix additional typos throughout repo (ef20132)
5.1.2 (2022-04-02)
Note: Version bump only for package @react-md/menu
5.1.1 (2022-04-01)
Note: Version bump only for package @react-md/menu
5.1.0 (2022-03-18)
- @react-md/menu: Provide props for Menu's
List
(2b5fb23)
- run lint-scripts --fix for consistent-type-imports (42d839d)
5.0.0 (2022-01-31)
- @react-md/menu: Better floating action button default behavior (0cdeff7)
- feat!(menu): Implemented new Menu API (c27bf55)
- @react-md/menu: Added tests for the new menu API and fixed a few issues (7202dd0)
- @react-md/menu: Fixed
MenuBar
visibility for touch devices (1288be7) - @react-md/menu: Fixed keyboard movement in MenuBars with visible menus (5b2494a)
- Menu buttons will no longer open by pressing the
ArrowUp
orArrowDown
keys. - The
DropdownMenu
component no longer accepts a list ofitems
and instead thechildren
should be theMenuItem
components. - The
DropdownMenu
component no longer supports themenuRenderer
anditemRenderer
props. Instead, there is built-in support for conditionally rendering as aSheet
component using therenderAsSheet
prop. - The
DropdownMenu
component now requires a parentAppSizeListener
because of the conditionalSheet
rendering functionality. This might require updating your tests to either use theConfiguration
component from@react-md/layout
(recommended) or adding theAppSizeListener
to tests that includeDropdownMenu
s. - The
DropdownMenuItem
component is no longer required for nested dropdown menus and is an "internal" component instead that shouldn't really be used. - The
MenuItemSeparator
now renders as an<li>
instead of an<hr>
or<div>
. - The
useContextMenu
now returns an object instead of an ordered list. - Using any of the
MenuItem
components requires the<MenuKeyboardFocusProvider>
to be mounted as a parent component which might affect tests. This will not break anything if you are using theDropdownMenu
orMenu
components.
4.0.3 (2021-12-31)
4.0.1 (2021-11-27)
- @react-md/menu: Added fixes required for Concurrent Rendering (05ec620)
- Updated imports to use
import type
when possible (ba96bb6)
4.0.0 (2021-11-24)
- @react-md/menu:
DropdownMenu
andMenu
portal by default (98a6a9f), closes #1264 - sass: Do not use legacy global functions (6159e16)
- Update to use new JSX Transform and latest
eslint
(8111cd3) - @react-md/transition: No longer use findDOMNode for transitions (cb952da)
- Minimum React version is now 16.14 instead of 16.8
- @react-md/menu: The
DropdownMenu
andMenu
components portal by default. This should really only affect snapshot tests - react-md: There will no longer be run-time prop validation with
the
prop-types
package.
3.1.0 (2021-09-10)
- typescript: updated all array types to be readonly (8f71bcb)
- ran
yarn format
to include new files (48d3d7f)
3.0.1 (2021-08-15)
3.0.0 (2021-08-13)
Note: Version bump only for package @react-md/menu
2.9.1 (2021-07-27)
- install: slighly reduce install size by excluding tests in publish (9d01a44)
2.9.0 (2021-07-18)
Note: Version bump only for package @react-md/menu
2.8.5 (2021-07-03)
Note: Version bump only for package @react-md/menu
2.8.4 (2021-06-10)
- ran
prettier
after upgrading to v2.3.0 (3ce236a)
2.8.3 (2021-05-18)
- react-md.dev: updated tsdoc to work with
typedoc
(cf54c35)
2.8.2 (2021-04-23)
Note: Version bump only for package @react-md/menu
2.8.0 (2021-04-22)
- tsconfig: separate tsconfig by package instead of a single root (b278230)
2.7.1 (2021-03-23)
- ts: stopped using FC type (c5daa47)
2.7.0 (2021-02-28)
- tsdoc: fixed remaining tsdoc syntax warnings (946f4dd)
- tsdoc: fixed some tsdoc annotations and styling (0449b86)
- updated test coverage to not include conditional component PropTypes (24e5df1)
2.6.0 (2021-02-13)
Note: Version bump only for package @react-md/menu
2.5.5 (2021-01-30)
Note: Version bump only for package @react-md/menu
2.5.4 (2021-01-27)
Note: Version bump only for package @react-md/menu
2.5.1 (2020-12-16)
Note: Version bump only for package @react-md/menu
2.5.0 (2020-12-15)
Note: Version bump only for package @react-md/menu
2.4.3 (2020-11-14)
Note: Version bump only for package @react-md/menu
2.4.2 (2020-10-23)
- @react-md/menu: fixed DropdownMenu not being able to provide style and className to Menu (7823fea), closes #989
2.4.1 (2020-10-17)
Note: Version bump only for package @react-md/menu
2.4.0 (2020-10-17)
- a11y: improved
LabelRequiredForA11y
type definition (b7aa4fa) - @react-md/theme: Better Contrast Colors by Default and dev-utils refactor (#955) (519b128)
2.3.1 (2020-09-15)
Note: Version bump only for package @react-md/menu
2.3.0 (2020-09-10)
- a11y: improved
LabelRequiredForA11y
type definition (b7aa4fa)
2.2.2 (2020-09-02)
Note: Version bump only for package @react-md/menu
2.2.1 (2020-09-02)
Note: Version bump only for package @react-md/menu
2.2.0 (2020-08-11)
Note: Version bump only for package @react-md/menu
2.1.2 (2020-08-01)
Note: Version bump only for package @react-md/menu
2.1.1 (2020-07-21)
Note: Version bump only for package @react-md/menu
2.1.0 (2020-07-12)
2.0.2 (2020-06-30)
- LICENSE: Removed the time range from license since it was incorrect (50c9021)
- Added
sideEffects
field topackage.json
(31820b9) sideEffects
formatting (78a7b6b)
No changes.
The menu package was completely re-written to fix all the accessibility issues and keyboard focus behavior.
The main exports starting in v2:
DropdownMenu
MenuItem
MenuItemLink
MenuItemSeparator
DropdownMenuItem
defaultMenuRenderer
defaultMenuItemRenderer
useContextMenu
- the menu will now automatically position itself within the viewport with fixed positioning
- implemented custom context menus with a new
useContextMenu
hook - nested dropdown menus are fully supported along with keyboard movement and open/close behavior
- no longer use the
menuItem
props and instead render theMenuItem
component instead within theDropdownMenu
- no longer uses the weird
Layover
component
- the visibility for the menus can no longer be controlled externally. this functionality will come back in a later release
- the menu no longer supports relative positioning
- the
MenuButton
is no longer a combination of aButton
and aMenu
and instead is an accessibility helper component
$rmd-menu-background-color: rmd-theme-var(surface) !default
- The background color to use in menus$rmd-menu-color: rmd-theme-var(on-surface) !default
- The text color to use in menus$rmd-menu-elevation: 8 !default
- The elevation/box shadow to use for the menu@function rmd-menu-theme
- gets one of the theme values and validates that the theme name is valid@function rmd-menu-theme-var
- gets one of the theme values as a css variable with a fallback value and validates that the theme name is valid@mixin rmd-menu-theme
- applies one of the theme values to a css property as a css variable@mixin rmd-menu-theme-update-var
- updates one of the theme values as a css variable
- renamed
$md-menu-z-index
to$rmd-menu-z-index
and changed the default value fromnull
(100
fromLayover
) to11
- renamed
$md-menu-min-width
to$rmd-menu-min-width
and changed the default value from112px
to7rem
- removed
$md-menu-include-cascading
,$md-menu-include-cascading-styles
,$md-menu-cascading-font-size
,$md-menu-cascading-padding
,$md-cascading-height
and$md-menu-cascading-list-padding
since the cascading/nested menus was completely reworked and no longer needs additional styles - removed all other SCSS variables relating to height and width
The accessibility props were moved from the surrounding <div>
and instead
applied correctly to the MenuButton
instead. This also changed the
aria-haspopup
attribute to be "menu"
instead of "true"
and removed the
aria-controls
since it doesn't really work as expected.
Additional keyboard behavior was also added to both the MenuButton
and Menu
components. When the MenuButton
is focused, the ArrowUp
key will open the
menu and focus the last MenuItem
while the ArrowDown
key will open the menu
and focus the first MenuItem
. The user can now also type while the menu is
open to focus specific items that start with the same letters.
The Menu
now also requires the aria-label
or aria-labelledby
props to help
screen readers out as well as applying role="menu"
and
aria-orentation="vertical"
(or "horizontal"
).