62 Commits

Author SHA1 Message Date
801324e17e Update dependencies and setup renovate 2025-10-09 22:47:44 +03:00
dba951aee5 Fix broke storybook 2025-10-09 22:43:51 +03:00
ec459e32a1 Update @mantine/* dependencies to 8.3.4 2025-10-09 21:58:09 +03:00
e41a6d974b Update @mantine/* dependencies to 8.3.3 2025-10-02 22:17:33 +03:00
7a9918204c Update dependencies to the latest version 2025-10-01 15:27:25 +03:00
c6079c7741 Update @mantine/* dependencies to 8.3.2 2025-09-23 20:50:17 +03:00
596bfa3093 Update yarn to 4.10.3 2025-09-23 19:28:53 +03:00
8926c997b9 Update yarn to 4.10.2 2025-09-18 21:44:51 +03:00
f3ab9bddb7 Update next lint command 2025-09-12 11:18:49 +03:00
929c09edd7 Update dependencies to the latest version 2025-09-12 11:02:10 +03:00
f5d9bc78ac Update @mantine/* dependencies to 8.3.1 2025-09-12 09:27:55 +03:00
0c327e8247 Update @mantine/* dependencies to 8.3.0 2025-09-08 16:49:49 +03:00
18effba097 Update yarn to 4.9.4 2025-09-03 17:34:00 +03:00
316114717a Update @mantine/* dependencies to 8.2.8 2025-09-01 18:14:30 +03:00
835f4a9561 Update yarn to 4.9.3 2025-08-20 21:14:42 +03:00
fac653befc Update @mantine/* dependencies to 8.2.5 2025-08-16 21:28:14 +03:00
4298ec1a11 Update @mantine/* dependencies to 8.2.4 2025-08-07 12:37:03 +03:00
62f53ffef9 Update @mantine/* dependencies to 8.2.3 2025-08-05 13:05:21 +03:00
00b9d6b643 Update @mantine/* dependencies to 8.2.2 2025-07-31 18:10:35 +03:00
9738dd865c Update @mantine/* dependencies to 8.2.1 2025-07-21 16:33:43 +03:00
40f6fc48b9 Update node to v24.3.0 2025-07-01 10:22:24 +04:00
0240e79c88 Update @mantine/* dependencies to 8.1.2 2025-06-25 23:00:12 +04:00
3c786b5a33 Add stories sorting 2025-06-25 13:03:10 +04:00
a1af77b733 Add test env to provider 2025-06-16 13:32:48 +04:00
e4d565fca8 Update yarn to 4.9.2 2025-06-14 09:39:55 +04:00
d8fddcc1d7 Update dependencies 2025-06-14 09:38:33 +04:00
7ac48ade90 Update @mantine/* dependencies to 8.1.0 2025-06-09 21:23:23 +04:00
6e789e167a Update @mantine/* dependencies to 8.0.2 2025-05-29 21:22:19 +04:00
25c19542ab Update @mantine/* dependencies to 8.0.1 2025-05-14 18:45:31 +04:00
07643beb99 Update @mantine/* dependencies to 8.0.0 2025-05-05 15:13:21 +04:00
e6e18446cb Update @mantine/* dependencies to 7.17.7 2025-05-02 13:14:57 +04:00
6c223a0d10 Update to react 19.1 2025-04-25 15:54:55 +04:00
299c4e6215 Update yarn to 4.9.1 2025-04-25 15:40:01 +04:00
2c6d23846e Update @mantine/* dependencies to 7.17.5 2025-04-24 12:51:11 +04:00
6b07d1e156 Update @mantine/* dependencies to 7.17.4 2025-04-08 19:59:45 +04:00
d425e334e9 Update yarn to 4.8.1 2025-04-08 19:38:26 +04:00
8ace050a57 Turn off no-console eslint rule in storybook files 2025-03-22 18:41:33 +04:00
30ca5b66a2 Update dependencies to the latest version 2025-03-22 18:41:05 +04:00
f97a7f308c Update @mantine/* dependencies to 7.17.2 2025-03-14 12:34:34 +04:00
a01844c8c7 Update yarn to 4.7.0 2025-03-04 13:45:12 +04:00
0b3fc460e0 Update @mantine/* dependencies to 7.17.1 2025-03-01 13:14:37 +04:00
8d2a692c36 Update @mantine/* dependencies to 7.17.0 2025-02-17 20:44:13 +04:00
48952147df Update @mantine/* dependencies to 7.16.3 2025-02-08 15:14:57 +04:00
33de4133b7 Update @mantine/* dependencies to 7.16.2 2025-01-27 14:36:06 +04:00
476585ba0b Update @mantine/* dependencies to 7.16.1 2025-01-19 13:56:12 +04:00
756bfd1099 Update dependencies to the latest version 2025-01-18 17:17:43 +04:00
3c52527454 Update @mantine/* dependencies to 7.16.0 2025-01-14 15:40:59 +04:00
2bf3d76329 Update yarn to 4.6.0 2025-01-07 10:14:15 +04:00
2d0e9095e9 Update @mantine/* dependencies to 7.15.3 2025-01-07 10:13:13 +04:00
9008798728 Update @mantine/* dependencies to 7.15.2 2024-12-24 12:29:54 +04:00
d0d24039ae Update @mantine/* dependencies to 7.15.1 2024-12-12 13:55:32 +04:00
da65f3102c Add mantineHtmlProps 2024-12-10 14:15:53 +04:00
9dc776f1b2 Update @mantine/* dependencies to 7.15.0 2024-12-10 14:13:46 +04:00
31af2255dd Update @mantine/* dependencies to 7.14.3 2024-11-28 16:08:26 +04:00
59f438dcf7 Update yarn to 4.5.3 2024-11-26 19:38:01 +04:00
1daa7ca3a6 Update @mantine/* dependencies to 7.14.2 2024-11-24 14:28:12 +04:00
7d6ca574f8 Update yarn to 4.5.2 2024-11-24 14:27:05 +04:00
fe27d99406 Update Node to 22 2024-11-20 13:01:09 +04:00
a8187cb00e Migrate to ESLint 9 2024-11-16 21:19:32 +04:00
0cd7976efd Update @mantine/* dependencies to 7.14.1 2024-11-16 21:10:17 +04:00
b6feb6730e Update @mantine/* dependencies to 7.14.0 2024-11-15 06:34:56 +04:00
5948b21a22 Update @mantine/* dependencies to 7.13.5 2024-11-08 14:31:44 +04:00
21 changed files with 5780 additions and 7538 deletions

View File

@ -1,3 +0,0 @@
*.cjs
*.mjs
*.js

View File

@ -1,17 +0,0 @@
module.exports = {
extends: ['mantine', 'plugin:@next/next/recommended', 'plugin:jest/recommended'],
plugins: ['testing-library', 'jest'],
overrides: [
{
files: ['**/?(*.)+(spec|test).[jt]s?(x)'],
extends: ['plugin:testing-library/react'],
},
],
parserOptions: {
project: './tsconfig.json',
},
rules: {
'react/react-in-jsx-scope': 'off',
'import/extensions': 'off',
},
};

2
.nvmrc
View File

@ -1 +1 @@
v20.9.0 v24.3.0

View File

@ -7,7 +7,7 @@ const config: StorybookConfig = {
enableCrashReports: false, enableCrashReports: false,
}, },
stories: ['../components/**/*.(stories|story).@(js|jsx|ts|tsx)'], stories: ['../components/**/*.(stories|story).@(js|jsx|ts|tsx)'],
addons: ['storybook-dark-mode'], addons: ['@storybook/addon-themes'],
framework: { framework: {
name: '@storybook/nextjs', name: '@storybook/nextjs',
options: {}, options: {},

View File

@ -1,33 +1,41 @@
import '@mantine/core/styles.css'; import '@mantine/core/styles.css';
import React, { useEffect } from 'react'; import { ColorSchemeScript, MantineProvider } from '@mantine/core';
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'; import { theme } from '../theme';
export const parameters = { export const parameters = {
layout: 'fullscreen', layout: 'fullscreen',
options: { options: {
showPanel: false, showPanel: false,
// @ts-expect-error storybook throws build error for (a: any, b: any)
storySort: (a, b) => a.title.localeCompare(b.title, undefined, { numeric: true }),
},
backgrounds: { disable: true },
};
export const globalTypes = {
theme: {
name: 'Theme',
description: 'Mantine color scheme',
defaultValue: 'light',
toolbar: {
icon: 'mirror',
items: [
{ value: 'light', title: 'Light' },
{ value: 'dark', title: 'Dark' },
],
},
}, },
}; };
const channel = addons.getChannel();
function ColorSchemeWrapper({ children }: { children: React.ReactNode }) {
const { setColorScheme } = useMantineColorScheme();
const handleColorScheme = (value: boolean) => setColorScheme(value ? 'dark' : 'light');
useEffect(() => {
channel.on(DARK_MODE_EVENT_NAME, handleColorScheme);
return () => channel.off(DARK_MODE_EVENT_NAME, handleColorScheme);
}, [channel]);
return <>{children}</>;
}
export const decorators = [ export const decorators = [
(renderStory: any) => <ColorSchemeWrapper>{renderStory()}</ColorSchemeWrapper>, (renderStory: any, context: any) => {
(renderStory: any) => <MantineProvider theme={theme}>{renderStory()}</MantineProvider>, const scheme = (context.globals.theme || 'light') as 'light' | 'dark';
return (
<MantineProvider theme={theme} forceColorScheme={scheme}>
<ColorSchemeScript />
{renderStory()}
</MantineProvider>
);
},
]; ];

942
.yarn/releases/yarn-4.10.3.cjs vendored Executable file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

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

View File

@ -1,64 +0,0 @@
@use 'sass:math';
// Define variables for your breakpoints,
// values must be the same as in your theme
$mantine-breakpoint-xs: '36em';
$mantine-breakpoint-sm: '48em';
$mantine-breakpoint-md: '62em';
$mantine-breakpoint-lg: '75em';
$mantine-breakpoint-xl: '88em';
@function rem($value) {
@return #{math.div(math.div($value, $value * 0 + 1), 16)}rem;
}
@mixin light {
[data-mantine-color-scheme='light'] & {
@content;
}
}
@mixin dark {
[data-mantine-color-scheme='dark'] & {
@content;
}
}
@mixin hover {
@media (hover: hover) {
&:hover {
@content;
}
}
@media (hover: none) {
&:active {
@content;
}
}
}
@mixin smaller-than($breakpoint) {
@media (max-width: $breakpoint) {
@content;
}
}
@mixin larger-than($breakpoint) {
@media (min-width: $breakpoint) {
@content;
}
}
// Add direction mixins if you need rtl support
@mixin rtl {
[dir='rtl'] & {
@content;
}
}
@mixin ltr {
[dir='ltr'] & {
@content;
}
}

View File

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

View File

@ -0,0 +1,10 @@
.title {
color: light-dark(var(--mantine-color-black), var(--mantine-color-white));
font-size: rem(100px);
font-weight: 900;
letter-spacing: rem(-2px);
@media (max-width: $mantine-breakpoint-md) {
font-size: rem(50px);
}
}

View File

@ -1,10 +0,0 @@
.title {
color: light-dark(var(--mantine-color-black), var(--mantine-color-white));
font-size: mantine.rem(100px);
font-weight: 900;
letter-spacing: mantine.rem(-2px);
@media (max-width: mantine.$mantine-breakpoint-md) {
font-size: mantine.rem(50px);
}
}

View File

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

22
eslint.config.mjs Normal file
View File

@ -0,0 +1,22 @@
import mantine from 'eslint-config-mantine';
import { defineConfig } from 'eslint/config';
import tseslint from 'typescript-eslint';
// @ts-check
export default defineConfig(
tseslint.configs.recommended,
...mantine,
{ ignores: ['**/*.{mjs,cjs,js,d.ts,d.mts}', '.next'] },
{
files: ['**/*.story.tsx'],
rules: { 'no-console': 'off' },
},
{
languageOptions: {
parserOptions: {
tsconfigRootDir: process.cwd(),
project: ['./tsconfig.json'],
},
},
}
);

3
next-env.d.ts vendored
View File

@ -1,5 +1,6 @@
/// <reference types="next" /> /// <reference types="next" />
/// <reference types="next/image-types/global" /> /// <reference types="next/image-types/global" />
/// <reference path="./.next/types/routes.d.ts" />
// NOTE: This file should not be edited // NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information. // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

View File

@ -1,4 +1,3 @@
import path from 'path';
import bundleAnalyzer from '@next/bundle-analyzer'; import bundleAnalyzer from '@next/bundle-analyzer';
const withBundleAnalyzer = bundleAnalyzer({ const withBundleAnalyzer = bundleAnalyzer({
@ -13,9 +12,4 @@ export default withBundleAnalyzer({
experimental: { experimental: {
optimizePackageImports: ['@mantine/core', '@mantine/hooks'], optimizePackageImports: ['@mantine/core', '@mantine/hooks'],
}, },
sassOptions: {
implementation: 'sass-embedded',
additionalData: `@use "${path.join(process.cwd(), '_mantine')}" as mantine;`,
},
}); });

View File

@ -8,8 +8,9 @@
"analyze": "ANALYZE=true next build", "analyze": "ANALYZE=true next build",
"start": "next start", "start": "next start",
"typecheck": "tsc --noEmit", "typecheck": "tsc --noEmit",
"lint": "next lint && npm run lint:stylelint", "lint": "npm run eslint && npm run stylelint",
"lint:stylelint": "stylelint '**/*.css' --cache", "eslint": "eslint .",
"stylelint": "stylelint '**/*.css' --cache",
"jest": "jest", "jest": "jest",
"jest:watch": "jest --watch", "jest:watch": "jest --watch",
"prettier:check": "prettier --check \"**/*.{ts,tsx}\"", "prettier:check": "prettier --check \"**/*.{ts,tsx}\"",
@ -19,53 +20,48 @@
"storybook:build": "storybook build" "storybook:build": "storybook build"
}, },
"dependencies": { "dependencies": {
"@mantine/core": "7.13.4", "@mantine/core": "8.3.4",
"@mantine/hooks": "7.13.4", "@mantine/hooks": "8.3.4",
"@next/bundle-analyzer": "^14.2.4", "@next/bundle-analyzer": "^15.5.4",
"@tabler/icons-react": "^3.6.0", "@tabler/icons-react": "^3.35.0",
"next": "15.0.1", "next": "15.5.4",
"react": "18.3.1", "react": "19.2.0",
"react-dom": "18.3.1" "react-dom": "19.2.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.24.7", "@babel/core": "^7.28.4",
"@ianvs/prettier-plugin-sort-imports": "^4.3.1", "@eslint/eslintrc": "^3",
"@next/eslint-plugin-next": "^14.2.4", "@eslint/js": "^9.37.0",
"@storybook/nextjs": "^8.1.10", "@ianvs/prettier-plugin-sort-imports": "^4.7.0",
"@storybook/react": "^8.1.10", "@storybook/addon-themes": "^9.1.10",
"@testing-library/dom": "^10.1.0", "@storybook/nextjs": "^9.1.10",
"@testing-library/jest-dom": "^6.4.6", "@storybook/react": "^9.1.10",
"@testing-library/react": "^16.0.0", "@testing-library/dom": "^10.4.1",
"@testing-library/user-event": "^14.5.2", "@testing-library/jest-dom": "^6.9.1",
"@types/jest": "^29.5.12", "@testing-library/react": "^16.3.0",
"@types/node": "^20.14.8", "@testing-library/user-event": "^14.6.1",
"@types/react": "18.3.3", "@types/eslint-plugin-jsx-a11y": "^6",
"@typescript-eslint/eslint-plugin": "^7.13.1", "@types/jest": "^30.0.0",
"@typescript-eslint/parser": "^7.13.1", "@types/node": "^24.7.1",
"babel-loader": "^9.1.3", "@types/react": "19.2.2",
"eslint": "^8.57.0", "babel-loader": "^10.0.0",
"eslint-config-airbnb": "19.0.4", "eslint": "^9.37.0",
"eslint-config-airbnb-typescript": "^18.0.0", "eslint-config-mantine": "^4.0.3",
"eslint-config-mantine": "3.2.0", "eslint-config-next": "15.5.4",
"eslint-plugin-import": "^2.29.1", "eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-jest": "^28.6.0", "eslint-plugin-react": "^7.37.5",
"eslint-plugin-jsx-a11y": "^6.9.0", "jest": "^30.2.0",
"eslint-plugin-react": "^7.34.3", "jest-environment-jsdom": "^30.2.0",
"eslint-plugin-react-hooks": "^4.6.2", "postcss": "^8.5.6",
"eslint-plugin-testing-library": "^6.2.2", "postcss-preset-mantine": "1.18.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"postcss": "^8.4.38",
"postcss-preset-mantine": "1.17.0",
"postcss-simple-vars": "^7.0.1", "postcss-simple-vars": "^7.0.1",
"prettier": "^3.3.2", "prettier": "^3.6.2",
"sass-embedded": "^1.80.6", "storybook": "^9.1.10",
"storybook": "^8.1.10", "stylelint": "^16.25.0",
"storybook-dark-mode": "^4.0.2", "stylelint-config-standard-scss": "^16.0.0",
"stylelint": "^16.6.1", "ts-jest": "^29.4.4",
"stylelint-config-standard-scss": "^13.1.0", "typescript": "5.9.3",
"ts-jest": "^29.1.5", "typescript-eslint": "^8.46.0"
"typescript": "5.5.2"
}, },
"packageManager": "yarn@4.5.1" "packageManager": "yarn@4.10.3"
} }

