You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 24, 2023. It is now read-only.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Brought consistency to Base UI components and hooks' parameters and return values:
Whenever a hook needs a ref, it's now called <slot_name>Ref, which matches the get<slot_name>Props in the return value.
All hooks that accept external refs now return merged refs, making combining multiple hooks on one element easier. This was proven necessary in several compound components (like menuItem being both a button and a list item). The type of this value is React.RefCallback as using the more general React.Ref caused variance issues.
Type of accepted refs is standardized to React.Ref<Element>
Naming and typing of the forwarded ref in unstyled components were standardized - it's forwardedRef: React.ForwardedRef (unless a more specific type is needed).
The shape of the definition of unstyled components was standardized - it's React.forwardRef(function Component(props: Props, forwardedRef: React.Ref) { ... });. Specifically, the generic parameters of forwardRef were removed as they are specified in function arguments.
Changes
[FormControl][base] Do not use optional fields in useFormControlContext's return value (#37037) @michaldudak
Grid2 now uses React.cloneElement instead of React context for passing the spacing and columns to the next container. The change is close to how CSS flexbox behaves.
[base] Refactor the compound components building blocks (#36400) @michaldudak
Components affected by the changes are:
Menu
MenuUnstyledContext is replaced by MenuProvider. The value to pass to the provider is returned by the useMenu hook.
MenuUnstyled's onClose prop is replaced by onOpenChange. It has the open parameter and is called when a menu is opened or closed
Select
SelectUnstyledContext is replaced by SelectProvider. The value to pass to the provider is returned by the useSelect hook.
SelectUnstyled's popup is permanently mounted.
The defaultOpen prop was added to the SelectUnstyled. The open/close state can now be controlled or uncontrolled, as a value.
Tabs
TabsContext is replaced by TabsProvider. The value to pass to the provider is returned by the useTabs hook.
To deselect all tabs, pass in null to Tabs' value prop, instead of false. This is consistent with how Select works.
The value prop is still technically not mandatory on TabUnstyled and TabPanel, but when omitted, the contents of the selected tab panel will not be rendered during SSR.
@mnajdova updated extendTheme so that it can generate CSS variables with default values. This means that the CssVarsProvider is no longer required for Joy UI when using the default theme (#35739)
other 🐛 bug fixes and 📚 documentation improvements.
The shouldSkipGeneratingVar prop was moved from the createCssVarsProvider's option to the theme. If the default theme does not use extendTheme from Material UI or Joy UI, it needs to be wrapped inside unstable_createCssVarsTheme - a util exported from the MUI System. Below is an example of how the migration should look like:
[Select][base] Add the multiselect functionality to SelectUnstyled (#36274) @michaldudak
The MultiSelectUnstyled was removed. The SelectUnstyled component with the multiple prop should be used instead. Additionally, the SelectUnstyledProps received a second generic parameter: Multiple extends boolean. If you deal with strictly single- or multi-select components, you can hard-code this parameter to false or true, respectively. Below is an example of how the migration should look like:
-import MultiSelectUnstyled from '@​mui/base/MultiSelectUnstyled';+import SelectUnstyled from '@​mui/base/SelectUnstyled';
export default App() {
-return <MultiSelectUnstyled />+return <SelectUnstyled multiple />
}
The PR updates various packages versions, including "@babel/runtime", "@emotion/cache", "@mui/private-theming", "@mui/styled-engine", "@mui/system", "@mui/utils", "@types/react", and "csstype". It also adds the package "@types/scheduler".
Detailed summary
Updates "@babel/runtime" from "^7.20.7" to "^7.21.0"
Updates "@emotion/cache" from "^11.10.5" to "^11.10.7"
Updates "@mui/private-theming" from "^5.11.7" to "^5.12.0"
Updates "@mui/styled-engine" from "^5.11.8" to "^5.12.0"
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
0 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
5.11.8
->5.12.3
Release Notes
mui/material-ui
v5.12.3
Compare Source
May 2, 2023
A big thanks to the 18 contributors who made this release possible. Here are some highlights ✨:
@mui/[email protected]
component
type (#37111) @sai6855text
(#36967) @DavidBoyer11@mui/[email protected]
@mui/[email protected]
Breaking changes
The
component
prop is no longer supported because it can be replaced with the slots API. This is how the transformation will look like:If using TypeScript, the custom component type should be added as a generic on the
Button
component.There is codemod that you can run in your project to do the transformation:
The full documentation about the codemod can be found here.
This is the list of PR related to this change:
component
prop (#36677) @mnajdovacomponent
prop (#37028) @hbjORbj[base] Improve API consistency (#36970) @michaldudak
Brought consistency to Base UI components and hooks' parameters and return values:
<slot_name>Ref
, which matches theget<slot_name>Props
in the return value.React.RefCallback
as using the more generalReact.Ref
caused variance issues.React.Ref<Element>
Changes
Docs
back to top
(#37011) @PunitSoniMEuseFormControl
return values from demos page (#37036) @ZeeshanTamboliSwitchUnstyled
(#36720) @varunmulay22InputUnstyled
(#36724) @varunmulay22SliderUnstyled
(#36721) @varunmulay22Snackbar
(#36719) @varunmulay22SelectUnstyled
(#36718) @varunmulay22Core
All contributors of this release in alphabetical order: @cherniavskii, @DavidBoyer11, @hbjORbj, @jakub-stastny, @joserodolfofreitas, @maxdestors, @michaldudak, @mj12albert, @mnajdova, @navedqb, @nicolas-ot, @oliviertassinari, @PunitSoniME, @sai6855, @samuelsycamore, @siriwatknp, @varunmulay22, @ZeeshanTamboli
v5.12.1
Compare Source
Apr 17, 2023
A big thanks to the 16 contributors who made this release possible. This release was mostly about 🐛 bug fixes and 📚 documentation improvements.
@mui/[email protected]
required
prop (#34207) @emlaiinputTypeSearch
class foroutlined
andfilled
inputs (#36740) @sai6855@mui/[email protected]
Breaking changes
[Grid2] Replace context with
cloneElement
(#36399) @siriwatknpGrid2
now usesReact.cloneElement
instead of React context for passing the spacing and columns to the next container. The change is close to how CSS flexbox behaves.Changes
css
object (#36853) @siriwatknp@mui/[email protected]
Breaking changes
Components affected by the changes are:
MenuUnstyledContext
is replaced byMenuProvider
. The value to pass to the provider is returned by theuseMenu
hook.onClose
prop is replaced byonOpenChange
. It has theopen
parameter and is called when a menu is opened or closedSelectUnstyledContext
is replaced bySelectProvider
. The value to pass to the provider is returned by theuseSelect
hook.SelectUnstyled
's popup is permanently mounted.defaultOpen
prop was added to the SelectUnstyled. The open/close state can now be controlled or uncontrolled, as avalue
.TabsContext
is replaced byTabsProvider
. The value to pass to the provider is returned by theuseTabs
hook.null
to Tabs'value
prop, instead offalse
. This is consistent with how Select works.value
prop is still technically not mandatory on TabUnstyled and TabPanel, but when omitted, the contents of the selected tab panel will not be rendered during SSR.@mui/[email protected]
*-child
to*-of-type
(#36839) @keyvanmDocs
BadgeUnstyled
(#36723) @varunmulay22Parameters
section of the API docs (#36773) @ZeeshanTamboliModalUnstyled
(#36580) @gitstartTabs
(#36577) @gitstartPopper
(#36578) @gitstartTablePagination
(#36593) @gitstartcomponent
,slots
,slotProps
must be visible in Prop table in API docs (#36666) @hbjORbjCore
All contributors of this release in alphabetical order: @emlai, @flaviendelangle, @gitstart, @hbjORbj, @jesrodri, @keyvanm, @michaldudak, @mj12albert, @navedqb, @oliviertassinari, @rkdrnf, @sai6855, @samuelsycamore, @siriwatknp, @varunmulay22, @ZeeshanTamboli
v5.12.0
Compare Source
Apr 11, 2023
A big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
@mui/[email protected]
@mui/[email protected]
ownerState
withownerState
from props (#36599) @hbjORbj@mui/[email protected]
slots
/slotsProps
for every component (components with only root slot too) (#36540) @hbjORbjDocs
readOnly
state class in the list (#36788) @ZeeshanTamboliSliderUnstyled
slotskey
name (#36830) @sai6855Core
All contributors of this release in alphabetical order: @alirezahekmati, @danilo-leal, @hbjORbj, @Lioness100, @mnajdova, @oliviertassinari, @sai6855, @siriwatknp, @ZeeshanTamboli
v5.11.16
Compare Source
Apr 4, 2023
A big thanks to the 17 contributors who made this release possible. Here are some highlights ✨:
@mui/[email protected]
ownerState
to enable overriding styles with it in theme (#36422) @gitstart@mui/[email protected]
@mui/[email protected]
ModalOverflow
component (#36262) @siriwatknpCheckbox
custom color prop type warning (#36691) @amal-qbDocs
useFormControlUnstyledContext
hook (#36302) @HeVictorFormControl
(#36579) @gitstartMenu
(#36582) @gitstartButton
demos (#36590) @sai6855Core
All contributors of this release in alphabetical order: @alexfauquette, @amal-qb, @danilo-leal, @DevinCLane, @gitstart, @hbjORbj, @HeVictor, @LadyBluenotes, @michaldudak, @mj12albert, @mnajdova, @oliviertassinari, @RBerthier, @sai6855, @siriwatknp, @viclafouch, @yushanwebdev
v5.11.15
Compare Source
Mar 28, 2023
A big thanks to the 10 contributors who made this release possible. We have one big highlight this week ✨:
@mui/[email protected]
@mui/[email protected]
useFlexGap
prop (#36404) @siriwatknp@mui/[email protected]
autoSelect
prop description (#36280) @sai6855actions
type inslotProps
(#36458) @sai6855@mui/[email protected]
Docs
theme.applyDarkStyles
for the rest of the docs" (#36602) @mnajdovaSnackbar
coming soon page (#36604) @danilo-lealtheme.applyDarkStyles
(#36606) @siriwatknpSorting & Selecting
table demo (#33236) @IFaniryCore
All contributors of this release in alphabetical order: @alexfauquette, @danilo-leal, @hbjORbj, @IFaniry, @joserodolfofreitas, @mnajdova, @oliviertassinari, @sai6855, @siriwatknp, @varunmulay22
v5.11.14
Compare Source
Mar 21, 2023
A big thanks to the 15 contributors who made this release possible.
This release was mostly about 🐛 bug fixes and 📚 documentation improvements.
@mui/[email protected]
BreadcrumbCollapsed
through slots (#33812) @pratikkarad@mui/[email protected]
@mui/[email protected]
@mui/[email protected]
--List-decorator*
vars (#36595) @siriwatknp@mui/[email protected]
Docs
theme.applyDarkStyles
for the rest of the docs (#36161) @siriwatknpshouldSkipGeneratingVar
usage (#36581) @siriwatknpCore
All contributors of this release in alphabetical order: @danilo-leal, @dav1app, @gabrielnafuzi, @hbjORbj, @HediMuhamad, @michalak111, @mikailaread, @mnajdova, @oliviertassinari, @pratikkarad, @RomanHotsiy, @sai6855, @siriwatknp, @varunmulay22, @zaverden
v5.11.13
Compare Source
Mar 14, 2023
A big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
@mui/[email protected]
shouldSkipGeneratingVar
from Material UI (#36489) @siriwatknp@mui/[email protected]
Docs
All contributors of this release in alphabetical order: @erikian, @hbjORbj, @HeVictor, @hrutik7, @joserodolfofreitas, @m4theushw, @michaldudak, @oliviertassinari, @oyar99, @rayrw, @sai6855, @siriwatknp, @skevprog
v5.11.12
Compare Source
Mar 6, 2023
A big thanks to the 17 contributors who made this release possible. Here are some highlights ✨:
extendTheme
so that it can generate CSS variables with default values. This means that theCssVarsProvider
is no longer required for Joy UI when using the default theme (#35739)@mui/[email protected]
Mui-expanded
class (#33312) @Osman-Sodefaid
prop provided to theDialogTitle
component (#36353) @Kundan28@mui/[email protected]
@mui/[email protected]
Breaking changes
[core] Generate vars in
extendTheme
(#35739) @mnajdovaThe
shouldSkipGeneratingVar
prop was moved from thecreateCssVarsProvider
's option to thetheme
. If the default theme does not useextendTheme
from Material UI or Joy UI, it needs to be wrapped insideunstable_createCssVarsTheme
- a util exported from the MUI System. Below is an example of how the migration should look like:Or you can define it directly in the theme prop:
This breaking change only affects experimental APIs
@mui/[email protected]
Breaking changes
[Select][base] Add the multiselect functionality to SelectUnstyled (#36274) @michaldudak
The MultiSelectUnstyled was removed. The
SelectUnstyled
component with themultiple
prop should be used instead. Additionally, the SelectUnstyledProps received a second generic parameter:Multiple extends boolean
. If you deal with strictly single- or multi-select components, you can hard-code this parameter tofalse
ortrue
, respectively. Below is an example of how the migration should look like:Changes
import type
syntax (#36411) @ZeeshanTamboli@mui/[email protected]
Breaking changes
[Joy] Change CSS variables naming for components (#36282) @hbjORbj
Joy UI has new naming standards of the CSS variables for its components. Below is an example of how the migration should look like:
Changes
Docs
CssVarsProvider
is required (#36410) @mnajdovaConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.