Skip to content

Commit

Permalink
inputElement => inputComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
moroshko committed Oct 13, 2016
1 parent 8c98185 commit 4e01580
Show file tree
Hide file tree
Showing 28 changed files with 258 additions and 312 deletions.
32 changes: 25 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ module.exports = {
},
parser: 'babel-eslint',
plugins: [
'react',
'mocha'
'react'
],
extends: [
'eslint:recommended'
Expand All @@ -29,6 +28,28 @@ module.exports = {
'no-console': 2,
'no-global-assign': 2,
'no-multiple-empty-lines': [2, { 'max': 1 }],
'no-restricted-properties': [2,
{
object: 'describe',
property: 'only',
message: 'Please run all tests!'
},
{
object: 'describe',
property: 'skip',
message: 'Please run all tests!'
},
{
object: 'it',
property: 'only',
message: 'Please run all tests!'
},
{
object: 'it',
property: 'skip',
message: 'Please run all tests!'
}
],
'no-template-curly-in-string': 2,
'no-trailing-spaces': 2,
'no-unused-vars': 2,
Expand Down Expand Up @@ -73,7 +94,7 @@ module.exports = {
'react/style-prop-object': 2,

'react/jsx-boolean-value': [2, 'always'],
'react/jsx-closing-bracket-location': [2, { 'selfClosing': 'after-props', 'nonEmpty': 'after-props' }],
'react/jsx-closing-bracket-location': [2, 'tag-aligned'],
'react/jsx-curly-spacing': [2, 'never', { 'allowMultiline': true }],
'react/jsx-equals-spacing': [2, 'never'],
'react/jsx-filename-extension': [2, { 'extensions': ['.js'] }],
Expand All @@ -93,9 +114,6 @@ module.exports = {
'react/jsx-space-before-closing': [2, 'always'],
'react/jsx-uses-react': 2,
'react/jsx-uses-vars': 2,
'react/jsx-wrap-multilines': 2,

'mocha/no-exclusive-tests': 'error',
'mocha/no-skipped-tests': 'error'
'react/jsx-wrap-multilines': 2
}
};
144 changes: 64 additions & 80 deletions README.md

Large diffs are not rendered by default.

87 changes: 0 additions & 87 deletions UPGRADE_GUIDE.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ export default class Basic extends Component {
<Link
className={styles.codepenLink}
href="http://codepen.io/moroshko/pen/LGNJMy"
underline={false}>
underline={false}
>
Codepen
</Link>
</div>
Expand All @@ -92,7 +93,8 @@ export default class Basic extends Component {
renderSuggestion={renderSuggestion}
inputProps={inputProps}
focusInputOnSuggestionClick={focusInputOnSuggestionClick}
id="basic-example" />
id="basic-example"
/>
</div>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ export default class CustomRender extends Component {
<Link
className={styles.codepenLink}
href="http://codepen.io/moroshko/pen/PZWbzK"
underline={false}>
underline={false}
>
Codepen
</Link>
</div>
Expand All @@ -117,7 +118,8 @@ export default class CustomRender extends Component {
inputProps={inputProps}
focusInputOnSuggestionClick={focusInputOnSuggestionClick}
theme={theme}
id="custom-render-example" />
id="custom-render-example"
/>
</div>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ export default class MultipleSections extends Component {
<Link
className={styles.codepenLink}
href="http://codepen.io/moroshko/pen/qbRNjV"
underline={false}>
underline={false}
>
Codepen
</Link>
</div>
Expand All @@ -116,7 +117,8 @@ export default class MultipleSections extends Component {
focusFirstSuggestion={true}
focusInputOnSuggestionClick={focusInputOnSuggestionClick}
theme={theme}
id="multiple-sections-example" />
id="multiple-sections-example"
/>
</div>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ export default class ScrollableContainer extends Component {
onRequestClose={this.closeModal}
shouldCloseOnOverlayClick={false}
closeTimeoutMS={1/* otherwise the modal is not closed when suggestion is selected by pressing Enter */}
style={modalStyle}>
style={modalStyle}
>
<div className={styles.modalTitle}>
Please select a country:
</div>
Expand All @@ -138,7 +139,8 @@ export default class ScrollableContainer extends Component {
inputProps={inputProps}
alwaysRenderSuggestions={true}
theme={theme}
id="scrollable-container-example" />
id="scrollable-container-example"
/>
</div>
<button className={styles.cancelButton} onClick={this.closeModal}>
Cancel
Expand Down
6 changes: 4 additions & 2 deletions demo/src/components/App/components/Features/Features.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export default function Features() {
<div className={styles.featureDescription}>
<Link
className={styles.link}
href="http://www.w3.org/TR/wai-aria-practices/#autocomplete">
href="http://www.w3.org/TR/wai-aria-practices/#autocomplete"
>
WAI-ARIA compliant
</Link>
, with support for ARIA attributes and keyboard interactions.
Expand Down Expand Up @@ -47,7 +48,8 @@ export default function Features() {
{'Check out the '}
<Link
className={styles.link}
href="https://github.com/moroshko/react-autosuggest#features">
href="https://github.com/moroshko/react-autosuggest#features"
>
GitHub page
</Link>
{' for a full list of features.'}
Expand Down
9 changes: 6 additions & 3 deletions demo/src/components/App/components/Footer/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ export default function Footer() {
<Link
className={styles.link}
href="https://twitter.com/moroshko"
underline={false}>
underline={false}
>
@moroshko
</Link>
</div>
Expand All @@ -20,7 +21,8 @@ export default function Footer() {
<Link
className={styles.link}
href="https://twitter.com/ThatBaldUXGuy"
underline={false}>
underline={false}
>
@thatbalduxguy
</Link>
</div>
Expand All @@ -29,7 +31,8 @@ export default function Footer() {
<Link
className={styles.link}
href="http://moroshko.mit-license.org/"
underline={false}>
underline={false}
>
MIT license
</Link>
</div>
Expand Down
9 changes: 6 additions & 3 deletions demo/src/components/App/components/Header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,23 @@ class Header extends Component {
className={styles.button}
href="https://github.com/moroshko/react-autosuggest#installation"
target="_blank"
rel="noopener noreferrer">
rel="noopener noreferrer"
>
Get started
</a>
<div className={styles.socialLinks}>
<Link
className={styles.stargazersLink}
href="https://github.com/moroshko/react-autosuggest/stargazers"
underline={false}>
underline={false}
>
{stargazers} stargazers
</Link>
<Link
className={styles.twitterLink}
href="https://twitter.com/moroshko"
underline={false}>
underline={false}
>
@moroshko
</Link>
</div>
Expand Down
2 changes: 1 addition & 1 deletion demo/src/components/App/components/Header/redux.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import fetch from 'isomorphic-fetch';
const UPDATE_STARGAZERS = 'UPDATE_STARGAZERS';

const initialState = {
stargazers: '1216'
stargazers: '1242'
};

export function loadStargazers() {
Expand Down
3 changes: 2 additions & 1 deletion demo/standalone/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ class App extends React.Component { // eslint-disable-line no-undef
onSuggestionsClearRequested={this.onSuggestionsClearRequested}
getSuggestionValue={getSuggestionValue}
renderSuggestion={renderSuggestion}
inputProps={inputProps} />
inputProps={inputProps}
/>
);
}
}
Expand Down
3 changes: 2 additions & 1 deletion demo/standalone/compiled.app.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@
onSuggestionsClearRequested: this.onSuggestionsClearRequested,
getSuggestionValue: getSuggestionValue,
renderSuggestion: renderSuggestion,
inputProps: inputProps });
inputProps: inputProps
});
}
}]);

Expand Down
Loading

0 comments on commit 4e01580

Please sign in to comment.