Skip to content

Commit

Permalink
build(react-ui-validations): update deps (wip)
Browse files Browse the repository at this point in the history
  • Loading branch information
lossir committed Mar 2, 2021
1 parent cd3dece commit 39f3f34
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 272 deletions.
9 changes: 0 additions & 9 deletions packages/react-ui-validations/.storybook/config.js

This file was deleted.

3 changes: 3 additions & 0 deletions packages/react-ui-validations/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
stories: ['../stories/**/*.stories.tsx'],
};
15 changes: 15 additions & 0 deletions packages/react-ui-validations/.storybook/preveiw.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { setFilter } from '@skbkontur/react-props2attrs';
import { findAmongParents } from '@skbkontur/react-sorge/lib';

setFilter(fiber => {
// Транслируем все пропы только для контролов
const isControlComponent = !!findAmongParents(
fiber,
fiberParent => fiberParent.type && typeof fiberParent.type.__KONTUR_REACT_UI__ === 'string',
);
if (isControlComponent) {
return null;
}
// Для остальных компонентов ограничиваемся тестовыми идентификаторами
return ['data-tid', 'data-testid'];
});
21 changes: 21 additions & 0 deletions packages/react-ui-validations/.storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<style>
@font-face {
font-family: 'Segoe UI';
font-weight: 400;
src: local('Segoe UI'), local('SegoeUI'),
url('//c.s-microsoft.com/static/fonts/segoe-ui/cyrillic/normal/latest.woff') format('woff');
}

html,
body {
min-height: 100%;
}

body {
font-family: 'Segoe UI', 'Helvetica Neue', Roboto, Arial, sans-serif;
font-size: 14px;
margin: 0;
background: white;
color: rgba(0, 0, 0, 0.87);
}
</style>
9 changes: 0 additions & 9 deletions packages/react-ui-validations/.storybook/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
const path = require('path');
const webpack = require('webpack');

module.exports = async ({ config, mode }) => {
config.resolve.extensions.unshift('.ts', '.tsx');

config.entry.unshift('react-ui-testing/react-selenium-testing');

config.entry.push(
path.join(__dirname, '../stories/styles/reset.less'),
path.join(__dirname, '../stories/styles/typography.less'),
);

config.module.rules = [
{
test: /\.(ts|tsx)$/,
Expand Down Expand Up @@ -44,7 +36,6 @@ module.exports = async ({ config, mode }) => {
},
},
},
'less-loader',
],
},
{
Expand Down
9 changes: 0 additions & 9 deletions packages/react-ui-validations/stories/styles/mixins.less

This file was deleted.

52 changes: 0 additions & 52 deletions packages/react-ui-validations/stories/styles/reset.less

This file was deleted.

94 changes: 0 additions & 94 deletions packages/react-ui-validations/stories/styles/typography.less

This file was deleted.

99 changes: 0 additions & 99 deletions packages/react-ui-validations/stories/styles/variables.less

This file was deleted.

0 comments on commit 39f3f34

Please sign in to comment.