optimized-react-component-library-xyz123 3.3.2 → 3.4.0
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/dist/index.js +92 -120
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +81 -109
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -377,7 +377,6 @@ var PreviewCheckboxGroup = ({
|
|
|
377
377
|
};
|
|
378
378
|
|
|
379
379
|
// src/components/input-components/TextAreaStandard/TextAreaStandard.tsx
|
|
380
|
-
var import_react3 = require("react");
|
|
381
380
|
var import_dompurify = __toESM(require("dompurify"));
|
|
382
381
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
383
382
|
var InputTextarea = ({
|
|
@@ -386,31 +385,18 @@ var InputTextarea = ({
|
|
|
386
385
|
showPreview = false,
|
|
387
386
|
activatedLanguage
|
|
388
387
|
}) => {
|
|
389
|
-
var _a, _b, _c, _d, _e, _f
|
|
388
|
+
var _a, _b, _c, _d, _e, _f;
|
|
390
389
|
const questionId = `question-${question.id}`;
|
|
391
390
|
const inputId = `textarea-${question.id}`;
|
|
392
391
|
const aboutId = `about-${question.id}`;
|
|
393
392
|
const errorId = `error-${question.id}`;
|
|
394
|
-
const [localAnswer, setLocalAnswer] = (0, import_react3.useState)((_a = question.answer) != null ? _a : "");
|
|
395
|
-
const lastSyncedAnswer = (0, import_react3.useRef)((_b = question.answer) != null ? _b : "");
|
|
396
|
-
(0, import_react3.useEffect)(() => {
|
|
397
|
-
var _a2;
|
|
398
|
-
const incomingFromRedux = (_a2 = question.answer) != null ? _a2 : "";
|
|
399
|
-
if (incomingFromRedux !== lastSyncedAnswer.current) {
|
|
400
|
-
setLocalAnswer(incomingFromRedux);
|
|
401
|
-
lastSyncedAnswer.current = incomingFromRedux;
|
|
402
|
-
}
|
|
403
|
-
}, [question.answer]);
|
|
404
393
|
const defaultMaxLength = 1e3;
|
|
405
|
-
const answerLength = (
|
|
406
|
-
const maxLength = (
|
|
394
|
+
const answerLength = (_b = (_a = question.answer) == null ? void 0 : _a.length) != null ? _b : 0;
|
|
395
|
+
const maxLength = (_d = (_c = question.questionExtraAttribute) == null ? void 0 : _c.answerMaxLength) != null ? _d : defaultMaxLength;
|
|
407
396
|
const isTooLong = answerLength > maxLength;
|
|
408
397
|
const counterText = activatedLanguage === "en" ? `${answerLength} of ${maxLength} characters` : `${answerLength} av ${maxLength} tecken`;
|
|
409
398
|
const maxLengthErrorText = activatedLanguage === "en" ? `The text must be ${maxLength} characters or less` : `Texten f\xE5r inte vara l\xE4ngre \xE4n ${maxLength} tecken`;
|
|
410
|
-
const
|
|
411
|
-
const value = e.target.value;
|
|
412
|
-
setLocalAnswer(value);
|
|
413
|
-
lastSyncedAnswer.current = value;
|
|
399
|
+
const onChange = (e) => {
|
|
414
400
|
handleQuestionInputChange(e, question);
|
|
415
401
|
};
|
|
416
402
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
@@ -439,8 +425,8 @@ var InputTextarea = ({
|
|
|
439
425
|
"textarea",
|
|
440
426
|
{
|
|
441
427
|
className: question.hasValidationError ? "pts-root-question-input-error-border" : void 0,
|
|
442
|
-
onChange:
|
|
443
|
-
value:
|
|
428
|
+
onChange: (e) => onChange(e),
|
|
429
|
+
value: question.answer,
|
|
444
430
|
required: question.isQuestionMandatory,
|
|
445
431
|
"aria-required": question.isQuestionMandatory,
|
|
446
432
|
"aria-invalid": question.hasValidationError,
|
|
@@ -449,13 +435,13 @@ var InputTextarea = ({
|
|
|
449
435
|
}
|
|
450
436
|
),
|
|
451
437
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "pts-textarea-counter-error-container", children: [
|
|
452
|
-
!((
|
|
438
|
+
!((_e = question.questionExtraAttribute) == null ? void 0 : _e.hideTextCounter) && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { "aria-live": "polite", className: `pts-character-counter`, children: counterText }),
|
|
453
439
|
!isTooLong && question.hasValidationError && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
454
440
|
ValidationMessage_default,
|
|
455
441
|
{
|
|
456
442
|
showValidationMessage: true,
|
|
457
443
|
validationId: errorId,
|
|
458
|
-
validationMessesege: (
|
|
444
|
+
validationMessesege: (_f = question.validationDefaultMessesege) != null ? _f : "",
|
|
459
445
|
activatedLanguage: activatedLanguage != null ? activatedLanguage : "sv"
|
|
460
446
|
}
|
|
461
447
|
),
|
|
@@ -496,7 +482,6 @@ var PreviewTextarea = ({
|
|
|
496
482
|
};
|
|
497
483
|
|
|
498
484
|
// src/components/input-components/TextFieldStandard/TextFieldStandard.tsx
|
|
499
|
-
var import_react4 = require("react");
|
|
500
485
|
var import_dompurify2 = __toESM(require("dompurify"));
|
|
501
486
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
502
487
|
var TextFieldStandard = ({
|
|
@@ -505,29 +490,16 @@ var TextFieldStandard = ({
|
|
|
505
490
|
showPreview = false,
|
|
506
491
|
activatedLanguage
|
|
507
492
|
}) => {
|
|
508
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o
|
|
493
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
509
494
|
const questionId = `question-${question.id}`;
|
|
510
495
|
const inputId = `textField-${question.id}`;
|
|
511
496
|
const aboutId = `about-${question.id}`;
|
|
512
497
|
const errorId = `error-${question.id}`;
|
|
513
|
-
const
|
|
514
|
-
const lastSyncedAnswer = (0, import_react4.useRef)((_b = question.answer) != null ? _b : "");
|
|
515
|
-
(0, import_react4.useEffect)(() => {
|
|
516
|
-
var _a2;
|
|
517
|
-
const incomingFromRedux = (_a2 = question.answer) != null ? _a2 : "";
|
|
518
|
-
if (incomingFromRedux !== lastSyncedAnswer.current) {
|
|
519
|
-
setLocalAnswer(incomingFromRedux);
|
|
520
|
-
lastSyncedAnswer.current = incomingFromRedux;
|
|
521
|
-
}
|
|
522
|
-
}, [question.answer]);
|
|
523
|
-
const answerLength = (_c = localAnswer == null ? void 0 : localAnswer.length) != null ? _c : 0;
|
|
498
|
+
const answerLength = (_b = (_a = question.answer) == null ? void 0 : _a.length) != null ? _b : 0;
|
|
524
499
|
const maxLength = 100;
|
|
525
500
|
const isTooLong = answerLength > maxLength;
|
|
526
501
|
const maxLengthErrorText = activatedLanguage === "en" ? `The text must be ${maxLength} characters or less` : `Texten f\xE5r inte vara l\xE4ngre \xE4n ${maxLength} tecken`;
|
|
527
502
|
const handleOnChange = (e) => {
|
|
528
|
-
const value = e.target.value;
|
|
529
|
-
setLocalAnswer(value);
|
|
530
|
-
lastSyncedAnswer.current = value;
|
|
531
503
|
handleQuestionInputChange(e, question);
|
|
532
504
|
};
|
|
533
505
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
@@ -535,7 +507,7 @@ var TextFieldStandard = ({
|
|
|
535
507
|
"div",
|
|
536
508
|
{
|
|
537
509
|
id: questionId,
|
|
538
|
-
className: `pts-root-question pts-textField-container ${((
|
|
510
|
+
className: `pts-root-question pts-textField-container ${((_c = question.questionExtraAttribute) == null ? void 0 : _c.disabled) ? " pts-textField-disabled" : ""}${question.aboutText ? " pts-question-hasAbout" : ""}`.trim(),
|
|
539
511
|
children: [
|
|
540
512
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { htmlFor: inputId, children: [
|
|
541
513
|
question.questionLabel,
|
|
@@ -555,21 +527,21 @@ var TextFieldStandard = ({
|
|
|
555
527
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
556
528
|
"input",
|
|
557
529
|
{
|
|
558
|
-
type: (
|
|
559
|
-
autoComplete: (
|
|
560
|
-
inputMode: (
|
|
530
|
+
type: (_e = (_d = question.questionExtraAttribute) == null ? void 0 : _d.inputType) != null ? _e : "text",
|
|
531
|
+
autoComplete: (_g = (_f = question.questionExtraAttribute) == null ? void 0 : _f.autoComplete) != null ? _g : void 0,
|
|
532
|
+
inputMode: (_i = (_h = question.questionExtraAttribute) == null ? void 0 : _h.inputMode) != null ? _i : void 0,
|
|
561
533
|
name: `question-name-${question.id}`,
|
|
562
534
|
className: question.hasValidationError ? "pts-root-question-input-error-border" : void 0,
|
|
563
535
|
onChange: handleOnChange,
|
|
564
|
-
value:
|
|
536
|
+
value: question.answer,
|
|
565
537
|
id: inputId,
|
|
566
|
-
disabled: (
|
|
538
|
+
disabled: (_j = question.questionExtraAttribute) == null ? void 0 : _j.disabled,
|
|
567
539
|
required: question.isQuestionMandatory,
|
|
568
540
|
"aria-required": question.isQuestionMandatory,
|
|
569
541
|
"aria-describedby": [question.aboutText ? aboutId : null, question.hasValidationError ? errorId : null].filter(Boolean).join(" ") || void 0,
|
|
570
542
|
"aria-invalid": question.hasValidationError,
|
|
571
|
-
spellCheck: (
|
|
572
|
-
autoCapitalize: (
|
|
543
|
+
spellCheck: (_l = (_k = question.questionExtraAttribute) == null ? void 0 : _k.spellCheck) != null ? _l : void 0,
|
|
544
|
+
autoCapitalize: (_n = (_m = question.questionExtraAttribute) == null ? void 0 : _m.autoCapitalize) != null ? _n : void 0
|
|
573
545
|
}
|
|
574
546
|
),
|
|
575
547
|
!isTooLong && question.hasValidationError && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -577,7 +549,7 @@ var TextFieldStandard = ({
|
|
|
577
549
|
{
|
|
578
550
|
showValidationMessage: true,
|
|
579
551
|
validationId: errorId,
|
|
580
|
-
validationMessesege: (
|
|
552
|
+
validationMessesege: (_o = question.validationDefaultMessesege) != null ? _o : "",
|
|
581
553
|
activatedLanguage: activatedLanguage != null ? activatedLanguage : "sv"
|
|
582
554
|
}
|
|
583
555
|
),
|
|
@@ -617,7 +589,7 @@ var PreviewTextField = ({
|
|
|
617
589
|
};
|
|
618
590
|
|
|
619
591
|
// src/components/input-components/AddFilesStandard/AddFilesStandard.tsx
|
|
620
|
-
var
|
|
592
|
+
var import_react7 = require("react");
|
|
621
593
|
var import_clsx3 = __toESM(require("clsx"));
|
|
622
594
|
|
|
623
595
|
// src/components/input-components/AddFilesStandard/DropFilesStandard.tsx
|
|
@@ -669,19 +641,19 @@ var DropFiles = ({ FilesSelected, DropFilesText = "Dra och sl\xE4pp dina filer h
|
|
|
669
641
|
var DropFilesStandard_default = DropFiles;
|
|
670
642
|
|
|
671
643
|
// src/components/input-components/AddFilesStandard/ExploreFilesStandard.tsx
|
|
672
|
-
var
|
|
644
|
+
var import_react4 = require("react");
|
|
673
645
|
var import_clsx = __toESM(require("clsx"));
|
|
674
646
|
|
|
675
647
|
// src/components/input-components/AddFilesStandard/ScreenReaderErrors.tsx
|
|
676
|
-
var
|
|
648
|
+
var import_react3 = __toESM(require("react"));
|
|
677
649
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
678
650
|
var ScreenReaderErrors = ({
|
|
679
651
|
errorMessageAddingFile,
|
|
680
652
|
activatedLanguage
|
|
681
653
|
}) => {
|
|
682
|
-
const [activateErrorMessagesForScreenReader, setActivateErrorMessagesForScreenReader] =
|
|
683
|
-
const [errorMessagesForScreenReader, setErrorMessagesForScreenReader] =
|
|
684
|
-
|
|
654
|
+
const [activateErrorMessagesForScreenReader, setActivateErrorMessagesForScreenReader] = import_react3.default.useState(false);
|
|
655
|
+
const [errorMessagesForScreenReader, setErrorMessagesForScreenReader] = import_react3.default.useState("");
|
|
656
|
+
import_react3.default.useEffect(() => {
|
|
685
657
|
if (errorMessageAddingFile.length > 0) {
|
|
686
658
|
let errorMessages = "";
|
|
687
659
|
errorMessages += errorMessageAddingFile.length;
|
|
@@ -712,8 +684,8 @@ var ExploreFiles = ({
|
|
|
712
684
|
showErrors,
|
|
713
685
|
errorMessageAddingFile
|
|
714
686
|
}) => {
|
|
715
|
-
const fileInputRef = (0,
|
|
716
|
-
const buttonInputRef = (0,
|
|
687
|
+
const fileInputRef = (0, import_react4.useRef)(null);
|
|
688
|
+
const buttonInputRef = (0, import_react4.useRef)(null);
|
|
717
689
|
const handleFiles = (event) => {
|
|
718
690
|
const files = Array.from(event.target.files || []);
|
|
719
691
|
FilesSelected(files);
|
|
@@ -781,16 +753,16 @@ var ExploreFiles = ({
|
|
|
781
753
|
var ExploreFilesStandard_default = ExploreFiles;
|
|
782
754
|
|
|
783
755
|
// src/components/input-components/AddFilesStandard/SelectedFilesStandard.tsx
|
|
784
|
-
var
|
|
756
|
+
var import_react6 = __toESM(require("react"));
|
|
785
757
|
var import_react_bootstrap = require("react-bootstrap");
|
|
786
758
|
|
|
787
759
|
// src/components/input-components/AddFilesStandard/IndicatorStandard.tsx
|
|
788
|
-
var
|
|
760
|
+
var import_react5 = require("react");
|
|
789
761
|
var import_clsx2 = __toESM(require("clsx"));
|
|
790
762
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
791
763
|
var Indicator = (filename) => {
|
|
792
|
-
const [uploadPercentage, setUploadPercentage] = (0,
|
|
793
|
-
const [uploadDone, setUploadDone] = (0,
|
|
764
|
+
const [uploadPercentage, setUploadPercentage] = (0, import_react5.useState)(0);
|
|
765
|
+
const [uploadDone, setUploadDone] = (0, import_react5.useState)(false);
|
|
794
766
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: (0, import_clsx2.default)("uploadIndicator", "uploadDone") }) });
|
|
795
767
|
};
|
|
796
768
|
var IndicatorStandard_default = Indicator;
|
|
@@ -809,7 +781,7 @@ var SelectedFiles = ({
|
|
|
809
781
|
setNumberOfFiles,
|
|
810
782
|
removeUploadErrors
|
|
811
783
|
}) => {
|
|
812
|
-
const theDiv = (0,
|
|
784
|
+
const theDiv = (0, import_react6.useRef)(null);
|
|
813
785
|
const remove = (file) => {
|
|
814
786
|
let newFiles = questionObject.files.filter((f) => f !== file);
|
|
815
787
|
const newCountOfFiles = newFiles.length;
|
|
@@ -821,8 +793,8 @@ var SelectedFiles = ({
|
|
|
821
793
|
removeFile(newCountOfFiles);
|
|
822
794
|
};
|
|
823
795
|
const useWindowWidth = () => {
|
|
824
|
-
const [windowWidth2, setWindowWidth] = (0,
|
|
825
|
-
(0,
|
|
796
|
+
const [windowWidth2, setWindowWidth] = (0, import_react6.useState)(window.innerWidth);
|
|
797
|
+
(0, import_react6.useEffect)(() => {
|
|
826
798
|
const handleResize = () => {
|
|
827
799
|
setWindowWidth(window.innerWidth);
|
|
828
800
|
};
|
|
@@ -845,7 +817,7 @@ var SelectedFiles = ({
|
|
|
845
817
|
mobileFirstFileName = mobileFirstFileName.length > 8 ? mobileFirstFileName.substring(0, 8) + ".." : mobileFirstFileName;
|
|
846
818
|
const fileType = errorObj.FileName.split(".").pop();
|
|
847
819
|
mobileFirstFileName = mobileFirstFileName + "." + fileType;
|
|
848
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react6.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "fileInListContainer", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "fileInList", children: [
|
|
849
821
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_bootstrap.Row, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_bootstrap.Col, { children: windowWidth < 768 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "mobileFirstFileName", children: mobileFirstFileName }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "desktopFileName", children: errorObj.FileName }) }) }),
|
|
850
822
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_bootstrap.Row, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
851
823
|
import_react_bootstrap.Col,
|
|
@@ -898,7 +870,7 @@ var SelectedFiles = ({
|
|
|
898
870
|
mobileFirstFileName = mobileFirstFileName.length > 8 ? mobileFirstFileName.substring(0, 8) + ".." : mobileFirstFileName;
|
|
899
871
|
const fileType = file.FileName.split(".").pop();
|
|
900
872
|
mobileFirstFileName = mobileFirstFileName + "." + fileType;
|
|
901
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react6.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "fileInListContainer", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "fileInList", children: [
|
|
902
874
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "fileItem", children: [
|
|
903
875
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_bootstrap.Col, { style: { maxWidth: "30px" }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { "aria-hidden": "true", className: "uploadedDot", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
904
876
|
"svg",
|
|
@@ -991,24 +963,24 @@ var AddFiles = ({
|
|
|
991
963
|
const errorId = `error-${questionObject.id}`;
|
|
992
964
|
const labelId = `label-${questionObject.id}`;
|
|
993
965
|
const maxSizeMB = Math.round(allowedTotalFileSize / 1048576);
|
|
994
|
-
const [numberOfFiles, setNumberOfFiles] = (0,
|
|
995
|
-
const [totalFileSize, setTotalFileSize] = (0,
|
|
996
|
-
const [errorMessageAddingFile, setErrorMessageAddingFile] = (0,
|
|
997
|
-
const [newFiles, setNewFiles] = (0,
|
|
998
|
-
const [dropFilesText, setDropFilesText] = (0,
|
|
999
|
-
(0,
|
|
966
|
+
const [numberOfFiles, setNumberOfFiles] = (0, import_react7.useState)(0);
|
|
967
|
+
const [totalFileSize, setTotalFileSize] = (0, import_react7.useState)(0);
|
|
968
|
+
const [errorMessageAddingFile, setErrorMessageAddingFile] = (0, import_react7.useState)([]);
|
|
969
|
+
const [newFiles, setNewFiles] = (0, import_react7.useState)([]);
|
|
970
|
+
const [dropFilesText, setDropFilesText] = (0, import_react7.useState)("Dra och sl\xE4pp dina filer h\xE4r");
|
|
971
|
+
(0, import_react7.useEffect)(() => {
|
|
1000
972
|
if (activatedLanguage === "sv") {
|
|
1001
973
|
setDropFilesText("Dra och sl\xE4pp dina filer h\xE4r");
|
|
1002
974
|
} else {
|
|
1003
975
|
setDropFilesText("Drag and drop your files here");
|
|
1004
976
|
}
|
|
1005
977
|
}, [activatedLanguage]);
|
|
1006
|
-
(0,
|
|
978
|
+
(0, import_react7.useEffect)(() => {
|
|
1007
979
|
if (questionObject.files && questionObject.files.length > 0) {
|
|
1008
980
|
setNumberOfFiles(questionObject.files.length);
|
|
1009
981
|
}
|
|
1010
982
|
}, []);
|
|
1011
|
-
const onDrop = (0,
|
|
983
|
+
const onDrop = (0, import_react7.useCallback)(
|
|
1012
984
|
(acceptedFiles) => {
|
|
1013
985
|
var _a2, _b2, _c;
|
|
1014
986
|
const validationErrors = [];
|
|
@@ -1098,7 +1070,7 @@ var AddFiles = ({
|
|
|
1098
1070
|
reader.readAsDataURL(file);
|
|
1099
1071
|
});
|
|
1100
1072
|
};
|
|
1101
|
-
(0,
|
|
1073
|
+
(0, import_react7.useEffect)(() => {
|
|
1102
1074
|
if (newFiles.length > 0) {
|
|
1103
1075
|
const currentFiles = questionObject.files ? questionObject.files : [];
|
|
1104
1076
|
const e = {
|
|
@@ -1218,7 +1190,7 @@ var PreviewAddFiles = ({
|
|
|
1218
1190
|
};
|
|
1219
1191
|
|
|
1220
1192
|
// src/components/input-components/SingleCheckboxStandard/SingleCheckboxStandard.tsx
|
|
1221
|
-
var
|
|
1193
|
+
var import_react8 = require("react");
|
|
1222
1194
|
var import_dompurify3 = __toESM(require("dompurify"));
|
|
1223
1195
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1224
1196
|
var SingleCheckbox = ({
|
|
@@ -1232,8 +1204,8 @@ var SingleCheckbox = ({
|
|
|
1232
1204
|
const inputId = `checkbox-${question.id}`;
|
|
1233
1205
|
const aboutId = `about-${question.id}`;
|
|
1234
1206
|
const errorId = `error-${question.id}`;
|
|
1235
|
-
const [checked, setChecked] = (0,
|
|
1236
|
-
(0,
|
|
1207
|
+
const [checked, setChecked] = (0, import_react8.useState)(false);
|
|
1208
|
+
(0, import_react8.useEffect)(() => {
|
|
1237
1209
|
if (question.answer && question.answer === "true") {
|
|
1238
1210
|
setChecked(true);
|
|
1239
1211
|
} else {
|
|
@@ -1309,7 +1281,7 @@ var PreviewSingleCheckbox = ({
|
|
|
1309
1281
|
};
|
|
1310
1282
|
|
|
1311
1283
|
// src/components/text-blocks/TextHeadlineAndBodyStandard/TextHeadlineAndBodyStandard.tsx
|
|
1312
|
-
var
|
|
1284
|
+
var import_react9 = require("react");
|
|
1313
1285
|
var import_dompurify4 = __toESM(require("dompurify"));
|
|
1314
1286
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1315
1287
|
var TextHeadlineAndBody = ({ data, headlineType = "h2" }) => {
|
|
@@ -1318,7 +1290,7 @@ var TextHeadlineAndBody = ({ data, headlineType = "h2" }) => {
|
|
|
1318
1290
|
{
|
|
1319
1291
|
className: "pts-textHeadlineAndBody-container",
|
|
1320
1292
|
children: [
|
|
1321
|
-
data.headline && (0,
|
|
1293
|
+
data.headline && (0, import_react9.createElement)(headlineType, { id: "textHeadlineAndBody-headline" }, data.headline),
|
|
1322
1294
|
data.body && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { dangerouslySetInnerHTML: { __html: import_dompurify4.default.sanitize(data.body) } }),
|
|
1323
1295
|
data.linksForMoreInfo && data.linksForMoreInfo.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: "pts-moreinfo-list", children: data.linksForMoreInfo.map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { className: index > 0 ? "notFirstInList" : "", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1324
1296
|
"a",
|
|
@@ -2161,10 +2133,10 @@ var InputInfoOnly = ({
|
|
|
2161
2133
|
var InfoOnlyStandard_default = InputInfoOnly;
|
|
2162
2134
|
|
|
2163
2135
|
// src/components/input-components/RadioMultipleWithInfoStandard/RadioMultipleWithInfoStandard.tsx
|
|
2164
|
-
var
|
|
2136
|
+
var import_react11 = __toESM(require("react"));
|
|
2165
2137
|
|
|
2166
2138
|
// src/components/input-components/RadioMultipleWithInfoStandard/RadioCollapseItem.tsx
|
|
2167
|
-
var
|
|
2139
|
+
var import_react10 = require("react");
|
|
2168
2140
|
var import_dompurify7 = __toESM(require("dompurify"));
|
|
2169
2141
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2170
2142
|
var RadioCollapseItem = ({
|
|
@@ -2180,13 +2152,13 @@ var RadioCollapseItem = ({
|
|
|
2180
2152
|
activatedLanguage = "sv",
|
|
2181
2153
|
initialOpen = false
|
|
2182
2154
|
}) => {
|
|
2183
|
-
const [isOpen, setIsOpen] = (0,
|
|
2155
|
+
const [isOpen, setIsOpen] = (0, import_react10.useState)(initialOpen);
|
|
2184
2156
|
const contentId = `${questionId}-content-${index}`;
|
|
2185
2157
|
const buttonId = `${questionId}-button-${index}`;
|
|
2186
2158
|
const openLabel = activatedLanguage === "sv" ? "Visa mer information om" : "Show more information about";
|
|
2187
2159
|
const closeLabel = activatedLanguage === "sv" ? "D\xF6lj mer information om" : "Hide more information about";
|
|
2188
2160
|
const buttonLabel = `${isOpen ? closeLabel : openLabel} "${label}"`;
|
|
2189
|
-
(0,
|
|
2161
|
+
(0, import_react10.useEffect)(() => {
|
|
2190
2162
|
if (questionAnswer === value) {
|
|
2191
2163
|
setIsOpen(true);
|
|
2192
2164
|
} else {
|
|
@@ -2296,7 +2268,7 @@ var RadioWithInfo = ({
|
|
|
2296
2268
|
groupedOptionArray.map((group, g_index) => {
|
|
2297
2269
|
var _a2;
|
|
2298
2270
|
let subId = "subheading-" + g_index;
|
|
2299
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react11.default.Fragment, { children: [
|
|
2300
2272
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("legend", { className: "pts-radioWithInfo-sub-headline", id: subId, children: group.category }),
|
|
2301
2273
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { role: "group", "aria-labelledby": subId, children: (_a2 = group.items) == null ? void 0 : _a2.map((option, o_index) => {
|
|
2302
2274
|
var _a3, _b2, _c2, _d, _e;
|
|
@@ -3119,9 +3091,9 @@ var getGroupCheckIds = (validationType) => {
|
|
|
3119
3091
|
var getGroupCheckIds_default = getGroupCheckIds;
|
|
3120
3092
|
|
|
3121
3093
|
// src/hooks/useFormStatusModal/useFormStatusModal.ts
|
|
3122
|
-
var
|
|
3094
|
+
var React8 = __toESM(require("react"));
|
|
3123
3095
|
var useFormStatusModal = (formStatus, handleModalOpen, handleModalClose, mainSelector = "#main-content") => {
|
|
3124
|
-
|
|
3096
|
+
React8.useEffect(() => {
|
|
3125
3097
|
if (formStatus === "loading") {
|
|
3126
3098
|
handleModalOpen();
|
|
3127
3099
|
}
|
|
@@ -3136,7 +3108,7 @@ var useFormStatusModal = (formStatus, handleModalOpen, handleModalClose, mainSel
|
|
|
3136
3108
|
};
|
|
3137
3109
|
|
|
3138
3110
|
// src/hooks/usePTSPageTitle/usePTSPageTitle.ts
|
|
3139
|
-
var
|
|
3111
|
+
var import_react12 = require("react");
|
|
3140
3112
|
var usePTSPageTitle = ({
|
|
3141
3113
|
formStatus,
|
|
3142
3114
|
activeStep,
|
|
@@ -3145,7 +3117,7 @@ var usePTSPageTitle = ({
|
|
|
3145
3117
|
steps,
|
|
3146
3118
|
fallbackTitle = "PTS e-tj\xE4nst"
|
|
3147
3119
|
}) => {
|
|
3148
|
-
const computedTitle = (0,
|
|
3120
|
+
const computedTitle = (0, import_react12.useMemo)(() => {
|
|
3149
3121
|
var _a, _b, _c, _d;
|
|
3150
3122
|
const baseTitle = (_a = applicationContent == null ? void 0 : applicationContent.pageTitle) != null ? _a : "";
|
|
3151
3123
|
const thankYouPageTitle = (_b = thankYouBlock == null ? void 0 : thankYouBlock.pageTitle) != null ? _b : "";
|
|
@@ -3154,19 +3126,19 @@ var usePTSPageTitle = ({
|
|
|
3154
3126
|
if (activeStep === 0 && baseTitle) return baseTitle;
|
|
3155
3127
|
return stepTitle || baseTitle || fallbackTitle;
|
|
3156
3128
|
}, [formStatus, activeStep, applicationContent, thankYouBlock, steps, fallbackTitle]);
|
|
3157
|
-
(0,
|
|
3129
|
+
(0, import_react12.useEffect)(() => {
|
|
3158
3130
|
document.title = computedTitle;
|
|
3159
3131
|
}, [computedTitle]);
|
|
3160
3132
|
return computedTitle;
|
|
3161
3133
|
};
|
|
3162
3134
|
|
|
3163
3135
|
// src/hooks/useInputMethodDetection/useInputMethodDetection.ts
|
|
3164
|
-
var
|
|
3136
|
+
var import_react13 = require("react");
|
|
3165
3137
|
var useInputMethodDetection = ({
|
|
3166
3138
|
mouseClassName = "using-mouse",
|
|
3167
3139
|
keyboardToggleKey = "Tab"
|
|
3168
3140
|
} = {}) => {
|
|
3169
|
-
(0,
|
|
3141
|
+
(0, import_react13.useEffect)(() => {
|
|
3170
3142
|
const handleMouseDown = () => {
|
|
3171
3143
|
document.body.classList.add(mouseClassName);
|
|
3172
3144
|
};
|
|
@@ -3185,7 +3157,7 @@ var useInputMethodDetection = ({
|
|
|
3185
3157
|
};
|
|
3186
3158
|
|
|
3187
3159
|
// src/hooks/useCookieConsent/useCookieConsent.ts
|
|
3188
|
-
var
|
|
3160
|
+
var import_react14 = require("react");
|
|
3189
3161
|
var useCookieConsent = ({
|
|
3190
3162
|
cookieName,
|
|
3191
3163
|
choiceKey,
|
|
@@ -3198,7 +3170,7 @@ var useCookieConsent = ({
|
|
|
3198
3170
|
areCookiesAccepted,
|
|
3199
3171
|
hasChoiceBeenMade,
|
|
3200
3172
|
clearChoiceFromSession
|
|
3201
|
-
} = (0,
|
|
3173
|
+
} = (0, import_react14.useMemo)(
|
|
3202
3174
|
() => createCookieConsent({
|
|
3203
3175
|
cookieName,
|
|
3204
3176
|
choiceKey,
|
|
@@ -3206,15 +3178,15 @@ var useCookieConsent = ({
|
|
|
3206
3178
|
}),
|
|
3207
3179
|
[cookieName, choiceKey, expiryYears]
|
|
3208
3180
|
);
|
|
3209
|
-
const [showBanner, setShowBanner] = (0,
|
|
3210
|
-
const handleCookieStateChange = (0,
|
|
3181
|
+
const [showBanner, setShowBanner] = (0, import_react14.useState)(false);
|
|
3182
|
+
const handleCookieStateChange = (0, import_react14.useCallback)(() => {
|
|
3211
3183
|
const cookiesNowAccepted = areCookiesAccepted();
|
|
3212
3184
|
if (onConsentChange) {
|
|
3213
3185
|
onConsentChange(cookiesNowAccepted);
|
|
3214
3186
|
}
|
|
3215
3187
|
setShowBanner(false);
|
|
3216
3188
|
}, [areCookiesAccepted, onConsentChange]);
|
|
3217
|
-
(0,
|
|
3189
|
+
(0, import_react14.useEffect)(() => {
|
|
3218
3190
|
const cookiesAccepted = areCookiesAccepted();
|
|
3219
3191
|
const choiceMade = hasChoiceBeenMade();
|
|
3220
3192
|
setShowBanner(!cookiesAccepted && !choiceMade);
|
|
@@ -3343,7 +3315,7 @@ var QuestionRenderer = ({
|
|
|
3343
3315
|
var QuestionRenderer_default = QuestionRenderer;
|
|
3344
3316
|
|
|
3345
3317
|
// src/components/question-rendering/QuestionGroup/QuestionGroup.tsx
|
|
3346
|
-
var
|
|
3318
|
+
var import_react15 = require("react");
|
|
3347
3319
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3348
3320
|
var QuestionGroup = ({
|
|
3349
3321
|
questions,
|
|
@@ -3363,7 +3335,7 @@ var QuestionGroup = ({
|
|
|
3363
3335
|
const groupMandatory = (_a = firstQuestion.validationType) == null ? void 0 : _a.find(
|
|
3364
3336
|
(e) => e.startsWith("groupCheck-")
|
|
3365
3337
|
);
|
|
3366
|
-
(0,
|
|
3338
|
+
(0, import_react15.useEffect)(() => {
|
|
3367
3339
|
questions.forEach((question) => {
|
|
3368
3340
|
if (question.visible && !question.isDisplayed) {
|
|
3369
3341
|
markQuestionAsDisplayed(question);
|
|
@@ -3372,7 +3344,7 @@ var QuestionGroup = ({
|
|
|
3372
3344
|
}, [questions]);
|
|
3373
3345
|
const groupQuestions = /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx_runtime25.Fragment, { children: questions.map((question, index) => {
|
|
3374
3346
|
var _a2;
|
|
3375
|
-
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react15.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3376
3348
|
QuestionRenderer_default,
|
|
3377
3349
|
{
|
|
3378
3350
|
question,
|
|
@@ -3421,7 +3393,7 @@ var QuestionGroup = ({
|
|
|
3421
3393
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "pts-root-question-group-div", children: groupQuestions });
|
|
3422
3394
|
case "none":
|
|
3423
3395
|
default:
|
|
3424
|
-
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react15.Fragment, { children: groupQuestions });
|
|
3425
3397
|
}
|
|
3426
3398
|
};
|
|
3427
3399
|
var QuestionGroup_default = QuestionGroup;
|
|
@@ -4043,10 +4015,10 @@ var Header = ({
|
|
|
4043
4015
|
var HeaderStandard_default = Header;
|
|
4044
4016
|
|
|
4045
4017
|
// src/components/layout/NavigationHeaderStandard/NavigationHeaderStandard.tsx
|
|
4046
|
-
var
|
|
4018
|
+
var import_react18 = require("react");
|
|
4047
4019
|
|
|
4048
4020
|
// src/components/layout/NavigationStandard/NavigationStandard.tsx
|
|
4049
|
-
var
|
|
4021
|
+
var import_react16 = require("react");
|
|
4050
4022
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
4051
4023
|
var Navigation = ({
|
|
4052
4024
|
setIsMenyOpen,
|
|
@@ -4059,9 +4031,9 @@ var Navigation = ({
|
|
|
4059
4031
|
activePath = null
|
|
4060
4032
|
}) => {
|
|
4061
4033
|
const closeMenuText = activatedLanguage === "sv" ? "St\xE4ng meny" : "Close menu";
|
|
4062
|
-
const navRef = (0,
|
|
4063
|
-
const firstVisitRef = (0,
|
|
4064
|
-
const [openSubMenu, setOpenSubMenu] = (0,
|
|
4034
|
+
const navRef = (0, import_react16.useRef)(null);
|
|
4035
|
+
const firstVisitRef = (0, import_react16.useRef)(true);
|
|
4036
|
+
const [openSubMenu, setOpenSubMenu] = (0, import_react16.useState)(null);
|
|
4065
4037
|
const handleSubMenu = (label) => {
|
|
4066
4038
|
setOpenSubMenu(openSubMenu === label ? null : label);
|
|
4067
4039
|
};
|
|
@@ -4070,7 +4042,7 @@ var Navigation = ({
|
|
|
4070
4042
|
setIsMenyOpen == null ? void 0 : setIsMenyOpen(false);
|
|
4071
4043
|
typeOfInteraction === "close" ? (_a = openButtonRef == null ? void 0 : openButtonRef.current) == null ? void 0 : _a.focus() : navigationCloseFocusId && ((_b = document.getElementById(navigationCloseFocusId)) == null ? void 0 : _b.focus());
|
|
4072
4044
|
};
|
|
4073
|
-
(0,
|
|
4045
|
+
(0, import_react16.useEffect)(() => {
|
|
4074
4046
|
var _a, _b;
|
|
4075
4047
|
if (!isOpen) {
|
|
4076
4048
|
setOpenSubMenu(null);
|
|
@@ -4082,7 +4054,7 @@ var Navigation = ({
|
|
|
4082
4054
|
})) == null ? void 0 : _a.label[activatedLanguage]) != null ? _b : null;
|
|
4083
4055
|
setOpenSubMenu(defaultOpenSubMenu);
|
|
4084
4056
|
}, [isOpen, activePath, menuLinks, activatedLanguage]);
|
|
4085
|
-
(0,
|
|
4057
|
+
(0, import_react16.useEffect)(() => {
|
|
4086
4058
|
if (!isOpen || !navRef.current) {
|
|
4087
4059
|
return;
|
|
4088
4060
|
}
|
|
@@ -4132,8 +4104,8 @@ var Navigation = ({
|
|
|
4132
4104
|
}
|
|
4133
4105
|
return "\xD6ppna undermeny f\xF6r " + label["sv"];
|
|
4134
4106
|
};
|
|
4135
|
-
const [instruction, setInstruction] = (0,
|
|
4136
|
-
(0,
|
|
4107
|
+
const [instruction, setInstruction] = (0, import_react16.useState)("");
|
|
4108
|
+
(0, import_react16.useEffect)(() => {
|
|
4137
4109
|
if (firstVisitRef.current) {
|
|
4138
4110
|
firstVisitRef.current = false;
|
|
4139
4111
|
return;
|
|
@@ -4222,7 +4194,7 @@ var Navigation = ({
|
|
|
4222
4194
|
var NavigationStandard_default = Navigation;
|
|
4223
4195
|
|
|
4224
4196
|
// src/components/layout/SearchBarStandard/SearchBarStandard.tsx
|
|
4225
|
-
var
|
|
4197
|
+
var import_react17 = require("react");
|
|
4226
4198
|
|
|
4227
4199
|
// src/components/layout/SearchBarStandard/Icons.tsx
|
|
4228
4200
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
@@ -4246,7 +4218,7 @@ var SearchIcon2 = ({ width = 15, height = 15, color = "#6E3282" }) => /* @__PURE
|
|
|
4246
4218
|
// src/components/layout/SearchBarStandard/SearchBarStandard.tsx
|
|
4247
4219
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
4248
4220
|
var SearchBar = ({ activatedLanguage = "sv" }) => {
|
|
4249
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
4221
|
+
const [searchTerm, setSearchTerm] = (0, import_react17.useState)("");
|
|
4250
4222
|
const handleSearch = () => {
|
|
4251
4223
|
console.log("S\xF6kt efter:", searchTerm);
|
|
4252
4224
|
};
|
|
@@ -4300,8 +4272,8 @@ var NavigationHeader = ({
|
|
|
4300
4272
|
if (activatedLanguage === "sv") return "English";
|
|
4301
4273
|
else return "Svenska";
|
|
4302
4274
|
};
|
|
4303
|
-
const [isMenuOpen, setIsMenuOpen] = (0,
|
|
4304
|
-
const menuButtonFocusRef = (0,
|
|
4275
|
+
const [isMenuOpen, setIsMenuOpen] = (0, import_react18.useState)(false);
|
|
4276
|
+
const menuButtonFocusRef = (0, import_react18.useRef)(null);
|
|
4305
4277
|
const handleMenuClick = () => {
|
|
4306
4278
|
setIsMenuOpen((prev) => !prev);
|
|
4307
4279
|
};
|
|
@@ -4315,7 +4287,7 @@ var NavigationHeader = ({
|
|
|
4315
4287
|
const getMenuIcon = () => {
|
|
4316
4288
|
return isMenuOpen ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CloseIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(MenuIcon, {});
|
|
4317
4289
|
};
|
|
4318
|
-
const [isSearchOpen, setIsSearchOpen] = (0,
|
|
4290
|
+
const [isSearchOpen, setIsSearchOpen] = (0, import_react18.useState)(false);
|
|
4319
4291
|
const handleSearchClick = () => {
|
|
4320
4292
|
if (!isSearchOpen) {
|
|
4321
4293
|
setIsSearchOpen(true);
|
|
@@ -4530,14 +4502,14 @@ var LinkStandard = ({
|
|
|
4530
4502
|
var LinkStandard_default = LinkStandard;
|
|
4531
4503
|
|
|
4532
4504
|
// src/components/layout/LinkListStandard/LinkListStandard.tsx
|
|
4533
|
-
var
|
|
4505
|
+
var import_react19 = require("react");
|
|
4534
4506
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
4535
4507
|
var LinkList = ({
|
|
4536
4508
|
linkArray,
|
|
4537
4509
|
activatedLanguage,
|
|
4538
4510
|
linkComponent: LinkComponent = "a"
|
|
4539
4511
|
}) => {
|
|
4540
|
-
const uniqueId = (0,
|
|
4512
|
+
const uniqueId = (0, import_react19.useId)();
|
|
4541
4513
|
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "pts-linkList-container", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("ul", { children: linkArray && linkArray.map((link, index) => {
|
|
4542
4514
|
var _a, _b, _c;
|
|
4543
4515
|
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
@@ -4556,7 +4528,7 @@ var LinkList = ({
|
|
|
4556
4528
|
var LinkListStandard_default = LinkList;
|
|
4557
4529
|
|
|
4558
4530
|
// src/components/layout/CollapseStandard/CollapseStandard.tsx
|
|
4559
|
-
var
|
|
4531
|
+
var import_react20 = require("react");
|
|
4560
4532
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
4561
4533
|
var Collapse = ({
|
|
4562
4534
|
title,
|
|
@@ -4566,8 +4538,8 @@ var Collapse = ({
|
|
|
4566
4538
|
activatedLanguage = "sv",
|
|
4567
4539
|
customClass = ""
|
|
4568
4540
|
}) => {
|
|
4569
|
-
const [isOpen, setIsOpen] = (0,
|
|
4570
|
-
const uniqueId = id != null ? id : (0,
|
|
4541
|
+
const [isOpen, setIsOpen] = (0, import_react20.useState)(defaultOpen);
|
|
4542
|
+
const uniqueId = id != null ? id : (0, import_react20.useId)();
|
|
4571
4543
|
const contentId = `${uniqueId}-content`;
|
|
4572
4544
|
const openLabel = activatedLanguage === "sv" ? "Visa" : "Show";
|
|
4573
4545
|
const closeLabel = activatedLanguage === "sv" ? "D\xF6lj" : "Hide";
|
|
@@ -4681,14 +4653,14 @@ var StepperButtons = ({
|
|
|
4681
4653
|
var StepperButtonsStandard_default = StepperButtons;
|
|
4682
4654
|
|
|
4683
4655
|
// src/components/stepper/StepperStandard/StepperStandard.tsx
|
|
4684
|
-
var
|
|
4656
|
+
var import_react21 = __toESM(require("react"));
|
|
4685
4657
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
4686
4658
|
var Stepper = ({ arraySteps = [], activeStep = 1 }) => {
|
|
4687
4659
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "pts-stepper-container", "aria-hidden": "true", children: arraySteps.map((step, index) => {
|
|
4688
4660
|
const isActive = step.step === activeStep;
|
|
4689
4661
|
const lastElement = arraySteps.length;
|
|
4690
4662
|
const isDone = step.step < activeStep;
|
|
4691
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
4663
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react21.default.Fragment, { children: [
|
|
4692
4664
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "pts-stepper-step", children: [
|
|
4693
4665
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
4694
4666
|
"div",
|