diff --git a/README.md b/README.md index e44878eb..8840b422 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,9 @@ [![codecov](https://img.shields.io/codecov/c/github/pradel/react-responsive-modal/master.svg)](https://codecov.io/gh/pradel/react-responsive-modal) [![dependencies Status](https://david-dm.org/pradel/react-responsive-modal/status.svg)](https://david-dm.org/pradel/react-responsive-modal) -A simple responsive react modal compatible with React 15, 16 and ready for React 17. +A simple responsive and accessible react modal compatible with React 16 and ready for React 17. +- Focus trap inside the modal. - Centered modals. - Scrolling modals. - Multiple modals. @@ -98,6 +99,12 @@ ReactDOM.render(, document.getElementById('app')); | blockScroll | `bool` | `true` | Whether to block scrolling when dialog is open | | focusTrapped | `bool` | `false` | When the modal is open, trap focus within it | | focusTrapOptions | `object` | | Options to be passed to the focus trap, details available at https://github.com/davidtheclark/focus-trap#focustrap--createfocustrapelement-createoptions | +| overlayId | `string` | `null` | id attribute for overlay | +| modalId | `string` | `null` | id attribute for modal | +| closeIconId | `string` | `null` | id attribute for close icon | +| role | `string` | `'dialog'` | ARIA role for modal | +| ariaLabelledby | `string` | | ARIA label for modal | +| ariaDescribedby | `string` | | ARIA description for modal | diff --git a/__tests__/__snapshots__/modal.js.snap b/__tests__/__snapshots__/modal.js.snap index 5268a4e2..4baae5e2 100644 --- a/__tests__/__snapshots__/modal.js.snap +++ b/__tests__/__snapshots__/modal.js.snap @@ -19,7 +19,6 @@ exports[`modal render should render the content 1`] = ` "transitionExitActive": "test-react-responsive-modal-transition-exit-active", } } - closeIconId={null} closeIconSize={28} closeIconSvgPath={ - - + +
+
+ } + > + - - + } + id={null} + onClickCloseIcon={[Function]} + styles={Object {}} + > + + + + - - -
+ + +
`; diff --git a/__tests__/modal.js b/__tests__/modal.js index e0e82572..288a5b35 100644 --- a/__tests__/modal.js +++ b/__tests__/modal.js @@ -137,7 +137,12 @@ describe('modal', () => { describe('closeIcon', () => { it('should hide closeIcon when showCloseIcon is false', () => { const wrapper = mount( - +
modal content
); diff --git a/docs/index.mdx b/docs/index.mdx index a7d0bb8b..9df65e98 100644 --- a/docs/index.mdx +++ b/docs/index.mdx @@ -9,8 +9,9 @@ import Modal from '../src/modal.js'; # react-responsive-modal -A simple responsive react modal compatible with React 15, 16 and ready for React 17. +A simple responsive and accessible react modal compatible with React 16 and ready for React 17. +- Focus trap inside the modal. - Centered modals. - Scrolling modals. - Multiple modals. diff --git a/package.json b/package.json index 36c11209..94e02773 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "react-responsive-modal", "version": "3.6.0", - "description": "A simple responsive react modal", + "description": "A simple responsive and accessible react modal", "main": "lib/index.js", "module": "lib/index.es.js", "jsnext:main": "lib/index.es.js", @@ -59,13 +59,11 @@ "focus-trap-react": "^4.0.1", "no-scroll": "^2.1.1", "prop-types": "^15.6.2", - "react-lifecycles-compat": "^3.0.4", - "react-minimalist-portal": "^2.3.1", - "react-transition-group": "^2.4.0" + "react-transition-group": "^4.0.0" }, "peerDependencies": { - "react": "^15.0.0 || ^16.0.0", - "react-dom": "^15.0.0 || ^16.0.0" + "react": "^16.6.0", + "react-dom": "^16.6.0" }, "devDependencies": { "@babel/cli": "7.4.4", @@ -73,7 +71,7 @@ "@babel/plugin-proposal-class-properties": "7.4.4", "@babel/preset-env": "7.4.4", "@babel/preset-react": "7.0.0", - "@types/react": "16.8.16", + "@types/react": "16.8.17", "@types/react-dom": "16.8.4", "babel-eslint": "10.0.1", "babel-jest": "24.8.0", @@ -111,7 +109,7 @@ "size-limit": [ { "path": "lib/index.js", - "limit": "9 KB" + "limit": "8 KB" } ], "license": "MIT" diff --git a/src/modal.js b/src/modal.js index 50242b3e..456a7354 100644 --- a/src/modal.js +++ b/src/modal.js @@ -1,7 +1,6 @@ import React, { Component } from 'react'; +import ReactDom from 'react-dom'; import PropTypes from 'prop-types'; -import { polyfill } from 'react-lifecycles-compat'; -import Portal from 'react-minimalist-portal'; import CSSTransition from 'react-transition-group/CSSTransition'; import cx from 'classnames'; import noScroll from 'no-scroll'; @@ -10,16 +9,29 @@ import CloseIcon from './close-icon'; import modalManager from './modal-manager'; import cssClasses from './styles.css'; +const isBrowser = typeof window !== 'undefined'; + class Modal extends Component { static blockScroll() { noScroll.on(); } + static unblockScroll = () => { + // Restore the scroll only if there is no modal on the screen + if (modalManager.modals().length === 0) { + noScroll.off(); + } + }; + shouldClose = null; - state = { - showPortal: this.props.open, - }; + constructor(props) { + super(props); + this.container = isBrowser && document.createElement('div'); + this.state = { + showPortal: this.props.open, + }; + } componentDidMount() { // Block scroll when initial prop is open @@ -37,7 +49,7 @@ class Modal extends Component { } componentWillUnmount() { - if (this.props.open) { + if (this.state.showPortal) { this.handleClose(); } } @@ -53,6 +65,9 @@ class Modal extends Component { handleOpen = () => { modalManager.add(this); + if (isBrowser && !this.props.container) { + document.body.appendChild(this.container); + } if (this.props.blockScroll) { Modal.blockScroll(); } @@ -62,7 +77,10 @@ class Modal extends Component { handleClose = () => { modalManager.remove(this); if (this.props.blockScroll) { - this.unblockScroll(); + Modal.unblockScroll(); + } + if (isBrowser && !this.props.container) { + document.body.removeChild(this.container); } document.removeEventListener('keydown', this.handleKeydown); }; @@ -125,14 +143,7 @@ class Modal extends Component { this.setState({ showPortal: false }); if (this.props.blockScroll) { - this.unblockScroll(); - } - }; - - unblockScroll = () => { - // Restore the scroll only if there is no modal on the screen - if (modalManager.modals().length === 0) { - noScroll.off(); + Modal.unblockScroll(); } }; @@ -147,12 +158,14 @@ class Modal extends Component { closeIconSize, closeIconSvgPath, animationDuration, - container, focusTrapped, focusTrapOptions, overlayId, modalId, closeIconId, + role, + ariaLabelledby, + ariaDescribedby, } = this.props; const { showPortal } = this.state; @@ -160,91 +173,80 @@ class Modal extends Component { return null; } - return ( - - + {this.props.children} + {showCloseIcon && ( + + )} + + ); + + return ReactDom.createPortal( + +
{focusTrapped ? ( -
- - {this.props.children} - {showCloseIcon && ( - - )} - -
+ {content} + ) : ( -
- {this.props.children} - {showCloseIcon && ( - - )} -
+ content )}
- - +
+
, + this.props.container || this.container ); } } @@ -346,16 +348,28 @@ Modal.propTypes = { * id attribute for close icon */ closeIconId: PropTypes.string, + /** + * ARIA role for modal + */ + role: PropTypes.string, + /** + * ARIA label for modal + */ + ariaLabelledby: PropTypes.string, + /** + * ARIA description for modal + */ + ariaDescribedby: PropTypes.string, }; Modal.defaultProps = { classes: cssClasses, closeOnEsc: true, closeOnOverlayClick: true, - onEntered: null, - onExited: null, - onEscKeyDown: null, - onOverlayClick: null, + onEntered: undefined, + onExited: undefined, + onEscKeyDown: undefined, + onOverlayClick: undefined, showCloseIcon: true, closeIconSize: 28, closeIconSvgPath: ( @@ -367,13 +381,14 @@ Modal.defaultProps = { center: false, animationDuration: 500, blockScroll: true, - focusTrapped: false, + focusTrapped: true, focusTrapOptions: {}, - overlayId: null, - modalId: null, - closeIconId: null, + overlayId: undefined, + modalId: undefined, + closeIconId: undefined, + role: 'dialog', + ariaLabelledby: undefined, + ariaDescribedby: undefined, }; -polyfill(Modal); - export default Modal; diff --git a/types/index.d.ts b/types/index.d.ts index 98efa3a1..64933a8c 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -94,6 +94,18 @@ interface Props { * id attribute for close icon */ closeIconId?: string; + /** + * ARIA role for modal + */ + role?: string; + /** + * ARIA label for modal + */ + ariaLabelledby?: string; + /** + * ARIA description for modal + */ + ariaDescribedby?: string; } declare const ReactReponsiveModal: React.ComponentType; diff --git a/yarn.lock b/yarn.lock index 23a88098..7a224bfe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1565,11 +1565,11 @@ loader-utils "^1.1.0" "@mdx-js/loader@^1.0.16": - version "1.0.16" - resolved "https://registry.yarnpkg.com/@mdx-js/loader/-/loader-1.0.16.tgz#e72b3a9b422481747df2b990f91f8a434fe5e9c1" - integrity sha512-KHfhPEThHAkiUYDl+fRl2imd8iQoaBWqd6dOEOHirT86WGSX/oagtuOGERuM/3nl5tPGFnlzs7ylk8m6VHLWbQ== + version "1.0.18" + resolved "https://registry.yarnpkg.com/@mdx-js/loader/-/loader-1.0.18.tgz#c7a6ddd804e535425ae0f6b2d816a9b7a43e691b" + integrity sha512-dvuZCeEVqeF3UmWnQN6XQD6OEYwCkablZhRAhXNUfWuguUbGBIy3d1GtQB5NtZG9CCaeR7kRDNmMO2lmSFPXeg== dependencies: - "@mdx-js/mdx" "^1.0.16" + "@mdx-js/mdx" "^1.0.18" "@mdx-js/react" "^1.0.16" loader-utils "^1.1.0" @@ -1587,10 +1587,10 @@ unified "^6.1.6" unist-util-visit "^1.3.0" -"@mdx-js/mdx@^1.0.16": - version "1.0.16" - resolved "https://registry.yarnpkg.com/@mdx-js/mdx/-/mdx-1.0.16.tgz#cfeca91a70b37bc5bfcf6f8e94dbf16048f1531e" - integrity sha512-d4YD7utmW850UVQdb4GjD6MRnRlB5NspheS6x48PiewuW7DuoNPTEnQ+ZjJYzZg5dWRy52yWtaZvDj39a7DMgg== +"@mdx-js/mdx@^1.0.18": + version "1.0.18" + resolved "https://registry.yarnpkg.com/@mdx-js/mdx/-/mdx-1.0.18.tgz#42bb35e36b7566aed88c5c11a381705f974bc03b" + integrity sha512-KO2odMrZC77Yf9bhL0Qu0GtvVivVV6dL5DWJeuMeSkc9wkL9fBT06re67TfgeJ37R+lyslkG+uPUahIj4/SOoQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-jsx" "^7.2.0" @@ -1600,7 +1600,7 @@ hast-util-raw "^5.0.0" lodash.uniq "^4.5.0" mdast-util-to-hast "^4.0.0" - remark-mdx "^1.0.15" + remark-mdx "^1.0.18" remark-parse "^6.0.0" remark-squeeze-paragraphs "^3.0.1" to-style "^1.3.3" @@ -1919,10 +1919,10 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@16.8.16": - version "16.8.16" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.8.16.tgz#2bf980b4fb29cceeb01b2c139b3e185e57d3e08e" - integrity sha512-A0+6kS6zwPtvubOLiCJmZ8li5bm3wKIkoKV0h3RdMDOnCj9cYkUnj3bWbE03/lcICdQmwBmUfoFiHeNhbFiyHQ== +"@types/react@*", "@types/react@16.8.17": + version "16.8.17" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.8.17.tgz#f287b76a5badb93bc9aa3f54521a3eb53d6c2374" + integrity sha512-pln3mgc6VfkNg92WXODul/ONo140huK9OMsx62GlBlZ2lvjNK86PQJhYMPLO1i66aF5O9OPyZefogvNltBIszA== dependencies: "@types/prop-types" "*" csstype "^2.2.0" @@ -3471,9 +3471,9 @@ caseless@~0.12.0: integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= ccount@^1.0.0, ccount@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.0.3.tgz#f1cec43f332e2ea5a569fd46f9f5bde4e6102aff" - integrity sha512-Jt9tIBkRc9POUof7QA/VwWd+58fKkEEfI+/t1/eOlxKM7ZhrczNzMFefge7Ai+39y1pR/pP6cI19guHy3FSLmw== + version "1.0.4" + resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.0.4.tgz#9cf2de494ca84060a2a8d2854edd6dfb0445f386" + integrity sha512-fpZ81yYfzentuieinmGnphk0pLkOTMm6MZdVqwd77ROvhko6iujLNGrHH5E7utq3ygWklwfmwuG+A7P+NpqT6w== chalk@1.1.3, chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" @@ -3525,19 +3525,19 @@ character-entities-html4@^1.0.0: integrity sha512-SwnyZ7jQBCRHELk9zf2CN5AnGEc2nA+uKMZLHvcqhpPprjkYhiLn0DywMHgN5ttFZuITMATbh68M6VIVKwJbcg== character-entities-legacy@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-1.1.2.tgz#7c6defb81648498222c9855309953d05f4d63a9c" - integrity sha512-9NB2VbXtXYWdXzqrvAHykE/f0QJxzaKIpZ5QzNZrrgQ7Iyxr2vnfS8fCBNVW9nUEZE0lo57nxKRqnzY/dKrwlA== + version "1.1.3" + resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-1.1.3.tgz#3c729991d9293da0ede6dddcaf1f2ce1009ee8b4" + integrity sha512-YAxUpPoPwxYFsslbdKkhrGnXAtXoHNgYjlBM3WMXkWGTl5RsY3QmOyhwAgL8Nxm9l5LBThXGawxKPn68y6/fww== character-entities@^1.0.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-1.2.2.tgz#58c8f371c0774ef0ba9b2aca5f00d8f100e6e363" - integrity sha512-sMoHX6/nBiy3KKfC78dnEalnpn0Az0oSNvqUWYTtYrhRI5iUIYsROU48G+E+kMFQzqXaJ8kHJZ85n7y6/PHgwQ== + version "1.2.3" + resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-1.2.3.tgz#bbed4a52fe7ef98cc713c6d80d9faa26916d54e6" + integrity sha512-yB4oYSAa9yLcGyTbB4ItFwHw43QHdH129IJ5R+WvxOkWlyFnR5FAaBNnUq4mcxsTVZGh28bHoeTHMKXH1wZf3w== character-reference-invalid@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-1.1.2.tgz#21e421ad3d84055952dab4a43a04e73cd425d3ed" - integrity sha512-7I/xceXfKyUJmSAn/jw8ve/9DyOP7XxufNYLI9Px7CmsKgEUaZLUTax6nZxGQtaoiZCjpu6cHPj20xC/vqRReQ== + version "1.1.3" + resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-1.1.3.tgz#1647f4f726638d3ea4a750cf5d1975c1c7919a85" + integrity sha512-VOq6PRzQBam/8Jm6XBGk2fNEnHXAdGd6go0rtd4weAGECBamHDwwCQSOT12TACIYUZegUXnV6xBXqUssijtxIg== chardet@^0.4.0: version "0.4.2" @@ -4390,9 +4390,9 @@ css-selector-tokenizer@^0.7.0: regexpu-core "^1.0.0" css-to-react-native@^2.2.2: - version "2.3.0" - resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-2.3.0.tgz#bf80d24ec4a08e430306ef429c0586e6ed5485f7" - integrity sha512-IhR7bNIrCFwbJbKZOAjNDZdwpsbjTN6f1agXeELHDqg1wHPA8c2QLruttKOW7hgMGetkfraRJCIEMrptifBfVw== + version "2.3.1" + resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-2.3.1.tgz#cf0f61e0514846e2d4dc188b0886e29d8bef64a2" + integrity sha512-yO+oEx1Lf+hDKasqQRVrAvzMCz825Huh1VMlEEDlRWyAhFb/FWb6I0KpEF1PkyKQ7NEdcx9d5M2ZEWgJAsgPvQ== dependencies: camelize "^1.0.0" css-color-keywords "^1.0.0" @@ -5378,9 +5378,9 @@ ejs@^2.6.1: integrity sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ== electron-to-chromium@^1.3.122, electron-to-chromium@^1.3.127: - version "1.3.131" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.131.tgz#205a0b7a276b3f56bc056f19178909243054252a" - integrity sha512-NSO4jLeyGLWrT4mzzfYX8vt1MYCoMI5LxSYAjt0H9+LF/14JyiKJSyyjA6AJTxflZlEM5v3QU33F0ohbPMCAPg== + version "1.3.133" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.133.tgz#c47639c19b91feee3e22fad69f5556142007008c" + integrity sha512-lyoC8aoqbbDqsprb6aPdt9n3DpOZZzdz/T4IZKsR0/dkZIxnJVUjjcpOSwA66jPRIOyDAamCTAUqweU05kKNSg== elliptic@^6.0.0: version "6.4.1" @@ -6146,9 +6146,9 @@ fastparse@^1.1.1: integrity sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ== fault@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/fault/-/fault-1.0.2.tgz#c3d0fec202f172a3a4d414042ad2bb5e2a3ffbaa" - integrity sha512-o2eo/X2syzzERAtN5LcGbiVQ0WwZSlN3qLtadwAz3X8Bu+XWD16dja/KMsjZLiQr+BLGPDnHGkc4yUJf1Xpkpw== + version "1.0.3" + resolved "https://registry.yarnpkg.com/fault/-/fault-1.0.3.tgz#4da88cf979b6b792b4e13c7ec836767725170b7e" + integrity sha512-sfFuP4X0hzrbGKjAUNXYvNqsZ5F6ohx/dZ9I0KQud/aiZNwg263r5L9yGB0clvXHCkzXh5W3t7RSHchggYIFmA== dependencies: format "^0.2.2" @@ -6682,9 +6682,9 @@ glob@7.0.x: path-is-absolute "^1.0.0" glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@~7.1.1: - version "7.1.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" - integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== + version "7.1.4" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" + integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -9240,9 +9240,9 @@ map-visit@^1.0.0: object-visit "^1.0.0" markdown-escapes@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/markdown-escapes/-/markdown-escapes-1.0.2.tgz#e639cbde7b99c841c0bacc8a07982873b46d2122" - integrity sha512-lbRZ2mE3Q9RtLjxZBZ9+IMl68DKIXaVAhwvwn9pmjnPLS0h/6kyBMgNhqi1xFJ/2yv6cSyv0jbiZavZv93JkkA== + version "1.0.3" + resolved "https://registry.yarnpkg.com/markdown-escapes/-/markdown-escapes-1.0.3.tgz#6155e10416efaafab665d466ce598216375195f5" + integrity sha512-XUi5HJhhV5R74k8/0H2oCbCiYf/u4cO/rX8tnGkRvrqhsr5BRNU6Mg0yt/8UIx1iIS8220BNJsDb7XnILhLepw== markdown-table@^0.4.0: version "0.4.0" @@ -11700,13 +11700,6 @@ react-live@2.0.1: react-simple-code-editor "^0.9.0" unescape "^0.2.0" -react-minimalist-portal@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/react-minimalist-portal/-/react-minimalist-portal-2.3.1.tgz#4853e3f48a74a32c1b8767601887cdf7941eeba3" - integrity sha1-SFPj9Ip0oywbh2dgGIfN95Qe66M= - dependencies: - prop-types "^15.6.1" - react-perfect-scrollbar@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/react-perfect-scrollbar/-/react-perfect-scrollbar-1.5.0.tgz#bac28b9f566879b7c546a63f3935a04ea0f1ae19" @@ -11730,15 +11723,14 @@ react-test-renderer@^16.0.0-0: react-is "^16.8.6" scheduler "^0.13.6" -react-transition-group@^2.4.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-2.9.0.tgz#df9cdb025796211151a436c69a8f3b97b5b07c8d" - integrity sha512-+HzNTCHpeQyl4MJ/bdE0u6XRMe9+XG/+aL4mCxVN4DnPBQ0/5bfHWPDuOZUzYdMj94daZaZdCCc1Dzt9R/xSSg== +react-transition-group@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.0.0.tgz#1d82b20d78aa09eac6268ceef0349307146942c6" + integrity sha512-b+uvkr15Pb80mqcsz5WAB+d53zS8/pTp3wDEsOiqpea93G8BqfsMFcPv2XZR0owqU13BJWoJvd17VjOPEY/9aA== dependencies: dom-helpers "^3.4.0" loose-envify "^1.4.0" prop-types "^15.6.2" - react-lifecycles-compat "^3.0.4" react@16.8.6, react@^16.8.6: version "16.8.6" @@ -12168,10 +12160,10 @@ remark-frontmatter@^1.2.0, remark-frontmatter@^1.2.1, remark-frontmatter@^1.3.1: fault "^1.0.1" xtend "^4.0.1" -remark-mdx@^1.0.15: - version "1.0.15" - resolved "https://registry.yarnpkg.com/remark-mdx/-/remark-mdx-1.0.15.tgz#6f2de2dcf3b94d5ed027d4140e1bd9c748c26a73" - integrity sha512-X9nQjfHLettXJ+DqIzHwLU6sIVFCjseJlCyaNsLVrIIRqxRcwm4MKifw1jcHa1Rb+uBf1CxJX2B/+qI9X2QAmA== +remark-mdx@^1.0.18: + version "1.0.18" + resolved "https://registry.yarnpkg.com/remark-mdx/-/remark-mdx-1.0.18.tgz#a686bcb1166ae673bc77d9e459dbd576443bf854" + integrity sha512-PLsY2LNXuJ8YHaxjuOpRk+hDviB7jBFwLmLN4m4P5/Ev+NlmG8uXisAkP4P4Al47CPmJyKHQRJMjA8mWu4exVw== dependencies: "@babel/core" "^7.2.2" "@babel/helper-plugin-utils" "^7.0.0" @@ -13871,9 +13863,9 @@ tr46@^1.0.1: punycode "^2.1.0" trim-lines@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/trim-lines/-/trim-lines-1.1.1.tgz#da738ff58fa74817588455e30b11b85289f2a396" - integrity sha512-X+eloHbgJGxczUk1WSjIvn7aC9oN3jVE3rQfRVKcgpavi3jxtCn0VVKtjOBj64Yop96UYn/ujJRpTbCdAF1vyg== + version "1.1.2" + resolved "https://registry.yarnpkg.com/trim-lines/-/trim-lines-1.1.2.tgz#c8adbdbdae21bb5c2766240a661f693afe23e59b" + integrity sha512-3GOuyNeTqk3FAqc3jOJtw7FTjYl94XBR5aD9QnDbK/T4CA9sW/J0l9RoaRPE9wyPP7NF331qnHnvJFBJ+IDkmQ== trim-newlines@^1.0.0: version "1.0.0" @@ -14001,9 +13993,9 @@ typescript@3.3.4000: integrity sha512-jjOcCZvpkl2+z7JFn0yBOoLQyLoIkNZAs/fYJkUG6VKy6zLPHJGfQJYFHzibB6GJaF/8QrcECtlQ5cpvRHSMEA== typescript@next: - version "3.5.0-dev.20190507" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.0-dev.20190507.tgz#ef9d803d996766ba9316b1def134cd0eda330460" - integrity sha512-ovjIiPk+noNC5vKDZKs3cfFCyPodL/WJumHoDI0G5GACYwa+IlpngRGcF5U+vNzwXdPW1T1qkVaIDyzqpGWOqA== + version "3.5.0-dev.20190508" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.0-dev.20190508.tgz#469438b975b85c20ab8895ee3df8829be4bc0757" + integrity sha512-Eus7xB057/ei5FSTHGnWhE/ciacwtmUvDexicXkBNnyYh8gfP99aOlSaHavcWL2MxZo2GEpjnduTwdfjqNVpvg== ua-parser-js@^0.7.18: version "0.7.19"