-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: update to @gravity-ui/uikit v6 (#66)
- Loading branch information
Showing
36 changed files
with
19,515 additions
and
16,484 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
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,2 +1,3 @@ | ||
storybook-static | ||
build | ||
!/.storybook |
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,7 +1,32 @@ | ||
{ | ||
"extends": ["@gravity-ui/eslint-config", "@gravity-ui/eslint-config/prettier"], | ||
"extends": [ | ||
"@gravity-ui/eslint-config", | ||
"@gravity-ui/eslint-config/import-order", | ||
"@gravity-ui/eslint-config/client", | ||
"@gravity-ui/eslint-config/prettier" | ||
], | ||
"root": true, | ||
"env": { | ||
"node": true | ||
} | ||
"rules": { | ||
"react/jsx-fragments": ["error", "element"], | ||
"react/react-in-jsx-scope": "off", | ||
"import/consistent-type-specifier-style": ["error", "prefer-top-level"], | ||
"@typescript-eslint/consistent-type-imports": [ | ||
"error", | ||
{"prefer": "type-imports", "fixStyle": "separate-type-imports"} | ||
] | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["**/__stories__/**/*.[jt]s?(x)"], | ||
"rules": { | ||
"no-console": "off" | ||
} | ||
}, | ||
{ | ||
"files": ["**/*.js", "!src/**/*"], | ||
"env": { | ||
"node": true | ||
} | ||
} | ||
] | ||
} |
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
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
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,4 +1,5 @@ | ||
.idea | ||
.vscode | ||
|
||
node_modules | ||
|
||
|
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 @@ | ||
npx nano-staged |
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 @@ | ||
18.19.0 |
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,2 +1,6 @@ | ||
storybook-static | ||
build | ||
|
||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
package-lock.json |
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
This file was deleted.
Oops, something went wrong.
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,51 @@ | ||
import type {StorybookConfig} from '@storybook/react-webpack5'; | ||
|
||
const config: StorybookConfig = { | ||
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], | ||
addons: [ | ||
'@storybook/preset-scss', | ||
{name: '@storybook/addon-essentials', options: {backgrounds: false}}, | ||
], | ||
framework: { | ||
name: '@storybook/react-webpack5', | ||
options: {}, | ||
}, | ||
typescript: { | ||
check: true, | ||
checkOptions: {}, | ||
reactDocgen: 'react-docgen-typescript', | ||
reactDocgenTypescriptOptions: { | ||
setDisplayName: false, | ||
shouldExtractLiteralValuesFromEnum: true, | ||
compilerOptions: { | ||
allowSyntheticDefaultImports: true, | ||
esModuleInterop: true, | ||
}, | ||
}, | ||
}, | ||
docs: { | ||
autodocs: true, | ||
}, | ||
core: { | ||
disableTelemetry: true, | ||
}, | ||
babel: (transformOptions) => { | ||
return { | ||
...transformOptions, | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
targets: { | ||
chrome: 100, | ||
}, | ||
}, | ||
], | ||
'@babel/preset-typescript', | ||
['@babel/preset-react', {runtime: 'automatic'}], | ||
], | ||
}; | ||
}, | ||
}; | ||
|
||
export default config; |
This file was deleted.
Oops, something went wrong.
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,63 @@ | ||
// eslint-disable-next-line import/order | ||
import '@gravity-ui/uikit/styles/styles.scss'; | ||
|
||
import {ThemeProvider, configure} from '@gravity-ui/uikit'; | ||
import type {Decorator, Preview} from '@storybook/react'; | ||
|
||
import {withLang} from './decorators/withLang'; | ||
|
||
configure({lang: 'en'}); | ||
|
||
const withContextProvider: Decorator = (Story, context) => { | ||
const theme = context.globals.theme; | ||
|
||
return ( | ||
<ThemeProvider theme={theme}> | ||
<Story {...context} /> | ||
</ThemeProvider> | ||
); | ||
}; | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
jsx: {showFunctions: true}, | ||
backgrounds: { | ||
default: 'light', | ||
values: [ | ||
{name: 'light', value: 'white'}, | ||
{name: 'dark', value: 'rgba(45, 44, 51, 1)'}, | ||
], | ||
}, | ||
}, | ||
decorators: [withLang, withContextProvider], | ||
globalTypes: { | ||
theme: { | ||
defaultValue: 'light', | ||
toolbar: { | ||
title: 'Theme', | ||
icon: 'mirror', | ||
items: [ | ||
{value: 'light', right: '☼', title: 'Light'}, | ||
{value: 'dark', right: '☾', title: 'Dark'}, | ||
{value: 'light-hc', right: '☼', title: 'High Contrast Light (beta)'}, | ||
{value: 'dark-hc', right: '☾', title: 'High Contrast Dark (beta)'}, | ||
], | ||
dynamicTitle: true, | ||
}, | ||
}, | ||
lang: { | ||
defaultValue: 'en', | ||
toolbar: { | ||
title: 'Language', | ||
icon: 'globe', | ||
items: [ | ||
{value: 'en', right: '🇬🇧', title: 'En'}, | ||
{value: 'ru', right: '🇷🇺', title: 'Ru'}, | ||
], | ||
dynamicTitle: true, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
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,6 +1,3 @@ | ||
{ | ||
"extends": ["@gravity-ui/stylelint-config", "@gravity-ui/stylelint-config/prettier"], | ||
"rules": { | ||
"declaration-colon-space-after": "always-single-line" | ||
} | ||
"extends": ["@gravity-ui/stylelint-config", "@gravity-ui/stylelint-config/prettier"] | ||
} |
Oops, something went wrong.