fix(deps): update dependency @mantine/hooks to v8 #3135
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:
^7.11.2->^8.0.0Release Notes
mantinedev/mantine (@mantine/hooks)
v8.1.2Compare Source
v8.1.1Compare Source
What's Changed
[@mantine/hooks]use-set: Fixunionmethod not working correctly (#7981)[@mantine/core]Popover: Fix incorrect position handling (#7955, #7953)[@mantine/dates]TimePicker: Fix incorrect empty string handling (#7927)[@mantine/dates]DatePickerInput: Fix incorrectonChangetype (#7943)[@mantine/dates]TimePicker: Fix incorrect handling ofmin/maxvalues in some cases (#7904)[@mantine/hooks]use-hotkeys: Fix Escape key not being handled correctly in some browsers (#7928)[@mantine/core]Tree: Fix detached DOM nodes memory leak (#7940)[@mantine/hooks]use-debounced-callback: Addcancelmethod support (#7965)[@mantine/dates]DatePicker: Fix incorrect value type fortype="range" (#​7937)[@mantine/dates]DatePicker: FixclassNameandstyleprops not working whenpresetsprop is set (#7960)New Contributors
Full Changelog: mantinedev/mantine@8.1.0...8.1.1
v8.1.0Compare Source
View changelog with demos on mantine.dev website
DatePicker presets
DatePicker, DatePickerInput and DateTimePicker now support
presetsprop that allows you to add custom date presets. Presets are displayed next to the calendar:Calendar headerControlsOrder
Calendar and other components based on it now support
headerControlsOrderprop.You can use
headerControlsOrderprop to change the order of header controls. The prop accepts an array of'next' | 'previous' | 'level. Note that each control can be used only once in the array.Popover middlewares improvements
Popover component now handles
shiftandflipFloating UIdifferently. Starting from 8.1.0 version, the popover dropdown position is not
changed when the popover is opened.
shiftandflipmiddlewares are used onlyonce to calculate the initial position of the dropdown.
This change fixes incorrect flipping/shifting behavior when there is dynamic content
in the dropdown. For example, searchable Select and DatePickerInput without
consistentWeeksoption.use-long-press hook
New use-long-press hook:
Reference area support in charts
BarChart, AreaChart and LineChart
components now support reference area. Reference area is a rectangular area
that can be used to highlight a specific region of the chart:
use-form resetField handler
use-form now has a
resetFieldmethod that resets field value to its initial value:TagsInput isDuplicate prop
You can now use
isDuplicateprop in TagsInput componentto control how duplicates are detected. It is a function that receives two arguments:
tag value and current tags. The function must return
trueif the value is duplicate.Example of using
isDuplicateto allow using the same value with different casing:Slider domain prop
Slider component now support
domainprop that allows settingthe possible range of values independently of the
minandmaxvalues:RangeSlider pushOnOverlap prop
RangeSlider component now supports
pushOnOverlapprop that defineswhether the slider should push the overlapping thumb when the user drags it.
Hooks types exports
@mantine/hookspackage now exports all types used in hooks options and return values.For example, you can now import use-uncontrolled types like this:
Types exported from the library:
zod v4 with use-form
You can now use zod v4 with use-form. To use zod 4:
mantine-form-zod-resolverto1.2.1or later version3.25.0or laterzodimports withzod/v4(only if you havezod@3in yourpackage.json)zodResolverwithzod4Resolverin your codeExample with zod v4:
Documentation updates
flushandflushOnUnmountfeaturesOther changes
bdrsstyle prop to set border radius.defaultTimeValuepropautoContrastprop.React.RefObject->React.RefCallback), required to fix incorrect ref handling in several cases. For more information, see the issue on GitHub – #7406.React.MutableRefObjecttype was replaced withReact.RefObjectin all packages to better support React 19 types.positionDependenciesprop is now deprecated in Tooltip, Popover and other components based on Popover. The prop is no longer required and can be safely removed.positionDependenciesprop will be removed in 9.0 release.v8.0.2Compare Source
What's Changed
[@mantine/dates]DateTimePicker: Fix incorrectonChangevalue type[@mantine/core]ScrollArea: FixonBottomReachednot being called when the container size has sub-pixel value[@mantine/dates]TimePicker: Improve leading zero input handling[@mantine/dates]TimePicker: Fix setting value to an empty string not reseting displayed time in some cases[@mantine/form]Fixform.reorderItemreordering only the first item (#7892)[@mantine/dates]DateInput: Fix selected month and year not being highlighted (#7897)[@mantine/hooks]use-local-storage: AddqueueMicrotaskfor dispatching update events to fix multiple hook instances synchonization (#7874)[@mantine/dates]Fix leftover timezone issues after 8.0 strings migration (#7878)[@mantine/form]Add zod v4 support (#7871)[@mantine/core]Popover: FixonOpen/onClosebeing called whendisabledprop is set (#7868)[@mantine/spotlight]Fix labels containing single quote passed toSpotlight.ActionGroupnot working (#7865)[@mantine/core]Collapse: Fixinertprop not being compatible with React 18 (#7864)[@mantine/core]List: Fix incorrect types whentype="unordered"(#7861)[@mantine/core]AngleSlider: Fix incorrect arrow events handling (#7862)[@mantine/dates]DateInput: Fix Escape key not closing dropdown (#7857)[@mantine/hooks]use-shallow-effect: FixNaNvalue not being handled correctly (#7851)New Contributors
Full Changelog: mantinedev/mantine@8.0.1...8.0.2
v8.0.1Compare Source
What's Changed
[@mantine/hooks]use-debounced-callback: Addleading: trueoption support (#7841)[@mantine/core]Tabs: Fix incorrect Tabs.List styles withgrowprop enabled[@mantine/core]MutltiSelect: FixonPasteprop not being passed to the input element (#7838)[@mantine/dates]TimePicker: Fix up/down arrows not working correctly withstepprop (#7784)[@mantine/core]Button: Fix FileButton breaking Button.Group styles (#7835)[@mantine/core]Modal Fix incorrect header styles with ScrollArea (#7832)[@mantine/dropzone]Fix status being stuck in rejected state when a file with incorrect mime type is dropped[@mantine/core]Switch: Fix incorrect thumb position in RTL layouts (#7822)[@mantine/core]AngleSlider: Fix incorrect thumb position in RTL layouts (#7822)[@mantine/core]Menu: Fix default props not working in Menu.Sub (#7820)[@mantine/core]Disable scaling explicit rem units in rem function (#7821)[@mantine/core]Slider: Fix incorrect track width (#7464)[@mantine/dates]TimeInput: Fixstepprop not working (#7811)[@mantine/core]Select: FixonSearchChangebeing triggered when controlled search value is updated (#7814)[@mantine/dropzone]Migrate back to react-dropzone from react-dropzone-esm[@mantine/code-highlight]Fix tooltip being cut off in components with 1-2 lines of code (#7816)[@mantine/core]Fix inconsistent disabled styles in some components, add CSS variables for disabled colors (#7805)[@mantine/dates]DatePicker: Add selected date highlight in year and month picker fortype="default"(#7799)[@mantine/core]Table: AddscrollAreaPropssupport to Table.ScrollContainer (#7798)[@mantine/core]Fix boolean value not being included indata-*attributes types (#7810)[@mantine/dates]DateInput: Fix incorrectonChangevalue type (#7796)[@mantine/core]Stepper: Fix unexpected bottom spacing in vertical orientation (#7794)[@mantine/core]PasswordInput: Fixaria-describedbynot pointing to error and description elements (#7793)[@mantine/core]Switch: Fixdivelement used inside label (#7776)[@mantine/dates]Add empty string handling as empty value (#7780)[@mantine/core]Collapse: Fix children with scale animations not working correctly when collapse is opened (#7774)[@mantine/core]Transition: FixexitDurationnot working correctly for rapid changes (#7773)[@mantine/dates]TimePicker: Fix00in dropdown not being reachable with arrow keys when it is outside scroll position (#7788)[@mantine/core]Stepper: Fix inconsistent border color in horizontal/vertical orientation (#7795)[@mantine/core]Stepper: Fix inconsistent border color in horizontal/vertical orientation (#7795)New Contributors
Full Changelog: mantinedev/mantine@8.0.0...8.0.1
v8.0.0: 🌶️Compare Source
View changelog with demos on mantine.dev website
Migration guide
This changelog covers breaking changes and new features in Mantine 8.0.
To migrate your application to Mantine 8.0, follow 7.x → 8.x migration guide.
Granular global styles exports
Global styles are now splitted between 3 files:
baseline.css– a minimal CSS reset, setsbox-sizing: border-boxand changes font propertiesdefault-css-variables.css– contains all CSS variables generated from the default themeglobal.css– global classes used in Mantine componentsIf you previously imported individual styles from
@mantine/corepackage, you need to update importsto use new files:
If you imported
@mantine/core/styles.css, no changes are required –all new files are already included in
styles.css.Menu with submenus
Menu component now supports submenus:
Popover hideDetached
Popover component now supports
hideDetachedprop to configure how the dropdown behaves when the targetelement is hidden with styles (
display: none,visibility: hidden, etc.),removed from the DOM, or when the target element is scrolled out of the viewport.
By default,
hideDetachedis enabled – the dropdown is hidden with the target element.You can change this behavior with
hideDetached={false}. To see the difference, try to scrollthe root element of the following demo:
Date values as strings
All
@mantine/datescomponents now use date strings inYYYY-MM-DDorYYYY-MM-DD HH:mm:ssformat instead of
Dateobjects. This change was made to resolve issues related to timezones– now the output of all
@mantine/datescomponents does not include any timezone-specific information.Follow 7.x → 8.x migration guide to learn how to update the code to use new string values.
Example of using DatePicker component with string values:
DatesProvider timezone
DatesProvidercomponent no longer supportstimezoneoption – all@mantine/datescomponents now use strings in
YYYY-MM-DD HH:mm:ssformat as values and do not containtimezone information.
If you need to handle timezones in your application, you can use a dedicated dates library
(dayjs, luxon, date-fns)
to update timezone values.
Example of using Mantine components with dayjs:
TimePicker component
New TimePicker component is an alternative to
TimeInput that offers more features. It supports 24-hour and 12-hour formats,
dropdown with hours, minutes and seconds, and more.
DateTimePicker component changes
DateTimePicker component now uses TimePicker under
the hood instead of TimeInput. You can now use all TimePicker
features with DateTimePicker component.
Prop
timeInputPropsis no longer available, to pass props down to the underlying TimePickeryou need to use
timePickerPropsprop.Example of enabling dropdown and setting
12hformat for time picker:TimeValue component
New TimeValue component can be used to display a formatted time string
with similar formatting options to TimePicker component.
TimeGrid component
New TimeGrid component allows to capture time value from the user with a
predefined set of time slots:
Heatmap component
New Heatmap component allows to display data in a calendar heatmap format:
CodeHighlight changes
@mantine/code-highlight package no longer depends on
highlight.js. Instead, it now provides a new API based
on adapters that allows using any syntax highlighter of your choice. Out of the box,
@mantine/code-highlightprovides adapters for shiki andhighlight.js.
To learn about the migration process and how to use the new adapters API, check the
updated CodeHighlight documentation and 7.x → 8.x migration guide.
CodeHighlight with shiki
You can now use CodeHighlight component with shiki.
Shiki library provides the most advanced syntax highlighting
for TypeScript and CSS/Sass code. It uses textmate grammars to highlight code (same as in VSCode).
Shiki adapter is recommended if you need to highlight advanced TypeScript (generics, jsx nested in props) or CSS code (custom syntaxes, newest features).
Shiki adapter is used for all code highlighting in Mantine documentation.
To use shiki adapter, you need to install
shikipackage:Then wrap your app with
CodeHighlightAdapterProviderand providecreateShikiAdapterasadapterprop:After that, you can use
CodeHighlightcomponent in your application:Carousel changes
@mantine/carousel package was updated to use the latest version of
embla-carousel-reactpackage. This update includes breaking changes:speedanddraggableprops were removed – they are no longer supported byembla-carousel-reactembla-carouselandembla-carousel-reactpackages explicitlyuseAnimationOffsetEffecthook was removed – the issue it addressed was fixed inembla-carousel-reactEmblatype export was removed, you should useEmblaCarouselTypefromembla-carouselinsteademblaOptionspropFollow the 7.x → 8.x migration guide to update your application to use the latest version of
@mantine/carousel.Switch withThumbIndicator
Switch component styles were updated to include indicator inside the thumb.
You can change it by setting
withThumbIndicatorprop:Theme types augmentation
You can now augment
spacing,radius,breakpoints,fontSizes,lineHeights,and
shadowstypes. To learn more about this feature, follow this guide.Example of types augmentation for
spacingandradius:Other changes
sizeproppreserveTimeprop, use different component to capture time valuesdisplay: tablestyles on the wrapper element of the content. It also now supportscontentStyles API selector to apply styles to the content element.flex: 0styles by defaultwrapperPropsprop in all components that support it (Checkbox,Radio,Chip, most inputs) was changed to more strict typereuseTargetNodeprop enabled by defaultsetFieldValuehandler types are now stricterdata-hoveredattribute, use:hoverand:focusselectors instead to apply styleschromeosvalue in the unionNew Contributors
Full Changelog: mantinedev/mantine@7.17.6...8.0.0
Configuration
📅 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 is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.