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