Skip to content

Setup Minimal-UI Framework and Storybook Integration #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 22 additions & 0 deletions client/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// .eslintignore
build/*
dist/*
public/*
**/out/*
**/node_modules/*

**/.next/*
next.config.js

vite.config.js
vite.config.ts

src/reportWebVitals.js
src/service-worker.js
src/serviceWorkerRegistration.js
src/setupTests.js

src/reportWebVitals.ts
src/service-worker.ts
src/serviceWorkerRegistration.ts
src/setupTests.ts
176 changes: 176 additions & 0 deletions client/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
{
"root": true,
"env": {
"browser": true,
"es2021": true
},
"plugins": [
"perfectionist",
"unused-imports",
"prettier"
],
"extends": [
"airbnb",
"airbnb/hooks",
"prettier"
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"settings": {
"react": {
"version": "detect"
},
"import/resolver": {
"alias": {
"map": [
[
"src",
"./src"
]
],
"extensions": [
".js",
".jsx",
".json"
]
}
}
},
"rules": {
"no-alert": 0,
"camelcase": 0,
"no-console": 0,
"no-param-reassign": 0,
"naming-convention": 0,
"default-param-last": 0,
"no-underscore-dangle": 0,
"no-use-before-define": 0,
"no-restricted-exports": 0,
"react/no-children-prop": 0,
"react/forbid-prop-types": 0,
"react/react-in-jsx-scope": 0,
"jsx-a11y/anchor-is-valid": 0,
"react/no-array-index-key": 0,
"no-promise-executor-return": 0,
"react/require-default-props": 0,
"react/jsx-filename-extension": 0,
"react/jsx-props-no-spreading": 0,
"import/prefer-default-export": 0,
"react/function-component-definition": 0,
"jsx-a11y/control-has-associated-label": 0,
"react/jsx-no-useless-fragment": [
1,
{
"allowExpressions": true
}
],
"prefer-destructuring": [
1,
{
"object": true,
"array": false
}
],
"react/no-unstable-nested-components": [
1,
{
"allowAsProps": true
}
],
"no-unused-vars": [
1,
{
"args": "none"
}
],
"react/jsx-no-duplicate-props": [
1,
{
"ignoreCase": false
}
],
// unused-imports
// https://www.npmjs.com/package/eslint-plugin-unused-imports
"unused-imports/no-unused-imports": 1,
"unused-imports/no-unused-vars": [
0,
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
],
// perfectionist
// https://eslint-plugin-perfectionist.azat.io/
"perfectionist/sort-named-imports": [
1,
{
"order": "asc",
"type": "line-length"
}
],
"perfectionist/sort-named-exports": [
1,
{
"order": "asc",
"type": "line-length"
}
],
"perfectionist/sort-exports": [
1,
{
"order": "asc",
"type": "line-length"
}
],
"perfectionist/sort-imports": [
1,
{
"order": "asc",
"type": "line-length",
"newlines-between": "always",
"groups": [
[
"builtin",
"external"
],
"custom-mui",
"custom-routes",
"custom-hooks",
"custom-utils",
"internal",
"custom-components",
"custom-sections",
"custom-types",
[
"parent",
"sibling",
"index"
],
"object",
"unknown"
],
"custom-groups": {
"value": {
"custom-mui": "@mui/**",
"custom-routes": "src/routes/**",
"custom-hooks": "src/hooks/**",
"custom-utils": "src/utils/**",
"custom-components": "src/components/**",
"custom-sections": "src/sections/**",
"custom-types": "src/types/**"
}
},
"internal-pattern": [
"src/**"
]
}
]
}
}
38 changes: 38 additions & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
node_modules
.pnp
.pnp.js

# testing
coverage

# production
.next
.swc
_static
out
dist
build

# environment variables
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# misc
.DS_Store
.vercel
.netlify
.unimportedrc.json
tsconfig.tsbuildinfo
.vscode

npm-debug.log*
yarn-debug.log*
yarn-error.log*

*storybook.log
9 changes: 9 additions & 0 deletions client/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
build/*
dist/*
public/*
**/out/*
**/.next/*
**/node_modules/*

package-lock.json
yarn.lock
6 changes: 6 additions & 0 deletions client/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"printWidth": 100,
"singleQuote": true,
"trailingComma": "es5",
"tabWidth": 2
}
19 changes: 19 additions & 0 deletions client/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/** @type { import('@storybook/react-vite').StorybookConfig } */
const config = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-onboarding',
'@storybook/addon-links',
'@storybook/addon-essentials',
'@chromatic-com/storybook',
'@storybook/addon-interactions',
],
framework: {
name: '@storybook/react-vite',
options: {},
},
docs: {
autodocs: 'tag',
},
};
export default config;
13 changes: 13 additions & 0 deletions client/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/** @type { import('@storybook/react').Preview } */
const preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export default preview;
84 changes: 84 additions & 0 deletions client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
### v1.8.0

###### Wed 11, 2023

- Migrate to vite.js.
- Upgrade and restructure the directory.
- Upgrade some dependencies to the latest versions

---

### v1.7.0

###### Feb 21, 2023

- Upgrade some dependencies to the latest versions

---

### v1.6.0

###### Oct 17, 2022

- Upgrade and restructure the directory.
- Upgrade some dependencies to the latest versions

---

### v1.5.0

###### Jul 04, 2022

- Support react 18.
- Upgrade some dependencies to the latest versions

---

### v1.4.0

###### Apr 12, 2022

- Update `src/components`.
- Update `src/sections`.
- Update `src/pages`.
- Update `src/layouts`.
- Update `src/theme`.
- Upgrade some dependencies to the latest versions

---

### v1.3.0

###### Feb 21, 2022

- Support react-script v5.0.0
- Source code improvement
- Upgrade some dependencies to the latest versions

---

### v1.2.0

###### Sep 18, 2021

- Support MIU v5.0.0 official release
- Upgrade some dependencies to the latest versions
- Update `src/theme/typography.js`
- Upgrade some dependencies to the latest versions

---

### v1.1.0

###### Jul 23, 2021

- Support MUI v5.0.0-beta.1
- Upgrade some dependencies to the latest versions

---

### v1.0.0

###### Jun 28, 2021

Initial release.
21 changes: 21 additions & 0 deletions client/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Minimal UI ([https://minimals.cc/](https://minimals.cc/))

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading