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

[Snyk] Upgrade @mantine/hooks from 5.9.2 to 7.11.1 #4

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

Conversation

OKEAMAH
Copy link
Owner

@OKEAMAH OKEAMAH commented Aug 2, 2024

snyk-top-banner

Snyk has created this PR to upgrade @mantine/hooks from 5.9.2 to 7.11.1.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


⚠️ Warning: This PR contains major version upgrade(s), and may be a breaking change.

  • The recommended version is 121 versions ahead of your current version.

  • The recommended version was released on a month ago.

Release notes
Package name: @mantine/hooks
  • 7.11.1 - 2024-07-02

    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: 7.11.0...7.11.1

  • 7.11.0 - 2024-06-26

    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:

    https://mantine.dev&quot;&gt;Mantine website</LinkButton>

      {/* Component props override default props defined in `withProps` */}
      &lt;PhoneInput placeholder=&quot;Personal phone&quot; /&gt;
    &lt;/&gt;
    

    );
    }">

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

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

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

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

      <span class="pl-kos">{</span><span class="pl-c">/* Component props override default props defined in `withProps` */</span><span class="pl-kos">}</span>
      <span class="pl-c1">&lt;</span><span class="pl-smi">PhoneInput</span> <span class="pl-c1">placeholder</span><span class="pl-c1">=</span><span class="pl-s">"Personal phone"</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span>
    <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-c1">&gt;</span>
    

    );
    }

    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 '@ 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 '@ 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 '@ 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 '@ 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) => <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">value</span><span class="pl-kos">}</span></span>°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 '@ 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 '@ 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 '@ 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 '@ 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>

      <span class="pl-c1">&lt;</span><span class="pl-smi">Transition</span> <span class="pl-c1">mounted</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">opened</span><span class="pl-kos">}</span> <span class="pl-c1">transition</span><span class="pl-c1">=</span><span class="pl-s">"pop"</span> <span class="pl-c1">enterDelay</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-c1">500</span><span class="pl-kos">}</span> <span class="pl-c1">exitDelay</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-c1">300</span><span class="pl-kos">}</span><span class="pl-c1">&gt;</span>
        <span class="pl-kos">{</span><span class="pl-kos">(</span><span class="pl-s1">transitionStyle</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">(</span>
          <span class="pl-c1">&lt;</span><span class="pl-smi">Paper</span>
            <span class="pl-c1">shadow</span><span class="pl-c1">=</span><span class="pl-s">"md"</span>
            <span class="pl-c1">p</span><span class="pl-c1">=</span><span class="pl-s">"xl"</span>
            <span class="pl-c1">h</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-c1">120</span><span class="pl-kos">}</span>
            <span class="pl-c1">pos</span><span class="pl-c1">=</span><span class="pl-s">"absolute"</span>
            <span class="pl-c1">inset</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-c1">0</span><span class="pl-kos">}</span>
            <span class="pl-c1">bottom</span><span class="pl-c1">=</span><span class="pl-s">"auto"</span>
            <span class="pl-c1">onClick</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-en">setOpened</span><span class="pl-kos">(</span><span class="pl-c1">false</span><span class="pl-kos">)</span><span class="pl-kos">}</span>
            <span class="pl-c1">style</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-kos">{</span> ...<span class="pl-s1">transitionStyle</span><span class="pl-kos">,</span> <span class="pl-c1">zIndex</span>: <span class="pl-c1">1</span> <span class="pl-kos">}</span><span class="pl-kos">}</span>
          <span class="pl-c1">&gt;</span>
            Click to close
          <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-smi">Paper</span><span class="pl-c1">&gt;</span>
        <span class="pl-kos">)</span><span class="pl-kos">}</span>
      <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-smi">Transition</span><span class="pl-c1">&gt;</span>
    <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-smi">Flex</span><span class="pl-c1">&gt;</span>
    

    );
    }

    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
  • 7.10.2 - 2024-06-13

    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: 7.10.1...7.10.2

  • 7.10.1 - 2024-05-30

    What's Changed

    • [@ man...

Snyk has created this PR to upgrade @mantine/hooks from 5.9.2 to 7.11.1.

See this package in npm:
@mantine/hooks

See this project in Snyk:
https://app.snyk.io/org/okeamah/project/e830ca9d-7c9e-41d4-8a63-625c03ffe2b9?utm_source=github&utm_medium=referral&page=upgrade-pr
Copy link

changeset-bot bot commented Aug 2, 2024

⚠️ No Changeset found

Latest commit: 069efc4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have skipped reviewing this pull request. Here's why:

  • It seems to have been created by a bot ('[Snyk]' found in title). We assume it knows what it's doing!
  • We don't review packaging changes - Let us know if you'd like us to change this.

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.

2 participants