optimized-react-component-library-xyz123 0.19.7 → 0.19.9

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.mjs CHANGED
@@ -910,7 +910,7 @@ var AddFiles = ({
910
910
  const currentFiles = questionObject.files ? questionObject.files : [];
911
911
  const e = {
912
912
  target: {
913
- value: `${currentFiles.length + newFiles.length} files`,
913
+ value: currentFiles.length + newFiles.length > 0 ? `${currentFiles.length + newFiles.length} files` : "",
914
914
  files: [...currentFiles, ...newFiles]
915
915
  }
916
916
  };
@@ -933,68 +933,75 @@ var AddFiles = ({
933
933
  setErrorMessageAddingFile([]);
934
934
  };
935
935
  return /* @__PURE__ */ jsxs9(Fragment11, { children: [
936
- !showPreview && visible && /* @__PURE__ */ jsx11("div", { className: "root-question addFile-question-container", id: `question-${questionObject.id}`, children: /* @__PURE__ */ jsxs9("div", { role: "group", children: [
937
- questionObject.aboutText && /* @__PURE__ */ jsxs9(
938
- "p",
939
- {
940
- id: aboutId,
941
- className: clsx3(
942
- "addFilesMandatory",
943
- questionObject.hasValidationError ? " error" : ""
936
+ !showPreview && visible && /* @__PURE__ */ jsx11(
937
+ "div",
938
+ {
939
+ className: "root-question addFile-question-container",
940
+ id: `question-${questionObject.id}`,
941
+ children: /* @__PURE__ */ jsxs9("div", { role: "group", children: [
942
+ questionObject.aboutText && /* @__PURE__ */ jsxs9(
943
+ "p",
944
+ {
945
+ id: aboutId,
946
+ className: clsx3(
947
+ "addFilesMandatory",
948
+ questionObject.hasValidationError ? " error" : ""
949
+ ),
950
+ children: [
951
+ questionObject.aboutText,
952
+ questionObject.isQuestionMandatory && /* @__PURE__ */ jsxs9("span", { className: "pts-root-mandatoryAsterisk", "aria-label": "Obligatorisk fr\xE5ga", children: [
953
+ " ",
954
+ "*"
955
+ ] })
956
+ ]
957
+ }
944
958
  ),
945
- children: [
946
- questionObject.aboutText,
947
- questionObject.isQuestionMandatory && /* @__PURE__ */ jsxs9("span", { className: "pts-root-mandatoryAsterisk", "aria-label": "Obligatorisk fr\xE5ga", children: [
948
- " ",
949
- "*"
950
- ] })
951
- ]
952
- }
953
- ),
954
- questionObject.hasValidationError && /* @__PURE__ */ jsxs9("div", { className: "pts-root-error error addfileserror", id: errorId, children: [
955
- /* @__PURE__ */ jsx11("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
956
- /* @__PURE__ */ jsx11("span", { className: "sr-only", children: "Valideringsfel" }),
957
- /* @__PURE__ */ jsx11("span", { className: "errorText", children: questionObject.validationDefaultMessesege })
958
- ] }),
959
- /* @__PURE__ */ jsx11(
960
- ExploreFilesStandard_default,
961
- {
962
- FilesSelected: onDrop,
963
- numberOfFiles,
964
- allowedNumberOfFiles,
965
- activatedLanguage,
966
- inputId,
967
- labelId,
968
- aboutId,
969
- errorId,
970
- questionObject,
971
- errorMessageAddingFile,
972
- removeUploadErrors: handleRemoveErrors
973
- }
974
- ),
975
- /* @__PURE__ */ jsx11(
976
- DropFilesStandard_default,
977
- {
978
- FilesSelected: onDrop,
979
- DropFilesText: dropFilesText,
980
- language: activatedLanguage
981
- }
982
- ),
983
- /* @__PURE__ */ jsx11(
984
- SelectedFilesStandard_default,
985
- {
986
- questionObject,
987
- isTouched: handleQuestionInputChange,
988
- removeFile: removeFileFromNumberOfFiles,
989
- removeError,
990
- errorMessageAddingFile,
991
- activatedLanguage,
992
- numberOfFiles,
993
- setNumberOfFiles,
994
- removeUploadErrors: handleRemoveErrors
995
- }
996
- )
997
- ] }) }),
959
+ questionObject.hasValidationError && /* @__PURE__ */ jsxs9("div", { className: "pts-root-error error addfileserror", id: errorId, children: [
960
+ /* @__PURE__ */ jsx11("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
961
+ /* @__PURE__ */ jsx11("span", { className: "sr-only", children: "Valideringsfel" }),
962
+ /* @__PURE__ */ jsx11("span", { className: "errorText", children: questionObject.validationDefaultMessesege })
963
+ ] }),
964
+ /* @__PURE__ */ jsx11(
965
+ ExploreFilesStandard_default,
966
+ {
967
+ FilesSelected: onDrop,
968
+ numberOfFiles,
969
+ allowedNumberOfFiles,
970
+ activatedLanguage,
971
+ inputId,
972
+ labelId,
973
+ aboutId,
974
+ errorId,
975
+ questionObject,
976
+ errorMessageAddingFile,
977
+ removeUploadErrors: handleRemoveErrors
978
+ }
979
+ ),
980
+ /* @__PURE__ */ jsx11(
981
+ DropFilesStandard_default,
982
+ {
983
+ FilesSelected: onDrop,
984
+ DropFilesText: dropFilesText,
985
+ language: activatedLanguage
986
+ }
987
+ ),
988
+ /* @__PURE__ */ jsx11(
989
+ SelectedFilesStandard_default,
990
+ {
991
+ questionObject,
992
+ isTouched: handleQuestionInputChange,
993
+ removeFile: removeFileFromNumberOfFiles,
994
+ removeError,
995
+ errorMessageAddingFile,
996
+ activatedLanguage,
997
+ numberOfFiles,
998
+ setNumberOfFiles,
999
+ removeUploadErrors: handleRemoveErrors
1000
+ }
1001
+ )
1002
+ ] })
1003
+ }
1004
+ ),
998
1005
  showPreview && /* @__PURE__ */ jsx11(PreviewAddFiles, { activatedLanguage, questionObject })
999
1006
  ] });
1000
1007
  };
@@ -2044,7 +2051,7 @@ var CookieBanner_default = CookieBanner;
2044
2051
 
2045
2052
  // src/components/layout/FooterStandard/FooterStandard.tsx
2046
2053
  import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
2047
- var Footer = ({ activatedLanguage = "sv", appUsesCookies = false, openCookieBanner }) => {
2054
+ var Footer = ({ activatedLanguage = "sv" }) => {
2048
2055
  return /* @__PURE__ */ jsxs14("footer", { className: "pts-footer-container", children: [
2049
2056
  /* @__PURE__ */ jsx16("div", { className: "pts-footer-slogan-text-container", children: /* @__PURE__ */ jsx16("p", { className: "pts-footer-slogan-text", children: activatedLanguage === "sv" ? "S\xE4ker och tillg\xE4nglig kommunikation f\xF6r Sverige" : "Secure and accessible communication for Sweden" }) }),
2050
2057
  /* @__PURE__ */ jsxs14("div", { className: "pts-footer-content", children: [
@@ -2113,19 +2120,7 @@ var Footer = ({ activatedLanguage = "sv", appUsesCookies = false, openCookieBann
2113
2120
  ]
2114
2121
  }
2115
2122
  ) }),
2116
- /* @__PURE__ */ jsx16("li", { children: appUsesCookies ? /* @__PURE__ */ jsxs14(
2117
- "button",
2118
- {
2119
- "aria-expanded": "false",
2120
- "aria-controls": "cookie-banner",
2121
- "aria-haspopup": "dialog",
2122
- onClick: openCookieBanner,
2123
- children: [
2124
- /* @__PURE__ */ jsx16("span", { className: "sr-only", children: activatedLanguage === "en" ? "PTS Cookies (opens)" : "PTS Kakor (\xF6ppnas)" }),
2125
- /* @__PURE__ */ jsx16("span", { "aria-hidden": "true", children: activatedLanguage === "en" ? "Cookies" : "Kakor" })
2126
- ]
2127
- }
2128
- ) : /* @__PURE__ */ jsxs14(
2123
+ /* @__PURE__ */ jsx16("li", { children: /* @__PURE__ */ jsxs14(
2129
2124
  "a",
2130
2125
  {
2131
2126
  href: activatedLanguage === "en" ? "https://pts.se/en/cookies-eservices" : "https://www.pts.se/kakor-etjanster",