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

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
@@ -990,7 +990,8 @@ var SelectedFiles = ({
990
990
  errorMessageAddingFile,
991
991
  activatedLanguage,
992
992
  numberOfFiles,
993
- setNumberOfFiles
993
+ setNumberOfFiles,
994
+ removeUploadErrors
994
995
  }) => {
995
996
  const theDiv = (0, import_react6.useRef)(null);
996
997
  const remove = (file) => {
@@ -1020,62 +1021,58 @@ var SelectedFiles = ({
1020
1021
  };
1021
1022
  const windowWidth = useWindowWidth();
1022
1023
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { 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: [
1024
- " ",
1025
- errorMessageAddingFile.map((errorObj, index) => {
1026
- const errorFileName = errorObj.FileName;
1027
- let mobileFirstFileName = errorObj.FileName.split(".").shift();
1028
- mobileFirstFileName = mobileFirstFileName.length > 8 ? mobileFirstFileName.substring(0, 8) + ".." : mobileFirstFileName;
1029
- const fileType = errorObj.FileName.split(".").pop();
1030
- mobileFirstFileName = mobileFirstFileName + "." + fileType;
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: [
1032
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_bootstrap.Row, { children: [
1033
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_bootstrap.Col, { style: { maxWidth: "30px" }, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1034
- "span",
1024
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { children: [
1025
+ errorMessageAddingFile.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("ul", { "aria-hidden": true, className: "fileListUnorderedList", children: [
1026
+ " ",
1027
+ errorMessageAddingFile.map((errorObj, index) => {
1028
+ const errorFileName = errorObj.FileName;
1029
+ let mobileFirstFileName = errorObj.FileName.split(".").shift();
1030
+ mobileFirstFileName = mobileFirstFileName.length > 8 ? mobileFirstFileName.substring(0, 8) + ".." : mobileFirstFileName;
1031
+ const fileType = errorObj.FileName.split(".").pop();
1032
+ mobileFirstFileName = mobileFirstFileName + "." + fileType;
1033
+ 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: [
1034
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_bootstrap.Row, { children: [
1035
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_bootstrap.Col, { style: { maxWidth: "30px" }, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1036
+ "span",
1037
+ {
1038
+ "aria-hidden": "true",
1039
+ className: (0, import_clsx4.default)("uploadedDot", "uploadFailed"),
1040
+ children: "!"
1041
+ }
1042
+ ) }),
1043
+ /* @__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 }) }),
1044
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_bootstrap.Col, { className: "lastCol" })
1045
+ ] }),
1046
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_bootstrap.Row, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1047
+ import_react_bootstrap.Col,
1035
1048
  {
1036
- "aria-hidden": "true",
1037
- className: (0, import_clsx4.default)("uploadedDot", "uploadFailed"),
1038
- children: "!"
1049
+ style: {
1050
+ width: "100%",
1051
+ color: "#8e0039"
1052
+ },
1053
+ className: "errorMessageAddingFile",
1054
+ ...activatedLanguage === "sv" ? {
1055
+ "aria-label": `${errorFileName} ${errorObj.svMessage}`
1056
+ } : {
1057
+ "aria-label": `${errorFileName} ${errorObj.enMessage}`
1058
+ },
1059
+ children: activatedLanguage === "sv" ? errorObj.svMessage : errorObj.enMessage
1039
1060
  }
1040
1061
  ) }),
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 }) }),
1042
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_bootstrap.Col, { className: "lastCol" })
1043
- ] }),
1044
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_bootstrap.Row, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1045
- import_react_bootstrap.Col,
1046
- {
1047
- style: {
1048
- width: "100%",
1049
- color: "#8e0039"
1050
- },
1051
- className: "errorMessageAddingFile",
1052
- ...activatedLanguage === "sv" ? {
1053
- "aria-label": `${errorFileName} ${errorObj.svMessage}`
1054
- } : {
1055
- "aria-label": `${errorFileName} ${errorObj.enMessage}`
1056
- },
1057
- children: activatedLanguage === "sv" ? errorObj.svMessage : errorObj.enMessage
1058
- }
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
- ),
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" }) })
1076
- ] }, index) }) }) }, `error-${errorObj.FileName}-${index}`) });
1077
- })
1078
- ] }) }),
1062
+ /* @__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" }) })
1063
+ ] }, index) }) }) }, `error-${errorObj.FileName}-${index}`) });
1064
+ })
1065
+ ] }),
1066
+ errorMessageAddingFile.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1067
+ "button",
1068
+ {
1069
+ onClick: removeUploadErrors,
1070
+ className: "errorMessageAddingFile",
1071
+ "aria-label": activatedLanguage === "sv" ? "Ta bort felmeddelande f\xF6r uppladdning av filer" : "Remove error message for file uploads",
1072
+ children: "X"
1073
+ }
1074
+ )
1075
+ ] }),
1079
1076
  questionObject.Files.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("ul", { className: "fileListUnorderedList", "aria-label": "Uppladdade filer", children: questionObject.Files.map((file, index) => {
1080
1077
  const indicatorfileName = file.FileName;
1081
1078
  let mobileFirstFileName = file.FileName.split(".").shift();
@@ -1355,7 +1352,8 @@ var AddFiles = ({
1355
1352
  errorMessageAddingFile,
1356
1353
  activatedLanguage,
1357
1354
  numberOfFiles,
1358
- setNumberOfFiles
1355
+ setNumberOfFiles,
1356
+ removeUploadErrors: handleRemoveErrors
1359
1357
  }
1360
1358
  )
1361
1359
  ] }) }),
package/dist/index.mjs CHANGED
@@ -925,7 +925,8 @@ var SelectedFiles = ({
925
925
  errorMessageAddingFile,
926
926
  activatedLanguage,
927
927
  numberOfFiles,
928
- setNumberOfFiles
928
+ setNumberOfFiles,
929
+ removeUploadErrors
929
930
  }) => {
930
931
  const theDiv = useRef3(null);
931
932
  const remove = (file) => {
@@ -955,62 +956,58 @@ var SelectedFiles = ({
955
956
  };
956
957
  const windowWidth = useWindowWidth();
957
958
  return /* @__PURE__ */ jsxs8(Fragment10, { children: [
958
- /* @__PURE__ */ jsx10("div", { children: errorMessageAddingFile.length > 0 && /* @__PURE__ */ jsxs8("ul", { "aria-hidden": true, className: "fileListUnorderedList", children: [
959
- " ",
960
- errorMessageAddingFile.map((errorObj, index) => {
961
- const errorFileName = errorObj.FileName;
962
- let mobileFirstFileName = errorObj.FileName.split(".").shift();
963
- mobileFirstFileName = mobileFirstFileName.length > 8 ? mobileFirstFileName.substring(0, 8) + ".." : mobileFirstFileName;
964
- const fileType = errorObj.FileName.split(".").pop();
965
- mobileFirstFileName = mobileFirstFileName + "." + fileType;
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: [
968
- /* @__PURE__ */ jsx10(Col, { style: { maxWidth: "30px" }, children: /* @__PURE__ */ jsx10(
969
- "span",
959
+ /* @__PURE__ */ jsxs8("div", { children: [
960
+ errorMessageAddingFile.length > 0 && /* @__PURE__ */ jsxs8("ul", { "aria-hidden": true, className: "fileListUnorderedList", children: [
961
+ " ",
962
+ errorMessageAddingFile.map((errorObj, index) => {
963
+ const errorFileName = errorObj.FileName;
964
+ let mobileFirstFileName = errorObj.FileName.split(".").shift();
965
+ mobileFirstFileName = mobileFirstFileName.length > 8 ? mobileFirstFileName.substring(0, 8) + ".." : mobileFirstFileName;
966
+ const fileType = errorObj.FileName.split(".").pop();
967
+ mobileFirstFileName = mobileFirstFileName + "." + fileType;
968
+ 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: [
969
+ /* @__PURE__ */ jsxs8(Row, { children: [
970
+ /* @__PURE__ */ jsx10(Col, { style: { maxWidth: "30px" }, children: /* @__PURE__ */ jsx10(
971
+ "span",
972
+ {
973
+ "aria-hidden": "true",
974
+ className: clsx4("uploadedDot", "uploadFailed"),
975
+ children: "!"
976
+ }
977
+ ) }),
978
+ /* @__PURE__ */ jsx10(Col, { children: windowWidth < 768 ? /* @__PURE__ */ jsx10("span", { className: "mobileFirstFileName", children: mobileFirstFileName }) : /* @__PURE__ */ jsx10("span", { className: "desktopFileName", children: errorObj.FileName }) }),
979
+ /* @__PURE__ */ jsx10(Col, { className: "lastCol" })
980
+ ] }),
981
+ /* @__PURE__ */ jsx10(Row, { children: /* @__PURE__ */ jsx10(
982
+ Col,
970
983
  {
971
- "aria-hidden": "true",
972
- className: clsx4("uploadedDot", "uploadFailed"),
973
- children: "!"
984
+ style: {
985
+ width: "100%",
986
+ color: "#8e0039"
987
+ },
988
+ className: "errorMessageAddingFile",
989
+ ...activatedLanguage === "sv" ? {
990
+ "aria-label": `${errorFileName} ${errorObj.svMessage}`
991
+ } : {
992
+ "aria-label": `${errorFileName} ${errorObj.enMessage}`
993
+ },
994
+ children: activatedLanguage === "sv" ? errorObj.svMessage : errorObj.enMessage
974
995
  }
975
996
  ) }),
976
- /* @__PURE__ */ jsx10(Col, { children: windowWidth < 768 ? /* @__PURE__ */ jsx10("span", { className: "mobileFirstFileName", children: mobileFirstFileName }) : /* @__PURE__ */ jsx10("span", { className: "desktopFileName", children: errorObj.FileName }) }),
977
- /* @__PURE__ */ jsx10(Col, { className: "lastCol" })
978
- ] }),
979
- /* @__PURE__ */ jsx10(Row, { children: /* @__PURE__ */ jsx10(
980
- Col,
981
- {
982
- style: {
983
- width: "100%",
984
- color: "#8e0039"
985
- },
986
- className: "errorMessageAddingFile",
987
- ...activatedLanguage === "sv" ? {
988
- "aria-label": `${errorFileName} ${errorObj.svMessage}`
989
- } : {
990
- "aria-label": `${errorFileName} ${errorObj.enMessage}`
991
- },
992
- children: activatedLanguage === "sv" ? errorObj.svMessage : errorObj.enMessage
993
- }
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
- ),
1010
- /* @__PURE__ */ jsx10(Row, { style: { marginTop: "12px", marginBottom: "12px" }, children: /* @__PURE__ */ jsx10(Col, { className: "makeSpace" }) })
1011
- ] }, index) }) }) }, `error-${errorObj.FileName}-${index}`) });
1012
- })
1013
- ] }) }),
997
+ /* @__PURE__ */ jsx10(Row, { style: { marginTop: "12px", marginBottom: "12px" }, children: /* @__PURE__ */ jsx10(Col, { className: "makeSpace" }) })
998
+ ] }, index) }) }) }, `error-${errorObj.FileName}-${index}`) });
999
+ })
1000
+ ] }),
1001
+ errorMessageAddingFile.length > 0 && /* @__PURE__ */ jsx10(
1002
+ "button",
1003
+ {
1004
+ onClick: removeUploadErrors,
1005
+ className: "errorMessageAddingFile",
1006
+ "aria-label": activatedLanguage === "sv" ? "Ta bort felmeddelande f\xF6r uppladdning av filer" : "Remove error message for file uploads",
1007
+ children: "X"
1008
+ }
1009
+ )
1010
+ ] }),
1014
1011
  questionObject.Files.length > 0 && /* @__PURE__ */ jsx10("ul", { className: "fileListUnorderedList", "aria-label": "Uppladdade filer", children: questionObject.Files.map((file, index) => {
1015
1012
  const indicatorfileName = file.FileName;
1016
1013
  let mobileFirstFileName = file.FileName.split(".").shift();
@@ -1290,7 +1287,8 @@ var AddFiles = ({
1290
1287
  errorMessageAddingFile,
1291
1288
  activatedLanguage,
1292
1289
  numberOfFiles,
1293
- setNumberOfFiles
1290
+ setNumberOfFiles,
1291
+ removeUploadErrors: handleRemoveErrors
1294
1292
  }
1295
1293
  )
1296
1294
  ] }) }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "optimized-react-component-library-xyz123",
3
- "version": "0.1.57",
3
+ "version": "0.1.58",
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",