Skip to content

fix(deps): update mantine (major) #245

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

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

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 21, 2023

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@mantine/core (source) 4.2.12 -> 8.1.0 age adoption passing confidence
@mantine/hooks (source) 4.2.12 -> 8.1.0 age adoption passing confidence
@mantine/prism (source) 4.2.12 -> 6.0.22 age adoption passing confidence
gatsby-plugin-mantine (source) 4.0.0 -> 5.0.0 age adoption passing confidence

Release Notes

mantinedev/mantine (@​mantine/core)

v8.1.0

Compare Source

View changelog with demos on mantine.dev website

DatePicker presets

DatePicker, DatePickerInput and DateTimePicker now support presets prop that allows you to add custom date presets. Presets are displayed next to the calendar:

import dayjs from 'dayjs';
import { DatePicker } from '@​mantine/dates';

function Demo() {
  const today = dayjs();

  return (
    <DatePicker
      type="range"
      presets={[
        {
          value: [today.subtract(2, 'day').format('YYYY-MM-DD'), today.format('YYYY-MM-DD')],
          label: 'Last two days',
        },
        {
          value: [today.subtract(7, 'day').format('YYYY-MM-DD'), today.format('YYYY-MM-DD')],
          label: 'Last 7 days',
        },
        {
          value: [today.startOf('month').format('YYYY-MM-DD'), today.format('YYYY-MM-DD')],
          label: 'This month',
        },
        {
          value: [
            today.subtract(1, 'month').startOf('month').format('YYYY-MM-DD'),
            today.subtract(1, 'month').endOf('month').format('YYYY-MM-DD'),
          ],
          label: 'Last month',
        },
        {
          value: [
            today.subtract(1, 'year').startOf('year').format('YYYY-MM-DD'),
            today.subtract(1, 'year').endOf('year').format('YYYY-MM-DD'),
          ],
          label: 'Last year',
        },
      ]}
    />
  );
}

Calendar headerControlsOrder

Calendar and other components based on it now support headerControlsOrder prop.
You can use headerControlsOrder prop to change the order of header controls. The prop accepts an array of
'next' | 'previous' | 'level. Note that each control can be used only once in the array.

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

function Demo() {
  return (
    <DatePicker
      defaultDate="2022-02-01"
      headerControlsOrder={['level', 'previous', 'next']}
      styles={{
        calendarHeaderLevel: {
          justifyContent: 'flex-start',
          paddingInlineStart: 8,
        },
      }}
    />
  );
}

Popover middlewares improvements

Popover component now handles shift and flip Floating UI
differently. Starting from 8.1.0 version, the popover dropdown position is not
changed when the popover is opened. shift and flip middlewares are used only
once to calculate the initial position of the dropdown.

This change fixes incorrect flipping/shifting behavior when there is dynamic content
in the dropdown. For example, searchable Select and DatePickerInput without consistentWeeks option.

use-long-press hook

New use-long-press hook:

import { Button } from '@&#8203;mantine/core';
import { useLongPress } from '@&#8203;mantine/hooks';
import { notifications } from '@&#8203;mantine/notifications';

function Demo() {
  const handlers = useLongPress(() => notifications.show({ message: 'Long press triggered' }));
  return <Button {...handlers}>Press and hold</Button>;
}

Reference area support in charts

BarChart, AreaChart and LineChart
components now support reference area. Reference area is a rectangular area
that can be used to highlight a specific region of the chart:

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

function Demo() {
  return (
    <BarChart
      h={300}
      data={data}
      dataKey="month"
      series={[
        { name: 'Smartphones', color: 'violet.6' },
        { name: 'Laptops', color: 'blue.6' },
        { name: 'Tablets', color: 'teal.6' },
      ]}
    >
      <ReferenceArea
        x1="January"
        x2="March"
        y1={0}
        y2={1250}
        yAxisId="left"
        fillOpacity={0.3}
        strokeOpacity={0.9}
        fill="var(--mantine-color-gray-4)"
        stroke="var(--mantine-color-gray-6)"
        strokeWidth={1}
        label={{
          value: 'Q1 sales threshold',
          position: 'insideTopRight',
          fontSize: 12,
          fill: 'var(--mantine-color-bright)',
        }}
      />
    </BarChart>
  );
}

use-form resetField handler

use-form now has a resetField method that resets field value to its initial value:

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

const form  = useForm({ initialValues: { name: 'John Doe' } });

form.resetField('name'); // resets name field to 'John Doe'

TagsInput isDuplicate prop

You can now use isDuplicate prop in TagsInput component
to control how duplicates are detected. It is a function that receives two arguments:
tag value and current tags. The function must return true if the value is duplicate.

