optimized-react-component-library-xyz123 0.1.55 → 0.1.57

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.
Files changed (3) hide show
  1. package/dist/index.js +32 -81
  2. package/dist/index.mjs +100 -149
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -78,6 +78,7 @@ var InputRadio = ({ question, isTouched, showPreview = false }) => {
78
78
  !showPreview && question.visible && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "pts-root-question pts-radioMultiple-container", id: questionId, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
79
79
  "fieldset",
80
80
  {
81
+ "aria-required": question.isQuestionMandatory,
81
82
  "aria-invalid": question.hasValidationError ? question.hasValidationError : void 0,
82
83
  "aria-errormessage": question.hasValidationError ? errorId : void 0,
83
84
  children: [
@@ -95,16 +96,15 @@ var InputRadio = ({ question, isTouched, showPreview = false }) => {
95
96
  id: `${groupId}-option-${index}`,
96
97
  value: option.value,
97
98
  checked: question.answer === option.value,
98
- onChange: handleInputChange,
99
- required: question.isQuestionMandatory
100
- },
101
- index
99
+ onChange: handleInputChange
100
+ }
102
101
  ),
103
102
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { htmlFor: `${groupId}-option-${index}`, children: option.label }),
104
103
  " "
105
104
  ] }, index)),
106
105
  question.hasValidationError && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "pts-root-error", id: errorId, children: [
107
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "aria-label": "Valideringsfel", className: "errorDot", children: "!" }),
106
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
107
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: "Valideringsfel" }),
108
108
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "errorText", children: question.validationDefaultMessesege })
109
109
  ] })
110
110
  ]
@@ -364,7 +364,8 @@ var TextFieldStandard = ({
364
364
  }
365
365
  ),
366
366
  question.hasValidationError && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "pts-root-error", id: errorId, children: [
367
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { "aria-label": "Valideringsfel", className: "errorDot", children: "!" }),
367
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
368
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "sr-only", children: "Valideringsfel" }),
368
369
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "errorText", children: question.validationDefaultMessesege })
369
370
  ] })
370
371
  ]
@@ -857,40 +858,7 @@ var ScreenReaderErrors = ({
857
858
  setActivateErrorMessagesForScreenReader(false);
858
859
  }, 1e3);
859
860
  };
860
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
861
- errorMessageAddingFile.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
862
- "button",
863
- {
864
- onClick: handleRemoveErrors,
865
- style: {
866
- marginRight: "8px",
867
- backgroundColor: "transparent",
868
- border: "none",
869
- textDecoration: "underline",
870
- cursor: "pointer"
871
- },
872
- className: "errorMessageAddingFile",
873
- "aria-label": activatedLanguage === "sv" ? "Ta bort felmeddelande f\xF6r uppladdning av filer" : "Remove error message for file uploads",
874
- children: "Ta bort fel! / Remove errors!"
875
- }
876
- ),
877
- activateErrorMessagesForScreenReader && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
878
- "p",
879
- {
880
- role: "alert",
881
- style: {
882
- position: "absolute",
883
- left: "-9999px",
884
- top: "auto",
885
- width: "1px",
886
- height: "1px",
887
- overflow: "hidden"
888
- },
889
- "aria-atomic": "true",
890
- children: errorMessagesForScreenReader
891
- }
892
- )
893
- ] });
861
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: activateErrorMessagesForScreenReader && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { role: "alert", className: "sr-only", "aria-atomic": "true", children: errorMessagesForScreenReader }) });
894
862
  };
895
863
  var ScreenReaderErrors_default = ScreenReaderErrors;
896
864
 
@@ -898,7 +866,6 @@ var ScreenReaderErrors_default = ScreenReaderErrors;
898
866
  var import_jsx_runtime8 = require("react/jsx-runtime");
899
867
  var ExploreFiles = ({
900
868
  FilesSelected,
901
- //UploadButtonText = 'upload files',
902
869
  numberOfFiles,
903
870
  allowedNumberOfFiles,
904
871
  activatedLanguage,
@@ -910,20 +877,16 @@ var ExploreFiles = ({
910
877
  showErrors,
911
878
  errorMessageAddingFile,
912
879
  removeUploadErrors = () => {
913
- alert("finns ingen funktion");
914
880
  }
915
881
  }) => {
916
882
  const fileInputRef = (0, import_react4.useRef)(null);
917
883
  const buttonInputRef = (0, import_react4.useRef)(null);
918
884
  const [showErrorMessagesForScreenReader, setShowErrorMessagesForScreenReader] = import_react4.default.useState(false);
919
- const [errorMessagesForScreenReader, setErrorMessagesForScreenReader] = import_react4.default.useState("");
920
885
  (0, import_react4.useEffect)(() => {
921
886
  const button = buttonInputRef.current;
922
887
  if (!button) return;
923
888
  const handleFocus = () => {
924
889
  setShowErrorMessagesForScreenReader(!showErrorMessagesForScreenReader);
925
- console.log("FOCUS!!");
926
- console.log("Error messages for screen reader: " + errorMessageAddingFile);
927
890
  };
928
891
  button.addEventListener("focus", handleFocus);
929
892
  return () => {
@@ -939,15 +902,6 @@ var ExploreFiles = ({
939
902
  var _a;
940
903
  (_a = fileInputRef.current) == null ? void 0 : _a.click();
941
904
  };
942
- const handleRemoveErrors = () => {
943
- const errorMessages = activatedLanguage === "sv" ? `Felmeddelande raderat.` : `Error message deleted.`;
944
- setErrorMessagesForScreenReader(errorMessages);
945
- removeUploadErrors();
946
- putFocusOnButton();
947
- setTimeout(() => {
948
- setShowErrorMessagesForScreenReader(false);
949
- }, 1e3);
950
- };
951
905
  const putFocusOnButton = () => {
952
906
  var _a;
953
907
  (_a = buttonInputRef.current) == null ? void 0 : _a.focus();
@@ -975,7 +929,7 @@ var ExploreFiles = ({
975
929
  "filePickButton",
976
930
  showErrors && questionObject.error ? "filePickButton error" : ""
977
931
  ),
978
- "aria-describedby": `${aboutId} ${showErrors && questionObject.error ? errorId : ""}`.trim(),
932
+ "aria-describedby": `${aboutId} ${questionObject.hasValidationError ? errorId : ""}`.trim(),
979
933
  "aria-label": `${activatedLanguage === "sv" ? "V\xE4lj fil" : "Choose file"} ${addFilesInfoText}`,
980
934
  children: activatedLanguage === "sv" ? "V\xE4lj fil" : "Choose file"
981
935
  }
@@ -1066,7 +1020,7 @@ var SelectedFiles = ({
1066
1020
  };
1067
1021
  const windowWidth = useWindowWidth();
1068
1022
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
1069
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { children: errorMessageAddingFile.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("ul", { className: "fileListUnorderedList", "aria-label": "Valideringsfelmeddelanden f\xF6r uppladdade filer", children: [
1023
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { children: errorMessageAddingFile.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("ul", { "aria-hidden": true, className: "fileListUnorderedList", children: [
1070
1024
  " ",
1071
1025
  errorMessageAddingFile.map((errorObj, index) => {
1072
1026
  const errorFileName = errorObj.FileName;
@@ -1074,7 +1028,7 @@ var SelectedFiles = ({
1074
1028
  mobileFirstFileName = mobileFirstFileName.length > 8 ? mobileFirstFileName.substring(0, 8) + ".." : mobileFirstFileName;
1075
1029
  const fileType = errorObj.FileName.split(".").pop();
1076
1030
  mobileFirstFileName = mobileFirstFileName + "." + fileType;
1077
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react6.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "fileInListContainer", role: "alert", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "fileInList", children: [
1031
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react6.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "fileInListContainer", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "fileInList", children: [
1078
1032
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_bootstrap.Row, { children: [
1079
1033
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_bootstrap.Col, { style: { maxWidth: "30px" }, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1080
1034
  "span",
@@ -1085,17 +1039,7 @@ var SelectedFiles = ({
1085
1039
  }
1086
1040
  ) }),
1087
1041
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_bootstrap.Col, { children: windowWidth < 768 ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "mobileFirstFileName", children: mobileFirstFileName }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "desktopFileName", children: errorObj.FileName }) }),
1088
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_bootstrap.Col, { className: "lastCol", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1089
- "button",
1090
- {
1091
- className: "selectedFilesLinkButton",
1092
- onClick: () => {
1093
- removeError(index);
1094
- },
1095
- "aria-label": activatedLanguage === "sv" ? `St\xE4ng felmeddelandet f\xF6r ${errorFileName}` : `Close error message for ${errorFileName}`,
1096
- children: activatedLanguage === "sv" ? "St\xE4ng" : "Close"
1097
- }
1098
- ) })
1042
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_bootstrap.Col, { className: "lastCol" })
1099
1043
  ] }),
1100
1044
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_bootstrap.Row, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1101
1045
  import_react_bootstrap.Col,
@@ -1113,6 +1057,21 @@ var SelectedFiles = ({
1113
1057
  children: activatedLanguage === "sv" ? errorObj.svMessage : errorObj.enMessage
1114
1058
  }
1115
1059
  ) }),
1060
+ errorMessageAddingFile.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1061
+ "button",
1062
+ {
1063
+ style: {
1064
+ marginRight: "8px",
1065
+ backgroundColor: "transparent",
1066
+ border: "none",
1067
+ textDecoration: "underline",
1068
+ cursor: "pointer"
1069
+ },
1070
+ className: "errorMessageAddingFile",
1071
+ "aria-label": activatedLanguage === "sv" ? "Ta bort felmeddelande f\xF6r uppladdning av filer" : "Remove error message for file uploads",
1072
+ children: "Ta bort fel! / Remove errors!"
1073
+ }
1074
+ ),
1116
1075
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_bootstrap.Row, { style: { marginTop: "12px", marginBottom: "12px" }, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_bootstrap.Col, { className: "makeSpace" }) })
1117
1076
  ] }, index) }) }) }, `error-${errorObj.FileName}-${index}`) });
