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 & related (major) #460

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

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 9, 2024

This PR contains the following updates:

Package Type Update Change OpenSSF
@mantine/carousel (source) dependencies major 6.0.22 -> 7.12.2 OpenSSF Scorecard
@mantine/core (source) dependencies major 6.0.22 -> 7.12.2 OpenSSF Scorecard
@mantine/form (source) dependencies major 6.0.22 -> 7.12.2 OpenSSF Scorecard
@mantine/hooks (source) dependencies major 6.0.22 -> 7.12.2 OpenSSF Scorecard
@tabler/icons-react (source) dependencies major 2.47.0 -> 3.17.0 OpenSSF Scorecard
embla-carousel-auto-height (source) dependencies major 7.1.0 -> 8.3.0 OpenSSF Scorecard
embla-carousel-react (source) dependencies major 7.1.0 -> 8.3.0 OpenSSF Scorecard

Release Notes

mantinedev/mantine (@​mantine/carousel)

v7.12.2

Compare Source

What's Changed

  • [@mantine/hooks] use-idle: Fix idle countdown not starting if the user did non interact with the page (#​6683)
  • [@mantine/core] ScrollArea: Fix onBottomReached prop not being available in ScrollArea.Autosize component
  • [@mantine/core] Remove children from Checkbox, Radio and Switch types to avoid accidental errors
  • [@mantine/core] TypographyStylesProvider: Fix incorrect table styles in dark color scheme
  • [@mantine/form] Fix error thrown for nullable values dirty status check (#​6672)
  • [@mantine/core] Badge: Fix unexpected change to block layout, fix incorrect alignment when fixed width is set (#​6698, #​6680)
  • [@mantine/core] ScrollArea: Fix pointer-events being left as none after interaction with scrollbar (#​6681)
  • [@mantine/core] Tabs: Fix keepMounted prop being added as attribute to Tabs.Panel DOM element (#​6711)
  • [@mantine/core] Tree: Add initialCheckedState support (#​6697)
  • [@mantine/spotlight] Fix SpotlightRoot component not being exported (#​6710)
  • [@mantine/dropzone] Add 7z and rar mime types exports (#​6702)
  • [@mantine/dates] DatePickerInput: Fix incorrect hovered date logic when the component receives value update with partial selected date range (#​6718)
  • [@mantine/dates] Fix valueFormatter prop being added to DateTimePicker types
  • [@mantine/core] Badge: Fix right/left sections height affecting the alignment of the label
  • [@mantine/core] Menu: Fix accessibility warning in devtools when the Menu is opened (#​6644)

New Contributors

Full Changelog: mantinedev/mantine@7.12.1...7.12.2

v7.12.1

Compare Source

What's Changed
  • [@mantine/dates] DateInput: Fix default date being set to the current date when minDate is set to the future (#​6646)
  • [@mantine/core] ScrollArea: Fix incorrect thumb::before styles
  • [@mantine/core] Fix incorrect active styles of buttons used inside disabled fieldset
  • [@mantine/form] Fix form.watch callbacks not being fired when form.initialize is called (#​6639)
  • [@mantine/core] Switch: Fix Switch shrinking when large label or description is used (#​6531)
  • [@mantine/core] Combobox: Fix Combobox.Search overflow when ScrollArea is used in the dropdown (#​6562)
  • [@mantine/core] Accordion: Add missing withProps function (#​6564)
  • [@mantine/core] Pill: Fix remove icon overflowing pill container if its background color was changed with Styles API (#​6565)
  • [@mantine/core] PinInput: Allow passing props to individual input elements depending on index with getInputProps (#​6588)
  • [@mantine/charts]: Fix LineChart Legend and Tooltip to support nested names (#​6536)
  • [@mantine/core] Tooltip: Add missing Tooltip.Group.extend function (#​6576)
  • [@mantine/spotlight] Fix limit prop not working correctly with actions groups (#​6632)
  • [@mantine/core] Badge: Fix text overflow not being handled correctly (#​6629)
  • [@mantine/core] SegmentedControl: Add data-disabled attribute to the root element to simplify styling with Styles API (#​6625)
  • [@mantine/core] SegmentedControl: Fix initial position of indicator being broken when the component is used inside other element that has transitions on mount (#​6622)
  • [@mantine/core] TagsInput: Fix onKeyDown prop not working (#​6569)
  • [@mantine/charts] PieChart: Fix valueFormatter not working on outside labels (#​6616)
  • [@mantine/core] Popover: Fix apply function of size middleware not being handled correctly (#​6598)
  • [@mantine/core] Chip: Fix incorrect checked padding for size="xl" (#​6586)
  • [@mantine/dates] TimeInput: Fix incorrect focus styles of am/pm input (#​6579)
  • [@mantine/hook] use-os: Fix incorrect iPadOS detection (#​6535)
  • [@mantine/core] DatePickerInput: Fix incorrect aria-label being set on the input element (#​6530)
  • [@mantine/core] Menu: Fix incorrect Escape key handling inside Modal (#​6580)
New Contributors

Full Changelog: mantinedev/mantine@7.12.0...7.12.1

v7.12.0: 🌟

Compare Source

View changelog with demos on mantine.dev website

Notifications at any position

It is now possible to display notifications at any position on the screen
with @​mantine/notifications package:

import { Button } from '@​mantine/core';
import { notifications } from '@​mantine/notifications';

const positions = [
  'top-left',
  'top-right',
  'bottom-left',
  'bottom-right',
  'top-center',
  'bottom-center',
] as const;

function Demo() {
  const buttons = positions.map((position) => (
    <Button
      key={position}
      onClick={() =>
        notifications.show({
          title: `Notification at ${position}`,
          message: `Notification at ${position} message`,
          position,
        })
      }
    >
      {position}
    </Button>
  ));

  return <Group>{buttons}</Group>;
}

Subscribe to notifications state

You can now subscribe to notifications state changes with useNotifications hook:

function Demo() {
  const [counter, { increment }] = useCounter();
  const notificationsStore = useNotifications();

  const showNotification = () => {
    notifications.show({
      title: `Notification ${counter}`,
      message: 'Most notifications are added to queue',
    });

    increment();
  };

  return (
    <>
      <Button onClick={showNotification} mb="md">
        Show notification
      </Button>

      <Text>Notifications state</Text>
      <Code block>{JSON.stringify(notificationsStore.notifications, null, 2)}</Code>

      <Text mt="md">Notifications queue</Text>
      <Code block>{JSON.stringify(notificationsStore.queue, null, 2)}</Code>
    </>
  );
}

SemiCircleProgress component

New SemiCircleProgress component:

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

function Demo() {
  return (
    <SemiCircleProgress
      fillDirection="left-to-right"
      orientation="up"
      filledSegmentColor="blue"
      size={200}
      thickness={12}
      value={40}
      label="Label"
    />
  );
}

Tree checked state

Tree component now supports checked state:

import { IconChevronDown } from '@&#8203;tabler/icons-react';
import { Checkbox, Group, RenderTreeNodePayload, Tree } from '@&#8203;mantine/core';
import { data } from './data';

const renderTreeNode = ({
  node,
  expanded,
  hasChildren,
  elementProps,
  tree,
}: RenderTreeNodePayload) => {
  const checked = tree.isNodeChecked(node.value);
  const indeterminate = tree.isNodeIndeterminate(node.value);

  return (
    <Group gap="xs" {...elementProps}>
      <Checkbox.Indicator
        checked={checked}
        indeterminate={indeterminate}
        onClick={() => (!checked ? tree.checkNode(node.value) : tree.uncheckNode(node.value))}
      />

      <Group gap={5} onClick={() => tree.toggleExpanded(node.value)}>
        <span>{node.label}</span>

        {hasChildren && (
          <IconChevronDown
            size={14}
            style={{ transform: expanded ? 'rotate(180deg)' : 'rotate(0deg)' }}
          />
        )}
      </Group>
    </Group>
  );
};

function Demo() {
  return <Tree data={data} levelOffset={23} expandOnClick={false} renderNode={renderTreeNode} />;
}

Disable specific features in postcss-preset-mantine

You can now disable specific features of the postcss-preset-mantine
by setting them to false in the configuration object. This feature is available starting from
postcss-preset-mantine@1.17.0.

module.exports = {
  'postcss-preset-mantine': {
    features: {
      // Turn off `light-dark` function
      lightDarkFunction: false,

      // Turn off `postcss-nested` plugin
      nested: false,

      // Turn off `lighten`, `darken` and `alpha` functions
      colorMixAlpha: false,

      // Turn off `rem` and `em` functions
      remEmFunctions: false,

      // Turn off `postcss-mixins` plugin
      mixins: false,
    },
  },
};

Help Center updates

Other changes

  • use-interval hook now supports autoInvoke option to start the interval automatically when the component mounts.
  • use-form with mode="uncontrolled" now triggers additional rerender when dirty state changes to allow subscribing to form state changes.
  • ScrollArea component now supports onTopReached and onBottomReached props. The functions are called when the user scrolls to the top or bottom of the scroll area.
  • Accordion.Panel component now supports onTransitionEnd prop that is called when the panel animation completes.

v7.11.2

Compare Source

What's Changed
  • [@mantine/core] Combobox: Fix inconsistent horizontal dropdown padding
  • [@mantine/core] Drawer: Fix content overflowing horizontally on mobile when offset is set
  • [@mantine/core] Drawer: Fix double scrollbar appearing when offset and scrollAreaComponent props are set
  • [@mantine/carousel] Fix responsive slideSize values working differently from other style props
  • [@mantine/hooks] use-interval: Add autoInvoke option support
  • [@mantine/hooks] use-interval: Fix updates to the function and interval timeout being ignored
  • [@mantine/core] Anchor: Fix lineClamp prop not working
  • [@mantine/core] Anchor: Fix text-decoration styles being inconsistent with variant="gradient"
  • [@mantine/dates] DateInput: Fix value flickering with custom timezone (#​6517)
  • [@mantine/core] Burger: Fix lineSize being passed to the DOM node (#​6520)
  • [@mantine/charts] Add support for nested properties in dataKey (#​5886)
  • [@mantine/core] Fix Modal/Drawer headers overlaying custom scrollbar (#​6175)
  • [@mantine/charts] Sparkline: Fix incorrect data prop type (#​6352)
  • [@mantine/charts] Fix strokeColor prop being passed to the DOM element (#​6507)
  • [@mantine/core] FocusTrap: Improve compatibility with React 19 (#​6492)
  • [@mantine/hooks] use-os: Fix iOS being reported as MacOS in several cases (#​6511)
  • [@mantine/emotion] Fix incorrect types of createStyles classes (#​6490)
  • [@mantine/core] Tooltip: Fix floatingStrategy="fixed" not working (#​6502)
New Contributors

Full Changelog: mantinedev/mantine@7.11.1...7.11.2

v7.11.1

Compare Source

What's Changed

  • [@mantine/core] Add option to display nothingFoundMessage when data is empty in Select and MultiSelect components (#​6477)
  • [@mantine/core] Tooltip: Add defaultOpened prop support (#​6466)
  • [@mantine/core] PinInput: Fix incorrect rtl logic (#​6382)
  • [@mantine/core] Popover: Fix floatingStrategy="fixed" not having position:fixed styles (#​6419)
  • [@mantine/spotlight] Fix spotlight not working correctly with shadow DOM (#​6400)
  • [@mantine/form] Fix onValuesChange using stale values (#​6392)
  • [@mantine/carousel] Fix onSlideChange using stale props values (#​6393)
  • [@mantine/charts] Fix unexpected padding on the right side of the chart in BarChart, AreaChart and LineChart components (#​6467)
  • [@mantine/core] Select: Fix onChange being called with the already selected if it has been picked from the dropdown (#​6468)
  • [@mantine/dates] DatePickerInput: Fix highlightToday not working (#​6471)
  • [@mantine/core] NumberInput: Fix incorrect handling of numbers larger than max safe integer on blur (#​6407)
  • [@mantine/core] Tooltip: Fix tooltip arrow being incompatible with headless mode (#​6458)
  • [@mantine/core] ActionIcon: Fix loading styles inconsistency with Button component (#​6460)
  • [@mantine/charts] PieChart: Fix key error for duplicated name data (#​6067)
  • [@mantine/core] Modal: Fix removeScrollProps.ref not being compatible with React 19 (#​6446)
  • [@mantine/core] TagsInput: Fix selectFirstOptionOnChange prop not working (#​6337)
  • [@mantine/hooks] use-eye-dropper: Fix Opera being incorrectly detected as a supported browser (#​6307)
  • [@mantine/core] Fix :host selector now working correctly in cssVariablesSelector of MantineProvider (#​6404)
  • [@mantine/core] TagsInput: Fix onChange being called twice when Enter key is pressed in some cases (#​6416)
  • [@mantine/modals] Fix Modal overrides type augmentation not working with TypeScript 5.5 (#​6443)
  • [@mantine/core] Tree: Fix levelOffset prop being added to the root DOM element (#​6461)

New Contributors

Full Changelog: mantinedev/mantine@7.11.0...7.11.1

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 '@&#8203;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

v7.10.2

Compare Source

What's Changed

  • [@mantine/core] Select: Fix incorrect state changes handling when both value and searchValue are controlled (#​6272)
  • [@mantine/core] Stepper: Fix autoContrast prop being added to the DOM element
  • [@mantine/charts] PieChart: Fix inner label not using formatted value (#​6328)
  • [@mantine/core] Fix incorrect color resolving logic in border style prop resolver (#​6326)
  • [@mantine/modals] Fix incorrect styles of the confirmation modal when it is used without any description (#​6325)
  • [@mantine/core] ScrollArea: Fix click events being triggered when scrollbar drag is released over an interactive element in Firefox (#​6354)
  • [@mantine/core] Combobox: Fix clicks on footer and header triggering dropdown close (#​6344)
  • [@mantine/core] PasswordInput: Fix withErrorStyles prop being passed to the DOM element (#​6348)

New Contributors

Full Changelog: mantinedev/mantine@7.10.1...7.10.2

v7.10.1

Compare Source

What's Changed

  • [@mantine/charts] BarChart: Add waterfall type (#​6231)
  • [@mantine/form] Fix form.setFieldError called inside form.onSubmit not working correctly in some cases (#​6101)
  • [@mantine/core] SegmentedControl: Fix false error reported by React 18.3+ for incorrect key prop usage
  • [@mantine/hooks] use-fetch: Fix incorrect error handling (#​6278)
  • [@mantine/core] Fix bd style prop not being applied in some components (#​6282)
  • [@mantine/core] NumberInput: Fix incorrect leading zeros handling (#​6232)
  • [@mantine/core] NumberInput: Fix incorrect logic while editing decimal values (#​6232)
  • [@mantine/core] ScrollArea: Fix scrollbar flickering on reveal with hover and scroll types (#​6218)
  • [@mantine/hooks] Update use-throttled-* hooks to emit updates on trailing edges (#​6257)
  • [@mantine/core] Input: Add inputSize prop to set size html attribute on the input element

New Contributors

Full Changelog: mantinedev/mantine@7.10.0...7.10.1

v7.10.0: 😎

Compare Source

View changelog with demos on mantine.dev website

Tree component

New Tree component:

import { IconFolder, IconFolderOpen } from '@&#8203;tabler/icons-react';
import { Group, RenderTreeNodePayload, Tree } from '@&#8203;mantine/core';
import { CssIcon, NpmIcon, TypeScriptCircleIcon } from '@&#8203;mantinex/dev-icons';
import { data, dataCode } from './data';
import classes from './Demo.module.css';

interface FileIconProps {
  name: string;
  isFolder: boolean;
  expanded: boolean;
}

function FileIcon({ name, isFolder, expanded }: FileIconProps) {
  if (name.endsWith('package.json')) {
    return <NpmIcon size={14} />;
  }

  if (name.endsWith('.ts') || name.endsWith('.tsx') || name.endsWith('tsconfig.json')) {
    return <TypeScriptCircleIcon size={14} />;
  }

  if (name.endsWith('.css')) {
    return <CssIcon size={14} />;
  }

  if (isFolder) {
    return expanded ? (
      <IconFolderOpen color="var(--mantine-color-yellow-9)" size={14} stroke={2.5} />
    ) : (
      <IconFolder color="var(--mantine-color-yellow-9)" size={14} stroke={2.5} />
    );
  }

  return null;
}

function Leaf({ node, expanded, hasChildren, elementProps }: RenderTreeNodePayload) {
  return (
    <Group gap={5} {...elementProps}>
      <FileIcon name={node.value} isFolder={hasChildren} expanded={expanded} />
      <span>{node.label}</span>
    </Group>
  );
}

function Demo() {
  return (
    <Tree
      classNames={classes}
      selectOnClick
      clearSelectionOnOutsideClick
      data={data}
      renderNode={(payload) => <Leaf {...payload} />}
    />
  );
}

form.getInputNode

New form.getInputNode(path) handler returns input DOM node for the given field path.
Form example, it can be used to focus input on form submit if there is an error:

import { Button, Group, TextInput } from '@&#8203;mantine/core';
import { isEmail, isNotEmpty, useForm } from '@&#8203;mantine/form';

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

    validate: {
      name: isNotEmpty('Name is required'),
      email: isEmail('Invalid email'),
    },
  });

  return (
    <form
      onSubmit={form.onSubmit(
        (values) => console.log(values),
        (errors) => {
          const firstErrorPath = Object.keys(errors)[0];
          form.getInputNode(firstErrorPath)?.focus();
        }
      )}
    >
      <TextInput
        withAsterisk
        label="Your name"
        placeholder="Your name"
        key={form.key('name')}
        {...form.getInputProps('name')}
      />

      <TextInput
        withAsterisk
        label="Your email"
        placeholder="your@email.com"
        key={form.key('email')}
        {...form.getInputProps('email')}
      />

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

Container queries in SimpleGrid

You can now use container queries
in SimpleGrid component. With container queries, grid columns and spacing
will be 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 { SimpleGrid } from '@&#8203;mantine/core';

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%' }}>
      <SimpleGrid
        type="container"
        cols={{ base: 1, '300px': 2, '500px': 5 }}
        spacing={{ base: 10, '300px': 'xl' }}
      >
        <div>1</div>
        <div>2</div>
        <div>3</div>
        <div>4</div>
        <div>5</div>
      </SimpleGrid>
    </div>
  );
}

Checkbox and Radio indicators

New Checkbox.Indicator and Radio.Indicator
components look exactly the same as Checkbox and Radio components, but they do not
have any semantic meaning, they are just visual representations of checkbox and radio states.

Checkbox.Indicator component:

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

function Demo() {
  return (
    <Group>
      <Checkbox.Indicator />
      <Checkbox.Indicator checked />
      <Checkbox.Indicator indeterminate />
      <Checkbox.Indicator disabled />
      <Checkbox.Indicator disabled checked />
      <Checkbox.Indicator disabled indeterminate />
    </Group>
  );
}

Radio.Indicator component:

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

function Demo() {
  return (
    <Group>
      <Radio.Indicator />
      <Radio.Indicator checked />
      <Radio.Indicator disabled />
      <Radio.Indicator disabled checked />
    </Group>
  );
}

Checkbox and Radio cards

New Checkbox.Card and Radio.Card
components can be used as replacements for Checkbox and Radio to build custom cards/buttons/etc.
that work as checkboxes and radios. Components are accessible by default and support the same
keyboard interactions as input[type="checkbox"] and input[type="radio"].

Checkbox.Card component:

import { useState } from 'react';
import { Checkbox, Group, Text } from '@&#8203;mantine/core';
import classes from './Demo.module.css';

function Demo() {
  const [checked, setChecked] = useState(false);

  return (
    <Checkbox.Card
      className={classes.root}
      radius="md"
      checked={checked}
      onClick={() => setChecked((c) => !c)}
    >
      <Group wrap="nowrap" align="flex-start">
        <Checkbox.Indicator />
        <div>
          <Text className={classes.label}>@&#8203;mantine/core</Text>
          <Text className={classes.description}>
            Core components library: inputs, buttons, overlays, etc.
          </Text>
        </div>
      </Group>
    </Checkbox.Card>
  );
}

Checkbox.Card component with Checkbox.Group:

import { useState } from 'react';
import { Checkbox, Group, Stack, Text } from '@&#8203;mantine/core';
import classes from './Demo.module.css';

const data = [
  {
    name: '@&#8203;mantine/core',
    description: 'Core components library: inputs, buttons, overlays, etc.',
  },
  { name: '@&#8203;mantine/hooks', description: 'Collection of reusable hooks for React applications.' },
  { name: '@&#8203;mantine/notifications', description: 'Notifications system' },
];

function Demo() {
  const [value, setValue] = useState<string[]>([]);

  const cards = data.map((item) => (
    <Checkbox.Card className={classes.root} radius="md" value={item.name} key={item.name}>
      <Group wrap="nowrap" align="flex-start">
        <Checkbox.Indicator />
        <div>
          <Text className={classes.label}>{item.name}</Text>
          <Text className={classes.description}>{item.description}</Text>
        </div>
      </Group>
    </Checkbox.Card>
  ));

  return (
    <>
      <Checkbox.Group
        value={value}
        onChange={setValue}
        label="Pick packages to install"
        description="Choose all packages that you will need in your application"
      >
        <Stack pt="md" gap="xs">
          {cards}
        </Stack>
      </Checkbox.Group>

      <Text fz="xs" mt="md">
        CurrentValue: {value.join(', ') || '–'}
      </Text>
    </>
  );
}

Radio.Card component:

import { useState } from 'react';
import { Group, Radio, Text } from '@&#8203;mantine/core';
import classes from './Demo.module.css';

function Demo() {
  const [checked, setChecked] = useState(false);

  return (
    <Radio.Card
      className={classes.root}
      radius="md"
      checked={checked}
      onClick={() => setChecked((c) => !c)}
    >
      <Group wrap="nowrap" align="flex-start">
        <Radio.Indicator />
        <div>
          <Text className={classes.label}>@&#8203;mantine/core</Text>
          <Text className={classes.description}>
            Core components library: inputs, buttons, overlays, etc.
          </Text>
        </div>
      </Group>
    </Radio.Card>
  );
}

Radio.Card component with Radio.Group:

import { useState } from 'react';
import { Group, Radio, Stack, Text } from '@&#8203;mantine/core';
import classes from './Demo.module.css';

const data = [
  {
    name: '@&#8203;mantine/core',
    description: 'Core components library: inputs, buttons, overlays, etc.',
  },
  { name: '@&#8203;mantine/hooks', description: 'Collection of reusable hooks for React applications.' },
  { name: '@&#8203;mantine/notifications', description: 'Notifications system' },
];

function Demo() {
  const [value, setValue] = useState<string | null>(null);

  const cards = data.map((item) => (
    <Radio.Card className={classes.root} radius="md" value={item.name} key={item.name}>
      <Group wrap="nowrap" align="flex-start">
        <Radio.Indicator />
        <div>
          <Text className={classes.label}>{item.name}</Text>
          <Text className={classes.description}>{item.description}</Text>
        </div>
      </Group>
    </Radio.Card>
  ));

  return (
    <>
      <Radio.Group
        value={value}
        onChange={setValue}
        label="Pick one package to install"
        description="Choose a package that you will need in your application"
      >
        <Stack pt="md" gap="xs">
          {cards}
        </Stack>
      </Radio.Group>

      <Text fz="xs" mt="md">
        CurrentValue: {value || '–'}
      </Text>
    </>
  );
}

bd style prop

New bd style prop can be used to set border CSS property.
It is available in all components that support style props.

Border width value is automatically converted to rem. For border color you can reference
theme colors similar to other style props:

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

function Demo() {
  return <Box bd="1px solid red.5" />;
}

v7.9.2

Compare Source

What's Changed

  • [@mantine/dates] DateTimePicker: Fix some of timeInputProps not being respected (#​6204)
  • [@mantine/core] NavLink: Add react-router support to display active route (#​6180)
  • [@mantine/core] Fix nonce attribute not being set on <style /> tag generated in color scheme switching script
  • [@mantine/core] Input: Fix incorrect margins when input wrapper order is explicitly set
  • [@mantine/core] Pagination: Fix types definition being incompatible with @​tabler/icons-react 3.x
  • [@mantine/charts] Fix incorrect tooltip position in LineChart, AreaChart and BarChart with vertical orientation
  • [@mantine/core] Rating: Fix readOnly prop now working on touch devices (#​6202)
  • [@mantine/core] TagsInput: Fix existing search value being ignored in onPaste even handler (#​6073)
  • [@mantine/core] TagsInput: Improve clearable prop logic related to dropdown (#​6115)

New Contributors

Full Changelog: mantinedev/mantine@7.9.1...7.9.2

v7.9.1

Compare Source

What's Changed

  • [@mantine/core] Fix theme.scale being ignored in Input, Paper and Table border styles
  • [@mantine/core] Fix virtualColor function requring use client in Next.js
  • [@mantine/core] FloatingIndicator: Fix incorrect resize observer logic (#​6129)
  • [@mantine/core] NumberInput: Fix incorrect allowNegative handling with up/down arrows (#​6170)
  • [@mantine/core] Fix error={true} prop set on Checkbox, Radio and Switch rendering unxpected error element with margin
  • [@mantine/core] SegmentedControl: Fix theme.primaryColor not being respected in the focus ring styles
  • [@mantine/core] CloseButton: Fix incorrect specificity of some selectors
  • [@mantine/core] Fix incorrect aria-label handling in Select, Autocomplete, MultiSelect and TagsInputs components (#​6123)
  • [@mantine/core] Modal: Prevent onClose from being called when modal is not opened (#​6156)
  • [@mantine/core] PasswordInput: Fix duplicated password visibility icon in Edge browser (#​6126)
  • [@mantine/hooks] use-hash: Fix hash value not being updated correctly (#​6145)
  • [@mantine/emotion] Fix incorrect transform logic that was causing extra hooks to render (#​6159)

New Contributors


Configuration

📅 Schedule: Branch creation - "before 4am on Monday,before 4am on Thursday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, 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.

@renovate renovate bot requested a review from JoeKarow as a code owner September 9, 2024 15:21
@renovate renovate bot added automerge Enable Kodiak auto-merge dependencies Change in project dependencies. labels Sep 9, 2024
Copy link

vercel bot commented Sep 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
transmascfutures ❌ Failed (Inspect) Sep 19, 2024 9:53pm

@kodiakhq kodiakhq bot removed the automerge Enable Kodiak auto-merge label Sep 9, 2024
Copy link
Contributor

kodiakhq bot commented Sep 9, 2024

This PR currently has a merge conflict. Please resolve this and then re-add the automerge label.

Copy link

coderabbitai bot commented Sep 9, 2024

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    -- I pushed a fix in commit <commit_id>, please review it.
    -- Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    -- @coderabbitai generate unit testing code for this file.
    -- @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    -- @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    -- @coderabbitai read src/utils.ts and generate unit testing code.
    -- @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    -- @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary or <!-- #coderabbitai summary --> to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

relativeci bot commented Sep 9, 2024

#392 Bundle Size — 18.65MiB (-0.46%).

9c0be73(current) vs 1658a8c dev#388(baseline)

Warning

Bundle introduced one new package: embla-carousel-reactive-utils – View changed packages

Bundle metrics  Change 8 changes Regression 1 regression Improvement 2 improvements
                 Current
#392
     Baseline
#388
Improvement  Initial JS 917.57KiB(-8.76%) 1005.61KiB
No change  Initial CSS 6.61KiB 6.61KiB
Change  Cache Invalidation 2.34% 0.01%
Change  Chunks 22(+10%) 20
Change  Assets 82(+2.5%) 80
Change  Modules 856(+8.08%) 792
Regression  Duplicate Modules 108(+4.85%) 103
Change  Duplicate Code 5.2%(-8.13%) 5.66%
Improvement  Packages 57(-29.63%) 81
No change  Duplicate Packages 0 0
Bundle size by type  Change 2 changes Regression 1 regression Improvement 1 improvement
                 Current
#392
     Baseline
#388
No change  IMG 17.47MiB 17.47MiB
Improvement  JS 1011.8KiB (-7.99%) 1.07MiB
No change  Fonts 189.64KiB 189.64KiB
No change  CSS 6.61KiB 6.61KiB
Regression  Other 4.17KiB (+2.38%) 4.07KiB

Bundle analysis reportBranch renovate/major-mantine-and-relat...Project dashboard


Generated by RelativeCIDocumentationReport issue

@renovate renovate bot force-pushed the renovate/major-mantine-and-related branch from b25aabf to f4d8039 Compare September 10, 2024 14:09
@renovate renovate bot force-pushed the renovate/major-mantine-and-related branch from f4d8039 to 2ae80a3 Compare September 10, 2024 14:13
@renovate renovate bot force-pushed the renovate/major-mantine-and-related branch from 2ae80a3 to 52ce404 Compare September 10, 2024 19:14
@renovate renovate bot force-pushed the renovate/major-mantine-and-related branch from 52ce404 to 681a73d Compare September 12, 2024 16:12
@renovate renovate bot force-pushed the renovate/major-mantine-and-related branch from 681a73d to 8926632 Compare September 13, 2024 09:26
@renovate renovate bot force-pushed the renovate/major-mantine-and-related branch from 8926632 to ca2624a Compare September 13, 2024 16:08
@renovate renovate bot force-pushed the renovate/major-mantine-and-related branch from ca2624a to 483cc31 Compare September 15, 2024 13:15
@renovate renovate bot force-pushed the renovate/major-mantine-and-related branch from 483cc31 to 488cf58 Compare September 18, 2024 17:34
@renovate renovate bot force-pushed the renovate/major-mantine-and-related branch from 488cf58 to 13e1336 Compare September 19, 2024 18:04
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@renovate renovate bot force-pushed the renovate/major-mantine-and-related branch from 6ef0b40 to 9c0be73 Compare September 19, 2024 21:52
Copy link

sonarcloud bot commented Sep 19, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Change in project dependencies.
Development

Successfully merging this pull request may close these issues.

0 participants