10 Commits

12 changed files with 853 additions and 803 deletions

View File

@ -1 +0,0 @@
module.exports = require('eslint-config-mantine/.prettierrc.js');

35
.prettierrc.mjs Normal file
View File

@ -0,0 +1,35 @@
/** @type {import("@ianvs/prettier-plugin-sort-imports").PrettierConfig} */
const config = {
printWidth: 100,
singleQuote: true,
trailingComma: 'es5',
plugins: ['@ianvs/prettier-plugin-sort-imports'],
importOrder: [
'.*styles.css$',
'',
'dayjs',
'^react$',
'^next$',
'^next/.*$',
'<BUILTIN_MODULES>',
'<THIRD_PARTY_MODULES>',
'^@mantine/(.*)$',
'^@mantinex/(.*)$',
'^@mantine-tests/(.*)$',
'^@docs/(.*)$',
'^@/.*$',
'^../(?!.*.css$).*$',
'^./(?!.*.css$).*$',
'\\.css$',
],
overrides: [
{
files: '*.mdx',
options: {
printWidth: 70,
},
},
],
};
export default config;

View File

@ -1,16 +1,16 @@
import type { StorybookConfig } from '@storybook/nextjs';
const config: StorybookConfig = {
core: {
disableWhatsNewNotifications: true,
disableTelemetry: true,
enableCrashReports: false,
},
stories: ['../components/**/*.(stories|story).@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-essentials',
'storybook-dark-mode',
'@storybook/addon-styling-webpack',
],
addons: ['storybook-dark-mode'],
framework: {
name: '@storybook/nextjs',
options: {},
},
};
export default config;

View File

@ -1,10 +1,18 @@
import '@mantine/core/styles.css';
import React, { useEffect } from 'react';
import { addons } from '@storybook/preview-api';
import { DARK_MODE_EVENT_NAME } from 'storybook-dark-mode';
import { MantineProvider, useMantineColorScheme } from '@mantine/core';
import { theme } from '../theme';
export const parameters = {
layout: 'fullscreen',
options: {
showPanel: false,
},
};
const channel = addons.getChannel();
function ColorSchemeWrapper({ children }: { children: React.ReactNode }) {

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,3 @@
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-4.4.0.cjs
yarnPath: .yarn/releases/yarn-4.5.0.cjs

View File

@ -1,6 +1,7 @@
import '@mantine/core/styles.css';
import React from 'react';
import { MantineProvider, ColorSchemeScript } from '@mantine/core';
import { ColorSchemeScript, MantineProvider } from '@mantine/core';
import { theme } from '../theme';
export const metadata = {
@ -10,7 +11,7 @@ export const metadata = {
export default function RootLayout({ children }: { children: any }) {
return (
<html lang="en">
<html lang="en" suppressHydrationWarning>
<head>
<ColorSchemeScript />
<link rel="shortcut icon" href="/favicon.svg" />

View File

@ -1,5 +1,5 @@
import { Welcome } from '../components/Welcome/Welcome';
import { ColorSchemeToggle } from '../components/ColorSchemeToggle/ColorSchemeToggle';
import { Welcome } from '../components/Welcome/Welcome';
export default function HomePage() {
return (

View File

@ -1,4 +1,4 @@
import { Title, Text, Anchor } from '@mantine/core';
import { Anchor, Text, Title } from '@mantine/core';
import classes from './Welcome.module.css';
export function Welcome() {

2
next-env.d.ts vendored
View File

@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.

View File

@ -19,20 +19,18 @@
"storybook:build": "storybook build"
},
"dependencies": {
"@mantine/core": "7.12.0",
"@mantine/hooks": "7.12.0",
"@mantine/core": "7.13.3",
"@mantine/hooks": "7.13.3",
"@next/bundle-analyzer": "^14.2.4",
"@tabler/icons-react": "^3.6.0",
"next": "14.2.4",
"next": "15.0.1",
"react": "18.3.1",
"react-dom": "18.3.1"
},
"devDependencies": {
"@babel/core": "^7.24.7",
"@ianvs/prettier-plugin-sort-imports": "^4.3.1",
"@next/eslint-plugin-next": "^14.2.4",
"@storybook/addon-essentials": "^8.1.10",
"@storybook/addon-styling-webpack": "^1.0.0",
"@storybook/blocks": "^8.1.10",
"@storybook/nextjs": "^8.1.10",
"@storybook/react": "^8.1.10",
"@testing-library/dom": "^10.1.0",
@ -68,5 +66,5 @@
"ts-jest": "^29.1.5",
"typescript": "5.5.2"
},
"packageManager": "yarn@4.4.0"
"packageManager": "yarn@4.5.0"
}

1129
yarn.lock

File diff suppressed because it is too large Load Diff