Skip to content

Commit

Permalink
Nav-frontend pakker støtter nå React v17 (#979)
Browse files Browse the repository at this point in the history
* fikset clean script

* oppdaterte react for pakker

* oppdaterte eldre react klasser

* oppdatert react for nettside

* fjernet react fra stilpakker

* webpack mode set

* silent webpack build

* yarn update

* oppdatert changelog

* fjernet changelog linje
  • Loading branch information
KenAJoh committed Feb 5, 2021
1 parent 645ec19 commit 09b0dcd
Show file tree
Hide file tree
Showing 87 changed files with 1,519 additions and 1,451 deletions.
2 changes: 1 addition & 1 deletion .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
_
_
2 changes: 1 addition & 1 deletion @navikt/ds-icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
],
"scripts": {
"dl-icons": "FILE_KEY=UmEVH3pZ71uJPsSz9ilP3Y node -r dotenv/config figma-api/index.js dotenv_config_path=figma-api/.env",
"create-icons": "svgr --typescript --ref --icon --title-prop --replace-attr-values \"#3E3832=currentColor\" -d src svg",
"create-icons": "svgr --silent --typescript --ref --icon --title-prop --replace-attr-values \"#3E3832=currentColor\" -d src svg",
"convert-icons": "node figma-api/pngConverter.js",
"clean": "rm -rf src && rm -rf lib && rm -rf png && rm -rf NAV-ikonpakke-png.zip && rm -rf NAV-ikonpakke-svg.zip",
"build": "npm run clean && npm run create-icons && tsc && npm run convert-icons && node figma-api/zipIcons.js"
Expand Down
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Endringslogg

## 05. Februar 2021

### Komponenter støtter nå React v17

[#979](https://github.com/navikt/nav-frontend-moduler/pull/979)

- Alle react komponenter har nå devDep og peerDep `^16.8.0 || ^17.0.0`
- React er fjernet som devDep for stilpakker

## 05. Februar 2021

### Ikon-nedlastning i PNG format

[#973](https://github.com/navikt/nav-frontend-moduler/pull/973)

- Ikonsiden tilbyr nå både nedlastning av ikoner i SVG og PNG format
- Fargevelger for ikon er laget for å kunne laste ned ikonene med forskjellige farger.

## 29. Januar 2021

### Publisering av ikonpakke og ikonsøk
Expand All @@ -9,7 +27,6 @@
- `@navikt/ds-icons` er publisert som version 0.1.0
- Ikonsøket på design.nav.no er nå i bruk


## 25. Januar 2021

### Fjernet komponenten EtikettLiten
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"chromatic": "npx chromatic --project-token x3xqdfgkujg",
"lerna:watch": "yarn run lerna run watch --parallel",
"lerna:watch-css": "yarn run lerna run watch-css --parallel",
"lerna:build": "yarn run lerna run build",
"lerna:build": "yarn run --silent lerna run build",
"lerna:token": "yarn run lerna run token",
"lerna:icons": "yarn run lerna run dl-icons",
"lint": "yarn lint:jsts && yarn lint:less && yarn lint:css",
Expand Down Expand Up @@ -131,7 +131,7 @@
"mini-css-extract-plugin": "^1.3.0",
"prettier": "2.2.1",
"prop-types": "^15.5.10",
"react": "^16.8.0",
"react": "^16.8.0 || ^17.0.0",
"react-is": "^16.13.1",
"stylelint": "^13.7.2",
"stylelint-config-standard": "^20.0.0",
Expand Down
5 changes: 2 additions & 3 deletions packages/nav-frontend-alertstriper-style/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"/dist/main.css"
],
"scripts": {
"build": "webpack"
"build": "webpack --mode=production"
},
"repository": {
"type": "git",
Expand All @@ -18,8 +18,7 @@
"nav-frontend-core": "^5.0.11",
"nav-frontend-ikoner-assets": "^2.0.9",
"nav-frontend-paneler-style": "^0.3.34",
"nav-frontend-typografi-style": "^1.0.33",
"react": "^16.8.0"
"nav-frontend-typografi-style": "^1.0.33"
},
"peerDependencies": {
"nav-frontend-core": "^5.0.11",
Expand Down
1 change: 1 addition & 0 deletions packages/nav-frontend-alertstriper-style/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
entry: "./src/index.less",
plugins: [new MiniCssExtractPlugin()],
stats: "errors-only",
module: {
rules: [
{
Expand Down
4 changes: 2 additions & 2 deletions packages/nav-frontend-alertstriper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
"nav-frontend-ikoner-assets": "^2.0.9",
"nav-frontend-typografi": "^3.0.2",
"prop-types": "^15.5.10",
"react": "^16.8.0"
"react": "^16.8.0 || ^17.0.0"
},
"devDependencies": {
"@types/classnames": "^2.2.3",
"@types/react": "15.0.23 || ^16.0.0",
"nav-frontend-alertstriper-style": "^2.0.35",
"nav-frontend-ikoner-assets": "^2.0.9",
"nav-frontend-typografi": "^3.0.2",
"react": "^16.8.0"
"react": "^16.8.0 || ^17.0.0"
},
"defaultExport": "AlertStripe"
}
5 changes: 1 addition & 4 deletions packages/nav-frontend-chevron-style/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@
"/dist/main.css"
],
"scripts": {
"build": "webpack"
"build": "webpack --mode=production"
},
"repository": {
"type": "git",
"url": "git+https://github.com/navikt/nav-frontend-moduler.git"
},
"devDependencies": {
"react": "^16.8.0"
}
}
1 change: 1 addition & 0 deletions packages/nav-frontend-chevron-style/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
entry: "./src/index.less",
plugins: [new MiniCssExtractPlugin()],
stats: "errors-only",
module: {
rules: [
{
Expand Down
4 changes: 2 additions & 2 deletions packages/nav-frontend-chevron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
"classnames": "^2.2.5",
"nav-frontend-chevron-style": "^1.0.3",
"prop-types": "^15.5.10",
"react": "^16.8.0"
"react": "^16.8.0 || ^17.0.0"
},
"devDependencies": {
"@types/classnames": "^2.2.3",
"@types/react": "15.0.23 || ^16.0.0",
"classnames": "^2.2.5",
"nav-frontend-chevron-style": "^1.0.3",
"prop-types": "^15.5.10",
"react": "^16.8.0"
"react": "^16.8.0 || ^17.0.0"
},
"defaultExport": "NavFrontendChevron"
}
5 changes: 2 additions & 3 deletions packages/nav-frontend-ekspanderbartpanel-style/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"/dist/main.css"
],
"scripts": {
"build": "webpack"
"build": "webpack --mode=production"
},
"repository": {
"type": "git",
Expand All @@ -24,7 +24,6 @@
"nav-frontend-chevron-style": "^1.0.3",
"nav-frontend-core": "^5.0.11",
"nav-frontend-paneler-style": "^1.0.1",
"nav-frontend-typografi-style": "^1.0.33",
"react": "^16.8.0"
"nav-frontend-typografi-style": "^1.0.33"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
entry: "./src/index.less",
plugins: [new MiniCssExtractPlugin()],
stats: "errors-only",
module: {
rules: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ import { EkspanderbartpanelBase } from "./";

const btnStyle = { marginRight: "0.5rem", marginBottom: "1rem" };
export default class EkspanderbartpanelEksempel extends Component {
state = {
apen: false,
};
constructor(props) {
super(props);
this.state = {
apen: false,
};
}

open() {
this.setState({ apen: true });
Expand Down
4 changes: 2 additions & 2 deletions packages/nav-frontend-ekspanderbartpanel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"classnames": "^2.2.5",
"nav-frontend-ekspanderbartpanel-style": "^1.0.38",
"nav-frontend-js-utils": "^1.0.16",
"react": "^16.8.0",
"react": "^16.8.0 || ^17.0.0",
"react-collapse": "^5.0.0"
},
"devDependencies": {
Expand All @@ -31,7 +31,7 @@
"classnames": "^2.2.5",
"nav-frontend-ekspanderbartpanel-style": "^1.0.39",
"nav-frontend-js-utils": "^1.0.16",
"react": "^16.8.0",
"react": "^16.8.0 || ^17.0.0",
"react-collapse": "^5.0.0"
},
"defaultExport": "Ekspanderbartpanel"
Expand Down
5 changes: 2 additions & 3 deletions packages/nav-frontend-etiketter-style/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@
"/src"
],
"scripts": {
"build": "webpack"
"build": "webpack --mode=production"
},
"repository": {
"type": "git",
"url": "git+https://github.com/navikt/nav-frontend-moduler.git"
},
"devDependencies": {
"nav-frontend-core": "^5.0.11",
"react": "^16.8.0"
"nav-frontend-core": "^5.0.11"
},
"peerDependencies": {
"nav-frontend-core": "^5.0.11"
Expand Down
1 change: 1 addition & 0 deletions packages/nav-frontend-etiketter-style/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
entry: "./src/index.less",
plugins: [new MiniCssExtractPlugin()],
stats: "errors-only",
module: {
rules: [
{
Expand Down
4 changes: 2 additions & 2 deletions packages/nav-frontend-etiketter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
"nav-frontend-etiketter-style": "^1.0.18",
"nav-frontend-typografi": "^3.0.2",
"prop-types": "^15.5.10",
"react": "^16.8.0"
"react": "^16.8.0 || ^17.0.0"
},
"peerDependencies": {
"classnames": "^2.2.5",
"nav-frontend-core": "^5.0.11",
"nav-frontend-etiketter-style": "^1.0.18",
"nav-frontend-typografi": "^3.0.2",
"prop-types": "^15.5.10",
"react": "^16.8.0"
"react": "^16.8.0 || ^17.0.0"
},
"defaultExport": "EtikettBase"
}
5 changes: 1 addition & 4 deletions packages/nav-frontend-fullbreddeknapp-style/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@
"/dist/main.css"
],
"scripts": {
"build": "webpack"
"build": "webpack --mode=production"
},
"repository": {
"type": "git",
"url": "git+https://github.com/navikt/nav-frontend-moduler.git"
},
"devDependencies": {
"react": "^16.8.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
entry: "./src/index.less",
plugins: [new MiniCssExtractPlugin()],
stats: "errors-only",
module: {
rules: [
{
Expand Down
5 changes: 1 addition & 4 deletions packages/nav-frontend-grid-style/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@
"/dist/main.css"
],
"scripts": {
"build": "webpack"
"build": "webpack --mode=production"
},
"repository": {
"type": "git",
"url": "git+https://github.com/navikt/nav-frontend-moduler.git"
},
"devDependencies": {
"react": "^16.8.0"
}
}
1 change: 1 addition & 0 deletions packages/nav-frontend-grid-style/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
entry: "./src/index.less",
plugins: [new MiniCssExtractPlugin()],
stats: "errors-only",
module: {
rules: [
{
Expand Down
4 changes: 2 additions & 2 deletions packages/nav-frontend-grid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
"nav-frontend-core": "^5.0.11",
"nav-frontend-grid-style": "^1.0.0",
"prop-types": "^15.5.10",
"react": "^16.8.0"
"react": "^16.8.0 || ^17.0.0"
},
"devDependencies": {
"classnames": "^2.2.5",
"nav-frontend-core": "^5.0.11",
"nav-frontend-grid-style": "^1.0.1",
"prop-types": "^15.5.10",
"react": "^16.8.0"
"react": "^16.8.0 || ^17.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/nav-frontend-hjelpetekst-style/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"/dist/main.css"
],
"scripts": {
"build": "webpack"
"build": "webpack --mode=production"
},
"repository": {
"type": "git",
Expand Down
1 change: 1 addition & 0 deletions packages/nav-frontend-hjelpetekst-style/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
entry: "./src/hjelpetekst-style.less",
plugins: [new MiniCssExtractPlugin()],
stats: "errors-only",
module: {
rules: [
{
Expand Down
4 changes: 2 additions & 2 deletions packages/nav-frontend-hjelpetekst/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"nav-frontend-js-utils": "^1.0.16",
"nav-frontend-popover": "^1.0.0",
"prop-types": "^15.5.10",
"react": "^16.8.0"
"react": "^16.8.0 || ^17.0.0"
},
"devDependencies": {
"@types/classnames": "^2.2.3",
Expand All @@ -34,7 +34,7 @@
"nav-frontend-js-utils": "^1.0.16",
"nav-frontend-popover": "^1.0.1",
"prop-types": "^15.5.10",
"react": "^16.8.0"
"react": "^16.8.0 || ^17.0.0"
},
"defaultExport": "Hjelpetekst"
}
2 changes: 1 addition & 1 deletion packages/nav-frontend-ikoner-assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
"url": "git+https://github.com/navikt/nav-frontend-moduler.git"
},
"devDependencies": {
"react": "^16.8.0"
"react": "^16.8.0 || ^17.0.0"
}
}
4 changes: 2 additions & 2 deletions packages/nav-frontend-ikonknapper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
"nav-frontend-chevron": "^1.0.27",
"nav-frontend-ikoner-assets": "^2.0.9",
"nav-frontend-knapper": "^2.0.29",
"react": "^16.8.0"
"react": "^16.8.0 || ^17.0.0"
},
"devDependencies": {
"nav-frontend-chevron": "^1.0.27",
"nav-frontend-ikoner-assets": "^2.0.9",
"nav-frontend-knapper": "^2.0.30",
"react": "^16.8.0"
"react": "^16.8.0 || ^17.0.0"
}
}
4 changes: 2 additions & 2 deletions packages/nav-frontend-js-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
"peerDependencies": {
"lodash.throttle": "^4.1.1",
"prop-types": "^15.5.10",
"react": "^16.8.0"
"react": "^16.8.0 || ^17.0.0"
},
"devDependencies": {
"lodash.throttle": "^4.1.1",
"prop-types": "^15.5.10",
"react": "^16.8.0"
"react": "^16.8.0 || ^17.0.0"
},
"dependencies": {
"lodash.throttle": "^4.1.1"
Expand Down

0 comments on commit 09b0dcd

Please sign in to comment.