Skip to content

Commit

Permalink
chore(*): merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
stepancar committed Dec 11, 2019
2 parents 13993ae + 70d43b7 commit 7c52b3c
Show file tree
Hide file tree
Showing 35 changed files with 839 additions and 600 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ function setTarget(target) {

Для commit messages используйте [формат Angular](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines).
В теме сообщения указывайте глагол в настоящем времени, который информирует об изменениях.
Для валидации commit messages на соответствующем git hook используется `validate-commit-message`.
Для валидации commit messages на соответствующем git hook используется `commitlint`.

## Commit best-practices

Expand Down
475 changes: 468 additions & 7 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,13 @@
},
"husky": {
"hooks": {
"commit-msg": "validate-commit-msg",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "lint-staged"
}
},
"commitlint": {
"extends": ["./node_modules/arui-presets-lint/commitlint"]
},
"maintainers": [
{
"email": "[email protected]",
Expand All @@ -81,7 +84,6 @@
"dependencies": {
"bezier-easing": "2.0.3",
"cn-decorator": "2.1.0",
"core-decorators": "0.20.0",
"core-js": "2.5.5",
"date-fns": "1.29.0",
"deprecated-decorator": "0.1.6",
Expand All @@ -103,12 +105,13 @@
},
"devDependencies": {
"acorn": "^6.1.1",
"alfa-ui-primitives": "2.3.3",
"arui-demo": "2.0.0",
"arui-presets": "^4.13.4",
"arui-presets-lint": "^2.0.0",
"babel-loader": "^7.1.2",
"alfa-ui-primitives": "2.3.3",
"babel-plugin-dynamic-import-node": "^2.0.0",
"commitlint": "8.2.0",
"conventional-changelog-cli": "1.3.14",
"conventional-github-releaser": "2.0.0",
"coveralls": "3.0.0",
Expand Down Expand Up @@ -144,7 +147,6 @@
"svgo": "1.0.5",
"timezone-mock": "^1.0.0",
"uppercamelcase": "3.0.0",
"validate-commit-message": "3.0.1",
"vinyl-buffer": "1.0.1",
"webpack": "4.28.0",
"webpack-merge": "4.2.1"
Expand Down
36 changes: 14 additions & 22 deletions src/attach/attach.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

import autobind from 'core-decorators/lib/autobind';
import React from 'react';
import Type from 'prop-types';

Expand Down Expand Up @@ -302,59 +301,52 @@ class Attach extends React.Component {
);
}

@autobind
handleInputChange(event) {
handleInputChange = (event) => {
this.performChange(Array.from(event.target.files));
}
};

@autobind
handleClearClick() {
handleClearClick = () => {
this.input.value = '';
this.performChange([]);
}
};

@autobind
handleButtonClick(event) {
handleButtonClick = (event) => {
if (this.props.onClick) {
this.props.onClick(event);
}
}
};

@autobind
handleFocus(event) {
handleFocus = (event) => {
this.setState({ focused: true });

if (this.props.onFocus) {
this.props.onFocus(event);
}
}
};

@autobind
handleBlur(event) {
handleBlur = (event) => {
this.setState({ focused: false });

if (this.props.onBlur) {
this.props.onBlur(event);
}
}
};

@autobind
handleMouseEnter(event) {
handleMouseEnter = (event) => {
this.setState({ hovered: true });

if (this.props.onMouseEnter) {
this.props.onMouseEnter(event);
}
}
};

@autobind
handleMouseLeave(event) {
handleMouseLeave = (event) => {
this.setState({ hovered: false });

if (this.props.onMouseLeave) {
this.props.onMouseLeave(event);
}
}
};

/**
* Ставит фокус на контрол.
Expand Down
51 changes: 20 additions & 31 deletions src/button/button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

import autobind from 'core-decorators/lib/autobind';
import React from 'react';
import Type from 'prop-types';

Expand Down Expand Up @@ -216,15 +215,13 @@ class Button extends React.Component {
);
}

@autobind
handleClick(event) {
handleClick = (event) => {
if (this.props.onClick) {
this.props.onClick(event);
}
}
};

@autobind
handleFocus(event) {
handleFocus = (event) => {
if (this.state.pressed) {
return;
}
Expand All @@ -234,93 +231,85 @@ class Button extends React.Component {
if (this.props.onFocus) {
this.props.onFocus(event);
}
}
};

@autobind
handleBlur(event) {
handleBlur = (event) => {
this.setState({ focused: false });

if (this.props.onBlur) {
this.props.onBlur(event);
}
}
};

@autobind
handleMouseEnter(event) {
handleMouseEnter = (event) => {
if (!this.props.disabled) {
this.setState({ hovered: true });
}

if (this.props.onMouseEnter) {
this.props.onMouseEnter(event);
}
}
};

@autobind
handleMouseLeave(event) {
handleMouseLeave = (event) => {
if (!this.props.disabled) {
this.setState({ hovered: false });
}

if (this.props.onMouseLeave) {
this.props.onMouseLeave(event);
}
}
};

@autobind
handleMouseDown(event) {
handleMouseDown = (event) => {
if (!this.props.disabled) {
this.setState({ pressed: true });
}

if (this.props.onMouseDown) {
this.props.onMouseDown(event);
}
}
};

@autobind
handleMouseUp(event) {
handleMouseUp = (event) => {
if (!this.props.disabled) {
this.setState({ pressed: false });
}

if (this.props.onMouseUp) {
this.props.onMouseUp(event);
}
}
};

@autobind
handleMouseOut(event) {
handleMouseOut = (event) => {
if (!this.props.disabled) {
this.setState({ pressed: false });
}

if (this.props.onMouseOut) {
this.props.onMouseOut(event);
}
}
};

@autobind
handleKeyDown(event) {
handleKeyDown = (event) => {
if ((event.which === keyboardCode.ENTER || event.which === keyboardCode.SPACE) && !this.props.disabled) {
this.setState({ pressed: true });
}

if (this.props.onKeyDown) {
this.props.onKeyDown(event);
}
}
};

@autobind
handleKeyUp(event) {
handleKeyUp = (event) => {
if ((event.which === keyboardCode.ENTER || event.which === keyboardCode.SPACE) && !this.props.disabled) {
this.setState({ pressed: false });
}

if (this.props.onKeyUp) {
this.props.onKeyUp(event);
}
}
};

/**
* Возвращает корневой `HTMLElement` компонента.
Expand Down
Loading

0 comments on commit 7c52b3c

Please sign in to comment.