optimized-react-component-library-xyz123 0.1.146 → 0.1.148

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
@@ -635,39 +635,31 @@ var SelectedFiles = ({
635
635
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
636
636
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { children: errorMessageAddingFile.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "pts-errorSummary-container pts-addFile-error-container", children: [
637
637
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { "aria-hidden": "true", className: "errorDot", children: "!" }),
638
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "addFile-error-list-container", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
639
- "ul",
640
- {
641
- "aria-hidden": true,
642
- className: "fileListUnorderedList",
643
- id: "errorSummary-ul",
644
- children: [
645
- " ",
646
- errorMessageAddingFile.map((errorObj, index) => {
647
- const errorFileName = errorObj.FileName;
648
- let mobileFirstFileName = errorObj.FileName.split(".").shift();
649
- mobileFirstFileName = mobileFirstFileName.length > 8 ? mobileFirstFileName.substring(0, 8) + ".." : mobileFirstFileName;
650
- const fileType = errorObj.FileName.split(".").pop();
651
- mobileFirstFileName = mobileFirstFileName + "." + fileType;
652
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react5.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "fileInListContainer", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "fileInList", children: [
653
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_bootstrap.Row, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_bootstrap.Col, { children: windowWidth < 768 ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "mobileFirstFileName", children: mobileFirstFileName }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "desktopFileName", children: errorObj.FileName }) }) }),
654
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_bootstrap.Row, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
655
- import_react_bootstrap.Col,
656
- {
657
- className: "errorMessageAddingFile",
658
- ...activatedLanguage === "sv" ? {
659
- "aria-label": `${errorFileName} ${errorObj.svMessage}`
660
- } : {
661
- "aria-label": `${errorFileName} ${errorObj.enMessage}`
662
- },
663
- children: activatedLanguage === "sv" ? errorObj.svMessage : errorObj.enMessage
664
- }
665
- ) })
666
- ] }, index) }) }) }, `error-${errorObj.FileName}-${index}`) });
667
- })
668
- ]
669
- }
670
- ) }),
638
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "addFile-error-list-container", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("ul", { "aria-hidden": true, className: "fileListUnorderedList", id: "errorSummary-ul", children: [
639
+ " ",
640
+ errorMessageAddingFile.map((errorObj, index) => {
641
+ const errorFileName = errorObj.FileName;
642
+ let mobileFirstFileName = errorObj.FileName.split(".").shift();
643
+ mobileFirstFileName = mobileFirstFileName.length > 8 ? mobileFirstFileName.substring(0, 8) + ".." : mobileFirstFileName;
644
+ const fileType = errorObj.FileName.split(".").pop();
645
+ mobileFirstFileName = mobileFirstFileName + "." + fileType;
646
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react5.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "fileInListContainer", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "fileInList", children: [
647
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_bootstrap.Row, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_bootstrap.Col, { children: windowWidth < 768 ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "mobileFirstFileName", children: mobileFirstFileName }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "desktopFileName", children: errorObj.FileName }) }) }),
648
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_bootstrap.Row, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
649
+ import_react_bootstrap.Col,
650
+ {
651
+ className: "errorMessageAddingFile",
652
+ ...activatedLanguage === "sv" ? {
653
+ "aria-label": `${errorFileName} ${errorObj.svMessage}`
654
+ } : {
655
+ "aria-label": `${errorFileName} ${errorObj.enMessage}`
656
+ },
657
+ children: activatedLanguage === "sv" ? errorObj.svMessage : errorObj.enMessage
658
+ }
659
+ ) })
660
+ ] }, index) }) }) }, `error-${errorObj.FileName}-${index}`) });
661
+ })
662
+ ] }) }),
671
663
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "addFile-error-close-button", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
672
664
  "button",