Example of using isDuplicate to allow using the same value with different casing:

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

function Demo() {
  return (
    <TagsInput
      label="Press Enter to submit a tag"
      placeholder="Enter tag"
      isDuplicate={(tagValue, currentTags) => currentTags.some((val) => val === tagValue)}
      defaultValue={['Tag', 'TAG', 'tag']}
    />
  );
}

Slider domain prop

Slider component now support domain prop that allows setting
the possible range of values independently of the min and max values:

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

function Demo() {
  return (
    <Slider
      domain={[0, 100]}
      min={10}
      max={90}
      defaultValue={25}
      marks={[
        { value: 10, label: 'min' },
        { value: 90, label: 'max' },
      ]}
    />
  );
}

RangeSlider pushOnOverlap prop

RangeSlider component now supports pushOnOverlap prop that defines
whether the slider should push the overlapping thumb when the user drags it.

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

function Demo() {
  return <RangeSlider pushOnOverlap={false} defaultValue={[25, 65]} minRange={20} />;
}

Hooks types exports

@mantine/hooks package now exports all types used in hooks options and return values.
For example, you can now import use-uncontrolled types like this:

import type { UseUncontrolledOptions, UseUncontrolledReturnValue } from '@&#8203;mantine/hooks';

Types exported from the library:

interface UseUncontrolledOptions<T> {
  /** Value for controlled state */
  value?: T;

  /** Initial value for uncontrolled state */
  defaultValue?: T;

  /** Final value for uncontrolled state when value and defaultValue are not provided */
  finalValue?: T;

  /** Controlled state onChange handler */
  onChange?: (value: T) => void;
}

type UseUncontrolledReturnValue<T> = [
  /** Current value */
  T,

  /** Handler to update the state, passes `value` and `payload` to `onChange` */
  (value: T, ...payload: any[]) => void,

  /** True if the state is controlled, false if uncontrolled */
  boolean,
];

zod v4 with use-form

You can now use zod v4 with use-form. To use zod 4:

  • Update mantine-form-zod-resolver to 1.2.1 or later version
  • Update zod to version 3.25.0 or later
  • Replace zod imports with zod/v4 (only if you have zod@3 in your package.json)
  • Replace zodResolver with zod4Resolver in your code
  • All other code remains the same

Example with zod v4:

import { z } from 'zod/v4';
import { zod4Resolver } from 'mantine-form-zod-resolver';

const schema = z.object({
  name: z.string().min(2, { message: 'Name should have at least 2 letters' }),
  email: z.email({ message: 'Invalid email' }),
  age: z.number().min(18, { message: 'You must be at least 18 to create an account' }),
});

const form = useForm({
  initialValues: {
    name: '',
    email: '',
    age: 16,
  },
  validate: zod4Resolver(schema),
})

Documentation updates

  • use-debounced-callback documentation was updated to include new flush and flushOnUnmount features
  • Documentation about exported types was added to all applicable hooks

Other changes

  • All components now support bdrs style prop to set border radius.
  • DateTimePicker now supports defaultTimeValue prop
  • Tooltip now supports autoContrast prop.
  • Handlers returned from use-counter are now memoized.
  • Return value of use-event-listener, use-focus-within, use-focus-trap, use-hover, use-move, use-radial-move changed (React.RefObject -> React.RefCallback), required to fix incorrect ref handling in several cases. For more information, see the issue on GitHub – #​7406.
  • Deprecated React.MutableRefObject type was replaced with React.RefObject in all packages to better support React 19 types.
  • positionDependencies prop is now deprecated in Tooltip, Popover and other components based on Popover. The prop is no longer required and can be safely removed. positionDependencies prop will be removed in 9.0 release.

v8.0.2

Compare Source

