This repository has been archived by the owner on Jun 4, 2023. It is now read-only.
fix(deps): update mantine monorepo to v6 (major) #151
Closed
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:
4.2.12
->6.0.0
4.2.12
->6.0.0
4.2.12
->6.0.0
Release Notes
mantinedev/mantine
v6.0.0
Compare Source
View changelog with demos on mantine.dev website
Breaking changes
The following changes are breaking. Note that although
we've tried to include all breaking changes with migration guides in the list you still may
experience undocumented changes. If you think that these changes worth including in this list,
let us know by opening an issue on GitHub.
Migration to rem/em units
All Mantine components now use rem units.
1rem
is considered to be16px
with medium text size selected by user, all components will scale based on settings specified in browser.
theme.spacing
,theme.radius
,theme.fontSizes
and other theme properties overridesare now expected to be defined in rem.
theme.breakpoints
are expected to be defined inem
units:You can no longer use addition, subtraction, division, multiplication and other math operations
with theme values in createStyles and sx prop,
use
calc
instead:Automatic px to rem conversion
If you use numbers in Mantine components props, they will be treated as
px
and converted torem
,for example:
The same logic is applied to style props available
in every component:
createStyles breaking changes
createStyles function no longer receives
getRef
as a third argument. Use
getStylesRef
exported from@mantine/core
package instead:@mantine/notifications breaking changes
@mantine/notifications package no longer exports
NotificationsProvider
component. Instead you should addNotifications
component to anypart of your application. This change allows to avoid unnecessary rerenders of child components
when notifications state change. Also
useNotifications
hook is no longer exported from the package.@mantine/rte package deprecation
@mantine/rte
package is deprecated – it will no longer receive updates (last version will remain 5.x)and it may no longer be compatible with
@mantine/core
and@mantine/hooks
packages (6.x and later versions).Migrate to @mantine/tiptap as soon as possible.
@mantine/dates breaking changes
All components from
@mantine/dates
package were rebuilt from scratch.Note that the following list is not full as it is difficult to include all breaking changes
after a full package revamp – follow documentation of component that you use to find out about
all breaking changes.
DatePicker
component was renamed toDatePickerInput
Calendar
component was renamed toDatePicker
TimeInput
component was migrated to nativeinput[type="time"]
as it provides better UX in most browsersTimeRangeInput
component was removed – it is no longer exported from the packageDateRangePicker
andRangeCalendar
components were removed – you can now setup dates range picking in DatePicker and DatePickerInputamountOfMonths
prop was renamed tonumberOfColumns
in all componentsDatePickerInput
(previouslyDatePicker
) component no longer supportsallowFreeInput
prop – use DateInput component insteadDatePicker
(previouslyCalendar
) component no longer supportsdayClassName
anddayStyle
props – usegetDayProps
insteadTheme object changes
You can no longer define
dateFormat
anddatesLocale
in theme,use components prop to specify format instead:
Modal and Drawer breaking changes
Modal and Drawer components
props were renamed:
withFocusReturn
→returnFocus
overflow
→scrollAreaComponent
(scroll now is always handled inside modal/drawer)overlayBlur
→overlayProps.blur
overlayColor
→overlayProps.color
overlayOpacity
→overlayProps.opacity
exitTransitionDuration
→transitionProps.exitDuration
transition
→transitionProps.transition
transitionDuration
→transitionProps.duration
transitionTimingFunction
→transitionProps.timingFunction
Modal
styles API changes:modal
selector was renamed tocontent
Drawer
styles API changes:drawer
selector was renamed tocontent
NumberInput breaking changes
NumberInput component types for
value
,defaultValue
and
onChange
props were changed. It now expects value to benumber | ''
(number or empty string) insteadof
number | undefined
. This change was made to address multiple bugs that happened because it wasnot possible to differentiate controlled and uncontrolled
NumberInput
.Pagination breaking changes
itemComponent
– removed, usegetItemProps
or static components insteadgetItemAriaLabel
– removed, usegetItemProps
prop insteadinitialPage
→defaultValue
page
→value
@mantine/spotlight breaking changes
Spotlight component was migrated to use Modal
under the hood. Its Styles API selectors and some props names were changed – it now supports all Modal component props.
Renamed props:
overlayBlur
→overlayProps.blur
overlayColor
→overlayProps.color
overlayOpacity
→overlayProps.opacity
exitTransitionDuration
→transitionProps.exitDuration
transition
→transitionProps.transition
transitionDuration
→transitionProps.transition
transitionTimingFunction
→transitionProps.timingFunction
Spotlight actions are now fully controlled:
actions
prop no longer accept a callback function, only a list of actionsOther breaking changes
variant="link"
, use Anchor insteaddisabled
,invalid
andwithIcon
selectors are no longer available, they were migrated todata-disabled
,data-invalid
anddata-with-icon
attributesinvalid
andwithIcon
selectors are no longer available, usedata-invalid
anddata-with-icon
attributes withinnerInput
selectorinvalid
prop was renamed toerror
in Input componentclearButtonLabel
andclearButtonTabIndex
props, useclearButtonProps
instead to add any extra props to the clear button@mantine/next
package no longer exportsNextLink
componentorientation
,offset
andspacing
props are no longer supported. This change gives you more freedom on how to organize inputs layout.Group
– you need to manage layout on your sidewithIcon
selector, usedata-with-icon
attribute insteadwithFocusReturn
prop was renamed toreturnFocus
in Modal and Drawer componentspadding
prop instead ofp
to offsetCard.Section
components@tabler/icons-react
(>=2.1.0
) package instead of@tabler/icons
@mantine/core
package no longer exportsGroupedTransition
component, use multiple Transition components insteaduse-scroll-lock
hook is deprecated, all Mantine components now use react-remove-scrollmaxHeight
is removed, it is replaced withmah
style proplabelActive
anddisabled
selectors were removed (replaced withdata-active
anddata-disabled
attributes onlabel
selector),active
selector was renamed toindicator
disallowClose
prop was renamed towithCloseButton
, it also was changed in notifications systemtransition
andtransitionDuration
were renamed totransitionProps
transition
,transitionDuration
andexitTransitionDuration
props were renamed totransitionProps
dot
,showZero
andoverflowCount
. Usedisabled
andlabel
instead to recreate the previous behavior.Variants and sizes on MantineProvider
You can now use MantineProvider to add variants to all Mantine components that support Styles API
and sizes to components that support
size
prop.Variants:
Sizes:
Updated @mantine/dates package
@mantine/dates
package was rebuilt from scratch, it now includes new components topick year, month
and dates. All new pickers support
type
prop that can be:default
–Date | null
– user can pick one datemultiple
–Date[]
– user can pick any number of datesrange
–[Date | null, Date | null]
– user can pick a range of two datestype="default"
example with DatePickerInput component:type="multiple"
example with MonthPickerInput component:type="range"
example with YearPickerInput component:DateTimePicker component
DateInput
YearPicker component
YearPickerInput
MonthPicker
MonthPickerInput
Calendar
Calendar
component can now be used as a base for date pickers with custom logic.For example, you can build week picker component with it:
DatesProvider
DatesProvider
component lets you set various settings that are shared across allcomponents exported from
@mantine/dates
package:New PinInput component
Overlay component improvements
Overlay component now supports the following new features:
children
insideOverlay
center
prop is set overlay children will be centered vertically and horizontallyfixed
prop controlsposition
, when it is setposition: fixed
, when it is not setposition: absolute
Modal and Drawer components improvements
Modular components
Modal and Drawer components
now expose modular components that can be used to build custom modals and drawers. This feature
allows you to have full control over the component rendering. Previous approach with single
Modal
/Drawer
component will still work the same way as before.Built in ScrollArea
Modal and Drawer components
now use ScrollArea component to handle scroll:
Modal offset
Modal component now supports
xOffset
andyOffset
propsto control vertical and horizontal offsets of the modal content:
keepMounted prop
Components that use Transition now support
keepMounted
.When
keepMounted
prop is set component will not be unmounted from the DOM and instead it willbe hidden with
display: none
styles.keepMounted
prop is supported by the following components:Pagination component improvements
Pagination component now supports changing icons with props and modular components:
@mantine/spotlight improvements
Controlled actions
You can now fully control actions state:
Controlled search query
You can now fully control search query:
Other changes
rightSection
of all inputs is now based onsize
prop by default (previously it was a static value)filled
,outline
andlight
variantstheme.headings.fontFamily
now fallbacks totheme.fontFamily
if value is not defined onMantineProvider
notifications
object that includes functions to show, update, hide, clean and clean queuenprogress
,modals
andspotlight
objects with all package methodsuseLayoutEffect
by default (configurable with option) to avoid hydration mismatchesReact.useId
hook. This change prevents browser from showing incorrect autocomplete suggestions for inputs.root
Styles API selectorreadOnly
propsize
propform.getTransformedValues
handlerserialize
anddeserialize
props to allow custom JSON formatsmatchesField
validatorwithError
parameter is now true by default for all inputsPrevious documentation versions
v5.10.5
Compare Source
What's Changed
[@mantine/dates]
FixinputWrapperOrder
not supported by TimeInput and TimeInputRange components (#3520)[@mantine/core]
Fix AppShell, Dialog, Drawer and Modal components incorrect style props type[@mantine/modals]
Fix centered modal jumping when closed (#3570)[@mantine/core]
Popover: Fix dropdown not following target element inside scrollable container whenwithinPortal
is set (#3576)[@mantine/core]
Tooltip: Fix incorrectdisabled
prop behavior in Tooltip.Floating (#3611)[@mantine/core]
Table: Fix incorrect th styles inside tbody (#3556)[@mantine/core]
Add ColSpan type exports (#3564)[@mantine/core]
PasswordInput: Fix typo in selector (#3553)New Contributors
Full Changelog: mantinedev/mantine@5.10.4...5.10.5
v5.10.4
Compare Source
What's Changed
[@mantine/core]
PasswordInput: Hide native browser password reveal button in Edge[@mantine/core]
Notification: Fix content overflow with very large children (#3540)[@mantine/core]
MakeuseInputProps
hook strongly typed (#3486)[@mantine/core]
MultiSelect: Add missing default value fordropdownPosition
(#3490)[@mantine/core]
Table: Fix styles forth
elements not working insidetbody
(#3504)[@mantine/modals]
Fix multiplecloseModal
issues (#3498)[@mantine/hooks]
use-disclosure: Memoize functions (#3513)[@mantine/hooks]
use-focus-trap: Fix aria-hidden not being removed from the body when target element changes (#3526)[@mantine/core]
Allow usage of read only arrays in Select and MulstiSelect components (#3542)[@mantine/core]
Text: Add option to truncate text from the start (#3550)New Contributors
Full Changelog: mantinedev/mantine@5.10.3...5.10.4
v5.10.3
Compare Source
What's Changed
[@mantine/core]
Add option to pass additional props to file input in FileButton and FileInput components[@mantine/form]
FixonBlur
missing in getInputProps type[@mantine/form]
Improve isEmail validation logic (#3443)[@mantine/core]
SimpleGrid: Fix zero spacing and vertical spacing nor working in breakpoints (#3453)[@mantine/dropzone]
Add avif image mime type (#3166)[@mantine/dates]
DateRangePicker: Fix incorrectopenDropdownOnClear
behavior (#3299)[@mantine/hooks]
use-hotkeys: Add additional configuration to allow hook usage with content editable elements (#3410)[@mantine/core]
Add hoverOnSearchChange prop to Autocomplete, Select and MultiSelect (#3102)[@mantine/styles]
Fix incorrectuseComponentDefaultProps
type (#3484)[@mantine/core]
MultiSelect: Allow to disable selected items filtering from the dropdown items list (#3104)[@mantine/form]
FixzodResolver
not being type safe with older versions of TypeScript (#3431)[@mantine/carousel]
Fix carousel with vertical orientation working incorrectly with RTL direction (#3438)[@mantine/core]
Fix dropdown position not being updated after Select, MultiSelect and Autocomplete dropdown was flipped and user started searching (#3439)[@mantine/core]
Pagination: Fixspacing={0}
not working (#3456)[@mantine/core]
Dependency: migrate@floating-ui/react-dom-interactions
to@floating-ui/react
(#3471)[@mantine/core]
Skeleton: Allow overflow when children are visible (#3475)[@mantine/core]
TransferList: addtransferAllMatchingFilter
prop (#3436)New Contributors
Full Changelog: mantinedev/mantine@5.10.2...5.10.3
v5.10.2
Compare Source
What's Changed
[@mantine/modals]
Fix modals closing issues (#3300)[@mantine/tiptap]
Update @tabler/icons installation instructions (#3415)New Contributors
Full Changelog: mantinedev/mantine@5.10.1...5.10.2
v5.10.1
Compare Source
What's Changed
[@mantine/core]
HoverCard: Add missing types for classNames, styles and unstyled props (#3257)[@mantine/modals]
Fix incorrect close modal logic (#3300)[@mantine/hooks]
use-set-state: Make setState fucntion stable across renders (#3357)[@mantine/tiptap]
Fix incorrect styles on placeholder component (#3382)[@mantine/hooks]
use-local-storage: Fix value not updated when local storage value is cleared (#3298)[@mantine/core]
Fix unexpected extra space added at the bottom of Switch, Radio and Checkbox components (#3303)[@mantine/hooks]
use-full-screen: Fix hook not working on iOS (#3327)[@mantine/core]
Stepper: Fix allowStepSelect not working on Stepper.Step component (#3340)[@mantine/form]
Fix useForm initialDirty stops form.isDirty from working as expected (#3372)[@mantine/core]
Stack: Fix incorrect default justify prop (#3293)New Contributors
Full Changelog: mantinedev/mantine@5.10.0...5.10.1
v5.10.0
Compare Source
View changelog with demos on Mantine website
Theme based default props
Default props on MantineProvider
can now subscribe to theme:
@mantine/form validators
@mantine/form
package now exportsisNotEmpty
,isEmail
,matches
,isInRange
andhasLength
functionsto simplify validation of common fields types:
Flagpack extension
New mantine-flagpack extension. It is a set of 4x3 flags as React components based on flagpack.
The package is tree shakable – all unused components are not included in the production bundle.
All flag components support style props.
Other changes
onColorSwatchClick
propcloseOnColorSwatchClick
propTransformedValues
type to get type of transformed values from the form objectrootColor
proptruncate
propallowSelectNextSteps
propsuperstructResolver
to allow schema based validation with superstructcapture
propNew Contributors
Full Changelog: mantinedev/mantine@5.9.6...5.10.0
v5.9.6
Compare Source
What's Changed
[@mantine/spotlight]
Allow overriding search input size (#3181)[@mantine/core]
Tooltip: Fix incorrect Tooltip.Floating Styles API name[@mantine/core]
ScrollArea: Add viewportProps support[@mantine/core]
Title: Removespan
propNew Contributors
Full Changelog: mantinedev/mantine@5.9.5...5.9.6
v5.9.5
Compare Source
What's Changed
[@mantine/tiptap]
Fix LinkControl not supporting custom icon (#3196)[@mantine/hooks]
use-network: Fix incorrect initial online/offline state detection (#3178)[@mantine/core]
Space: Add responsive values support to w and h props[@mantine/core]
FileInput: Fix value overflow when selected value name is too largeNew Contributors
Full Changelog: mantinedev/mantine@5.9.4...5.9.5
v5.9.4
Compare Source
What's Changed
[@mantine/core]
Switch: Fix incorrect alignment (#3082)[@mantine/dates]
Fix DateRangePicker and DatePicker components not supportingConfiguration
📅 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 these updates again.
This PR has been generated by Mend Renovate. View repository job log here.