optimized-react-component-library-xyz123 0.7.2 → 0.8.2

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
@@ -1979,10 +1979,12 @@ var QuestionGroup = ({
1979
1979
  showPreview = false,
1980
1980
  markQuestionAsDisplayed
1981
1981
  }) => {
1982
+ var _a;
1982
1983
  if (!questions || questions.length === 0) {
1983
1984
  return null;
1984
1985
  }
1985
1986
  const firstQuestion = questions[0];
1987
+ const groupMandatory = (_a = firstQuestion.validationType) == null ? void 0 : _a.find((e) => e.startsWith("groupCheck-"));
1986
1988
  (0, import_react12.useEffect)(() => {
1987
1989
  questions.forEach((question) => {
1988
1990
  if (question.visible && !question.isDisplayed) {
@@ -2013,7 +2015,10 @@ var QuestionGroup = ({
2013
2015
  "aria-describedby": firstQuestion.hasValidationError ? `${firstQuestion.id}-error` : void 0,
2014
2016
  children: [
2015
2017
  legendLabel && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("legend", { children: [
2016
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "pts-legend", children: legendLabel }),
2018
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "pts-legend", children: [
2019
+ legendLabel,
2020
+ groupMandatory && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { "aria-hidden": true, className: "pts-root-mandatoryAsterisk", children: "*" })
2021
+ ] }),
2017
2022
  firstQuestion.hasValidationError && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "sr-only", children: [
2018
2023
  "Valideringsfel. ",
2019
2024
  firstQuestion.validationDefaultMessesege
@@ -2096,7 +2101,15 @@ var CookieBanner = ({
2096
2101
  ]
2097
2102
  }
2098
2103
  ),
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)" })
2104
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2105
+ "a",
2106
+ {
2107
+ href: "https://pts.se/om-oss/om-pts.se/kakor-pa-webbplatsen/kakor-pa-pts-e-tjanster/",
2108
+ target: "_blank",
2109
+ rel: "noopener noreferrer",
2110
+ children: "Kakor (cookies) p\xE5 pts.se (\xF6ppnas i nytt f\xF6nster)"
2111
+ }
2112
+ )
2100
2113
  ] }),
2101
2114
  /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "pts-cookieBanner-Buttons", children: [
2102
2115
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { onClick: () => handleCookieChoice(true), children: "Ja, jag samtycker" }),
@@ -2347,7 +2360,7 @@ var Logo_sv = () => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { widt
2347
2360
  fill: "#F0AA1E"
2348
2361
  }
2349
2362
  ),
2350
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M82.2223 18.3335V37.2224", stroke: "black", strokeWidth: "0.8", strokeMiterlimit: "10" })
2363
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M82.2223 18.3335V37.2224", stroke: "currentColor", strokeWidth: "0.8", strokeMiterlimit: "10" })
2351
2364
  ] });
2352
2365
  var Logo_en = () => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { width: "189.0", height: "46.67", viewBox: "0 0 189 46.67", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img", children: [
2353
2366
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
@@ -2364,7 +2377,7 @@ var Logo_en = () => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { widt
2364
2377
  fill: "#F0AA1E"
2365
2378
  }
2366
2379
  ),
2367
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M82.2223 18.3335V37.2224", stroke: "#141414", strokeWidth: "0.8", strokeMiterlimit: "10" }),
2380
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M82.2223 18.3335V37.2224", stroke: "currentColor", strokeWidth: "0.8", strokeMiterlimit: "10" }),
2368
2381
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2369
2382
  "path",
2370
2383
  {
@@ -2610,7 +2623,7 @@ var Header = ({
2610
2623
  onClick: handleLanguageClick,
2611
2624
  children: [
2612
2625
  /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "languageIcon", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(LanguageIcon, {}) }) }),
2613
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { "aria-hidden": "true", className: "pts-languageButton", children: getLanguageLabel() }),
2626
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { "aria-hidden": "true", className: "pts-languageButton-text", children: getLanguageLabel() }),
2614
2627
  activatedLanguage === "en" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "sr-only", children: "\xC4ndra spr\xE5k till svenska" }),
2615
2628
  activatedLanguage === "sv" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "sr-only", children: "Change language to English" })
2616
2629
  ]