What's Changed

  • [@mantine/dates] DateTimePicker: Fix incorrect onChange value type
  • [@mantine/core] ScrollArea: Fix onBottomReached not being called when the container size has sub-pixel value
  • [@mantine/dates] TimePicker: Improve leading zero input handling
  • [@mantine/dates] TimePicker: Fix setting value to an empty string not reseting displayed time in some cases
  • [@mantine/form] Fix form.reorderItem reordering only the first item (#​7892)
  • [@mantine/dates] DateInput: Fix selected month and year not being highlighted (#​7897)
  • [@mantine/hooks] use-local-storage: Add queueMicrotask for dispatching update events to fix multiple hook instances synchonization (#​7874)
  • [@mantine/dates] Fix leftover timezone issues after 8.0 strings migration (#​7878)
  • [@mantine/form] Add zod v4 support (#​7871)
  • [@mantine/core] Popover: Fix onOpen/onClose being called when disabled prop is set (#​7868)
  • [@mantine/spotlight] Fix labels containing single quote passed to Spotlight.ActionGroup not working (#​7865)
  • [@mantine/core] Collapse: Fix inert prop not being compatible with React 18 (#​7864)
  • [@mantine/core] List: Fix incorrect types when type="unordered" (#​7861)
  • [@mantine/core] AngleSlider: Fix incorrect arrow events handling (#​7862)
  • [@mantine/dates] DateInput: Fix Escape key not closing dropdown (#​7857)
  • [@mantine/hooks] use-shallow-effect: Fix NaN value not being handled correctly (#​7851)

New Contributors

Full Changelog: mantinedev/mantine@8.0.1...8.0.2

v8.0.1

Compare Source

What's Changed

  • [@mantine/hooks] use-debounced-callback: Add leading: true option support (#​7841)
  • [@mantine/core] Tabs: Fix incorrect Tabs.List styles with grow prop enabled
  • [@mantine/core] MutltiSelect: Fix onPaste prop not being passed to the input element (#​7838)
  • [@mantine/dates] TimePicker: Fix up/down arrows not working correctly with step prop (#​7784)
  • [@mantine/core] Button: Fix FileButton breaking Button.Group styles (#​7835)
  • [@mantine/core] Modal Fix incorrect header styles with ScrollArea (#​7832)
  • [@mantine/dropzone] Fix status being stuck in rejected state when a file with incorrect mime type is dropped
  • [@mantine/core] Switch: Fix incorrect thumb position in RTL layouts (#​7822)
  • [@mantine/core] AngleSlider: Fix incorrect thumb position in RTL layouts (#​7822)
  • [@mantine/core] Menu: Fix default props not working in Menu.Sub (#​7820)
  • [@mantine/core] Disable scaling explicit rem units in rem function (#​7821)
  • [@mantine/core] Slider: Fix incorrect track width (#​7464)
  • [@mantine/dates] TimeInput: Fix step prop not working (#​7811)
  • [@mantine/core] Select: Fix onSearchChange being triggered when controlled search value is updated (#​7814)
  • [@mantine/dropzone] Migrate back to react-dropzone from react-dropzone-esm
  • [@mantine/code-highlight] Fix tooltip being cut off in components with 1-2 lines of code (#​7816)
  • [@mantine/core] Fix inconsistent disabled styles in some components, add CSS variables for disabled colors (#​7805)
  • [@mantine/dates] DatePicker: Add selected date highlight in year and month picker for type="default" (#​7799)
  • [@mantine/core] Table: Add scrollAreaProps support to Table.ScrollContainer (#​7798)
  • [@mantine/core] Fix boolean value not being included in data-* attributes types (#​7810)
  • [@mantine/dates] DateInput: Fix incorrect onChange value type (#​7796)
  • [@mantine/core] Stepper: Fix unexpected bottom spacing in vertical orientation (#​7794)
  • [@mantine/core] PasswordInput: Fix aria-describedby not pointing to error and description elements (#​7793)
  • [@mantine/core] Switch: Fix div element used inside label (#​7776)
  • [@mantine/dates] Add empty string handling as empty value (#​7780)
  • [@mantine/core] Collapse: Fix children with scale animations not working correctly when collapse is opened (#​7774)
  • [@mantine/core] Transition: Fix exitDuration not working correctly for rapid changes (#​7773)
  • [@mantine/dates] TimePicker: Fix 00 in dropdown not being reachable with arrow keys when it is outside scroll position (#​7788)
  • [@mantine/core] Stepper: Fix inconsistent border color in horizontal/vertical orientation (#​7795)
  • [@mantine/core] Stepper: Fix inconsistent border color in horizontal/vertical orientation (#​7795)

New Contributors

Full Changelog: mantinedev/mantine@8.0.0...8.0.1

v8.0.0: 🌶️

Compare Source

View changelog with demos on mantine.dev website

Migration guide

This changelog covers breaking changes and new features in Mantine 8.0.
To migrate your application to Mantine 8.0, follow 7.x → 8.x migration guide.

Granular global styles exports

Global styles are now splitted between 3 files:

  • baseline.css – a minimal CSS reset, sets box-sizing: border-box and changes font properties
  • default-css-variables.css – contains all CSS variables generated from the default theme
  • global.css – global classes used in Mantine components

If you previously imported individual styles from @mantine/core package, you need to update imports
to use new files:

import '@&#8203;mantine/core/styles/baseline.css';
import '@&#8203;mantine/core/styles/default-css-variables.css';
import '@&#8203;mantine/core/styles/global.css';

If you imported @mantine/core/styles.css, no changes are required –
all new files are already included in styles.css.

Menu with submenus

Menu component now supports submenus:

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

function Demo() {
  return (
    <Menu width={200} position="bottom-start">
      <Menu.Target>
        <Button>Toggle Menu</Button>
      </Menu.Target>

      <Menu.Dropdown>
        <Menu.Item>Dashboard</Menu.Item>

        <Menu.Sub>
          <Menu.Sub.Target>
            <Menu.Sub.Item>Products</Menu.Sub.Item>
          </Menu.Sub.Target>

          <Menu.Sub.Dropdown>
            <Menu.Item>All products</Menu.Item>
            <Menu.Item>Categories</Menu.Item>
            <Menu.Item>Tags</Menu.Item>
            <Menu.Item>Attributes</Menu.Item>
            <Menu.Item>Shipping classes</Menu.Item>
          </Menu.Sub.Dropdown>
        </Menu.Sub>

        <Menu.Sub>
          <Menu.Sub.Target>
            <Menu.Sub.Item>Orders</Menu.Sub.Item>
          </Menu.Sub.Target>

          <Menu.Sub.Dropdown>
            <Menu.Item>Open</Menu.Item>
            <Menu.Item>Completed</Menu.Item>
            <Menu.Item>Cancelled</Menu.Item>
          </Menu.Sub.Dropdown>
        </Menu.Sub>

        <Menu.Sub>
          <Menu.Sub.Target>
            <Menu.Sub.Item>Settings</Menu.Sub.Item>
          </Menu.Sub.Target>

          <Menu.Sub.Dropdown>
            <Menu.Item>Profile</Menu.Item>
            <Menu.Item>Security</Menu.Item>
            <Menu.Item>Notifications</Menu.Item>
          </Menu.Sub.Dropdown>
        </Menu.Sub>
      </Menu.Dropdown>
    </Menu>
  );
}

Popover hideDetached

Popover component now supports hideDetached prop to configure how the dropdown behaves when the target
element is hidden with styles (display: none, visibility: hidden, etc.),
removed from the DOM, or when the target element is scrolled out of the viewport.

By default, hideDetached is enabled – the dropdown is hidden with the target element.
You can change this behavior with hideDetached={false}. To see the difference, try to scroll
the root element of the following demo:

import { Box, Button, Group, Popover } from '@&#8203;mantine/core';

function Demo() {
  return (
    <Box
      bd="1px solid var(--mantine-color-dimmed)"
      p="xl"
      w={400}
      h={200}
      style={{ overflow: 'auto' }}
    >
      <Box w={1000} h={400}>
        <Group>
          <Popover width="target" position="bottom" opened>
            <Popover.Target>
              <Button>Toggle popover</Button>
            </Popover.Target>
            <Popover.Dropdown>This popover dropdown is hidden when detached</Popover.Dropdown>
          </Popover>

          <Popover width="target" position="bottom" opened hideDetached={false}>
            <Popover.Target>
              <Button>Toggle popover</Button>
            </Popover.Target>
            <Popover.Dropdown>This popover dropdown is visible when detached</Popover.Dropdown>
          </Popover>
        </Group>
      </Box>
    </Box>
  );
}

Date values as strings

All @mantine/dates components now use date strings in YYYY-MM-DD or YYYY-MM-DD HH:mm:ss
format instead of Date objects. This change was made to resolve issues related to timezones
– now the output of all @mantine/dates components does not include any timezone-specific information.
Follow 7.x → 8.x migration guide to learn how to update the code to use new string values.

Example of using DatePicker component with string values:

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

function Demo() {
  const [value, setValue] = useState<string | null>(null);
  return <DatePicker value={value} onChange={setValue} />;
}

DatesProvider timezone

DatesProvider component no longer supports timezone option – all @mantine/dates
components now use strings in YYYY-MM-DD HH:mm:ss format as values and do not contain
timezone information.

If you need to handle timezones in your application, you can use a dedicated dates library
(dayjs, luxon, date-fns)
to update timezone values.

Example of using Mantine components with dayjs:

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

function Demo() {
  const [value, setValue] = useState<string | null>('2022-08-21');

  // Mantine components use strings as values, you can pass these
  // strings to a dates library of your choice to assign timezone
  const dateWithTimeZone = dayjs(value).tz("America/Toronto").toDate();

  return <DatePicker value={value} onChange={setValue} />;
}

TimePicker component

New TimePicker component is an alternative to
TimeInput that offers more features. It supports 24-hour and 12-hour formats,
dropdown with hours, minutes and seconds, and more.

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

function Demo() {
  return (
    <>
      <TimePicker label="Enter time (24h format)" withSeconds withDropdown />
      <TimePicker label="Enter time (12h format)" withSeconds withDropdown format="12h" mt="md" />
    </>
  );
}

DateTimePicker component changes

DateTimePicker component now uses TimePicker under
the hood instead of TimeInput. You can now use all TimePicker
features with DateTimePicker component.

Prop timeInputProps is no longer available, to pass props down to the underlying TimePicker
you need to use timePickerProps prop.

Example of enabling dropdown and setting 12h format for time picker:

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

function Demo() {
  return (
    <DateTimePicker
      label="Pick date and time"
      placeholder="Pick date and time"
      timePickerProps={{
        withDropdown: true,
        popoverProps: { withinPortal: false },
        format: '12h',
      }}
    />
  );
}

TimeValue component

New TimeValue component can be used to display a formatted time string
with similar formatting options to TimePicker component.

import { Text } from '@&#8203;mantine/core';
import { TimeValue } from '@&#8203;mantine/dates';

function Demo() {
  return (
    <div>
      <Text>
        24h format: <TimeValue value="18:45:34" />
      </Text>
      <Text>
        12h format: <TimeValue value="18:45:34" format="12h" />
      </Text>
    </div>
  );
}

TimeGrid component

New TimeGrid component allows to capture time value from the user with a
predefined set of time slots:

import { getTimeRange, TimeGrid } from '@&#8203;mantine/dates';

function Demo() {
  return (
    <TimeGrid
      data={getTimeRange({ startTime: '10:00', endTime: '21:00', interval: '01:00' })}
      simpleGridProps={{
        type: 'container',
        cols: { base: 1, '180px': 2, '320px': 3 },
        spacing: 'xs',
      }}
      withSeconds={false}
    />
  );
}

Heatmap component

New Heatmap component allows to display data in a calendar heatmap format:

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

function Demo() {
  return (
    <Heatmap
      data={data}
      startDate="2024-02-16"
      endDate="2025-02-16"
      withTooltip
      withWeekdayLabels
      withMonthLabels
      getTooltipLabel={({ date, value }) =>
        `${dayjs(date).format('DD MMM, YYYY')}${value === null || value === 0 ? 'No contributions' : `${value} contribution${value > 1 ? 's' : ''}`}`
      }
    />
  );
}

CodeHighlight changes

@​mantine/code-highlight package no longer depends on
highlight.js. Instead, it now provides a new API based
on adapters that allows using any syntax highlighter of your choice. Out of the box,
@mantine/code-highlight provides adapters for shiki and
highlight.js.

To learn about the migration process and how to use the new adapters API, check the
updated CodeHighlight documentation and 7.x → 8.x migration guide.

CodeHighlight with shiki

You can now use CodeHighlight component with shiki.

Shiki library provides the most advanced syntax highlighting
for TypeScript and CSS/Sass code. It uses textmate grammars to highlight code (same as in VSCode).
Shiki adapter is recommended if you need to highlight advanced TypeScript (generics, jsx nested in props) or CSS code (custom syntaxes, newest features).
Shiki adapter is used for all code highlighting in Mantine documentation.

To use shiki adapter, you need to install shiki package:

yarn add shiki

Then wrap your app with CodeHighlightAdapterProvider and provide createShikiAdapter as adapter prop:

import { MantineProvider } from '@&#8203;mantine/core';
import { CodeHighlightAdapterProvider, createShikiAdapter } from '@&#8203;mantine/code-highlight';

// Shiki requires async code to load the highlighter
async function loadShiki() {
  const { createHighlighter } = await import('shiki');
  const shiki = await createHighlighter({
    langs: ['tsx', 'scss', 'html', 'bash', 'json'],
    themes: [],
  });

  return shiki;
}

const shikiAdapter = createShikiAdapter(loadShiki);

function App() {
  return (
    <MantineProvider>
      <CodeHighlightAdapterProvider adapter={shikiAdapter}>
        {/* Your app here */}
      </CodeHighlightAdapterProvider>
    </MantineProvider>
  );
}

After that, you can use CodeHighlight component in your application:

import { CodeHighlight } from '@&#8203;mantine/code-highlight';

const exampleCode = `
type FilterPropsRes<T extends Record<string, any>> = {
  [Key in keyof T]-?: T[Key] extends undefined ? never : T[Key];
};

export function filterProps<T extends Record<string, any>>(props: T) {
  return Object.keys(props).reduce<FilterPropsRes<T>>((acc, key: keyof T) => {
    if (props[key] !== undefined) {
      acc[key] = props[key];
    }
    return acc;
  }, {} as FilterPropsRes<T>);
}
`;

function Demo() {
  return <CodeHighlight code={exampleCode} language="tsx" radius="md" />;
}

Carousel changes

@​mantine/carousel package was updated to use the latest version of
embla-carousel-react package. This update includes breaking changes:

  • speed and draggable props were removed – they are no longer supported by embla-carousel-react
  • It is now required to install both embla-carousel and embla-carousel-react packages explicitly
  • useAnimationOffsetEffect hook was removed – the issue it addressed was fixed in embla-carousel-react
  • Embla type export was removed, you should use EmblaCarouselType from embla-carousel instead
  • Props that were previously passed to embla are now grouped under emblaOptions prop

Follow the 7.x → 8.x migration guide to update your application to use the latest version of @mantine/carousel.

Switch withThumbIndicator

Switch component styles were updated to include indicator inside the thumb.
You can change it by setting withThumbIndicator prop:

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

function Demo() {
  return (
    <Switch
      defaultChecked
      label="I agree to sell my privacy"
    />
  );
}

Theme types augmentation

You can now augment spacing, radius, breakpoints, fontSizes, lineHeights,
and shadows types. To learn more about this feature, follow this guide.

Example of types augmentation for spacing and radius:

import {
  DefaultMantineSize,
  MantineThemeSizesOverride,
} from '@&#8203;mantine/core';

type ExtendedCustomSpacing =
  | 'xxl'
  | 'xxxs'
  | DefaultMantineSize;

type ExtendedCustomRadius =
  | 'xxs'
  | DefaultMantineSize;

declare module '@&#8203;mantine/core' {
  export interface MantineThemeSizesOverride {
    spacing: Record<ExtendedCustomSpacing, string>;
    radius: Record<ExtendedCustomRadius, string>;
  }
}

Other changes

  • Kbd component now supports size prop
  • DateInput component no longer supports preserveTime prop, use different component to capture time values
  • ScrollArea component no longer has forced display: table styles on the wrapper element of the content. It also now supports content Styles API selector to apply styles to the content element.
  • Image component no longer includes flex: 0 styles by default
  • SegmentedControl default height values were changed to match sizes of Input components
  • Type of wrapperProps prop in all components that support it (Checkbox, Radio, Chip, most inputs) was changed to more strict type
  • Portal component now has reuseTargetNode prop enabled by default
  • use-form setFieldValue handler types are now stricter
  • Menu.Item no longer has data-hovered attribute, use :hover and :focus selectors instead to apply styles
  • use-os now supports Chrome OS detection, its return type now includes chromeos value in the union
  • The default eye dropper icon of ColorInput component was updated
  • The default spacing of Notification component was increased

New Contributors

Full Changelog: mantinedev/mantine@7.17.6...8.0.0

v7.17.8

Compare Source

What's Changed
  • [@mantine/hooks] use-idle: Fix timeout not being cancelled when the parent component unmounts (#​7914)
  • [@mantine/core] Collapse: Fix inert attribute being incompatible with React 18 (#​7911)
  • [@mantine/core] Overlay: Fix blur not working in older browsers (#​7907)
  • [@mantine/core] Fix toRgba function incorrectly handling values with zero transparency (#​7906)
  • [@mantine/core] ScrollArea: Fix onBottomReached not being called when the container size has sub-pixel value
  • [@mantine/form] Fix form.reorderItem reordering only the first item (#​7892)
  • [@mantine/core] Popover: Fix onOpen/onClose being called when disabled prop is set (#​7868)
  • [@mantine/spotlight] Fix labels containing single quote passed to Spotlight.ActionGroup not working (#​7865)
  • [@mantine/core] Collapse: Fix inert prop not being compatible with React 18 (#​7864)
  • [@mantine/core] List: Fix incorrect types when type="unordered" (#​7861)
  • [@mantine/core] AngleSlider: Fix incorrect arrow events handling (#​7862)
  • [@mantine/dates] DateInput: Fix Escape key not closing dropdown (#​7857)
  • [@mantine/hooks] use-shallow-effect: Fix NaN value not being handled correctly (#​7851)
  • [@mantine/core] MutltiSelect: Fix onPaste prop not being passed to the input element (#​7838)
  • [@mantine/core] Button: Fix FileButton breaking Button.Group styles (#​7835)
  • [@mantine/core] Modal Fix incorrect header styles with ScrollArea (#​7832)
  • [@mantine/dropzone] Fix status being stuck in rejected state when a file with incorrect mime type is dropped
  • [@mantine/core] AngleSlider: Fix incorrect thumb position in RTL layouts (#​7822)
  • [@mantine/core] Select: Fix onSearchChange being triggered when controlled search value is updated (#​7814)
  • [@mantine/dates] TimeInput: Fix step prop not working (#​7811)
  • [@mantine/core] Table: Add scrollAreaProps support to Table.ScrollContainer (#​7798)
  • [@mantine/core] Stepper: Fix unexpected bottom spacing in vertical orientation (#​7794)
  • [@mantine/core] PasswordInput: Fix aria-describedby not pointing to error and description elements (#​7793)
  • [@mantine/core] Switch: Fix div element used inside label (#​7776)
  • [@mantine/core] Collapse: Fix children with scale animations not working correctly when collapse is opened (#​7774)
  • [@mantine/core] Transition: Fix exitDuration not working correctly for rapid changes (#​7773)
  • [@mantine/core] Stepper: Fix inconsistent border color in horizontal/vertical orientation (#​7795)
New Contributors

Full Changelog: mantinedev/mantine@8.0.2...7.17.8

v7.17.7

Compare Source

v7.17.6: 7.17.7

Compare Source

What's Changed
  • [@mantine/core] Table: Fix stickyHeader prop having impact on th selector specificity (#​7767)
  • [@mantine.core] NumberInput: Fix max prop not reseting value on blur if the value is larger than Number.MAX_SAFE_INTEGER (#​7766)
  • [@mantine.hook] use-resize-observer: Fix width/height not being calculated correctly for elements with box-sizing: content-box (#​7764)
  • [@mantine/core] NavLink: Fix rightSection={null} not disabling chevron
  • [@mantine.hook] use-hotkeys: Fix usePhysicalKeys option not working with spacial keys (#​7761)
  • [@mantine/core] Modal: Fix scrollarea used inside the modal affecting the position of the close button (#​7738)
  • [@mantine/core] Select: Fix defined defaultValue being ignored with data updates (#​7742)
  • [@mantine/core] ScrollArea: Fix content overflowing the viewport in some cases (#​7748)
  • [@mantine/charts] RadarChart: Add tooltip and dots support (#​7749)
  • [@mantine/modals] Fix confirmProps not available in updateModal function (#​7750)
  • [@mantine/hooks] use-debounced-callback: Fix flushOnUnmount not working (#​7745)
  • [@mantine/core] Table: Add missing TableScrollContainerProps export
New Contributors

Full Changelog: mantinedev/mantine@7.17.5...7.17.6

v7.17.5

Compare Source

What's Changed
  • [@mantine/form] Add form.getInitialValues handler
  • [@mantine/core] RangeSlider: Fix first thumb not being focused when the component root is clicked (#​7731)
  • [@mantine/core] PillsInput: Remove lefover multiline prop types (#​7727)
  • [@mantine/charts] CompositeChart: Fix type="stacked" being confused with BarChart behavior
  • [@mantine/core] Notification: Allow changing role attribute on the root element (#​7682)
  • [@mantine/hooks] use-idle: Fix wheel event not being tracked (#​7669)
  • [@mantine/core] Table: Add maxHeight prop support to Table.ScrollContainer (#​7713)
  • [@mantine/core] Modal: Fix incorrect Escape key handling during IME composition (#​7700)
  • [@mantine/form] Add defaultChecked to form.getInputProps return type (#​7702)
  • [@mantine/hooks] use-hotkeys: Update matching logic to include both physical and layout keys (#​7708)
  • [@mantine/dates] Fix day.js isSame function not working correctly for non-Gregorian calendars (#​7712)
  • [@mantine.core] SegmentedControl: Fix animation not working with controlled value (#​7721)
New Contributors

Full Changelog: mantinedev/mantine@7.17.4...7.17.5

v7.17.4

Compare Source

What's Changed
  • [@mantine/hooks] use-orientation: Add option to customize initial values (#​7657)
  • [@mantine/core] Fix selectFirstOptionOnChange not working correctly (#​7583)
  • [@mantine/core] Fix error thrown when Textarea was used on cloudflare workers (#​7637)
  • [@mantine/core] Allow spacing, radius and font-size types augmentation (#​7644)
  • [@mantine/core] ScrollArea: Fix scrollbars being invisible when offsetScrollbars='present' is not set (#​7647)
  • [@mantine/core] TypographyStylesProvider: Fix headings font-family not matching the value defined on the theme (#​7651)
  • [@mantine/core] Paper: Add CSS variable for border-color for easier overrides (#​7654)
  • [@mantine/core] Table: Fix stickyHeader prop affecting border rendering (#​7658)
  • [@mantine/core] Slider: Fix onChangeEnd using stale external state (#​7660)
New Contributors

Full Changelog: mantinedev/mantine@7.17.3...7.17.4

v7.17.3

Compare Source

What's Changed

  • [@mantine/core] Pill: Fix incorrect removeButtonProps type
  • [@mantine/modals] Fix data-* attributes not being included in types for confirm and cancel button props
  • [@mantine/core] Fix incorrect selected option position handling when search changes in Select, MultiSelect, Autocomplete and TagsInput (#​7583)
  • [@mantine/core] SegmentedControl: Fix incorrect indicator position when data is updated (#​7615)
  • [@mantine/core] ScrollArea: Fix scrollbars being revealed on hover when hidden with offsetScrollbars="present" (#​7599)
  • [@mantine/core] AppShell: Fix disabled prop not removing aside and footer margins (#​7609)
  • [@mantine/modals] Fix incorrect esm exports paths (#​7603)
  • [@mantine/core] Checkbox: Set indeterminate attribute on the DOM node (#​7608, #​7613)

New Contributors

Full Changelog: mantinedev/mantine@7.17.2...7.17.3

v7.17.2

Compare Source

What's Changed
  • [@mantine/core] Menu: Fix missing withProps function
  • [@mantine/core] Transition: Fix 1px child elements shift in Chrome for animations with scaling
  • [@mantine/core] ScrollArea: Add offsetScrollbars="present" option support (#​7527)
  • [@mantine/core] Notification: Add loaderProps to pass props down to Loader component (#​7577)
  • [@mantine/core] Tooltip: Fix ref prop not working correctly on the child element of the tooltip (#​7578)
  • [@mantine/core] Select: Fix dropdown not openning in Firefox (#​7539)
New Contributors

Full Changelog: mantinedev/mantine@7.17.1...7.17.2

v7.17.1

Compare Source

What's Changed
  • [@mantine/core] Select: Fix caret displayed when the readonly input is clicked (#​7476)
  • [@mantine/charts] Fix incorrect types of classNames prop of PieChart and DonutChart components (#​7475)
  • [@mantine/charts] BubbleChart: Fix broken layout when label prop is used with React 19
  • [@mantine/form] Fix missing isJSONString export (#​7508)
  • [@mantine/core] Fix MultiSelect and TagsInputs dropdowns still being opened on click when components were used inside disabled fieldset (#​7528)
  • [@mantine/code-highlight] Fallback unsupported code to plaintext (#​7497)
  • [@mantine/emotion] Improve "Go to definition" support for createStyles classes (#​7526)
New Contributors

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.

@netlify
Copy link

netlify bot commented May 21, 2023

Deploy Preview for operate-first-cloud failed.

Name Link
🔨 Latest commit b6994c9
🔍 Latest deploy log https://app.netlify.com/sites/operate-first-cloud/deploys/6479ca645be95300085ff6ba

@op1st-prow
Copy link

op1st-prow bot commented May 21, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign schwesig for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@op1st-prow op1st-prow bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label May 21, 2023
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@renovate renovate bot force-pushed the renovate/major-mantine branch from 1573ddf to b6994c9 Compare June 2, 2023 10:54
@renovate
Copy link
Contributor Author

renovate bot commented Sep 21, 2023

⚠ 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 ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"17.0.2" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^18.2.0" from @mantine/[email protected]
npm ERR! node_modules/@mantine/hooks
npm ERR!   @mantine/hooks@"7.9.0" from the root project
npm ERR!   peer @mantine/hooks@"7.9.0" from @mantine/[email protected]
npm ERR!   node_modules/@mantine/core
npm ERR!     @mantine/core@"7.9.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /tmp/renovate/cache/others/npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /tmp/renovate/cache/others/npm/_logs/2024-05-09T06_46_39_016Z-debug-0.log

@renovate renovate bot changed the title Update mantine (major) fix(deps): update mantine (major) Nov 6, 2023
Copy link
Contributor Author

renovate bot commented May 9, 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 ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"17.0.2" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^18.x || ^19.x" from @mantine/[email protected]
npm ERR! node_modules/@mantine/hooks
npm ERR!   @mantine/hooks@"8.1.0" from the root project
npm ERR!   peer @mantine/hooks@"8.1.0" from @mantine/[email protected]
npm ERR!   node_modules/@mantine/core
npm ERR!     @mantine/core@"8.1.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /runner/cache/others/npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /runner/cache/others/npm/_logs/2025-06-16T19_51_35_584Z-debug-0.log

@renovate renovate bot changed the title fix(deps): update mantine (major) fix(deps): update dependency @mantine/prism to v6 Dec 8, 2024
@renovate renovate bot changed the title fix(deps): update dependency @mantine/prism to v6 fix(deps): update mantine (major) Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants