Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mantinedev/mantine
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5.6.3
Choose a base ref
...
head repository: mantinedev/mantine
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5.6.4
Choose a head ref
  • 9 commits
  • 31 files changed
  • 7 contributors

Commits on Oct 27, 2022

  1. [docs] Fix typo (#2822)

    noahsb authored Oct 27, 2022
    Copy the full SHA
    a6ad11b View commit details

Commits on Oct 28, 2022

  1. Copy the full SHA
    9ca897a View commit details

Commits on Oct 31, 2022

  1. Copy the full SHA
    e229dc9 View commit details

Commits on Nov 1, 2022

  1. [docs] Fix typo (#2832)

    Co-authored-by: Denis.Yuhno <[email protected]>
    cheechoo28 and Denis.Yuhno authored Nov 1, 2022
    Copy the full SHA
    4e263c0 View commit details
  2. [docs] Fix typo (#2856)

    Updated the docs from "Incorrect email" to "Incorrect password" to match the code example
    drenther authored Nov 1, 2022
    Copy the full SHA
    168394e View commit details

Commits on Nov 2, 2022

  1. [@mantine/core] Slider: Fix incorrect min/max values handling (#2839)

    * [@mantine/core] Select: only use open/close callback when value changes
    
    * [@mantine/core] Select: do not use early return
    
    * [@mantine/core] Menu - revert PR #2646
    
    * [Mantine/core] Slider: fix min/max values
    
    * [@mantine/core] Slider: remove unneeded story
    
    * [@mantine/core] Slider: revert changes to minmax story
    wes337 authored Nov 2, 2022
    Copy the full SHA
    7623acb View commit details
  2. Copy the full SHA
    af70ca4 View commit details
  3. Copy the full SHA
    d2619a9 View commit details
  4. [release] Version: 5.6.4

    rtivital committed Nov 2, 2022
    Copy the full SHA
    34dd141 View commit details
2 changes: 1 addition & 1 deletion docs/src/docs/core/MultiSelect.mdx
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ function Demo() {
}
```

Note that MultiSelect value should always be an array of either **string** or **null**:
Note that MultiSelect value should always be an array of either **string** or **undefined**:

```tsx
// Incorrect, will have bugs
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"workspaces": [
"src/*"
],
"version": "5.6.3",
"version": "5.6.4",
"description": "Mantine Components Monorepo",
"main": "index.js",
"repository": "https://github.com/mantinedev/mantine.git",
8 changes: 4 additions & 4 deletions src/mantine-carousel/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mantine/carousel",
"description": "Embla based carousel",
"version": "5.6.3",
"version": "5.6.4",
"main": "cjs/index.js",
"module": "esm/index.js",
"types": "lib/index.d.ts",
@@ -22,13 +22,13 @@
"slick"
],
"peerDependencies": {
"@mantine/core": "5.6.3",
"@mantine/hooks": "5.6.3",
"@mantine/core": "5.6.4",
"@mantine/hooks": "5.6.4",
"embla-carousel-react": "^7.0.0",
"react": ">=16.8.0"
},
"dependencies": {
"@mantine/utils": "5.6.3"
"@mantine/utils": "5.6.4"
},
"devDependencies": {}
}
8 changes: 4 additions & 4 deletions src/mantine-core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mantine/core",
"description": "React components library focused on usability, accessibility and developer experience",
"version": "5.6.3",
"version": "5.6.4",
"main": "cjs/index.js",
"module": "esm/index.js",
"types": "lib/index.d.ts",
@@ -27,13 +27,13 @@
"emotion"
],
"peerDependencies": {
"@mantine/hooks": "5.6.3",
"@mantine/hooks": "5.6.4",
"react": ">=16.8.0",
"react-dom": ">=16.8.0"
},
"dependencies": {
"@mantine/utils": "5.6.3",
"@mantine/styles": "5.6.3",
"@mantine/utils": "5.6.4",
"@mantine/styles": "5.6.4",
"@radix-ui/react-scroll-area": "1.0.0",
"react-textarea-autosize": "8.3.4",
"@floating-ui/react-dom-interactions": "^0.10.1"
20 changes: 20 additions & 0 deletions src/mantine-core/src/NavLink/NavLink.story.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react';
import { IconHome2, IconChevronRight } from '@tabler/icons';
import { useCounter } from '@mantine/hooks';
import { Button } from '../Button';
import { NavLink } from './NavLink';

export default { title: 'NavLink' };
@@ -90,3 +92,21 @@ export function WithNestedItems() {
</div>
);
}

export function DynamicNestedItems() {
const [count, { increment, decrement }] = useCounter(2);
const nested = Array(count)
.fill(0)
.map((_, index) => (
<NavLink label="Child link 1" icon={<IconHome2 size={16} stroke={1.5} key={index} />} />
));
return (
<div style={{ padding: 40, maxWidth: 320 }}>
<NavLink label="With nested links" icon={<IconHome2 size={16} stroke={1.5} />}>
{nested}
</NavLink>
<Button onClick={increment}>Add item</Button>
<Button onClick={decrement}>Remove item item</Button>
</div>
);
}
Original file line number Diff line number Diff line change
@@ -19,11 +19,12 @@ export function getChangeValue({
? value
: Math.min(Math.max(value, 0), containerWidth) / containerWidth;
const dx = left * (max - min);
const minIsNegative = min <= 0;
const nextValue =
dx !== 0 ? Math.round(dx / step) * step + (minIsNegative ? min : 0) : Math.min(min, 0);
const nextValueWithPrecision = precision ? Number(nextValue.toFixed(precision)) : nextValue;
const finalValue = Math.min(nextValueWithPrecision, max);
const nextValue = (dx !== 0 ? Math.round(dx / step) * step : 0) + min;
const nextValueWithinStep = Math.max(nextValue - (nextValue % step), min);

return finalValue <= min ? min : finalValue;
if (precision !== undefined) {
return Number(nextValueWithinStep.toFixed(precision));
}

return nextValueWithinStep;
}
8 changes: 4 additions & 4 deletions src/mantine-dates/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mantine/dates",
"description": "Calendars, date and time pickers based on Mantine components",
"version": "5.6.3",
"version": "5.6.4",
"main": "cjs/index.js",
"module": "esm/index.js",
"types": "lib/index.d.ts",
@@ -28,13 +28,13 @@
"picker"
],
"peerDependencies": {
"@mantine/core": "5.6.3",
"@mantine/hooks": "5.6.3",
"@mantine/core": "5.6.4",
"@mantine/hooks": "5.6.4",
"dayjs": ">=1.0.0",
"react": ">=16.8.0"
},
"dependencies": {
"@mantine/utils": "5.6.3"
"@mantine/utils": "5.6.4"
},
"devDependencies": {}
}
30 changes: 15 additions & 15 deletions src/mantine-demos/package.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
"name": "@mantine/demos",
"description": "Demos used in documentation",
"private": true,
"version": "5.6.3",
"version": "5.6.4",
"main": "cjs/index.js",
"module": "esm/index.js",
"types": "lib/index.d.ts",
@@ -18,20 +18,20 @@
"peerDependencies": {
"react": "*",
"@emotion/styled": "*",
"@mantine/core": "5.6.3",
"@mantine/hooks": "5.6.3",
"@mantine/dates": "5.6.3",
"@mantine/form": "5.6.3",
"@mantine/rte": "5.6.3",
"@mantine/modals": "5.6.3",
"@mantine/nprogress": "5.6.3",
"@mantine/notifications": "5.6.3",
"@mantine/dropzone": "5.6.3",
"@mantine/prism": "5.6.3",
"@mantine/labs": "5.6.3",
"@mantine/spotlight": "5.6.3",
"@mantine/carousel": "5.6.3",
"@mantine/ds": "5.6.3",
"@mantine/core": "5.6.4",
"@mantine/hooks": "5.6.4",
"@mantine/dates": "5.6.4",
"@mantine/form": "5.6.4",
"@mantine/rte": "5.6.4",
"@mantine/modals": "5.6.4",
"@mantine/nprogress": "5.6.4",
"@mantine/notifications": "5.6.4",
"@mantine/dropzone": "5.6.4",
"@mantine/prism": "5.6.4",
"@mantine/labs": "5.6.4",
"@mantine/spotlight": "5.6.4",
"@mantine/carousel": "5.6.4",
"@mantine/ds": "5.6.4",
"@tabler/icons": "*",
"react-beautiful-dnd": "*",
"embla-carousel-autoplay": "*",
6 changes: 3 additions & 3 deletions src/mantine-demos/src/demos/core/Grid/Grid.demo.order.tsx
Original file line number Diff line number Diff line change
@@ -9,9 +9,9 @@ import { Grid } from '@mantine/core';
function Demo() {
return (
<Grid>
<Col span={3} order={2} orderSm={1} orderLg={3}>2</Col>
<Col span={3} order={3} orderSm={1} orderLg={2}>3</Col>
<Col span={3} order={1} orderSm={3} orderLg={1}>1</Col>
<Grid.Col span={3} order={2} orderSm={1} orderLg={3}>2</Grid.Col>
<Grid.Col span={3} order={3} orderSm={1} orderLg={2}>3</Grid.Col>
<Grid.Col span={3} order={1} orderSm={3} orderLg={1}>1</Grid.Col>
</Grid>
);
}
2 changes: 1 addition & 1 deletion src/mantine-demos/src/demos/core/Menu/Menu.demo.usage.tsx
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ function Demo() {
<Menu.Divider />
<Menu.Label>Danger zone</Menu.Label>
<Menu.Item icon={<IconArrowsLeftRight size={14} />}>Transfer my data</Menu.Item>,
<Menu.Item icon={<IconArrowsLeftRight size={14} />}>Transfer my data</Menu.Item>
<Menu.Item color="red" icon={<IconTrash size={14} />}>Delete my account</Menu.Item>
</Menu.Dropdown>
</Menu>
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ const code = `
<PasswordInput error />
// Error as React node – red border color and message below input
<PasswordInput error="Invalid email" />
<PasswordInput error="Invalid password" />
`;

function Demo() {
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ import { useRef } from 'react';
import { ScrollArea, Button, Stack, Group } from '@mantine/core';
function Demo() {
const viewport = useRef<HTMLDivElement>();
const viewport = useRef<HTMLDivElement>(null);
const scrollToBottom = () =>
viewport.current.scrollTo({ top: viewport.current.scrollHeight, behavior: 'smooth' });
@@ -41,7 +41,7 @@ function Demo() {
`;

function Demo() {
const viewport = useRef<HTMLDivElement>();
const viewport = useRef<HTMLDivElement>(null);
const scrollToBottom = () =>
viewport.current.scrollTo({ top: viewport.current.scrollHeight, behavior: 'smooth' });
const scrollToCenter = () =>
8 changes: 4 additions & 4 deletions src/mantine-dropzone/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mantine/dropzone",
"description": "Dropzone component built with Mantine theme and components",
"version": "5.6.3",
"version": "5.6.4",
"main": "cjs/index.js",
"module": "esm/index.js",
"types": "lib/index.d.ts",
@@ -28,14 +28,14 @@
"upload"
],
"peerDependencies": {
"@mantine/core": "5.6.3",
"@mantine/hooks": "5.6.3",
"@mantine/core": "5.6.4",
"@mantine/hooks": "5.6.4",
"react": ">=16.8.0",
"react-dom": ">=16.8.0"
},
"dependencies": {
"react-dropzone": "14.2.3",
"@mantine/utils": "5.6.3"
"@mantine/utils": "5.6.4"
},
"devDependencies": {}
}
10 changes: 5 additions & 5 deletions src/mantine-ds/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mantine/ds",
"description": "Internal Mantine components used on *.mantine.dev websites",
"version": "5.6.3",
"version": "5.6.4",
"main": "cjs/index.js",
"module": "esm/index.js",
"types": "lib/index.d.ts",
@@ -18,14 +18,14 @@
"react"
],
"peerDependencies": {
"@mantine/core": "5.6.3",
"@mantine/hooks": "5.6.3",
"@mantine/prism": "5.6.3",
"@mantine/core": "5.6.4",
"@mantine/hooks": "5.6.4",
"@mantine/prism": "5.6.4",
"@tabler/icons": "*",
"react": ">=16.8.0",
"react-dom": ">=16.8.0"
},
"dependencies": {
"@mantine/utils": "5.6.3"
"@mantine/utils": "5.6.4"
}
}
2 changes: 1 addition & 1 deletion src/mantine-form/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mantine/form",
"description": "Mantine form management library",
"version": "5.6.3",
"version": "5.6.4",
"main": "cjs/index.js",
"module": "esm/index.js",
"types": "lib/index.d.ts",
2 changes: 1 addition & 1 deletion src/mantine-hooks/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mantine/hooks",
"version": "5.6.3",
"version": "5.6.4",
"main": "cjs/index.js",
"module": "esm/index.js",
"types": "lib/index.d.ts",
6 changes: 3 additions & 3 deletions src/mantine-labs/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mantine/labs",
"description": "Experimental unstable Mantine components",
"version": "5.6.3",
"version": "5.6.4",
"main": "cjs/index.js",
"module": "esm/index.js",
"types": "lib/index.d.ts",
@@ -15,8 +15,8 @@
"directory": "src/mantine-labs"
},
"peerDependencies": {
"@mantine/core": "5.6.3",
"@mantine/hooks": "5.6.3",
"@mantine/core": "5.6.4",
"@mantine/hooks": "5.6.4",
"react": ">=16.8.0",
"react-dom": ">=16.8.0"
},
8 changes: 4 additions & 4 deletions src/mantine-modals/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mantine/modals",
"description": "Modals manager based on Mantine components",
"version": "5.6.3",
"version": "5.6.4",
"main": "cjs/index.js",
"module": "esm/index.js",
"types": "lib/index.d.ts",
@@ -27,13 +27,13 @@
"confirm"
],
"peerDependencies": {
"@mantine/core": "5.6.3",
"@mantine/hooks": "5.6.3",
"@mantine/core": "5.6.4",
"@mantine/hooks": "5.6.4",
"react": ">=16.8.0",
"react-dom": ">=16.8.0"
},
"dependencies": {
"@mantine/utils": "5.6.3"
"@mantine/utils": "5.6.4"
},
"devDependencies": {}
}
6 changes: 3 additions & 3 deletions src/mantine-next/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mantine/next",
"description": "Mantine integration for Next.js",
"version": "5.6.3",
"version": "5.6.4",
"main": "cjs/index.js",
"module": "esm/index.js",
"types": "lib/index.d.ts",
@@ -25,8 +25,8 @@
"next": "*"
},
"dependencies": {
"@mantine/ssr": "5.6.3",
"@mantine/styles": "5.6.3"
"@mantine/ssr": "5.6.4",
"@mantine/styles": "5.6.4"
},
"devDependencies": {}
}
Loading