nav-frontend-skjema
Advanced tools
Comparing version 3.0.13 to 3.0.14
@@ -17,3 +17,3 @@ "use strict"; | ||
var skjemaelement_feilmelding_1 = require("./skjemaelement-feilmelding"); | ||
var _1 = require("./"); | ||
var _1 = require("."); | ||
require("nav-frontend-skjema-style"); | ||
@@ -20,0 +20,0 @@ |
@@ -14,4 +14,4 @@ import * as React from 'react'; | ||
UNSAFE_componentWillReceiveProps(newProps: any): void; | ||
handleChange: (e: any) => void; | ||
toggleOutline(): void; | ||
handleChange: (e: any) => void; | ||
render(): JSX.Element; | ||
@@ -18,0 +18,0 @@ } |
@@ -14,2 +14,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/* eslint-disable max-classes-per-file */ | ||
var React = require("react"); | ||
@@ -20,3 +21,3 @@ var PT = require("prop-types"); | ||
require("nav-frontend-skjema-style"); | ||
var _1 = require("./"); | ||
var _1 = require("."); | ||
@@ -38,3 +39,3 @@ var CheckboksPanel = function (_React$Component) { | ||
} | ||
// tslint:disable-next-line: function-name | ||
// eslint-disable-next-line camelcase | ||
@@ -41,0 +42,0 @@ |
import * as React from 'react'; | ||
import { SkjemaGruppeProps } from './'; | ||
import { SkjemaGruppeProps } from '.'; | ||
import 'nav-frontend-skjema-style'; | ||
@@ -4,0 +4,0 @@ export declare class CheckboxGruppe extends React.Component<SkjemaGruppeProps> { |
@@ -14,8 +14,9 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/* eslint-disable max-classes-per-file */ | ||
var PT = require("prop-types"); | ||
var React = require("react"); | ||
var classNames = require("classnames"); | ||
var nav_frontend_js_utils_1 = require("nav-frontend-js-utils"); | ||
var skjemaelement_feilmelding_1 = require("./skjemaelement-feilmelding"); | ||
var nav_frontend_js_utils_1 = require("nav-frontend-js-utils"); | ||
var _1 = require("./"); | ||
var _1 = require("."); | ||
require("nav-frontend-skjema-style"); | ||
@@ -85,4 +86,5 @@ | ||
var feilmelding = context.feil || feil; | ||
// eslint-disable-next-line no-shadow | ||
var feilmeldingId = context.feilmeldingId || nav_frontend_js_utils_1.guid(); | ||
return React.createElement("div", { className: cls(className) }, React.createElement("input", Object.assign({ type: "checkbox", className: inputCls(feil), id: inputId, ref: checkboxRef, "aria-invalid": !!feilmelding, "aria-errormessage": feilmelding ? feilmeldingId : undefined }, other)), React.createElement("label", { className: "skjemaelement__label", htmlFor: inputId }, label), !!!context.feil && !!feil && React.createElement(skjemaelement_feilmelding_1.default, { id: feilmeldingId }, typeof feilmelding !== 'boolean' && feilmelding)); | ||
return React.createElement("div", { className: cls(className) }, React.createElement("input", Object.assign({ type: "checkbox", className: inputCls(feil), id: inputId, ref: checkboxRef, "aria-invalid": !!feilmelding, "aria-errormessage": feilmelding ? feilmeldingId : undefined }, other)), React.createElement("label", { className: "skjemaelement__label", htmlFor: inputId }, label), !context.feil && !!feil && React.createElement(skjemaelement_feilmelding_1.default, { id: feilmeldingId }, typeof feilmelding !== 'boolean' && feilmelding)); | ||
}); | ||
@@ -89,0 +91,0 @@ } |
@@ -13,4 +13,4 @@ "use strict"; | ||
var React = require("react"); | ||
var fnrvalidator_1 = require("@navikt/fnrvalidator"); | ||
var input_1 = require("./input"); | ||
var fnrvalidator_1 = require("@navikt/fnrvalidator"); | ||
require("nav-frontend-skjema-style"); | ||
@@ -17,0 +17,0 @@ |
@@ -17,5 +17,5 @@ "use strict"; | ||
var classNames = require("classnames"); | ||
var nav_frontend_js_utils_1 = require("nav-frontend-js-utils"); | ||
var skjemaelement_feilmelding_1 = require("./skjemaelement-feilmelding"); | ||
var nav_frontend_js_utils_1 = require("nav-frontend-js-utils"); | ||
var _1 = require("./"); | ||
var _1 = require("."); | ||
require("nav-frontend-skjema-style"); | ||
@@ -65,3 +65,3 @@ var cls = function cls(className) { | ||
var descriptionId = description ? nav_frontend_js_utils_1.guid() : undefined; | ||
return React.createElement("div", { className: cls(className) }, label && React.createElement(_1.Label, { htmlFor: inputId }, label), description && React.createElement("div", { className: "skjemaelement__description", id: descriptionId }, description), React.createElement("input", Object.assign({ type: "text", className: inputClass(bredde, inputClassName, feilmelding, mini), id: inputId, name: name, "aria-invalid": !!feilmelding, "aria-describedby": descriptionId, "aria-errormessage": feilmelding ? feilmeldingId : undefined }, other, { ref: inputRef })), !!!context.feil && !!feil && React.createElement(skjemaelement_feilmelding_1.default, { id: feilmeldingId }, typeof feilmelding !== 'boolean' && feilmelding)); | ||
return React.createElement("div", { className: cls(className) }, label && React.createElement(_1.Label, { htmlFor: inputId }, label), description && React.createElement("div", { className: "skjemaelement__description", id: descriptionId }, description), React.createElement("input", Object.assign({ type: "text", className: inputClass(bredde, inputClassName, feilmelding, mini), id: inputId, name: name, "aria-invalid": !!feilmelding, "aria-describedby": descriptionId, "aria-errormessage": feilmelding ? feilmeldingId : undefined }, other, { ref: inputRef })), !context.feil && !!feil && React.createElement(skjemaelement_feilmelding_1.default, { id: feilmeldingId }, typeof feilmelding !== 'boolean' && feilmelding)); | ||
}); | ||
@@ -68,0 +68,0 @@ } |
@@ -14,2 +14,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/* eslint-disable max-classes-per-file */ | ||
var React = require("react"); | ||
@@ -19,3 +20,3 @@ var PT = require("prop-types"); | ||
var nav_frontend_js_utils_1 = require("nav-frontend-js-utils"); | ||
var _1 = require("./"); | ||
var _1 = require("."); | ||
require("nav-frontend-skjema-style"); | ||
@@ -22,0 +23,0 @@ |
import * as React from 'react'; | ||
import 'nav-frontend-skjema-style'; | ||
import { SkjemaGruppeProps } from './'; | ||
import { SkjemaGruppeProps } from '.'; | ||
export declare class RadioGruppe extends React.Component<SkjemaGruppeProps> { | ||
@@ -5,0 +5,0 @@ render(): JSX.Element; |
@@ -14,2 +14,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/* eslint-disable indent */ | ||
/* eslint-disable max-classes-per-file */ | ||
var PT = require("prop-types"); | ||
@@ -20,3 +22,3 @@ var React = require("react"); | ||
require("nav-frontend-skjema-style"); | ||
var _1 = require("./"); | ||
var _1 = require("."); | ||
@@ -23,0 +25,0 @@ var RadioGruppe = function (_React$Component) { |
@@ -19,3 +19,3 @@ "use strict"; | ||
var skjemaelement_feilmelding_1 = require("./skjemaelement-feilmelding"); | ||
var _1 = require("./"); | ||
var _1 = require("."); | ||
require("nav-frontend-skjema-style"); | ||
@@ -67,3 +67,3 @@ var cls = function cls(className) { | ||
var descriptionId = description ? nav_frontend_js_utils_1.guid() : undefined; | ||
return React.createElement("div", { className: cls(className) }, label && React.createElement(_1.Label, { htmlFor: inputId }, label), description && React.createElement("div", { className: "skjemaelement__description", id: descriptionId }, description), React.createElement("div", { className: selectCls(bredde) }, React.createElement("select", Object.assign({ id: inputId, className: inputCls(feil), ref: selectRef, disabled: disabled, "aria-invalid": !!feilmelding, "aria-describedby": descriptionId, "aria-errormessage": feilmelding ? feilmeldingId : undefined }, other), children)), !!!context.feil && !!feil && React.createElement(skjemaelement_feilmelding_1.default, { id: feilmeldingId }, typeof feilmelding !== 'boolean' && feilmelding)); | ||
return React.createElement("div", { className: cls(className) }, label && React.createElement(_1.Label, { htmlFor: inputId }, label), description && React.createElement("div", { className: "skjemaelement__description", id: descriptionId }, description), React.createElement("div", { className: selectCls(bredde) }, React.createElement("select", Object.assign({ id: inputId, className: inputCls(feil), ref: selectRef, disabled: disabled, "aria-invalid": !!feilmelding, "aria-describedby": descriptionId, "aria-errormessage": feilmelding ? feilmeldingId : undefined }, other), children)), !context.feil && !!feil && React.createElement(skjemaelement_feilmelding_1.default, { id: feilmeldingId }, typeof feilmelding !== 'boolean' && feilmelding)); | ||
}); | ||
@@ -70,0 +70,0 @@ } |
@@ -61,3 +61,3 @@ "use strict"; | ||
'aria-invalid': !!feil, | ||
'aria-errormessage': !!feil ? feilmeldingId : undefined, | ||
'aria-errormessage': feil ? feilmeldingId : undefined, | ||
'aria-describedby': descriptionId | ||
@@ -64,0 +64,0 @@ }, other), content); |
@@ -108,2 +108,4 @@ import * as PT from 'prop-types'; | ||
textareaRef: undefined; | ||
label: string; | ||
description: string; | ||
}; | ||
@@ -110,0 +112,0 @@ constructor(props: any); |
@@ -18,3 +18,3 @@ "use strict"; | ||
var nav_frontend_js_utils_1 = require("nav-frontend-js-utils"); | ||
var _1 = require("./"); | ||
var _1 = require("."); | ||
var skjemaelement_feilmelding_1 = require("./skjemaelement-feilmelding"); | ||
@@ -97,6 +97,6 @@ require("nav-frontend-skjema-style"); | ||
var feilmeldingId = context.feilmeldingId || nav_frontend_js_utils_1.guid(); | ||
return React.createElement("div", { className: "skjemaelement textarea__container" }, label && React.createElement(_1.Label, { htmlFor: _this2.textareaId }, label), description && React.createElement("div", { className: "skjemaelement__description", id: _this2.descriptionId }, description), React.createElement("div", { className: "textarea--medMeta__wrapper" }, !!_this2.props.maxLength && React.createElement("span", { id: _this2.maxTegnId, className: "sr-only" }, "Tekstomr\xE5de med plass til ", _this2.props.maxLength, " tegn."), React.createElement(nav_frontend_js_utils_1.EventThrottler, { event: "resize", callback: _this2.updateHeight, delay: 100 }, React.createElement("textarea", Object.assign({ ref: function ref(textarea) { | ||
return React.createElement("div", { className: "skjemaelement textarea__container" }, label && React.createElement(_1.Label, { htmlFor: _this2.textareaId }, label), description && React.createElement("div", { className: "skjemaelement__description", id: _this2.descriptionId }, description), React.createElement("div", { className: "textarea--medMeta__wrapper" }, !!_this2.props.maxLength && React.createElement("span", { id: _this2.maxTegnId, className: "sr-only" }, "Tekstomr\xE5de med plass til", ' ', _this2.props.maxLength, ' ', "tegn."), React.createElement(nav_frontend_js_utils_1.EventThrottler, { event: "resize", callback: _this2.updateHeight, delay: 100 }, React.createElement("textarea", Object.assign({ ref: function ref(textarea) { | ||
_this2.tekstomrade = textarea; | ||
if (textareaRef !== undefined) textareaRef(textarea); | ||
}, onChange: onChange, className: inputCls(textareaClass, feilmelding), id: _this2.textareaId, name: name, style: { height: '30px' }, "aria-invalid": !!feilmelding, "aria-errormessage": feilmelding ? feilmeldingId : undefined, "aria-describedby": _this2.describedbyId }, other))), React.createElement(Teller, { antallTegn: antallTegn, maxLength: maxLength, tellerTekst: tellerTekst })), !!!context.feil && !!feil && React.createElement(skjemaelement_feilmelding_1.default, { id: feilmeldingId }, typeof feilmelding !== 'boolean' && feilmelding), React.createElement("div", { className: "textareamirror", ref: function ref(mirror) { | ||
}, onChange: onChange, className: inputCls(textareaClass, feilmelding), id: _this2.textareaId, name: name, style: { height: '30px' }, "aria-invalid": !!feilmelding, "aria-errormessage": feilmelding ? feilmeldingId : undefined, "aria-describedby": _this2.describedbyId }, other))), React.createElement(Teller, { antallTegn: antallTegn, maxLength: maxLength, tellerTekst: tellerTekst })), !context.feil && !!feil && React.createElement(skjemaelement_feilmelding_1.default, { id: feilmeldingId }, typeof feilmelding !== 'boolean' && feilmelding), React.createElement("div", { className: "textareamirror", ref: function ref(mirror) { | ||
_this2.mirror = mirror; | ||
@@ -163,4 +163,7 @@ }, "aria-hidden": "true" })); | ||
feil: undefined, | ||
// eslint-disable-next-line no-use-before-define | ||
tellerTekst: defaultTellerTekst, | ||
textareaRef: undefined | ||
textareaRef: undefined, | ||
label: '', | ||
description: '' | ||
}; | ||
@@ -167,0 +170,0 @@ var Teller = function Teller(props) { |
{ | ||
"name": "nav-frontend-skjema", | ||
"version": "3.0.13", | ||
"version": "3.0.14", | ||
"main": "lib/index.js", | ||
@@ -18,6 +18,6 @@ "types": "lib/index.d.ts", | ||
"classnames": "^2.2.5", | ||
"nav-frontend-js-utils": "^1.0.8", | ||
"nav-frontend-lenker": "^1.0.40", | ||
"nav-frontend-js-utils": "^1.0.9", | ||
"nav-frontend-lenker": "^1.0.41", | ||
"nav-frontend-skjema-style": "^2.0.9", | ||
"nav-frontend-typografi": "^2.0.23", | ||
"nav-frontend-typografi": "^2.0.24", | ||
"prop-types": "^15.5.10", | ||
@@ -29,6 +29,6 @@ "react": "^15.4.2 || ^16.0.0" | ||
"classnames": "^2.2.5", | ||
"nav-frontend-js-utils": "^1.0.8", | ||
"nav-frontend-lenker": "^1.0.40", | ||
"nav-frontend-js-utils": "^1.0.9", | ||
"nav-frontend-lenker": "^1.0.41", | ||
"nav-frontend-skjema-style": "^2.0.9", | ||
"nav-frontend-typografi": "^2.0.23", | ||
"nav-frontend-typografi": "^2.0.24", | ||
"prop-types": "^15.5.10", | ||
@@ -35,0 +35,0 @@ "react": "^15.4.2 || ^16.0.0" |
@@ -8,10 +8,16 @@ export { default as FnrInput, FnrInputProps } from './fnr-input'; | ||
export { default as Select, SelectProps } from './select'; | ||
export { default as SkjemaGruppe, SkjemaGruppeProps, SkjemaGruppeFeilContext, SkjemaGruppeFeilContextProps } from './skjema-gruppe'; | ||
export { | ||
default as SkjemaGruppe, SkjemaGruppeProps, SkjemaGruppeFeilContext, SkjemaGruppeFeilContextProps | ||
} from './skjema-gruppe'; | ||
export { default as ToggleGruppe, ToggleGruppeProps } from './toggle-gruppe'; | ||
export { default as ToggleKnapp, ToggleKnappProps } from './toggle-knapp'; | ||
export { default as RadioPanelGruppe, RadioPanelGruppeProps, RadioPanel, RadioPanelProps } from './radio-panel-gruppe'; | ||
export { default as CheckboksPanelGruppe, CheckboksPanelGruppeProps, CheckboksPanel, CheckboksPanelProps } from './checkboks-panel-gruppe'; | ||
export { default as BekreftCheckboksPanel, BekreftCheckboksPanelProps } from './bekreft-checkboks-panel'; | ||
export { | ||
default as RadioPanelGruppe, RadioPanelGruppeProps, RadioPanel, RadioPanelProps | ||
} from './radio-panel-gruppe'; | ||
export { | ||
default as CheckboksPanelGruppe, CheckboksPanelGruppeProps, CheckboksPanel, CheckboksPanelProps | ||
} from './checkboks-panel-gruppe'; | ||
export { default as BekreftCheckboksPanel, BekreftCheckboksPanelProps } from './bekreft-checkboks-panel'; | ||
export { default as Feiloppsummering, FeiloppsummeringProps, FeiloppsummeringFeil } from './feiloppsummering'; | ||
export { default as Label } from './label'; | ||
export { default as SkjemaelementFeilmelding } from './skjemaelement-feilmelding'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
156815
3626