math-main-components 0.0.13 → 0.0.15
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.
- package/README.md +9 -2
- package/dist/components/InputPassword/InputPassword.d.ts +2 -2
- package/dist/components/OptionField/OptionField.d.ts +1 -2
- package/dist/components/OptionFieldHorizontal/OptionFieldHorizontal.d.ts +1 -2
- package/dist/components/StepBack/StepBack.d.ts +3 -2
- package/dist/components/TextWithIcon/TextWithIcon.d.ts +1 -2
- package/dist/index.cjs.js +26 -37
- package/dist/index.esm.js +26 -37
- package/package.json +1 -1
package/README.md
CHANGED
@@ -2,6 +2,13 @@
|
|
2
2
|
|
3
3
|
Component Library for math-main-app
|
4
4
|
|
5
|
-
Includes
|
6
5
|
- reusable ui components
|
7
|
-
- math components
|
6
|
+
- math components
|
7
|
+
|
8
|
+
## Notes
|
9
|
+
- Do not use any of next.js features like next/link
|
10
|
+
|
11
|
+
## Publishing
|
12
|
+
1. increment version in `package.json`
|
13
|
+
2. run `npm publish --access public`
|
14
|
+
3. run `yarn add math-main-components@0.0.1` in project
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
export declare function InputPassword({ placeholder, title, name, isVisible, width, autoComplete,
|
2
|
+
export declare function InputPassword({ placeholder, title, name, isVisible, width, autoComplete, forgotLink }: {
|
3
3
|
placeholder?: string;
|
4
4
|
autoComplete?: string;
|
5
5
|
title?: string;
|
6
6
|
name: string;
|
7
7
|
isVisible?: boolean;
|
8
8
|
width?: string;
|
9
|
-
|
9
|
+
forgotLink?: any;
|
10
10
|
}): React.JSX.Element;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
export declare function OptionField({ headline, description,
|
2
|
+
export declare function OptionField({ headline, description, iconName }: {
|
3
3
|
headline: string;
|
4
4
|
description: string;
|
5
5
|
iconName?: string;
|
6
|
-
link: string;
|
7
6
|
}): React.JSX.Element;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
export declare function OptionFieldHorizontal({ title,
|
2
|
+
export declare function OptionFieldHorizontal({ title, iconName, preselected }: {
|
3
3
|
title: string;
|
4
|
-
href: string;
|
5
4
|
iconName: string;
|
6
5
|
preselected?: boolean;
|
7
6
|
}): React.JSX.Element;
|
package/dist/index.cjs.js
CHANGED
@@ -250,7 +250,7 @@ var css_248z$f = "@keyframes styles-module_show__OLTZH {\n from {\n max-heig
|
|
250
250
|
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"};
|
251
251
|
styleInject(css_248z$f);
|
252
252
|
|
253
|
-
function InputPassword({ placeholder = "", title = "Passwort", name, isVisible = true, width = "100%", autoComplete,
|
253
|
+
function InputPassword({ placeholder = "", title = "Passwort", name, isVisible = true, width = "100%", autoComplete, forgotLink = false }) {
|
254
254
|
const [value, setValue] = React.useState("");
|
255
255
|
const [hidePassword, setHidePassword] = React.useState(true);
|
256
256
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
@@ -261,12 +261,11 @@ function InputPassword({ placeholder = "", title = "Passwort", name, isVisible =
|
|
261
261
|
React__default["default"].createElement("span", { className: styles$f.label_text }, title)),
|
262
262
|
React__default["default"].createElement("button", { title: hidePassword ? "Passwort anzeigen" : "Passwort verstecken", className: styles$f.hideButton, onClick: () => setHidePassword(!hidePassword), type: "button" },
|
263
263
|
React__default["default"].createElement(SvgIcon, { iconName: hidePassword ? "visibility" : "visibility_off" }))),
|
264
|
-
|
265
|
-
React__default["default"].createElement("
|
266
|
-
React__default["default"].createElement("span", { className: styles$f.forgot_label }, "Passwort vergessen?")))));
|
264
|
+
forgotLink &&
|
265
|
+
React__default["default"].createElement("div", { className: styles$f.forgot_container }, forgotLink))));
|
267
266
|
}
|
268
267
|
|
269
|
-
var css_248z$e = ".styles-module_container__--NO0 {\n display: flex;\n flex-direction: column;\n gap: 10px;\n justify-content: center;\n align-items: center;\n user-select: none;\n margin-bottom: 20px;\n}\n.styles-module_container__--NO0
|
268
|
+
var css_248z$e = ".styles-module_container__--NO0 {\n display: flex;\n flex-direction: column;\n gap: 10px;\n justify-content: center;\n align-items: center;\n user-select: none;\n margin-bottom: 20px;\n}\n.styles-module_container__--NO0 button {\n background: transparent;\n color: #0075FF;\n border: none;\n font-size: 14px;\n cursor: pointer;\n}\n\n.styles-module_input_wrapper__LPIk1 {\n display: flex;\n flex-direction: row;\n justify-content: center;\n gap: 10px;\n}\n\n.styles-module_input__84v36 {\n padding: 14px 10px;\n width: 30px;\n border-radius: 12px;\n border: 1.5px solid #a8a8a8;\n outline: none;\n transition: 0.2s ease;\n text-align: center;\n font-size: 18px;\n}\n.styles-module_input__84v36:focus, .styles-module_input__84v36:active {\n border-color: #0075FF;\n box-shadow: 0px 0px 3px 3px rgba(0, 87, 255, 0.2509803922);\n}\n\n.styles-module_input__84v36:nth-child(3) {\n margin-right: 25px;\n}\n\n.styles-module_input__84v36::placeholder,\n.styles-module_input__84v36:-ms-input-placeholder,\n.styles-module_input__84v36::-ms-input-placeholder {\n letter-spacing: 0px !important;\n}";
|
270
269
|
var styles$e = {"container":"styles-module_container__--NO0","input_wrapper":"styles-module_input_wrapper__LPIk1","input":"styles-module_input__84v36"};
|
271
270
|
styleInject(css_248z$e);
|
272
271
|
|
@@ -277,6 +276,7 @@ function InputPin({ name, length, onFinished = () => { } }) {
|
|
277
276
|
function onChange(event, position) {
|
278
277
|
const regex = /^[0-9\b]+$/;
|
279
278
|
const value = event.target.value ? event.target.value : "";
|
279
|
+
console.log("current state", state);
|
280
280
|
if (value != '' && regex.test(value)) {
|
281
281
|
const digitCountBefore = state[position] == undefined ? 0 : String(state[position]).length;
|
282
282
|
const addedDigitsCount = value.length - digitCountBefore;
|
@@ -296,6 +296,7 @@ function InputPin({ name, length, onFinished = () => { } }) {
|
|
296
296
|
if (digits.length >= 6) {
|
297
297
|
fieldRefs.current[length - 1].current.focus();
|
298
298
|
}
|
299
|
+
console.log("new state", state);
|
299
300
|
setState(newState);
|
300
301
|
}
|
301
302
|
}
|
@@ -321,20 +322,16 @@ function InputPin({ name, length, onFinished = () => { } }) {
|
|
321
322
|
ref.current.value = "";
|
322
323
|
});
|
323
324
|
}
|
324
|
-
React.useCallback((element) => {
|
325
|
-
if (element)
|
326
|
-
element.focus();
|
327
|
-
}, []);
|
328
325
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
329
326
|
React__default["default"].createElement("div", { className: styles$e.container },
|
330
327
|
React__default["default"].createElement("input", { name: name, type: "hidden", defaultValue: Object.values(state).join("") }),
|
331
|
-
React__default["default"].createElement("div", { className: styles$e.input_wrapper }, [...Array(length)].map((
|
328
|
+
React__default["default"].createElement("div", { className: styles$e.input_wrapper }, [...Array(length)].map((event, i) => {
|
332
329
|
if (i == 0) {
|
333
330
|
return React__default["default"].createElement("input", { key: i, pattern: "[0-9]", value: state[i] ? state[i] : "", ref: fieldRefs.current[i], className: styles$e.input, type: "text", onKeyUp: (event) => onKeyUp(event, i), onInput: (event) => onChange(event, i) });
|
334
331
|
}
|
335
332
|
return React__default["default"].createElement("input", { key: i, pattern: "[0-9]", value: state[i] ? state[i] : "", ref: fieldRefs.current[i], className: styles$e.input, type: "text", onKeyUp: (event) => onKeyUp(event, i), onInput: (event) => onChange(event, i) });
|
336
333
|
})),
|
337
|
-
React__default["default"].createElement("
|
334
|
+
React__default["default"].createElement("button", { onClick: resetValues }, "Zur\u00FCcksetzen"))));
|
338
335
|
}
|
339
336
|
|
340
337
|
var css_248z$d = ".styles-module_container__zcXGF {\n display: flex;\n width: 100%;\n margin-bottom: 20px;\n}\n\n.styles-module_input__Tpth8 {\n padding: 14px 20px;\n font-size: 16px;\n border-radius: 12px;\n border: 1.5px solid #a8a8a8;\n outline: none;\n transition: 0.2s ease;\n flex: 1;\n}\n.styles-module_input__Tpth8:focus, .styles-module_input__Tpth8:active {\n border-color: #0075FF;\n box-shadow: 0px 0px 3px 3px rgba(0, 87, 255, 0.2509803922);\n}\n.styles-module_input__Tpth8.styles-module_not_available__CRXjB, .styles-module_input__Tpth8:invalid {\n border-color: #e50000;\n box-shadow: 0px 0px 3px 3px rgba(255, 0, 0, 0.2509803922);\n}\n\n/* animated title */\n.styles-module_container__zcXGF {\n position: relative;\n}\n\n.styles-module_label__appHO {\n position: absolute;\n bottom: 0px;\n left: 0px;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n\n.styles-module_label_text__-sKjY {\n position: absolute;\n bottom: 16px;\n left: 12px;\n transition: 0.3s ease;\n font-size: 16px;\n border-top-left-radius: 5px;\n border-top-right-radius: 5px;\n opacity: initial;\n background: white;\n color: grey;\n padding-right: 8px;\n padding-left: 8px;\n}\n\n.styles-module_input__Tpth8.styles-module_with_title__L3eGj::placeholder {\n opacity: 0;\n transition: opacity 0.3s ease;\n color: grey;\n}\n\n.styles-module_input__Tpth8.styles-module_with_title__L3eGj:focus::placeholder {\n opacity: 1;\n}\n\n.styles-module_input__Tpth8:focus + .styles-module_label__appHO .styles-module_label_text__-sKjY,\n.styles-module_input__Tpth8.styles-module_valid__zWcOz + .styles-module_label__appHO .styles-module_label_text__-sKjY {\n transform: translateY(-150%);\n left: 15px;\n font-size: 14px;\n background: linear-gradient(to bottom, rgba(250, 250, 250, 0.9411764706), hsla(0, 0%, 100%, 0.951));\n color: #0063d4;\n}\n\n.styles-module_input__Tpth8.styles-module_valid__zWcOz + .styles-module_label__appHO .styles-module_label_text__-sKjY {\n color: #a8a8a8;\n}";
|
@@ -361,25 +358,23 @@ var css_248z$c = ".styles-module_box__Z0iod {\n background: #F4F4F4;\n width:
|
|
361
358
|
var styles$c = {"box":"styles-module_box__Z0iod","left_side":"styles-module_left_side__8ObGs","right_side":"styles-module_right_side__Ypp0D"};
|
362
359
|
styleInject(css_248z$c);
|
363
360
|
|
364
|
-
function OptionField({ headline, description,
|
361
|
+
function OptionField({ headline, description, iconName }) {
|
365
362
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
366
|
-
React__default["default"].createElement("
|
367
|
-
React__default["default"].createElement("div", { className: styles$c.
|
368
|
-
|
369
|
-
React__default["default"].createElement("
|
370
|
-
|
371
|
-
React__default["default"].createElement("p", null, description))))));
|
363
|
+
React__default["default"].createElement("div", { className: styles$c.box },
|
364
|
+
React__default["default"].createElement("div", { className: styles$c.left_side }, iconName && React__default["default"].createElement(SvgIcon, { iconName: iconName })),
|
365
|
+
React__default["default"].createElement("div", { className: styles$c.right_side },
|
366
|
+
React__default["default"].createElement("h4", null, headline),
|
367
|
+
React__default["default"].createElement("p", null, description)))));
|
372
368
|
}
|
373
369
|
|
374
370
|
var css_248z$b = ".styles-module_container__XCtqW {\n background: white;\n border-radius: 12px;\n padding: 30px;\n margin-bottom: 30px;\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 18px;\n color: black;\n border: 1px solid #B1B1B1;\n transition: 0.2s ease-in-out;\n box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);\n}\n.styles-module_container__XCtqW:hover {\n background: #f0f0f0;\n border-color: #888888;\n}\n.styles-module_container__XCtqW h3 {\n font-weight: 500;\n margin: 0;\n}\n\n.styles-module_container__XCtqW.styles-module_preselected__WoSbB {\n border: 1px solid black;\n}";
|
375
371
|
var styles$b = {"container":"styles-module_container__XCtqW","preselected":"styles-module_preselected__WoSbB"};
|
376
372
|
styleInject(css_248z$b);
|
377
373
|
|
378
|
-
function OptionFieldHorizontal({ title,
|
379
|
-
return (React__default["default"].createElement("
|
380
|
-
React__default["default"].createElement(
|
381
|
-
|
382
|
-
React__default["default"].createElement("h3", null, title))));
|
374
|
+
function OptionFieldHorizontal({ title, iconName, preselected = false }) {
|
375
|
+
return (React__default["default"].createElement("div", { className: [styles$b.container, preselected ? styles$b.preselected : styles$b.not_preselected].join(" ") },
|
376
|
+
React__default["default"].createElement(SvgIcon, { iconName: iconName, size: "32px" }),
|
377
|
+
React__default["default"].createElement("h3", null, title)));
|
383
378
|
}
|
384
379
|
|
385
380
|
var css_248z$a = ".styles-module_container__oNbrP {\n padding-top: 10px;\n}\n.styles-module_container__oNbrP .styles-module_button__UBk65 {\n padding: 10px 18px;\n background: #0075FF;\n border-radius: 40px;\n cursor: pointer;\n display: flex;\n flex-direction: row;\n gap: 10px;\n font-size: 15px;\n color: white;\n align-items: center;\n border: none;\n}\n.styles-module_container__oNbrP .styles-module_button__UBk65.styles-module_red__CHF3e {\n background: #e40000;\n}";
|
@@ -561,12 +556,11 @@ var css_248z$3 = ".styles-module_container__xRQNT {\n display: flex;\n flex-di
|
|
561
556
|
var styles$3 = {"container":"styles-module_container__xRQNT"};
|
562
557
|
styleInject(css_248z$3);
|
563
558
|
|
564
|
-
function StepBack({
|
559
|
+
function StepBack({ iconName = "arrow_back", text = "Weitere Möglichkeiten" }) {
|
565
560
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
566
|
-
React__default["default"].createElement("
|
567
|
-
React__default["default"].createElement(
|
568
|
-
|
569
|
-
"Weitere M\u00F6glichkeiten"))));
|
561
|
+
React__default["default"].createElement("div", { className: styles$3.container },
|
562
|
+
React__default["default"].createElement(SvgIcon, { iconName: iconName }),
|
563
|
+
text)));
|
570
564
|
}
|
571
565
|
|
572
566
|
var css_248z$2 = ".styles-module_container__jNs7m {\n margin-top: 30px;\n}\n.styles-module_container__jNs7m h3 {\n font-weight: 500;\n font-size: 16px;\n}\n\n.styles-module_item_list__FxHkg.styles-module_has_children__Uu-8D {\n border-top: 1px solid #D0D0D0;\n border-bottom: 1px solid #D0D0D0;\n}\n\n.styles-module_item_list__FxHkg {\n list-style: none;\n padding: 0;\n margin: 0;\n}\n.styles-module_item_list__FxHkg .styles-module_action__YYTok {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 6px;\n cursor: pointer;\n padding: 8px 14px;\n border-radius: 25px;\n transition: 0.2s ease-in-out;\n}\n.styles-module_item_list__FxHkg .styles-module_action__YYTok.styles-module_default__SexGH:hover {\n background: rgb(223, 223, 223);\n}\n.styles-module_item_list__FxHkg .styles-module_action__YYTok.styles-module_red__KD3qJ:hover {\n background: rgb(255, 199, 199);\n}\n.styles-module_item_list__FxHkg li.styles-module_item__sgyiV {\n padding: 10px 20px;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n gap: 10px;\n}\n.styles-module_item_list__FxHkg li.styles-module_item__sgyiV .styles-module_moreText__-blXb {\n flex: 1;\n margin-bottom: 4px;\n color: #0075FF;\n}\n.styles-module_item_list__FxHkg li.styles-module_item__sgyiV .styles-module_subtitle__DT5OF {\n color: rgb(162, 162, 162);\n}\n.styles-module_item_list__FxHkg li.styles-module_item__sgyiV:nth-child(even) {\n background: #F3F3F3;\n}\n.styles-module_item_list__FxHkg li.styles-module_item__sgyiV:not(:last-child) {\n border-bottom: 1px solid #D0D0D0;\n}";
|
@@ -627,15 +621,10 @@ var css_248z$1 = ".styles-module_container__ItBx0 {\n display: flex;\n flex-di
|
|
627
621
|
var styles$1 = {"container":"styles-module_container__ItBx0"};
|
628
622
|
styleInject(css_248z$1);
|
629
623
|
|
630
|
-
function TextWithIcon({ iconName, label,
|
631
|
-
return (React__default["default"].createElement("div", { className: styles$1.container },
|
632
|
-
React__default["default"].createElement(
|
633
|
-
|
634
|
-
React__default["default"].createElement("span", null, label))
|
635
|
-
:
|
636
|
-
React__default["default"].createElement(React__default["default"].Fragment, null,
|
637
|
-
React__default["default"].createElement(SvgIcon, { iconName: iconName }),
|
638
|
-
React__default["default"].createElement("span", null, label))));
|
624
|
+
function TextWithIcon({ iconName, label, }) {
|
625
|
+
return (React__default["default"].createElement("div", { className: styles$1.container },
|
626
|
+
React__default["default"].createElement(SvgIcon, { iconName: iconName }),
|
627
|
+
React__default["default"].createElement("span", null, label)));
|
639
628
|
}
|
640
629
|
|
641
630
|
function degreesToRadians(degrees) {
|
package/dist/index.esm.js
CHANGED
@@ -242,7 +242,7 @@ var css_248z$f = "@keyframes styles-module_show__OLTZH {\n from {\n max-heig
|
|
242
242
|
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"};
|
243
243
|
styleInject(css_248z$f);
|
244
244
|
|
245
|
-
function InputPassword({ placeholder = "", title = "Passwort", name, isVisible = true, width = "100%", autoComplete,
|
245
|
+
function InputPassword({ placeholder = "", title = "Passwort", name, isVisible = true, width = "100%", autoComplete, forgotLink = false }) {
|
246
246
|
const [value, setValue] = useState("");
|
247
247
|
const [hidePassword, setHidePassword] = useState(true);
|
248
248
|
return (React.createElement(React.Fragment, null,
|
@@ -253,12 +253,11 @@ function InputPassword({ placeholder = "", title = "Passwort", name, isVisible =
|
|
253
253
|
React.createElement("span", { className: styles$f.label_text }, title)),
|
254
254
|
React.createElement("button", { title: hidePassword ? "Passwort anzeigen" : "Passwort verstecken", className: styles$f.hideButton, onClick: () => setHidePassword(!hidePassword), type: "button" },
|
255
255
|
React.createElement(SvgIcon, { iconName: hidePassword ? "visibility" : "visibility_off" }))),
|
256
|
-
|
257
|
-
React.createElement("
|
258
|
-
React.createElement("span", { className: styles$f.forgot_label }, "Passwort vergessen?")))));
|
256
|
+
forgotLink &&
|
257
|
+
React.createElement("div", { className: styles$f.forgot_container }, forgotLink))));
|
259
258
|
}
|
260
259
|
|
261
|
-
var css_248z$e = ".styles-module_container__--NO0 {\n display: flex;\n flex-direction: column;\n gap: 10px;\n justify-content: center;\n align-items: center;\n user-select: none;\n margin-bottom: 20px;\n}\n.styles-module_container__--NO0
|
260
|
+
var css_248z$e = ".styles-module_container__--NO0 {\n display: flex;\n flex-direction: column;\n gap: 10px;\n justify-content: center;\n align-items: center;\n user-select: none;\n margin-bottom: 20px;\n}\n.styles-module_container__--NO0 button {\n background: transparent;\n color: #0075FF;\n border: none;\n font-size: 14px;\n cursor: pointer;\n}\n\n.styles-module_input_wrapper__LPIk1 {\n display: flex;\n flex-direction: row;\n justify-content: center;\n gap: 10px;\n}\n\n.styles-module_input__84v36 {\n padding: 14px 10px;\n width: 30px;\n border-radius: 12px;\n border: 1.5px solid #a8a8a8;\n outline: none;\n transition: 0.2s ease;\n text-align: center;\n font-size: 18px;\n}\n.styles-module_input__84v36:focus, .styles-module_input__84v36:active {\n border-color: #0075FF;\n box-shadow: 0px 0px 3px 3px rgba(0, 87, 255, 0.2509803922);\n}\n\n.styles-module_input__84v36:nth-child(3) {\n margin-right: 25px;\n}\n\n.styles-module_input__84v36::placeholder,\n.styles-module_input__84v36:-ms-input-placeholder,\n.styles-module_input__84v36::-ms-input-placeholder {\n letter-spacing: 0px !important;\n}";
|
262
261
|
var styles$e = {"container":"styles-module_container__--NO0","input_wrapper":"styles-module_input_wrapper__LPIk1","input":"styles-module_input__84v36"};
|
263
262
|
styleInject(css_248z$e);
|
264
263
|
|
@@ -269,6 +268,7 @@ function InputPin({ name, length, onFinished = () => { } }) {
|
|
269
268
|
function onChange(event, position) {
|
270
269
|
const regex = /^[0-9\b]+$/;
|
271
270
|
const value = event.target.value ? event.target.value : "";
|
271
|
+
console.log("current state", state);
|
272
272
|
if (value != '' && regex.test(value)) {
|
273
273
|
const digitCountBefore = state[position] == undefined ? 0 : String(state[position]).length;
|
274
274
|
const addedDigitsCount = value.length - digitCountBefore;
|
@@ -288,6 +288,7 @@ function InputPin({ name, length, onFinished = () => { } }) {
|
|
288
288
|
if (digits.length >= 6) {
|
289
289
|
fieldRefs.current[length - 1].current.focus();
|
290
290
|
}
|
291
|
+
console.log("new state", state);
|
291
292
|
setState(newState);
|
292
293
|
}
|
293
294
|
}
|
@@ -313,20 +314,16 @@ function InputPin({ name, length, onFinished = () => { } }) {
|
|
313
314
|
ref.current.value = "";
|
314
315
|
});
|
315
316
|
}
|
316
|
-
useCallback((element) => {
|
317
|
-
if (element)
|
318
|
-
element.focus();
|
319
|
-
}, []);
|
320
317
|
return (React.createElement(React.Fragment, null,
|
321
318
|
React.createElement("div", { className: styles$e.container },
|
322
319
|
React.createElement("input", { name: name, type: "hidden", defaultValue: Object.values(state).join("") }),
|
323
|
-
React.createElement("div", { className: styles$e.input_wrapper }, [...Array(length)].map((
|
320
|
+
React.createElement("div", { className: styles$e.input_wrapper }, [...Array(length)].map((event, i) => {
|
324
321
|
if (i == 0) {
|
325
322
|
return React.createElement("input", { key: i, pattern: "[0-9]", value: state[i] ? state[i] : "", ref: fieldRefs.current[i], className: styles$e.input, type: "text", onKeyUp: (event) => onKeyUp(event, i), onInput: (event) => onChange(event, i) });
|
326
323
|
}
|
327
324
|
return React.createElement("input", { key: i, pattern: "[0-9]", value: state[i] ? state[i] : "", ref: fieldRefs.current[i], className: styles$e.input, type: "text", onKeyUp: (event) => onKeyUp(event, i), onInput: (event) => onChange(event, i) });
|
328
325
|
})),
|
329
|
-
React.createElement("
|
326
|
+
React.createElement("button", { onClick: resetValues }, "Zur\u00FCcksetzen"))));
|
330
327
|
}
|
331
328
|
|
332
329
|
var css_248z$d = ".styles-module_container__zcXGF {\n display: flex;\n width: 100%;\n margin-bottom: 20px;\n}\n\n.styles-module_input__Tpth8 {\n padding: 14px 20px;\n font-size: 16px;\n border-radius: 12px;\n border: 1.5px solid #a8a8a8;\n outline: none;\n transition: 0.2s ease;\n flex: 1;\n}\n.styles-module_input__Tpth8:focus, .styles-module_input__Tpth8:active {\n border-color: #0075FF;\n box-shadow: 0px 0px 3px 3px rgba(0, 87, 255, 0.2509803922);\n}\n.styles-module_input__Tpth8.styles-module_not_available__CRXjB, .styles-module_input__Tpth8:invalid {\n border-color: #e50000;\n box-shadow: 0px 0px 3px 3px rgba(255, 0, 0, 0.2509803922);\n}\n\n/* animated title */\n.styles-module_container__zcXGF {\n position: relative;\n}\n\n.styles-module_label__appHO {\n position: absolute;\n bottom: 0px;\n left: 0px;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n\n.styles-module_label_text__-sKjY {\n position: absolute;\n bottom: 16px;\n left: 12px;\n transition: 0.3s ease;\n font-size: 16px;\n border-top-left-radius: 5px;\n border-top-right-radius: 5px;\n opacity: initial;\n background: white;\n color: grey;\n padding-right: 8px;\n padding-left: 8px;\n}\n\n.styles-module_input__Tpth8.styles-module_with_title__L3eGj::placeholder {\n opacity: 0;\n transition: opacity 0.3s ease;\n color: grey;\n}\n\n.styles-module_input__Tpth8.styles-module_with_title__L3eGj:focus::placeholder {\n opacity: 1;\n}\n\n.styles-module_input__Tpth8:focus + .styles-module_label__appHO .styles-module_label_text__-sKjY,\n.styles-module_input__Tpth8.styles-module_valid__zWcOz + .styles-module_label__appHO .styles-module_label_text__-sKjY {\n transform: translateY(-150%);\n left: 15px;\n font-size: 14px;\n background: linear-gradient(to bottom, rgba(250, 250, 250, 0.9411764706), hsla(0, 0%, 100%, 0.951));\n color: #0063d4;\n}\n\n.styles-module_input__Tpth8.styles-module_valid__zWcOz + .styles-module_label__appHO .styles-module_label_text__-sKjY {\n color: #a8a8a8;\n}";
|
@@ -353,25 +350,23 @@ var css_248z$c = ".styles-module_box__Z0iod {\n background: #F4F4F4;\n width:
|
|
353
350
|
var styles$c = {"box":"styles-module_box__Z0iod","left_side":"styles-module_left_side__8ObGs","right_side":"styles-module_right_side__Ypp0D"};
|
354
351
|
styleInject(css_248z$c);
|
355
352
|
|
356
|
-
function OptionField({ headline, description,
|
353
|
+
function OptionField({ headline, description, iconName }) {
|
357
354
|
return (React.createElement(React.Fragment, null,
|
358
|
-
React.createElement("
|
359
|
-
React.createElement("div", { className: styles$c.
|
360
|
-
|
361
|
-
React.createElement("
|
362
|
-
|
363
|
-
React.createElement("p", null, description))))));
|
355
|
+
React.createElement("div", { className: styles$c.box },
|
356
|
+
React.createElement("div", { className: styles$c.left_side }, iconName && React.createElement(SvgIcon, { iconName: iconName })),
|
357
|
+
React.createElement("div", { className: styles$c.right_side },
|
358
|
+
React.createElement("h4", null, headline),
|
359
|
+
React.createElement("p", null, description)))));
|
364
360
|
}
|
365
361
|
|
366
362
|
var css_248z$b = ".styles-module_container__XCtqW {\n background: white;\n border-radius: 12px;\n padding: 30px;\n margin-bottom: 30px;\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 18px;\n color: black;\n border: 1px solid #B1B1B1;\n transition: 0.2s ease-in-out;\n box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);\n}\n.styles-module_container__XCtqW:hover {\n background: #f0f0f0;\n border-color: #888888;\n}\n.styles-module_container__XCtqW h3 {\n font-weight: 500;\n margin: 0;\n}\n\n.styles-module_container__XCtqW.styles-module_preselected__WoSbB {\n border: 1px solid black;\n}";
|
367
363
|
var styles$b = {"container":"styles-module_container__XCtqW","preselected":"styles-module_preselected__WoSbB"};
|
368
364
|
styleInject(css_248z$b);
|
369
365
|
|
370
|
-
function OptionFieldHorizontal({ title,
|
371
|
-
return (React.createElement("
|
372
|
-
React.createElement(
|
373
|
-
|
374
|
-
React.createElement("h3", null, title))));
|
366
|
+
function OptionFieldHorizontal({ title, iconName, preselected = false }) {
|
367
|
+
return (React.createElement("div", { className: [styles$b.container, preselected ? styles$b.preselected : styles$b.not_preselected].join(" ") },
|
368
|
+
React.createElement(SvgIcon, { iconName: iconName, size: "32px" }),
|
369
|
+
React.createElement("h3", null, title)));
|
375
370
|
}
|
376
371
|
|
377
372
|
var css_248z$a = ".styles-module_container__oNbrP {\n padding-top: 10px;\n}\n.styles-module_container__oNbrP .styles-module_button__UBk65 {\n padding: 10px 18px;\n background: #0075FF;\n border-radius: 40px;\n cursor: pointer;\n display: flex;\n flex-direction: row;\n gap: 10px;\n font-size: 15px;\n color: white;\n align-items: center;\n border: none;\n}\n.styles-module_container__oNbrP .styles-module_button__UBk65.styles-module_red__CHF3e {\n background: #e40000;\n}";
|
@@ -553,12 +548,11 @@ var css_248z$3 = ".styles-module_container__xRQNT {\n display: flex;\n flex-di
|
|
553
548
|
var styles$3 = {"container":"styles-module_container__xRQNT"};
|
554
549
|
styleInject(css_248z$3);
|
555
550
|
|
556
|
-
function StepBack({
|
551
|
+
function StepBack({ iconName = "arrow_back", text = "Weitere Möglichkeiten" }) {
|
557
552
|
return (React.createElement(React.Fragment, null,
|
558
|
-
React.createElement("
|
559
|
-
React.createElement(
|
560
|
-
|
561
|
-
"Weitere M\u00F6glichkeiten"))));
|
553
|
+
React.createElement("div", { className: styles$3.container },
|
554
|
+
React.createElement(SvgIcon, { iconName: iconName }),
|
555
|
+
text)));
|
562
556
|
}
|
563
557
|
|
564
558
|
var css_248z$2 = ".styles-module_container__jNs7m {\n margin-top: 30px;\n}\n.styles-module_container__jNs7m h3 {\n font-weight: 500;\n font-size: 16px;\n}\n\n.styles-module_item_list__FxHkg.styles-module_has_children__Uu-8D {\n border-top: 1px solid #D0D0D0;\n border-bottom: 1px solid #D0D0D0;\n}\n\n.styles-module_item_list__FxHkg {\n list-style: none;\n padding: 0;\n margin: 0;\n}\n.styles-module_item_list__FxHkg .styles-module_action__YYTok {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 6px;\n cursor: pointer;\n padding: 8px 14px;\n border-radius: 25px;\n transition: 0.2s ease-in-out;\n}\n.styles-module_item_list__FxHkg .styles-module_action__YYTok.styles-module_default__SexGH:hover {\n background: rgb(223, 223, 223);\n}\n.styles-module_item_list__FxHkg .styles-module_action__YYTok.styles-module_red__KD3qJ:hover {\n background: rgb(255, 199, 199);\n}\n.styles-module_item_list__FxHkg li.styles-module_item__sgyiV {\n padding: 10px 20px;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n gap: 10px;\n}\n.styles-module_item_list__FxHkg li.styles-module_item__sgyiV .styles-module_moreText__-blXb {\n flex: 1;\n margin-bottom: 4px;\n color: #0075FF;\n}\n.styles-module_item_list__FxHkg li.styles-module_item__sgyiV .styles-module_subtitle__DT5OF {\n color: rgb(162, 162, 162);\n}\n.styles-module_item_list__FxHkg li.styles-module_item__sgyiV:nth-child(even) {\n background: #F3F3F3;\n}\n.styles-module_item_list__FxHkg li.styles-module_item__sgyiV:not(:last-child) {\n border-bottom: 1px solid #D0D0D0;\n}";
|
@@ -619,15 +613,10 @@ var css_248z$1 = ".styles-module_container__ItBx0 {\n display: flex;\n flex-di
|
|
619
613
|
var styles$1 = {"container":"styles-module_container__ItBx0"};
|
620
614
|
styleInject(css_248z$1);
|
621
615
|
|
622
|
-
function TextWithIcon({ iconName, label,
|
623
|
-
return (React.createElement("div", { className: styles$1.container },
|
624
|
-
React.createElement(
|
625
|
-
|
626
|
-
React.createElement("span", null, label))
|
627
|
-
:
|
628
|
-
React.createElement(React.Fragment, null,
|
629
|
-
React.createElement(SvgIcon, { iconName: iconName }),
|
630
|
-
React.createElement("span", null, label))));
|
616
|
+
function TextWithIcon({ iconName, label, }) {
|
617
|
+
return (React.createElement("div", { className: styles$1.container },
|
618
|
+
React.createElement(SvgIcon, { iconName: iconName }),
|
619
|
+
React.createElement("span", null, label)));
|
631
620
|
}
|
632
621
|
|
633
622
|
function degreesToRadians(degrees) {
|