math-main-components 0.0.157 → 0.0.158
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,12 @@
|
|
1
1
|
import React, { ChangeEvent } from 'react';
|
2
|
-
export declare function InputText({ id, title, name, placeholder, defaultValue, autoFocus, type, width, marginBottom, available, onInput }: {
|
2
|
+
export declare function InputText({ id, title, name, placeholder, defaultValue, autoFocus, type, width, marginBottom, autoComplete, available, onInput }: {
|
3
3
|
id?: string;
|
4
4
|
title: string;
|
5
5
|
name: string;
|
6
6
|
placeholder?: string;
|
7
7
|
defaultValue?: string;
|
8
8
|
autoFocus?: boolean;
|
9
|
+
autoComplete?: string;
|
9
10
|
type?: string;
|
10
11
|
width?: string;
|
11
12
|
marginBottom?: string;
|
package/dist/index.cjs.js
CHANGED
@@ -309,7 +309,7 @@ function InputPassword({ id, placeholder = "", title = "Passwort", name, isVisib
|
|
309
309
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
310
310
|
React__default["default"].createElement("div", { className: `${styles$f.container} ${isVisible ? styles$f.visible : styles$f.hidden}`, style: { width: width } },
|
311
311
|
React__default["default"].createElement("div", { className: styles$f.form },
|
312
|
-
React__default["default"].createElement("input", { className: `${styles$f.input} ${title != undefined ? styles$f.with_title : styles$f.without_title} ${value.length > 0 ? styles$f.valid : styles$f.not_valid}`, name: name, minLength: minLength, autoComplete: autoComplete, placeholder: placeholder, type: hidePassword ? "password" : "text", onInput: (event) => setValue(event.target.value) }),
|
312
|
+
React__default["default"].createElement("input", { className: `${styles$f.input} ${title != undefined ? styles$f.with_title : styles$f.without_title} ${value.length > 0 ? styles$f.valid : styles$f.not_valid}`, name: name, id: id, minLength: minLength, autoComplete: autoComplete, placeholder: placeholder, type: hidePassword ? "password" : "text", onInput: (event) => setValue(event.target.value) }),
|
313
313
|
React__default["default"].createElement("label", { htmlFor: "text", className: styles$f.label },
|
314
314
|
React__default["default"].createElement("span", { className: styles$f.label_text }, title)),
|
315
315
|
React__default["default"].createElement("button", { title: hidePassword ? "Passwort anzeigen" : "Passwort verstecken", className: styles$f.hideButton, onClick: () => setHidePassword(!hidePassword), type: "button" },
|
@@ -401,7 +401,7 @@ var css_248z$d = ".styles-module_container__zcXGF {\n display: flex;\n width:
|
|
401
401
|
var styles$d = {"container":"styles-module_container__zcXGF","input":"styles-module_input__Tpth8","not_available":"styles-module_not_available__CRXjB","label":"styles-module_label__appHO","label_text":"styles-module_label_text__-sKjY","with_title":"styles-module_with_title__L3eGj","valid":"styles-module_valid__zWcOz"};
|
402
402
|
styleInject(css_248z$d);
|
403
403
|
|
404
|
-
function InputText({ id, title, name, placeholder = "", defaultValue = "", autoFocus = false, type = "text", width = "100%", marginBottom, available = true, onInput = (event) => { } }) {
|
404
|
+
function InputText({ id, title, name, placeholder = "", defaultValue = "", autoFocus = false, type = "text", width = "100%", marginBottom, autoComplete = "off", available = true, onInput = (event) => { } }) {
|
405
405
|
const [value, setValue] = React.useState(defaultValue);
|
406
406
|
const inputElement = React.useCallback((element) => {
|
407
407
|
if (element && autoFocus)
|
@@ -409,7 +409,7 @@ function InputText({ id, title, name, placeholder = "", defaultValue = "", autoF
|
|
409
409
|
}, [autoFocus]);
|
410
410
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
411
411
|
React__default["default"].createElement("div", { className: styles$d.container, style: { width, marginBottom } },
|
412
|
-
React__default["default"].createElement("input", { className: `${styles$d.input} ${title != undefined ? styles$d.with_title : styles$d.without_title} ${value.length > 0 || defaultValue.length > 0 ? styles$d.valid : styles$d.not_valid} ${available ? styles$d.available : styles$d.not_available}`, name: name, id: id, type: type, placeholder: placeholder, ref: inputElement, defaultValue: defaultValue, onInput: (event) => {
|
412
|
+
React__default["default"].createElement("input", { className: `${styles$d.input} ${title != undefined ? styles$d.with_title : styles$d.without_title} ${value.length > 0 || defaultValue.length > 0 ? styles$d.valid : styles$d.not_valid} ${available ? styles$d.available : styles$d.not_available}`, name: name, id: id, type: type, placeholder: placeholder, autoComplete: autoComplete, ref: inputElement, defaultValue: defaultValue, onInput: (event) => {
|
413
413
|
setValue(event.target.value);
|
414
414
|
if (onInput)
|
415
415
|
onInput(event);
|
package/dist/index.esm.js
CHANGED
@@ -301,7 +301,7 @@ function InputPassword({ id, placeholder = "", title = "Passwort", name, isVisib
|
|
301
301
|
return (React.createElement(React.Fragment, null,
|
302
302
|
React.createElement("div", { className: `${styles$f.container} ${isVisible ? styles$f.visible : styles$f.hidden}`, style: { width: width } },
|
303
303
|
React.createElement("div", { className: styles$f.form },
|
304
|
-
React.createElement("input", { className: `${styles$f.input} ${title != undefined ? styles$f.with_title : styles$f.without_title} ${value.length > 0 ? styles$f.valid : styles$f.not_valid}`, name: name, minLength: minLength, autoComplete: autoComplete, placeholder: placeholder, type: hidePassword ? "password" : "text", onInput: (event) => setValue(event.target.value) }),
|
304
|
+
React.createElement("input", { className: `${styles$f.input} ${title != undefined ? styles$f.with_title : styles$f.without_title} ${value.length > 0 ? styles$f.valid : styles$f.not_valid}`, name: name, id: id, minLength: minLength, autoComplete: autoComplete, placeholder: placeholder, type: hidePassword ? "password" : "text", onInput: (event) => setValue(event.target.value) }),
|
305
305
|
React.createElement("label", { htmlFor: "text", className: styles$f.label },
|
306
306
|
React.createElement("span", { className: styles$f.label_text }, title)),
|
307
307
|
React.createElement("button", { title: hidePassword ? "Passwort anzeigen" : "Passwort verstecken", className: styles$f.hideButton, onClick: () => setHidePassword(!hidePassword), type: "button" },
|
@@ -393,7 +393,7 @@ var css_248z$d = ".styles-module_container__zcXGF {\n display: flex;\n width:
|
|
393
393
|
var styles$d = {"container":"styles-module_container__zcXGF","input":"styles-module_input__Tpth8","not_available":"styles-module_not_available__CRXjB","label":"styles-module_label__appHO","label_text":"styles-module_label_text__-sKjY","with_title":"styles-module_with_title__L3eGj","valid":"styles-module_valid__zWcOz"};
|
394
394
|
styleInject(css_248z$d);
|
395
395
|
|
396
|
-
function InputText({ id, title, name, placeholder = "", defaultValue = "", autoFocus = false, type = "text", width = "100%", marginBottom, available = true, onInput = (event) => { } }) {
|
396
|
+
function InputText({ id, title, name, placeholder = "", defaultValue = "", autoFocus = false, type = "text", width = "100%", marginBottom, autoComplete = "off", available = true, onInput = (event) => { } }) {
|
397
397
|
const [value, setValue] = useState(defaultValue);
|
398
398
|
const inputElement = useCallback((element) => {
|
399
399
|
if (element && autoFocus)
|
@@ -401,7 +401,7 @@ function InputText({ id, title, name, placeholder = "", defaultValue = "", autoF
|
|
401
401
|
}, [autoFocus]);
|
402
402
|
return (React.createElement(React.Fragment, null,
|
403
403
|
React.createElement("div", { className: styles$d.container, style: { width, marginBottom } },
|
404
|
-
React.createElement("input", { className: `${styles$d.input} ${title != undefined ? styles$d.with_title : styles$d.without_title} ${value.length > 0 || defaultValue.length > 0 ? styles$d.valid : styles$d.not_valid} ${available ? styles$d.available : styles$d.not_available}`, name: name, id: id, type: type, placeholder: placeholder, ref: inputElement, defaultValue: defaultValue, onInput: (event) => {
|
404
|
+
React.createElement("input", { className: `${styles$d.input} ${title != undefined ? styles$d.with_title : styles$d.without_title} ${value.length > 0 || defaultValue.length > 0 ? styles$d.valid : styles$d.not_valid} ${available ? styles$d.available : styles$d.not_available}`, name: name, id: id, type: type, placeholder: placeholder, autoComplete: autoComplete, ref: inputElement, defaultValue: defaultValue, onInput: (event) => {
|
405
405
|
setValue(event.target.value);
|
406
406
|
if (onInput)
|
407
407
|
onInput(event);
|