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.d.mts CHANGED
@@ -733,8 +733,6 @@ declare const CookieBanner: React$1.FC<CookieBannerProps>;
733
733
 
734
734
  interface FooterProps {
735
735
  activatedLanguage?: string;
736
- appUsesCookies?: boolean;
737
- openCookieBanner?: () => void;
738
736
  }
739
737
 
740
738
  declare const Footer: FC<FooterProps>;
package/dist/index.d.ts CHANGED
@@ -733,8 +733,6 @@ declare const CookieBanner: React$1.FC<CookieBannerProps>;
733
733
 
734
734
  interface FooterProps {
735
735
  activatedLanguage?: string;
736
- appUsesCookies?: boolean;
737
- openCookieBanner?: () => void;
738
736
  }
739
737
 
740
738
  declare const Footer: FC<FooterProps>;
package/dist/index.js CHANGED
@@ -992,7 +992,7 @@ var AddFiles = ({
992
992
  const currentFiles = questionObject.files ? questionObject.files : [];
993
993
  const e = {
994
994
  target: {
995
- value: `${currentFiles.length + newFiles.length} files`,
995
+ value: currentFiles.length + newFiles.length > 0 ? `${currentFiles.length + newFiles.length} files` : "",
996
996
  files: [...currentFiles, ...newFiles]
997
997
  }
998
998
  };
@@ -1015,68 +1015,75 @@ var AddFiles = ({
1015
1015
  setErrorMessageAddingFile([]);
1016
1016
  };
1017
1017
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
1018
- !showPreview && visible && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "root-question addFile-question-container", id: `question-${questionObject.id}`, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { role: "group", children: [
1019
- questionObject.aboutText && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1020
- "p",
1021
- {
1022
- id: aboutId,
1023
- className: (0, import_clsx3.default)(
1024
- "addFilesMandatory",
1025
- questionObject.hasValidationError ? " error" : ""
1018
+ !showPreview && visible && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1019
+ "div",
1020
+ {
1021
+ className: "root-question addFile-question-container",
1022
+ id: `question-${questionObject.id}`,
1023
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { role: "group", children: [
1024
+ questionObject.aboutText && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1025
+ "p",
1026
+ {
1027
+ id: aboutId,
1028
+ className: (0, import_clsx3.default)(
1029
+ "addFilesMandatory",
1030
+ questionObject.hasValidationError ? " error" : ""
1031
+ ),
1032
+ children: [
1033
+ questionObject.aboutText,
1034
+ questionObject.isQuestionMandatory && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "pts-root-mandatoryAsterisk", "aria-label": "Obligatorisk fr\xE5ga", children: [
1035
+ " ",
1036
+ "*"
1037
+ ] })
1038
+ ]
1039
+ }
1026
1040
  ),
1027
- children: [
1028
- questionObject.aboutText,
1029
- questionObject.isQuestionMandatory && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "pts-root-mandatoryAsterisk", "aria-label": "Obligatorisk fr\xE5ga", children: [
1030
- " ",
1031
- "*"
1032
- ] })
1033
- ]
1034
- }
1035
- ),
1036
- questionObject.hasValidationError && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "pts-root-error error addfileserror", id: errorId, children: [
1037
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
1038
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "sr-only", children: "Valideringsfel" }),
1039
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "errorText", children: questionObject.validationDefaultMessesege })
1040
- ] }),
1041
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1042
- ExploreFilesStandard_default,
1043
- {
1044
- FilesSelected: onDrop,
1045
- numberOfFiles,
1046
- allowedNumberOfFiles,
1047
- activatedLanguage,
1048
- inputId,
1049
- labelId,
1050
- aboutId,
1051
- errorId,
1052
- questionObject,
1053
- errorMessageAddingFile,
1054
- removeUploadErrors: handleRemoveErrors
1055
- }
1056
- ),
1057
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1058
- DropFilesStandard_default,
1059
- {
1060
- FilesSelected: onDrop,
1061
- DropFilesText: dropFilesText,
1062
- language: activatedLanguage
1063
- }
1064
- ),
1065
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1066
- SelectedFilesStandard_default,
1067
- {
1068
- questionObject,
1069
- isTouched: handleQuestionInputChange,
1070
- removeFile: removeFileFromNumberOfFiles,
1071
- removeError,
1072
- errorMessageAddingFile,
1073
- activatedLanguage,
1074
- numberOfFiles,
1075
- setNumberOfFiles,
1076
- removeUploadErrors: handleRemoveErrors
1077
- }
1078
- )
1079
- ] }) }),
1041
+ questionObject.hasValidationError && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "pts-root-error error addfileserror", id: errorId, children: [
1042
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
1043
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "sr-only", children: "Valideringsfel" }),
1044
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "errorText", children: questionObject.validationDefaultMessesege })
1045
+ ] }),
1046
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1047
+ ExploreFilesStandard_default,
1048
+ {
1049
+ FilesSelected: onDrop,
1050
+ numberOfFiles,
1051
+ allowedNumberOfFiles,
1052
+ activatedLanguage,
1053
+ inputId,
1054
+ labelId,
1055
+ aboutId,
1056
+ errorId,
1057
+ questionObject,
1058
+ errorMessageAddingFile,
1059
+ removeUploadErrors: handleRemoveErrors
1060
+ }
1061
+ ),
1062
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1063
+ DropFilesStandard_default,
1064
+ {
1065
+ FilesSelected: onDrop,
1066
+ DropFilesText: dropFilesText,
1067
+ language: activatedLanguage
1068
+ }
1069
+ ),
1070
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1071
+ SelectedFilesStandard_default,
1072
+ {
1073
+ questionObject,
1074
+ isTouched: handleQuestionInputChange,
1075
+ removeFile: removeFileFromNumberOfFiles,
1076
+ removeError,
1077
+ errorMessageAddingFile,
1078
+ activatedLanguage,
1079
+ numberOfFiles,
1080
+ setNumberOfFiles,
1081
+ removeUploadErrors: handleRemoveErrors
1082
+ }
1083
+ )
1084
+ ] })
1085
+ }
1086
+ ),
1080
1087
  showPreview && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PreviewAddFiles, { activatedLanguage, questionObject })
