-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ➕ Adição do Storybook + Story do Input
- Loading branch information
Showing
34 changed files
with
1,313 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,69 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true | ||
}, | ||
"extends": [ | ||
"standard-with-typescript", | ||
"plugin:react/recommended", | ||
"prettier", | ||
"prettier/prettier", | ||
"eslint:recommended", | ||
"next" | ||
], | ||
"parser": "@babel/eslint-parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module", | ||
"requireConfigFile": false, | ||
"babelOptions": { | ||
"presets": ["@babel/preset-react"] | ||
} | ||
}, | ||
"plugins": [ | ||
"react", | ||
"eslint-plugin-import", | ||
"eslint-plugin-n", | ||
"eslint-plugin-prettier", | ||
"eslint-plugin-promise", | ||
"eslint-plugin-react", | ||
"eslint-plugin-react-hooks", | ||
"eslint-plugin-tsdoc", | ||
"eslint-plugin-next" | ||
], | ||
"rules": { | ||
"prettier/prettier": "error", | ||
"react/jsx-filename-extension": [ | ||
"warn", | ||
{ "extensions": [".js", ".jsx", ".ts", ".tsx"] } | ||
], | ||
"import/prefer-default-export": "off", | ||
"jsx-quotes": ["error", "prefer-double"], | ||
"camelcase": "warn", | ||
"complexity": ["warn", 10], | ||
"import/no-unresolved": ["error", { "ignore": ["^@"] }] | ||
} | ||
} | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true | ||
}, | ||
"extends": [ | ||
"standard-with-typescript", | ||
"plugin:react/recommended", | ||
"prettier", | ||
"prettier/prettier", | ||
"eslint:recommended", | ||
"next", | ||
"plugin:storybook/recommended" | ||
], | ||
"parser": "@babel/eslint-parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module", | ||
"requireConfigFile": false, | ||
"babelOptions": { | ||
"presets": [ | ||
"@babel/preset-react" | ||
] | ||
} | ||
}, | ||
"plugins": [ | ||
"react", | ||
"eslint-plugin-import", | ||
"eslint-plugin-n", | ||
"eslint-plugin-prettier", | ||
"eslint-plugin-promise", | ||
"eslint-plugin-react", | ||
"eslint-plugin-react-hooks", | ||
"eslint-plugin-tsdoc", | ||
"eslint-plugin-next" | ||
], | ||
"rules": { | ||
"prettier/prettier": "error", | ||
"react/jsx-filename-extension": [ | ||
"warn", | ||
{ | ||
"extensions": [ | ||
".js", | ||
".jsx", | ||
".ts", | ||
".tsx" | ||
] | ||
} | ||
], | ||
"import/prefer-default-export": "off", | ||
"jsx-quotes": [ | ||
"error", | ||
"prefer-double" | ||
], | ||
"camelcase": "warn", | ||
"complexity": [ | ||
"warn", | ||
10 | ||
], | ||
"import/no-unresolved": [ | ||
"error", | ||
{ | ||
"ignore": [ | ||
"^@" | ||
] | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { StorybookConfig } from "@storybook/nextjs"; | ||
|
||
const config: StorybookConfig = { | ||
stories: [ | ||
"../stories/**/*.mdx", | ||
"../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)", | ||
], | ||
addons: [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/addon-onboarding", | ||
"@storybook/addon-interactions", | ||
"@storybook/addon-themes", | ||
], | ||
framework: { | ||
name: "@storybook/nextjs", | ||
options: { | ||
strictMode: true, | ||
fastRefresh: true, | ||
nextConfigPath: "../next.config.js", | ||
}, | ||
}, | ||
docs: { | ||
autodocs: true, | ||
}, | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { Preview } from "@storybook/react"; | ||
import { withThemeFromJSXProvider } from "@storybook/addon-themes"; | ||
import { darkTheme, lightTheme } from "../src/styles/theme/default/index.ts"; | ||
import { ThemeProvider } from "styled-components"; | ||
import { GlobalStyle } from "../src/styles/globals.tsx"; | ||
import { | ||
INITIAL_VIEWPORTS, | ||
MINIMAL_VIEWPORTS, | ||
} from "@storybook/addon-viewport"; | ||
|
||
export const decorators = [ | ||
withThemeFromJSXProvider({ | ||
themes: { | ||
light: lightTheme, | ||
dark: darkTheme, | ||
}, | ||
defaultTheme: "light", | ||
Provider: ThemeProvider, | ||
GlobalStyles: GlobalStyle, | ||
}), | ||
]; | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
layout: "centered", | ||
viewport: { | ||
viewports: { | ||
...INITIAL_VIEWPORTS, | ||
...MINIMAL_VIEWPORTS, | ||
}, | ||
}, | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,88 @@ | ||
{ | ||
"name": "services", | ||
"version": "0.1.0", | ||
"private": true, | ||
"repository": "https://github.com/welllucky/services.git", | ||
"author": "Wellington Braga <[email protected]>", | ||
"license": "LGPL-3.0-only", | ||
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start", | ||
"lint": "next lint && yarn lint:css", | ||
"lint:css": "stylelint './src/**/*.js'", | ||
"e2e:open": "playwright test --ui", | ||
"e2e:run": "playwright test", | ||
"e2e:debug": "playwright test --debug", | ||
"e2e:gen": "playwright codegen", | ||
"test": "playwright test -c playwright-ct.config.ts" | ||
}, | ||
"dependencies": { | ||
"@vercel/analytics": "^1.1.1", | ||
"axios": "^1.4.0", | ||
"next": "14.0.1", | ||
"react": "^18", | ||
"react-dom": "^18", | ||
"sharp": "^0.32.6", | ||
"styled-components": "^6.1.0", | ||
"swr": "^2.2.4", | ||
"usehooks-ts": "^2.9.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/eslint-parser": "^7.23.3", | ||
"@babel/preset-react": "^7.23.3", | ||
"@next/eslint-plugin-next": "^14.0.3", | ||
"@playwright/experimental-ct-react": "^1.39.0", | ||
"@playwright/test": "^1.39.0", | ||
"@types/node": "^20", | ||
"@types/react": "^18", | ||
"@types/react-dom": "^18", | ||
"@typescript-eslint/eslint-plugin": "^6.4.0", | ||
"@typescript-eslint/parser": "^6.11.0", | ||
"dotenv": "^16.3.1", | ||
"eslint": "^8.0.1", | ||
"eslint-config-next": "14.0.1", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-config-standard-with-typescript": "^39.1.1", | ||
"eslint-plugin-import": "^2.25.2", | ||
"eslint-plugin-n": "^15.0.0 || ^16.0.0 ", | ||
"eslint-plugin-prettier": "^5.0.1", | ||
"eslint-plugin-promise": "^6.0.0", | ||
"eslint-plugin-react": "^7.33.2", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"eslint-plugin-tsdoc": "^0.2.17", | ||
"postcss-styled-syntax": "^0.5.0", | ||
"prettier": "^3.1.0", | ||
"stylelint": "^15.11.0", | ||
"stylelint-config-standard": "^34.0.0", | ||
"typescript": "*" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.2%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
} | ||
"name": "services", | ||
"version": "0.1.0", | ||
"private": true, | ||
"packageManager": "[email protected]", | ||
"repository": "https://github.com/welllucky/services.git", | ||
"author": "Wellington Braga <[email protected]>", | ||
"license": "LGPL-3.0-only", | ||
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start", | ||
"lint": "next lint && stylelint './src/**/*.js'", | ||
"e2e:open": "playwright test --ui", | ||
"e2e:run": "playwright test", | ||
"e2e:debug": "playwright test --debug", | ||
"e2e:gen": "playwright codegen", | ||
"test": "playwright test -c playwright-ct.config.ts", | ||
"storybook": "storybook dev -p 6006", | ||
"build-storybook": "storybook build" | ||
}, | ||
"dependencies": { | ||
"axios": "^1.4.0", | ||
"next": "14.0.1", | ||
"react": "^18", | ||
"react-dom": "^18", | ||
"sharp": "^0.32.6", | ||
"styled-components": "^6.1.0", | ||
"swr": "^2.2.4", | ||
"usehooks-ts": "^2.9.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/eslint-parser": "^7.23.3", | ||
"@babel/preset-react": "^7.23.3", | ||
"@next/eslint-plugin-next": "^14.0.3", | ||
"@playwright/experimental-ct-react": "^1.39.0", | ||
"@playwright/test": "^1.39.0", | ||
"@storybook/addon-essentials": "^7.6.6", | ||
"@storybook/addon-interactions": "^7.6.6", | ||
"@storybook/addon-links": "^7.6.6", | ||
"@storybook/addon-onboarding": "^1.0.10", | ||
"@storybook/addon-themes": "^7.6.6", | ||
"@storybook/blocks": "^7.6.6", | ||
"@storybook/jest": "^0.2.3", | ||
"@storybook/nextjs": "^7.6.6", | ||
"@storybook/react": "^7.6.6", | ||
"@storybook/test": "^7.6.6", | ||
"@storybook/testing-library": "^0.2.2", | ||
"@types/node": "^20", | ||
"@types/react": "^18", | ||
"@types/react-dom": "^18", | ||
"@typescript-eslint/eslint-plugin": "^6.4.0", | ||
"@typescript-eslint/parser": "^6.11.0", | ||
"dotenv": "^16.3.1", | ||
"eslint": "^8.0.1", | ||
"eslint-config-next": "14.0.1", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-config-standard-with-typescript": "^39.1.1", | ||
"eslint-plugin-import": "^2.25.2", | ||
"eslint-plugin-n": "^15.0.0 || ^16.0.0 ", | ||
"eslint-plugin-prettier": "^5.0.1", | ||
"eslint-plugin-promise": "^6.0.0", | ||
"eslint-plugin-react": "^7.33.2", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"eslint-plugin-storybook": "^0.6.15", | ||
"eslint-plugin-tsdoc": "^0.2.17", | ||
"postcss-styled-syntax": "^0.5.0", | ||
"prettier": "^3.1.0", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"storybook": "^7.6.6", | ||
"stylelint": "^15.11.0", | ||
"stylelint-config-standard": "^34.0.0", | ||
"typescript": "*" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.2%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.