13
renovate.json Normal file
View File

@ -0,0 +1,13 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"schedule": ["before 5am on sunday"],
"groupName": "all dependencies",
"packageRules": [
{
"matchPackagePatterns": ["*"],
"groupName": "all dependencies"
}
],
"prHourlyLimit": 0,
"prConcurrentLimit": 0
}

View File

@ -5,7 +5,9 @@ import { theme } from '../theme';
export function render(ui: React.ReactNode) { export function render(ui: React.ReactNode) {
return testingLibraryRender(<>{ui}</>, { return testingLibraryRender(<>{ui}</>, {
wrapper: ({ children }: { children: React.ReactNode }) => ( wrapper: ({ children }: { children: React.ReactNode }) => (
<MantineProvider theme={theme}>{children}</MantineProvider> <MantineProvider theme={theme} env="test">
{children}
</MantineProvider>
), ),
}); });
} }

View File

@ -1,8 +1,16 @@
{ {
"compilerOptions": { "compilerOptions": {
"types": ["node", "jest", "@testing-library/jest-dom"], "types": [
"node",
"jest",
"@testing-library/jest-dom"
],
"target": "es5", "target": "es5",
"lib": ["dom", "dom.iterable", "esnext"], "lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true, "allowJs": true,
"skipLibCheck": true, "skipLibCheck": true,
"strict": true, "strict": true,
@ -16,10 +24,25 @@
"jsx": "preserve", "jsx": "preserve",
"incremental": true, "incremental": true,
"paths": { "paths": {
"@/*": ["./*"] "@/*": [
"./*"
]
}, },
"plugins": [{ "name": "next" }] "plugins": [
}, {
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], "name": "next"
"exclude": ["node_modules"] }
]
},
"include": [
"**/*.ts",
"**/*.tsx",
".storybook/main.ts",
".storybook/preview.tsx",
"next-env.d.ts",
".next/types/**/*.ts"
],
"exclude": [
"node_modules"
]
} }

11105
yarn.lock

File diff suppressed because it is too large Load Diff