1118
1077
  })
@@ -1148,13 +1107,12 @@ var SelectedFiles = ({
1148
1107
  mobileFirstFileName,
1149
1108
  " (",
1150
1109
  Math.ceil(file.FileSize / (1024 * 1024)),
1151
- " MB)"
1110
+ " ",
1111
+ "MB)"
1152
1112
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { className: "desktopFileName", children: [
1153
1113
  file.FileName,
1154
1114
  " (",
1155
- file.FileSize < 1024 * 1024 ? `${Math.round(file.FileSize / 1024)} kB` : `${(file.FileSize / (1024 * 1024)).toFixed(
1156
- 1
1157
- )} MB`,
1115
+ file.FileSize < 1024 * 1024 ? `${Math.round(file.FileSize / 1024)} kB` : `${(file.FileSize / (1024 * 1024)).toFixed(1)} MB`,
1158
1116
  ")"
1159
1117
  ] }) }),
1160
1118
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_bootstrap.Col, { className: "lastCol", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
@@ -1348,7 +1306,6 @@ var AddFiles = ({
1348
1306
  };
1349
1307
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
1350
1308
  !showPreview && visible && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { role: "group", children: [
1351
- !questionObject.hideQuestion && questionObject.questionLabel,
1352
1309
  questionObject.aboutText && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1353
1310
  "p",
1354
1311
  {
@@ -1368,14 +1325,8 @@ var AddFiles = ({
1368
1325
  ),
1369
1326
  questionObject.hasValidationError && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "error addfileserror", id: errorId, children: [
1370
1327
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
1371
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1372
- "span",
1373
- {
1374
- "aria-label": `Felmeddelande. ${questionObject.validationDefaultMessesege}`,
1375
- className: "errorText",
1376
- children: questionObject.validationDefaultMessesege
1377
- }
1378
- )
1328
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "sr-only", children: "Valideringsfel" }),
1329
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "errorText", children: questionObject.validationDefaultMessesege })
1379
1330
  ] }),
1380
1331
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1381
1332
  ExploreFilesStandard_default,
package/dist/index.mjs CHANGED
@@ -13,6 +13,7 @@ var InputRadio = ({ question, isTouched, showPreview = false }) => {
13
13
  !showPreview && question.visible && /* @__PURE__ */ jsx("div", { className: "pts-root-question pts-radioMultiple-container", id: questionId, children: /* @__PURE__ */ jsxs(
14
14
  "fieldset",
15
15
  {
16
+ "aria-required": question.isQuestionMandatory,
16
17
  "aria-invalid": question.hasValidationError ? question.hasValidationError : void 0,
17
18
  "aria-errormessage": question.hasValidationError ? errorId : void 0,
18
19
  children: [
@@ -30,16 +31,15 @@ var InputRadio = ({ question, isTouched, showPreview = false }) => {
30
31
  id: `${groupId}-option-${index}`,
31
32
  value: option.value,
32
33
  checked: question.answer === option.value,
33
- onChange: handleInputChange,
34
- required: question.isQuestionMandatory
35
- },
36
- index
34
+ onChange: handleInputChange
35
+ }
37
36
  ),
38
37
  /* @__PURE__ */ jsx("label", { htmlFor: `${groupId}-option-${index}`, children: option.label }),
39
38
  " "
40
39
  ] }, index)),
41
40
  question.hasValidationError && /* @__PURE__ */ jsxs("div", { className: "pts-root-error", id: errorId, children: [
42
- /* @__PURE__ */ jsx("span", { "aria-label": "Valideringsfel", className: "errorDot", children: "!" }),
41
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
42
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Valideringsfel" }),
43
43
  /* @__PURE__ */ jsx("span", { className: "errorText", children: question.validationDefaultMessesege })
44
44
  ] })
45
45
  ]
@@ -299,7 +299,8 @@ var TextFieldStandard = ({
299
299
  }
300
300
  ),
301
301
  question.hasValidationError && /* @__PURE__ */ jsxs4("div", { className: "pts-root-error", id: errorId, children: [
302
- /* @__PURE__ */ jsx4("span", { "aria-label": "Valideringsfel", className: "errorDot", children: "!" }),
302
+ /* @__PURE__ */ jsx4("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
303
+ /* @__PURE__ */ jsx4("span", { className: "sr-only", children: "Valideringsfel" }),
303
304
  /* @__PURE__ */ jsx4("span", { className: "errorText", children: question.validationDefaultMessesege })
304
305
  ] })
305
306
  ]
@@ -760,7 +761,7 @@ import clsx2 from "clsx";
760
761
 
761
762
  // src/NewInputComponentStandard/AddFilesStandard/ScreenReaderErrors.tsx
762
763
  import React2 from "react";
