chore(ui): update mantine & related (major) #1094
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:
1.0.8
->2.0.0
^6
->^6 || ^7.0.0
6.0.21
->7.5.2
^6
->^6 || ^7.0.0
6.0.21
->7.5.2
^6
->^6 || ^7.0.0
6.0.21
->7.5.2
^6
->^6 || ^7.0.0
6.0.21
->7.5.2
^6
->^6 || ^7.0.0
6.0.21
->7.5.2
^6
->^6 || ^7.0.0
6.0.21
->7.5.2
^6
->^6 || ^7.0.0
6.0.21
->7.5.2
^2.0.0
->^2.0.0 || ^3.0.0
2.0.0
->3.1.3
Release Notes
mantinedev/mantine (@mantine/carousel)
v7.5.2
Compare Source
What's Changed
[@mantine/core]
ActionIcon: Fix icon width and height defined in % not working correctly[@mantine/core]
ScrollArea: FixoffsetScrollbars
not working (#5733)[@mantine/tiptap]
FixinitialExternal
onRichTextEditor.Link
control not working correctly[@mantine/core]
FileInput: Fix incorrectextend
function type[@mantine/core]
PinInput: Fix various issues related to user input and pasting into the input (#5704)[@mantine/form]
Add callback argument support toform.setFieldValue
handler (#5696)[@mantine/core]
Add explicit extension to exports to support NodeNext TypeScript resolution (#5697)[@mantine/hooks]
use-list-state: Addswap
handler support (#5716)[@mantine/core]
Fix NodeNext TypeScript resolution not working correctly for PolymorphicComponentProps and PolymorphicRef types (#5730)[@mantine/core]
Fix cjs builds unable to resolve third-party dependencies with certain TypeScript settings (#5741)[@mantine/core]
Transition: Fix skew-up transition not working (#5714)[@mantine/core]
Select: Fix active option not being scrolled into view when the dropdown opens[@mantine/core]
Menu: Fix unexpected focus trap when keepMounted is false (#4502)[@mantine/core]
ScrollArea: Fixstyle
prop not being passed to the element when used inviewportProps
(#5594)[@mantine/core]
Divider: Fix poor color contrast with light color scheme[@mantine/core]
Modal: Fix incorrect content border-radius whenfullScreen
prop is set[@mantine/core]
Modal: Fix scroll container not working correctly when ScrollArea is used as a scroll container for a full screen modal[@mantine/notifications]
Fix notifications handlers not allowing passing data-* attributes (#5640)New Contributors
Full Changelog: mantinedev/mantine@7.5.1...7.5.2
v7.5.1
Compare Source
What's Changed
[@mantine/core]
Indicator: Improve processing animation for lo-resolution monitors (#5682)[@mantine/hooks]
use-debounced-state: Fix incorrect type definition (#5665)[@mantine/hooks]
use-session-storage: Fix default value not being set in the storage on initial render (#5663)[@mantine/core]
Combobox: Fix incorrect dropdown styles with custom ScrollArea component (#5677)[@mantine/form]
Fix incorrect touch and dirty state handling inform.initialize
(#5623)[@mantine/core]
Chip: Fix error thrown when page is modified with Google Translate (#5586)[@mantine/form]
Add previous value as second argument toonValuesChange
(#5649)[@mantine/core]
FixautoContrast
defined on theme not working in some components (#5655)[@mantine/core]
Fix broken alignment in Checkbox, Radio and Switch (#5648)[@mantine/core-highlight]
AddwithCopyButton
prop support to CodeHighlightTabs (#5608)[@mantine/core]
UpdateuseComputedColorScheme
types to match definition with other similar hooks (#5588)[@mantine/core]
MultiSelect: Forbid select item removal if associated item becomes disabled (#5630)New Contributors
Full Changelog: mantinedev/mantine@7.5.0...7.5.1
v7.5.0
: ✨ 7.5.0Compare Source
View changelog with demos on mantine.dev website
DonutChart component
New DonutChart component:
PieChart component
New PieChart component:
@mantine/dates value formatter
DatePickerInput, MonthPickerInput and
YearPickerInput now support
valueFormatter
prop.valueFormatter
is a more powerful alternative tovalueFormat
prop.It allows formatting value label with a custom function.
The function is the same for all component types (
default
,multiple
andrange
)– you need to perform additional checks inside the function to handle different types.
Example of using a custom formatter function with
type="multiple"
:@mantine/dates consistent weeks
You can now force each month to have 6 weeks by setting
consistentWeeks: true
onDatesProvider. This is useful if you want to avoid layout
shifts when month changes.
Charts series label
It is now possible to change series labels with
label
propertyin
series
object. This feature is supported in AreaChart,BarChart and LineChart components.
Charts value formatter
All
@mantine/charts
components now supportvalueFormatter
prop, which allowsformatting value that is displayed on the y axis and inside the tooltip.
Headings text wrap
New Title
textWrap
prop sets text-wrapCSS property. It controls how text inside an element is wrapped.
You can also set
textWrap
on theme:If set on theme,
textWrap
is also applied to headings in TypographyStylesProvidermod prop
All components now support
mod
prop, which allows adding data attributes tothe root element:
Documentation updates
shift
andflip
middlewares documentationHelp center updates
New articles added to the help center:
Other changes
readOnly
proploading
state animationwithItemsBorder
prop which allows removing border between itemstransitionDuration
prop which controls section width animation durationresize
prop, which allows settingresize
CSS property on the input@mantine/hooks
package now exports readLocalStorageValue and readSessionStorageValue function to get value from storage outside of React componentsv7.4.2
Compare Source
What's Changed
[@mantine/modals]
FixonClose
throwing error iftrapFocus: false
is passed to one of the modals (#5577)[@mantine/dates]
Add missingplaceholder
styles api selector to DatePickerInput, MonthPickerInput and YearPickerInput components[@mantine/tiptap]
Fix incorrect disabled controls in dark color scheme[@mantine/core]
MultiSelect: Fixcombobox.closeDropdown()
called twice inonBlur
method[@mantine/tiptap]
Fix incorrect peer dependencies[@mantine/core]
Fix incorrect colors resolving logic forbg
style prop[@mantine/core]
Remove global height styles from body and html[@mantine/hooks]
use-media-query: FixgetInitialValueInEffect
not working correctly when initial value is provided (#5575, #5549)[@mantine/core]
Divider: Change default colors to match other components (#5480)[@mantine/core]
Fix incorrectforceColorScheme={undefined}
handling (#4959)[@mantine/core]
Menu: Remove duplicated static class on the dropdown element (#5537)[@mantine/core]
Add/
support for rgba calculations (#5544)New Contributors
Full Changelog: mantinedev/mantine@7.4.1...7.4.2
v7.4.1
Compare Source
What's Changed
[@mantine/core]
Combobox: Fix numpad enter not working (#5526)[@mantine/core]
Combobox: FixonClose
prop not working (#5509)[@mantine/core]
AppShell: Fix header height 0 not working (#5514)[@mantine/core]
ColorPicker: Fix incorrect background gradient in AlphaSlider (#5518)[@mantine/core]
Indicator: FixautoContrast
being passed to the dom node as attribute (#5508)[@mantine/core]
NumberInput: FixallowLeadingZeros
prop not working[@mantine/core]
NumberInput: Fix incorrect controls border color in disabled state[@mantine/core]
NumberInput: Fix incorrect -0.0, -0.00, -0.000 ... inputs handling[@mantine/core]
Popover: Improvewidth
prop type[@mantine/core]
Improve types ofdata
prop in Autocomplete and TagsInput components[@mantine/core]
MultiSelect: Fixrequired
prop not displaying required asterisk[@mantine/hooks]
use-scroll-into-view: Improve types (#5426)[@mantine/core]
MultiSelect: Fix incorrectpointer-events
style on the right section (#5472)[@mantine/core]
Fix breakpoints defined in px being transformed into em whenvisibleFrom
andhiddenFrom
props are used (#5457)[@mantine/core]
Rating: Improvesize
type (#5470)[@mantine/core]
ScrollArea: Fix ScrollArea.Autosize working incorrectly with some tables (#5481)[@mantine/core]
NumberInput: Add support for numbers that are larger than Number.MAX_SAFE_INTEGER (#5471)[@mantine/core]
Combobox: Fix readonly data array not being supported (#5477)[@mantine/charts]
Fix incorrect y-axis styles in RTL (#5505)New Contributors
Full Changelog: mantinedev/mantine@7.4.0...7.4.1
v7.4.0
: ⭐Compare Source
View changelog with demos on mantine.dev website
@mantine/charts
New @mantine/charts package provides a set of components
to build charts and graphs. All components are based on recharts.
Currently, the package provides AreaChart, BarChart,
LineChart and Sparkline components.
More components will be added in the next minor releases.
AreaChart component
New AreaChart component:
LineChart component
New LineChart component:
BarChart component
New BarChart component:
Sparkline component
New Sparkline component:
OKLCH colors support
You can now use OKLCH colors in
theme.colors
.OKLCH color model has 88.18% browser support,
it is supported in all modern browsers. OKLCH model provides 30% more colors than HSL model and
has several other advantages.
Example of adding OKLCH color to the theme:
autoContrast
New
theme.autoContrast
property controls whether text color should be changed based on the givencolor
propin the following components:
variant="filled"
onlyvariant="filled"
onlyvariant="filled"
onlyvariant="filled"
onlyvariant="filled"
onlyvariant="filled"
onlyvariant="filled"
onlyvariant="filled"
onlyvariant="filled"
onlyvariant="filled"
onlyvariant="pills"
onlyautoContrast
can be set globally on the theme level or individually for each component viaautoContrast
prop,except for Spotlight and @mantine/dates components, which only support global theme setting.
autoContrast
checks whether the given color luminosity is above or below theluminanceThreshold
valueand changes text color to either
theme.white
ortheme.black
accordingly:Color functions improvements
alpha
,lighten
anddarken
functions now support CSS variables (with color-mix) and OKLCH colors.All functions are available both in
@mantine/core
(.ts
/.js
files) and postcss-preset-mantine (.css
files, requires version 1.12.0 or higher).In
.css
files:Will be transformed to:
In
.ts
/.js
files:Note that
alpha
function is a replacement forrgba
. It was renamed tohave a more clear meaning, as it can now be used with CSS variables and OKLCH colors.
rgba
function is still available as an alias foralpha
function.enhanceGetInputProps
@mantine/form
now supports enhanceGetInputProps.enhanceGetInputProps
is a function that can be used to add additional props to the object returned byform.getInputProps
.You can define it in
useForm
hook options. Its argument is an object with the following properties:inputProps
– object returned byform.getInputProps
by defaultfield
– field path, first argument ofform.getInputProps
, for examplename
,user.email
,users.0.name
options
– second argument ofform.getInputProps
, for example{ type: 'checkbox' }
, can be used to pass additionaloptions to
enhanceGetInputProps
functionform
– form instanceExample of using
enhanceGetInputProps
to disable input based on field path:Example of using
enhanceGetInputProps
to add additional props to the input based on option passed toform.getInputProps
:form.initialize
@mantine/form
now supportsform.initialize
handler.When called
form.initialize
handler setsinitialValues
andvalues
to the same valueand marks form as initialized. It can be used only once, next
form.initialize
callsare ignored.
form.initialize
is useful when you want to sync form values with backend API response:Example with TanStack Query (react-query):
Note that
form.initialize
will erase all values that were set before it was called.It is usually a good idea to set
readOnly
ordisabled
on all form fields beforeform.initialize
is called to prevent data loss. You can implement this withenhanceGetInputProps:
valibot form resolver
@mantine/form
now supports validbot schema resolver:Basic fields validation:
Nested fields validation
List fields validation:
ScrollArea scrollbars prop
ScrollArea now supports
scrollbars
prop, which allows controlling directions at which scrollbars should be rendered.Supported values are
x
,y
andxy
. Ifscrollbars="y"
is set, only the vertical scrollbar will be rendered, and it will not be possible to scroll horizontally:Title lineClamp prop
Title component now supports
lineClamp
prop, which allows truncating text after a specified number of lines:Primary color CSS variables
CSS variables for primary color are now available, you can use the following variables in your styles:
Help center
Help center is a new website with guides, tutorials and frequently
asked questions. Currently, it has 14 questions, more FAQs will be added in the next releases.
Documentation updates
form.getInputProps
,enhanceGetInputProps
and how to integrateform.getInputProps
with custom inputs.@mantine/hooks
package. It is planned to document functions from other packages in next releases.variantColorsResolver
demos have been added to ActionIcon, ThemeIcon and Badge components.Other changes
@tabler/icons
package. It is no longer required to install@tabler/icons
package to useRichTextEditor
component. Icons used in the editor are now a part of the@mantine/tiptap
package. This change improves bundling performance in several cases (mostly when usingRichTextEditor
in Next.js apps).circle
prop which makes the badge round.ff
style prop withmono
,text
andheading
values:<Box ff="mono" />
.RichTextEditor.Undo
andRichTextEditor.Redo
controls.luminance
color function was addedConfiguration
📅 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.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by Mend Renovate. View repository job log here.