673
665
  {
@@ -675,8 +667,26 @@ var SelectedFiles = ({
675
667
  onClick: () => {
676
668
  removeError();
677
669
  },
678
- "aria-label": activatedLanguage === "sv" ? `St\xE4ng felmeddelandet` : `Close error message`,
679
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M0.75 12.75L12.75 0.75M0.75 0.75L12.75 12.75", stroke: "#8E0039", "stroke-width": "1.5", "stroke-linecap": "round" }) })
670
+ "aria-label": activatedLanguage === "sv" ? `St\xE4ng felmeddelande` : `Close error message`,
671
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
672
+ "svg",
673
+ {
674
+ xmlns: "http://www.w3.org/2000/svg",
675
+ width: "14",
676
+ height: "14",
677
+ viewBox: "0 0 14 14",
678
+ fill: "none",
679
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
680
+ "path",
681
+ {
682
+ d: "M0.75 12.75L12.75 0.75M0.75 0.75L12.75 12.75",
683
+ stroke: "#8E0039",
684
+ "stroke-width": "1.5",
685
+ "stroke-linecap": "round"
686
+ }
687
+ )
688
+ }
689
+ )
680
690
  }
681
691
  ) })
682
692
  ] }) }),
@@ -717,7 +727,8 @@ var SelectedFiles = ({
717
727
  file.FileName,
718
728
  " (",
719
729
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "fileSizeText", children: file.FileSize < 1024 * 1024 ? `${Math.round(file.FileSize / 1024)} kB` : `${(file.FileSize / (1024 * 1024)).toFixed(1)} MB` }),
720
- " )"
730
+ " ",
731
+ ")"
721
732
  ] }) }),
722
733
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_bootstrap.Col, { className: "lastCol", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
723
734
  "button",
@@ -912,7 +923,7 @@ var AddFiles = ({
912
923
  setErrorMessageAddingFile([]);
913
924
  };
914
925
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
915
- !showPreview && visible && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "root-question addFile-question-container", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { role: "group", children: [
926
+ !showPreview && visible && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { role: "group", children: [
916
927
  questionObject.aboutText && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
917
928
  "p",
918
929
  {
@@ -1753,6 +1764,7 @@ var QuestionRenderer_default = QuestionRenderer;
1753
1764
 
1754
1765
  // src/components/question-rendering/QuestionGroup/QuestionGroup.tsx
1755
1766
  var import_react10 = require("react");
1767
+ var import_optimized_react_component_library_xyz123 = require("optimized-react-component-library-xyz123");
1756
1768
  var import_jsx_runtime12 = require("react/jsx-runtime");
1757
1769
  var QuestionGroup = ({
1758
1770
  questions,
@@ -1776,7 +1788,7 @@ var QuestionGroup = ({
1776
1788
  }, [questions]);
1777
1789
  const groupQuestions = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_jsx_runtime12.Fragment, { children: questions.map((question, index) => {
1778
1790
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react10.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1779
- QuestionRenderer_default,
1791
+ import_optimized_react_component_library_xyz123.QuestionRenderer,
1780
1792
  {
1781
1793
  question,
1782
1794
  handleQuestionInputChange,
@@ -1790,7 +1802,7 @@ var QuestionGroup = ({
1790
1802
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1791
1803
  "fieldset",
1792
1804
  {
1793
- className: "pts-root-question-group-fieldset pts-root-question",
1805
+ className: "pts-root-question-group-fieldset",
1794
1806
  "aria-required": firstQuestion.isQuestionMandatory || void 0,
1795
1807
  "aria-invalid": firstQuestion.hasValidationError || void 0,
1796
1808
  "aria-errormessage": firstQuestion.hasValidationError ? `${firstQuestion.id}-error` : void 0,
@@ -2688,7 +2700,7 @@ var EditPreviewLink = ({
2688
2700
  )
2689
2701
  }
2690
2702
  ),
2691
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "pts-edit-step-text", children: activatedLanguage === "en" ? `Edit step ${step.step}` : `Redigera steg ${step.step}` })
2703
+ activatedLanguage === "en" ? `Edit step ${step.step}` : `Redigera steg ${step.step}`
2692
2704
  ]
2693
2705
  }
2694
2706
  ) });