763
- import { Fragment as Fragment7, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
764
+ import { Fragment as Fragment7, jsx as jsx7 } from "react/jsx-runtime";
764
765
  var ScreenReaderErrors = ({
765
766
  errorMessageAddingFile,
766
767
  activatedLanguage,
@@ -792,48 +793,14 @@ var ScreenReaderErrors = ({
792
793
  setActivateErrorMessagesForScreenReader(false);
793
794
  }, 1e3);
794
795
  };
795
- return /* @__PURE__ */ jsxs7(Fragment7, { children: [
796
- errorMessageAddingFile.length > 0 && /* @__PURE__ */ jsx7(
797
- "button",
798
- {
799
- onClick: handleRemoveErrors,
800
- style: {
801
- marginRight: "8px",
802
- backgroundColor: "transparent",
803
- border: "none",
804
- textDecoration: "underline",
805
- cursor: "pointer"
806
- },
807
- className: "errorMessageAddingFile",
808
- "aria-label": activatedLanguage === "sv" ? "Ta bort felmeddelande f\xF6r uppladdning av filer" : "Remove error message for file uploads",
809
- children: "Ta bort fel! / Remove errors!"
810
- }
811
- ),
812
- activateErrorMessagesForScreenReader && /* @__PURE__ */ jsx7(
813
- "p",
814
- {
815
- role: "alert",
816
- style: {
817
- position: "absolute",
818
- left: "-9999px",
819
- top: "auto",
820
- width: "1px",
821
- height: "1px",
822
- overflow: "hidden"
823
- },
824
- "aria-atomic": "true",
825
- children: errorMessagesForScreenReader
826
- }
827
- )
828
- ] });
796
+ return /* @__PURE__ */ jsx7(Fragment7, { children: activateErrorMessagesForScreenReader && /* @__PURE__ */ jsx7("p", { role: "alert", className: "sr-only", "aria-atomic": "true", children: errorMessagesForScreenReader }) });
829
797
  };
830
798
  var ScreenReaderErrors_default = ScreenReaderErrors;
831
799
 
832
800
  // src/NewInputComponentStandard/AddFilesStandard/ExploreFilesStandard.tsx
833
- import { Fragment as Fragment8, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
801
+ import { Fragment as Fragment8, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
834
802
  var ExploreFiles = ({
835
803
  FilesSelected,
836
- //UploadButtonText = 'upload files',
837
804
  numberOfFiles,
838
805
  allowedNumberOfFiles,
839
806
  activatedLanguage,
@@ -845,20 +812,16 @@ var ExploreFiles = ({
845
812
  showErrors,
846
813
  errorMessageAddingFile,
847
814
  removeUploadErrors = () => {
848
- alert("finns ingen funktion");
849
815
  }
850
816
  }) => {
851
817
  const fileInputRef = useRef2(null);
852
818
  const buttonInputRef = useRef2(null);
853
819
  const [showErrorMessagesForScreenReader, setShowErrorMessagesForScreenReader] = React3.useState(false);
854
- const [errorMessagesForScreenReader, setErrorMessagesForScreenReader] = React3.useState("");
855
820
  useEffect3(() => {
856
821
  const button = buttonInputRef.current;
857
822
  if (!button) return;
858
823
  const handleFocus = () => {
859
824
  setShowErrorMessagesForScreenReader(!showErrorMessagesForScreenReader);
860
- console.log("FOCUS!!");
861
- console.log("Error messages for screen reader: " + errorMessageAddingFile);
862
825
  };
863
826
  button.addEventListener("focus", handleFocus);
864
827
  return () => {
@@ -874,22 +837,13 @@ var ExploreFiles = ({
874
837
  var _a;
875
838
  (_a = fileInputRef.current) == null ? void 0 : _a.click();
876
839
  };
877
- const handleRemoveErrors = () => {
878
- const errorMessages = activatedLanguage === "sv" ? `Felmeddelande raderat.` : `Error message deleted.`;
879
- setErrorMessagesForScreenReader(errorMessages);
880
- removeUploadErrors();
881
- putFocusOnButton();
882
- setTimeout(() => {
883
- setShowErrorMessagesForScreenReader(false);
884
- }, 1e3);
885
- };
886
840
  const putFocusOnButton = () => {
887
841
  var _a;
888
842
  (_a = buttonInputRef.current) == null ? void 0 : _a.focus();
889
843
  };
890
844
  let addFilesInfoText = numberOfFiles > 0 ? activatedLanguage === "sv" ? `${numberOfFiles} filer valda (max ${allowedNumberOfFiles})` : `${numberOfFiles} files chosed (max ${allowedNumberOfFiles})` : activatedLanguage === "sv" ? "Ingen fil vald" : "No file chosen";
891
- return /* @__PURE__ */ jsx8(Fragment8, { children: /* @__PURE__ */ jsxs8("div", { className: "inputContainer", children: [
892
- /* @__PURE__ */ jsxs8(
845
+ return /* @__PURE__ */ jsx8(Fragment8, { children: /* @__PURE__ */ jsxs7("div", { className: "inputContainer", children: [
846
+ /* @__PURE__ */ jsxs7(
893
847
  "label",
894
848
  {
895
849
  tabIndex: -1,
@@ -910,7 +864,7 @@ var ExploreFiles = ({
910
864
  "filePickButton",
911
865
  showErrors && questionObject.error ? "filePickButton error" : ""
912
866
  ),
913
- "aria-describedby": `${aboutId} ${showErrors && questionObject.error ? errorId : ""}`.trim(),
867
+ "aria-describedby": `${aboutId} ${questionObject.hasValidationError ? errorId : ""}`.trim(),
914
868
  "aria-label": `${activatedLanguage === "sv" ? "V\xE4lj fil" : "Choose file"} ${addFilesInfoText}`,
915
869
  children: activatedLanguage === "sv" ? "V\xE4lj fil" : "Choose file"
916
870
  }
@@ -961,7 +915,7 @@ var IndicatorStandard_default = Indicator;
961
915
 
962
916
  // src/NewInputComponentStandard/AddFilesStandard/SelectedFilesStandard.tsx
963
917
  import clsx4 from "clsx";
964
- import { Fragment as Fragment10, jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
918
+ import { Fragment as Fragment10, jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
965
919
  var SelectedFiles = ({
966
920
  questionObject,
967
921
  isTouched,
@@ -1000,8 +954,8 @@ var SelectedFiles = ({
1000
954
  return windowWidth2;
1001
955
  };
1002
956
  const windowWidth = useWindowWidth();
1003
- return /* @__PURE__ */ jsxs9(Fragment10, { children: [
1004
- /* @__PURE__ */ jsx10("div", { children: errorMessageAddingFile.length > 0 && /* @__PURE__ */ jsxs9("ul", { className: "fileListUnorderedList", "aria-label": "Valideringsfelmeddelanden f\xF6r uppladdade filer", children: [
957
+ return /* @__PURE__ */ jsxs8(Fragment10, { children: [
958
+ /* @__PURE__ */ jsx10("div", { children: errorMessageAddingFile.length > 0 && /* @__PURE__ */ jsxs8("ul", { "aria-hidden": true, className: "fileListUnorderedList", children: [
1005
959
  " ",
1006
960
  errorMessageAddingFile.map((errorObj, index) => {
1007
961
  const errorFileName = errorObj.FileName;
@@ -1009,8 +963,8 @@ var SelectedFiles = ({
1009
963
  mobileFirstFileName = mobileFirstFileName.length > 8 ? mobileFirstFileName.substring(0, 8) + ".." : mobileFirstFileName;
1010
964
  const fileType = errorObj.FileName.split(".").pop();
1011
965
  mobileFirstFileName = mobileFirstFileName + "." + fileType;
1012
- return /* @__PURE__ */ jsx10("li", { children: /* @__PURE__ */ jsx10(React5.Fragment, { children: /* @__PURE__ */ jsx10("div", { children: /* @__PURE__ */ jsx10("div", { className: "fileInListContainer", role: "alert", children: /* @__PURE__ */ jsxs9("div", { className: "fileInList", children: [
1013
- /* @__PURE__ */ jsxs9(Row, { children: [
966
+ return /* @__PURE__ */ jsx10("li", { children: /* @__PURE__ */ jsx10(React5.Fragment, { children: /* @__PURE__ */ jsx10("div", { children: /* @__PURE__ */ jsx10("div", { className: "fileInListContainer", children: /* @__PURE__ */ jsxs8("div", { className: "fileInList", children: [
967
+ /* @__PURE__ */ jsxs8(Row, { children: [
1014
968
  /* @__PURE__ */ jsx10(Col, { style: { maxWidth: "30px" }, children: /* @__PURE__ */ jsx10(
1015
969
  "span",
1016
970
  {
@@ -1020,17 +974,7 @@ var SelectedFiles = ({
1020
974
  }
1021
975
  ) }),
1022
976
  /* @__PURE__ */ jsx10(Col, { children: windowWidth < 768 ? /* @__PURE__ */ jsx10("span", { className: "mobileFirstFileName", children: mobileFirstFileName }) : /* @__PURE__ */ jsx10("span", { className: "desktopFileName", children: errorObj.FileName }) }),
1023
- /* @__PURE__ */ jsx10(Col, { className: "lastCol", children: /* @__PURE__ */ jsx10(
1024
- "button",
1025
- {
1026
- className: "selectedFilesLinkButton",
1027
- onClick: () => {
1028
- removeError(index);
1029
- },
1030
- "aria-label": activatedLanguage === "sv" ? `St\xE4ng felmeddelandet f\xF6r ${errorFileName}` : `Close error message for ${errorFileName}`,
1031
- children: activatedLanguage === "sv" ? "St\xE4ng" : "Close"
1032
- }
1033
- ) })
977
+ /* @__PURE__ */ jsx10(Col, { className: "lastCol" })
1034
978
  ] }),
1035
979
  /* @__PURE__ */ jsx10(Row, { children: /* @__PURE__ */ jsx10(
1036
980
  Col,
@@ -1048,6 +992,21 @@ var SelectedFiles = ({
1048
992
  children: activatedLanguage === "sv" ? errorObj.svMessage : errorObj.enMessage
1049
993
  }
1050
994
  ) }),
995
+ errorMessageAddingFile.length > 0 && /* @__PURE__ */ jsx10(
996
+ "button",
997
+ {
998
+ style: {
999
+ marginRight: "8px",
1000
+ backgroundColor: "transparent",
1001
+ border: "none",
1002
+ textDecoration: "underline",
1003
+ cursor: "pointer"
1004
+ },
1005
+ className: "errorMessageAddingFile",
1006
+ "aria-label": activatedLanguage === "sv" ? "Ta bort felmeddelande f\xF6r uppladdning av filer" : "Remove error message for file uploads",
1007
+ children: "Ta bort fel! / Remove errors!"
1008
+ }
1009
+ ),
1051
1010
  /* @__PURE__ */ jsx10(Row, { style: { marginTop: "12px", marginBottom: "12px" }, children: /* @__PURE__ */ jsx10(Col, { className: "makeSpace" }) })
1052
1011
  ] }, index) }) }) }, `error-${errorObj.FileName}-${index}`) });
1053
1012
  })
@@ -1058,8 +1017,8 @@ var SelectedFiles = ({
1058
1017
  mobileFirstFileName = mobileFirstFileName.length > 8 ? mobileFirstFileName.substring(0, 8) + ".." : mobileFirstFileName;
1059
1018
  const fileType = file.FileName.split(".").pop();
1060
1019
  mobileFirstFileName = mobileFirstFileName + "." + fileType;
1061
- return /* @__PURE__ */ jsx10("li", { children: /* @__PURE__ */ jsx10(React5.Fragment, { children: /* @__PURE__ */ jsx10("div", { children: /* @__PURE__ */ jsx10("div", { className: "fileInListContainer", children: /* @__PURE__ */ jsxs9("div", { className: "fileInList", children: [
1062
- /* @__PURE__ */ jsxs9(Row, { children: [
1020
+ return /* @__PURE__ */ jsx10("li", { children: /* @__PURE__ */ jsx10(React5.Fragment, { children: /* @__PURE__ */ jsx10("div", { children: /* @__PURE__ */ jsx10("div", { className: "fileInListContainer", children: /* @__PURE__ */ jsxs8("div", { className: "fileInList", children: [
1021
+ /* @__PURE__ */ jsxs8(Row, { children: [
1063
1022
  /* @__PURE__ */ jsx10(Col, { style: { maxWidth: "30px" }, children: /* @__PURE__ */ jsx10("span", { "aria-hidden": "true", className: "uploadedDot", children: /* @__PURE__ */ jsx10(
1064
1023
  "svg",
1065
1024
  {
@@ -1079,17 +1038,16 @@ var SelectedFiles = ({
1079
1038
  )
1080
1039
  }
1081
1040
  ) }) }),
1082
- /* @__PURE__ */ jsx10(Col, { children: windowWidth < 768 ? /* @__PURE__ */ jsxs9("span", { className: "mobileFirstFileName", children: [
1041
+ /* @__PURE__ */ jsx10(Col, { children: windowWidth < 768 ? /* @__PURE__ */ jsxs8("span", { className: "mobileFirstFileName", children: [
1083
1042
  mobileFirstFileName,
1084
1043
  " (",
1085
1044
  Math.ceil(file.FileSize / (1024 * 1024)),
1086
- " MB)"
1087
- ] }) : /* @__PURE__ */ jsxs9("span", { className: "desktopFileName", children: [
1045
+ " ",
1046
+ "MB)"
1047
+ ] }) : /* @__PURE__ */ jsxs8("span", { className: "desktopFileName", children: [
1088
1048
  file.FileName,
1089
1049
  " (",
1090
- file.FileSize < 1024 * 1024 ? `${Math.round(file.FileSize / 1024)} kB` : `${(file.FileSize / (1024 * 1024)).toFixed(
1091
- 1
1092
- )} MB`,
1050
+ file.FileSize < 1024 * 1024 ? `${Math.round(file.FileSize / 1024)} kB` : `${(file.FileSize / (1024 * 1024)).toFixed(1)} MB`,
1093
1051
  ")"
1094
1052
  ] }) }),
1095
1053
  /* @__PURE__ */ jsx10(Col, { className: "lastCol", children: /* @__PURE__ */ jsx10(
@@ -1112,7 +1070,7 @@ var SelectedFiles = ({
1112
1070
  var SelectedFilesStandard_default = SelectedFiles;
1113
1071
 
1114
1072
  // src/NewInputComponentStandard/AddFilesStandard/AddFilesStandard.tsx
1115
- import { Fragment as Fragment11, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
1073
+ import { Fragment as Fragment11, jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
1116
1074
  var AddFiles = ({
1117
1075
  questionObject,
1118
1076
  isTouched = (e, questionObject2) => {
@@ -1281,10 +1239,9 @@ var AddFiles = ({
1281
1239
  const handleRemoveErrors = () => {
1282
1240
  setErrorMessageAddingFile([]);
1283
1241
  };
1284
- return /* @__PURE__ */ jsxs10(Fragment11, { children: [
1285
- !showPreview && visible && /* @__PURE__ */ jsx11("div", { children: /* @__PURE__ */ jsxs10("div", { role: "group", children: [
1286
- !questionObject.hideQuestion && questionObject.questionLabel,
1287
- questionObject.aboutText && /* @__PURE__ */ jsxs10(
1242
+ return /* @__PURE__ */ jsxs9(Fragment11, { children: [
1243
+ !showPreview && visible && /* @__PURE__ */ jsx11("div", { children: /* @__PURE__ */ jsxs9("div", { role: "group", children: [
1244
+ questionObject.aboutText && /* @__PURE__ */ jsxs9(
1288
1245
  "p",
1289
1246
  {
1290
1247
  id: aboutId,
@@ -1294,23 +1251,17 @@ var AddFiles = ({
1294
1251
  ),
1295
1252
  children: [
1296
1253
  questionObject.aboutText,
1297
- questionObject.isQuestionMandatory && /* @__PURE__ */ jsxs10("span", { className: "mandatoryAsterisk", "aria-hidden": "true", children: [
1254
+ questionObject.isQuestionMandatory && /* @__PURE__ */ jsxs9("span", { className: "mandatoryAsterisk", "aria-hidden": "true", children: [
1298
1255
  " ",
1299
1256
  "*"
1300
1257
  ] })
1301
1258
  ]
1302
1259
  }
1303
1260
  ),
1304
- questionObject.hasValidationError && /* @__PURE__ */ jsxs10("div", { className: "error addfileserror", id: errorId, children: [
1261
+ questionObject.hasValidationError && /* @__PURE__ */ jsxs9("div", { className: "error addfileserror", id: errorId, children: [
1305
1262
  /* @__PURE__ */ jsx11("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
1306
- /* @__PURE__ */ jsx11(
1307
- "span",
1308
- {
1309
- "aria-label": `Felmeddelande. ${questionObject.validationDefaultMessesege}`,
1310
- className: "errorText",
1311
- children: questionObject.validationDefaultMessesege
1312
- }
1313
- )
1263
+ /* @__PURE__ */ jsx11("span", { className: "sr-only", children: "Valideringsfel" }),
1264
+ /* @__PURE__ */ jsx11("span", { className: "errorText", children: questionObject.validationDefaultMessesege })
1314
1265
  ] }),
1315
1266
  /* @__PURE__ */ jsx11(
1316
1267
  ExploreFilesStandard_default,
@@ -1352,7 +1303,7 @@ var PreviewAddFiles = ({
1352
1303
  activatedLanguage
1353
1304
  }) => {
1354
1305
  const previewId = `preview-${questionObject.Id}`;
1355
- return /* @__PURE__ */ jsxs10("div", { className: "pts-question-preview pts-addFiles-preview", id: `question-${previewId}`, children: [
1306
+ return /* @__PURE__ */ jsxs9("div", { className: "pts-question-preview pts-addFiles-preview", id: `question-${previewId}`, children: [
1356
1307
  /* @__PURE__ */ jsx11("h3", { id: previewId, children: questionObject.Question }),
1357
1308
  /* @__PURE__ */ jsx11("div", { className: "pts-root-answer", children: questionObject.Files && questionObject.Files.length > 0 ? /* @__PURE__ */ jsx11("ul", { "aria-labelledby": previewId, children: questionObject.Files.map((file, index) => {
1358
1309
  return /* @__PURE__ */ jsx11("li", { children: file.FileName }, `file-${index}-${file.FileName}`);
@@ -1578,7 +1529,7 @@ function groupQuestionsByStepCategoryGroup(questions, steps, validationErrorsLis
1578
1529
  var GroupQuestionsByStepCategoryGroup_default = groupQuestionsByStepCategoryGroup;
1579
1530
 
1580
1531
  // src/NewRenderFormComponentStandard/RenderQuestion/RenderQuestion.tsx
1581
- import { Fragment as Fragment12, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
1532
+ import { Fragment as Fragment12, jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
1582
1533
  var RenderQuestion = ({
1583
1534
  question,
1584
1535
  isTouched,
@@ -1586,7 +1537,7 @@ var RenderQuestion = ({
1586
1537
  showPreview = false,
1587
1538
  hideValidationMessage
1588
1539
  }) => {
1589
- return /* @__PURE__ */ jsxs11(Fragment12, { children: [
1540
+ return /* @__PURE__ */ jsxs10(Fragment12, { children: [
1590
1541
  question.questionType === "Radio" && /* @__PURE__ */ jsx12(
1591
1542
  RadioMultipleStandard_default,
1592
1543
  {
@@ -1630,7 +1581,7 @@ var RenderQuestion_default = RenderQuestion;
1630
1581
 
1631
1582
  // src/NewRenderFormComponentStandard/RenderQuestionGroup/RenderQuestionGroup.tsx
1632
1583
  import React7 from "react";
1633
- import { Fragment as Fragment13, jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
1584
+ import { Fragment as Fragment13, jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
1634
1585
  var RenderQuestionGroup = ({
1635
1586
  questionArray,
1636
1587
  wrapper,
@@ -1662,7 +1613,7 @@ var RenderQuestionGroup = ({
1662
1613
  }) });
1663
1614
  switch (wrapper) {
1664
1615
  case "fieldset":
1665
- return /* @__PURE__ */ jsxs12(
1616
+ return /* @__PURE__ */ jsxs11(
1666
1617
  "fieldset",
1667
1618
  {
1668
1619
  className: "pts-root-question-group-fieldset",
@@ -1671,14 +1622,14 @@ var RenderQuestionGroup = ({
1671
1622
  "aria-errormessage": questionArray[0].hasValidationError ? `${questionArray[0].id}-error` : void 0,
1672
1623
  "aria-describedby": questionArray[0].hasValidationError ? `${questionArray[0].id}-error` : void 0,
1673
1624
  children: [
1674
- legend && /* @__PURE__ */ jsxs12("legend", { children: [
1625
+ legend && /* @__PURE__ */ jsxs11("legend", { children: [
1675
1626
  /* @__PURE__ */ jsx13("span", { children: legend }),
1676
- questionArray[0].hasValidationError && /* @__PURE__ */ jsxs12("span", { className: "sr-only", children: [
1627
+ questionArray[0].hasValidationError && /* @__PURE__ */ jsxs11("span", { className: "sr-only", children: [
1677
1628
  "Valideringsfel. ",
1678
1629
  questionArray[0].validationDefaultMessesege
1679
1630
  ] })
1680
1631
  ] }),
1681
- questionArray[0].hasValidationError && /* @__PURE__ */ jsxs12("div", { className: "pts-root-error", id: questionArray[0].id + "-error", children: [
1632
+ questionArray[0].hasValidationError && /* @__PURE__ */ jsxs11("div", { className: "pts-root-error", id: questionArray[0].id + "-error", children: [
1682
1633
  /* @__PURE__ */ jsx13("span", { "aria-label": "Valideringsfel", className: "errorDot", children: "!" }),
1683
1634
  /* @__PURE__ */ jsx13("span", { className: "errorText", children: questionArray[0].validationDefaultMessesege })
1684
1635
  ] }),
@@ -1780,13 +1731,13 @@ var ILanguageSupportinitialState = {
1780
1731
  };
1781
1732
 
1782
1733
  // src/NewTextComponentStandard/EditPreviewLinkStandard/EditPreviewLinkStandard.tsx
1783
- import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
1734
+ import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
1784
1735
  var EditPreviewLink = ({
1785
1736
  step,
1786
1737
  changeStepHandler,
1787
1738
  activatedLanguage = "sv"
1788
1739
  }) => {
1789
- return /* @__PURE__ */ jsx14("div", { className: "pts-editPreviewLink-container", children: /* @__PURE__ */ jsxs13(
1740
+ return /* @__PURE__ */ jsx14("div", { className: "pts-editPreviewLink-container", children: /* @__PURE__ */ jsxs12(
1790
1741
  "a",
1791
1742
  {
1792
1743
  href: "#",
@@ -1824,10 +1775,10 @@ var EditPreviewLink = ({
1824
1775
  var EditPreviewLinkStandard_default = EditPreviewLink;
1825
1776
 
1826
1777
  // src/NewTextComponentStandard/FooterStandard/FooterStandard.tsx
1827
- import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
1778
+ import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
1828
1779
  var Footer = ({ activatedLanguage = "sv" }) => {
1829
- return /* @__PURE__ */ jsxs14("footer", { className: "pts-footer-container", children: [
1830
- /* @__PURE__ */ jsxs14(
1780
+ return /* @__PURE__ */ jsxs13("footer", { className: "pts-footer-container", children: [
1781
+ /* @__PURE__ */ jsxs13(
1831
1782
  "svg",
1832
1783
  {
1833
1784
  role: "img",
@@ -1861,8 +1812,8 @@ var Footer = ({ activatedLanguage = "sv" }) => {
1861
1812
  {
1862
1813
  className: "pts-footer-linkList",
1863
1814
  "aria-label": activatedLanguage === "en" ? "Footer navigation" : "Sidfotsnavigering",
1864
- children: /* @__PURE__ */ jsxs14("ul", { children: [
1865
- /* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */ jsxs14(
1815
+ children: /* @__PURE__ */ jsxs13("ul", { children: [
1816
+ /* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */ jsxs13(
1866
1817
  "a",
1867
1818
  {
1868
1819
  href: activatedLanguage === "en" ? "https://pts.se/en/contact/" : "https://www.pts.se/kontakt/",
@@ -1874,7 +1825,7 @@ var Footer = ({ activatedLanguage = "sv" }) => {
1874
1825
  ]
1875
1826
  }
1876
1827
  ) }),
1877
- /* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */ jsxs14(
1828
+ /* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */ jsxs13(
1878
1829
  "a",
1879
1830
  {
1880
1831
  href: activatedLanguage === "en" ? "https://pts.se/en/gdpr" : "https://www.pts.se/gdpr/",
@@ -1886,7 +1837,7 @@ var Footer = ({ activatedLanguage = "sv" }) => {
1886
1837
  ]
1887
1838
  }
1888
1839
  ) }),
1889
- /* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */ jsxs14(
1840
+ /* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */ jsxs13(
1890
1841
  "a",
1891
1842
  {
1892
1843
  href: activatedLanguage === "en" ? "https://pts.se/en/accessibility-eservices" : "https://www.pts.se/tillganglighet-etjanster",
@@ -1898,7 +1849,7 @@ var Footer = ({ activatedLanguage = "sv" }) => {
1898
1849
  ]
1899
1850
  }
1900
1851
  ) }),
1901
- /* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */ jsxs14(
1852
+ /* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */ jsxs13(
1902
1853
  "a",
1903
1854
  {
1904
1855
  href: activatedLanguage === "en" ? "https://pts.se/en/cookies-eservices" : "https://www.pts.se/kakor-etjanster",
@@ -1918,7 +1869,7 @@ var Footer = ({ activatedLanguage = "sv" }) => {
1918
1869
  var FooterStandard_default = Footer;
1919
1870
 
1920
1871
  // src/NewTextComponentStandard/HeaderStandard/Icons.tsx
1921
- import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
1872
+ import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
1922
1873
  var LanguageIcon = () => /* @__PURE__ */ jsx16("svg", { width: "15", height: "15", viewBox: "0 0 21 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx16(
1923
1874
  "path",
1924
1875
  {
@@ -1926,7 +1877,7 @@ var LanguageIcon = () => /* @__PURE__ */ jsx16("svg", { width: "15", height: "15
1926
1877
  fill: "#6E3282"
1927
1878
  }
1928
1879
  ) });
1929
- var Logo_sv = () => /* @__PURE__ */ jsxs15("svg", { width: "168.8", height: "46.67", viewBox: "0 0 168.8 46.67", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1880
+ var Logo_sv = () => /* @__PURE__ */ jsxs14("svg", { width: "168.8", height: "46.67", viewBox: "0 0 168.8 46.67", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1930
1881
  /* @__PURE__ */ jsx16(
1931
1882
  "path",
1932
1883
  {
@@ -2072,7 +2023,7 @@ var Logo_sv = () => /* @__PURE__ */ jsxs15("svg", { width: "168.8", height: "46.
2072
2023
  ),
2073
2024
  /* @__PURE__ */ jsx16("path", { d: "M82.2223 18.3335V37.2224", stroke: "black", strokeWidth: "0.8", strokeMiterlimit: "10" })
2074
2025
  ] });
2075
- var Logo_en = () => /* @__PURE__ */ jsxs15("svg", { width: "189.0", height: "46.67", viewBox: "0 0 189 46.67", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img", children: [
2026
+ var Logo_en = () => /* @__PURE__ */ jsxs14("svg", { width: "189.0", height: "46.67", viewBox: "0 0 189 46.67", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img", children: [
2076
2027
  /* @__PURE__ */ jsx16(
2077
2028
  "path",
2078
2029
  {
@@ -2295,7 +2246,7 @@ var Logo_en = () => /* @__PURE__ */ jsxs15("svg", { width: "189.0", height: "46.
2295
2246
  ] });
2296
2247
 
2297
2248
  // src/NewTextComponentStandard/HeaderStandard/HeaderStandard.tsx
2298
- import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
2249
+ import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
2299
2250
  var Header = ({
2300
2251
  activatedLanguage = "sv",
2301
2252
  useLanguage = true,
@@ -2314,7 +2265,7 @@ var Header = ({
2314
2265
  if (activatedLanguage === "sv") return "English";
2315
2266
  else return "Svenska";
2316
2267
  };
2317
- return /* @__PURE__ */ jsxs16("header", { className: "pts-header-container", children: [
2268
+ return /* @__PURE__ */ jsxs15("header", { className: "pts-header-container", children: [
2318
2269
  /* @__PURE__ */ jsx17(
2319
2270
  "a",
2320
2271
  {
@@ -2325,7 +2276,7 @@ var Header = ({
2325
2276
  children: activatedLanguage === "en" ? /* @__PURE__ */ jsx17("span", { "aria-hidden": "true", children: /* @__PURE__ */ jsx17(Logo_en, {}) }) : /* @__PURE__ */ jsx17("span", { "aria-hidden": "true", children: /* @__PURE__ */ jsx17(Logo_sv, {}) })
2326
2277
  }
2327
2278
  ),
2328
- useLanguage && /* @__PURE__ */ jsxs16(
2279
+ useLanguage && /* @__PURE__ */ jsxs15(
2329
2280
  "button",
2330
2281
  {
2331
2282
  "aria-label": activatedLanguage === "en" ? "Change language to Svenska" : "\xC4ndra spr\xE5k till English",
@@ -2344,7 +2295,7 @@ var HeaderStandard_default = Header;
2344
2295
  // src/NewTextComponentStandard/InfoOnlyStandard/InfoOnlyStandard.tsx
2345
2296
  import { useEffect as useEffect6 } from "react";
2346
2297
  import DOMPurify4 from "dompurify";
2347
- import { Fragment as Fragment14, jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
2298
+ import { Fragment as Fragment14, jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
2348
2299
  var cleanText = (text) => DOMPurify4.sanitize(text, { ADD_ATTR: ["target", "class"] });
2349
2300
  var InfoOnly = ({
2350
2301
  questionObject,
@@ -2364,7 +2315,7 @@ var InfoOnly = ({
2364
2315
  const e = { target: { value: questionObject2.questionLabel + avoidBugInRedux } };
2365
2316
  isTouched(e, questionObject2);
2366
2317
  };
2367
- return /* @__PURE__ */ jsxs17(Fragment14, { children: [
2318
+ return /* @__PURE__ */ jsxs16(Fragment14, { children: [
2368
2319
  showConfigure && visible && /* @__PURE__ */ jsx18("div", { className: "pts-infoOnly-container", children: /* @__PURE__ */ jsx18("div", { className: "InfoOnlyText", tabIndex, children: questionObject.questionLabel && /* @__PURE__ */ jsx18(
2369
2320
  "p",
2370
2321
  {
@@ -2389,7 +2340,7 @@ var PreviewInfoOnly = ({ questionObject }) => {
2389
2340
  };
2390
2341
 
2391
2342
  // src/NewTextComponentStandard/ModalStandard/ModalStandard.tsx
2392
- import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
2343
+ import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
2393
2344
  var CONTENT = {
2394
2345
  en: {
2395
2346
  heading: "Please wait",
@@ -2403,8 +2354,8 @@ var CONTENT = {
2403
2354
  var Modal = ({ showModal: isOpen, activatedLanguage = "" }) => {
2404
2355
  const currentContent = activatedLanguage === "en" ? CONTENT.en : CONTENT.sv;
2405
2356
  if (!isOpen) return null;
2406
- return /* @__PURE__ */ jsxs18("div", { className: "pts-modal-overlay", children: [
2407
- /* @__PURE__ */ jsxs18("div", { "aria-hidden": true, className: "pts-modal-content", children: [
2357
+ return /* @__PURE__ */ jsxs17("div", { className: "pts-modal-overlay", children: [
2358
+ /* @__PURE__ */ jsxs17("div", { "aria-hidden": true, className: "pts-modal-content", children: [
2408
2359
  /* @__PURE__ */ jsx19("h1", { children: currentContent.heading }),
2409
2360
  /* @__PURE__ */ jsx19("p", { children: currentContent.message }),
2410
2361
  /* @__PURE__ */ jsx19("div", { className: "pts-spinner-border" })
@@ -2417,9 +2368,9 @@ var ModalStandard_default = Modal;
2417
2368
  // src/NewTextComponentStandard/TextHeadlineAndBodyStandard/TextHeadlineAndBodyStandard.tsx
2418
2369
  import { createElement } from "react";
2419
2370
  import DOMPurify5 from "dompurify";
2420
- import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
2371
+ import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
2421
2372
  var TextHeadlineAndBody = ({ data, headlineType = "h2" }) => {
2422
- return /* @__PURE__ */ jsxs19(
2373
+ return /* @__PURE__ */ jsxs18(
2423
2374
  "section",
2424
2375
  {
2425
2376
  className: "pts-textHeadlineAndBody-container",
@@ -2427,7 +2378,7 @@ var TextHeadlineAndBody = ({ data, headlineType = "h2" }) => {
2427
2378
  children: [
2428
2379
  data.headline && createElement(headlineType, { id: "textHeadlineAndBody-headline" }, data.headline),
2429
2380
  data.body && /* @__PURE__ */ jsx20("div", { dangerouslySetInnerHTML: { __html: DOMPurify5.sanitize(data.body) } }),
2430
- data.linksForMoreInfo && data.linksForMoreInfo.length > 1 && /* @__PURE__ */ jsx20("ul", { className: "pts-moreinfo-list", children: data.linksForMoreInfo.map((link, index) => /* @__PURE__ */ jsx20("li", { className: index > 0 ? "notFirstInList" : "", children: /* @__PURE__ */ jsxs19(
2381
+ data.linksForMoreInfo && data.linksForMoreInfo.length > 1 && /* @__PURE__ */ jsx20("ul", { className: "pts-moreinfo-list", children: data.linksForMoreInfo.map((link, index) => /* @__PURE__ */ jsx20("li", { className: index > 0 ? "notFirstInList" : "", children: /* @__PURE__ */ jsxs18(
2431
2382
  "a",
2432
2383
  {
2433
2384
  href: link.url,
@@ -2457,7 +2408,7 @@ var TextHeadlineAndBody = ({ data, headlineType = "h2" }) => {
2457
2408
  ]
2458
2409
  }
2459
2410
  ) }, `more-info-${index}`)) }),
2460
- data.linksForMoreInfo && data.linksForMoreInfo.length === 1 && /* @__PURE__ */ jsxs19(
2411
+ data.linksForMoreInfo && data.linksForMoreInfo.length === 1 && /* @__PURE__ */ jsxs18(
2461
2412
  "a",
2462
2413
  {
2463
2414
  href: data.linksForMoreInfo[0].url,
@@ -2549,12 +2500,12 @@ var PrincipleOfPublicityStandard_default = PrincipleOfPublicity;
2549
2500
 
2550
2501
  // src/NewTextComponentStandard/ServiceHeadlineAndBodyStandard/ServiceHeadlineAndBodyStandard.tsx
2551
2502
  import DOMPurify6 from "dompurify";
2552
- import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
2503
+ import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
2553
2504
  var ServiceHeadlineAndBody = ({ data, activeStep = 1 }) => {
2554
- return /* @__PURE__ */ jsxs20("div", { className: "pts-serviceHeadlineAndBody-container", children: [
2505
+ return /* @__PURE__ */ jsxs19("div", { className: "pts-serviceHeadlineAndBody-container", children: [
2555
2506
  data.mainHeadline && /* @__PURE__ */ jsx22("h1", { id: "pts-main-service-headline", children: data.mainHeadline }),
2556
2507
  activeStep === 1 && data.ingressBody && /* @__PURE__ */ jsx22("div", { dangerouslySetInnerHTML: { __html: DOMPurify6.sanitize(data.ingressBody) } }),
2557
- activeStep === 1 && data.linksForMoreInfo && data.linksForMoreInfo.length > 1 && /* @__PURE__ */ jsx22("ul", { className: "pts-moreinfo-list", children: data.linksForMoreInfo.map((moreInfo, index) => /* @__PURE__ */ jsx22("li", { className: index > 0 ? "notFirstInList" : "", children: /* @__PURE__ */ jsxs20("a", { href: moreInfo.url, target: "_blank", rel: "noopener noreferrer", children: [
2508
+ activeStep === 1 && data.linksForMoreInfo && data.linksForMoreInfo.length > 1 && /* @__PURE__ */ jsx22("ul", { className: "pts-moreinfo-list", children: data.linksForMoreInfo.map((moreInfo, index) => /* @__PURE__ */ jsx22("li", { className: index > 0 ? "notFirstInList" : "", children: /* @__PURE__ */ jsxs19("a", { href: moreInfo.url, target: "_blank", rel: "noopener noreferrer", children: [
2558
2509
  /* @__PURE__ */ jsx22(
2559
2510
  "svg",
2560
2511
  {
@@ -2575,7 +2526,7 @@ var ServiceHeadlineAndBody = ({ data, activeStep = 1 }) => {
2575
2526
  ),
2576
2527
  /* @__PURE__ */ jsx22("span", { className: "pts-moreinfo-link-text", children: moreInfo.title })
2577
2528
  ] }) }, moreInfo.title + index)) }),
2578
- activeStep === 1 && data.linksForMoreInfo && data.linksForMoreInfo.length === 1 && /* @__PURE__ */ jsxs20("a", { href: data.linksForMoreInfo[0].url, target: "_blank", rel: "noopener noreferrer", children: [
2529
+ activeStep === 1 && data.linksForMoreInfo && data.linksForMoreInfo.length === 1 && /* @__PURE__ */ jsxs19("a", { href: data.linksForMoreInfo[0].url, target: "_blank", rel: "noopener noreferrer", children: [
2579
2530
  /* @__PURE__ */ jsx22(
2580
2531
  "svg",
2581
2532
  {
@@ -2608,7 +2559,7 @@ var SkipLink = () => {
2608
2559
  var SkipLinkStandard_default = SkipLink;
2609
2560
 
2610
2561
  // src/NewTextComponentStandard/StepperButtonsStandard/StepperButtonsStandard.tsx
2611
- import { jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
2562
+ import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
2612
2563
  var StepperButtons = ({
2613
2564
  languageSupported,
2614
2565
  handleActiveStep,
@@ -2618,7 +2569,7 @@ var StepperButtons = ({
2618
2569
  activeStep
2619
2570
  }) => {
2620
2571
  const totalSteps = arraySteps ? arraySteps.length : "";
2621
- return /* @__PURE__ */ jsxs21("div", { className: "pts-stepperButtons-container", children: [
2572
+ return /* @__PURE__ */ jsxs20("div", { className: "pts-stepperButtons-container", children: [
2622
2573
  activeStep !== 0 && /* @__PURE__ */ jsx24(
2623
2574
  "button",
2624
2575
  {
@@ -2628,7 +2579,7 @@ var StepperButtons = ({
2628
2579
  children: languageSupported ? languageSupported.backButton : "<<"
2629
2580
  }
2630
2581
  ),
2631
- /* @__PURE__ */ jsxs21(
2582
+ /* @__PURE__ */ jsxs20(
2632
2583
  "button",
2633
2584
  {
2634
2585
  type: activeStep === totalSteps ? "submit" : "button",
@@ -2646,14 +2597,14 @@ var StepperButtonsStandard_default = StepperButtons;
2646
2597
 
2647
2598
  // src/NewTextComponentStandard/StepperStandard/StepperStandard.tsx
2648
2599
  import React10 from "react";
2649
- import { jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
2600
+ import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
2650
2601
  var Stepper = ({ arraySteps = [], activeStep = 1 }) => {
2651
2602
  return /* @__PURE__ */ jsx25("div", { className: "pts-stepper-container", "aria-hidden": "true", children: arraySteps.map((step, index) => {
2652
2603
  const isActive = step.step === activeStep;
2653
2604
  const lastElement = arraySteps.length;
2654
2605
  const isDone = step.step < activeStep;
2655
- return /* @__PURE__ */ jsxs22(React10.Fragment, { children: [
2656
- /* @__PURE__ */ jsxs22("div", { className: "pts-stepper-step", children: [
2606
+ return /* @__PURE__ */ jsxs21(React10.Fragment, { children: [
2607
+ /* @__PURE__ */ jsxs21("div", { className: "pts-stepper-step", children: [
2657
2608
  /* @__PURE__ */ jsx25(
2658
2609
  "div",
2659
2610
  {
@@ -2688,7 +2639,7 @@ var Stepper = ({ arraySteps = [], activeStep = 1 }) => {
2688
2639
  var StepperStandard_default = Stepper;
2689
2640
 
2690
2641
  // src/NewTextComponentStandard/ValidationErrorSummaryList/ValidationErrorSummaryList.tsx
2691
- import { Fragment as Fragment15, jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
2642
+ import { Fragment as Fragment15, jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
2692
2643
  var ValidationErrorSummaryList = ({
2693
2644
  validationErrorsList,
2694
2645
  formQuestions,
@@ -2736,9 +2687,9 @@ var ValidationErrorSummaryList = ({
2736
2687
  const found = formQuestions.find((item) => item.id === id);
2737
2688
  return (_a = found == null ? void 0 : found.validationSummaryLabel) != null ? _a : found == null ? void 0 : found.questionLabel;
2738
2689
  }
2739
- return /* @__PURE__ */ jsxs23("div", { className: "pts-errorSummary-container pts-root-error", children: [
2690
+ return /* @__PURE__ */ jsxs22("div", { className: "pts-errorSummary-container pts-root-error", children: [
2740
2691
  /* @__PURE__ */ jsx26("span", { "aria-hidden": "true", className: "errorDot", children: "!" }),
2741
- /* @__PURE__ */ jsxs23("div", { className: "errorSummary-content", id: "pts-errorSummary-content", children: [
2692
+ /* @__PURE__ */ jsxs22("div", { className: "errorSummary-content", id: "pts-errorSummary-content", children: [
2742
2693
  /* @__PURE__ */ jsx26("h2", { id: "errorSummary-headline", children: title }),
2743
2694
  /* @__PURE__ */ jsx26("ul", { id: "errorSummary-ul", children: filteredIds.map((questionId, i) => /* @__PURE__ */ jsx26("li", { children: /* @__PURE__ */ jsx26(
2744
2695
  "a",
@@ -2758,7 +2709,7 @@ var ValidationErrorSummaryList = ({
2758
2709
  var ValidationErrorSummaryList_default = ValidationErrorSummaryList;
2759
2710
 
2760
2711
  // src/NewTextComponentStandard/CookieBanner/CookieBanner.tsx
2761
- import { jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
2712
+ import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
2762
2713
  var CookieBanner = ({
2763
2714
  visible = false,
2764
2715
  onCookieStateChange,
@@ -2790,11 +2741,11 @@ var CookieBanner = ({
2790
2741
  "aria-modal": "true",
2791
2742
  id: "cookie-banner",
2792
2743
  tabIndex: -1,
2793
- children: /* @__PURE__ */ jsxs24("div", { className: "content", children: [
2744
+ children: /* @__PURE__ */ jsxs23("div", { className: "content", children: [
2794
2745
  /* @__PURE__ */ jsx27("h3", { id: "cookie-banner-title", children: "Kakor (cookies)" }),
2795
2746
  /* @__PURE__ */ jsx27("p", { id: "cookie-banner-description", children: "PTS skulle vilja anv\xE4nda en statistikkaka i syfte att l\xF6pande f\xF6rb\xE4ttra webbplatsen. Samtycker du till det? Du kan n\xE4r som helst \xE4ndra ditt val. F\xF6r att \xE5terkalla ditt samtycke klickar du p\xE5 \u201DKakor\u201D i avsnittet l\xE4ngst ned p\xE5 webbplatsen." }),
2796
- /* @__PURE__ */ jsxs24("div", { className: "pts-cookieBanner-Links", children: [
2797
- /* @__PURE__ */ jsxs24(
2747
+ /* @__PURE__ */ jsxs23("div", { className: "pts-cookieBanner-Links", children: [
2748
+ /* @__PURE__ */ jsxs23(
2798
2749
  "svg",
2799
2750
  {
2800
2751
  width: "27",
@@ -2817,7 +2768,7 @@ var CookieBanner = ({
2817
2768
  ),
2818
2769
  /* @__PURE__ */ jsx27("a", { href: "www.pts.se", target: "_blank", rel: "noopener noreferrer", children: "Kakor (cookies) p\xE5 pts.se (\xD6ppnas i nytt f\xF6nster)" })
2819
2770
  ] }),
2820
- /* @__PURE__ */ jsxs24("div", { className: "pts-cookieBanner-Buttons", children: [
2771
+ /* @__PURE__ */ jsxs23("div", { className: "pts-cookieBanner-Buttons", children: [
2821
2772
  /* @__PURE__ */ jsx27("button", { onClick: () => handleCookieChoice(true), children: "Ja, jag samtycker" }),
2822
2773
  /* @__PURE__ */ jsx27("button", { onClick: () => handleCookieChoice(false), children: "Nej, jag samtycker inte" })
2823
2774
  ] })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "optimized-react-component-library-xyz123",
3
- "version": "0.1.55",
3
+ "version": "0.1.57",
4
4
  "description": "A modern React component library using TypeScript with React 19 support.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",