@react-md/form
Advanced tools
Changelog
4.0.0 (2021-11-24)
This release focused on updating the @react-md/transition
package to no longer log errors in React.StrictMode
because react-ransition-group
was using ReactDOM.findDOMNode
to handle transitions.
All react-md
packages will no longer use react-transition-group
since all that functionality has been built into @react-md/transition
with a slightly different API.
This release has also included my first attempt at automating upgrading to new major releases by introducing a new @react-md/codemod package that is similar to the react-codemod package. You can automate some of this release by running:
npx @react-md/codemod v3-to-v4/preset
Since I am still learning how to use jscodeshift, it will not be able to migrate everything but should still help with most changes.
DropdownMenu
and Menu
portal by default (98a6a9f), closes #1264eslint
(8111cd3)ConditionalPortal
supports ReactNode children (c83d578)Typography
(30cf056)sass
resolutions in package.json (db22cde), closes #1261react-marked-renderer
for markdown stuffs (93ebaa4)prettier
(9632d82)react-router-dom
v6 (e012ef9)sass
files (98ffe40)sassdoc
to not through uncaught exceptions (8bdf532)prettier
after upgrading to v2.4.0 (06110af)enable
strict mode by default for nextjs-typescript (83e4c44)create-react-app
example to use react-router-dom
v6 (3c4d1ea)react-router-dom
v6 (ae469ef)stylelint
(22d1598)DropdownMenu
and Menu
components portal by
default. This should really only affect snapshot testslib.d.ts
prop-types
package.Changelog
3.1.0 (2021-09-10)
DialogFooter
align prop applies correct classes (644971d)TooManyFilesError
is only used if all the other validation has passed (6ed3f54)useFileUpload
extensions (9238140)useDropzone
fix around onDragLeave behavior (fdff9f2)isValidFileName
option to useFileUpload
(dbd0375)sassdoc
for new module system (4746d26)yarn format
to include new files (48d3d7f)next
(b50d745)sassdoc
hot-reloading (9d58e09)sassdoc
examples to be linkable (9ed096e)Changelog
3.0.0 (2021-08-13)
This release should be relatively simple for most consumers of this library since the main breaking change is dropping support for node-sass
and requiring sass
since node sass has been deprecated as well as removing deprecated variables, hooks, and components.
Most users should be able to run the following commands to upgrade to v3.0.0:
npm update react-md
npm uninstall node-sass
npm install sass
Or with yarn
yarn add react-md
yarn remove node-sass
yarn add sass
In addition, there is now partial support for the new Sass module system with the react-md
package which also simplifies the import usage and has a slight build performance improvement for large projects.
To start using the new module system, update all the @import
statements as shown below:
-@import '~@react-md/theme/dist/mixins';
-@import '~@react-md/utils/dist/mixins';
-// other react-md imports
+@use 'react-md' as *;
// No other changes required!
If you override variables within react-md
:
-@import '~@react-md/theme/dist/color-palette';
-$rmd-theme-light: false;
-$rmd-theme-primary: $rmd-purple-500;
-$rmd-theme-secondary: $rmd-pink-a-200;
-
-@import '~react-md/dist/styles';
+@use '@react-md/theme/dist/color-palette' as color;
+@use 'react-md' as * with (
+ $rmd-theme-light: false,
+ $rmd-theme-primary: color.$rmd-theme-purple-500,
+ $rmd-theme-secondary: color.$rmd-theme-pink-a-200,
+);
+
+@include react-md-utils;
Check out the updated customizing your theme documentation, #1214, or 958f34f for more in-depth examples.
$rmd-theme-dark-elevation
now defaults to true
instead of false
node-sass
is no longer supported and users must switch to sass
InteractionModeListener
since it was an alias for UserInteractionModeListener
ResizeObserver
component and useResizeObserverV1
implementationTooltipHoverModeConfig
component$rmd-card-dark-elevation-bordered-background-color
variableTooltipped
componentuseIndeterminateChecked
is now an object of optionssass
since it's deprecated (126fb5a)defaults
to true (b371337)sass
usage with: @use 'react-md';
(787bfb5)@use
(68e8c6b)react-md/dist/_everything.scss
(c7177e6)sassdoc
and variables to use everything.scss (a0f0699)sass
(5376be1)useIndeterminateChecked
(6b7871f)Tooltipped
component (6dca9b1)typedoc
API in navigation tree (c388ba6)@use
imports (958f34f)defaults
(b2269ff)sass
instead of node-sass (d8ddf51)react-md
(c0f25f7)Changelog
2.9.0 (2021-07-18)
This release is focused around the FileInput
component in the @react-md/form
package and implementing a useFileUpload
hook to handle uploading/previewing files in the browser. However, there is a notable change in this release for the form documentation since the demos have been split into the following pages:
FileInput
correctly center the icon when children aren't provided (3a6ab33)useLayoutNavigation
possible perf fix (3d65e4e)FileInput
automatically swaps button type to text if children exist (e5585e1)FormMessageCounter
component added to public API (1508812)useFileUpload
hook to upload files to the browser (efb3f2f), closes #1159useDropzone
hook (bc07a1f)useFileUpload
(49ce4d9)useFileUpload
(8f9002e)eslint
error after updating prettier
(75a9b0f)Select
Options Demo (367cc0d)