dashdot
dashdot copied to clipboard
chore(deps): upgrade @mantine/hooks to v5.5.5
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| @mantine/hooks (source) | 5.3.3 -> 5.5.5 |
Release Notes
mantinedev/mantine
v5.5.5
What's Changed
[@mantine/core]NumberInput: FixremoveTrailingZerosprop not working for initial value (#2638)[@mantine/core]Modal: Fix issue when it was impossible to interact with scrollbars behind overlay (#2669)[@mantine/styles]Fix incorrect params handling in DefaultProps type in strict mode[@mantine/core]Select: Fix component scrolling page when it is focused without any data or nothing found message (#2628)[@mantine/core]Fix Avatar and ThemeIcon components not respectingtheme.defaultGradient(#2649)[@mantine/dates]Calendar: Fix error in console when up/down error is pressed and next/previous date is disabled[@mantine/core]Menu: Close menu when target changes (#2646)[@mantine/hooks]use-focus-return: Add preventScroll: true to avoid scrolling to element when dropdown/modal is closed outside of current viewport
New Contributors
- @gregrickaby made their first contribution in https://github.com/mantinedev/mantine/pull/2636
- @adarshaacharya made their first contribution in https://github.com/mantinedev/mantine/pull/2666
- @armanatz made their first contribution in https://github.com/mantinedev/mantine/pull/2669
Full Changelog: https://github.com/mantinedev/mantine/compare/5.5.4...5.5.5
v5.5.4
What was changed
[@mantine/core]ColorInput: Prevent dropdown from opening if withPicker={false} and there are no swatches[@mantine/core]List: Fix styles params not being inherited by List.Item (#2495)[@mantine/core]Grid: Fix incorrect responsive offsets handling (#2556)[@mantine/core]Popover: Add option to configure focus returning logic with returnFocus prop[@mantine/core]Popover: Fix onKeydownCapture prop overriding Escape key handler
Full Changelog: https://github.com/mantinedev/mantine/compare/5.5.2...5.5.4
v5.5.2
What's Changed
[@mantine/core]List: Fix incorrect list items styles (#2624)[@mantine/core]NumberInput: Fix incorrect removeTrailingZeros default prop value (#2621)[@mantine/core]ScrollArea: Fix incorrect thumb hover area (#2610)[@mantine/hooks]use-focus-trap: Fix incorrect focus trapping logic whensetRefis called withnull(#2623)[@mantine/core]Fix incorrect cursor type on Checkbox, Radio and Switch when cursorType is set on theme[@mantine/core]Remove unexpected styles from Checkbox, Radio and Switch components
Full Changelog: https://github.com/mantinedev/mantine/compare/5.5.1...5.5.2
v5.5.1
What's Changed
[@mantine/core]Fix incorrect selectors used to style Radio, Checkbox and Switch components[@mantine/core]Input: Fix size not being applied when set from error props and descriptionProps (#2603)[@mantine/core]Fix incorrect loading state styles in Button and ActionIcon components (#2618)[@mantine/core]Fix scrollbar appearing in Select, MultiSelect and Autocomplete dropdown when withNormalizeCSS and withGlobalStyles are not set on MantineProvider[@mantine/core]Revert Collapse axis prop to avoid issues with regular Collapse[@mantine/core]Fix missing font styles in Select, MultiSelect and Autocomplete dropdown when withGlobalStyles is not set on MantineProvider[@mantine/core]MultiSelect: fix dropdown flicker and onDropdownClose/onDropdownOpen handlers being called when dropdown isn't visible (#2602)[@mantine/core]Select: Fix incorrect dropdown opened state when input is clicked (#2605)[@mantine/core]List: Fix incorrect indentation for nested list items (#2606)[@mantine/core]SegmentedControl: Fix error with hook call order (#2608)
New Contributors
- @kdrag0n made their first contribution in https://github.com/mantinedev/mantine/pull/2613
Full Changelog: https://github.com/mantinedev/mantine/compare/5.5.0...5.5.1
v5.5.0
View changelog with demos on mantine.dev website
Global styles on theme
You can now add global styles with theme.globalStyles,
this way, you will be able to share these styles between different environments (for example, Next.js application and Storybook):
import { MantineProvider } from '@​mantine/core';
function Demo() {
return (
<MantineProvider
theme={{
globalStyles: (theme) => ({
'*, *::before, *::after': {
boxSizing: 'border-box',
},
body: {
...theme.fn.fontStyles(),
backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[7] : theme.white,
color: theme.colorScheme === 'dark' ? theme.colors.dark[0] : theme.black,
lineHeight: theme.lineHeight,
},
'.your-class': {
backgroundColor: 'red',
},
'#your-id > [data-active]': {
backgroundColor: 'pink',
},
}),
}}
>
<App />
</MantineProvider>
);
}
form.setValues partial
form.setValues can now be used to set multiple values at once, payload will be shallow merged with current values state:
import { useForm } from '@​mantine/form';
const form = useForm({ initialValues: { name: '', email: '', age: 0 } });
form.setValues({ name: 'John', age: 21 });
form.values; // -> { name: 'John', email: '', age: 21 }
Documentation updates
- Polymorphic components now display
polymorphicbadge next to component name (see Text as reference) - New Usage with Storybook guide
- New Usage with TypeScript guide
Other changes
- Checkbox
indeterminatestate now has separate styles for checked and unchecked states - Modal component now supports
size="auto" - Checkbox, Radio and Switch
components now support
error,descriptionandlabelPositionprops - Tooltip and Popover components now can be used with inline elements
- Slider and RangeSlider components now support
invertedprop - Collapse component now supports
axisprop - Table component now supports
withBorderandwithColumnBordersprops - NumberInput component now supports
removeTrailingZerosprop - Popover and Menu components now support
disabledprop - nprogress now supports new
completeNavigationProgresshandler
New Contributors
- @TheKinng96 made their first contribution in https://github.com/mantinedev/mantine/pull/2554
- @hckhanh made their first contribution in https://github.com/mantinedev/mantine/pull/2585
- @PointSingularity made their first contribution in https://github.com/mantinedev/mantine/pull/2547
- @devstardude made their first contribution in https://github.com/mantinedev/mantine/pull/2528
Full Changelog: https://github.com/mantinedev/mantine/compare/5.4.2...5.5.0
v5.4.2
What's Changed
[@mantine/form]Add options argument support tojoiResolver(#2562)[@mantine/carousel]Fix incorrectslidesToScrolltype (#2548)[@mantine/carousel]Fix wrong carousel size calculation (#2572)[@mantine/core]Image: Allow src attribute to be null[@mantine/core]Image: Fix race condition between hydration and image load event (#629)- Fix incorrect types for static components (
Navbar.Section,Tabs.Tab, etc.) for older versions of TypeScript
New Contributors
- @h-harsh made their first contribution in https://github.com/mantinedev/mantine/pull/2544
- @keypuncherlabs made their first contribution in https://github.com/mantinedev/mantine/pull/2546
- @jgravois made their first contribution in https://github.com/mantinedev/mantine/pull/2567
- @7iomka made their first contribution in https://github.com/mantinedev/mantine/pull/2572
- @telmen made their first contribution in https://github.com/mantinedev/mantine/pull/2562
Full Changelog: https://github.com/mantinedev/mantine/compare/5.4.1...5.4.2
v5.4.1
What's Changed
[@mantine/core]Grid: Fix offset={0} not working (#2346)[@mantine/core]SegmentedControl: Fix colors index reference not working[@mantine/dropzone]Fix incorrect ref handling[@mantine/core]Integrate Floating UI tooltip middleware in Tooltip, Popover and other components that are based on Popover (#2521)[@mantine/core]Fix missing ref type in components with static parts (#2505)[@mantine/core]Add data-disabled + change color when disabled on label to Switch and Checkbox components (#2508)[@mantine/nprogress]Add option to add aria-label (#2526)[@mantine/rte]Fix issue with ImageUploader index null error (#2529)[@mantine/hooks]use-local-storage: Fix incorrect method called when item is removed from local storage (#2490)
New Contributors
- @beckerin made their first contribution in https://github.com/mantinedev/mantine/pull/2524
- @N-Argyle made their first contribution in https://github.com/mantinedev/mantine/pull/2529
- @zulianrizki made their first contribution in https://github.com/mantinedev/mantine/pull/2526
- @omarsy made their first contribution in https://github.com/mantinedev/mantine/pull/2509
Full Changelog: https://github.com/mantinedev/mantine/compare/5.4.0...5.4.1
v5.4.0
View changelog with demos on mantine.dev website
validateInputOnBlur
use-form now supports validateInputOnBlur option,
it works similar to validateInputOnChange:
import { useForm } from '@​mantine/form';
import { NumberInput, TextInput, Button } from '@​mantine/core';
function Demo() {
const form = useForm({
validateInputOnBlur: ['name', 'email'],
initialValues: { name: '', email: '', age: 0 },
// functions will be used to validate values at corresponding key
validate: {
name: (value) => (value.length < 2 ? 'Name must have at least 2 letters' : null),
email: (value) => (/^\S+@​\S+$/.test(value) ? null : 'Invalid email'),
age: (value) => (value < 18 ? 'You must be at least 18 to register' : null),
},
});
return (
<form onSubmit={form.onSubmit(console.log)}>
<TextInput label="Name" placeholder="Name" {...form.getInputProps('name')} />
<TextInput mt="sm" label="Email" placeholder="Email" {...form.getInputProps('email')} />
<NumberInput
mt="sm"
label="Age"
placeholder="Age"
min={0}
max={99}
{...form.getInputProps('age')}
/>
<Button type="submit" mt="sm">
Submit
</Button>
</form>
);
}
Non-linear Slider scale
Slider and RangeSlider components now support non-linear scale:
import { RangeSlider, Slider, Stack } from '@​mantine/core';
function Demo() {
function valueLabelFormat(value: number) {
const units = ['KB', 'MB', 'GB', 'TB'];
let unitIndex = 0;
let scaledValue = value;
while (scaledValue >= 1024 && unitIndex < units.length - 1) {
unitIndex += 1;
scaledValue /= 1024;
}
return `${scaledValue} ${units[unitIndex]}`;
}
return (
<Stack spacing="xl" p="xl">
<Slider
py="xl"
scale={(v) => 2 ** v}
step={1}
min={2}
max={30}
labelAlwaysOn
defaultValue={10}
label={valueLabelFormat}
/>
<RangeSlider
py="xl"
scale={(v) => 2 ** v}
step={1}
min={2}
max={30}
labelAlwaysOn
defaultValue={[10, 20]}
label={valueLabelFormat}
/>
</Stack>
);
}
Switch.Group component
New Switch.Group component lets you organize Switch components the same way as Checkbox.Group and Radio.Group:
import { Switch } from '@​mantine/core';
function Demo() {
return (
<Switch.Group
defaultValue={['react']}
label="Select your favorite framework/library"
description="This is anonymous"
withAsterisk
>
<Switch value="react" label="React" />
<Switch value="svelte" label="Svelte" />
<Switch value="ng" label="Angular" />
<Switch value="vue" label="Vue" />
</Switch.Group>
);
}
Controlled Select/MultiSelect search value
Select and MultiSelect search value can now be controlled:
import { Select } from '@​mantine/core';
function Demo() {
const [searchValue, onSearchChange] = useState('');
return (
<Select
label="Your favorite framework/library"
placeholder="Pick one"
searchable
onSearchChange={onSearchChange}
searchValue={searchValue}
nothingFound="No options"
data={['React', 'Angular', 'Svelte', 'Vue']}
/>
);
}
Controlled PasswordInput visibility
PasswordInput now supports controlled visibility state with visible and onVisibilityChange props, for example, the props can be used to sync visibility state between two inputs:
import { useDisclosure } from '@​mantine/hooks';
import { PasswordInput, Stack } from '@​mantine/core';
function Demo() {
const [visible, { toggle }] = useDisclosure(false);
return (
<Stack sx={{ maxWidth: 380 }} mx="auto">
<PasswordInput
label="Password"
defaultValue="secret"
visible={visible}
onVisibilityChange={toggle}
/>
<PasswordInput
label="Confirm password"
defaultValue="secret"
visible={visible}
onVisibilityChange={toggle}
/>
</Stack>
);
}
New Mantine UI components
10 new components were added to Mantine UI, view changelog here
Other changes
- It is now possible to change static classes prefix with emotion cache key
- use-local-storage hook now supports removing value from
localStorage - Pagination component now supports
disabledprop - ColorPicker and ColorInput components now support
onChangeEndcallback - Group component now uses child selector instead of passing
classNameto children - Dropzone component now supports
useFsAccessApiprop - SimpleGrid component now supports
verticalSpacingprop - ThemeIcon component now supports
variant="default"
New Contributors
- @Yomyer made their first contribution in https://github.com/mantinedev/mantine/pull/2434
- @drj17 made their first contribution in https://github.com/mantinedev/mantine/pull/2162
- @dipiash made their first contribution in https://github.com/mantinedev/mantine/pull/2485
- @A-Marzoug made their first contribution in https://github.com/mantinedev/mantine/pull/2484
- @glomyst made their first contribution in https://github.com/mantinedev/mantine/pull/2146
- @hichemfantar made their first contribution in https://github.com/mantinedev/mantine/pull/2361
Full Changelog: https://github.com/mantinedev/mantine/compare/5.3.3...5.4.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 becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- [ ] If you want to rebase/retry this PR, click this checkbox.
This PR has been generated by Mend Renovate. View repository job log here.
Nx Cloud Report
CI is running for commit f5cac78665ed7458249d77967af03b61090e9c2f.
📂 Click to track the progress, see the status, the terminal output, and the build insights.
Sent with 💌 from NxCloud.