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 all non-major dependencies #100

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 22, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@mantine/carousel (source) 7.5.1 -> 7.16.1 age adoption passing confidence
@mantine/code-highlight (source) 7.5.1 -> 7.16.1 age adoption passing confidence
@mantine/core (source) 7.5.1 -> 7.16.1 age adoption passing confidence
@mantine/dates (source) 7.5.1 -> 7.16.1 age adoption passing confidence
@mantine/form (source) 7.5.1 -> 7.16.1 age adoption passing confidence
@mantine/hooks (source) 7.5.1 -> 7.16.1 age adoption passing confidence
@mantine/modals (source) 7.5.1 -> 7.16.1 age adoption passing confidence
@mantine/notifications (source) 7.5.1 -> 7.16.1 age adoption passing confidence
@mantine/nprogress (source) 7.5.1 -> 7.16.1 age adoption passing confidence
@next/eslint-plugin-next (source) 14.1.0 -> 14.2.23 age adoption passing confidence
@semantic-release/npm 11.0.2 -> 11.0.3 age adoption passing confidence
@sentry/nextjs (source) 7.99.0 -> 7.120.3 age adoption passing confidence
clsx 2.1.0 -> 2.1.1 age adoption passing confidence
dayjs (source) 1.11.10 -> 1.11.13 age adoption passing confidence
eslint (source) 8.56.0 -> 8.57.1 age adoption passing confidence
eslint-config-mantine 3.1.0 -> 3.2.0 age adoption passing confidence
eslint-plugin-import 2.29.1 -> 2.31.0 age adoption passing confidence
eslint-plugin-jsx-a11y 6.8.0 -> 6.10.2 age adoption passing confidence
eslint-plugin-react 7.33.2 -> 7.37.4 age adoption passing confidence
eslint-plugin-react-hooks (source) 4.6.0 -> 4.6.2 age adoption passing confidence
markdown-to-jsx (source) 7.4.1 -> 7.7.3 age adoption passing confidence
postcss-preset-mantine 1.13.0 -> 1.17.0 age adoption passing confidence
semantic-release 23.0.0 -> 23.1.1 age adoption passing confidence

Release Notes

mantinedev/mantine (@​mantine/carousel)

v7.16.1

Compare Source

