From ffe4300cd1bcad8fb633955f2824e7dd412e4dc0 Mon Sep 17 00:00:00 2001 From: Tobias Date: Tue, 16 Apr 2019 21:37:13 +0200 Subject: [PATCH 1/2] update dependencies with stable mdx and working hot reloading and audit --- .../dnb-design-system-portal/package.json | 31 +- .../src/pages/design-system.md | 4 +- .../src/pages/design-system/changelog.md | 4 +- .../src/shared/menu/SidebarMenu.js | 9 +- .../src/shared/menu/ToggleGrid.js | 9 +- .../src/shared/parts/Layout.js | 8 +- .../src/templates/mdx.js | 2 +- .../dnb-ui-lib/.storybook/webpack.config.js | 26 +- packages/dnb-ui-lib/audit-ci.json | 12 +- packages/dnb-ui-lib/babel.config.js | 4 +- packages/dnb-ui-lib/package.json | 4 +- yarn.lock | 883 +++++++++++------- 12 files changed, 592 insertions(+), 404 deletions(-) diff --git a/packages/dnb-design-system-portal/package.json b/packages/dnb-design-system-portal/package.json index 8c0e00081fa..06aa3397554 100644 --- a/packages/dnb-design-system-portal/package.json +++ b/packages/dnb-design-system-portal/package.json @@ -43,7 +43,6 @@ "prettier:package": "prettier-package-json --write ./package.json" }, "dependencies": { - "core-js": "2", "dnb-ui-lib": "*", "react": "^16.8.6", "react-dom": "^16.8.6" @@ -57,8 +56,8 @@ "@babel/plugin-syntax-dynamic-import": "^7.2.0", "@babel/preset-env": "^7.4.3", "@babel/preset-react": "^7.0.0", - "@mdx-js/mdx": "0.20.3", - "@mdx-js/tag": "0.20.3", + "@mdx-js/mdx": "^1.0.6", + "@mdx-js/react": "^1.0.6", "babel-jest": "^24.7.1", "babel-plugin-emotion": "^10.0.9", "camelcase": "^5.3.1", @@ -70,27 +69,27 @@ "del": "^4.1.0", "emotion": "^10.0.9", "enzyme": "^3.9.0", - "enzyme-adapter-react-16": "^1.11.2", + "enzyme-adapter-react-16": "^1.12.1", "enzyme-to-json": "^3.3.5", "eslint": "^5.16.0", - "eslint-plugin-import": "^2.16.0", + "eslint-plugin-import": "^2.17.1", "eslint-plugin-jsx-a11y": "^6.2.1", "eslint-plugin-react": "^7.12.4", - "front-matter": "^3.0.1", + "front-matter": "^3.0.2", "fs-extra": "^7.0.1", - "gatsby": "^2.3.14", + "gatsby": "^2.3.23", "gatsby-link": "^2.0.16", - "gatsby-mdx": "^0.4.4", + "gatsby-mdx": "^0.6.2", "gatsby-plugin-catch-links": "^2.0.13", "gatsby-plugin-emotion": "^4.0.6", - "gatsby-plugin-manifest": "^2.0.26", + "gatsby-plugin-manifest": "^2.0.29", "gatsby-plugin-offline": "^2.0.25", "gatsby-plugin-postcss": "^2.0.7", "gatsby-plugin-react-helmet": "^3.0.12", "gatsby-plugin-sass": "^2.0.11", - "gatsby-plugin-sharp": "^2.0.32", + "gatsby-plugin-sharp": "^2.0.34", "gatsby-remark-images": "^3.0.10", - "gatsby-source-filesystem": "^2.0.28", + "gatsby-source-filesystem": "^2.0.29", "gh-pages": "^2.0.1", "github-slugger": "^1.2.1", "jest": "^24.7.1", @@ -98,10 +97,10 @@ "jest-raw-loader": "^1.0.1", "keycode": "^2.2.0", "lint-staged": "^8.1.5", - "nodemon": "^1.18.10", + "nodemon": "^1.18.11", "ora": "^3.4.0", "postcss-preset-env": "^6.6.0", - "prettier": "^1.16.4", + "prettier": "^1.17.0", "prettier-package-json": "^2.1.0", "pretty": "^2.0.0", "prism-react-renderer": "^0.1.6", @@ -110,9 +109,9 @@ "react-anchor-link-smooth-scroll": "^1.0.12", "react-fake-props": "^0.3.1", "react-helmet": "^5.2.0", - "react-live": "^2.0.0", - "react-markdown": "^4.0.6", - "stylelint": "^9.10.1", + "react-live": "^2.0.1", + "react-markdown": "^4.0.8", + "stylelint": "^10.0.1", "stylelint-config-styled-components": "^0.1.1", "stylelint-processor-styled-components": "^1.6.0" }, diff --git a/packages/dnb-design-system-portal/src/pages/design-system.md b/packages/dnb-design-system-portal/src/pages/design-system.md index f2a7ca27974..272727f5ad5 100644 --- a/packages/dnb-design-system-portal/src/pages/design-system.md +++ b/packages/dnb-design-system-portal/src/pages/design-system.md @@ -3,7 +3,7 @@ title: 'Change log' draft: false --- -import Changelog from 'Pages/design-system/changelog' +import ChangeLog from 'Root/../../CHANGELOG.md' import ReleasesInfo from 'Pages/design-system/changelog/info-about-releases' # Change log of Eufemia @@ -12,4 +12,4 @@ import ReleasesInfo from 'Pages/design-system/changelog/info-about-releases' --- - + diff --git a/packages/dnb-design-system-portal/src/pages/design-system/changelog.md b/packages/dnb-design-system-portal/src/pages/design-system/changelog.md index 596eca29350..430ebff8d61 100644 --- a/packages/dnb-design-system-portal/src/pages/design-system/changelog.md +++ b/packages/dnb-design-system-portal/src/pages/design-system/changelog.md @@ -5,7 +5,7 @@ draft: true order: 1 --- -import Changelog from 'Root/../../CHANGELOG.md' +import ChangeLog from 'Root/../../CHANGELOG.md' import ReleasesInfo from 'Pages/design-system/changelog/info-about-releases' # Change log of Eufemia @@ -14,4 +14,4 @@ import ReleasesInfo from 'Pages/design-system/changelog/info-about-releases' --- - + diff --git a/packages/dnb-design-system-portal/src/shared/menu/SidebarMenu.js b/packages/dnb-design-system-portal/src/shared/menu/SidebarMenu.js index 04f691a9a24..452ba7a81d9 100644 --- a/packages/dnb-design-system-portal/src/shared/menu/SidebarMenu.js +++ b/packages/dnb-design-system-portal/src/shared/menu/SidebarMenu.js @@ -322,19 +322,16 @@ export default class SidebarLayout extends PureComponent { let delayBuff this.scrollToLastPosition() - this._scrollRef.current.onscroll = () => { + this._scrollRef.current.onscroll = e => { if (this.bussyOnSettingNewPos) return clearTimeout(delayBuff) delayBuff = setTimeout(() => { try { - window.localStorage.setItem( - 'sidebarPos', - this._scrollRef.current.scrollTop - ) + window.localStorage.setItem('sidebarPos', e.target.scrollTop) } catch (e) { console.log('SidebarLayout error:', e) } - }, 200) + }, 100) } } } diff --git a/packages/dnb-design-system-portal/src/shared/menu/ToggleGrid.js b/packages/dnb-design-system-portal/src/shared/menu/ToggleGrid.js index 9ca89adeb4d..7bbd2dd5b01 100644 --- a/packages/dnb-design-system-portal/src/shared/menu/ToggleGrid.js +++ b/packages/dnb-design-system-portal/src/shared/menu/ToggleGrid.js @@ -10,8 +10,7 @@ import { FormLabel, Switch } from 'dnb-ui-lib/src' import { gridStyle } from '../parts/PortalStyle' const globalStyle = css` - .dev-grid, - .dev-grid-first > div:first-of-type { + .dev-grid { ${gridStyle({ rgb: '220, 220, 220', a: 0.8 })}; /* stylelint-disable no-descending-specificity */ @@ -31,12 +30,6 @@ const globalStyle = css` } } /* stylelint-enable */ - - ${'' /* code { - display: block; - margin: 0 0 1rem 0; - background-color: rgba(0, 200, 200, 0.25); - } */} } ` diff --git a/packages/dnb-design-system-portal/src/shared/parts/Layout.js b/packages/dnb-design-system-portal/src/shared/parts/Layout.js index 3f8db8c2400..6d98021d5b2 100644 --- a/packages/dnb-design-system-portal/src/shared/parts/Layout.js +++ b/packages/dnb-design-system-portal/src/shared/parts/Layout.js @@ -41,8 +41,8 @@ class Layout extends PureComponent { return ( <> - - {children} + +
{children}