optimized-react-component-library-xyz123 0.4.4 → 0.6.1

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,7 +635,6 @@ var ExploreFiles = ({
635
635
  ),
636
636
  "aria-describedby": `${aboutId} ${questionObject.hasValidationError ? errorId : ""}`.trim(),
637
637
  "aria-label": ariaLabelText,
638
- role: "button",
639
638
  children: activatedLanguage === "sv" ? "V\xE4lj fil" : "Choose file"
640
639
  }
641
640
  ),
@@ -1979,10 +1978,12 @@ var QuestionGroup = ({
1979
1978
  showPreview = false,
1980
1979
  markQuestionAsDisplayed
1981
1980
  }) => {
1981
+ var _a;
1982
1982
  if (!questions || questions.length === 0) {
1983
1983
  return null;
1984
1984
  }
1985
1985
  const firstQuestion = questions[0];
1986
+ const groupMandatory = (_a = firstQuestion.validationType) == null ? void 0 : _a.find((e) => e.startsWith("groupCheck-"));
1986
1987
  (0, import_react12.useEffect)(() => {
1987
1988
  questions.forEach((question) => {
1988
1989
  if (question.visible && !question.isDisplayed) {
@@ -2013,7 +2014,10 @@ var QuestionGroup = ({
2013
2014
  "aria-describedby": firstQuestion.hasValidationError ? `${firstQuestion.id}-error` : void 0,
2014
2015
  children: [
2015
2016
  legendLabel && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("legend", { children: [
2016
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "pts-legend", children: legendLabel }),
2017
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "pts-legend", children: [
2018
+ legendLabel,
2019
+ groupMandatory && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { "aria-hidden": true, className: "pts-root-mandatoryAsterisk", children: "*" })
2020
+ ] }),
2017
2021
  firstQuestion.hasValidationError && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "sr-only", children: [
2018
2022
  "Valideringsfel. ",
2019
2023
  firstQuestion.validationDefaultMessesege
@@ -2096,7 +2100,15 @@ var CookieBanner = ({
2096
2100
  ]
2097
2101
  }
2098
2102
  ),
2099
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("a", { href: "www.pts.se", target: "_blank", rel: "noopener noreferrer", children: "Kakor (cookies) p\xE5 pts.se (\xF6ppnas i nytt f\xF6nster)" })
2103
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2104
+ "a",
2105
+ {
2106
+ href: "https://pts.se/om-oss/om-pts.se/kakor-pa-webbplatsen/kakor-pa-pts-e-tjanster/",
2107
+ target: "_blank",
2108
+ rel: "noopener noreferrer",
2109
+ children: "Kakor (cookies) p\xE5 pts.se (\xF6ppnas i nytt f\xF6nster)"
2110
+ }
2111
+ )
2100
2112
  ] }),
2101
2113
  /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "pts-cookieBanner-Buttons", children: [
2102
2114
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { onClick: () => handleCookieChoice(true), children: "Ja, jag samtycker" }),