math-main-components 0.0.31 → 0.0.33
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,8 +1,9 @@
|
|
1
1
|
import React, { CSSProperties, MouseEvent } from 'react';
|
2
|
-
export declare function FormButton({ text, style, iconName, type, onClick }: {
|
2
|
+
export declare function FormButton({ text, style, iconName, type, background, onClick }: {
|
3
3
|
text: string;
|
4
4
|
style?: CSSProperties;
|
5
5
|
iconName?: string;
|
6
6
|
type?: "submit" | "button" | "reset";
|
7
|
+
background?: string;
|
7
8
|
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
8
9
|
}): React.JSX.Element;
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
export declare function InputPassword({ placeholder, title, name, isVisible, width, autoComplete, forgotLink }: {
|
2
|
+
export declare function InputPassword({ placeholder, title, name, isVisible, width, minLength, autoComplete, forgotLink }: {
|
3
3
|
placeholder?: string;
|
4
4
|
autoComplete?: string;
|
5
5
|
title?: string;
|
6
6
|
name: string;
|
7
|
+
minLength?: number;
|
7
8
|
isVisible?: boolean;
|
8
9
|
width?: string;
|
9
10
|
forgotLink?: any;
|
package/dist/index.cjs.js
CHANGED
@@ -145,7 +145,7 @@ function Dialog({ data, text, onClose = (event, data) => { }, onSubmit = (event,
|
|
145
145
|
return (React__default["default"].createElement("div", { id: "dialog-backdrop", className: `${styles$m.container} ${data?.isActive ? styles$m.active : styles$m.disabled}`, onClick: onClick },
|
146
146
|
React__default["default"].createElement("div", { className: styles$m.dialog_window },
|
147
147
|
children,
|
148
|
-
React__default["default"].createElement("h1", null, text),
|
148
|
+
text && React__default["default"].createElement("h1", null, text),
|
149
149
|
React__default["default"].createElement("button", { className: styles$m.cancel_button, id: "cancel-button", onClick: onClick }, "Abbrechen"),
|
150
150
|
React__default["default"].createElement("button", { className: styles$m.submit_button, id: "submit-button", onClick: (event) => onSubmit(event, data?.data) }, "Best\u00E4tigen"))));
|
151
151
|
}
|
@@ -154,9 +154,9 @@ var css_248z$l = ".styles-module_container__HOoBj {\n margin-bottom: 30px;\n}\n
|
|
154
154
|
var styles$l = {"container":"styles-module_container__HOoBj"};
|
155
155
|
styleInject(css_248z$l);
|
156
156
|
|
157
|
-
function FormButton({ text, style = {}, iconName = "", type = "submit", onClick = (
|
157
|
+
function FormButton({ text, style = {}, iconName = "", type = "submit", background = "#0075FF", onClick = () => { } }) {
|
158
158
|
return (React__default["default"].createElement("div", { className: styles$l.container, style: style },
|
159
|
-
React__default["default"].createElement("button", { type: type, onClick: onClick },
|
159
|
+
React__default["default"].createElement("button", { type: type, onClick: onClick, style: { background: background } },
|
160
160
|
text,
|
161
161
|
iconName && React__default["default"].createElement(SvgIcon, { iconName: iconName, fill: "white" }))));
|
162
162
|
}
|
@@ -255,13 +255,13 @@ var css_248z$f = "@keyframes styles-module_show__OLTZH {\n from {\n max-heig
|
|
255
255
|
var styles$f = {"container":"styles-module_container__UdmOO","forgot_label":"styles-module_forgot_label__EeN6a","visible":"styles-module_visible__QROqh","hidden":"styles-module_hidden__hDKDO","input":"styles-module_input__sC2fP","hideButton":"styles-module_hideButton__83mRI","form":"styles-module_form__m866x","label":"styles-module_label__8PuaL","label_text":"styles-module_label_text__FwJ1F","with_title":"styles-module_with_title__dftgq","valid":"styles-module_valid__SM7w5","show":"styles-module_show__OLTZH","hide":"styles-module_hide__LAgaY"};
|
256
256
|
styleInject(css_248z$f);
|
257
257
|
|
258
|
-
function InputPassword({ placeholder = "", title = "Passwort", name, isVisible = true, width = "100%", autoComplete, forgotLink = false }) {
|
258
|
+
function InputPassword({ placeholder = "", title = "Passwort", name, isVisible = true, width = "100%", minLength = 8, autoComplete, forgotLink = false }) {
|
259
259
|
const [value, setValue] = React.useState("");
|
260
260
|
const [hidePassword, setHidePassword] = React.useState(true);
|
261
261
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
262
262
|
React__default["default"].createElement("div", { className: `${styles$f.container} ${isVisible ? styles$f.visible : styles$f.hidden}`, style: { width: width } },
|
263
263
|
React__default["default"].createElement("div", { className: styles$f.form },
|
264
|
-
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:
|
264
|
+
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) }),
|
265
265
|
React__default["default"].createElement("label", { htmlFor: "text", className: styles$f.label },
|
266
266
|
React__default["default"].createElement("span", { className: styles$f.label_text }, title)),
|
267
267
|
React__default["default"].createElement("button", { title: hidePassword ? "Passwort anzeigen" : "Passwort verstecken", className: styles$f.hideButton, onClick: () => setHidePassword(!hidePassword), type: "button" },
|
package/dist/index.esm.js
CHANGED
@@ -137,7 +137,7 @@ function Dialog({ data, text, onClose = (event, data) => { }, onSubmit = (event,
|
|
137
137
|
return (React.createElement("div", { id: "dialog-backdrop", className: `${styles$m.container} ${data?.isActive ? styles$m.active : styles$m.disabled}`, onClick: onClick },
|
138
138
|
React.createElement("div", { className: styles$m.dialog_window },
|
139
139
|
children,
|
140
|
-
React.createElement("h1", null, text),
|
140
|
+
text && React.createElement("h1", null, text),
|
141
141
|
React.createElement("button", { className: styles$m.cancel_button, id: "cancel-button", onClick: onClick }, "Abbrechen"),
|
142
142
|
React.createElement("button", { className: styles$m.submit_button, id: "submit-button", onClick: (event) => onSubmit(event, data?.data) }, "Best\u00E4tigen"))));
|
143
143
|
}
|
@@ -146,9 +146,9 @@ var css_248z$l = ".styles-module_container__HOoBj {\n margin-bottom: 30px;\n}\n
|
|
146
146
|
var styles$l = {"container":"styles-module_container__HOoBj"};
|
147
147
|
styleInject(css_248z$l);
|
148
148
|
|
149
|
-
function FormButton({ text, style = {}, iconName = "", type = "submit", onClick = (
|
149
|
+
function FormButton({ text, style = {}, iconName = "", type = "submit", background = "#0075FF", onClick = () => { } }) {
|
150
150
|
return (React.createElement("div", { className: styles$l.container, style: style },
|
151
|
-
React.createElement("button", { type: type, onClick: onClick },
|
151
|
+
React.createElement("button", { type: type, onClick: onClick, style: { background: background } },
|
152
152
|
text,
|
153
153
|
iconName && React.createElement(SvgIcon, { iconName: iconName, fill: "white" }))));
|
154
154
|
}
|
@@ -247,13 +247,13 @@ var css_248z$f = "@keyframes styles-module_show__OLTZH {\n from {\n max-heig
|
|
247
247
|
var styles$f = {"container":"styles-module_container__UdmOO","forgot_label":"styles-module_forgot_label__EeN6a","visible":"styles-module_visible__QROqh","hidden":"styles-module_hidden__hDKDO","input":"styles-module_input__sC2fP","hideButton":"styles-module_hideButton__83mRI","form":"styles-module_form__m866x","label":"styles-module_label__8PuaL","label_text":"styles-module_label_text__FwJ1F","with_title":"styles-module_with_title__dftgq","valid":"styles-module_valid__SM7w5","show":"styles-module_show__OLTZH","hide":"styles-module_hide__LAgaY"};
|
248
248
|
styleInject(css_248z$f);
|
249
249
|
|
250
|
-
function InputPassword({ placeholder = "", title = "Passwort", name, isVisible = true, width = "100%", autoComplete, forgotLink = false }) {
|
250
|
+
function InputPassword({ placeholder = "", title = "Passwort", name, isVisible = true, width = "100%", minLength = 8, autoComplete, forgotLink = false }) {
|
251
251
|
const [value, setValue] = useState("");
|
252
252
|
const [hidePassword, setHidePassword] = useState(true);
|
253
253
|
return (React.createElement(React.Fragment, null,
|
254
254
|
React.createElement("div", { className: `${styles$f.container} ${isVisible ? styles$f.visible : styles$f.hidden}`, style: { width: width } },
|
255
255
|
React.createElement("div", { className: styles$f.form },
|
256
|
-
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:
|
256
|
+
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) }),
|
257
257
|
React.createElement("label", { htmlFor: "text", className: styles$f.label },
|
258
258
|
React.createElement("span", { className: styles$f.label_text }, title)),
|
259
259
|
React.createElement("button", { title: hidePassword ? "Passwort anzeigen" : "Passwort verstecken", className: styles$f.hideButton, onClick: () => setHidePassword(!hidePassword), type: "button" },
|