Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update mantine monorepo to v7.11.0 #1669

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 26, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@mantine/charts (source) 7.10.2 -> 7.11.0 age adoption passing confidence
@mantine/core (source) 7.10.2 -> 7.11.0 age adoption passing confidence
@mantine/dates (source) 7.10.2 -> 7.11.0 age adoption passing confidence
@mantine/hooks (source) 7.10.2 -> 7.11.0 age adoption passing confidence
@mantine/modals (source) 7.10.2 -> 7.11.0 age adoption passing confidence
@mantine/notifications (source) 7.10.2 -> 7.11.0 age adoption passing confidence

Release Notes

mantinedev/mantine (@​mantine/charts)

v7.11.0: 👁️

Compare Source

View changelog with demos on mantine.dev website

withProps function

All Mantine components now have withProps static function that can be used to
add default props to the component:

import { IMaskInput } from 'react-imask';
import { Button, InputBase } from '@​mantine/core';

const LinkButton = Button.withProps({
  component: 'a',
  target: '_blank',
  rel: 'noreferrer',
  variant: 'subtle',
});

const PhoneInput = InputBase.withProps({
  mask: '+7 (000) 000-0000',
  component: IMaskInput,
  label: 'Your phone number',
  placeholder: 'Your phone number',
});

function Demo() {
  return (
    <>
      {/* You can pass additional props to components created with `withProps` */}
      <LinkButton href="https://mantine.dev">Mantine website</LinkButton>

      {/* Component props override default props defined in `withProps` */}
      <PhoneInput placeholder="Personal phone" />
    </>
  );
}

Avatar initials

Avatar component now supports displaying initials with auto generated color based on the given name value.
To display initials instead of the default placeholder, set name prop
to the name of the person, for example, name="John Doe". If the name
is set, you can use color="initials" to generate color based on the name:

import { Avatar, Group } from '@&#8203;mantine/core';

const names = [
  'John Doe',
  'Jane Mol',
  'Alex Lump',
  'Sarah Condor',
  'Mike Johnson',
  'Kate Kok',
  'Tom Smith',
];

function Demo() {
  const avatars = names.map((name) => <Avatar key={name} name={name} color="initials" />);
  return <Group>{avatars}</Group>;
}

BubbleChart component

New BubbleChart component:

import { BubbleChart } from '@&#8203;mantine/charts';
import { data } from './data';

function Demo() {
  return (
    <BubbleChart
      h={60}
      data={data}
      range={[16, 225]}
      label="Sales/hour"
      color="lime.6"
      dataKey={{ x: 'hour', y: 'index', z: 'value' }}
    />
  );
}

BarChart waterfall type

BarChart component now supports waterfall type
which is useful for visualizing changes in values over time:

import { BarChart } from '@&#8203;mantine/charts';
import { data } from './data';

function Demo() {
  return (
    <BarChart
      h={300}
      data={data}
      dataKey="item"
      type="waterfall"
      series={[{ name: 'Effective tax rate in %', color: 'blue' }]}
      withLegend
    />
  );
}

LineChart gradient type

LineChart component now supports gradient type
which renders line chart with gradient fill:

import { LineChart } from '@&#8203;mantine/charts';
import { data } from './data';

function Demo() {
  return (
    <LineChart
      h={300}
      data={data}
      series={[{ name: 'temperature', label: 'Avg. Temperature' }]}
      dataKey="date"
      type="gradient"
      gradientStops={[
        { offset: 0, color: 'red.6' },
        { offset: 20, color: 'orange.6' },
        { offset: 40, color: 'yellow.5' },
        { offset: 70, color: 'lime.5' },
        { offset: 80, color: 'cyan.5' },
        { offset: 100, color: 'blue.5' },
      ]}
      strokeWidth={5}
      curveType="natural"
      yAxisProps={{ domain: [-25, 40] }}
      valueFormatter={(value) => `${value}°C`}
    />
  );
}

Right Y axis

LineChart, BarChart and AreaChart components
now support rightYAxis prop which renders additional Y axis on the right side of the chart:

import { LineChart } from '@&#8203;mantine/charts';
import { data } from './data';

function Demo() {
  return (
    <LineChart
      h={300}
      data={data}
      dataKey="name"
      withRightYAxis
      yAxisLabel="uv"
      rightYAxisLabel="pv"
      series={[
        { name: 'uv', color: 'pink.6' },
        { name: 'pv', color: 'cyan.6', yAxisId: 'right' },
      ]}
    />
  );
}

RadarChart legend

RadarChart component now supports legend:

import { RadarChart } from '@&#8203;mantine/charts';
import { data } from './data';

function Demo() {
  return (
    <RadarChart
      h={300}
      data={data}
      dataKey="product"
      withPolarRadiusAxis
      withLegend
      series={[
        { name: 'Sales January', color: 'blue.6', opacity: 0.2 },
        { name: 'Sales February', color: 'orange.6', opacity: 0.2 },
      ]}
    />
  );
}

TagsInput acceptValueOnBlur

TagsInput component behavior has been changed. Now By default,
if the user types in a value and blurs the input, the value is added to the list.
You can change this behavior by setting acceptValueOnBlur to false. In this case, the value is added
only when the user presses Enter or clicks on a suggestion.

import { TagsInput } from '@&#8203;mantine/core';

function Demo() {
  return (
    <>
      <TagsInput
        label="Value IS accepted on blur"
        placeholder="Enter text, then blur the field"
        data={['React', 'Angular', 'Svelte']}
        acceptValueOnBlur
      />
      <TagsInput
        label="Value IS NOT accepted on blur"
        placeholder="Enter text, then blur the field"
        data={['React', 'Angular', 'Svelte']}
        acceptValueOnBlur={false}
        mt="md"
      />
    </>
  );
}

Transition delay

Transition component now supports enterDelay and exitDelay props to delay transition start:

import { useState } from 'react';
import { Button, Flex, Paper, Transition } from '@&#8203;mantine/core';

export function Demo() {
  const [opened, setOpened] = useState(false);

  return (
    <Flex maw={200} pos="relative" justify="center" m="auto">
      <Button onClick={() => setOpened(true)}>Open dropdown</Button>

      <Transition mounted={opened} transition="pop" enterDelay={500} exitDelay={300}>
        {(transitionStyle) => (
          <Paper
            shadow="md"
            p="xl"
            h={120}
            pos="absolute"
            inset={0}
            bottom="auto"
            onClick={() => setOpened(false)}
            style={{ ...transitionStyle, zIndex: 1 }}
          >
            Click to close
          </Paper>
        )}
      </Transition>
    </Flex>
  );
}

Documentation updates

Other changes

  • Pagination component now supports hideWithOnePage prop which hides pagination when there is only one page
  • Spoiler component now supports controlled expanded state with expanded and onExpandedChange props
  • Burger component now supports lineSize prop to change lines height
  • Calendar, DatePicker and other similar components now support highlightToday prop to highlight today's date
mantinedev/mantine (@​mantine/core)

v7.11.0

Compare Source

mantinedev/mantine (@​mantine/dates)

v7.11.0

Compare Source

mantinedev/mantine (@​mantine/hooks)

v7.11.0

Compare Source

mantinedev/mantine (@​mantine/modals)

v7.11.0

Compare Source

mantinedev/mantine (@​mantine/notifications)

v7.11.0

Compare Source


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

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.

@renovate renovate bot enabled auto-merge (rebase) June 26, 2024 18:50
@renovate renovate bot merged commit c5818d8 into main Jun 26, 2024
1 check passed
@renovate renovate bot deleted the renovate/mantine-monorepo branch June 26, 2024 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants