diff --git a/.babelrc b/.babelrc index 0c32e2cb7..bad592287 100644 --- a/.babelrc +++ b/.babelrc @@ -8,7 +8,7 @@ } } ], - "@babel/react" + "@babel/preset-react" ], "plugins": [ "@babel/plugin-transform-template-literals", diff --git a/package.json b/package.json index e86007e3a..e4e3053b5 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,9 @@ { "name": "react-trello", + "version": "2.4.1", "description": "Pluggable components to add a trello like kanban board to your application", "main": "dist/index.js", - "jsnext:main": "src/components/index.js", - "module": "src/components/index.js", "files": [ - "src", "dist", "README" ], @@ -75,6 +73,7 @@ "babel-jest": "^23.6.0", "babel-loader": "^8.0.6", "babel-plugin-module-resolver": "^3.2.0", + "babel-preset-react": "^6.24.1", "codecov.io": "^0.1.6", "commitizen": "^3.1.1", "cz-conventional-changelog": "^2.1.0", diff --git a/src/styles/Base.js b/src/styles/Base.js index 7e5bf5063..559f9fcbe 100644 --- a/src/styles/Base.js +++ b/src/styles/Base.js @@ -1,10 +1,5 @@ -import styled, { css, createGlobalStyle } from 'styled-components' - -import { - PopoverContainer, - PopoverContent, - PopoverTrigger -} from 'react-popopo' +import {PopoverContainer, PopoverContent} from 'react-popopo' +import styled, {createGlobalStyle, css} from 'styled-components' export const GlobalStyle = createGlobalStyle` .comPlainTextContentEditable { @@ -63,22 +58,23 @@ export const CustomPopoverContent = styled(PopoverContent)` padding: 5px; left: 50%; transform: translateX(-50%); - ${props => props.active && ` + ${props => + props.active && + ` visibility: visible; opacity: 1; transition-delay: 100ms; - `} - &::before { + `} &::before { visibility: hidden; } a { color: rgba(255, 255, 255, 0.56); - padding: .5em 1em; + padding: 0.5em 1em; margin: 0; text-decoration: none; &:hover { background-color: #00bcd4 !important; - color: #37474F; + color: #37474f; } } ` @@ -115,15 +111,16 @@ export const Section = styled.section` export const LaneHeader = styled(Header)` margin-bottom: 0px; - ${props => props.editLaneTitle && css` - padding: 0px; - line-height: 30px; - ` - } - ${props => !props.editLaneTitle && css` - padding: 0px 5px; - ` - } + ${props => + props.editLaneTitle && + css` + padding: 0px; + line-height: 30px; + `} ${props => + !props.editLaneTitle && + css` + padding: 0px 5px; + `}; ` export const LaneFooter = styled.div` @@ -280,13 +277,13 @@ export const InlineInput = styled.textarea` border: 0; padding: 4px 8px; outline: 0; - ${props => props.border && css` - &:focus { - box-shadow: inset 0 0 0 2px #0079bf; - } - ` - } - &:focus { + ${props => + props.border && + css` + &:focus { + box-shadow: inset 0 0 0 2px #0079bf; + } + `} &:focus { background-color: white; } ` diff --git a/tests/__snapshots__/Storyshots.test.js.snap b/tests/__snapshots__/Storyshots.test.js.snap index 366cb474b..795540bea 100644 --- a/tests/__snapshots__/Storyshots.test.js.snap +++ b/tests/__snapshots__/Storyshots.test.js.snap @@ -21578,7 +21578,7 @@ exports[`Storyshots Custom Components NewLaneForm 1`] = ` .c8 a { color: rgba(255,255,255,0.56); - padding: .5em 1em; + padding: 0.5em 1em; margin: 0; -webkit-text-decoration: none; text-decoration: none; @@ -21586,7 +21586,7 @@ exports[`Storyshots Custom Components NewLaneForm 1`] = ` .c8 a:hover { background-color: #00bcd4 !important; - color: #37474F; + color: #37474f; } .c0 { @@ -22754,7 +22754,7 @@ exports[`Storyshots Custom Components NewLaneSection 1`] = ` .c8 a { color: rgba(255,255,255,0.56); - padding: .5em 1em; + padding: 0.5em 1em; margin: 0; -webkit-text-decoration: none; text-decoration: none; @@ -22762,7 +22762,7 @@ exports[`Storyshots Custom Components NewLaneSection 1`] = ` .c8 a:hover { background-color: #00bcd4 !important; - color: #37474F; + color: #37474f; } .c0 { @@ -32136,7 +32136,7 @@ exports[`Storyshots Editable Board Add New Lane 1`] = ` .c8 a { color: rgba(255,255,255,0.56); - padding: .5em 1em; + padding: 0.5em 1em; margin: 0; -webkit-text-decoration: none; text-decoration: none; @@ -32144,7 +32144,7 @@ exports[`Storyshots Editable Board Add New Lane 1`] = ` .c8 a:hover { background-color: #00bcd4 !important; - color: #37474F; + color: #37474f; } .c0 { @@ -37154,7 +37154,7 @@ exports[`Storyshots Editable Board Inline Edit Lane Title 1`] = ` .c9 a { color: rgba(255,255,255,0.56); - padding: .5em 1em; + padding: 0.5em 1em; margin: 0; -webkit-text-decoration: none; text-decoration: none; @@ -37162,7 +37162,7 @@ exports[`Storyshots Editable Board Inline Edit Lane Title 1`] = ` .c9 a:hover { background-color: #00bcd4 !important; - color: #37474F; + color: #37474f; } .c0 { @@ -38409,7 +38409,7 @@ exports[`Storyshots I18n Custom texts 1`] = ` .c8 a { color: rgba(255,255,255,0.56); - padding: .5em 1em; + padding: 0.5em 1em; margin: 0; -webkit-text-decoration: none; text-decoration: none; @@ -38417,7 +38417,7 @@ exports[`Storyshots I18n Custom texts 1`] = ` .c8 a:hover { background-color: #00bcd4 !important; - color: #37474F; + color: #37474f; } .c0 { @@ -39597,7 +39597,7 @@ exports[`Storyshots I18n Flat translation table 1`] = ` .c8 a { color: rgba(255,255,255,0.56); - padding: .5em 1em; + padding: 0.5em 1em; margin: 0; -webkit-text-decoration: none; text-decoration: none; @@ -39605,7 +39605,7 @@ exports[`Storyshots I18n Flat translation table 1`] = ` .c8 a:hover { background-color: #00bcd4 !important; - color: #37474F; + color: #37474f; } .c0 { @@ -40785,7 +40785,7 @@ exports[`Storyshots I18n Using i18next 1`] = ` .c8 a { color: rgba(255,255,255,0.56); - padding: .5em 1em; + padding: 0.5em 1em; margin: 0; -webkit-text-decoration: none; text-decoration: none; @@ -40793,7 +40793,7 @@ exports[`Storyshots I18n Using i18next 1`] = ` .c8 a:hover { background-color: #00bcd4 !important; - color: #37474F; + color: #37474f; } .c0 { diff --git a/yarn.lock b/yarn.lock index aaa234c3d..5383c9439 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2760,6 +2760,15 @@ babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: babel-runtime "^6.22.0" babel-types "^6.24.1" +babel-helper-builder-react-jsx@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz#39ff8313b75c8b65dceff1f31d383e0ff2a408a0" + integrity sha1-Of+DE7dci2Xc7/HzHTg+D/KkCKA= + dependencies: + babel-runtime "^6.26.0" + babel-types "^6.26.0" + esutils "^2.0.2" + babel-helper-call-delegate@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" @@ -3171,7 +3180,7 @@ babel-plugin-syntax-flow@^6.18.0: resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" integrity sha1-TDqyCiryaqIM0lmVw5jE63AxDI0= -babel-plugin-syntax-jsx@^6.18.0: +babel-plugin-syntax-jsx@^6.18.0, babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" integrity sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY= @@ -3441,7 +3450,7 @@ babel-plugin-transform-export-extensions@^6.22.0: babel-plugin-syntax-export-extensions "^6.8.0" babel-runtime "^6.22.0" -babel-plugin-transform-flow-strip-types@^6.8.0: +babel-plugin-transform-flow-strip-types@^6.22.0, babel-plugin-transform-flow-strip-types@^6.8.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" integrity sha1-hMtnKTXUNxT9wyvOhFaNh0Qc988= @@ -3484,6 +3493,38 @@ babel-plugin-transform-property-literals@^6.9.4: dependencies: esutils "^2.0.2" +babel-plugin-transform-react-display-name@^6.23.0: + version "6.25.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz#67e2bf1f1e9c93ab08db96792e05392bf2cc28d1" + integrity sha1-Z+K/Hx6ck6sI25Z5LgU5K/LMKNE= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-react-jsx-self@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz#df6d80a9da2612a121e6ddd7558bcbecf06e636e" + integrity sha1-322AqdomEqEh5t3XVYvL7PBuY24= + dependencies: + babel-plugin-syntax-jsx "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-react-jsx-source@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz#66ac12153f5cd2d17b3c19268f4bf0197f44ecd6" + integrity sha1-ZqwSFT9c0tF7PBkmj0vwGX9E7NY= + dependencies: + babel-plugin-syntax-jsx "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-react-jsx@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz#840a028e7df460dfc3a2d29f0c0d91f6376e66a3" + integrity sha1-hAoCjn30YN/DotKfDA2R9jduZqM= + dependencies: + babel-helper-builder-react-jsx "^6.24.1" + babel-plugin-syntax-jsx "^6.8.0" + babel-runtime "^6.22.0" + babel-plugin-transform-react-remove-prop-types@0.4.18: version "0.4.18" resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-remove-prop-types/-/babel-plugin-transform-react-remove-prop-types-0.4.18.tgz#85ff79d66047b34288c6f7cc986b8854ab384f8c" @@ -3575,6 +3616,13 @@ babel-preset-es2015@^6.9.0: babel-plugin-transform-es2015-unicode-regex "^6.24.1" babel-plugin-transform-regenerator "^6.24.1" +babel-preset-flow@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz#e71218887085ae9a24b5be4169affb599816c49d" + integrity sha1-5xIYiHCFrpoktb5Baa/7WZgWxJ0= + dependencies: + babel-plugin-transform-flow-strip-types "^6.22.0" + babel-preset-jest@^23.2.0: version "23.2.0" resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-23.2.0.tgz#8ec7a03a138f001a1a8fb1e8113652bf1a55da46" @@ -3645,6 +3693,18 @@ babel-preset-react-app@^6.1.0: babel-plugin-macros "2.4.2" babel-plugin-transform-react-remove-prop-types "0.4.18" +babel-preset-react@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-react/-/babel-preset-react-6.24.1.tgz#ba69dfaea45fc3ec639b6a4ecea6e17702c91380" + integrity sha1-umnfrqRfw+xjm2pOzqbhdwLJE4A= + dependencies: + babel-plugin-syntax-jsx "^6.3.13" + babel-plugin-transform-react-display-name "^6.23.0" + babel-plugin-transform-react-jsx "^6.24.1" + babel-plugin-transform-react-jsx-self "^6.22.0" + babel-plugin-transform-react-jsx-source "^6.22.0" + babel-preset-flow "^6.23.0" + babel-preset-stage-1@^6.5.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz#7692cd7dcd6849907e6ae4a0a85589cfb9e2bfb0"