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.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1993,7 +1993,7 @@ var TextBody = ({ data }) => {
|
|
|
1993
1993
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "pts-textBody-container", children: [
|
|
1994
1994
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: `${!data.body || !data.linksForMoreInfo ? "" : "pts-textbody-createspace"}`, children: [
|
|
1995
1995
|
data.body && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { dangerouslySetInnerHTML: { __html: import_dompurify5.default.sanitize(data.body, {
|
|
1996
|
-
ALLOWED_ATTR: ["target", "href"]
|
|
1996
|
+
ALLOWED_ATTR: ["target", "href", "style"]
|
|
1997
1997
|
}) } }),
|
|
1998
1998
|
data.linksForMoreInfo && data.linksForMoreInfo.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { className: "pts-moreinfo-list", children: data.linksForMoreInfo.map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("li", { className: index > 0 ? "notFirstInList" : "", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1999
1999
|
"a",
|
|
@@ -2122,6 +2122,8 @@ var RadioCollapseItem = ({
|
|
|
2122
2122
|
(0, import_react10.useEffect)(() => {
|
|
2123
2123
|
if (questionAnswer === value) {
|
|
2124
2124
|
setIsOpen(true);
|
|
2125
|
+
} else {
|
|
2126
|
+
setIsOpen(false);
|
|
2125
2127
|
}
|
|
2126
2128
|
}, [questionAnswer, value]);
|
|
2127
2129
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "pts-radio-option", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "pts-radio-collapse", children: [
|
|
@@ -2140,7 +2142,7 @@ var RadioCollapseItem = ({
|
|
|
2140
2142
|
}
|
|
2141
2143
|
),
|
|
2142
2144
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("label", { htmlFor: `${groupId}-option-${index}`, id: `${groupId}-label-${index}`, children: label }),
|
|
2143
|
-
optionText && optionText.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2145
|
+
optionText && optionText.length > 0 && questionAnswer === value && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2144
2146
|
"button",
|
|
2145
2147
|
{
|
|
2146
2148
|
className: `pts-radio-collapse-button ${isOpen ? "open" : ""}`,
|
|
@@ -2151,6 +2153,7 @@ var RadioCollapseItem = ({
|
|
|
2151
2153
|
"aria-controls": contentId,
|
|
2152
2154
|
"aria-label": buttonLabel,
|
|
2153
2155
|
"aria-describedby": isOpen ? contentId : void 0,
|
|
2156
|
+
tabIndex: questionAnswer === value ? 0 : -1,
|
|
2154
2157
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "pts-open-close-icon", "aria-hidden": "true", children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CollapseIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ExpandIcon, {}) })
|
|
2155
2158
|
}
|
|
2156
2159
|
)
|
|
@@ -2160,6 +2163,7 @@ var RadioCollapseItem = ({
|
|
|
2160
2163
|
{
|
|
2161
2164
|
className: `pts-radio-collapse-body ${isOpen ? "open" : "hidden"}`,
|
|
2162
2165
|
id: contentId,
|
|
2166
|
+
hidden: !isOpen,
|
|
2163
2167
|
role: "region",
|
|
2164
2168
|
"aria-labelledby": `${groupId}-label-${index}`,
|
|
2165
2169
|
inert: !isOpen,
|