Skip to content

Commit

Permalink
Merge pull request #37 from dnbexperience/develop
Browse files Browse the repository at this point in the history
get in improvements and new features
  • Loading branch information
tujoworker authored Jan 3, 2019
2 parents 51a8075 + 43532e9 commit fb4a99e
Show file tree
Hide file tree
Showing 154 changed files with 2,651 additions and 2,636 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"test-ci:update": "yarn test-ci --updateSnapshot"
},
"devDependencies": {
"husky": "^1.2.0"
"husky": "^1.3.0"
},
"release": {
"analyzeCommits": "simple-commit-message"
Expand Down
10 changes: 10 additions & 0 deletions packages/dnb-design-system-portal/gatsby-browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Gatsby Config
*
*/

// UI Style
require('dnb-ui-lib/src/style/patterns') // import ony patterns
require('dnb-ui-lib/src/style') // import both all components and the default theme

exports.disableCorePrefetching = () => false
31 changes: 19 additions & 12 deletions packages/dnb-design-system-portal/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ module.exports = {
repoUrl: 'https://github.com/dnbexperience/eufemia/tree/master/'
},
plugins: [
// 'gatsby-plugin-offline', // we may test the usage without the offline capabilities
'gatsby-plugin-remove-serviceworker', // this removes the preloading of links (because of to the font flickering)
'gatsby-plugin-catch-links',
'gatsby-plugin-react-helmet',
{
resolve: 'gatsby-plugin-manifest',
options: {
Expand All @@ -37,7 +33,16 @@ module.exports = {
// ],
}
},
'gatsby-plugin-catch-links',
'gatsby-plugin-react-helmet',
'gatsby-plugin-sharp', // is used by gatsby-remark-images
{
resolve: 'gatsby-source-filesystem',
options: {
path: `${__dirname}/src/pages`,
name: 'pages'
}
},
{
resolve: 'gatsby-mdx',
options: {
Expand All @@ -57,13 +62,12 @@ module.exports = {
}
}
]
}
},
{
resolve: 'gatsby-source-filesystem',
options: {
path: `${__dirname}/src/pages`,
name: 'pages'
// Example of how to use globalScope
// globalScope: /* @es6 */ `import { SketchPicker } from 'react-color';
// export default { Picker: SketchPicker }`,
// defaultLayouts: {
// // default: require.resolve('./src/templates/mdx.js')
// }
}
},
'gatsby-plugin-sass',
Expand All @@ -80,6 +84,9 @@ module.exports = {
})
]
}
}
},
// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.app/offline
'gatsby-plugin-offline'
]
}
13 changes: 1 addition & 12 deletions packages/dnb-design-system-portal/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/

