Releases: mlaursen/react-md
v2.9.2
Bug Fixes
- @react-md/autocomplete: Prevent event default when pressing enter with open
AutoComplete
(#1439) (f03548a)
Library Size Changes
yarn dev-utils libsize
The gizipped UMD bundle sizes are:
- dist/umd/react-md.production.min.js 86.98 KB
- dist/umd/react-md-with-font-icons.production.min.js 111.26 KB
- dist/umd/react-md-with-svg-icons.production.min.js 177.04 KB
The min and max gzipped CSS bundle sizes are:
- themes/react-md.grey-red-700-light.min.css 17.57 KB
- themes/react-md.lime-teal-200-dark.min.css 17.63 KB
v5.1.4
Bug Fixes
- add missing dependencies (5329812)
Library Size Changes
yarn dev-utils libsize
The gzipped UMD bundle sizes are:
- dist/umd/react-md.production.min.js 91.56 kB
- dist/umd/react-md-with-font-icons.production.min.js 203.98 kB
- dist/umd/react-md-with-svg-icons.production.min.js 204.03 kB
The min and max gzipped CSS bundle sizes are:
- themes/react-md.grey-red-700-light.min.css 18.08 kB
- themes/react-md.lime-teal-200-dark.min.css 18.15 kB
v5.1.3
Bug Fixes
- @react-md/button: do not shrink in flex containers (66bf6e0)
- @react-md/card: fix spelling of raisable and deprecate raiseable prop (453023b)
- @react-md/form: fix typo for transparent in disabled toggle hover color (7346587)
- @react-md/layout: fix spelling of
DEFAULT_LAYOUT_NAV_TOGGLE_CLASSNAMES
(2d20a2e) - @react-md/utils: fix spelling of DropzoneHandlers (6ba510b)
Documentation
- fix typos throughout codebase (725d1a2)
- @react-md/form: Add simple examples for Select/NativeSelect (05358f5), closes #1396
Other Internal Changes
- @react-md/autocomplete: fix typos in utils tests (c0333cc)
- react-md.dev: correctly render escaped html in markdown (8a523cb)
- react-md.dev: fix text color for animating app bar (01ec1af)
- typos: fix additional typos throughout repo (ef20132)
Library Size Changes
yarn dev-utils libsize
The gzipped UMD bundle sizes are:
- dist/umd/react-md.production.min.js 91.56 kB (+ 20 B)
- dist/umd/react-md-with-font-icons.production.min.js 203.98 kB (+ 8.79 kB)
- dist/umd/react-md-with-svg-icons.production.min.js 204.03 kB (+ 2.11 kB)
The min and max gzipped CSS bundle sizes are:
- themes/react-md.grey-red-700-light.min.css 18.08 kB (+ 5 B)
- themes/react-md.lime-teal-200-dark.min.css 18.15 kB (+ 5 B)
v5.1.2
Bug Fixes
Other Internal Changes
- @react-md/layout: Update snapshots after updating tree component (ec84800)
- @react-md/utils: Update keyboard movement (71d1343)
- react-md.dev:
useIsomorphicLayoutEffect
to hide SSR warning (aa0d3cd) - react-md.dev: Fix
BadgedButton
documentation (b147a88) - react-md.dev: Update Light/Dark Theme Toggle Icons (60a8825)
- react-md.dev: useLayoutEffect for page transitions (638c8ec)
Library Size Changes
yarn dev-utils libsize
The gzipped UMD bundle sizes are:
- dist/umd/react-md.production.min.js 91.36 kB (- 40 B)
- dist/umd/react-md-with-font-icons.production.min.js 116.03 kB (- 38 B)
- dist/umd/react-md-with-svg-icons.production.min.js 182.89 kB (- 38 B)
The min and max gzipped CSS bundle sizes are:
- themes/react-md.grey-red-700-light.min.css 18.03 kB
- themes/react-md.lime-teal-200-dark.min.css 18.1 kB
v5.1.1
Bug Fixes
- @react-md/sheet: Animate correctly in React 18 (ca27b19)
- @react-md/tree: Add missing aria-selected attribute (e578ea0), closes #1388
Other Internal Changes
- eslint: Try new precommit eslintrc file for type imports (fb69a2f)
- react-md.dev: Fix typo for RTL tooltip (ee9f34c)
- react-md.dev: re-enable ripples to match
defaults
(736e3b4)
Library Size Changes
yarn dev-utils libsize
The gzipped UMD bundle sizes are:
- dist/umd/react-md.production.min.js 91.76 kB (+ 16 B)
- dist/umd/react-md-with-font-icons.production.min.js 116.41 kB (+ 14 B)
- dist/umd/react-md-with-svg-icons.production.min.js 183.27 kB (+ 14 B)
The min and max gzipped CSS bundle sizes are:
- themes/react-md.grey-red-700-light.min.css 18.03 kB
- themes/react-md.lime-teal-200-dark.min.css 18.1 kB
v5.1.0
Bug Fixes
- @react-md/app-bar:
AppBarTitle
now appliesflex: 1 1 auto
(4a47c92) - @react-md/tooltip: Tooltips stay visible on mobile Firefox (7039fef)
Features
- @react-md/menu: Provide props for Menu's
List
(2b5fb23) - @react-md/tooltip:
useTooltip
supports new disabled option (a934ae9)
Documentation
Other Internal Changes
- removed old
eslint
rules (88eb2b2) - run lint-scripts --fix for consistent-type-imports (42d839d)
- Updated the v5.0.0 release notes (6106751)
- @react-md/dev-utils: Fix indexer for consistent-type-imports (2d2d1e9)
- @react-md/form: bump nanoid from 3.2.0 to 3.3.1 (e625488)
- react-md.dev: Add demo for rendering DropdownMenus as a
Grid
(3ac42ef) - react-md.dev: Do not lazy load icons through next/head (47ccc1d)
- react-md.dev: Fix 404 page for sandboxes (4772c88)
- react-md.dev: Fix tooltip dense demo (efc7f8c)
- react-md.dev: Fix usage of
useTooltip
when it is conditionally applied (cfca184) - react-md.dev: Update examples for
useTooltip
disabled option (f318ecf) - stylelint: bump
stylelint
plugins to latest (2bb6429)
Library Size Changes
yarn dev-utils libsize
The gzipped UMD bundle sizes are:
- dist/umd/react-md.production.min.js 91.6 kB (+ 9 B)
- dist/umd/react-md-with-font-icons.production.min.js 116.27 kB (- 9 B)
- dist/umd/react-md-with-svg-icons.production.min.js 183.13 kB (- 37 B)
The min and max gzipped CSS bundle sizes are:
- themes/react-md.grey-red-700-light.min.css 18.03 kB (- 2 B)
- themes/react-md.lime-teal-200-dark.min.css 18.1 kB (- 2 B)
v5.0.0
Check out the v4 to v5 Migration Guide for more information around updating code to this major version.
This release focused on creating a new Menu
API that should hopefully make menus easier to use along with some other new features. The main difference is that the DropdownMenu
no longer accepts a list of items
that get converted to MenuItem
s behind the scenes. Instead, the children
of the DropdownMenu
should be all the MenuItem
components that should be used inside the menu. The main reason for this change is to make it easier to create reusable components for different actions within your app and no longer needed to disable the React eslint
rule around missing key
s.
Another notable change is that nested dropdown menus no longer require the DropdownMenuItem
component and instead the DropdownMenu
automatically renders as a <li>
if it appears as a child of another Menu
component.
Here's a quick example of migrating to the new DropdownMenu
API:
import type { ReactElement } from "react";
-import { DropdownMenu, DropdownMenuItem } from "@react-md/menu";
+import { DropdownMenu, MenuItem } from "@react-md/menu";
export default function Example(): ReactElement (
- <DropdownMenu
- id="example-dropdown-menu"
- items={[
- { onClick: () => console.log("Clicked Item 1"), children: "Item 1" },
- { onClick: () => console.log("Clicked Item 2"), children: "Item 2" },
- { onClick: () => console.log("Clicked Item 3"), children: "Item 3" },
- <DropdownMenuItem
- id="nested-dropdown-menu"
- items={["Subitem 1", "Subitem 2", "Subitem 3"]}
- >
- Submenu
- </DropdownMenuItem>,
- ]}
- >
- Dropdown
+ <DropdownMenu id="example-dropdown-menu" buttonChildren="Dropdown">
+ <MenuItem onClick={() => console.log("Clicked Item 1")}>Item 1</MenuItem>
+ <MenuItem onClick={() => console.log("Clicked Item 2")}>Item 2</MenuItem>
+ <MenuItem onClick={() => console.log("Clicked Item 3")}>Item 3</MenuItem>
+ <DropdownMenu
+ id="nested-dropdown-menu"
+ buttonChildren="Submenu"
+ >
+ <MenuItem>Subitem 1</MenuItem>
+ <MenuItem>Subitem 2</MenuItem>
+ <MenuItem>Subitem 3</MenuItem>
+ </DropdownMenu>
</DropdownMenu>
);
On top of the new API, two major new features have been integrated into this release:
Hoverable Menus
Menus can now act like a browser's bookmark folder behavior where the user must click one of the dropdowns before all other menus become immediately visible on hover by using the new MenuBar
component. This also implements some new keyboard movement behavior matching the menubar spec.
If the first-click behavior is undesired, the MenuBar
also accepts a hoverTimeout
prop which can be set to 0
to make the menus appear immediately on hover or another time in milliseconds to wait before the "hover mode" behavior should begin.
Check out the Hoverable Menus demo for more information.
Conditionally Rendering Menus within a Sheet
Since menus aren't always ideal for small viewports, the DropdownMenu
has been updated to conditionally rendering the Menu
within a Sheet
instead of being positioned relative to the Button
element. This feature is opt-in by either:
- Adding
menuConfiguration={{ renderAsSheet: "phone" }}
on theConfiguration
component from@react-md/layout
- Wrapping a
DropdownMenu
in theMenuConfigurationProvider
and adding a proprenderAsSheet="phone"
- Directly on a
DropdownMenu
with therenderAsSheet="phone"
prop
The Sheet
will default to rendering at the bottom of the viewport and have a max height that should allow the user to close the menu by clicking the overlay behind the sheet. These defaults can be configured with the sheetPosition
and sheetVerticalSize
props.
The Sheet
can also be configured to have an optional header and footer using the sheetHeader
and sheetFooter
props. If all else fails, the DropdownMenu
accepts sheetProps
which will be passed to the Sheet
component.
Check out the Mobile Action Sheets demo for more information.
Bug Fixes
- @react-md/form:
TextArea
applies custom height style whenresize="none"
(e77d939) - @react-md/list: Pass
disableEnterClick
inListItem
(b5e8b69) - @react-md/overlay: Allow for custom onClick behavior (60dce54)
- @react-md/transition: Do not create styles for hidden elements (6eff8a8)
- @react-md/typography: Fixed overline class name (1e544d0)
- @react-md/utils:
useRefCache
returns non-mutable object (b696b72) - @react-md/utils: Positioning logic for inner-left/inner-right and vertical anchors (a38abfb)
Features
- @react-md/dialog: Add new
overlayProps
to configure the dialog's overlay (cfc30f0) - @react-md/divider: Update
useVerticalDividerHeight
to support any HTMLElement (edd9287) - @react-md/divider: Update divider styles for non-hr elements (7ccd0a6)
- @react-md/form: Update
TextFieldContainer
to optionally fill all space in flex containers (2c8e68c) - @react-md/list: Created rmd-list-unstyled utility class from the mixin (6c9b7f4)
- @react-md/menu: Implemented new Menu API (c27bf55)
- @react-md/menu: Better floating action button default behavior (0cdeff7)
- @react-md/utils: export focusable query constants (f9f7955)
- @react-md/utils: Implemented new keyboard focus behavior (77f0d01)
- @react-md/utils: Updated the HoverMode API (ac60bdb)
Documentation
- Added documentation for using a GitHub template to bootstrap a new project (aac11ba)
- Removed Working with v1 documentation (8aa71ac)
- @react-md/sheet: Move tsdoc around for easier sharing (83fcaac)
- react-md.dev: Better migration guide search behavior (9729269)
- react-md.dev: Disable TOCs in dev mode and use temporary layout (3203af4)
- react-md.dev: Fixed weird dev error with spreading props and key (7cd7b8c)
Other Internal Changes
- Removed commitizen since I never use it (3e738b4)
- @react-md/form: Updated
FileInput
snapshots for new icon (f5e43fe) - @react-md/icon: Renamed the download icon to upload (2752a98)
- @react-md/icon: Updated docs and examples to use ConfiguredIcons type (bbfebed)
- @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)
- @react-md/utils: Export
enableScrollLock
anddisableScrollLock
utils (6a95734) - @react-md/utils: Remove touch utils and passive events checks (3597d32)
- @react-md/utils: useScrollListener no longer accepts an element or options ([74a0274](74a02744f3b7d50...
v4.0.3
Bug Fixes
- @react-md/icon:
FileInput
default icon changed fromfile_download
tofile_upload
(174d1c1), closes #1325 - @react-md/table: Sortable Column Alignment (e447cc5), closes #1321
- @react-md/utils:
useIsUserInteractionMode
get mode via context (b5f93ae), closes #1322 - examples: Updated
create-react-app
README to use correct start command (37acdc3)
Other Internal Changes
- Update tests to use jest.mocked (4bb25fb)
- Updated all packages' peerDependenciesMeta (60fcd71), closes #1319
- @react-md/dev-utils: Update watch command for new
sass
modules (2e7a87a) - examples: Update
next
to latest version (3521e9b)
Library Size Changes
yarn dev-utils libsize
The gzipped UMD bundle sizes are:
- dist/umd/react-md.production.min.js 87.47 kB (+ 2 B)
- dist/umd/react-md-with-font-icons.production.min.js 112.79 kB (+ 2 B)
- dist/umd/react-md-with-svg-icons.production.min.js 180.13 kB (- 3 B)
The min and max gzipped CSS bundle sizes are:
- themes/react-md.grey-red-700-light.min.css 18.04 kB (+ 3 B)
- themes/react-md.lime-teal-200-dark.min.css 18.11 kB (+ 3 B)
v4.0.2
Bug Fixes
- @react-md/form: Prevent scrolling while dragging
Slider
on mobile (7eb6740)
Documentation
- react-md.dev: Update images/videos for markdown pages (5e482bb)
Other Internal Changes
- @react-md/utils: Additional test coverage (73bc4eb)
Library Size Changes
yarn dev-utils libsize
The gzipped UMD bundle sizes are:
- dist/umd/react-md.production.min.js 87.45 kB (+ 1 B)
- dist/umd/react-md-with-font-icons.production.min.js 112.77 kB (+ 1 B)
- dist/umd/react-md-with-svg-icons.production.min.js 180.16 kB (+ 2 B)
The min and max gzipped CSS bundle sizes are:
- themes/react-md.grey-red-700-light.min.css 18.01 kB
- themes/react-md.lime-teal-200-dark.min.css 18.08 kB
v4.0.1
Bug Fixes
- @react-md/form: Added fixes required for Concurrent Rendering (b4994f4)
- @react-md/layout: Added fixes required for Concurrent Rendering (c0b29a8)
- @react-md/menu: Added fixes required for Concurrent Rendering (05ec620)
- @react-md/sheet: Added fixes required for Concurrent Rendering (75663e4)
- @react-md/utils: Update
getPercentage
to optionally not throw errors (ff8a1d6)
Documentation
- @react-md/transition: Fix transitionTo documentation to use useEffect (31a31da)
Other Internal Changes
- Updated imports to use
import type
when possible (ba96bb6) - react-md.dev: Fixed demo styles that included CodeBlock (1f1a04e)
- react-md.dev: Fixes for Concurrent Rendering (5946bd9)
- react-md.dev: Update order of previous docs links (87998b9)
Library Size Changes
yarn dev-utils libsize
The gzipped UMD bundle sizes are:
- dist/umd/react-md.production.min.js 87.44 kB (+ 152 B)
- dist/umd/react-md-with-font-icons.production.min.js 112.76 kB (+ 172 B)
- dist/umd/react-md-with-svg-icons.production.min.js 180.14 kB (+ 161 B)
The min and max gzipped CSS bundle sizes are:
- themes/react-md.grey-red-700-light.min.css 18.01 kB
- themes/react-md.lime-teal-200-dark.min.css 18.08 kB