@raiadrogasil/pulso-react-components
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"main": "./index.js", | ||
@@ -11,0 +11,0 @@ "keywords": [ |
@@ -0,1 +1,2 @@ | ||
import React from "react"; | ||
export interface Props { | ||
@@ -58,3 +59,3 @@ label: string; | ||
*/ | ||
declare function TextField({ label, id, name, value, leadingIcon, helperText, disabled, error, onReset, inverse, backgroundColorName, onChange, accesskey, autocomplete, autofocus, autosave, form, formaction, inputmode, type, list, max, maxlength, min, minlength, multiple, pattern, readonly, required, size, spellcheck, src, step, tabindex, width, dataQA, dataQAReset, dataCollect, dataCollectReset, dataCollectInfo, dataCollectInfoReset, }: Props): JSX.Element; | ||
declare const TextField: React.ForwardRefExoticComponent<Props & React.RefAttributes<any>>; | ||
export default TextField; |
@@ -30,3 +30,3 @@ "use strict"; | ||
*/ | ||
function TextField(_a) { | ||
var TextField = react_1.default.forwardRef(function (_a, ref) { | ||
var label = _a.label, id = _a.id, name = _a.name, value = _a.value, leadingIcon = _a.leadingIcon, helperText = _a.helperText, disabled = _a.disabled, error = _a.error, onReset = _a.onReset, inverse = _a.inverse, backgroundColorName = _a.backgroundColorName, onChange = _a.onChange, accesskey = _a.accesskey, autocomplete = _a.autocomplete, autofocus = _a.autofocus, autosave = _a.autosave, form = _a.form, formaction = _a.formaction, inputmode = _a.inputmode, type = _a.type, list = _a.list, max = _a.max, maxlength = _a.maxlength, min = _a.min, minlength = _a.minlength, multiple = _a.multiple, pattern = _a.pattern, readonly = _a.readonly, required = _a.required, size = _a.size, spellcheck = _a.spellcheck, src = _a.src, step = _a.step, tabindex = _a.tabindex, width = _a.width, dataQA = _a.dataQA, dataQAReset = _a.dataQAReset, dataCollect = _a.dataCollect, dataCollectReset = _a.dataCollectReset, dataCollectInfo = _a.dataCollectInfo, dataCollectInfoReset = _a.dataCollectInfoReset; | ||
@@ -54,3 +54,3 @@ var _b = react_1.useState(value ? value : ""), inputValue = _b[0], setInputValue = _b[1]; | ||
handleChange(event); | ||
}, accessKey: accesskey ? accesskey : "", autoComplete: autocomplete ? autocomplete : "off", autoFocus: autofocus ? autofocus : false, autoSave: autosave ? autosave : "", form: form ? form : "", formAction: formaction ? formaction : "", inputMode: inputmode ? inputmode : "text", list: list ? list : "", max: max ? max : "", maxLength: maxlength ? maxlength : undefined, min: min ? min : "", minLength: minlength ? minlength : undefined, multiple: multiple ? multiple : false, pattern: pattern ? pattern : "", readOnly: readonly ? readonly : false, required: required ? required : false, size: size ? size : undefined, spellCheck: spellcheck ? spellcheck : false, src: src ? src : "", step: step ? step : "", tabIndex: tabindex ? tabindex : undefined, width: width ? width : "", "data-qa": dataQA ? dataQA : null, "data-collect": dataCollect ? dataCollect : null, "data-collect-info": dataCollectInfo ? dataCollectInfo : null }), | ||
}, accessKey: accesskey ? accesskey : "", autoComplete: autocomplete ? autocomplete : "off", autoFocus: autofocus ? autofocus : false, autoSave: autosave ? autosave : "", form: form ? form : "", formAction: formaction ? formaction : "", inputMode: inputmode ? inputmode : "text", list: list ? list : "", max: max ? max : "", maxLength: maxlength ? maxlength : undefined, min: min ? min : "", minLength: minlength ? minlength : undefined, multiple: multiple ? multiple : false, pattern: pattern ? pattern : "", readOnly: readonly ? readonly : false, ref: ref ? ref : null, required: required ? required : false, size: size ? size : undefined, spellCheck: spellcheck ? spellcheck : false, src: src ? src : "", step: step ? step : "", tabIndex: tabindex ? tabindex : undefined, width: width ? width : "", "data-qa": dataQA ? dataQA : null, "data-collect": dataCollect ? dataCollect : null, "data-collect-info": dataCollectInfo ? dataCollectInfo : null }), | ||
react_1.default.createElement("label", { className: mainElement + "__label" + (inputValue !== "" | ||
@@ -73,3 +73,3 @@ ? " " + mainElement + "__label--field-has-value" | ||
react_1.default.createElement(Icon_1.default, { size: "medium", symbol: leadingIcon }))) : (" "))); | ||
} | ||
}); | ||
exports.default = TextField; |
227641