const path = require('path')
const componentWithMDXScope = require('gatsby-mdx/component-with-mdx-scope')
const {
copyContentIntoPublic
} = require('./scripts/copyContentIntoPublic')
Expand Down Expand Up @@ -43,11 +42,7 @@ exports.createPages = ({ graphql, actions }) => {
mdxResult.data.allMdx.edges.forEach(({ node }) => {
createPage({
path: node.fields.slug || '/',
component: componentWithMDXScope(
path.resolve('./src/templates/mdx.js'),
node.code.scope,
__dirname
),
component: path.resolve('./src/templates/mdx.js'),
context: {
id: node.fields.id
}
Expand All @@ -73,12 +68,6 @@ exports.onCreateWebpackConfig = ({ actions }) => {
})
}

exports.onCreateBabelConfig = ({ actions }) => {
actions.setBabelPlugin({
name: '@babel/plugin-proposal-export-default-from'
})
}

exports.onCreateNode = ({ node, getNode, actions }) => {
const { createNodeField } = actions

Expand Down
41 changes: 21 additions & 20 deletions packages/dnb-design-system-portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,56 +42,57 @@
"dependencies": {
"dnb-ui-lib": "*",
"prop-types": "^15.6.2",
"react": "^16.6.3",
"react-dom": "^16.6.3"
"react": "^16.7.0",
"react-dom": "^16.7.0"
},
"devDependencies": {
"@babel/core": "^7.2.2",
"@babel/node": "^7.2.2",
"@babel/plugin-proposal-class-properties": "^7.2.1",
"@babel/plugin-proposal-class-properties": "^7.2.3",
"@babel/plugin-proposal-export-default-from": "^7.2.0",
"@babel/plugin-proposal-object-rest-spread": "^7.2.0",
"@babel/preset-env": "^7.2.0",
"@babel/plugin-syntax-jsx": "^7.2.0",
"@babel/preset-env": "^7.2.3",
"@babel/preset-react": "^7.0.0",
"@mdx-js/mdx": "0.16.0",
"@mdx-js/tag": "0.16.1",
"@mdx-js/mdx": "0.16.6",
"@mdx-js/tag": "0.16.6",
"autoprefixer": "^9.4.3",
"babel-plugin-emotion": "^9.2.11",
"babel-plugin-emotion": "^10.0.5",
"camelcase": "^5.0.0",
"ci-info": "^2.0.0",
"classnames": "^2.2.6",
"clean-html": "^1.5.0",
"color": "^3.1.0",
"cross-env": "^5.2.0",
"del": "^3.0.0",
"emotion": "^9.2.12",
"emotion-server": "^9.2.12",
"emotion": "^10.0.5",
"emotion-server": "^10.0.5",
"enzyme": "^3.8.0",
"enzyme-adapter-react-16": "^1.7.1",
"enzyme-to-json": "^3.3.5",
"eslint": "^5.10.0",
"eslint": "^5.11.1",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-react": "^7.11.1",
"eslint-plugin-react": "^7.12.2",
"front-matter": "^3.0.1",
"fs-extra": "^7.0.1",
"gatsby": "^2.0.72",
"gatsby": "^2.0.82",
"gatsby-link": "^2.0.7",
"gatsby-mdx": "^0.2.0",
"gatsby-mdx": "^0.3.2",
"gatsby-plugin-catch-links": "^2.0.9",
"gatsby-plugin-emotion": "^2.0.7",
"gatsby-plugin-manifest": "^2.0.12",
"gatsby-plugin-emotion": "^4.0.1",
"gatsby-plugin-manifest": "^2.0.13",
"gatsby-plugin-offline": "^2.0.20",
"gatsby-plugin-postcss": "^2.0.2",
"gatsby-plugin-react-helmet": "^3.0.4",
"gatsby-plugin-remove-serviceworker": "^1.0.0",
"gatsby-plugin-react-helmet": "^3.0.5",
"gatsby-plugin-sass": "^2.0.7",
"gatsby-plugin-sharp": "^2.0.15",
"gatsby-plugin-sharp": "^2.0.17",
"gatsby-remark-images": "^3.0.1",
"gatsby-source-filesystem": "^2.0.12",
"gh-pages": "^2.0.1",
"jest": "^23.6.0",
"jest-css-modules": "^1.1.0",
"jest-emotion": "^9.2.11",
"jest-emotion": "^10.0.5",
"jest-raw-loader": "^1.0.1",
"keycode": "^2.2.0",
"lint-staged": "^8.1.0",
Expand All @@ -107,7 +108,7 @@
"pretty": "^2.0.0",
"prism-react-renderer": "^0.1.5",
"raw-loader": "^1.0.0",
"react-emotion": "^9.2.12",
"react-emotion": "^10.0.0",
"react-fake-props": "^0.3.1",
"react-helmet": "^5.2.0",
"react-live": "^1.12.0",
Expand Down
4 changes: 3 additions & 1 deletion packages/dnb-design-system-portal/scripts/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export const createNewVersion = async () => {
return false
}
try {
const date = new Date().toLocaleString()
const date = new Date().toLocaleString('nb-NO', {
timeZone: 'Europe/Oslo'
})
packageJson.buildVersion = date

// Update the extracted version of package.json with the build version
Expand Down
2 changes: 1 addition & 1 deletion packages/dnb-design-system-portal/src/pages/404.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import styled from 'react-emotion'
import styled from '@emotion/styled'

export default class PageNotFound extends PureComponent {
static propTypes = {
Expand Down
6 changes: 1 addition & 5 deletions packages/dnb-design-system-portal/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@ import React, { PureComponent, Fragment } from 'react'
import StickyMenuBar from '../shared/menu/StickyMenuBar'
import MainMenu from '../shared/menu/MainMenu'

// UI Style
import 'dnb-ui-lib/src/style/patterns' // import ony patterns
import 'dnb-ui-lib/src/style' // import both all components and the default theme

// react component
export default class App extends PureComponent {
render() {
return (
<Fragment>
<StickyMenuBar />
<StickyMenuBar hideSiebarToggleButton={true} />
<MainMenu />
</Fragment>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ order: 1
Do not change the content!
-->

import Button from 'Src/uilib/components/demos/Button'
import ButtonPage from 'Src/uilib/components/demos/Button'

<Button />
<ButtonPage />
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ order: 2
Do not change the content!
-->

import Dropdown from 'Src/uilib/components/demos/Dropdown'
import DropdownPage from 'Src/uilib/components/demos/Dropdown'

<Dropdown />
<DropdownPage />
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ order: 3
Do not change the content!
-->

import FormLabel from 'Src/uilib/components/demos/FormLabel'
import FormLabelPage from 'Src/uilib/components/demos/FormLabel'

<FormLabel />
<FormLabelPage />
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ order: 4
Do not change the content!
-->

import IconPrimary from 'Src/uilib/components/demos/IconPrimary'
import IconPrimaryPage from 'Src/uilib/components/demos/IconPrimary'

<IconPrimary />
<IconPrimaryPage />
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ order: 5
Do not change the content!
-->

import Icon from 'Src/uilib/components/demos/Icon'
import IconPage from 'Src/uilib/components/demos/Icon'

<Icon />
<IconPage />
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ order: 6
Do not change the content!
-->

import InputMasked from 'Src/uilib/components/demos/InputMasked'
import InputMaskedPage from 'Src/uilib/components/demos/InputMasked'

<InputMasked />
<InputMaskedPage />
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
header: 'UI Library'
title: 'Input'
draft: false
status: wip
status: null
order: 7
---

Expand All @@ -11,6 +11,6 @@ order: 7
Do not change the content!
-->

import Input from 'Src/uilib/components/demos/Input'
import InputPage from 'Src/uilib/components/demos/Input'

<Input />
<InputPage />
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ order: 8
Do not change the content!
-->

import LineTitle from 'Src/uilib/components/demos/LineTitle'
import LineTitlePage from 'Src/uilib/components/demos/LineTitle'

<LineTitle />
<LineTitlePage />
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ order: 9
Do not change the content!
-->

import Logo from 'Src/uilib/components/demos/Logo'
import LogoPage from 'Src/uilib/components/demos/Logo'

<Logo />
<LogoPage />
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ order: 10
Do not change the content!
-->

import Modal from 'Src/uilib/components/demos/Modal'
import ModalPage from 'Src/uilib/components/demos/Modal'

<Modal />
<ModalPage />
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ order: 11
Do not change the content!
-->

import Notification from 'Src/uilib/components/demos/Notification'
import NotificationPage from 'Src/uilib/components/demos/Notification'

<Notification />
<NotificationPage />
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ order: 12
Do not change the content!
-->

import Slider from 'Src/uilib/components/demos/Slider'
import SliderPage from 'Src/uilib/components/demos/Slider'

<Slider />
<SliderPage />
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ order: 13
Do not change the content!
-->

import Switch from 'Src/uilib/components/demos/Switch'
import SwitchPage from 'Src/uilib/components/demos/Switch'

<Switch />
<SwitchPage />
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ order: 14
Do not change the content!
-->

import Tabs from 'Src/uilib/components/demos/Tabs'
import TabsPage from 'Src/uilib/components/demos/Tabs'

<Tabs />
<TabsPage />
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import React, { PureComponent } from 'react'
import { css } from 'react-emotion'
import { css } from '@emotion/core'
import Head from 'react-helmet'
import dnb, {
Input,
Expand All @@ -21,10 +21,6 @@ import dnb, {
ActionNav
} from 'dnb-ui-lib/src'

// UI Style
import 'dnb-ui-lib/src/style/patterns' // import ony patterns
import 'dnb-ui-lib/src/style' // import both all components and the default theme

const style = css`
background: white;
`
Expand Down
Loading

0 comments on commit fb4a99e

Please sign in to comment.