From ff5888f82d69c5153459ce9af3ab29e0ba5097ef Mon Sep 17 00:00:00 2001 From: Alexander Fedyashov Date: Sun, 20 Aug 2017 20:12:15 +0300 Subject: [PATCH] chore(package): update all dependencies (#1895) * chore(package): update all dependencies * style(mixed): fix lint issues * chore(package): update deps, add es6 support to configs * style(docs): revert Table and Menu changes, splitted to #1938 * style(docs): revert tests changes, splitted to #1939 * style(mixed): restore formatting * style(mixed): revert tests changes, splitted to #1949 * style(configs): ESify configs * chore(package): update deps * style(mixed): fix lint issues * style(eslint): cleanup configs * fix(configs): fix import of webpack config * chore(package): update package-lock.json --- .eslintrc | 71 +- config.js | 31 +- docs/.eslintrc | 31 +- .../Components/ComponentDoc/ComponentDoc.js | 26 +- .../ComponentDoc/ComponentExample.js | 9 +- .../Components/ComponentDoc/ComponentProps.js | 38 +- .../ComponentDoc/ContributionPrompt.js | 4 +- docs/app/Components/DocsLayout.js | 4 +- docs/app/Components/DocsRoot.js | 40 +- docs/app/Components/ExternalExampleLayout.js | 52 +- docs/app/Components/IconSearch/IconSearch.js | 8 +- docs/app/Components/LayoutsLayout.js | 4 +- docs/app/Components/LayoutsRoot.js | 30 +- docs/app/Components/Logo/Logo.js | 2 +- docs/app/Components/Sidebar/Sidebar.js | 17 +- .../Portal/Types/PortalExamplePortal.js | 6 +- .../app/Examples/addons/Radio/States/index.js | 6 +- docs/app/Examples/addons/Radio/Types/index.js | 6 +- .../Examples/addons/Radio/Variations/index.js | 2 +- docs/app/Examples/addons/Select/common.js | 2 +- .../Settings/CallbackFrequencyExample.js | 1 + .../FieldVariations/FormExampleWidthField.js | 2 +- .../Shorthand/FormExampleFieldControlId.js | 2 +- .../Shorthand/FormExampleSubcomponentId.js | 26 +- .../collections/Form/Shorthand/index.js | 6 +- .../Form/States/FormExampleError.js | 2 +- .../Form/States/FormExampleFieldDisabled.js | 2 +- .../Form/States/FormExampleFieldError.js | 2 +- .../Form/States/FormExampleFieldReadOnly.js | 2 +- .../Form/States/FormExampleLoading.js | 2 +- .../Form/States/FormExampleSuccess.js | 2 +- .../Form/States/FormExampleWarning.js | 2 +- .../Form/Usage/FormExampleCaptureValues.js | 2 +- .../Form/Usage/FormExampleClearOnSubmit.js | 2 +- .../Examples/collections/Form/Usage/index.js | 6 +- .../collections/Grid/Types/GridExampleGrid.js | 2 +- .../Variations/MessageExampleAttached.js | 2 +- .../Usage/ButtonExampleAttachedEvents.js | 6 +- .../Examples/elements/Button/Usage/index.js | 1 + .../Variations/DividerExampleFitted.js | 24 +- .../Variations/DividerExampleHidden.js | 24 +- .../Variations/DividerExampleInverted.js | 22 +- .../Variations/DividerExampleSection.js | 24 +- .../elements/Flag/Types/FlagExampleTable.js | 2 +- docs/app/Examples/elements/Icon/index.js | 5 +- .../elements/Image/Types/ImageExampleLink.js | 3 +- .../Input/Usage/InputExampleRefFocus.js | 2 +- .../elements/Label/Types/LabelExampleIcon.js | 12 +- .../elements/Label/Types/LabelExampleImage.js | 6 +- .../Label/Types/LabelExampleImageColored.js | 8 +- .../List/Variations/ListExampleSelection.js | 18 +- .../Usage/AccordionExampleActiveIndex.js | 2 +- .../Examples/modules/Checkbox/States/index.js | 9 +- .../Examples/modules/Checkbox/Types/index.js | 10 +- .../modules/Checkbox/Variations/index.js | 5 +- .../Dropdown/Content/DropdownExampleImage.js | 2 +- .../DropdownExampleMultipleSearchInMenu.js | 2 +- .../Types/DropdownExampleSearchDropdown.js | 9 +- .../Types/DropdownExampleSearchInMenu.js | 2 +- .../DropdownExampleMultipleCustomLabel.js | 2 +- .../Dropdown/Usage/DropdownExampleRemote.js | 2 +- .../DropdownExampleSearchInMenuScrolling.js | 2 +- docs/app/Examples/modules/Dropdown/common.js | 2 +- .../Modal/Types/ModalExampleControlled.js | 8 +- .../Modal/Types/ModalExampleMultiple.js | 2 +- .../Modal/Variations/ModalExampleDimmer.js | 2 +- .../Modal/Variations/ModalExampleSize.js | 2 +- .../modules/Popup/Types/PopupExampleTitled.js | 24 +- .../Rating/Types/RatingExampleControlled.js | 2 +- .../Search/Types/SearchExampleCategory.js | 11 +- .../Types/SearchExampleCategoryCustom.js | 4 +- .../Search/Types/SearchExampleStandard.js | 2 +- .../Types/SearchExampleStandardCustom.js | 2 +- docs/app/Layouts/BootstrapMigrationLayout.js | 3 +- docs/app/Layouts/FixedMenuLayout.js | 3 +- docs/app/Layouts/GridLayout.js | 3 +- docs/app/Views/Introduction.js | 16 +- docs/app/Views/Layouts.js | 134 +- docs/app/Views/Usage.js | 43 +- docs/app/index.js | 3 +- docs/app/utils.js | 13 +- examples/webpack1/webpack.config.js | 2 +- examples/webpack2/webpack.config.js | 2 +- gulp/plugins/gulp-react-docgen.js | 16 +- gulp/plugins/util/index.js | 9 +- gulp/plugins/util/parseDocBlock.js | 4 +- gulp/plugins/util/parseType.js | 15 +- gulp/tasks/dll.js | 17 +- gulp/tasks/docs.js | 86 +- gulp/tasks/tsd.js | 12 +- gulp/tasks/umd.js | 19 +- gulpfile.js => gulpfile.babel.js | 4 +- karma.conf.js => karma.conf.babel.js | 36 +- package-lock.json | 2865 ++++++++++------- package.json | 133 +- src/modules/Search/Search.js | 2 +- test/.eslintrc | 46 +- test/specs/modules/Checkbox/Checkbox-test.js | 15 +- test/specs/modules/Embed/Embed-test.js | 2 +- test/specs/modules/Search/Search-test.js | 2 +- webpack.config.js => webpack.config.babel.js | 32 +- webpack.dll.js | 6 +- webpack.umd.config.js | 10 +- 103 files changed, 2338 insertions(+), 1934 deletions(-) rename gulpfile.js => gulpfile.babel.js (78%) rename karma.conf.js => karma.conf.babel.js (63%) rename webpack.config.js => webpack.config.babel.js (90%) diff --git a/.eslintrc b/.eslintrc index 70116a922a..e5aefc29c8 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,53 +1,38 @@ { - "plugins": [ - "jsx-a11y" - ], - "extends": [ - "plugin:jsx-a11y/recommended", - "ta", - "ta/frontend" - ], + "parser": "babel-eslint", + "extends": "airbnb", + "env": { + "browser": true + }, "rules": { - "complexity": [1, 10], + "class-methods-use-this": 0, "consistent-return": 0, - "no-confusing-arrow": 0, - "jsx-a11y/accessible-emoji": 1, - "jsx-a11y/anchor-has-content": 1, - "jsx-a11y/aria-activedescendant-has-tabindex": 1, - "jsx-a11y/aria-props": 1, - "jsx-a11y/aria-proptypes": 1, - "jsx-a11y/aria-role": 1, - "jsx-a11y/aria-unsupported-elements": 1, - "jsx-a11y/click-events-have-key-events": 1, - "jsx-a11y/heading-has-content": 1, - "jsx-a11y/href-no-hash": 1, - "jsx-a11y/html-has-lang": 1, - "jsx-a11y/iframe-has-title": 1, - "jsx-a11y/img-has-alt": 1, - "jsx-a11y/img-redundant-alt": 1, - "jsx-a11y/label-has-for": 1, - "jsx-a11y/lang": 1, - "jsx-a11y/mouse-events-have-key-events": 1, - "jsx-a11y/no-access-key": 1, - "jsx-a11y/no-autofocus": 1, - "jsx-a11y/no-distracting-elements": 1, - "jsx-a11y/no-onchange": 1, - "jsx-a11y/no-redundant-roles": 1, - "jsx-a11y/no-static-element-interactions": 1, - "jsx-a11y/onclick-has-focus": 1, - "jsx-a11y/onclick-has-role": 1, - "jsx-a11y/role-has-required-aria-props": 1, - "jsx-a11y/role-supports-aria-props": 1, - "jsx-a11y/scope": 1, - "jsx-a11y/tabindex-no-positive": 1, - "react/jsx-curly-spacing": 0, - "react/sort-comp": 0, - "semi": [2, "never"], + "complexity": [1, 10], + "global-require": 0, + "jsx-quotes": [2, "prefer-single"], + "max-len": [2, 120, 4], + "no-console": 2, + "no-multi-spaces": [2, { "ignoreEOLComments": true }], + "no-return-assign": [2, "except-parens"], + "no-underscore-dangle": 0, "padded-blocks": [2, { "blocks": "never", "switches": "never", "classes": "never" }], - "valid-jsdoc": 0 + "semi": [2, "never"], + "jsx-a11y/alt-text": 1, + "jsx-a11y/label-has-for": 1, + "jsx-a11y/role-has-required-aria-props": 1, + "import/no-dynamic-require": 0, + "import/no-extraneous-dependencies": 0, + "import/no-unresolved": 0, + "import/no-webpack-loader-syntax": 0, + "import/extensions": 0, + "react/forbid-prop-types": 0, + "react/jsx-filename-extension": [2, { "extensions": [".js"] }], + "react/no-unused-prop-types": 0, + "react/sort-comp": 0, + "react/require-default-props": 0 } } diff --git a/config.js b/config.js index 092060f47e..5a7e5a31b3 100644 --- a/config.js +++ b/config.js @@ -1,15 +1,14 @@ -const path = require('path') +import path from 'path' // ------------------------------------ // Environment vars // ------------------------------------ const env = process.env.NODE_ENV || 'development' const __DEV__ = env === 'development' -const __STAGING__ = env === 'staging' const __TEST__ = env === 'test' const __PROD__ = env === 'production' -let config = { +const envConfig = { env, // ---------------------------------- @@ -27,19 +26,20 @@ let config = { // ------------------------------------ // Paths // ------------------------------------ -const base = (...args) => path.resolve(...[config.path_base, ...args]) +const base = (...args) => path.resolve(...[envConfig.path_base, ...args]) const paths = { base, - src: base.bind(null, config.dir_src), - dist: base.bind(null, config.dir_dist), - dll: base.bind(null, config.dir_dll), - docsDist: base.bind(null, config.dir_docs_dist), - docsSrc: base.bind(null, config.dir_docs_src), - umdDist: base.bind(null, config.dir_umd_dist), + src: base.bind(null, envConfig.dir_src), + dist: base.bind(null, envConfig.dir_dist), + dll: base.bind(null, envConfig.dir_dll), + docsDist: base.bind(null, envConfig.dir_docs_dist), + docsSrc: base.bind(null, envConfig.dir_docs_src), + umdDist: base.bind(null, envConfig.dir_umd_dist), } -config = Object.assign({}, config, { +const config = { + ...envConfig, paths, // ---------------------------------- @@ -51,7 +51,7 @@ config = Object.assign({}, config, { // ---------------------------------- // Compiler Configuration // ---------------------------------- - compiler_devtool: (__DEV__ || __TEST__) && 'cheap-source-map' || __STAGING__ && 'source-map', + compiler_devtool: (__DEV__ || __TEST__) && 'cheap-source-map', compiler_globals: { process: { env: { @@ -59,14 +59,13 @@ config = Object.assign({}, config, { }, }, __DEV__, - __STAGING__, __PATH_SEP__: JSON.stringify(path.sep), __TEST__, __PROD__, }, compiler_hash_type: __PROD__ ? 'chunkhash' : 'hash', compiler_fail_on_warning: __TEST__ || __PROD__, - compiler_output_path: paths.base(config.dir_docs_dist), + compiler_output_path: paths.base(envConfig.dir_docs_dist), compiler_public_path: __PROD__ ? '//raw.github.com/Semantic-Org/Semantic-UI-React/gh-pages/' : '/', compiler_stats: { hash: false, // the hash of the compilation @@ -100,6 +99,6 @@ config = Object.assign({}, config, { 'react-ace', 'react-dom', ], -}) +} -module.exports = config +export default config diff --git a/docs/.eslintrc b/docs/.eslintrc index 10e2d3aff9..17e5c2a381 100644 --- a/docs/.eslintrc +++ b/docs/.eslintrc @@ -1,40 +1,17 @@ { "globals": { "__DEV__": false, - "__STAGING__": false, "__TEST__": false, "__PATH_SEP__": false, "__PROD__": false }, "rules": { - "jsx-a11y/accessible-emoji": 0, - "jsx-a11y/anchor-has-content": 0, - "jsx-a11y/aria-activedescendant-has-tabindex": 0, - "jsx-a11y/aria-props": 0, - "jsx-a11y/aria-proptypes": 0, - "jsx-a11y/aria-role": 0, - "jsx-a11y/aria-unsupported-elements": 0, - "jsx-a11y/click-events-have-key-events": 0, - "jsx-a11y/heading-has-content": 0, + "jsx-a11y/alt-text": 0, "jsx-a11y/href-no-hash": 0, - "jsx-a11y/html-has-lang": 0, - "jsx-a11y/iframe-has-title": 0, - "jsx-a11y/img-has-alt": 0, - "jsx-a11y/img-redundant-alt": 0, "jsx-a11y/label-has-for": 0, - "jsx-a11y/lang": 0, - "jsx-a11y/mouse-events-have-key-events": 0, - "jsx-a11y/no-access-key": 0, - "jsx-a11y/no-autofocus": 0, - "jsx-a11y/no-distracting-elements": 0, - "jsx-a11y/no-onchange": 0, - "jsx-a11y/no-redundant-roles": 0, "jsx-a11y/no-static-element-interactions": 0, - "jsx-a11y/onclick-has-focus": 0, - "jsx-a11y/onclick-has-role": 0, - "jsx-a11y/role-has-required-aria-props": 0, - "jsx-a11y/role-supports-aria-props": 0, - "jsx-a11y/scope": 0, - "jsx-a11y/tabindex-no-positive": 0 + "react/no-array-index-key": 0, + "react/no-render-return-value": 0, + "react/no-unescaped-entities": 0 } } diff --git a/docs/app/Components/ComponentDoc/ComponentDoc.js b/docs/app/Components/ComponentDoc/ComponentDoc.js index 475e794aca..8adb676aed 100644 --- a/docs/app/Components/ComponentDoc/ComponentDoc.js +++ b/docs/app/Components/ComponentDoc/ComponentDoc.js @@ -5,25 +5,25 @@ import React, { Component } from 'react' import DocumentTitle from 'react-document-title' import { Link } from 'react-router-dom' -import ComponentExamples from './ComponentExamples' -import ComponentProps from './ComponentProps' -import docgenInfo from '../../docgenInfo.json' - import { repoURL } from 'docs/app/utils' import { META } from 'src/lib' import * as semanticUIReact from 'src' -import { Divider, Grid, Header, Icon, List } from 'src' +import docgenInfo from '../../docgenInfo.json' +import ComponentExamples from './ComponentExamples' +import ComponentProps from './ComponentProps' + +const { Divider, Grid, Header, Icon, List } = semanticUIReact const docgenPaths = _.keys(docgenInfo) const pathSepRegEx = new RegExp(_.escapeRegExp(__PATH_SEP__), 'g') -const getDocgenPath = (componentName) => _.find(docgenPaths, path => { - return new RegExp(`${__PATH_SEP__}${componentName}.js$`).test(path) -}) +const getDocgenPath = componentName => _.find(docgenPaths, path => ( + new RegExp(`${__PATH_SEP__}${componentName}.js$`).test(path) +)) // no matter the OS path separator, use '/' -const getPosixPath = (componentName) => getDocgenPath(componentName).replace(pathSepRegEx, '/') +const getPosixPath = componentName => getDocgenPath(componentName).replace(pathSepRegEx, '/') const getGithubSourceUrl = (componentName) => { const posixPath = getPosixPath(componentName) @@ -35,9 +35,9 @@ const getGithubEditUrl = (componentName) => { return `${repoURL}/edit/master/${posixPath}` } -const getSemanticUIDocsUrl = (_meta) => { - return `https://semantic-ui.com/${_meta.type}s/${_meta.parent || _meta.name}`.toLowerCase() -} +const getSemanticUIDocsUrl = _meta => ( + `https://semantic-ui.com/${_meta.type}s/${_meta.parent || _meta.name}`.toLowerCase() +) const showPropsStyle = { display: 'inline-flex', @@ -217,7 +217,7 @@ export default class ComponentDoc extends Component { {docgen.docBlock.description || ( Add a description. Instructions are{' '} - + here. {' '}Description is in the SUI Docs, right there diff --git a/docs/app/Components/ComponentDoc/ComponentExample.js b/docs/app/Components/ComponentDoc/ComponentExample.js index 48b92dafca..98352c16f3 100644 --- a/docs/app/Components/ComponentDoc/ComponentExample.js +++ b/docs/app/Components/ComponentDoc/ComponentExample.js @@ -7,10 +7,9 @@ import { renderToStaticMarkup } from 'react-dom/server' import { html } from 'js-beautify' import copyToClipboard from 'copy-to-clipboard' -import { exampleContext, repoURL } from 'docs/app/utils' +import { exampleContext, repoURL, scrollToAnchor } from 'docs/app/utils' import { Divider, Grid, Icon, Header, Menu, Popup } from 'src' import Editor from 'docs/app/Components/Editor/Editor' -import { scrollToAnchor } from 'docs/app/utils' const babelConfig = { presets: ['es2015', 'react', 'stage-1'], @@ -94,7 +93,7 @@ class ComponentExample extends Component { setHashAndScroll = () => { const { history } = this.props - history.replace(location.pathname + '#' + this.anchorName) + history.replace(`${location.pathname}#${this.anchorName}`) scrollToAnchor() } @@ -197,7 +196,7 @@ class ComponentExample extends Component { .replace(/ import/g, '\nimport') // one import per line .split('\n') // split lines .filter(Boolean) // remove empty lines - .map(l => { // rewrite imports to const statements + .map((l) => { // rewrite imports to const statements const [ defaultImport, destructuredImports, @@ -237,7 +236,7 @@ class ComponentExample extends Component { const exampleElement = _.isFunction(Example) ? : Example if (!isValidElement(exampleElement)) { - this.renderError('Default export is not a valid element. Type:' + {}.toString.call(exampleElement)) + this.renderError(`Default export is not a valid element. Type:${{}.toString.call(exampleElement)}`) } else { // immediately render a null error // but also ensure the last debounced error call is a null error diff --git a/docs/app/Components/ComponentDoc/ComponentProps.js b/docs/app/Components/ComponentDoc/ComponentProps.js index e4ee1a3122..2354960af0 100644 --- a/docs/app/Components/ComponentDoc/ComponentProps.js +++ b/docs/app/Components/ComponentDoc/ComponentProps.js @@ -2,7 +2,7 @@ import _ from 'lodash' import PropTypes from 'prop-types' import React, { Component } from 'react' -import { Header, Icon, Popup, Table } from 'src' +import { Icon, Popup, Table } from 'src' const extraDescriptionStyle = { color: '#666', @@ -25,7 +25,7 @@ Extra.propTypes = { title: PropTypes.node, } -const getTagType = tag => tag.type.type === 'AllLiteral' ? 'any' : tag.type.name +const getTagType = tag => (tag.type.type === 'AllLiteral' ? 'any' : tag.type.name) /** * Displays a table of a Component's PropTypes. @@ -48,7 +48,7 @@ export default class ComponentProps extends Component { showEnumsFor: {}, } - toggleEnumsFor = (prop) => () => { + toggleEnumsFor = prop => () => { this.setState({ showEnumsFor: { ...this.state.showEnumsFor, @@ -70,7 +70,7 @@ export default class ComponentProps extends Component { /> ) - renderDefaultValue = item => { + renderDefaultValue = (item) => { const defaultValue = _.get(item, 'defaultValue.value') if (_.isNil(defaultValue)) return null @@ -91,7 +91,7 @@ export default class ComponentProps extends Component { .filter(p => !_.includes(p, '.')) .join(', ') - const tagDescriptionRows = _.compact([...params, returns]).map(tag => { + const tagDescriptionRows = _.compact([...params, returns]).map((tag) => { const name = tag.name || tag.title return (
@@ -143,20 +143,18 @@ export default class ComponentProps extends Component { ) } - renderRow = item => { - return ( - - {this.renderName(item)}{this.renderRequired(item)} - {this.renderDefaultValue(item)} - {item.type} - - {item.description &&

{item.description}

} - {this.renderFunctionSignature(item)} - {this.renderEnums(item)} -
-
- ) - } + renderRow = item => ( + + {this.renderName(item)}{this.renderRequired(item)} + {this.renderDefaultValue(item)} + {item.type} + + {item.description &&

{item.description}

} + {this.renderFunctionSignature(item)} + {this.renderEnums(item)} +
+
+ ) render() { const { props: propsDefinition } = this.props @@ -165,7 +163,7 @@ export default class ComponentProps extends Component { const value = _.get(config, 'type.value') let type = _.get(config, 'type.name') if (type === 'union') { - type = _.map(value, (val) => val.name).join('|') + type = _.map(value, val => val.name).join('|') } type = type && `{${type}}` diff --git a/docs/app/Components/ComponentDoc/ContributionPrompt.js b/docs/app/Components/ComponentDoc/ContributionPrompt.js index 7bff3a7e1f..a5cbd568b1 100644 --- a/docs/app/Components/ComponentDoc/ContributionPrompt.js +++ b/docs/app/Components/ComponentDoc/ContributionPrompt.js @@ -11,9 +11,9 @@ const ContributionPrompt = ({ children }) => (

{children}

If there's no{' '} - pull request{' '} + pull request{' '} open for this, you should{' '} - + contribute !

diff --git a/docs/app/Components/DocsLayout.js b/docs/app/Components/DocsLayout.js index a7ae2a1bd7..f1406a10cb 100644 --- a/docs/app/Components/DocsLayout.js +++ b/docs/app/Components/DocsLayout.js @@ -22,7 +22,7 @@ export default class DocsLayout extends Component { this.resetPage() } - componentDidUpdate(prevProps, prevState) { + componentDidUpdate() { this.resetPage() } @@ -46,7 +46,7 @@ export default class DocsLayout extends Component { this.pathname = location.pathname } - renderChildren = props => { + renderChildren = (props) => { const { component: Children, render } = this.props if (render) return render() diff --git a/docs/app/Components/DocsRoot.js b/docs/app/Components/DocsRoot.js index 09f24690e1..ee2502945c 100644 --- a/docs/app/Components/DocsRoot.js +++ b/docs/app/Components/DocsRoot.js @@ -1,31 +1,27 @@ import _ from 'lodash/fp' import PropTypes from 'prop-types' -import React, { Component } from 'react' +import React from 'react' -import ComponentDoc from '../Components/ComponentDoc/ComponentDoc' import { META } from 'src/lib' import * as semanticUIReact from 'src' +import ComponentDoc from '../Components/ComponentDoc/ComponentDoc' -export default class Root extends Component { - static propTypes = { - children: PropTypes.node, - match: PropTypes.shape({ - params: PropTypes.shape({ - name: PropTypes.string.isRequired, - }), - }), - } +const DocsRoot = (props) => { + const { name } = props.match.params + const componentName = _.startCase(name).replace(/ /g, '') + const component = semanticUIReact[componentName] - render() { - const { name } = this.props.match.params - const componentName = _.startCase(name).replace(/ /g, '') - const component = semanticUIReact[componentName] - if (!component || !component._meta || !META.isParent(component)) { - return null - } + if (!component || !component._meta || !META.isParent(component)) return null + return +} - return ( - - ) - } +DocsRoot.propTypes = { + children: PropTypes.node, + match: PropTypes.shape({ + params: PropTypes.shape({ + name: PropTypes.string.isRequired, + }), + }), } + +export default DocsRoot diff --git a/docs/app/Components/ExternalExampleLayout.js b/docs/app/Components/ExternalExampleLayout.js index d328b9717e..70a9d42429 100644 --- a/docs/app/Components/ExternalExampleLayout.js +++ b/docs/app/Components/ExternalExampleLayout.js @@ -1,34 +1,34 @@ import _ from 'lodash/fp' import PropTypes from 'prop-types' -import React, { Component } from 'react' +import React from 'react' -import PageNotFound from '../Views/PageNotFound' import { exampleContext } from 'docs/app/utils' +import PageNotFound from '../Views/PageNotFound' const exampleKeys = exampleContext.keys() -export default class ExternalExampleLayout extends Component { - static propTypes = { - children: PropTypes.node, - history: PropTypes.object.isRequired, - location: PropTypes.object.isRequired, - match: PropTypes.shape({ - params: PropTypes.shape({ - kebabCaseName: PropTypes.string.isRequired, - }), - }).isRequired, - } - - render() { - const { kebabCaseName } = this.props.match.params - const componentName = _.startCase(kebabCaseName).replace(/ /g, '') - - const componentKey = _.find(_.endsWith(`${componentName}.js`), exampleKeys) - if (!componentKey) return - - const ExampleComponent = exampleContext(componentKey).default - if (!ExampleComponent) return - - return - } +const ExternalExampleLayout = (props) => { + const { kebabCaseName } = props.match.params + const componentName = _.startCase(kebabCaseName).replace(/ /g, '') + + const componentKey = _.find(_.endsWith(`${componentName}.js`), exampleKeys) + if (!componentKey) return + + const ExampleComponent = exampleContext(componentKey).default + if (!ExampleComponent) return + + return +} + +ExternalExampleLayout.propTypes = { + children: PropTypes.node, + history: PropTypes.object.isRequired, + location: PropTypes.object.isRequired, + match: PropTypes.shape({ + params: PropTypes.shape({ + kebabCaseName: PropTypes.string.isRequired, + }), + }).isRequired, } + +export default ExternalExampleLayout diff --git a/docs/app/Components/IconSearch/IconSearch.js b/docs/app/Components/IconSearch/IconSearch.js index 700a10d84a..8d39fd2ce3 100644 --- a/docs/app/Components/IconSearch/IconSearch.js +++ b/docs/app/Components/IconSearch/IconSearch.js @@ -50,7 +50,7 @@ const similarityScore = (strA, strB) => { return _.flow( _.map(a => _.map(b => leven(a, b), bWords)), _.map(_.min), - _.sum + _.sum, )(aWords) } export default class IconSearch extends Component { @@ -65,13 +65,13 @@ export default class IconSearch extends Component { handleIncludeSimilarChange = (e, { checked }) => this.setState({ includeSimilar: checked }) - copy = (text) => () => { + copy = text => () => { copyToClipboard(text) this.setState({ copied: true }) setTimeout(() => this.setState({ copied: false }), 1000) } - renderIconColumn = (name) => ( + renderIconColumn = name => ( { + .filter((name) => { // contains if (name.indexOf(query) !== -1) return true diff --git a/docs/app/Components/LayoutsLayout.js b/docs/app/Components/LayoutsLayout.js index dccc13403f..32a98cb17e 100644 --- a/docs/app/Components/LayoutsLayout.js +++ b/docs/app/Components/LayoutsLayout.js @@ -36,11 +36,11 @@ export default class LayoutsLayout extends Component { scrollTo(0, 0) } - componentDidUpdate(prevProps, prevState) { + componentDidUpdate() { scrollTo(0, 0) } - renderChildren = props => { + renderChildren = (props) => { const { component: Children, computedMatch, render } = this.props if (render) return render() diff --git a/docs/app/Components/LayoutsRoot.js b/docs/app/Components/LayoutsRoot.js index 3a72192d02..96241d15c5 100644 --- a/docs/app/Components/LayoutsRoot.js +++ b/docs/app/Components/LayoutsRoot.js @@ -1,23 +1,23 @@ import _ from 'lodash' import PropTypes from 'prop-types' -import React, { Component } from 'react' +import React from 'react' import * as Layouts from '../Layouts' -export default class LayoutsRoot extends Component { - static propTypes = { - match: PropTypes.shape({ - params: PropTypes.shape({ - name: PropTypes.string.isRequired, - }), - }), - } +const LayoutsRoot = (props) => { + const name = _.get(props, 'match.params.name') + const layoutName = `${_.startCase(name).replace(/ /g, '')}Layout` + const Layout = Layouts[layoutName] - render() { - const name = _.get(this, 'props.match.params.name') - const layoutName = `${_.startCase(name).replace(/ /g, '')}Layout` - const Layout = Layouts[layoutName] + return Layout ? : null +} - return Layout ? : null - } +LayoutsRoot.propTypes = { + match: PropTypes.shape({ + params: PropTypes.shape({ + name: PropTypes.string.isRequired, + }), + }), } + +export default LayoutsRoot diff --git a/docs/app/Components/Logo/Logo.js b/docs/app/Components/Logo/Logo.js index 38c7ab8431..bfeaeaf376 100644 --- a/docs/app/Components/Logo/Logo.js +++ b/docs/app/Components/Logo/Logo.js @@ -1,7 +1,7 @@ import React from 'react' import { Image } from 'src' -const Logo = (props) => +const Logo = props => Logo.propTypes = Image.propTypes diff --git a/docs/app/Components/Sidebar/Sidebar.js b/docs/app/Components/Sidebar/Sidebar.js index 30e202ccfc..155527f479 100644 --- a/docs/app/Components/Sidebar/Sidebar.js +++ b/docs/app/Components/Sidebar/Sidebar.js @@ -15,7 +15,7 @@ import { Input, } from 'src' -const getRoute = (_meta) => `/${_meta.type}s/${_.kebabCase(_meta.name)}` +const getRoute = _meta => `/${_meta.type}s/${_.kebabCase(_meta.name)}` const MenuItem = ({ meta, children, ...rest }) => ( @@ -50,7 +50,7 @@ class Sidebar extends Component { this.setSearchInput() } - componentDidUpdate(prevProps, prevState) { + componentDidUpdate() { this.setSearchInput() } @@ -59,7 +59,8 @@ class Sidebar extends Component { } setSearchInput() { - this._searchInput = findDOMNode(this).querySelector('.ui.input input') + // TODO: Replace findDOMNode with Ref component when it will be merged + this._searchInput = findDOMNode(this).querySelector('.ui.input input') // eslint-disable-line react/no-find-dom-node } handleDocumentKeyDown = (e) => { @@ -83,7 +84,7 @@ class Sidebar extends Component { query: e.target.value, }) - handleSearchKeyDown = e => { + handleSearchKeyDown = (e) => { const { history } = this.props const { selectedItemIndex } = this.state const code = keyboardKey.getCode(e) @@ -123,7 +124,7 @@ class Sidebar extends Component { to={getRoute(_meta)} activeClassName='active' /> - )) + )), )(parentComponents) return ( @@ -142,7 +143,7 @@ class Sidebar extends Component { const startsWithMatches = [] const containsMatches = [] - _.each(component => { + _.each((component) => { if (new RegExp(`^${_.escapeRegExp(query)}`, 'i').test(component._meta.name)) { startsWithMatches.push(component) } else if (new RegExp(_.escapeRegExp(query), 'i').test(component._meta.name)) { @@ -152,7 +153,7 @@ class Sidebar extends Component { this.filteredComponents = [...startsWithMatches, ...containsMatches] const menuItems = _.map(({ _meta }) => { - itemIndex++ + itemIndex += 1 const isSelected = itemIndex === selectedItemIndex if (isSelected) this.selectedRoute = getRoute(_meta) @@ -202,7 +203,7 @@ class Sidebar extends Component { GitHub - + CHANGELOG diff --git a/docs/app/Examples/addons/Portal/Types/PortalExamplePortal.js b/docs/app/Examples/addons/Portal/Types/PortalExamplePortal.js index 5bd6abdb36..a22e92f2a7 100644 --- a/docs/app/Examples/addons/Portal/Types/PortalExamplePortal.js +++ b/docs/app/Examples/addons/Portal/Types/PortalExamplePortal.js @@ -47,9 +47,9 @@ export default class ExamplePortal extends Component { -
-                {log.map((e, i) => 

{e}

)} -
+
+              {log.map((e, i) => 

{e}

)} +
diff --git a/docs/app/Examples/addons/Radio/States/index.js b/docs/app/Examples/addons/Radio/States/index.js index f0b51fe825..822d3b013f 100644 --- a/docs/app/Examples/addons/Radio/States/index.js +++ b/docs/app/Examples/addons/Radio/States/index.js @@ -12,7 +12,11 @@ const RadioStatesExamples = () => ( > Use{' '} - + defaultChecked {' '}as you normally would to set default form values. diff --git a/docs/app/Examples/addons/Radio/Types/index.js b/docs/app/Examples/addons/Radio/Types/index.js index c3110359a1..16ef3706ff 100644 --- a/docs/app/Examples/addons/Radio/Types/index.js +++ b/docs/app/Examples/addons/Radio/Types/index.js @@ -28,7 +28,11 @@ const RadioTypesExamples = () => ( > Radios in a group must be - +  controlled components. diff --git a/docs/app/Examples/addons/Radio/Variations/index.js b/docs/app/Examples/addons/Radio/Variations/index.js index cec0ee8430..d1430f127f 100644 --- a/docs/app/Examples/addons/Radio/Variations/index.js +++ b/docs/app/Examples/addons/Radio/Variations/index.js @@ -12,7 +12,7 @@ const RadioVariationsExamples = () => ( > The{' '} - + fitted {' '}class is automatically applied if there is no label prop. diff --git a/docs/app/Examples/addons/Select/common.js b/docs/app/Examples/addons/Select/common.js index 1dd638893c..662ad43df3 100644 --- a/docs/app/Examples/addons/Select/common.js +++ b/docs/app/Examples/addons/Select/common.js @@ -1,4 +1,4 @@ -export const countryOptions = [ +export const countryOptions = [ // eslint-disable-line import/prefer-default-export { key: 'af', value: 'af', flag: 'af', text: 'Afghanistan' }, { key: 'ax', value: 'ax', flag: 'ax', text: 'Aland Islands' }, { key: 'al', value: 'al', flag: 'al', text: 'Albania' }, diff --git a/docs/app/Examples/behaviors/Visibility/Settings/CallbackFrequencyExample.js b/docs/app/Examples/behaviors/Visibility/Settings/CallbackFrequencyExample.js index 3eeeb5f313..94bc3a1848 100644 --- a/docs/app/Examples/behaviors/Visibility/Settings/CallbackFrequencyExample.js +++ b/docs/app/Examples/behaviors/Visibility/Settings/CallbackFrequencyExample.js @@ -1,5 +1,6 @@ import React, { Component } from 'react' import { Button, Checkbox, Divider, Grid, Segment, Visibility } from 'semantic-ui-react' + import Wireframe from '../Wireframe' export default class VisibilityExample extends Component { diff --git a/docs/app/Examples/collections/Form/FieldVariations/FormExampleWidthField.js b/docs/app/Examples/collections/Form/FieldVariations/FormExampleWidthField.js index d2831ee7c1..1290d0f460 100644 --- a/docs/app/Examples/collections/Form/FieldVariations/FormExampleWidthField.js +++ b/docs/app/Examples/collections/Form/FieldVariations/FormExampleWidthField.js @@ -1,5 +1,5 @@ import React from 'react' -import { Form, Input } from 'semantic-ui-react' +import { Form } from 'semantic-ui-react' const FormExampleWidthField = () => (
diff --git a/docs/app/Examples/collections/Form/Shorthand/FormExampleFieldControlId.js b/docs/app/Examples/collections/Form/Shorthand/FormExampleFieldControlId.js index f0452e53e3..4e54813a1a 100644 --- a/docs/app/Examples/collections/Form/Shorthand/FormExampleFieldControlId.js +++ b/docs/app/Examples/collections/Form/Shorthand/FormExampleFieldControlId.js @@ -9,7 +9,7 @@ const FormExampleFieldControlId = () => ( - + ) export default FormExampleFieldControlId diff --git a/docs/app/Examples/collections/Form/Shorthand/FormExampleSubcomponentId.js b/docs/app/Examples/collections/Form/Shorthand/FormExampleSubcomponentId.js index 4d92cd0aa0..a400eb85de 100644 --- a/docs/app/Examples/collections/Form/Shorthand/FormExampleSubcomponentId.js +++ b/docs/app/Examples/collections/Form/Shorthand/FormExampleSubcomponentId.js @@ -1,13 +1,13 @@ -import React from 'react' -import { Form, Input } from 'semantic-ui-react' - -const FormExampleSubcomponentId = () => ( -
- - - - -
-) - -export default FormExampleSubcomponentId +import React from 'react' +import { Form } from 'semantic-ui-react' + +const FormExampleSubcomponentId = () => ( +
+ + + + +
+) + +export default FormExampleSubcomponentId diff --git a/docs/app/Examples/collections/Form/Shorthand/index.js b/docs/app/Examples/collections/Form/Shorthand/index.js index cdd48affe8..82746567b8 100644 --- a/docs/app/Examples/collections/Form/Shorthand/index.js +++ b/docs/app/Examples/collections/Form/Shorthand/index.js @@ -51,7 +51,7 @@ const FormTypesExamples = () => ( ].join(' ')} examplePath='collections/Form/Shorthand/FormExampleSubcomponentControl' > - + ( ].join(' ')} examplePath='collections/Form/Shorthand/FormExampleFieldControl' > - + ( description='The field control prop also works with HTML tags.' examplePath='collections/Form/Shorthand/FormExampleFieldControlHTML' > - + (
diff --git a/docs/app/Examples/collections/Form/States/FormExampleFieldDisabled.js b/docs/app/Examples/collections/Form/States/FormExampleFieldDisabled.js index 098f944821..6f539e27b1 100644 --- a/docs/app/Examples/collections/Form/States/FormExampleFieldDisabled.js +++ b/docs/app/Examples/collections/Form/States/FormExampleFieldDisabled.js @@ -1,5 +1,5 @@ import React from 'react' -import { Form, Input } from 'semantic-ui-react' +import { Form } from 'semantic-ui-react' const FormExampleFieldDisabled = () => ( diff --git a/docs/app/Examples/collections/Form/States/FormExampleFieldError.js b/docs/app/Examples/collections/Form/States/FormExampleFieldError.js index 727ebaf311..38de2724a4 100644 --- a/docs/app/Examples/collections/Form/States/FormExampleFieldError.js +++ b/docs/app/Examples/collections/Form/States/FormExampleFieldError.js @@ -1,5 +1,5 @@ import React from 'react' -import { Checkbox, Form, Input, Select } from 'semantic-ui-react' +import { Form } from 'semantic-ui-react' const options = [ { key: 'm', text: 'Male', value: 'male' }, diff --git a/docs/app/Examples/collections/Form/States/FormExampleFieldReadOnly.js b/docs/app/Examples/collections/Form/States/FormExampleFieldReadOnly.js index 4076497715..4ee80815f6 100644 --- a/docs/app/Examples/collections/Form/States/FormExampleFieldReadOnly.js +++ b/docs/app/Examples/collections/Form/States/FormExampleFieldReadOnly.js @@ -1,5 +1,5 @@ import React from 'react' -import { Form, Input } from 'semantic-ui-react' +import { Form } from 'semantic-ui-react' const FormExampleFieldReadOnly = () => ( diff --git a/docs/app/Examples/collections/Form/States/FormExampleLoading.js b/docs/app/Examples/collections/Form/States/FormExampleLoading.js index cd234a9df2..218840b4af 100644 --- a/docs/app/Examples/collections/Form/States/FormExampleLoading.js +++ b/docs/app/Examples/collections/Form/States/FormExampleLoading.js @@ -1,5 +1,5 @@ import React from 'react' -import { Button, Form, Input } from 'semantic-ui-react' +import { Button, Form } from 'semantic-ui-react' const FormExampleLoading = () => ( diff --git a/docs/app/Examples/collections/Form/States/FormExampleSuccess.js b/docs/app/Examples/collections/Form/States/FormExampleSuccess.js index 84e3912974..f2d5033dda 100644 --- a/docs/app/Examples/collections/Form/States/FormExampleSuccess.js +++ b/docs/app/Examples/collections/Form/States/FormExampleSuccess.js @@ -1,5 +1,5 @@ import React from 'react' -import { Button, Form, Input, Message } from 'semantic-ui-react' +import { Button, Form, Message } from 'semantic-ui-react' const FormExampleSuccess = () => ( diff --git a/docs/app/Examples/collections/Form/States/FormExampleWarning.js b/docs/app/Examples/collections/Form/States/FormExampleWarning.js index 541746fcd9..c783e901cc 100644 --- a/docs/app/Examples/collections/Form/States/FormExampleWarning.js +++ b/docs/app/Examples/collections/Form/States/FormExampleWarning.js @@ -1,5 +1,5 @@ import React from 'react' -import { Button, Form, Input, Message } from 'semantic-ui-react' +import { Button, Form, Message } from 'semantic-ui-react' const FormExampleWarning = () => ( diff --git a/docs/app/Examples/collections/Form/Usage/FormExampleCaptureValues.js b/docs/app/Examples/collections/Form/Usage/FormExampleCaptureValues.js index f3b771ec97..9246045ac9 100644 --- a/docs/app/Examples/collections/Form/Usage/FormExampleCaptureValues.js +++ b/docs/app/Examples/collections/Form/Usage/FormExampleCaptureValues.js @@ -6,7 +6,7 @@ class FormExampleCaptureValues extends Component { handleChange = (e, { name, value }) => this.setState({ [name]: value }) - handleSubmit = e => { + handleSubmit = () => { const { name, email } = this.state this.setState({ submittedName: name, submittedEmail: email }) diff --git a/docs/app/Examples/collections/Form/Usage/FormExampleClearOnSubmit.js b/docs/app/Examples/collections/Form/Usage/FormExampleClearOnSubmit.js index dd69d2ecf1..6df03430ef 100644 --- a/docs/app/Examples/collections/Form/Usage/FormExampleClearOnSubmit.js +++ b/docs/app/Examples/collections/Form/Usage/FormExampleClearOnSubmit.js @@ -6,7 +6,7 @@ class FormExampleClearOnSubmit extends Component { handleChange = (e, { name, value }) => this.setState({ [name]: value }) - handleSubmit = e => this.setState({ email: '', name: '' }) + handleSubmit = () => this.setState({ email: '', name: '' }) render() { const { name, email } = this.state diff --git a/docs/app/Examples/collections/Form/Usage/index.js b/docs/app/Examples/collections/Form/Usage/index.js index 61d9771bda..6d93d71f28 100644 --- a/docs/app/Examples/collections/Form/Usage/index.js +++ b/docs/app/Examples/collections/Form/Usage/index.js @@ -13,7 +13,11 @@ const FormFormUsageExamples = () => (

Our {''} handles data just like a vanilla React {''}. See React's - + {' '}controlled components{' '} docs for more. diff --git a/docs/app/Examples/collections/Grid/Types/GridExampleGrid.js b/docs/app/Examples/collections/Grid/Types/GridExampleGrid.js index 2ade00fc8f..cd6c1e9e1e 100644 --- a/docs/app/Examples/collections/Grid/Types/GridExampleGrid.js +++ b/docs/app/Examples/collections/Grid/Types/GridExampleGrid.js @@ -2,7 +2,7 @@ import _ from 'lodash' import React from 'react' import { Grid, Image } from 'semantic-ui-react' -const columns = _.times(16, (i) => ( +const columns = _.times(16, i => ( diff --git a/docs/app/Examples/collections/Message/Variations/MessageExampleAttached.js b/docs/app/Examples/collections/Message/Variations/MessageExampleAttached.js index bff7f8892d..cb1ffa9eba 100644 --- a/docs/app/Examples/collections/Message/Variations/MessageExampleAttached.js +++ b/docs/app/Examples/collections/Message/Variations/MessageExampleAttached.js @@ -1,5 +1,5 @@ import React from 'react' -import { Button, Checkbox, Form, Icon, Message } from 'semantic-ui-react' +import { Button, Form, Icon, Message } from 'semantic-ui-react' const MessageExampleAttached = () => (

diff --git a/docs/app/Examples/elements/Button/Usage/ButtonExampleAttachedEvents.js b/docs/app/Examples/elements/Button/Usage/ButtonExampleAttachedEvents.js index 59f38342fb..fb1308c892 100644 --- a/docs/app/Examples/elements/Button/Usage/ButtonExampleAttachedEvents.js +++ b/docs/app/Examples/elements/Button/Usage/ButtonExampleAttachedEvents.js @@ -34,9 +34,9 @@ export default class ButtonExampleAttachedEvents extends Component { -
-                {log.map((e, i) => 

{e}

)} -
+
+              {log.map((e, i) => 

{e}

)} +
diff --git a/docs/app/Examples/elements/Button/Usage/index.js b/docs/app/Examples/elements/Button/Usage/index.js index 5afbd77296..1e08040848 100644 --- a/docs/app/Examples/elements/Button/Usage/index.js +++ b/docs/app/Examples/elements/Button/Usage/index.js @@ -26,6 +26,7 @@ const ButtonUsageExamples = () => ( out more details on {' '} MDN diff --git a/docs/app/Examples/elements/Divider/Variations/DividerExampleFitted.js b/docs/app/Examples/elements/Divider/Variations/DividerExampleFitted.js index b7f51ce858..e7763772c3 100644 --- a/docs/app/Examples/elements/Divider/Variations/DividerExampleFitted.js +++ b/docs/app/Examples/elements/Divider/Variations/DividerExampleFitted.js @@ -1,14 +1,12 @@ -import React, { Component } from 'react' -import { Segment, Divider } from 'semantic-ui-react' +import React from 'react' +import { Divider, Segment } from 'semantic-ui-react' -export default class DividerExampleFitted extends Component { - render() { - return ( - - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore... - - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore... - - ) - } -} +const DividerExampleFitted = () => ( + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore... + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore... + +) + +export default DividerExampleFitted diff --git a/docs/app/Examples/elements/Divider/Variations/DividerExampleHidden.js b/docs/app/Examples/elements/Divider/Variations/DividerExampleHidden.js index 23d516ea3e..8854a5441f 100644 --- a/docs/app/Examples/elements/Divider/Variations/DividerExampleHidden.js +++ b/docs/app/Examples/elements/Divider/Variations/DividerExampleHidden.js @@ -1,14 +1,12 @@ -import React, { Component } from 'react' -import { Segment, Divider } from 'semantic-ui-react' +import React from 'react' +import { Divider, Segment } from 'semantic-ui-react' -export default class DividerExampleHidden extends Component { - render() { - return ( - - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore... - - ) - } -} +const DividerExampleHidden = () => ( + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore... + +) + +export default DividerExampleHidden diff --git a/docs/app/Examples/elements/Divider/Variations/DividerExampleInverted.js b/docs/app/Examples/elements/Divider/Variations/DividerExampleInverted.js index 546dc16551..5b6bf8846b 100644 --- a/docs/app/Examples/elements/Divider/Variations/DividerExampleInverted.js +++ b/docs/app/Examples/elements/Divider/Variations/DividerExampleInverted.js @@ -1,13 +1,11 @@ -import React, { Component } from 'react' -import { Segment, Divider } from 'semantic-ui-react' +import React from 'react' +import { Divider, Segment } from 'semantic-ui-react' -export default class DividerExampleInverted extends Component { - render() { - return ( - - - Horizontal - - ) - } -} +const DividerExampleInverted = () => ( + + + Horizontal + +) + +export default DividerExampleInverted diff --git a/docs/app/Examples/elements/Divider/Variations/DividerExampleSection.js b/docs/app/Examples/elements/Divider/Variations/DividerExampleSection.js index b4f72305dc..6401e29b1f 100644 --- a/docs/app/Examples/elements/Divider/Variations/DividerExampleSection.js +++ b/docs/app/Examples/elements/Divider/Variations/DividerExampleSection.js @@ -1,14 +1,12 @@ -import React, { Component } from 'react' -import { Segment, Divider } from 'semantic-ui-react' +import React from 'react' +import { Divider, Segment } from 'semantic-ui-react' -export default class DividerExampleSection extends Component { - render() { - return ( - - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore... - - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore... - - ) - } -} +const DividerExampleSection = () => ( + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore... + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore... + +) + +export default DividerExampleSection diff --git a/docs/app/Examples/elements/Flag/Types/FlagExampleTable.js b/docs/app/Examples/elements/Flag/Types/FlagExampleTable.js index 331e1448ba..e5ffc444ef 100644 --- a/docs/app/Examples/elements/Flag/Types/FlagExampleTable.js +++ b/docs/app/Examples/elements/Flag/Types/FlagExampleTable.js @@ -248,7 +248,7 @@ const countries = [ { name: 'Zimbabwe', countryCode: 'zw' }, ] -const flagRenderer = (item) => +const flagRenderer = item => const FlagExampleTable = () => ( diff --git a/docs/app/Examples/elements/Icon/index.js b/docs/app/Examples/elements/Icon/index.js index 544a598afa..561e63e387 100644 --- a/docs/app/Examples/elements/Icon/index.js +++ b/docs/app/Examples/elements/Icon/index.js @@ -1,9 +1,10 @@ import React, { Component } from 'react' + +import { Menu } from 'src' +import IconSearch from '../../../Components/IconSearch/IconSearch' import States from './States' import Variations from './Variations' import Groups from './Groups' -import IconSearch from '../../../Components/IconSearch/IconSearch' -import { Menu } from 'src' const tabs = [ 'Icon Set', diff --git a/docs/app/Examples/elements/Image/Types/ImageExampleLink.js b/docs/app/Examples/elements/Image/Types/ImageExampleLink.js index 37f004bad8..45b311ed83 100644 --- a/docs/app/Examples/elements/Image/Types/ImageExampleLink.js +++ b/docs/app/Examples/elements/Image/Types/ImageExampleLink.js @@ -4,7 +4,8 @@ import { Image } from 'semantic-ui-react' const ImageExampleLink = () => ( diff --git a/docs/app/Examples/elements/Input/Usage/InputExampleRefFocus.js b/docs/app/Examples/elements/Input/Usage/InputExampleRefFocus.js index e91630090a..a7b420898b 100644 --- a/docs/app/Examples/elements/Input/Usage/InputExampleRefFocus.js +++ b/docs/app/Examples/elements/Input/Usage/InputExampleRefFocus.js @@ -2,7 +2,7 @@ import React, { Component } from 'react' import { Input, Button } from 'semantic-ui-react' class InputExampleRefFocus extends Component { - handleRef = c => { + handleRef = (c) => { this.inputRef = c } diff --git a/docs/app/Examples/elements/Label/Types/LabelExampleIcon.js b/docs/app/Examples/elements/Label/Types/LabelExampleIcon.js index a0cfcd4329..c6a96a6786 100644 --- a/docs/app/Examples/elements/Label/Types/LabelExampleIcon.js +++ b/docs/app/Examples/elements/Label/Types/LabelExampleIcon.js @@ -5,17 +5,17 @@ const LabelExampleIcon = () => (
-
diff --git a/docs/app/Examples/elements/Label/Types/LabelExampleImage.js b/docs/app/Examples/elements/Label/Types/LabelExampleImage.js index de70485eb8..e5490e614c 100644 --- a/docs/app/Examples/elements/Label/Types/LabelExampleImage.js +++ b/docs/app/Examples/elements/Label/Types/LabelExampleImage.js @@ -9,11 +9,11 @@ const LabelExampleImage = () => ( -