mantinedev/mantine
### [`v5.10.0`](https://togithub.com/mantinedev/mantine/releases/tag/5.10.0)
[Compare Source](https://togithub.com/mantinedev/mantine/compare/5.9.6...5.10.0)
[View changelog with demos on Mantine website](https://mantine.dev/changelog/5-10-0/)
##### Theme based default props
[Default props](https://mantine.dev/theming/default-props/) on [MantineProvider](https://mantine.dev/theming/mantine-provider/)
can now subscribe to [theme](https://mantine.dev/theming/theme-object/):
```tsx
import { MantineProvider, Button } from '@mantine/core';
function Demo() {
return (
({
color: theme.colorScheme === 'dark' ? 'orange' : 'cyan',
}),
},
},
}}
>
);
}
```
##### [@mantine/form](https://togithub.com/mantine/form) validators
`@mantine/form` package now exports `isNotEmpty`, `isEmail`, `matches`, `isInRange` and `hasLength` functions
to simplify validation of common fields types:
```tsx
import { useForm, isNotEmpty, isEmail, isInRange, hasLength, matches } from '@mantine/form';
import { Button, Group, TextInput, NumberInput, Box } from '@mantine/core';
function Demo() {
const form = useForm({
initialValues: {
name: '',
job: '',
email: '',
favoriteColor: '',
age: 18,
},
validate: {
name: hasLength({ min: 2, max: 10 }, 'Name must be 2-22 characters long'),
job: isNotEmpty('Enter your current job'),
email: isEmail('Invalid email'),
favoriteColor: matches(/^#([0-9a-f]{3}){1,2}$/, 'Enter a valid hex color'),
age: isInRange({ min: 18, max: 99 }, 'You must be 18-99 years old to register'),
},
});
return (
{})}>
);
}
```
##### Flagpack extension
New [mantine-flagpack](https://mantinedev.github.io/mantine-flagpack/) extension. It is a set of 4x3 flags as React components based on [flagpack](https://flagpack.xyz/).
The package is tree shakable – all unused components are not included in the production bundle.
All flag components support [style props](https://mantine.dev/styles/style-props/).
##### Other changes
- [ColorPicker](https://mantine.dev/core/color-picker/) component now supports `onColorSwatchClick` prop
- [ColorInput](https://mantine.dev/core/color-input/) now supports `closeOnColorSwatchClick` prop
- [ColorInput](https://mantine.dev/core/color-input/) now shows eye dropper in all supported browsers by default
- [@mantine/form](https://mantine.dev/form/use-form/) now exports `TransformedValues` type to get type of transformed values from the form object
- [RingProgress](https://mantine.dev/core/ring-progress/) now supports changing root segment color with `rootColor` prop
- [Text](https://mantine.dev/core/text/) component now supports `truncate` prop
- [Stepper](https://mantine.dev/core/stepper/) component now supports `allowSelectNextSteps` prop
- [@mantine/form](https://mantine.dev/form/use-form/) now exports `superstructResolver` to allow schema based validation with [superstruct](https://togithub.com/ianstormtaylor/superstruct)
- [FileInput](https://mantine.dev/core/file-input/) and [FileButton](https://mantine.dev/core/file-button/) components now support `capture` prop
##### New Contributors
- [@sctape](https://togithub.com/sctape) made their first contribution in [https://github.com/mantinedev/mantine/pull/3098](https://togithub.com/mantinedev/mantine/pull/3098)
- [@paulm17](https://togithub.com/paulm17) made their first contribution in [https://github.com/mantinedev/mantine/pull/3151](https://togithub.com/mantinedev/mantine/pull/3151)
- [@ahmedDev20](https://togithub.com/ahmedDev20) made their first contribution in [https://github.com/mantinedev/mantine/pull/3202](https://togithub.com/mantinedev/mantine/pull/3202)
- [@dmshvetsov](https://togithub.com/dmshvetsov) made their first contribution in [https://github.com/mantinedev/mantine/pull/2957](https://togithub.com/mantinedev/mantine/pull/2957)
**Full Changelog**: https://github.com/mantinedev/mantine/compare/5.9.6...5.10.0
### [`v5.9.6`](https://togithub.com/mantinedev/mantine/releases/tag/5.9.6)
[Compare Source](https://togithub.com/mantinedev/mantine/compare/5.9.5...5.9.6)
##### What's Changed
- `[@mantine/spotlight]` Allow overriding search input size ([#3181](https://togithub.com/mantinedev/mantine/issues/3181))
- `[@mantine/core]` Tooltip: Fix incorrect Tooltip.Floating Styles API name
- `[@mantine/core]` ScrollArea: Add viewportProps support
- `[@mantine/core]` Title: Remove `span` prop
##### New Contributors
- [@bissbr01](https://togithub.com/bissbr01) made their first contribution in [https://github.com/mantinedev/mantine/pull/3233](https://togithub.com/mantinedev/mantine/pull/3233)
- [@marvin-j97](https://togithub.com/marvin-j97) made their first contribution in [https://github.com/mantinedev/mantine/pull/3262](https://togithub.com/mantinedev/mantine/pull/3262)
- [@Strajk](https://togithub.com/Strajk) made their first contribution in [https://github.com/mantinedev/mantine/pull/3181](https://togithub.com/mantinedev/mantine/pull/3181)
**Full Changelog**: https://github.com/mantinedev/mantine/compare/5.9.5...5.9.6
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 these updates again.
[ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
5.9.5
->5.10.0
5.9.5
->5.10.0
5.9.5
->5.10.0
5.9.5
->5.10.0
Release Notes
mantinedev/mantine
### [`v5.10.0`](https://togithub.com/mantinedev/mantine/releases/tag/5.10.0) [Compare Source](https://togithub.com/mantinedev/mantine/compare/5.9.6...5.10.0) [View changelog with demos on Mantine website](https://mantine.dev/changelog/5-10-0/) ##### Theme based default props [Default props](https://mantine.dev/theming/default-props/) on [MantineProvider](https://mantine.dev/theming/mantine-provider/) can now subscribe to [theme](https://mantine.dev/theming/theme-object/): ```tsx import { MantineProvider, Button } from '@mantine/core'; function Demo() { return (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 these updates again.
This PR has been generated by Mend Renovate. View repository job log here.