Skip to content

Commit 6bb00f2

Browse files
committed
Merge branch 'master' of github.1485827954.workers.dev-rtivital:mantinedev/mantine into 7.7
2 parents bbfd570 + e3e3bb8 commit 6bb00f2

File tree

54 files changed

+318
-189
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+318
-189
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import React from 'react';
2+
import { ColorSwatch } from '@mantine/core';
3+
4+
const colorVariableRegex = /^(var\(--mantine-color[\w-]+\)|#\w+|rgba?\(\w+\))$/gm;
5+
6+
export interface CssVariableColorSwatchProps {
7+
variable: string;
8+
}
9+
10+
export function CssVariableColorSwatch({ variable }: CssVariableColorSwatchProps) {
11+
if (!variable || !variable.match(colorVariableRegex)) {
12+
return null;
13+
}
14+
15+
return <ColorSwatch size={20} color={variable} />;
16+
}

docs/src/components/CssVariablesList/CssVariablesList.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
import React from 'react';
22
import { Code, DEFAULT_THEME, defaultCssVariablesResolver, keys } from '@mantine/core';
33
import { MdxDataTable, MdxTitle } from '../MdxProvider';
4+
import { CssVariableColorSwatch } from './CssVariableColorSwatch/CssVariableColorSwatch';
45

56
export function CssVariablesList() {
67
const resolvedVariables = defaultCssVariablesResolver(DEFAULT_THEME);
78
const variables = keys(resolvedVariables.variables).map((key) => [
89
<Code style={{ whiteSpace: 'nowrap' }}>{key}</Code>,
910
resolvedVariables.variables[key],
11+
<CssVariableColorSwatch variable={resolvedVariables.variables[key]} />,
1012
]);
1113

1214
const lightVariables = keys(resolvedVariables.light).map((key) => [
1315
<Code style={{ whiteSpace: 'nowrap' }}>{key}</Code>,
1416
resolvedVariables.light[key],
17+
<CssVariableColorSwatch variable={resolvedVariables.light[key]} />,
1518
]);
1619

1720
const darkVariables = keys(resolvedVariables.dark).map((key) => [
1821
<Code style={{ whiteSpace: 'nowrap' }}>{key}</Code>,
1922
resolvedVariables.dark[key],
23+
<CssVariableColorSwatch variable={resolvedVariables.dark[key]} />,
2024
]);
2125

2226
return (

docs/src/pages/hooks/use-resize-observer.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ See also [use-element-size](https://mantine.dev/hooks/use-element-size/) hook in
3131
function useResizeObserver<T extends HTMLElement = any>(
3232
options?: ResizeObserverOptions
3333
): [
34-
MutableRefObject<T>,
34+
RefObject<T>,
3535
{
3636
x: number;
3737
y: number;

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mantine-a91763c0e2",
3-
"version": "7.6.1",
3+
"version": "7.6.2",
44
"description": "Mantine Components Monorepo",
55
"packageManager": "[email protected]",
66
"license": "MIT",
@@ -100,7 +100,7 @@
100100
"react-transition-group": "4.4.5",
101101
"recharts": "^2.10.3",
102102
"shikiji": "^0.7.4",
103-
"type-fest": "^3.13.1"
103+
"type-fest": "^4.12.0"
104104
},
105105
"devDependencies": {
106106
"@babel/core": "^7.23.3",

packages/@docs/demos/src/demos/charts/RadarChart/RadarChart.demo.multiple.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function Demo() {
1111
return (
1212
<RadarChart
1313
h={300}
14-
data={multiData}
14+
data={data}
1515
dataKey="product"
1616
withPolarRadiusAxis
1717
series={[

packages/@docs/demos/src/demos/charts/RadarChart/RadarChart.demo.parts.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ import { multiData, multiDataCode } from './_data';
55

66
const code = `
77
import { RadarChart } from '@mantine/charts';
8+
import { data } from './data';
89
9-
function Wrapper() {
10+
11+
function Demo() {
1012
return (
1113
<RadarChart
1214
h={300}
13-
data={multiData}
15+
data={data}
1416
dataKey="product"
1517
withPolarRadiusAxis
1618
series={[
@@ -23,7 +25,7 @@ function Wrapper() {
2325
}
2426
`;
2527

26-
function Wrapper(props: any) {
28+
function Demo(props: any) {
2729
return (
2830
<RadarChart
2931
h={300}
@@ -41,7 +43,7 @@ function Wrapper(props: any) {
4143

4244
export const parts: MantineDemo = {
4345
type: 'configurator',
44-
component: Wrapper,
46+
component: Demo,
4547
code: [
4648
{ code, language: 'tsx', fileName: 'Demo.tsx' },
4749
{ code: multiDataCode, language: 'tsx', fileName: 'data.ts' },

packages/@docs/demos/src/demos/charts/RadarChart/RadarChart.demo.rechartsProps.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function Demo() {
1111
return (
1212
<RadarChart
1313
h={300}
14-
data={multiData}
14+
data={data}
1515
dataKey="product"
1616
withPolarRadiusAxis
1717
polarRadiusAxisProps={{ angle: 30, tickFormatter: (value) => \`\${value}$\` }}

packages/@docs/demos/src/demos/charts/RadarChart/_data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export const multiData = [
8888
];
8989

9090
export const multiDataCode = `
91-
export const multiData = [
91+
export const data = [
9292
{
9393
product: 'Apples',
9494
sales_january: 120,

packages/@mantine/carousel/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mantine/carousel",
3-
"version": "7.6.1",
3+
"version": "7.6.2",
44
"description": "Embla based carousel",
55
"homepage": "https://mantine.dev/x/carousel/",
66
"license": "MIT",
@@ -44,8 +44,8 @@
4444
"directory": "packages/@mantine/carousel"
4545
},
4646
"peerDependencies": {
47-
"@mantine/core": "7.6.1",
48-
"@mantine/hooks": "7.6.1",
47+
"@mantine/core": "7.6.2",
48+
"@mantine/hooks": "7.6.2",
4949
"embla-carousel-react": ">=7.0.0",
5050
"react": "^18.2.0",
5151
"react-dom": "^18.2.0"

packages/@mantine/charts/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mantine/charts",
3-
"version": "7.6.1",
3+
"version": "7.6.2",
44
"description": "Charts components built with recharts and Mantine",
55
"homepage": "https://mantine.dev/",
66
"license": "MIT",
@@ -35,8 +35,8 @@
3535
"directory": "packages/@mantine/charts"
3636
},
3737
"peerDependencies": {
38-
"@mantine/core": "7.6.1",
39-
"@mantine/hooks": "7.6.1",
38+
"@mantine/core": "7.6.2",
39+
"@mantine/hooks": "7.6.2",
4040
"react": "^18.2.0",
4141
"react-dom": "^18.2.0",
4242
"recharts": "^2.10.3"

0 commit comments

Comments
 (0)