optimized-react-component-library-xyz123 2.8.10 → 2.8.12

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
@@ -1907,7 +1907,7 @@ var TextBody = ({ data }) => {
1907
1907
  return /* @__PURE__ */ jsxs15("div", { className: "pts-textBody-container", children: [
1908
1908
  /* @__PURE__ */ jsxs15("div", { className: `${!data.body || !data.linksForMoreInfo ? "" : "pts-textbody-createspace"}`, children: [
1909
1909
  data.body && /* @__PURE__ */ jsx18("div", { dangerouslySetInnerHTML: { __html: DOMPurify5.sanitize(data.body, {
1910
- ALLOWED_ATTR: ["target", "href"]
1910
+ ALLOWED_ATTR: ["target", "href", "style"]
1911
1911
  }) } }),
1912
1912
  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(
1913
1913
  "a",
@@ -2036,6 +2036,8 @@ var RadioCollapseItem = ({
2036
2036
  useEffect7(() => {
2037
2037
  if (questionAnswer === value) {
2038
2038
  setIsOpen(true);
2039
+ } else {
2040
+ setIsOpen(false);
2039
2041
  }
2040
2042
  }, [questionAnswer, value]);
2041
2043
  return /* @__PURE__ */ jsx20("div", { className: "pts-radio-option", children: /* @__PURE__ */ jsxs16("div", { className: "pts-radio-collapse", children: [
@@ -2054,7 +2056,7 @@ var RadioCollapseItem = ({
2054
2056
  }
2055
2057
  ),
2056
2058
  /* @__PURE__ */ jsx20("label", { htmlFor: `${groupId}-option-${index}`, id: `${groupId}-label-${index}`, children: label }),
2057
- optionText && optionText.length > 0 && /* @__PURE__ */ jsx20(
2059
+ optionText && optionText.length > 0 && questionAnswer === value && /* @__PURE__ */ jsx20(
2058
2060
  "button",
2059
2061
  {
2060
2062
  className: `pts-radio-collapse-button ${isOpen ? "open" : ""}`,
@@ -2065,6 +2067,7 @@ var RadioCollapseItem = ({
2065
2067
  "aria-controls": contentId,
2066
2068
  "aria-label": buttonLabel,
2067
2069
  "aria-describedby": isOpen ? contentId : void 0,
2070
+ tabIndex: questionAnswer === value ? 0 : -1,
2068
2071
  children: /* @__PURE__ */ jsx20("span", { className: "pts-open-close-icon", "aria-hidden": "true", children: isOpen ? /* @__PURE__ */ jsx20(CollapseIcon, {}) : /* @__PURE__ */ jsx20(ExpandIcon, {}) })
2069
2072
  }
2070
2073
  )
@@ -2074,6 +2077,7 @@ var RadioCollapseItem = ({
2074
2077
  {
2075
2078
  className: `pts-radio-collapse-body ${isOpen ? "open" : "hidden"}`,
2076
2079
  id: contentId,
2080
+ hidden: !isOpen,
2077
2081
  role: "region",
2078
2082
  "aria-labelledby": `${groupId}-label-${index}`,
2079
2083
  inert: !isOpen,