optimized-react-component-library-xyz123 2.12.9 → 2.14.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.mjs CHANGED
@@ -24,6 +24,22 @@ var ValidationMessage = ({
24
24
  };
25
25
  var ValidationMessage_default = ValidationMessage;
26
26
 
27
+ // src/helpers/setPreviewAnswerLabel/setPreviewAnswerLabel.ts
28
+ var setPreviewAnswerLabel = (question, activatedLanguage) => {
29
+ var _a;
30
+ if ((question == null ? void 0 : question.answer) && question.answer.length > 0) {
31
+ const language = question.languageSupport.find((lang) => lang.language === activatedLanguage);
32
+ if (language && setPreviewAnswerLabel.length > 0) {
33
+ const answerOption = language.options.find(
34
+ (option) => option.value === question.answer
35
+ );
36
+ return (_a = answerOption.label) != null ? _a : "";
37
+ }
38
+ }
39
+ return "";
40
+ };
41
+ var setPreviewAnswerLabel_default = setPreviewAnswerLabel;
42
+
27
43
  // src/components/input-components/RadioMultipleStandard/RadioMultipleStandard.tsx
28
44
  import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
29
45
  var InputRadio = ({
@@ -87,9 +103,10 @@ var RadioMultipleStandard_default = InputRadio;
87
103
  var PreviewRadio = ({ question, activatedLanguage }) => {
88
104
  var _a, _b;
89
105
  const previewId = `preview-${question.id}`;
106
+ const questionAnswer = setPreviewAnswerLabel_default(question, activatedLanguage);
90
107
  return /* @__PURE__ */ jsxs2(Fragment, { children: [
91
108
  /* @__PURE__ */ jsx2("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
92
- ((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */ jsx2("dd", { className: "pts-radioMultiple-preview pts-root-answer", id: `answer-${previewId}`, children: question.answer }) : /* @__PURE__ */ jsx2(
109
+ ((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */ jsx2("dd", { className: "pts-radioMultiple-preview pts-root-answer", id: `answer-${previewId}`, children: questionAnswer.length > 0 ? questionAnswer : question.answer }) : /* @__PURE__ */ jsx2(
93
110
  "dd",
94
111
  {
95
112
  className: "pts-radioMultiple-preview pts-root-answer no-answer-preview-page",
@@ -1305,7 +1322,6 @@ __export(icons_exports, {
1305
1322
  ChevronRightIcon: () => ChevronRightIcon,
1306
1323
  CloseIcon: () => CloseIcon,
1307
1324
  CollapseIcon: () => CollapseIcon,
1308
- Cookie_icon: () => Cookie_icon,
1309
1325
  ExpandIcon: () => ExpandIcon,
1310
1326
  FileIcon: () => FileIcon,
1311
1327
  LanguageIcon: () => LanguageIcon,
@@ -1891,13 +1907,6 @@ var Logo_en = () => /* @__PURE__ */ jsxs13(
1891
1907
  ]
1892
1908
  }
1893
1909
  );
1894
- var Cookie_icon = () => /* @__PURE__ */ jsx16("svg", { xmlns: "http://www.w3.org/2000/svg", width: "13", height: "16", viewBox: "0 0 13 16", fill: "none", children: /* @__PURE__ */ jsx16(
1895
- "path",
1896
- {
1897
- d: "M4.67907 11.2981H8.32186C8.53419 11.2981 8.71217 11.228 8.85579 11.0878C8.9994 10.9476 9.07121 10.7736 9.07121 10.5658V7.91662C9.07121 7.70938 8.9994 7.53567 8.85579 7.39549C8.71217 7.25532 8.53388 7.18523 8.32093 7.18523H8.16029V6.27892C8.16029 5.82637 8.00243 5.44572 7.68671 5.13697C7.371 4.82882 6.98131 4.67475 6.51764 4.67475C6.05398 4.67475 5.66429 4.82882 5.34857 5.13697C5.03286 5.44511 4.875 5.82576 4.875 6.27892V7.18523H4.67814C4.46581 7.18523 4.28783 7.25532 4.14421 7.39549C4.0006 7.53567 3.92879 7.70938 3.92879 7.91662V10.5658C3.92879 10.7736 4.0006 10.9476 4.14421 11.0878C4.28783 11.228 4.46612 11.2981 4.67907 11.2981ZM5.58907 7.18523V6.27892C5.58907 6.02213 5.67821 5.80673 5.8565 5.63272C6.03479 5.45871 6.25517 5.3717 6.51764 5.3717C6.78012 5.3717 7.00081 5.45871 7.17971 5.63272C7.35862 5.80673 7.44745 6.02213 7.44621 6.27892V7.18523H5.58907ZM6.2335 15.9773C6.14064 15.9622 6.05398 15.9396 5.9735 15.9094C4.14607 15.2296 2.69379 14.0768 1.61664 12.4509C0.5395 10.825 0.000619048 9.06491 0 7.17073V3.289C0 2.97844 0.0906907 2.69869 0.272072 2.44976C0.452834 2.20082 0.687143 2.02047 0.975 1.90869L5.97536 0.0960688C6.15612 0.0320229 6.331 0 6.5 0C6.669 0 6.84419 0.0320229 7.02557 0.0960688L12.025 1.90869C12.3122 2.02107 12.5465 2.20143 12.7279 2.44976C12.9093 2.69869 13 2.97844 13 3.289V7.17073C13 9.06491 12.4614 10.825 11.3843 12.4509C10.3071 14.0768 8.85486 15.2296 7.02743 15.9094C6.94633 15.9396 6.85936 15.9622 6.7665 15.9773C6.67364 15.9924 6.58481 16 6.5 16C6.41519 16 6.32636 15.9924 6.2335 15.9773ZM6.5 15.1463C8.10952 14.6478 9.44048 13.6508 10.4929 12.1554C11.5452 10.66 12.0714 8.99845 12.0714 7.17073V3.27178C12.0714 3.15577 12.0386 3.05124 11.973 2.9582C11.908 2.86515 11.8158 2.79567 11.6963 2.74975L6.69686 0.937125C6.63743 0.912957 6.57181 0.900873 6.5 0.900873C6.42819 0.900873 6.36257 0.912957 6.30314 0.937125L1.30371 2.74975C1.18424 2.79567 1.092 2.86515 1.027 2.9582C0.961381 3.05124 0.928571 3.15577 0.928571 3.27178V7.17073C0.928571 8.99845 1.45476 10.66 2.50714 12.1554C3.55952 13.6508 4.89048 14.6478 6.5 15.1463Z",
1898
- fill: "white"
1899
- }
1900
- ) });
1901
1910
 
1902
1911
  // src/components/layout/AlertInTextStandard/AlertInTextStandard.tsx
1903
1912
  import DOMPurify5 from "dompurify";
@@ -1920,7 +1929,9 @@ import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
1920
1929
  var TextBody = ({ data }) => {
1921
1930
  return /* @__PURE__ */ jsxs15("div", { className: "pts-textBody-container", children: [
1922
1931
  /* @__PURE__ */ jsxs15("div", { className: `${!data.body || !data.linksForMoreInfo || !data.alertInText ? "" : "pts-textbody-createspace"}`, children: [
1923
- data.body && /* @__PURE__ */ jsx18("div", { dangerouslySetInnerHTML: { __html: DOMPurify6.sanitize(data.body) } }),
1932
+ data.body && /* @__PURE__ */ jsx18("div", { dangerouslySetInnerHTML: { __html: DOMPurify6.sanitize(data.body, {
1933
+ ALLOWED_ATTR: ["target", "href", "style"]
1934
+ }) } }),
1924
1935
  data.linksForMoreInfo && data.linksForMoreInfo.length > 1 && /* @__PURE__ */ jsx18("ul", { className: "pts-moreinfo-list", children: data.linksForMoreInfo.map((link, index) => /* @__PURE__ */ jsx18("li", { className: index > 0 ? "notFirstInList" : "", children: /* @__PURE__ */ jsxs15(
1925
1936
  "a",
1926
1937
  {
@@ -2019,10 +2030,10 @@ var InputInfoOnly = ({
2019
2030
  };
2020
2031
  var InfoOnlyStandard_default = InputInfoOnly;
2021
2032
 
2022
- // src/components/input-components/RadioMultipleWithInfo2Standard/RadioMultipleWithInfo2Standard.tsx
2033
+ // src/components/input-components/RadioMultipleWithInfoStandard/RadioMultipleWithInfoStandard.tsx
2023
2034
  import React7 from "react";
2024
2035
 
2025
- // src/components/input-components/RadioMultipleWithInfo2Standard/RadioCollapseItem.tsx
2036
+ // src/components/input-components/RadioMultipleWithInfoStandard/RadioCollapseItem.tsx
2026
2037
  import { useEffect as useEffect7, useState as useState7 } from "react";
2027
2038
  import DOMPurify7 from "dompurify";
2028
2039
  import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
@@ -2048,6 +2059,8 @@ var RadioCollapseItem = ({
2048
2059
  useEffect7(() => {
2049
2060
  if (questionAnswer === value) {
2050
2061
  setIsOpen(true);
2062
+ } else {
2063
+ setIsOpen(false);
2051
2064
  }
2052
2065
  }, [questionAnswer, value]);
2053
2066
  return /* @__PURE__ */ jsx20("div", { className: "pts-radio-option", children: /* @__PURE__ */ jsxs16("div", { className: "pts-radio-collapse", children: [
@@ -2066,7 +2079,7 @@ var RadioCollapseItem = ({
2066
2079
  }
2067
2080
  ),
2068
2081
  /* @__PURE__ */ jsx20("label", { htmlFor: `${groupId}-option-${index}`, id: `${groupId}-label-${index}`, children: label }),
2069
- optionText && optionText.length > 0 && /* @__PURE__ */ jsx20(
2082
+ optionText && optionText.length > 0 && questionAnswer === value && /* @__PURE__ */ jsx20(
2070
2083
  "button",
2071
2084
  {
2072
2085
  className: `pts-radio-collapse-button ${isOpen ? "open" : ""}`,
@@ -2077,7 +2090,7 @@ var RadioCollapseItem = ({
2077
2090
  "aria-controls": contentId,
2078
2091
  "aria-label": buttonLabel,
2079
2092
  "aria-describedby": isOpen ? contentId : void 0,
2080
- children: /* @__PURE__ */ jsx20("span", { className: "pts-open-close-icon", "aria-hidden": "true", children: isOpen ? /* @__PURE__ */ jsx20(CollapseIcon, {}) : /* @__PURE__ */ jsx20(ExpandIcon, {}) })
2093
+ tabIndex: questionAnswer === value ? 0 : -1
2081
2094
  }
2082
2095
  )
2083
2096
  ] }),
@@ -2086,15 +2099,23 @@ var RadioCollapseItem = ({
2086
2099
  {
2087
2100
  className: `pts-radio-collapse-body ${isOpen ? "open" : "hidden"}`,
2088
2101
  id: contentId,
2102
+ hidden: !isOpen,
2089
2103
  role: "region",
2090
2104
  "aria-labelledby": `${groupId}-label-${index}`,
2091
2105
  inert: !isOpen,
2092
2106
  children: /* @__PURE__ */ jsxs16("div", { className: `pts-radio-collapse-content `, children: [
2093
2107
  isOpen && //TODO??
2094
2108
  /* @__PURE__ */ jsx20("span", { className: "sr-only", children: activatedLanguage === "sv" ? `Visar informationstext om svarsalternativet ${label}` : `Displays informational text about the answer option ${label}` }),
2095
- /* @__PURE__ */ jsx20("div", { dangerouslySetInnerHTML: {
2096
- __html: DOMPurify7.sanitize(optionText != null ? optionText : "")
2097
- } })
2109
+ /* @__PURE__ */ jsx20(
2110
+ "div",
2111
+ {
2112
+ dangerouslySetInnerHTML: {
2113
+ __html: DOMPurify7.sanitize(optionText != null ? optionText : "", {
2114
+ ADD_ATTR: ["target", "style"]
2115
+ })
2116
+ }
2117
+ }
2118
+ )
2098
2119
  ] })
2099
2120
  }
2100
2121
  )
@@ -2102,7 +2123,7 @@ var RadioCollapseItem = ({
2102
2123
  };
2103
2124
  var RadioCollapseItem_default = RadioCollapseItem;
2104
2125
 
2105
- // src/components/input-components/RadioMultipleWithInfo2Standard/RadioMultipleWithInfo2Standard.tsx
2126
+ // src/components/input-components/RadioMultipleWithInfoStandard/RadioMultipleWithInfoStandard.tsx
2106
2127
  import { Fragment as Fragment14, jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
2107
2128
  var RadioWithInfo = ({
2108
2129
  question,
@@ -2142,16 +2163,11 @@ var RadioWithInfo = ({
2142
2163
  "aria-invalid": question.hasValidationError ? question.hasValidationError : void 0,
2143
2164
  "aria-describedby": question.hasValidationError ? errorId : void 0,
2144
2165
  children: [
2145
- /* @__PURE__ */ jsxs17("legend", { id: `label-${groupId}`, children: [
2146
- question.questionLabel,
2147
- " ",
2148
- question.isQuestionMandatory && /* @__PURE__ */ jsx21("span", { "aria-hidden": true, className: "pts-root-mandatoryAsterisk", children: "*" })
2149
- ] }),
2150
2166
  groupedOptionArray.map((group, g_index) => {
2151
2167
  var _a2;
2152
2168
  let subId = "subheading-" + g_index;
2153
2169
  return /* @__PURE__ */ jsxs17(React7.Fragment, { children: [
2154
- /* @__PURE__ */ jsx21("p", { className: "pts-radioWithInfo-sub-headline", id: subId, children: group.category }),
2170
+ /* @__PURE__ */ jsx21("legend", { className: "pts-radioWithInfo-sub-headline", id: subId, children: group.category }),
2155
2171
  /* @__PURE__ */ jsx21("div", { role: "group", "aria-labelledby": subId, children: (_a2 = group.items) == null ? void 0 : _a2.map((option, o_index) => {
2156
2172
  var _a3, _b2, _c2, _d, _e;
2157
2173
  index++;
@@ -2186,13 +2202,14 @@ var RadioWithInfo = ({
2186
2202
  ]
2187
2203
  }
2188
2204
  ) }),
2189
- showPreview && /* @__PURE__ */ jsx21(PreviewRadio2, { question })
2205
+ showPreview && /* @__PURE__ */ jsx21(PreviewRadio2, { question, activatedLanguage })
2190
2206
  ] });
2191
2207
  };
2192
- var RadioMultipleWithInfo2Standard_default = RadioWithInfo;
2193
- var PreviewRadio2 = ({ question }) => {
2208
+ var RadioMultipleWithInfoStandard_default = RadioWithInfo;
2209
+ var PreviewRadio2 = ({ question, activatedLanguage }) => {
2194
2210
  var _a, _b;
2195
2211
  const previewId = `preview-${question.id}`;
2212
+ const questionAnswer = setPreviewAnswerLabel_default(question, activatedLanguage);
2196
2213
  return /* @__PURE__ */ jsxs17(Fragment14, { children: [
2197
2214
  /* @__PURE__ */ jsx21("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
2198
2215
  ((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */ jsx21(
@@ -2200,7 +2217,7 @@ var PreviewRadio2 = ({ question }) => {
2200
2217
  {
2201
2218
  className: "pts-radioMultipleWithInfo2-preview pts-root-answer",
2202
2219
  id: `answer-${previewId}`,
2203
- children: question.answer
2220
+ children: questionAnswer.length > 0 ? questionAnswer : question.answer
2204
2221
  }
2205
2222
  ) : /* @__PURE__ */ jsx21(
2206
2223
  "dd",
@@ -2339,16 +2356,17 @@ var CustomDropdownStandard = ({
2339
2356
  ),
2340
2357
  hasOptionInfoText && /* @__PURE__ */ jsx23(OptionTextBody_default, { ...optionTextProps })
2341
2358
  ] }),
2342
- showPreview && /* @__PURE__ */ jsx23(PreviewDropdown, { question })
2359
+ showPreview && /* @__PURE__ */ jsx23(PreviewDropdown, { question, activatedLanguage })
2343
2360
  ] });
2344
2361
  };
2345
2362
  var DropdownStandard_default = CustomDropdownStandard;
2346
- var PreviewDropdown = ({ question, activatedLanguage = "sv" }) => {
2363
+ var PreviewDropdown = ({ question, activatedLanguage }) => {
2347
2364
  var _a, _b;
2348
2365
  const previewId = `preview-${question.id}`;
2366
+ const questionAnswer = setPreviewAnswerLabel_default(question, activatedLanguage);
2349
2367
  return /* @__PURE__ */ jsxs19(Fragment16, { children: [
2350
2368
  /* @__PURE__ */ jsx23("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
2351
- ((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */ jsx23("dd", { className: "pts-dropdown-preview pts-root-answer", id: `answer-${previewId}`, children: question.answer }) : /* @__PURE__ */ jsx23(
2369
+ ((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */ jsx23("dd", { className: "pts-dropdown-preview pts-root-answer", id: `answer-${previewId}`, children: questionAnswer.length > 0 ? questionAnswer : question.answer }) : /* @__PURE__ */ jsx23(
2352
2370
  "dd",
2353
2371
  {
2354
2372
  className: "pts-dropdown-preview pts-root-answer no-answer-preview-page",
@@ -3107,15 +3125,17 @@ var QuestionRenderer = ({
3107
3125
  {
3108
3126
  question,
3109
3127
  handleQuestionInputChange,
3110
- showPreview
3128
+ showPreview,
3129
+ activatedLanguage
3111
3130
  }
3112
3131
  ),
3113
3132
  question.questionType === "RadioWithInfo" && /* @__PURE__ */ jsx24(
3114
- RadioMultipleWithInfo2Standard_default,
3133
+ RadioMultipleWithInfoStandard_default,
3115
3134
  {
3116
3135
  question,
3117
3136
  handleQuestionInputChange,
3118
- showPreview
3137
+ showPreview,
3138
+ activatedLanguage
3119
3139
  }
3120
3140
  ),
3121
3141
  question.questionType === "TextField" && /* @__PURE__ */ jsx24(
@@ -3169,7 +3189,8 @@ var QuestionRenderer = ({
3169
3189
  {
3170
3190
  question,
3171
3191
  handleQuestionInputChange,
3172
- showPreview
3192
+ showPreview,
3193
+ activatedLanguage
3173
3194
  }
3174
3195
  ),
3175
3196
  question.questionType === "InfoOnly" && /* @__PURE__ */ jsx24(
@@ -3363,11 +3384,7 @@ var CookieBanner_default = CookieBanner;
3363
3384
 
3364
3385
  // src/components/layout/FooterStandard/FooterStandard.tsx
3365
3386
  import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
3366
- var Footer = ({
3367
- activatedLanguage = "sv",
3368
- appUsesCookies = false,
3369
- openCookieBanner
3370
- }) => {
3387
+ var Footer = ({ activatedLanguage = "sv" }) => {
3371
3388
  return /* @__PURE__ */ jsxs23("footer", { className: "pts-footer-container", children: [
3372
3389
  /* @__PURE__ */ jsx27("div", { className: "pts-footer-slogan-text-container", children: /* @__PURE__ */ jsx27("p", { className: "pts-footer-slogan-text", children: activatedLanguage === "sv" ? "S\xE4ker och tillg\xE4nglig kommunikation f\xF6r Sverige" : "Secure and accessible communication for Sweden" }) }),
3373
3390
  /* @__PURE__ */ jsxs23("div", { className: "pts-footer-content", children: [
@@ -3436,20 +3453,7 @@ var Footer = ({
3436
3453
  ]
3437
3454
  }
3438
3455
  ) }),
3439
- /* @__PURE__ */ jsx27("li", { children: appUsesCookies ? /* @__PURE__ */ jsxs23(
3440
- "button",
3441
- {
3442
- type: "button",
3443
- "aria-controls": "cookie-banner",
3444
- onClick: openCookieBanner,
3445
- className: "pts-footer-button pts-secondary-button",
3446
- children: [
3447
- /* @__PURE__ */ jsx27("span", { className: "sr-only", children: activatedLanguage === "en" ? "PTS Cookies (opens cookie banner)" : "PTS Kakor (\xF6ppnar kakbanner)" }),
3448
- /* @__PURE__ */ jsx27("span", { "aria-hidden": "true", className: "secondary_icon", children: /* @__PURE__ */ jsx27(Cookie_icon, {}) }),
3449
- /* @__PURE__ */ jsx27("span", { "aria-hidden": "true", children: activatedLanguage === "en" ? "Cookies" : "Kakor" })
3450
- ]
3451
- }
3452
- ) : /* @__PURE__ */ jsxs23(
3456
+ /* @__PURE__ */ jsx27("li", { children: /* @__PURE__ */ jsxs23(
3453
3457
  "a",
3454
3458
  {
3455
3459
  href: activatedLanguage === "en" ? "https://pts.se/en/cookies-eservices" : "https://www.pts.se/kakor-etjanster",
@@ -3879,7 +3883,7 @@ var Header = ({
3879
3883
  "button",
3880
3884
  {
3881
3885
  lang: activatedLanguage === "en" ? "en" : "sv",
3882
- className: "pts-languageButton pts-secondary-button",
3886
+ className: "pts-languageButton",
3883
3887
  onClick: handleLanguageClick,
3884
3888
  children: [
3885
3889
  /* @__PURE__ */ jsx29("div", { className: "languageIcon", children: /* @__PURE__ */ jsx29("span", { "aria-hidden": "true", children: /* @__PURE__ */ jsx29(LanguageIcon2, {}) }) }),
@@ -3927,10 +3931,12 @@ var Navigation = ({
3927
3931
  setOpenSubMenu(null);
3928
3932
  return;
3929
3933
  }
3930
- const defaultOpenSubMenu = activePath == null ? null : (_b = (_a = menuLinks.find((link) => {
3931
- var _a2;
3932
- return (_a2 = link.children) == null ? void 0 : _a2.some((child) => child.href.includes(activePath));
3933
- })) == null ? void 0 : _a.label[activatedLanguage]) != null ? _b : null;
3934
+ const defaultOpenSubMenu = activePath == null ? null : (_b = (_a = menuLinks.find(
3935
+ (link) => {
3936
+ var _a2;
3937
+ return (_a2 = link.children) == null ? void 0 : _a2.some((child) => child.href.includes(activePath));
3938
+ }
3939
+ )) == null ? void 0 : _a.label[activatedLanguage]) != null ? _b : null;
3934
3940
  setOpenSubMenu(defaultOpenSubMenu);
3935
3941
  }, [isOpen, activePath, menuLinks, activatedLanguage]);
3936
3942
  useEffect13(() => {
@@ -4011,7 +4017,7 @@ var Navigation = ({
4011
4017
  /* @__PURE__ */ jsx30("div", { className: "pts-navigation-close-container ", id: "menu-close", children: /* @__PURE__ */ jsxs26(
4012
4018
  "button",
4013
4019
  {
4014
- className: "pts-navigation-close-button pts-secondary-button",
4020
+ className: "pts-navigation-close-button",
4015
4021
  onClick: () => handleMenuClick("close"),
4016
4022
  type: "button",
4017
4023
  children: [
@@ -4027,7 +4033,14 @@ var Navigation = ({
4027
4033
  lang: activatedLanguage,
4028
4034
  children: [
4029
4035
  /* @__PURE__ */ jsx30("div", { children: /* @__PURE__ */ jsxs26("div", { className: "pts-navigation-button", children: [
4030
- /* @__PURE__ */ jsx30("span", { children: href && href.length === 0 ? /* @__PURE__ */ jsx30("span", { children: label[activatedLanguage] }) : /* @__PURE__ */ jsx30(LinkComponent, { onClick: () => handleMenuClick("link"), href, children: label[activatedLanguage] }) }),
4036
+ /* @__PURE__ */ jsx30("span", { children: href && href.length === 0 ? /* @__PURE__ */ jsx30("span", { children: label[activatedLanguage] }) : /* @__PURE__ */ jsx30(
4037
+ LinkComponent,
4038
+ {
4039
+ onClick: () => handleMenuClick("link"),
4040
+ href,
4041
+ children: label[activatedLanguage]
4042
+ }
4043
+ ) }),
4031
4044
  children && /* @__PURE__ */ jsx30(
4032
4045
  "button",
4033
4046
  {
@@ -4050,15 +4063,14 @@ var Navigation = ({
4050
4063
  className: "pts-sub-navigation-container",
4051
4064
  id: "sub-menu-" + index,
4052
4065
  role: "region",
4053
- children: /* @__PURE__ */ jsx30("ul", { className: "pts-sub-navigation-list", lang: activatedLanguage, children: children.map(({ label: label2, href: href2 }, index2) => /* @__PURE__ */ jsx30(
4054
- "li",
4066
+ children: /* @__PURE__ */ jsx30("ul", { className: "pts-sub-navigation-list", lang: activatedLanguage, children: children.map(({ label: label2, href: href2 }, index2) => /* @__PURE__ */ jsx30("li", { className: "pts-sub-navigation-item", lang: activatedLanguage, children: /* @__PURE__ */ jsx30(
4067
+ LinkComponent,
4055
4068
  {
4056
- className: "pts-sub-navigation-item",
4057
- lang: activatedLanguage,
4058
- children: /* @__PURE__ */ jsx30(LinkComponent, { onClick: () => handleMenuClick("link"), href: href2, children: label2[activatedLanguage] })
4059
- },
4060
- "nav-child-" + index2
4061
- )) })
4069
+ onClick: () => handleMenuClick("link"),
4070
+ href: href2,
4071
+ children: label2[activatedLanguage]
4072
+ }
4073
+ ) }, "nav-child-" + index2)) })
4062
4074
  }
4063
4075
  )
4064
4076
  ]
@@ -4125,7 +4137,7 @@ import { Fragment as Fragment21, jsx as jsx33, jsxs as jsxs29 } from "react/jsx-
4125
4137
  var NavigationHeader = ({
4126
4138
  headline = void 0,
4127
4139
  homelink = "",
4128
- //??
4140
+ //??
4129
4141
  activatedLanguage = "sv",
4130
4142
  useLanguage = false,
4131
4143
  useNavigationMenu = true,
@@ -4199,23 +4211,14 @@ var NavigationHeader = ({
4199
4211
  ) }),
4200
4212
  /* @__PURE__ */ jsx33("div", { className: `${hasHeadline ? "pts-navigation-header-headline-container" : ""}`, children: hasHeadline && /* @__PURE__ */ jsx33("div", { className: "pts-site-headline", children: headline }) }),
4201
4213
  /* @__PURE__ */ jsx33("div", { className: "pts-navigation-header-nav-container", children: (useLanguage || useNavigationMenu || useSearch) && /* @__PURE__ */ jsxs29(Fragment21, { children: [
4202
- useSearch && !isMenuOpen && /* @__PURE__ */ jsx33(Fragment21, { children: /* @__PURE__ */ jsxs29(
4203
- "button",
4204
- {
4205
- type: "button",
4206
- className: "pts-secondary-button",
4207
- onClick: handleSearchClick,
4208
- children: [
4209
- /* @__PURE__ */ jsx33("span", { "aria-hidden": "true", className: "pts-navigation-header-icons", children: getSearchIcon() }),
4210
- /* @__PURE__ */ jsx33("span", { className: "pts-navigation-header-button-label", children: getSearchLabel() })
4211
- ]
4212
- }
4213
- ) }),
4214
+ useSearch && !isMenuOpen && /* @__PURE__ */ jsx33(Fragment21, { children: /* @__PURE__ */ jsxs29("button", { type: "button", onClick: handleSearchClick, children: [
4215
+ /* @__PURE__ */ jsx33("span", { "aria-hidden": "true", className: "pts-navigation-header-icons", children: getSearchIcon() }),
4216
+ /* @__PURE__ */ jsx33("span", { className: "pts-navigation-header-button-label", children: getSearchLabel() })
4217
+ ] }) }),
4214
4218
  useLanguage && !isMenuOpen && /* @__PURE__ */ jsxs29(
4215
4219
  "button",
4216
4220
  {
4217
4221
  type: "button",
4218
- className: "pts-secondary-button",
4219
4222
  lang: activatedLanguage === "en" ? "en" : "sv",
4220
4223
  onClick: handleLanguageClick,
4221
4224
  "aria-label": activatedLanguage === "sv" ? "Change language to English" : "\xC4ndra spr\xE5k till svenska",
@@ -4229,20 +4232,12 @@ var NavigationHeader = ({
4229
4232
  "button",
4230
4233
  {
4231
4234
  type: "button",
4232
- className: "pts-secondary-button",
4233
4235
  onClick: handleMenuClick,
4234
4236
  "aria-expanded": isMenuOpen,
4235
4237
  "aria-controls": "main-navigation",
4236
4238
  ref: menuButtonFocusRef,
4237
4239
  children: [
4238
- /* @__PURE__ */ jsx33(
4239
- "span",
4240
- {
4241
- "aria-hidden": "true",
4242
- className: isMenuOpen ? "pts-close-icon" : "pts-open-icon",
4243
- children: getMenuIcon()
4244
- }
4245
- ),
4240
+ /* @__PURE__ */ jsx33("span", { "aria-hidden": "true", className: isMenuOpen ? "pts-close-icon" : "pts-open-icon", children: getMenuIcon() }),
4246
4241
  /* @__PURE__ */ jsx33("span", { className: "pts-navigation-header-button-label", children: getMenuLabel() })
4247
4242
  ]
4248
4243
  }
@@ -4708,7 +4703,7 @@ export {
4708
4703
  QuestionGroup_default as QuestionGroup,
4709
4704
  QuestionRenderer_default as QuestionRenderer,
4710
4705
  RadioMultipleStandard_default as RadioMultipleStandard,
4711
- RadioMultipleWithInfo2Standard_default as RadioMultipleWithInfo2Standard,
4706
+ RadioMultipleWithInfoStandard_default as RadioMultipleWithInfoStandard,
4712
4707
  SearchBarStandard_default as SearchBar,
4713
4708
  SingleCheckboxStandard_default as SingleCheckboxStandard,
4714
4709
  SkipLinkStandard_default as SkipLinkStandard,