1081
1088
  ] });
1082
1089
  };
@@ -2123,7 +2130,7 @@ var CookieBanner_default = CookieBanner;
2123
2130
 
2124
2131
  // src/components/layout/FooterStandard/FooterStandard.tsx
2125
2132
  var import_jsx_runtime16 = require("react/jsx-runtime");
2126
- var Footer = ({ activatedLanguage = "sv", appUsesCookies = false, openCookieBanner }) => {
2133
+ var Footer = ({ activatedLanguage = "sv" }) => {
2127
2134
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("footer", { className: "pts-footer-container", children: [
2128
2135
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "pts-footer-slogan-text-container", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "pts-footer-slogan-text", children: activatedLanguage === "sv" ? "S\xE4ker och tillg\xE4nglig kommunikation f\xF6r Sverige" : "Secure and accessible communication for Sweden" }) }),
2129
2136
  /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "pts-footer-content", children: [
@@ -2192,19 +2199,7 @@ var Footer = ({ activatedLanguage = "sv", appUsesCookies = false, openCookieBann
2192
2199
  ]
2193
2200
  }
2194
2201
  ) }),
2195
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("li", { children: appUsesCookies ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
2196
- "button",
2197
- {
2198
- "aria-expanded": "false",
2199
- "aria-controls": "cookie-banner",
2200
- "aria-haspopup": "dialog",
2201
- onClick: openCookieBanner,
2202
- children: [
2203
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "sr-only", children: activatedLanguage === "en" ? "PTS Cookies (opens)" : "PTS Kakor (\xF6ppnas)" }),
2204
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { "aria-hidden": "true", children: activatedLanguage === "en" ? "Cookies" : "Kakor" })
2205
- ]
2206
- }
2207
- ) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
2202
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
2208
2203
  "a",
2209
2204
  {
2210
2205
  href: activatedLanguage === "en" ? "https://pts.se/en/cookies-eservices" : "https://www.pts.se/kakor-etjanster",