From 63a11a4d0faa057b04647ddf1f0bbde0111261b5 Mon Sep 17 00:00:00 2001 From: Johan Rusvik Date: Mon, 26 Feb 2018 14:13:38 +0100 Subject: [PATCH 01/11] Konvertert ekspanderbartpanel-komponenter til typescript --- package-lock.json | 9 ++ package.json | 1 + .../src/advarsel-alertstripe.d.ts | 5 + .../src/advarsel-solid-alertstripe.d.ts | 5 + .../src/alertstripe.d.ts | 23 ++++ .../src/info-alertstripe.d.ts | 5 + .../src/info-solid-alertstripe.d.ts | 5 + .../src/navansatt-alertstripe.d.ts | 5 + .../src/suksess-alertstripe.d.ts | 5 + .../src/suksess-solid-alertstripe.d.ts | 5 + .../nav-frontend-chevron/src/chevron.d.ts | 21 ++++ .../src/hoyre-chevron.d.ts | 5 + .../nav-frontend-chevron/src/ned-chevron.d.ts | 5 + .../nav-frontend-chevron/src/opp-chevron.d.ts | 5 + .../src/venstre-chevron.d.ts | 5 + ...ample.js => _ekspanderbartpanel.sample.ts} | 0 .../package-lock.json | 25 +++++ .../package.json | 9 +- .../src/ekspanderbartpanel-base-pure.d.ts | 24 ++++ .../src/ekspanderbartpanel-base-pure.js | 103 ------------------ .../src/ekspanderbartpanel-base-pure.tsx | 84 ++++++++++++++ .../src/ekspanderbartpanel-base.d.ts | 18 +++ .../src/ekspanderbartpanel-base.js | 40 ------- .../src/ekspanderbartpanel-base.tsx | 41 +++++++ .../src/ekspanderbartpanel-pure.d.ts | 12 ++ ...el-pure.js => ekspanderbartpanel-pure.tsx} | 28 ++--- .../src/index.d.ts | 30 +++++ .../src/{index.js => index.tsx} | 43 ++++---- .../src/etikettadvarsel.d.ts | 5 + .../src/etikettfokus.d.ts | 5 + .../src/etikettinfo.d.ts | 5 + .../src/etikettsuksess.d.ts | 5 + .../nav-frontend-etiketter/src/index.d.ts | 23 ++++ .../nav-frontend-grid-style/README.md | 28 ++--- .../src/hjelpetekst-auto.d.ts | 5 + .../src/hjelpetekst-hoyre.d.ts | 5 + .../src/hjelpetekst-midt.d.ts | 5 + .../src/hjelpetekst-over.d.ts | 5 + .../src/hjelpetekst-under-hoyre.d.ts | 5 + .../src/hjelpetekst-under-venstre.d.ts | 5 + .../src/hjelpetekst-under.d.ts | 5 + .../src/hjelpetekst-venstre.d.ts | 5 + .../src/hjelpetekst.d.ts | 48 ++++++++ .../src/eventThrottler.d.ts | 14 +++ .../nav-frontend-js-utils/src/index.d.ts | 8 ++ .../src/CustomHTMLButtonAttributes.d.ts | 17 +++ .../nav-frontend-knapper/src/fareknapp.d.ts | 7 ++ .../nav-frontend-knapper/src/hovedknapp.d.ts | 7 ++ .../nav-frontend-knapper/src/index.d.ts | 18 +++ .../nav-frontend-knapper/src/knapp.d.ts | 14 +++ .../src/Lenkepanel-base.d.ts | 13 +++ .../nav-frontend-lenkepanel/src/index.d.ts | 12 ++ .../nav-frontend-paneler/src/index.d.ts | 12 ++ .../src/radio-panel-gruppe.d.ts | 29 +++++ .../src/snakkeboble.d.ts | 17 +++ .../nav-frontend-spinner/src/spinner.d.ts | 16 +++ .../src/tekstomrade.d.ts | 10 ++ .../nav-frontend-typografi/src/avsnitt.d.ts | 7 ++ .../nav-frontend-typografi/src/element.d.ts | 7 ++ .../src/etikett-liten.d.ts | 7 ++ .../nav-frontend-typografi/src/index.d.ts | 71 ++++++++++++ .../nav-frontend-typografi/src/infotekst.d.ts | 7 ++ .../nav-frontend-typografi/src/ingress.d.ts | 7 ++ .../src/innholdstittel.d.ts | 7 ++ .../src/normaltekst.d.ts | 7 ++ .../src/sidetittel.d.ts | 7 ++ .../src/systemtittel.d.ts | 7 ++ .../src/undertekst-bold.d.ts | 7 ++ .../src/undertekst.d.ts | 7 ++ .../src/undertittel.d.ts | 7 ++ .../src/veileder-chat-bubble.d.ts | 9 ++ .../nav-frontend-veileder/src/veileder.d.ts | 18 +++ 72 files changed, 900 insertions(+), 201 deletions(-) create mode 100644 packages/node_modules/nav-frontend-alertstriper/src/advarsel-alertstripe.d.ts create mode 100644 packages/node_modules/nav-frontend-alertstriper/src/advarsel-solid-alertstripe.d.ts create mode 100644 packages/node_modules/nav-frontend-alertstriper/src/alertstripe.d.ts create mode 100644 packages/node_modules/nav-frontend-alertstriper/src/info-alertstripe.d.ts create mode 100644 packages/node_modules/nav-frontend-alertstriper/src/info-solid-alertstripe.d.ts create mode 100644 packages/node_modules/nav-frontend-alertstriper/src/navansatt-alertstripe.d.ts create mode 100644 packages/node_modules/nav-frontend-alertstriper/src/suksess-alertstripe.d.ts create mode 100644 packages/node_modules/nav-frontend-alertstriper/src/suksess-solid-alertstripe.d.ts create mode 100644 packages/node_modules/nav-frontend-chevron/src/chevron.d.ts create mode 100644 packages/node_modules/nav-frontend-chevron/src/hoyre-chevron.d.ts create mode 100644 packages/node_modules/nav-frontend-chevron/src/ned-chevron.d.ts create mode 100644 packages/node_modules/nav-frontend-chevron/src/opp-chevron.d.ts create mode 100644 packages/node_modules/nav-frontend-chevron/src/venstre-chevron.d.ts rename packages/node_modules/nav-frontend-ekspanderbartpanel/{_ekspanderbartpanel.sample.js => _ekspanderbartpanel.sample.ts} (100%) create mode 100644 packages/node_modules/nav-frontend-ekspanderbartpanel/package-lock.json create mode 100644 packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base-pure.d.ts delete mode 100644 packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base-pure.js create mode 100644 packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base-pure.tsx create mode 100644 packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base.d.ts delete mode 100644 packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base.js create mode 100644 packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base.tsx create mode 100644 packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-pure.d.ts rename packages/node_modules/nav-frontend-ekspanderbartpanel/src/{ekspanderbartpanel-pure.js => ekspanderbartpanel-pure.tsx} (52%) create mode 100644 packages/node_modules/nav-frontend-ekspanderbartpanel/src/index.d.ts rename packages/node_modules/nav-frontend-ekspanderbartpanel/src/{index.js => index.tsx} (64%) create mode 100644 packages/node_modules/nav-frontend-etiketter/src/etikettadvarsel.d.ts create mode 100644 packages/node_modules/nav-frontend-etiketter/src/etikettfokus.d.ts create mode 100644 packages/node_modules/nav-frontend-etiketter/src/etikettinfo.d.ts create mode 100644 packages/node_modules/nav-frontend-etiketter/src/etikettsuksess.d.ts create mode 100644 packages/node_modules/nav-frontend-etiketter/src/index.d.ts create mode 100644 packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-auto.d.ts create mode 100644 packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-hoyre.d.ts create mode 100644 packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-midt.d.ts create mode 100644 packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-over.d.ts create mode 100644 packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-under-hoyre.d.ts create mode 100644 packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-under-venstre.d.ts create mode 100644 packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-under.d.ts create mode 100644 packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-venstre.d.ts create mode 100644 packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst.d.ts create mode 100644 packages/node_modules/nav-frontend-js-utils/src/eventThrottler.d.ts create mode 100644 packages/node_modules/nav-frontend-js-utils/src/index.d.ts create mode 100644 packages/node_modules/nav-frontend-knapper/src/CustomHTMLButtonAttributes.d.ts create mode 100644 packages/node_modules/nav-frontend-knapper/src/fareknapp.d.ts create mode 100644 packages/node_modules/nav-frontend-knapper/src/hovedknapp.d.ts create mode 100644 packages/node_modules/nav-frontend-knapper/src/index.d.ts create mode 100644 packages/node_modules/nav-frontend-knapper/src/knapp.d.ts create mode 100644 packages/node_modules/nav-frontend-lenkepanel/src/Lenkepanel-base.d.ts create mode 100644 packages/node_modules/nav-frontend-lenkepanel/src/index.d.ts create mode 100644 packages/node_modules/nav-frontend-paneler/src/index.d.ts create mode 100644 packages/node_modules/nav-frontend-skjema/src/radio-panel-gruppe.d.ts create mode 100644 packages/node_modules/nav-frontend-snakkeboble/src/snakkeboble.d.ts create mode 100644 packages/node_modules/nav-frontend-spinner/src/spinner.d.ts create mode 100644 packages/node_modules/nav-frontend-tekstomrade/src/tekstomrade.d.ts create mode 100644 packages/node_modules/nav-frontend-typografi/src/avsnitt.d.ts create mode 100644 packages/node_modules/nav-frontend-typografi/src/element.d.ts create mode 100644 packages/node_modules/nav-frontend-typografi/src/etikett-liten.d.ts create mode 100644 packages/node_modules/nav-frontend-typografi/src/index.d.ts create mode 100644 packages/node_modules/nav-frontend-typografi/src/infotekst.d.ts create mode 100644 packages/node_modules/nav-frontend-typografi/src/ingress.d.ts create mode 100644 packages/node_modules/nav-frontend-typografi/src/innholdstittel.d.ts create mode 100644 packages/node_modules/nav-frontend-typografi/src/normaltekst.d.ts create mode 100644 packages/node_modules/nav-frontend-typografi/src/sidetittel.d.ts create mode 100644 packages/node_modules/nav-frontend-typografi/src/systemtittel.d.ts create mode 100644 packages/node_modules/nav-frontend-typografi/src/undertekst-bold.d.ts create mode 100644 packages/node_modules/nav-frontend-typografi/src/undertekst.d.ts create mode 100644 packages/node_modules/nav-frontend-typografi/src/undertittel.d.ts create mode 100644 packages/node_modules/nav-frontend-veileder/src/veileder-chat-bubble.d.ts create mode 100644 packages/node_modules/nav-frontend-veileder/src/veileder.d.ts diff --git a/package-lock.json b/package-lock.json index d5e111974f..1644367790 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,15 @@ "integrity": "sha512-Ee66fX2qMsDnDq7sPnDtq1bGoo479j6Fo1BlSnne+L5rp6ndzBUgz72+MRNuN56zg9uuteRCkJAMdDJEX2Uqig==", "dev": true }, + "@types/react-collapse": { + "version": "4.0.1", + "resolved": "http://a34apvl062.devillo.no:8082/repository/npm-all/@types/react-collapse/-/react-collapse-4.0.1.tgz", + "integrity": "sha512-nGHiV2y2Vzuq4wrYOj5Gd1jv1/maNHcRSDrxmA3mZlOOvnYFD7hbbrQLCDYM4iX7jZih+wCEj8+WLh+IqI6YJA==", + "dev": true, + "requires": { + "@types/react": "16.0.34" + } + }, "@types/sanitize-html": { "version": "1.14.0", "resolved": "https://registry.npmjs.org/@types/sanitize-html/-/sanitize-html-1.14.0.tgz", diff --git a/package.json b/package.json index 1385c0a836..a435d7cbc3 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "@types/classnames": "^2.2.3", "@types/react": "15.0.23 || ^16.0.0", "@types/sanitize-html": "^1.13.0", + "@types/react-collapse": "^4.0.1", "babel-core": "^6.24.1", "babel-eslint": "^7.1.1", "babel-loader": "^7.0.0", diff --git a/packages/node_modules/nav-frontend-alertstriper/src/advarsel-alertstripe.d.ts b/packages/node_modules/nav-frontend-alertstriper/src/advarsel-alertstripe.d.ts new file mode 100644 index 0000000000..2bd8b026ad --- /dev/null +++ b/packages/node_modules/nav-frontend-alertstriper/src/advarsel-alertstripe.d.ts @@ -0,0 +1,5 @@ +/// +import { StatelessComponent } from 'react'; +import { AlertStripeProps } from './alertstripe'; +declare const AlertStripeAdvarsel: StatelessComponent; +export default AlertStripeAdvarsel; diff --git a/packages/node_modules/nav-frontend-alertstriper/src/advarsel-solid-alertstripe.d.ts b/packages/node_modules/nav-frontend-alertstriper/src/advarsel-solid-alertstripe.d.ts new file mode 100644 index 0000000000..0b31286c41 --- /dev/null +++ b/packages/node_modules/nav-frontend-alertstriper/src/advarsel-solid-alertstripe.d.ts @@ -0,0 +1,5 @@ +/// +import { StatelessComponent } from 'react'; +import { AlertStripeProps } from './alertstripe'; +declare const AlertStripeAdvarselSolid: StatelessComponent; +export default AlertStripeAdvarselSolid; diff --git a/packages/node_modules/nav-frontend-alertstriper/src/alertstripe.d.ts b/packages/node_modules/nav-frontend-alertstriper/src/alertstripe.d.ts new file mode 100644 index 0000000000..912dd84a7a --- /dev/null +++ b/packages/node_modules/nav-frontend-alertstriper/src/alertstripe.d.ts @@ -0,0 +1,23 @@ +/// +import * as React from 'react'; +import 'nav-frontend-alertstriper-style'; +export interface AlertStripeProps { + children: React.ReactNode | React.ReactChild | React.ReactChildren; + solid?: boolean; + size?: string | number; + className?: string; +} +export interface AlertStripeBaseProps extends AlertStripeProps { + type: 'suksess' | 'info' | 'advarsel' | 'nav-ansatt'; +} +declare class AlertStripe extends React.Component { + render(): JSX.Element; +} +export default AlertStripe; +export { default as AlertStripeAdvarselSolid } from './advarsel-solid-alertstripe'; +export { default as AlertStripeAdvarsel } from './advarsel-alertstripe'; +export { default as AlertStripeSuksessSolid } from './suksess-solid-alertstripe'; +export { default as AlertStripeSuksess } from './suksess-alertstripe'; +export { default as AlertStripeInfoSolid } from './info-solid-alertstripe'; +export { default as AlertStripeInfo } from './info-alertstripe'; +export { default as AlertStripeNavAnsatt } from './navansatt-alertstripe'; diff --git a/packages/node_modules/nav-frontend-alertstriper/src/info-alertstripe.d.ts b/packages/node_modules/nav-frontend-alertstriper/src/info-alertstripe.d.ts new file mode 100644 index 0000000000..6356fab6a6 --- /dev/null +++ b/packages/node_modules/nav-frontend-alertstriper/src/info-alertstripe.d.ts @@ -0,0 +1,5 @@ +/// +import { StatelessComponent } from 'react'; +import { AlertStripeProps } from './alertstripe'; +declare const AlertStripeInfo: StatelessComponent; +export default AlertStripeInfo; diff --git a/packages/node_modules/nav-frontend-alertstriper/src/info-solid-alertstripe.d.ts b/packages/node_modules/nav-frontend-alertstriper/src/info-solid-alertstripe.d.ts new file mode 100644 index 0000000000..fc5de04da4 --- /dev/null +++ b/packages/node_modules/nav-frontend-alertstriper/src/info-solid-alertstripe.d.ts @@ -0,0 +1,5 @@ +/// +import { StatelessComponent } from 'react'; +import { AlertStripeProps } from './alertstripe'; +declare const AlertStripeInfoSolid: StatelessComponent; +export default AlertStripeInfoSolid; diff --git a/packages/node_modules/nav-frontend-alertstriper/src/navansatt-alertstripe.d.ts b/packages/node_modules/nav-frontend-alertstriper/src/navansatt-alertstripe.d.ts new file mode 100644 index 0000000000..14706c55ce --- /dev/null +++ b/packages/node_modules/nav-frontend-alertstriper/src/navansatt-alertstripe.d.ts @@ -0,0 +1,5 @@ +/// +import { StatelessComponent } from 'react'; +import { AlertStripeProps } from './alertstripe'; +declare const AlertStripeNavAnsatt: StatelessComponent; +export default AlertStripeNavAnsatt; diff --git a/packages/node_modules/nav-frontend-alertstriper/src/suksess-alertstripe.d.ts b/packages/node_modules/nav-frontend-alertstriper/src/suksess-alertstripe.d.ts new file mode 100644 index 0000000000..8f3a3f3632 --- /dev/null +++ b/packages/node_modules/nav-frontend-alertstriper/src/suksess-alertstripe.d.ts @@ -0,0 +1,5 @@ +/// +import { StatelessComponent } from 'react'; +import { AlertStripeProps } from './alertstripe'; +declare const AlertStripeSuksess: StatelessComponent; +export default AlertStripeSuksess; diff --git a/packages/node_modules/nav-frontend-alertstriper/src/suksess-solid-alertstripe.d.ts b/packages/node_modules/nav-frontend-alertstriper/src/suksess-solid-alertstripe.d.ts new file mode 100644 index 0000000000..2e3b12b5a0 --- /dev/null +++ b/packages/node_modules/nav-frontend-alertstriper/src/suksess-solid-alertstripe.d.ts @@ -0,0 +1,5 @@ +/// +import { StatelessComponent } from 'react'; +import { AlertStripeProps } from './alertstripe'; +declare const AlertStripeSuksessSolid: StatelessComponent; +export default AlertStripeSuksessSolid; diff --git a/packages/node_modules/nav-frontend-chevron/src/chevron.d.ts b/packages/node_modules/nav-frontend-chevron/src/chevron.d.ts new file mode 100644 index 0000000000..3258e784ad --- /dev/null +++ b/packages/node_modules/nav-frontend-chevron/src/chevron.d.ts @@ -0,0 +1,21 @@ +/// +import * as React from 'react'; +import 'nav-frontend-chevron-style'; +/** + * Basiskomponent for Chevron + * For å få chevron i en spesifikk rettning bruk de rettningsspesifikke komponentente: + * HoyreChevron, VenstreChevron, OppChevron, NedChevron. + */ +export interface NavFrontendChevronProps { + type?: 'høyre' | 'venstre' | 'ned' | 'opp'; + stor?: boolean; + className?: string; +} +declare class NavFrontendChevron extends React.Component { + render(): JSX.Element; +} +export default NavFrontendChevron; +export { default as HoyreChevron } from './hoyre-chevron'; +export { default as VenstreChevron } from './venstre-chevron'; +export { default as OppChevron } from './opp-chevron'; +export { default as NedChevron } from './ned-chevron'; diff --git a/packages/node_modules/nav-frontend-chevron/src/hoyre-chevron.d.ts b/packages/node_modules/nav-frontend-chevron/src/hoyre-chevron.d.ts new file mode 100644 index 0000000000..6c5ee8a12c --- /dev/null +++ b/packages/node_modules/nav-frontend-chevron/src/hoyre-chevron.d.ts @@ -0,0 +1,5 @@ +/// +import { StatelessComponent } from 'react'; +import { NavFrontendChevronProps } from './chevron'; +declare const HoyreChevron: StatelessComponent; +export default HoyreChevron; diff --git a/packages/node_modules/nav-frontend-chevron/src/ned-chevron.d.ts b/packages/node_modules/nav-frontend-chevron/src/ned-chevron.d.ts new file mode 100644 index 0000000000..5ea84e3cef --- /dev/null +++ b/packages/node_modules/nav-frontend-chevron/src/ned-chevron.d.ts @@ -0,0 +1,5 @@ +/// +import { StatelessComponent } from 'react'; +import { NavFrontendChevronProps } from './chevron'; +declare const NedChevron: StatelessComponent; +export default NedChevron; diff --git a/packages/node_modules/nav-frontend-chevron/src/opp-chevron.d.ts b/packages/node_modules/nav-frontend-chevron/src/opp-chevron.d.ts new file mode 100644 index 0000000000..5ea84e3cef --- /dev/null +++ b/packages/node_modules/nav-frontend-chevron/src/opp-chevron.d.ts @@ -0,0 +1,5 @@ +/// +import { StatelessComponent } from 'react'; +import { NavFrontendChevronProps } from './chevron'; +declare const NedChevron: StatelessComponent; +export default NedChevron; diff --git a/packages/node_modules/nav-frontend-chevron/src/venstre-chevron.d.ts b/packages/node_modules/nav-frontend-chevron/src/venstre-chevron.d.ts new file mode 100644 index 0000000000..5ea84e3cef --- /dev/null +++ b/packages/node_modules/nav-frontend-chevron/src/venstre-chevron.d.ts @@ -0,0 +1,5 @@ +/// +import { StatelessComponent } from 'react'; +import { NavFrontendChevronProps } from './chevron'; +declare const NedChevron: StatelessComponent; +export default NedChevron; diff --git a/packages/node_modules/nav-frontend-ekspanderbartpanel/_ekspanderbartpanel.sample.js b/packages/node_modules/nav-frontend-ekspanderbartpanel/_ekspanderbartpanel.sample.ts similarity index 100% rename from packages/node_modules/nav-frontend-ekspanderbartpanel/_ekspanderbartpanel.sample.js rename to packages/node_modules/nav-frontend-ekspanderbartpanel/_ekspanderbartpanel.sample.ts diff --git a/packages/node_modules/nav-frontend-ekspanderbartpanel/package-lock.json b/packages/node_modules/nav-frontend-ekspanderbartpanel/package-lock.json new file mode 100644 index 0000000000..5744f169c6 --- /dev/null +++ b/packages/node_modules/nav-frontend-ekspanderbartpanel/package-lock.json @@ -0,0 +1,25 @@ +{ + "name": "nav-frontend-ekspanderbartpanel", + "version": "0.2.21", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@types/react-collapse": { + "version": "4.0.1", + "resolved": "http://a34apvl062.devillo.no:8082/repository/npm-all/@types/react-collapse/-/react-collapse-4.0.1.tgz", + "integrity": "sha512-nGHiV2y2Vzuq4wrYOj5Gd1jv1/maNHcRSDrxmA3mZlOOvnYFD7hbbrQLCDYM4iX7jZih+wCEj8+WLh+IqI6YJA==", + "dev": true, + "requires": { + "@types/react": "16.0.38" + }, + "dependencies": { + "@types/react": { + "version": "16.0.38", + "resolved": "http://a34apvl062.devillo.no:8082/repository/npm-all/@types/react/-/react-16.0.38.tgz", + "integrity": "sha512-t0XJHNrlzLiVAKCWxS9zzAadoQO8zGFpHsrvNVk7QmrDXnm3cPFy2wFcHGNbKjntBiXznL6qQkh+a1Wxu21+dA==", + "dev": true + } + } + } + } +} diff --git a/packages/node_modules/nav-frontend-ekspanderbartpanel/package.json b/packages/node_modules/nav-frontend-ekspanderbartpanel/package.json index 9ce3b13582..05fb691b69 100644 --- a/packages/node_modules/nav-frontend-ekspanderbartpanel/package.json +++ b/packages/node_modules/nav-frontend-ekspanderbartpanel/package.json @@ -16,16 +16,17 @@ "classnames": "^2.2.5", "nav-frontend-ekspanderbartpanel-style": "^0.3.8", "nav-frontend-typografi": "^2.0.2", - "prop-types": "^15.5.10", - "react": "^15.4.2 || ^16.0.0", + "react": "^16.2.0", "react-collapse": "^4.0.3" }, "devDependencies": { + "@types/classnames": "^2.2.3", + "@types/react": "^16.2.0", + "@types/react-collapse": "^4.0.1", "classnames": "^2.2.5", "nav-frontend-ekspanderbartpanel-style": "^0.3.8", "nav-frontend-typografi": "^2.0.2", - "prop-types": "^15.5.10", - "react": "^15.4.2 || ^16.0.0", + "react": "^16.2.0", "react-collapse": "^4.0.3", "react-markdown": "^2.5.1" } diff --git a/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base-pure.d.ts b/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base-pure.d.ts new file mode 100644 index 0000000000..fda44154fc --- /dev/null +++ b/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base-pure.d.ts @@ -0,0 +1,24 @@ +/// +import * as React from 'react'; +import { CollapseProps } from 'react-collapse'; +import 'nav-frontend-ekspanderbartpanel-style'; +export interface EkspanderbartpanelBasePureProps { + heading: React.ReactNode; + className?: string; + onClick: (event: React.SyntheticEvent) => void; + ariaTittel?: string; + apen: boolean; + children?: React.ReactNode; + collapseProps?: CollapseProps; +} +export interface EkspanderbartpanelBasePureState { + isCloseAnimation: boolean; +} +declare class EkspanderbartpanelBasePure extends React.Component { + constructor(props: any); + componentWillReceiveProps(nextProps: any): void; + onRestProxy: () => void; + tabHandler(event: any): void; + render(): JSX.Element; +} +export default EkspanderbartpanelBasePure; diff --git a/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base-pure.js b/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base-pure.js deleted file mode 100644 index 85b0780319..0000000000 --- a/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base-pure.js +++ /dev/null @@ -1,103 +0,0 @@ -import React, { Component } from 'react'; -import PT from 'prop-types'; -import classnames from 'classnames'; -import Collapse from 'react-collapse'; -import 'nav-frontend-ekspanderbartpanel-style'; // eslint-disable-line import/extensions - -const cls = (className, props) => classnames('ekspanderbartPanel', className, { - 'ekspanderbartPanel--lukket': !props.apen, - 'ekspanderbartPanel--apen': props.apen -}); - -class EkspanderbartpanelBasePure extends Component { - constructor(props) { - super(props); - - this.isCloseAnimation = false; - - this.onRestProxy = this.onRestProxy.bind(this); - this.tabHandler = this.tabHandler.bind(this); - } - - componentWillReceiveProps(nextProps) { - if (this.props.apen && !nextProps.apen) { - this.isCloseAnimation = true; - } - } - - onRestProxy = () => { - this.isCloseAnimation = false; - if (this.props.collapseProps.onRest) this.props.collapseProps.onRest(); - }; - - tabHandler(event) { - const { keyCode } = event; - const isTab = keyCode === 9; - - if (isTab && this.isCloseAnimation) { - event.preventDefault(); - } - } - - render() { - const { className, children, apen, heading, ariaTittel, onClick, collapseProps, ...renderProps } = this.props; - const myCollapseProps = { - ...collapseProps, - isOpened: apen, - onRest: this.onRestProxy - }; - - return ( -
- - -
{children}
-
-
- ); - } -} - -EkspanderbartpanelBasePure.propTypes = { - heading: PT.oneOfType([ - PT.arrayOf(PT.node), - PT.node - ]).isRequired, - className: PT.string, - onClick: PT.func.isRequired, - ariaTittel: PT.string.isRequired, - apen: PT.bool.isRequired, - children: PT.oneOfType([ - PT.arrayOf(PT.node), - PT.node - ]).isRequired, - collapseProps: PT.shape( - { - springConfig: PT.objectOf(PT.number), - forceInitialAnimation: PT.bool, - hasNestedCollapse: PT.bool, - fixedHeight: PT.number, - theme: PT.objectOf(PT.string), - style: PT.object, - onRender: PT.func, - onRest: PT.func, - onMeasure: PT.func - } - ) -}; -EkspanderbartpanelBasePure.defaultProps = { - className: undefined, - collapseProps: {} -}; - -export default EkspanderbartpanelBasePure; diff --git a/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base-pure.tsx b/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base-pure.tsx new file mode 100644 index 0000000000..a770fe3b46 --- /dev/null +++ b/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base-pure.tsx @@ -0,0 +1,84 @@ +import * as React from 'react'; +import * as classnames from 'classnames'; +import { Collapse, CollapseProps } from 'react-collapse'; +import 'nav-frontend-ekspanderbartpanel-style'; + +export interface EkspanderbartpanelBasePureProps { + heading: React.ReactNode; + className?: string; + onClick: (event: React.SyntheticEvent) => void; + ariaTittel?: string; + apen: boolean; + children?: React.ReactNode; + collapseProps?: CollapseProps; +} + +export interface EkspanderbartpanelBasePureState { + isCloseAnimation: boolean; +} + +const cls = (props: EkspanderbartpanelBasePureProps, className?: string) => classnames('ekspanderbartPanel', className, { + 'ekspanderbartPanel--lukket': !props.apen, + 'ekspanderbartPanel--apen': props.apen +}); + +class EkspanderbartpanelBasePure extends React.Component { + constructor(props) { + super(props); + + this.state = { + isCloseAnimation: false + }; + + this.onRestProxy = this.onRestProxy.bind(this); + this.tabHandler = this.tabHandler.bind(this); + } + + componentWillReceiveProps(nextProps) { + if (this.props.apen && !nextProps.apen) { + this.setState({isCloseAnimation: true}); + } + } + + onRestProxy = () => { + const {collapseProps} = this.props; + this.setState({isCloseAnimation: false}); + if (collapseProps && collapseProps.onRest) { + collapseProps.onRest(); + } + }; + + tabHandler(event) { + const { keyCode } = event; + const isTab = keyCode === 9; + + if (isTab && this.state.isCloseAnimation) { + event.preventDefault(); + } + } + + render() { + const { className, children, apen, heading, ariaTittel, onClick, collapseProps, ...renderProps }: EkspanderbartpanelBasePureProps = this.props; + + return ( +
+ + +
{children}
+
+
+ ); + } +} + +export default EkspanderbartpanelBasePure; diff --git a/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base.d.ts b/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base.d.ts new file mode 100644 index 0000000000..e8bb31be27 --- /dev/null +++ b/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base.d.ts @@ -0,0 +1,18 @@ +/// +import * as React from 'react'; +import 'nav-frontend-ekspanderbartpanel-style'; +export interface EkspanderbartpanelBaseProps { + apen: boolean; + onClick: (event: React.SyntheticEvent) => void; + heading: React.ReactNode; + ariaTittel?: string; +} +export interface EkspanderbartpanelBaseState { + apen: boolean; +} +declare class EkspanderbartpanelBase extends React.Component { + constructor(props: any); + handleClick(event: any): void; + render(): JSX.Element; +} +export default EkspanderbartpanelBase; diff --git a/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base.js b/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base.js deleted file mode 100644 index ccfea60685..0000000000 --- a/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base.js +++ /dev/null @@ -1,40 +0,0 @@ -import PT from 'prop-types'; -import React, { Component } from 'react'; -import 'nav-frontend-ekspanderbartpanel-style'; // eslint-disable-line import/extensions -import EkspanderbartpanelBasePure from './ekspanderbartpanel-base-pure'; - -class EkspanderbartpanelBase extends Component { - constructor(props) { - super(props); - - this.state = { - apen: this.props.apen - }; - - this.handleClick = this.handleClick.bind(this); - } - - handleClick(event) { - event.preventDefault(); - this.setState({ apen: !this.state.apen }); - this.props.onClick(event); - } - - render() { - const { apen: _apen, ...renderProps } = this.props; - return ( - - ); - } -} - -EkspanderbartpanelBase.propTypes = { - apen: PT.bool, - onClick: PT.func -}; -EkspanderbartpanelBase.defaultProps = { - apen: false, - onClick: () => {} -}; - -export default EkspanderbartpanelBase; diff --git a/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base.tsx b/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base.tsx new file mode 100644 index 0000000000..921e7b3d61 --- /dev/null +++ b/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base.tsx @@ -0,0 +1,41 @@ +import * as React from 'react'; +import 'nav-frontend-ekspanderbartpanel-style'; // eslint-disable-line import/extensions +import EkspanderbartpanelBasePure from './ekspanderbartpanel-base-pure'; + +export interface EkspanderbartpanelBaseProps { + apen: boolean; + onClick: (event: React.SyntheticEvent) => void; + heading: React.ReactNode; + ariaTittel?: string; +} + +export interface EkspanderbartpanelBaseState { + apen: boolean; +} + +class EkspanderbartpanelBase extends React.Component { + constructor(props) { + super(props); + + this.state = { + apen: this.props.apen + }; + + this.handleClick = this.handleClick.bind(this); + } + + handleClick(event) { + event.preventDefault(); + this.setState({ apen: !this.state.apen }); + this.props.onClick(event); + } + + render() { + const {heading, ariaTittel } = this.props; + return ( + + ); + } +} + +export default EkspanderbartpanelBase; diff --git a/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-pure.d.ts b/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-pure.d.ts new file mode 100644 index 0000000000..c1fa644e27 --- /dev/null +++ b/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-pure.d.ts @@ -0,0 +1,12 @@ +/// +import * as React from 'react'; +export interface EkspanderbartpanelPureProps { + onClick: (event: React.SyntheticEvent) => void; + tittel: string; + tittelProps?: string; + apen: boolean; +} +declare class EkspanderbartpanelPure extends React.PureComponent { + render(): JSX.Element; +} +export default EkspanderbartpanelPure; diff --git a/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-pure.js b/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-pure.tsx similarity index 52% rename from packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-pure.js rename to packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-pure.tsx index 2beb096115..d06d67691f 100644 --- a/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-pure.js +++ b/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-pure.tsx @@ -1,9 +1,15 @@ -import React, { PureComponent } from 'react'; -import PT from 'prop-types'; +import * as React from 'react'; import Typografi from 'nav-frontend-typografi'; import EkspanderbartpanelBasePure from './ekspanderbartpanel-base-pure'; -class EkspanderbartpanelPure extends PureComponent { +export interface EkspanderbartpanelPureProps { + onClick: (event: React.SyntheticEvent) => void; + tittel: string; + tittelProps?: string; + apen: boolean; +} + +class EkspanderbartpanelPure extends React.PureComponent { render() { const { tittel, tittelProps, ...renderProps } = this.props; @@ -17,20 +23,4 @@ class EkspanderbartpanelPure extends PureComponent { } } -EkspanderbartpanelPure.propTypes = { - className: PT.string, - onClick: PT.func.isRequired, - tittel: PT.string.isRequired, - tittelProps: PT.string, - apen: PT.bool.isRequired, - children: PT.oneOfType([ - PT.arrayOf(PT.node), - PT.node - ]).isRequired -}; -EkspanderbartpanelPure.defaultProps = { - tittelProps: 'undertittel', - className: undefined -}; - export default EkspanderbartpanelPure; diff --git a/packages/node_modules/nav-frontend-ekspanderbartpanel/src/index.d.ts b/packages/node_modules/nav-frontend-ekspanderbartpanel/src/index.d.ts new file mode 100644 index 0000000000..3ddfdc5e65 --- /dev/null +++ b/packages/node_modules/nav-frontend-ekspanderbartpanel/src/index.d.ts @@ -0,0 +1,30 @@ +/// +import * as React from 'react'; +import 'nav-frontend-ekspanderbartpanel-style'; +/** + * Self-contained `Ekspanderbartpanel`. + * Denne komponenten holder selv styr på om innholdet skal vises eller ikke. + */ +export interface EkspanderbartpanelProps { + /** + * Skal komponenten være `default` åpen + */ + apen: boolean; + /** + * Callback funksjon for når knappen blir klikket på + */ + onClick: (event: React.SyntheticEvent) => void; + tittel: string; +} +export interface EkspanderbartpanelState { + apen: boolean; +} +declare class Ekspanderbartpanel extends React.Component { + constructor(props: any); + handleClick(event: React.SyntheticEvent): void; + render(): JSX.Element; +} +export default Ekspanderbartpanel; +export { default as EkspanderbartpanelPure } from './ekspanderbartpanel-pure'; +export { default as EkspanderbartpanelBase } from './ekspanderbartpanel-base'; +export { default as EkspanderbartpanelBasePure } from './ekspanderbartpanel-base-pure'; diff --git a/packages/node_modules/nav-frontend-ekspanderbartpanel/src/index.js b/packages/node_modules/nav-frontend-ekspanderbartpanel/src/index.tsx similarity index 64% rename from packages/node_modules/nav-frontend-ekspanderbartpanel/src/index.js rename to packages/node_modules/nav-frontend-ekspanderbartpanel/src/index.tsx index 26e778900c..06a21daad3 100644 --- a/packages/node_modules/nav-frontend-ekspanderbartpanel/src/index.js +++ b/packages/node_modules/nav-frontend-ekspanderbartpanel/src/index.tsx @@ -1,5 +1,4 @@ -import PT from 'prop-types'; -import React, { Component } from 'react'; +import * as React from 'react'; import 'nav-frontend-ekspanderbartpanel-style'; // eslint-disable-line import/extensions import EkspanderbartpanelPure from './ekspanderbartpanel-pure'; @@ -7,7 +6,24 @@ import EkspanderbartpanelPure from './ekspanderbartpanel-pure'; * Self-contained `Ekspanderbartpanel`. * Denne komponenten holder selv styr på om innholdet skal vises eller ikke. */ -class Ekspanderbartpanel extends Component { + +export interface EkspanderbartpanelProps { + /** + * Skal komponenten være `default` åpen + */ + apen: boolean; + /** + * Callback funksjon for når knappen blir klikket på + */ + onClick: (event: React.SyntheticEvent) => void; + tittel: string; +} + +export interface EkspanderbartpanelState { + apen: boolean; +} + +class Ekspanderbartpanel extends React.Component { constructor(props) { super(props); @@ -18,35 +34,20 @@ class Ekspanderbartpanel extends Component { this.handleClick = this.handleClick.bind(this); } - handleClick(event) { + handleClick(event: React.SyntheticEvent): void { event.preventDefault(); this.setState({ apen: !this.state.apen }); this.props.onClick(event); } render() { - const { apen: _apen, ...renderProps } = this.props; + const {tittel, ...renderProps } = this.props; return ( - + ); } } -Ekspanderbartpanel.propTypes = { - /** - * Skal komponenten være `default` åpen - */ - apen: PT.bool, - /** - * Callback funksjon for når knappen blir klikket på - */ - onClick: PT.func -}; -Ekspanderbartpanel.defaultProps = { - apen: false, - onClick: () => {} -}; - export default Ekspanderbartpanel; export { default as EkspanderbartpanelPure } from './ekspanderbartpanel-pure'; diff --git a/packages/node_modules/nav-frontend-etiketter/src/etikettadvarsel.d.ts b/packages/node_modules/nav-frontend-etiketter/src/etikettadvarsel.d.ts new file mode 100644 index 0000000000..8b37d45ee5 --- /dev/null +++ b/packages/node_modules/nav-frontend-etiketter/src/etikettadvarsel.d.ts @@ -0,0 +1,5 @@ +/// +import { StatelessComponent } from 'react'; +import { EtikettProps } from './index'; +declare const EtikettAdvarsel: StatelessComponent; +export default EtikettAdvarsel; diff --git a/packages/node_modules/nav-frontend-etiketter/src/etikettfokus.d.ts b/packages/node_modules/nav-frontend-etiketter/src/etikettfokus.d.ts new file mode 100644 index 0000000000..6f2a972101 --- /dev/null +++ b/packages/node_modules/nav-frontend-etiketter/src/etikettfokus.d.ts @@ -0,0 +1,5 @@ +/// +import { StatelessComponent } from 'react'; +import { EtikettBaseProps } from './index'; +declare const EtikettFokus: StatelessComponent; +export default EtikettFokus; diff --git a/packages/node_modules/nav-frontend-etiketter/src/etikettinfo.d.ts b/packages/node_modules/nav-frontend-etiketter/src/etikettinfo.d.ts new file mode 100644 index 0000000000..3b9f10c566 --- /dev/null +++ b/packages/node_modules/nav-frontend-etiketter/src/etikettinfo.d.ts @@ -0,0 +1,5 @@ +/// +import { StatelessComponent } from 'react'; +import { EtikettBaseProps } from './index'; +declare const EtikettInfo: StatelessComponent; +export default EtikettInfo; diff --git a/packages/node_modules/nav-frontend-etiketter/src/etikettsuksess.d.ts b/packages/node_modules/nav-frontend-etiketter/src/etikettsuksess.d.ts new file mode 100644 index 0000000000..95d32e0fec --- /dev/null +++ b/packages/node_modules/nav-frontend-etiketter/src/etikettsuksess.d.ts @@ -0,0 +1,5 @@ +/// +import { StatelessComponent } from 'react'; +import { EtikettProps } from './index'; +declare const EtikettSuksess: StatelessComponent; +export default EtikettSuksess; diff --git a/packages/node_modules/nav-frontend-etiketter/src/index.d.ts b/packages/node_modules/nav-frontend-etiketter/src/index.d.ts new file mode 100644 index 0000000000..45ca7a72a0 --- /dev/null +++ b/packages/node_modules/nav-frontend-etiketter/src/index.d.ts @@ -0,0 +1,23 @@ +/// +import * as React from 'react'; +import 'nav-frontend-etiketter-style'; +export interface EtikettProps { + typo?: string; + children: React.ReactNode | React.ReactChild | React.ReactChildren; + className?: string; +} +/** + * Etiketter finnes i fire predefinerte farger, + * om det er behov anbefales å lage en egen klasse hvor man kan legge til flere farger + */ +export interface EtikettBaseProps extends EtikettProps { + type: 'suksess' | 'info' | 'advarsel' | 'fokus'; +} +declare class EtikettBase extends React.Component { + render(): JSX.Element; +} +export default EtikettBase; +export { default as EtikettAdvarsel } from './etikettadvarsel'; +export { default as EtikettFokus } from './etikettfokus'; +export { default as EtikettSuksess } from './etikettsuksess'; +export { default as EtikettInfo } from './etikettinfo'; diff --git a/packages/node_modules/nav-frontend-grid-style/README.md b/packages/node_modules/nav-frontend-grid-style/README.md index d28a540c96..6481c5e7ae 100644 --- a/packages/node_modules/nav-frontend-grid-style/README.md +++ b/packages/node_modules/nav-frontend-grid-style/README.md @@ -10,19 +10,19 @@ npm install nav-frontend-grid-style --save -### Disclaimer: -NPM-pakken(e) publisert av NAV IT er midlertidig unscoped'e, -men vil bli prefikset og scopet med @navikt i fremtiden. Vi -gjør oppmerksom på at npm-pakkene i følgende lenke, -og *kun* disse npm-pakkene, er forvaltet og publisert offisielt av NAV IT: - -https://www.npmjs.com/org/navikt - -Oppdatert liste over gyldige pakker ligger til enhver tid beskrevet her. - -NAV IT tar ikke ansvar for eventuell bruk av annen programvare som -fremstilles som om de skulle vært publisert av NAV. - -Vi refererer ellers til MIT-lisensen som ligger vedlagt i repository: +### Disclaimer: +NPM-pakken(e) publisert av NAV IT er midlertidig unscoped'e, +men vil bli prefikset og scopet med @navikt i fremtiden. Vi +gjør oppmerksom på at npm-pakkene i følgende lenke, +og *kun* disse npm-pakkene, er forvaltet og publisert offisielt av NAV IT: + +https://www.npmjs.com/org/navikt + +Oppdatert liste over gyldige pakker ligger til enhver tid beskrevet her. + +NAV IT tar ikke ansvar for eventuell bruk av annen programvare som +fremstilles som om de skulle vært publisert av NAV. + +Vi refererer ellers til MIT-lisensen som ligger vedlagt i repository: https://github.com/navikt/nav-frontend-moduler/tree/master/packages/node_modules/nav-frontend-grid-style \ No newline at end of file diff --git a/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-auto.d.ts b/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-auto.d.ts new file mode 100644 index 0000000000..94b0f1ab19 --- /dev/null +++ b/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-auto.d.ts @@ -0,0 +1,5 @@ +/// +import { HjelpetekstProps } from './hjelpetekst'; +import { StatelessComponent } from "react"; +declare const HjelpetekstAuto: StatelessComponent; +export default HjelpetekstAuto; diff --git a/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-hoyre.d.ts b/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-hoyre.d.ts new file mode 100644 index 0000000000..ed05139d0f --- /dev/null +++ b/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-hoyre.d.ts @@ -0,0 +1,5 @@ +/// +import { HjelpetekstProps } from './hjelpetekst'; +import { StatelessComponent } from "react"; +declare const HjelpetekstHoyre: StatelessComponent; +export default HjelpetekstHoyre; diff --git a/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-midt.d.ts b/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-midt.d.ts new file mode 100644 index 0000000000..77fbacf764 --- /dev/null +++ b/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-midt.d.ts @@ -0,0 +1,5 @@ +/// +import { HjelpetekstProps } from './hjelpetekst'; +import { StatelessComponent } from "react"; +declare const HjelpetekstMidt: StatelessComponent; +export default HjelpetekstMidt; diff --git a/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-over.d.ts b/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-over.d.ts new file mode 100644 index 0000000000..a5119031ff --- /dev/null +++ b/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-over.d.ts @@ -0,0 +1,5 @@ +/// +import { HjelpetekstProps } from './hjelpetekst'; +import { StatelessComponent } from "react"; +declare const HjelpetekstOver: StatelessComponent; +export default HjelpetekstOver; diff --git a/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-under-hoyre.d.ts b/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-under-hoyre.d.ts new file mode 100644 index 0000000000..7b7f90ac27 --- /dev/null +++ b/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-under-hoyre.d.ts @@ -0,0 +1,5 @@ +/// +import { HjelpetekstProps } from './hjelpetekst'; +import { StatelessComponent } from "react"; +declare const HjelpetekstUnder: StatelessComponent; +export default HjelpetekstUnder; diff --git a/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-under-venstre.d.ts b/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-under-venstre.d.ts new file mode 100644 index 0000000000..7b7f90ac27 --- /dev/null +++ b/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-under-venstre.d.ts @@ -0,0 +1,5 @@ +/// +import { HjelpetekstProps } from './hjelpetekst'; +import { StatelessComponent } from "react"; +declare const HjelpetekstUnder: StatelessComponent; +export default HjelpetekstUnder; diff --git a/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-under.d.ts b/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-under.d.ts new file mode 100644 index 0000000000..7b7f90ac27 --- /dev/null +++ b/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-under.d.ts @@ -0,0 +1,5 @@ +/// +import { HjelpetekstProps } from './hjelpetekst'; +import { StatelessComponent } from "react"; +declare const HjelpetekstUnder: StatelessComponent; +export default HjelpetekstUnder; diff --git a/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-venstre.d.ts b/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-venstre.d.ts new file mode 100644 index 0000000000..910950b209 --- /dev/null +++ b/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst-venstre.d.ts @@ -0,0 +1,5 @@ +/// +import { HjelpetekstProps } from './hjelpetekst'; +import { StatelessComponent } from "react"; +declare const HjelpetekstVenstre: StatelessComponent; +export default HjelpetekstVenstre; diff --git a/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst.d.ts b/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst.d.ts new file mode 100644 index 0000000000..d99f024a79 --- /dev/null +++ b/packages/node_modules/nav-frontend-hjelpetekst/src/hjelpetekst.d.ts @@ -0,0 +1,48 @@ +/// +import * as React from 'react'; +import 'nav-frontend-hjelpetekst-style'; +export interface DefaultAnchorProps { + className?: string; + hover?: boolean; +} +export interface HjelpetekstProps { + id: string; + children: React.ReactNode; + className?: string; + tittel?: string; + type?: 'auto' | 'over' | 'under' | 'venstre' | 'midt' | 'hoyre' | 'under-venstre' | 'under-hoyre'; + anchor?: any; +} +export interface State { + erSynlig: boolean; + hover: boolean; + focus: boolean; + active: boolean; + variant: 'auto' | 'over' | 'under' | 'venstre' | 'midt' | 'hoyre' | 'under-venstre' | 'under-hoyre'; +} +declare class HjelpetekstBase extends React.Component { + apneKnapp: HTMLButtonElement; + lukkKnapp: HTMLButtonElement; + hjelpetekstInnhold: HTMLElement; + constructor(props: any); + componentWillUpdate(nextProps: HjelpetekstProps, nextState: State): void; + setVariant(): void; + getAriaId(): string; + getVariant(): "auto" | "venstre" | "over" | "under" | "midt" | "hoyre" | "under-venstre" | "under-hoyre"; + handleDocumentKeyDown(event: any): void; + handleHjelpetekstBlur(evt: any): void; + toggleSynlighet(event: any): void; + toggleKeyListener(erSynlig: any): void; + stateChange(state: any, value: any): () => void; + renderContent(): JSX.Element; + render(): JSX.Element; +} +export default HjelpetekstBase; +export { default as HjelpetekstOver } from './hjelpetekst-over'; +export { default as HjelpetekstUnder } from './hjelpetekst-under'; +export { default as HjelpetekstUnderHoyre } from './hjelpetekst-under-hoyre'; +export { default as HjelpetekstUnderVenstre } from './hjelpetekst-under-venstre'; +export { default as HjelpetekstHoyre } from './hjelpetekst-hoyre'; +export { default as HjelpetekstVenstre } from './hjelpetekst-venstre'; +export { default as HjelpetekstMidt } from './hjelpetekst-midt'; +export { default as HjelpetekstAuto } from './hjelpetekst-auto'; diff --git a/packages/node_modules/nav-frontend-js-utils/src/eventThrottler.d.ts b/packages/node_modules/nav-frontend-js-utils/src/eventThrottler.d.ts new file mode 100644 index 0000000000..51e8bdf3cb --- /dev/null +++ b/packages/node_modules/nav-frontend-js-utils/src/eventThrottler.d.ts @@ -0,0 +1,14 @@ +/// +import * as React from 'react'; +export interface EventThrottlerProps { + children: React.ReactNode | React.ReactChild | React.ReactChildren; + callback: () => void; + delay?: number; + event: 'resize'; +} +export declare class EventThrottler extends React.Component { + private throttled; + componentDidMount(): void; + componentWillUnmount(): void; + render(): string | number | boolean | {} | React.ReactElement | (string | number | boolean | any[] | React.ReactElement)[] | React.ReactPortal | React.ReactChildren | (undefined & string) | (undefined & number) | (null & string) | (null & number) | (string & undefined) | (string & null) | (string & number) | (string & true) | (string & false) | (string & {}) | (string & React.ReactElement) | (string & (string | number | boolean | any[] | React.ReactElement)[]) | (string & React.ReactPortal) | (string & React.ReactChildren) | (number & undefined) | (number & null) | (number & string) | (number & true) | (number & false) | (number & {}) | (number & React.ReactElement) | (number & (string | number | boolean | any[] | React.ReactElement)[]) | (number & React.ReactPortal) | (number & React.ReactChildren) | (true & string) | (true & number) | (true & {}) | (true & React.ReactElement) | (true & (string | number | boolean | any[] | React.ReactElement)[]) | (true & React.ReactPortal) | (true & React.ReactChildren) | (false & string) | (false & number) | (false & {}) | (false & React.ReactElement) | (false & (string | number | boolean | any[] | React.ReactElement)[]) | (false & React.ReactPortal) | (false & React.ReactChildren) | (React.ReactElement & string) | (React.ReactElement & number) | (React.ReactElement & true) | (React.ReactElement & false) | (React.ReactElement & (string | number | boolean | any[] | React.ReactElement)[]) | (React.ReactElement & React.ReactPortal) | (React.ReactElement & React.ReactChildren) | ((string | number | boolean | any[] | React.ReactElement)[] & string) | ((string | number | boolean | any[] | React.ReactElement)[] & number) | ((string | number | boolean | any[] | React.ReactElement)[] & true) | ((string | number | boolean | any[] | React.ReactElement)[] & false) | ((string | number | boolean | any[] | React.ReactElement)[] & React.ReactElement) | ((string | number | boolean | any[] | React.ReactElement)[] & React.ReactPortal) | ((string | number | boolean | any[] | React.ReactElement)[] & React.ReactChildren) | (React.ReactPortal & string) | (React.ReactPortal & number) | (React.ReactPortal & true) | (React.ReactPortal & false) | (React.ReactPortal & React.ReactElement) | (React.ReactPortal & (string | number | boolean | any[] | React.ReactElement)[]) | (React.ReactPortal & React.ReactChildren) | null | undefined; +} diff --git a/packages/node_modules/nav-frontend-js-utils/src/index.d.ts b/packages/node_modules/nav-frontend-js-utils/src/index.d.ts new file mode 100644 index 0000000000..e24f4c656d --- /dev/null +++ b/packages/node_modules/nav-frontend-js-utils/src/index.d.ts @@ -0,0 +1,8 @@ +export declare function autobind(ctx: any): void; +export declare function guid(): string; +export declare function fn(value: any): () => any; +export declare function addPropToObject(obj: object, [key, value]: [string | number, any]): object; +export declare function omit(obj: object, ...props: any[]): {}; +export declare const requestAnimationFrame: (callback: any, element: any, delay: any) => void; +export declare function clamp(lower: number, upper: number, numberish: string | number): number; +export { EventThrottler } from './eventThrottler'; diff --git a/packages/node_modules/nav-frontend-knapper/src/CustomHTMLButtonAttributes.d.ts b/packages/node_modules/nav-frontend-knapper/src/CustomHTMLButtonAttributes.d.ts new file mode 100644 index 0000000000..4443caf571 --- /dev/null +++ b/packages/node_modules/nav-frontend-knapper/src/CustomHTMLButtonAttributes.d.ts @@ -0,0 +1,17 @@ +/// +import * as React from "react"; +import { HTMLAttributes } from "react"; +export interface CustomHTMLButtonAttributes extends HTMLAttributes { + autoFocus?: boolean; + disabled?: boolean; + form?: string; + onClick?: (event: React.MouseEvent) => void; + formAction?: string; + formEncType?: string; + formMethod?: string; + formNoValidate?: boolean; + formTarget?: string; + name?: string; + htmlType?: string; + value?: string | string[] | number; +} diff --git a/packages/node_modules/nav-frontend-knapper/src/fareknapp.d.ts b/packages/node_modules/nav-frontend-knapper/src/fareknapp.d.ts new file mode 100644 index 0000000000..87bea12035 --- /dev/null +++ b/packages/node_modules/nav-frontend-knapper/src/fareknapp.d.ts @@ -0,0 +1,7 @@ +/// +import * as React from 'react'; +import { KnappProps } from './knapp'; +declare class Fareknapp extends React.Component { + render(): JSX.Element; +} +export default Fareknapp; diff --git a/packages/node_modules/nav-frontend-knapper/src/hovedknapp.d.ts b/packages/node_modules/nav-frontend-knapper/src/hovedknapp.d.ts new file mode 100644 index 0000000000..9e5950133f --- /dev/null +++ b/packages/node_modules/nav-frontend-knapper/src/hovedknapp.d.ts @@ -0,0 +1,7 @@ +/// +import * as React from 'react'; +import { KnappProps } from './knapp'; +declare class Hovedknapp extends React.Component { + render(): JSX.Element; +} +export default Hovedknapp; diff --git a/packages/node_modules/nav-frontend-knapper/src/index.d.ts b/packages/node_modules/nav-frontend-knapper/src/index.d.ts new file mode 100644 index 0000000000..841383dcad --- /dev/null +++ b/packages/node_modules/nav-frontend-knapper/src/index.d.ts @@ -0,0 +1,18 @@ +/// +import * as React from 'react'; +import 'nav-frontend-knapper-style'; +import { KnappProps } from './knapp'; +export interface KnappBaseProps extends KnappProps { + type: 'standard' | 'hoved' | 'fare'; +} +/** + * Knapp, Hovedknapp og Fareknapp arver alle fra KnappBase, og har da samme props. + * Unntaket er `type` som blir satt av de respektive underklassene. + */ +declare class KnappBase extends React.Component { + render(): JSX.Element; +} +export default KnappBase; +export { default as Knapp } from './knapp'; +export { default as Hovedknapp } from './hovedknapp'; +export { default as Fareknapp } from './fareknapp'; diff --git a/packages/node_modules/nav-frontend-knapper/src/knapp.d.ts b/packages/node_modules/nav-frontend-knapper/src/knapp.d.ts new file mode 100644 index 0000000000..10e9730080 --- /dev/null +++ b/packages/node_modules/nav-frontend-knapper/src/knapp.d.ts @@ -0,0 +1,14 @@ +/// +import * as React from 'react'; +import { CustomHTMLButtonAttributes } from "./CustomHTMLButtonAttributes"; +export interface KnappProps extends CustomHTMLButtonAttributes { + htmlType?: 'submit' | 'button' | 'reset'; + mini?: boolean; + spinner?: boolean; + autoDisableVedSpinner?: boolean; + inaktivKlasseVedDisabled?: boolean; +} +declare class Knapp extends React.Component { + render(): JSX.Element; +} +export default Knapp; diff --git a/packages/node_modules/nav-frontend-lenkepanel/src/Lenkepanel-base.d.ts b/packages/node_modules/nav-frontend-lenkepanel/src/Lenkepanel-base.d.ts new file mode 100644 index 0000000000..3d8724c286 --- /dev/null +++ b/packages/node_modules/nav-frontend-lenkepanel/src/Lenkepanel-base.d.ts @@ -0,0 +1,13 @@ +/// +import * as React from 'react'; +import 'nav-frontend-lenkepanel-style'; +export interface LenkepanelBaseProps { + className?: string; + href: string; + children: React.ReactNode | React.ReactNode[]; + linkCreator?: Function; +} +declare class LenkepanelBase extends React.Component { + render(): any; +} +export default LenkepanelBase; diff --git a/packages/node_modules/nav-frontend-lenkepanel/src/index.d.ts b/packages/node_modules/nav-frontend-lenkepanel/src/index.d.ts new file mode 100644 index 0000000000..e55fcdc539 --- /dev/null +++ b/packages/node_modules/nav-frontend-lenkepanel/src/index.d.ts @@ -0,0 +1,12 @@ +/// +import * as React from 'react'; +import 'nav-frontend-lenkepanel-style'; +import { LenkepanelBaseProps } from './Lenkepanel-base'; +export interface LenkepanelProps extends LenkepanelBaseProps { + tittelProps: string; +} +declare class Lenkepanel extends React.PureComponent { + render(): JSX.Element; +} +export default Lenkepanel; +export { default as LenkepanelBase } from './Lenkepanel-base'; diff --git a/packages/node_modules/nav-frontend-paneler/src/index.d.ts b/packages/node_modules/nav-frontend-paneler/src/index.d.ts new file mode 100644 index 0000000000..57c39a6372 --- /dev/null +++ b/packages/node_modules/nav-frontend-paneler/src/index.d.ts @@ -0,0 +1,12 @@ +/// +import * as React from 'react'; +import 'nav-frontend-paneler-style'; +export interface PanelBaseProps { + children: React.ReactNode | React.ReactChild | React.ReactChildren; + className?: string; +} +declare class PanelBase extends React.Component { + render(): JSX.Element; +} +export default PanelBase; +export declare const Panel: (props: any) => JSX.Element; diff --git a/packages/node_modules/nav-frontend-skjema/src/radio-panel-gruppe.d.ts b/packages/node_modules/nav-frontend-skjema/src/radio-panel-gruppe.d.ts new file mode 100644 index 0000000000..5a5d853eb0 --- /dev/null +++ b/packages/node_modules/nav-frontend-skjema/src/radio-panel-gruppe.d.ts @@ -0,0 +1,29 @@ +/// +import * as React from 'react'; +import 'nav-frontend-skjema-style'; +export interface RadioProps { + label: string; + value: string; + id?: string; + disabled?: boolean; +} +export interface FeilProps { + feilmelding: React.ReactNode | React.ReactChild | React.ReactChildren; +} +export interface RadioPanelGruppeProps { + radios: RadioProps[]; + name: string; + legend: string; + onChange: (event: React.SyntheticEvent, value: string) => void; + checked?: string; + feil?: FeilProps; +} +export interface RadioPanelProps extends RadioProps { + checked: boolean; + name: string; + onChange: (event: React.SyntheticEvent) => void; +} +declare class RadioPanelGruppe extends React.Component { + render(): JSX.Element; +} +export default RadioPanelGruppe; diff --git a/packages/node_modules/nav-frontend-snakkeboble/src/snakkeboble.d.ts b/packages/node_modules/nav-frontend-snakkeboble/src/snakkeboble.d.ts new file mode 100644 index 0000000000..bc42da597d --- /dev/null +++ b/packages/node_modules/nav-frontend-snakkeboble/src/snakkeboble.d.ts @@ -0,0 +1,17 @@ +/// +import * as React from 'react'; +import 'nav-frontend-snakkeboble-style'; +export interface SnakkebobleProps { + dato?: string; + topp: string; + children: React.ReactChildren | React.ReactChild | React.ReactNode; + pilHoyre?: boolean; + ikonClass?: string; +} +/** + * En snakkeboble for dialog + */ +declare class Snakkeboble extends React.Component { + render(): JSX.Element; +} +export default Snakkeboble; diff --git a/packages/node_modules/nav-frontend-spinner/src/spinner.d.ts b/packages/node_modules/nav-frontend-spinner/src/spinner.d.ts new file mode 100644 index 0000000000..0d8ec8c33c --- /dev/null +++ b/packages/node_modules/nav-frontend-spinner/src/spinner.d.ts @@ -0,0 +1,16 @@ +/// +import * as React from 'react'; +import 'nav-frontend-spinner-style'; +export interface NavFrontendSpinnerProps { + negativ?: boolean; + stroke?: boolean; + className?: string; + 'aria-label'?: string; +} +export interface NavFrontendSpinnerBaseProps extends NavFrontendSpinnerProps { + type?: 'XXS' | 'XS' | 'S' | 'M' | 'L' | 'XL' | 'XXL' | 'XXXL'; +} +declare class NavFrontendSpinner extends React.Component { + render(): JSX.Element; +} +export default NavFrontendSpinner; diff --git a/packages/node_modules/nav-frontend-tekstomrade/src/tekstomrade.d.ts b/packages/node_modules/nav-frontend-tekstomrade/src/tekstomrade.d.ts new file mode 100644 index 0000000000..ecf653f38d --- /dev/null +++ b/packages/node_modules/nav-frontend-tekstomrade/src/tekstomrade.d.ts @@ -0,0 +1,10 @@ +/// +import * as React from 'react'; +export interface TekstomradeProps { + children: string; + ingenFormattering?: boolean; +} +declare class Tekstomrade extends React.Component { + render(): JSX.Element; +} +export default Tekstomrade; diff --git a/packages/node_modules/nav-frontend-typografi/src/avsnitt.d.ts b/packages/node_modules/nav-frontend-typografi/src/avsnitt.d.ts new file mode 100644 index 0000000000..5330e39c41 --- /dev/null +++ b/packages/node_modules/nav-frontend-typografi/src/avsnitt.d.ts @@ -0,0 +1,7 @@ +/// +import * as React from 'react'; +import { TypografiProps } from './index'; +declare class Avsnitt extends React.Component { + render(): JSX.Element; +} +export default Avsnitt; diff --git a/packages/node_modules/nav-frontend-typografi/src/element.d.ts b/packages/node_modules/nav-frontend-typografi/src/element.d.ts new file mode 100644 index 0000000000..cb03fac0fa --- /dev/null +++ b/packages/node_modules/nav-frontend-typografi/src/element.d.ts @@ -0,0 +1,7 @@ +/// +import * as React from 'react'; +import { TypografiProps } from './index'; +declare class Element extends React.Component { + render(): JSX.Element; +} +export default Element; diff --git a/packages/node_modules/nav-frontend-typografi/src/etikett-liten.d.ts b/packages/node_modules/nav-frontend-typografi/src/etikett-liten.d.ts new file mode 100644 index 0000000000..00f5f812a1 --- /dev/null +++ b/packages/node_modules/nav-frontend-typografi/src/etikett-liten.d.ts @@ -0,0 +1,7 @@ +/// +import * as React from 'react'; +import { TypografiProps } from './index'; +declare class EtikettLiten extends React.Component { + render(): JSX.Element; +} +export default EtikettLiten; diff --git a/packages/node_modules/nav-frontend-typografi/src/index.d.ts b/packages/node_modules/nav-frontend-typografi/src/index.d.ts new file mode 100644 index 0000000000..3091fd9dbe --- /dev/null +++ b/packages/node_modules/nav-frontend-typografi/src/index.d.ts @@ -0,0 +1,71 @@ +/// +import * as React from 'react'; +import 'nav-frontend-typografi-style'; +export declare const typeConfigMap: { + sidetittel: { + defaultTag: string; + cls: (...args: any[]) => string; + }; + innholdstittel: { + defaultTag: string; + cls: (...args: any[]) => string; + }; + systemtittel: { + defaultTag: string; + cls: (...args: any[]) => string; + }; + undertittel: { + defaultTag: string; + cls: (...args: any[]) => string; + }; + ingress: { + defaultTag: string; + cls: (...args: any[]) => string; + }; + element: { + defaultTag: string; + cls: (...args: any[]) => string; + }; + normaltekst: { + defaultTag: string; + cls: (...args: any[]) => string; + }; + etikettLiten: { + defaultTag: string; + cls: (...args: any[]) => string; + }; + undertekstBold: { + defaultTag: string; + cls: (...args: any[]) => string; + }; + undertekst: { + defaultTag: string; + cls: (...args: any[]) => string; + }; +}; +export interface TypografiProps { + children: React.ReactNode | React.ReactChild | React.ReactChildren; + tag?: string; + className?: string; +} +export interface TypografiBaseProps extends TypografiProps { + type: string; +} +declare class TypografiBase extends React.Component { + render(): React.ComponentElement<{ + className: any; + }, React.Component<{ + className: any; + }, React.ComponentState>>; +} +export default TypografiBase; +export { default as Sidetittel } from './sidetittel'; +export { default as Innholdstittel } from './innholdstittel'; +export { default as Systemtittel } from './systemtittel'; +export { default as Undertittel } from './undertittel'; +export { default as Ingress } from './ingress'; +export { default as Element } from './element'; +export { default as Normaltekst } from './normaltekst'; +export { default as EtikettLiten } from './etikett-liten'; +export { default as Undertekst } from './undertekst'; +export { default as UndertekstBold } from './undertekst-bold'; diff --git a/packages/node_modules/nav-frontend-typografi/src/infotekst.d.ts b/packages/node_modules/nav-frontend-typografi/src/infotekst.d.ts new file mode 100644 index 0000000000..bdca58c8e2 --- /dev/null +++ b/packages/node_modules/nav-frontend-typografi/src/infotekst.d.ts @@ -0,0 +1,7 @@ +/// +import * as React from 'react'; +import { TypografiProps } from './index'; +declare class Infotekst extends React.Component { + render(): JSX.Element; +} +export default Infotekst; diff --git a/packages/node_modules/nav-frontend-typografi/src/ingress.d.ts b/packages/node_modules/nav-frontend-typografi/src/ingress.d.ts new file mode 100644 index 0000000000..f072d2a82f --- /dev/null +++ b/packages/node_modules/nav-frontend-typografi/src/ingress.d.ts @@ -0,0 +1,7 @@ +/// +import * as React from 'react'; +import { TypografiProps } from './index'; +declare class Ingress extends React.Component { + render(): JSX.Element; +} +export default Ingress; diff --git a/packages/node_modules/nav-frontend-typografi/src/innholdstittel.d.ts b/packages/node_modules/nav-frontend-typografi/src/innholdstittel.d.ts new file mode 100644 index 0000000000..6b905f7865 --- /dev/null +++ b/packages/node_modules/nav-frontend-typografi/src/innholdstittel.d.ts @@ -0,0 +1,7 @@ +/// +import * as React from 'react'; +import { TypografiProps } from './index'; +declare class Innholdstittel extends React.Component { + render(): JSX.Element; +} +export default Innholdstittel; diff --git a/packages/node_modules/nav-frontend-typografi/src/normaltekst.d.ts b/packages/node_modules/nav-frontend-typografi/src/normaltekst.d.ts new file mode 100644 index 0000000000..3488399abf --- /dev/null +++ b/packages/node_modules/nav-frontend-typografi/src/normaltekst.d.ts @@ -0,0 +1,7 @@ +/// +import * as React from 'react'; +import { TypografiProps } from './index'; +declare class Normaltekst extends React.Component { + render(): JSX.Element; +} +export default Normaltekst; diff --git a/packages/node_modules/nav-frontend-typografi/src/sidetittel.d.ts b/packages/node_modules/nav-frontend-typografi/src/sidetittel.d.ts new file mode 100644 index 0000000000..004170d2b5 --- /dev/null +++ b/packages/node_modules/nav-frontend-typografi/src/sidetittel.d.ts @@ -0,0 +1,7 @@ +/// +import * as React from 'react'; +import { TypografiProps } from './index'; +declare class Sidetittel extends React.Component { + render(): JSX.Element; +} +export default Sidetittel; diff --git a/packages/node_modules/nav-frontend-typografi/src/systemtittel.d.ts b/packages/node_modules/nav-frontend-typografi/src/systemtittel.d.ts new file mode 100644 index 0000000000..0bdc5279e7 --- /dev/null +++ b/packages/node_modules/nav-frontend-typografi/src/systemtittel.d.ts @@ -0,0 +1,7 @@ +/// +import * as React from 'react'; +import { TypografiProps } from './index'; +declare class Systemtittel extends React.Component { + render(): JSX.Element; +} +export default Systemtittel; diff --git a/packages/node_modules/nav-frontend-typografi/src/undertekst-bold.d.ts b/packages/node_modules/nav-frontend-typografi/src/undertekst-bold.d.ts new file mode 100644 index 0000000000..901e072ee5 --- /dev/null +++ b/packages/node_modules/nav-frontend-typografi/src/undertekst-bold.d.ts @@ -0,0 +1,7 @@ +/// +import * as React from 'react'; +import { TypografiProps } from './index'; +declare class UndertekstBold extends React.Component { + render(): JSX.Element; +} +export default UndertekstBold; diff --git a/packages/node_modules/nav-frontend-typografi/src/undertekst.d.ts b/packages/node_modules/nav-frontend-typografi/src/undertekst.d.ts new file mode 100644 index 0000000000..754d26a290 --- /dev/null +++ b/packages/node_modules/nav-frontend-typografi/src/undertekst.d.ts @@ -0,0 +1,7 @@ +/// +import * as React from 'react'; +import { TypografiProps } from './index'; +declare class Undertekst extends React.Component { + render(): JSX.Element; +} +export default Undertekst; diff --git a/packages/node_modules/nav-frontend-typografi/src/undertittel.d.ts b/packages/node_modules/nav-frontend-typografi/src/undertittel.d.ts new file mode 100644 index 0000000000..e3fcd96031 --- /dev/null +++ b/packages/node_modules/nav-frontend-typografi/src/undertittel.d.ts @@ -0,0 +1,7 @@ +/// +import * as React from 'react'; +import { TypografiProps } from './index'; +declare class Undertittel extends React.Component { + render(): JSX.Element; +} +export default Undertittel; diff --git a/packages/node_modules/nav-frontend-veileder/src/veileder-chat-bubble.d.ts b/packages/node_modules/nav-frontend-veileder/src/veileder-chat-bubble.d.ts new file mode 100644 index 0000000000..a58e73dd8d --- /dev/null +++ b/packages/node_modules/nav-frontend-veileder/src/veileder-chat-bubble.d.ts @@ -0,0 +1,9 @@ +/// +import * as React from 'react'; +import { StatelessComponent } from 'react'; +export interface VeilederChatBubbleProps { + says: React.ReactNode | React.ReactChild | React.ReactChildren; + offset: number; +} +declare const VeilederChatBubble: StatelessComponent; +export default VeilederChatBubble; diff --git a/packages/node_modules/nav-frontend-veileder/src/veileder.d.ts b/packages/node_modules/nav-frontend-veileder/src/veileder.d.ts new file mode 100644 index 0000000000..e03aa3d72d --- /dev/null +++ b/packages/node_modules/nav-frontend-veileder/src/veileder.d.ts @@ -0,0 +1,18 @@ +/// +import * as React from 'react'; +import 'nav-frontend-veileder-style'; +export interface VeilederProps { + width?: number; + children: React.ReactNode | React.ReactChild | React.ReactChildren; + says?: React.ReactNode | React.ReactChild | React.ReactChildren; + color?: string; + transparent?: boolean; + nomask?: boolean; + center?: boolean; + type: 'normal' | 'suksess' | 'advarsel' | 'feilmelding'; +} +declare class Veileder extends React.Component { + static defaultProps: Partial; + render(): JSX.Element; +} +export default Veileder; From 230bf8ea47b5bd16b1e62d7e7b91a483fa5984c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjell=20Arne=20Br=C3=B8dreskift?= Date: Wed, 28 Feb 2018 09:35:39 +0100 Subject: [PATCH 02/11] Konvertering til typescript. --- ...ample.ts => _ekspanderbartpanel.sample.js} | 2 +- .../package-lock.json | 25 ----------------- .../package.json | 1 + .../src/ekspanderbartpanel-base-pure.tsx | 2 +- .../src/ekspanderbartpanel-pure.tsx | 10 +++---- .../src/index.tsx | 14 +++++----- .../nav-frontend-grid-style/README.md | 28 +++++++++---------- 7 files changed, 28 insertions(+), 54 deletions(-) rename packages/node_modules/nav-frontend-ekspanderbartpanel/{_ekspanderbartpanel.sample.ts => _ekspanderbartpanel.sample.js} (83%) delete mode 100644 packages/node_modules/nav-frontend-ekspanderbartpanel/package-lock.json diff --git a/packages/node_modules/nav-frontend-ekspanderbartpanel/_ekspanderbartpanel.sample.ts b/packages/node_modules/nav-frontend-ekspanderbartpanel/_ekspanderbartpanel.sample.js similarity index 83% rename from packages/node_modules/nav-frontend-ekspanderbartpanel/_ekspanderbartpanel.sample.ts rename to packages/node_modules/nav-frontend-ekspanderbartpanel/_ekspanderbartpanel.sample.js index 4bd7e5988c..fdbe451692 100644 --- a/packages/node_modules/nav-frontend-ekspanderbartpanel/_ekspanderbartpanel.sample.ts +++ b/packages/node_modules/nav-frontend-ekspanderbartpanel/_ekspanderbartpanel.sample.js @@ -1,4 +1,4 @@ -import Ekspanderbartpanel from './'; +import Ekspanderbartpanel from './src/index.tsx'; import generateSample from '../../../guideline-app/app/utils/sampling/sampleDataGenerator'; export default generateSample({ diff --git a/packages/node_modules/nav-frontend-ekspanderbartpanel/package-lock.json b/packages/node_modules/nav-frontend-ekspanderbartpanel/package-lock.json deleted file mode 100644 index 5744f169c6..0000000000 --- a/packages/node_modules/nav-frontend-ekspanderbartpanel/package-lock.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "nav-frontend-ekspanderbartpanel", - "version": "0.2.21", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@types/react-collapse": { - "version": "4.0.1", - "resolved": "http://a34apvl062.devillo.no:8082/repository/npm-all/@types/react-collapse/-/react-collapse-4.0.1.tgz", - "integrity": "sha512-nGHiV2y2Vzuq4wrYOj5Gd1jv1/maNHcRSDrxmA3mZlOOvnYFD7hbbrQLCDYM4iX7jZih+wCEj8+WLh+IqI6YJA==", - "dev": true, - "requires": { - "@types/react": "16.0.38" - }, - "dependencies": { - "@types/react": { - "version": "16.0.38", - "resolved": "http://a34apvl062.devillo.no:8082/repository/npm-all/@types/react/-/react-16.0.38.tgz", - "integrity": "sha512-t0XJHNrlzLiVAKCWxS9zzAadoQO8zGFpHsrvNVk7QmrDXnm3cPFy2wFcHGNbKjntBiXznL6qQkh+a1Wxu21+dA==", - "dev": true - } - } - } - } -} diff --git a/packages/node_modules/nav-frontend-ekspanderbartpanel/package.json b/packages/node_modules/nav-frontend-ekspanderbartpanel/package.json index 05fb691b69..7299724bf0 100644 --- a/packages/node_modules/nav-frontend-ekspanderbartpanel/package.json +++ b/packages/node_modules/nav-frontend-ekspanderbartpanel/package.json @@ -4,6 +4,7 @@ "main": "lib/index.js", "jsnext:main": "src/index.js", "license": "MIT", + "types": "lib/index.d.ts", "files": [ "/src", "/lib" diff --git a/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base-pure.tsx b/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base-pure.tsx index a770fe3b46..c252136905 100644 --- a/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base-pure.tsx +++ b/packages/node_modules/nav-frontend-ekspanderbartpanel/src/ekspanderbartpanel-base-pure.tsx @@ -59,7 +59,7 @@ class EkspanderbartpanelBasePure extends React.Component