Skip to content

Commit c943309

Browse files
authored
Merge pull request #26 from CodeDead/feature/v2
Feature/v2
2 parents 8c60b50 + 1de7413 commit c943309

File tree

346 files changed

+14328
-16580
lines changed

Some content is hidden

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

346 files changed

+14328
-16580
lines changed

.dockerignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
node_modules
2+
build
3+
.yarn/*
4+
.yarnrc.yml
5+
.eslintignore
6+
.eslintcache
7+
.eslintrc.json
8+
.prettierignore
9+
eslint.config.mjs
10+
.idea
11+
.vscode
12+
dist
13+
.github/*
14+
.stylelintcache
15+
out
16+
.next
17+
.cache/*

.eslintignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
- development
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
test_pull_request:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version-file: '.nvmrc'
21+
cache: 'yarn'
22+
cache-dependency-path: '**/yarn.lock'
23+
- name: Install dependencies
24+
run: yarn
25+
- name: Run build
26+
run: yarn build
27+
- name: Run tests
28+
run: yarn test

.gitignore

Lines changed: 81 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ logs
44
npm-debug.log*
55
yarn-debug.log*
66
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
712

813
# Runtime data
914
pids
@@ -16,11 +21,12 @@ lib-cov
1621

1722
# Coverage directory used by tools like istanbul
1823
coverage
24+
*.lcov
1925

2026
# nyc test coverage
2127
.nyc_output
2228

23-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
2430
.grunt
2531

2632
# Bower dependency directory (https://bower.io/)
@@ -29,44 +35,102 @@ bower_components
2935
# node-waf configuration
3036
.lock-wscript
3137

32-
# Compiled binary addons (http://nodejs.org/api/addons.html)
38+
# Compiled binary addons (https://nodejs.org/api/addons.html)
3339
build/Release
3440

3541
# Dependency directories
3642
node_modules/
3743
jspm_packages/
3844

39-
# Typescript v1 declaration files
40-
typings/
45+
# Snowpack dependency directory (https://snowpack.dev/)
46+
web_modules/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
4150

4251
# Optional npm cache directory
4352
.npm
4453

4554
# Optional eslint cache
4655
.eslintcache
4756

57+
# Optional stylelint cache
58+
.stylelintcache
59+
60+
# Microbundle cache
61+
.rpt2_cache/
62+
.rts2_cache_cjs/
63+
.rts2_cache_es/
64+
.rts2_cache_umd/
65+
4866
# Optional REPL history
4967
.node_repl_history
5068

5169
# Output of 'npm pack'
5270
*.tgz
5371

72+
# Yarn Integrity file
73+
.yarn-integrity
74+
5475
# dotenv environment variable files
55-
.env*
76+
.env
77+
.env.development.local
78+
.env.test.local
79+
.env.production.local
80+
.env.local
5681

57-
# gatsby files
82+
# parcel-bundler cache (https://parceljs.org/)
83+
.cache
84+
.parcel-cache
85+
86+
# Next.js build output
87+
.next
88+
out
89+
90+
# Nuxt.js build / generate output
91+
.nuxt
92+
dist
93+
94+
# Gatsby files
5895
.cache/
59-
public
96+
# Comment in the public line in if your project uses Gatsby and not Next.js
97+
# https://nextjs.org/blog/next-9-1#public-directory-support
98+
# public
6099

61-
# Mac files
62-
.DS_Store
100+
# vuepress build output
101+
.vuepress/dist
63102

64-
# Yarn
65-
.yarn-integrity
66-
.idea/*
67-
.yarn/*
68-
!.yarn/releases
69-
!.yarn/plugins
70-
!.yarn/sdks
71-
!.yarn/versions
103+
# vuepress v2.x temp and cache directory
104+
.temp
105+
.cache
106+
107+
# Docusaurus cache and generated files
108+
.docusaurus
109+
110+
# Serverless directories
111+
.serverless/
112+
113+
# FuseBox cache
114+
.fusebox/
115+
116+
# DynamoDB Local files
117+
.dynamodb/
118+
119+
# TernJS port file
120+
.tern-port
121+
122+
# Stores VSCode versions used for testing VSCode extensions
123+
.vscode-test
124+
125+
# yarn v2
126+
.yarn/cache
127+
.yarn/unplugged
128+
.yarn/build-state.yml
129+
.yarn/install-state.gz
72130
.pnp.*
131+
132+
.DS_Store
133+
134+
# IDE
135+
.idea/
136+
.vscode/

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v22.14.0

.prettierrc.mjs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/** @type {import("@ianvs/prettier-plugin-sort-imports").PrettierConfig} */
2+
const config = {
3+
printWidth: 100,
4+
singleQuote: true,
5+
trailingComma: 'es5',
6+
plugins: ['@ianvs/prettier-plugin-sort-imports'],
7+
importOrder: [
8+
'.*styles.css$',
9+
'',
10+
'dayjs',
11+
'^react$',
12+
'^next$',
13+
'^next/.*$',
14+
'<BUILTIN_MODULES>',
15+
'<THIRD_PARTY_MODULES>',
16+
'^@mantine/(.*)$',
17+
'^@mantinex/(.*)$',
18+
'^@mantine-tests/(.*)$',
19+
'^@docs/(.*)$',
20+
'^@/.*$',
21+
'^../(?!.*.css$).*$',
22+
'^./(?!.*.css$).*$',
23+
'\\.css$',
24+
],
25+
overrides: [
26+
{
27+
files: '*.mdx',
28+
options: {
29+
printWidth: 70,
30+
},
31+
},
32+
],
33+
};
34+
35+
export default config;

.storybook/main.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import type { StorybookConfig } from '@storybook/nextjs';
2+
3+
const config: StorybookConfig = {
4+
core: {
5+
disableWhatsNewNotifications: true,
6+
disableTelemetry: true,
7+
enableCrashReports: false,
8+
},
9+
stories: ['../components/**/*.(stories|story).@(js|jsx|ts|tsx)'],
10+
addons: ['storybook-dark-mode'],
11+
framework: {
12+
name: '@storybook/nextjs',
13+
options: {},
14+
},
15+
};
16+
export default config;

.storybook/preview.tsx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import '@mantine/core/styles.css';
2+
3+
import React, { useEffect } from 'react';
4+
import { addons } from '@storybook/preview-api';
5+
import { DARK_MODE_EVENT_NAME } from 'storybook-dark-mode';
6+
import { MantineProvider, useMantineColorScheme } from '@mantine/core';
7+
import { theme } from '../theme';
8+
9+
export const parameters = {
10+
layout: 'fullscreen',
11+
options: {
12+
showPanel: false,
13+
},
14+
};
15+
16+
const channel = addons.getChannel();
17+
18+
function ColorSchemeWrapper({ children }: { children: React.ReactNode }) {
19+
const { setColorScheme } = useMantineColorScheme();
20+
const handleColorScheme = (value: boolean) => setColorScheme(value ? 'dark' : 'light');
21+
22+
useEffect(() => {
23+
channel.on(DARK_MODE_EVENT_NAME, handleColorScheme);
24+
return () => channel.off(DARK_MODE_EVENT_NAME, handleColorScheme);
25+
}, [channel]);
26+
27+
return <>{children}</>;
28+
}
29+
30+
export const decorators = [
31+
(renderStory: any) => <ColorSchemeWrapper>{renderStory()}</ColorSchemeWrapper>,
32+
(renderStory: any) => <MantineProvider theme={theme}>{renderStory()}</MantineProvider>,
33+
];

.stylelintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.next
2+
out

0 commit comments

Comments
 (0)