What's Changed
  • [@mantine/core] Menu: Add withInitialFocusPlaceholder prop support
  • [@mantine/core] Slider: Fix onChangeEnd being called when disabled prop is set
  • [@mantine/core] Add option to customize chevron color with chevronColor prop in Select and MultiSelect components
  • [@mantine/core] Fix incorrect styles of nested tables (#​7354)
  • [@mantine/core]: NumberInput: Fix onChange being called in onBlur if the value has not been changed (#​7383)
  • [@mantine/core] Menu: Add data-disabled prop handling to Menu.Item component (#​7377)
  • [@mantine/form] Fix incorrect values handling in form.resetDirty (#​7373)
  • [@mantine/chart] AreaChart: Fix gridColor and textColor props being passed as attributes to the DOM node (#​7378)
  • [@mantine/hooks] use-in-viewport: Fix tracking being stopped when used with a dnd library (#​7359)
  • [@mantine/core] MantineProvider: Fix jest tests not running in case there is incorrect window.matchMedia polyfill implementation (#​7360)
  • [@mantine/core] Modal: Fix Escape key not working in old Safari versions (#​7358)
New Contributors

Full Changelog: mantinedev/mantine@7.16.0...7.16.1

v7.16.0: 🌶️

Compare Source

View changelog with demos on mantine.dev website

use-scroll-spy hook

New use-scroll-spy hook tracks scroll position and returns index of the
element that is currently in the viewport. It is useful for creating
table of contents components (like in mantine.dev sidebar on the right side)
and similar features.

import { Text, UnstyledButton } from '@​mantine/core';
import { useScrollSpy } from '@​mantine/hooks';

function Demo() {
  const spy = useScrollSpy({
    selector: '#mdx :is(h1, h2, h3, h4, h5, h6)',
  });

  const headings = spy.data.map((heading, index) => (
    <li
      key={heading.id}
      style={{
        listStylePosition: 'inside',
        paddingInlineStart: heading.depth * 20,
        background: index === spy.active ? 'var(--mantine-color-blue-light)' : undefined,
      }}
    >
      <UnstyledButton onClick={() => heading.getNode().scrollIntoView()}>
        {heading.value}
      </UnstyledButton>
    </li>
  ));

  return (
    <div>
      <Text>Scroll to heading:</Text>
      <ul style={{ margin: 0, padding: 0 }}>{headings}</ul>
    </div>
  );
}
TableOfContents component

New TableOfContents component is built on top of use-scroll-spy hook
and can be used to create table of contents components like the one on the right side of mantine.dev
documentation sidebar:

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

function Demo() {
  return (
    <TableOfContents
      variant="filled"
      color="blue"
      size="sm"
      radius="sm"
      scrollSpyOptions={{
        selector: '#mdx :is(h1, h2, h3, h4, h5, h6)',
      }}
      getControlProps={({ data }) => ({
        onClick: () => data.getNode().scrollIntoView(),
        children: data.value,
      })}
    />
  );
}
Input.ClearButton component

New Input.ClearButton component can be used to add clear button to custom inputs
based on Input component. size of the clear button is automatically
inherited from the input:

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

function Demo() {
  const [value, setValue] = useState('clearable');

  return (
    <Input
      placeholder="Clearable input"
      value={value}
      onChange={(event) => setValue(event.currentTarget.value)}
      rightSection={value !== '' ? <Input.ClearButton onClick={() => setValue('')} /> : undefined}
      rightSectionPointerEvents="auto"
      size="sm"
    />
  );
}
Popover with overlay

Popover and other components based on it now support withOverlay prop:

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

function Demo() {
  return (
    <Popover
      width={320}
      shadow="md"
      withArrow
      withOverlay
      overlayProps={{ zIndex: 10000, blur: '8px' }}
      zIndex={10001}
    >
      <Popover.Target>
        <UnstyledButton style={{ zIndex: 10001, position: 'relative' }}>
          <Avatar src="https://avatars.githubusercontent.com/u/79146003?s=200&v=4" radius="xl" />
        </UnstyledButton>
      </Popover.Target>
      <Popover.Dropdown>
        <Group>
          <Avatar src="https://avatars.githubusercontent.com/u/79146003?s=200&v=4" radius="xl" />
          <Stack gap={5}>
            <Text size="sm" fw={700} style={{ lineHeight: 1 }}>
              Mantine
            </Text>
            <Anchor href="https://x.com/mantinedev" c="dimmed" size="xs" style={{ lineHeight: 1 }}>
              @&#8203;mantinedev
            </Anchor>
          </Stack>
        </Group>

        <Text size="sm" mt="md">
          Customizable React components and hooks library with focus on usability, accessibility and
          developer experience
        </Text>

        <Group mt="md" gap="xl">
          <Text size="sm">
            <b>0</b> Following
          </Text>
          <Text size="sm">
            <b>1,174</b> Followers
          </Text>
        </Group>
      </Popover.Dropdown>
    </Popover>
  );
}
Container queries in Carousel

You can now use container queries
in Carousel component. With container queries, all responsive values
are adjusted based on the container width, not the viewport width.

Example of using container queries. To see how the grid changes, resize the root element
of the demo with the resize handle located at the bottom right corner of the demo:

import { Carousel } from '@&#8203;mantine/carousel';

function Demo() {
  return (
    // Wrapper div is added for demonstration purposes only,
    // It is not required in real projects
    <div
      style={{
        resize: 'horizontal',
        overflow: 'hidden',
        maxWidth: '100%',
        minWidth: 250,
        padding: 10,
      }}
    >
      <Carousel
        withIndicators
        height={200}
        type="container"
        slideSize={{ base: '100%', '300px': '50%', '500px': '33.333333%' }}
        slideGap={{ base: 0, '300px': 'md', '500px': 'lg' }}
        loop
        align="start"
      >
        <Carousel.Slide>1</Carousel.Slide>
        <Carousel.Slide>2</Carousel.Slide>
        <Carousel.Slide>3</Carousel.Slide>
        {/* ...other slides */}
      </Carousel>
    </div>
  );
}
RangeSlider restrictToMarks

RangeSlider component now supports restrictToMarks prop:

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

function Demo() {
  return (
    <Stack>
      <Slider
        restrictToMarks
        defaultValue={25}
        marks={Array.from({ length: 5 }).map((_, index) => ({ value: index * 25 }))}
      />

      <RangeSlider
        restrictToMarks
        defaultValue={[5, 15]}
        marks={[
          { value: 5 },
          { value: 15 },
          { value: 25 },
          { value: 35 },
          { value: 70 },
          { value: 80 },
          { value: 90 },
        ]}
      />
    </Stack>
  );
}
Pagination withPages prop

Pagination component now supports withPages prop which allows hiding pages
controls and displaying only previous and next buttons:

import { useState } from 'react';
import { Group, Pagination, Text } from '@&#8203;mantine/core';

const limit = 10;
const total = 145;
const totalPages = Math.ceil(total / limit);

function Demo() {
  const [page, setPage] = useState(1);
  const message = `Showing ${limit * (page - 1) + 1}${Math.min(total, limit * page)} of ${total}`;

  return (
    <Group justify="flex-end">
      <Text size="sm">{message}</Text>
      <Pagination total={totalPages} value={page} onChange={setPage} />
    </Group>
  );
}
useForm touchTrigger option

use-form hook now supports touchTrigger option that allows customizing events that change touched state.
It accepts two options:

  • change (default) – field will be considered touched when its value changes or it has been focused
  • focus – field will be considered touched only when it has been focused

Example of using focus trigger:

import { useForm } from '@&#8203;mantine/form';

const form = useForm({
  mode: 'uncontrolled',
  initialValues: { a: 1 },
  touchTrigger: 'focus',
});

form.isTouched('a'); // -> false
form.setFieldValue('a', 2);
form.isTouched('a'); // -> false

// onFocus is called automatically when the user focuses the field
form.getInputProps('a').onFocus();
form.isTouched('a'); // -> true
Help Center updates
Other changes

v7.15.3

Compare Source

What's Changed
  • [@mantine/charts] BarChart: Fix textColor prop being passed down as attribute to the DOM node
  • [@mantine/core] TypographyStylesProvider: Fix incorrect top and bottom margins of first and last elements (#​7334)
  • [@mantine/core] Transition: Fix some transitions being incompatible with headless mode (#​7306)
  • [@mantine/dates] DateTimePicker: Set milliseconds to 0 on the result date object (#​7328)
  • [@mantine/dates] Fix hasNextLevel prop type leak to DateTimePicker component (#​7319)
  • [@mantine/core] Avatar: Change initials function to use the full name to generate color (#​7322)
  • [@mantine/hooks] use-merged-ref: Add support for ref cleanup function in React 19 (#​7304)
  • [@mantine/hooks] use-debounced-callback: Add flush method to returned callback (#​7272)
  • [@mantine/dates] Improve compatibility with dayjs plugins in all components (#​7302)
  • [@mantine/core] Update peer dependencies to support React 19 (#​7321)
New Contributors

Full Changelog: mantinedev/mantine@7.15.2...7.15.3

v7.15.2

Compare Source

What's Changed
  • [@mantine/dates] DatePicker: Fix incorrect handling of receiving partial value when type="range" (#​7278)
  • [@mantine/hooks] use-local-storage: Fix value not being updated when key changes (#​7286)
  • [@mantine/charts] Fix gridColor prop being passed down as attribute to html element (#​7288)
  • [@mantine/core] Update react-textarea-autosize to support React 19 (#​7297)
  • [@mantine/core] TypographyStylesProvider: Fix margin removal affecting non-typography elements (#​7290)
  • [@mantine/core] Tooltip: Add middlewares prop support (#​7281)
  • [@mantine/core] FloatingIndicator: Fix incorrect position calculations when the parent element has border (#​7267)
  • [@mantine/core] ScrollArea: Fix scrollbar not changing with the scroll position on first render (#​7257, #​7260)
  • [@mantine/tiptap] Fix incorrect paragraph styles inside lists (#​7255)
  • [@mantine/hooks] Fix incorrect ref types in use-move, use-radial-move, use-in-viewport and use-scroll-into-view (#​7252)
  • [@mantine/form] Fix incorrect validators types (#​7242)
New Contributors

Full Changelog: mantinedev/mantine@7.15.1...7.15.2

v7.15.1

Compare Source

What's Changed
  • [@mantine/dates] Improve focus behavior of DatePickerInput, DateInput and other components
  • [@mantine/form] Add touchTrigger option support
  • [@mantine/hooks] Add option to specify prefix in randonId function
  • [@mantine/core] Fix withProps function requiring all component props instead of partial
  • [@mantine/core] Add useModalStackContext and useDrawerStackContext hooks exports
  • [@mantine/core] ActionIcon: Add input-* autocomplete for size prop
  • [@mantine/core] AppShell: Fix incorrect default offsetScrollbars value for layout="alt"
  • [@mantine/core] Fix virtualColor function not working in server components (#​7184)
  • [@mantine/core] Checkbox: Fix incorrect Checkbox.Card behavior inside Checkbox.Group (#​7187)
  • [@mantine/core] Checkbox: Fix incorrect Checkbox.Card behavior inside Checkbox.Group (#​7187)
  • [@mantine/core] Slider: Add option to pass attributes down to thumb with thumbProps (#​7214)
  • [@mantine/core] Switch: Add data-checked attribute to the input (#​7228)
  • [@mantine/dates] Fix hasNextLevel prop type leak to DatePicker component (#​7229)
  • [@mantine/dates] Fix timezone not being applied to the formatted value (#​7162)
  • [@mantine/modals] Fix modalId being passed to the DOM node as attribute (#​7189)
  • [@mantine/core] TypographyStylesProvider: Fix incorrect paragraphs inside lists styles (#​7226)
  • [@mantine/core] Slider: Fix icon used as thumb child not being visible with the dark color scheme (#​7231, #​7232)
  • [@mantine/tiptap] Fix missing border in custom controls (#​7239)
New Contributors

Full Changelog: mantinedev/mantine@7.15.0...7.15.1

v7.15.0: 💋

Compare Source

View changelog with demos on mantine.dev website

Support Mantine development

You can now sponsor Mantine development with OpenCollective.
All funds will be used to improve Mantine and create new features and components.

use-radial-move hook

New use-radial-move hook can be used to create custom radial sliders:

import { useState } from 'react';
import { Box } from '@&#8203;mantine/core';
import { useRadialMove } from '@&#8203;mantine/hooks';
import classes from './Demo.module.css';

function Demo() {
  const [value, setValue] = useState(115);
  const { ref } = useRadialMove(setValue);

  return (
    <Box className={classes.root} ref={ref} style={{ '--angle': `${value}deg` }}>
      <div className={classes.value}>{value}°</div>
      <div className={classes.thumb} />
    </Box>
  );
}

BarChart color based on value

BarChart component now supports getBarColor prop to assign color based on value.
getBarColor function is called with two arguments: value and series object. It should return a color
string (theme color reference or any valid CSS color value).

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

function Demo() {
  return (
    <BarChart
      h={300}
      data={data}
      dataKey="month"
      getBarColor={(value) => (value > 700 ? 'teal.8' : 'red.8')}
      series={[{ name: 'Laptops', color: 'gray.6' }]}
    />
  );
}

Button.GroupSection and ActionIcon.GroupSection

ActionIcon.GroupSection and Button.GroupSection are new components that
can be used in ActionIcon.Group/Button.Group to create sections that are
not ActionIcon/Button components:

import { IconChevronDown, IconChevronUp } from '@&#8203;tabler/icons-react';
import { ActionIcon } from '@&#8203;mantine/core';
import { useCounter } from '@&#8203;mantine/hooks';

function Demo() {
  const [value, { increment, decrement }] = useCounter(135, { min: 0 });

  return (
    <ActionIcon.Group>
      <ActionIcon variant="default" size="lg" radius="md" onClick={decrement}>
        <IconChevronDown color="var(--mantine-color-red-text)" />
      </ActionIcon>
      <ActionIcon.GroupSection variant="default" size="lg" bg="var(--mantine-color-body)" miw={60}>
        {value}
      </ActionIcon.GroupSection>
      <ActionIcon variant="default" size="lg" radius="md" onClick={increment}>
        <IconChevronUp color="var(--mantine-color-teal-text)" />
      </ActionIcon>
    </ActionIcon.Group>
  );
}

Table vertical variant

Table component now support variant="vertical":

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

export function Demo() {
  return (
    <Table variant="vertical" layout="fixed" withTableBorder>
      <Table.Tbody>
        <Table.Tr>
          <Table.Th w={160}>Epic name</Table.Th>
          <Table.Td>7.x migration</Table.Td>
        </Table.Tr>

        <Table.Tr>
          <Table.Th>Status</Table.Th>
          <Table.Td>Open</Table.Td>
        </Table.Tr>

        <Table.Tr>
          <Table.Th>Total issues</Table.Th>
          <Table.Td>135</Table.Td>
        </Table.Tr>

        <Table.Tr>
          <Table.Th>Total story points</Table.Th>
          <Table.Td>874</Table.Td>
        </Table.Tr>

        <Table.Tr>
          <Table.Th>Last updated at</Table.Th>
          <Table.Td>September 26, 2024 17:41:26</Table.Td>
        </Table.Tr>
      </Table.Tbody>
    </Table>
  );
}

Table tabular numbers

Table component now supports tabularNums prop to render numbers in tabular style. It sets
font-variant-numeric: tabular-nums which makes numbers to have equal width.
This is useful when you have columns with numbers and you want them to be aligned:

import { NumberFormatter, Table } from '@&#8203;mantine/core';

const data = [
  { product: 'Apples', unitsSold: 2214411234 },
  { product: 'Oranges', unitsSold: 9983812411 },
  { product: 'Bananas', unitsSold: 1234567890 },
  { product: 'Pineapples', unitsSold: 9948810000 },
  { product: 'Pears', unitsSold: 9933771111 },
];

function Demo() {
  const rows = data.map((item) => (
    <Table.Tr key={item.product}>
      <Table.Td>{item.product}</Table.Td>
      <Table.Td>
        <NumberFormatter value={item.unitsSold} thousandSeparator />
      </Table.Td>
    </Table.Tr>
  ));

  return (
    <Table tabularNums>
      <Table.Thead>
        <Table.Tr>
          <Table.Th>Product</Table.Th>
          <Table.Th>Units sold</Table.Th>
        </Table.Tr>
      </Table.Thead>
      <Table.Tbody>{rows}</Table.Tbody>
    </Table>
  );
}

Update function in modals manager

Modals manager now supports modals.updateModal and modals.updateContextModal
function to update modal after it was opened:

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

function Demo() {
  return (
    <Button
      onClick={() => {
        const modalId = modals.open({
          title: 'Initial Modal Title',
          children: <Text>This text will update in 2 seconds.</Text>,
        });

        setTimeout(() => {
          modals.updateModal({
            modalId,
            title: 'Updated Modal Title',
            children: (
              <Text size="sm" c="dimmed">
                This is the updated content of the modal.
              </Text>
            ),
          });
        }, 2000);
      }}
    >
      Open updating modal
    </Button>
  );
}

useForm submitting state

use-form hook now supports form.submitting field
and form.setSubmitting function to track form submission state.

form.submitting field will be set to true if function passed to
form.onSubmit returns a promise. After the promise is resolved or rejected,
form.submitting will be set to false:

import { useState } from 'react';
import { Button, Group, Stack, Text, TextInput } from '@&#8203;mantine/core';
import { useForm } from '@&#8203;mantine/form';

const asyncSubmit = (values: any) =>
  new Promise((resolve) => setTimeout(() => resolve(values), 3000));

function Demo() {
  const form = useForm({
    mode: 'uncontrolled',
    initialValues: { name: 'John' },
  });

  const [completed, setCompleted] = useState(false);

  const handleSubmit = async (values: typeof form.values) => {
    await asyncSubmit(values);
    setCompleted(true);
  };

  if (completed) {
    return (
      <Stack>
        <Text>Form submitted!</Text>
        <Button onClick={() => setCompleted(false)}>Reset to initial state</Button>
      </Stack>
    );
  }

  return (
    <form onSubmit={form.onSubmit(handleSubmit)}>
      <TextInput
        withAsterisk
        label="Name"
        placeholder="Your name"
        key={form.key('name')}
        disabled={form.submitting}
        {...form.getInputProps('name')}
      />

      <Group justify="flex-end" mt="md">
        <Button type="submit" loading={form.submitting}>
          Submit
        </Button>
      </Group>
    </form>
  );
}

You can also manually set form.submitting to true or false:

import { useForm } from '@&#8203;mantine/form';

const form = useForm({ mode: 'uncontrolled' });
form.submitting; // -> false

form.setSubmitting(true);
form.submitting; // -> true

form.setSubmitting(false);
form.submitting; // -> false

useForm onSubmitPreventDefault option

use-form hook now supports onSubmitPreventDefault option.
This option is useful if you want to integrate useForm hook with server actions.
By default, event.preventDefault() is called on the form onSubmit handler.
If you want to change this behavior, you can pass onSubmitPreventDefault option
to useForm hook. It can have the following values:

  • always (default) - always call event.preventDefault()
  • never - never call event.preventDefault()
  • validation-failed - call event.preventDefault() only if validation failed
import { useForm } from '@&#8203;mantine/form';

const form = useForm({
  mode: 'uncontrolled',
  onSubmitPreventDefault: 'never',
});

Subtle RichTextEditor variant

RichTextEditor component now supports subtle variant:

import Highlight from '@&#8203;tiptap/extension-highlight';
import Underline from '@&#8203;tiptap/extension-underline';
import { useEditor } from '@&#8203;tiptap/react';
import StarterKit from '@&#8203;tiptap/starter-kit';
import { RichTextEditor } from '@&#8203;mantine/tiptap';

const content = '<p>Subtle rich text editor variant</p>';

function Demo() {
  const editor = useEditor({
    extensions: [StarterKit, Underline, Highlight],
    content,
  });

  return (
    <RichTextEditor editor={editor} variant="subtle">
      <RichTextEditor.Toolbar sticky stickyOffset={60}>
        <RichTextEditor.ControlsGroup>
          <RichTextEditor.Bold />
          <RichTextEditor.Italic />
          <RichTextEditor.Underline />
          <RichTextEditor.Strikethrough />
          <RichTextEditor.ClearFormatting />
          <RichTextEditor.Highlight />
          <RichTextEditor.Code />
        </RichTextEditor.ControlsGroup>
      </RichTextEditor.Toolbar>

      <RichTextEditor.Content />
    </RichTextEditor>
  );
}

onExitTransitionEnd and onEnterTransitionEnd

Modal and Drawer components now support onExitTransitionEnd and onEnterTransitionEnd props,
which can be used to run code after exit/enter transition is finished. For example, this is useful when you want to clear
data after modal is closed:

import { useState } from 'react';
import { Button, Group, Modal } from '@&#8203;mantine/core';
import { useDisclosure } from '@&#8203;mantine/hooks';

function Demo() {
  const [firstOpened, firstHandlers] = useDisclosure(false);
  const [secondOpened, secondHandlers] = useDisclosure(false);
  const [modalData, setModalData] = useState({
    title: '',
    message: '',
  });

  return (
    <>
      <Modal
        opened={firstOpened}
        onClose={() => {
          firstHandlers.close();
          setModalData({ title: '', message: '' });
        }}
        title={modalData.title}
      >
        {modalData.message}
      </Modal>
      <Modal
        opened={secondOpened}
        onClose={secondHandlers.close}
        onExitTransitionEnd={() => setModalData({ title: '', message: '' })}
        title={modalData.title}
      >
        {modalData.message}
      </Modal>

      <Group>
        <Button
          onClick={() => {
            firstHandlers.open();
            setModalData({ title: 'Edit your profile', message: 'Imagine a form here' });
          }}
        >
          Clear data in onClose
        </Button>

        <Button
          onClick={() => {
            secondHandlers.open();
            setModalData({ title: 'Edit your profile', message: 'Imagine a form here' });
          }}
        >
          Clear data in onExitTransitionEnd
        </Button>
      </Group>
    </>
  );
}

Week numbers in DatePicker

DatePicker and other components based on Calendar component now support withWeekNumbers prop to display week numbers:

import { DatePicker } from '@&#8203;mantine/dates';

function Demo() {
  return <DatePicker withWeekNumbers />;
}

New demo: BarChart with overlay

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

function Demo() {
  const bigBarWidth = useMediaQuery('(min-width: 48em)') ? 42 : 26;
  const ratio = 0.5;
  const smallBarWidth = bigBarWidth * ratio;
  const barGap = (bigBarWidth + smallBarWidth) / -2;

  return (
    <BarChart
      h={300}
      data={overlayData}
      dataKey="index"
      barChartProps={{ barGap }}
      barProps={(data) => ({ barSize: data.name === 'you' ? bigBarWidth : smallBarWidth })}
      classNames={classes}
      series={[
        { name: 'you', color: 'var(--you-bar-color)' },
        { name: 'average', color: 'var(--average-bar-color)' },
      ]}
    />
  );
}

Variants types augmentation

Custom variants types augmentation guide was added to the documentation.

Example of adding custom variant type to Button component:

import { ButtonVariant, MantineSize } from '@&#8203;mantine/core';

type ExtendedButtonVariant = ButtonVariant | 'contrast' | 'radial-gradient';

declare module '@&#8203;mantine/core' {
  export interface ButtonProps {
    variant?: ExtendedButtonVariant;
  }
}

Help Center updates

v7.14.3

Compare Source

What's Changed
  • [@mantine/core] Slider: Fix restrictToMarks prop not working with arrow and Home/End keys correctly
  • [@mantine/core] Checkbox: Fix Checkbox.Card component not working with form.getInputProps
  • [@mantine/core] Tree: Add checkOnSpace prop support (#​7132)
  • [@mantine/core] ScrollArea: Fix opacity style of thumb being too specific (#​7149)
  • [@mantine/dates] Add withWeekNumbers prop support to all components based on Calendar (#​7179)
  • [@mantine/core] Replace global JSX types with React.JSX to support React 19 types (#​7178)
New Contributors

Full Changelog: mantinedev/mantine@7.14.2...7.14.3

v7.14.2

Compare Source

What's Changed
  • [@mantine/core] Add onEnterTranstionEnd and onExitTransitionEnd props support to Modal, Drawer and Popover components
  • [@mantine/charts] DonutChart: Fix valueFormatter prop not working, add labelsType prop support (#​7153)
  • [@mantine/charts] BarChart: Fix incorrect labels positions in some cases (#​7160)
  • [@mantine/core] PasswordInput: Fix visibilityToggleButtonProps.variant prop being ignored (#​7144)
  • [@mantine/core] Improve window.matchMedia usage to support test environments without matchMedia support (#​7147)
  • [@mantine/core] Fix arrow overlaying Popover, Tooltip and HoverCard content in some cases (#​7148)
  • [@mantine/form] Add onSubmitPreventDefault option support (#​7142)
  • [@mantine/core] TypographyStylesProvider: Fix incorrect lists styles
  • [@mantine/notifications] Fix notifications with bottom-right and top-right positions shifting when modal/drawer is opened
  • [@mantine/core] FileInput: Add missing placeholder Styles API reference
  • [@mantine/core] Update floating-ui, react-textarea-autosize and type-fest dependencies to the latest version
  • [@mantine/modals] Add updateModal and updateContextModal functions (#​7104)
  • [@mantine/tiptap] Fix too specific styles that prevented controls border-radius override without !important
  • [@mantine/tiptap] Fix disabled controls having hover effects and pointer cursor
  • [@mantine/core] FileInput: Add missing component prop
  • [@mantine/core] AngleSlider: Fix page being scrolled when the value is being changed on mobile
  • [@mantine/core] NumberInput: Fix increment/decrement controls not being visible if the value is number like string
  • [@mantine/core] NavLink: Fix collapse for nested links being rend

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.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link
Contributor Author

renovate bot commented Jun 22, 2024

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/react
npm error   react@"latest" from the root project
npm error   peer react@"^18.x || ^19.x" from @mantine/[email protected]
npm error   node_modules/@mantine/carousel
npm error     @mantine/carousel@"^7.5.1" from the root project
npm error   3 more (@mantine/core, @mantine/hooks, react-dom)
npm error
npm error Could not resolve dependency:
npm error peer react@"^16.8.0 || ^17.0.1 || ^18.0.0" from [email protected]
npm error node_modules/embla-carousel-react
npm error   embla-carousel-react@"^7.1.0" from the root project
npm error   peer embla-carousel-react@">=7.0.0" from @mantine/[email protected]
npm error   node_modules/@mantine/carousel
npm error     @mantine/carousel@"^7.5.1" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /tmp/renovate/cache/others/npm/_logs/2025-01-23T18_02_58_362Z-eresolve-report.txt
npm error A complete log of this run can be found in: /tmp/renovate/cache/others/npm/_logs/2025-01-23T18_02_58_362Z-debug-0.log

@renovate renovate bot force-pushed the renovate/all-minor-patch branch from ad8ad0c to f35859a Compare June 26, 2024 17:03
@renovate renovate bot force-pushed the renovate/all-minor-patch branch from f35859a to b502254 Compare August 4, 2024 07:13
@renovate renovate bot force-pushed the renovate/all-minor-patch branch from b502254 to 40eafe8 Compare August 4, 2024 10:54
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.

0 participants