-
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.
- Loading branch information
Showing
99 changed files
with
23,379 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[*] | ||
indent_style = space | ||
end_of_line = lf | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
max_line_length = 0 | ||
trim_trailing_whitespace = false |
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,10 @@ | ||
build | ||
lib | ||
node_modules | ||
scripts | ||
types | ||
webpack | ||
babel.config.js | ||
jest.config.js | ||
postcss.config.js | ||
*.css.d.ts |
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,22 @@ | ||
module.exports = { | ||
extends: [require.resolve('@consta/widgets-configs/eslintrc')], | ||
overrides: [ | ||
{ | ||
files: ['./src/**/*.stories.tsx'], | ||
rules: { | ||
'import/no-default-export': ['off'], | ||
'@typescript-eslint/no-shadow': ['off'], | ||
}, | ||
}, | ||
], | ||
plugins: ['todo-plz'], | ||
rules: { | ||
'todo-plz/ticket-ref': [ | ||
'error', | ||
{ | ||
pattern: '(GDC-|UI-Kit#)[0-9]+', | ||
terms: ['TODO', 'todo'], | ||
}, | ||
], | ||
}, | ||
} |
Validating CODEOWNERS rules …
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,3 @@ | ||
* @gizeasy @dmitriykorsakovnedra | ||
*.md @arhayka | ||
*.mdx @arhayka |
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,20 @@ | ||
## Описание изменений | ||
|
||
## Чек-лист | ||
|
||
- [ ] PR: направлен в правильную ветку | ||
- [ ] PR: назначен исполнитель PR и указаны нужные лейблы | ||
- [ ] PR: проверен diff, ничего лишнего в PR не попало | ||
- [ ] PR: прилинкованы затронутые issue и связанные PR | ||
- [ ] PR: есть описание изменений | ||
- [ ] JS: нет варнингов и ошибок в консоли браузера | ||
- [ ] Тесты: новый функционал и исправленные баги покрыты тестами | ||
- [ ] Документация: отражены все изменения в API компонентов и описаны важные особенности реализации или использования | ||
- [ ] Сторибук: для компонентов написаны или обновлены stories | ||
- [ ] Верстка: используются переменные из UI-kit | ||
- [ ] Верстка: проверена с разным количеством контента | ||
|
||
## Опционально | ||
|
||
- [ ] Доработки: заведены задачи для дальнейшей работы, если что-то решено не править в текущем пулл-реквесте | ||
- [ ] Коммиты: проименованы в соответствии с [правилами](https://consta-widgets.consta.vercel.app/?path=/docs/common-develop-commits-style--page) |
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,34 @@ | ||
name: Тесты | ||
on: | ||
push: | ||
branches: master | ||
pull_request: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: rokroskar/[email protected] | ||
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
|
||
- name: Установка yarn | ||
id: yarn-setup | ||
run: | | ||
yarn policies set-version 1.19.1 | ||
echo "::set-output name=cache_dir::$(yarn cache dir)" | ||
- name: Настройка кэширования yarn | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.yarn-setup.outputs.cache_dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Установка зависимостей | ||
run: yarn --frozen-lockfile | ||
- name: Тесты | ||
run: yarn test |
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,45 @@ | ||
# Meta | ||
**/.DS_Store | ||
.idea | ||
.vscode | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Dependency directories | ||
node_modules | ||
jspm_packages | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Distribution | ||
build | ||
dist | ||
lib | ||
|
||
# Env | ||
.env | ||
|
||
# CSS typings | ||
*.css.d.ts | ||
|
||
# Yalc | ||
.yalc | ||
yalc.lock |
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,3 @@ | ||
build/* | ||
dist/* | ||
*.css.d.ts |
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,3 @@ | ||
module.exports = { | ||
...require('@consta/widgets-configs/prettier.config.js'), | ||
}; |
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,38 @@ | ||
const getCommonConfig = require('@consta/widgets-configs/config/webpack/common.webpack') | ||
const webpackMerge = require('webpack-merge') | ||
const omit = require('lodash/omit') | ||
const flowRight = require('lodash/flowRight') | ||
const glob = require('fast-glob') | ||
|
||
const { withMdxRules, disableCSSModules } = require('../webpack/helpers') | ||
|
||
module.exports = { | ||
addons: [ | ||
'@storybook/addon-knobs', | ||
'@storybook/addon-actions', | ||
'storybook-addon-react-docgen', | ||
'@storybook/addon-docs/register', | ||
'storybook-addon-themes', | ||
], | ||
stories: async () => { | ||
const isDevelop = process.env.NODE_ENV === 'development' | ||
|
||
const paths = await glob( | ||
['src/**/*.stories.tsx', !isDevelop && '!src/core/**/*.stories.tsx', 'docs/**/*.mdx'].filter( | ||
Boolean | ||
) | ||
) | ||
|
||
return paths.map(path => `../${path}`) | ||
}, | ||
webpackFinal: config => { | ||
// Exclude default module rules to fix svg import issue: https://github.com/storybooks/storybook/issues/5926 | ||
const baseSBConfig = omit(config, ['module']) | ||
|
||
const projectConfig = flowRight([withMdxRules, disableCSSModules])( | ||
getCommonConfig({ withDocgen: true }) | ||
) | ||
|
||
return webpackMerge(baseSBConfig, projectConfig) | ||
}, | ||
} |
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,67 @@ | ||
import { withKnobs } from '@storybook/addon-knobs' | ||
import { withInfo } from '@storybook/addon-info' | ||
import { addDecorator, addParameters } from '@storybook/react' | ||
import { themes } from '@storybook/theming' | ||
import { withPropsTable } from 'storybook-addon-react-docgen' | ||
|
||
import { | ||
DocsDecorator, | ||
environmentDecorator, | ||
listOfThemes, | ||
ThemeDecorator, | ||
} from '@/__private__/storybook' | ||
|
||
import stub from './stub.mdx' | ||
|
||
import './storybook.css' | ||
|
||
addDecorator(withPropsTable) | ||
addDecorator(withKnobs) | ||
addDecorator(environmentDecorator()) | ||
addDecorator( | ||
withInfo({ | ||
header: false, | ||
}) | ||
) | ||
|
||
const storySort = (a, b) => { | ||
const orderA = a[1].parameters.order | ||
const orderB = b[1].parameters.order | ||
const idA = a[0] | ||
const idB = b[0] | ||
|
||
if (orderA && orderB) { | ||
return orderA - orderB | ||
} | ||
if (orderA) { | ||
return -1 | ||
} | ||
if (orderB) { | ||
return 1 | ||
} | ||
if (idA < idB) { | ||
return -1 | ||
} | ||
if (idA > idB) { | ||
return 1 | ||
} | ||
return 0 | ||
} | ||
|
||
addParameters({ | ||
themes: { | ||
list: listOfThemes, | ||
Decorator: ThemeDecorator, | ||
}, | ||
docs: { | ||
container: DocsDecorator, | ||
page: stub, | ||
}, | ||
options: { | ||
theme: themes.dark, | ||
showRoots: true, | ||
storySort, | ||
}, | ||
}) | ||
|
||
window.document.documentElement.lang = 'ru' |
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,35 @@ | ||
html { | ||
line-height: 1.15; | ||
-webkit-text-size-adjust: 100%; | ||
} | ||
|
||
body { | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
|
||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
:global(.sbdocs-wrapper) { | ||
min-height: 100vh; | ||
box-sizing: border-box; | ||
} | ||
|
||
/* Стили якорей */ | ||
:global { | ||
.sbdocs-h1, | ||
.sbdocs-h2, | ||
.sbdocs-h3, | ||
.sbdocs-h4, | ||
.sbdocs-h5, | ||
.sbdocs-h6 { | ||
& > a { | ||
color: inherit; | ||
|
||
& > svg { | ||
fill: currentColor; | ||
} | ||
} | ||
} | ||
} |
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,2 @@ | ||
# В разработке | ||
Сожалеем, но данный раздел находится в разработке. |
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,6 @@ | ||
*.ts | ||
*.tsx | ||
*.js | ||
*.jsx | ||
*.md | ||
*.mdx |
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,7 @@ | ||
module.exports = { | ||
extends: '@consta/widgets-configs/stylelintrc', | ||
rules: { | ||
'selector-class-pattern': '[a-zA-Z0-9_-]+', | ||
'selector-nested-pattern': '[a-zA-Z0-9_-]+', | ||
}, | ||
} |
Oops, something went wrong.