optimized-react-component-library-xyz123 2.8.21 → 2.8.22
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 +10 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/css/questions.css +0 -1
package/dist/index.js
CHANGED
|
@@ -1985,9 +1985,12 @@ var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
|
1985
1985
|
var AlertInTextStandard = ({ content = "" }) => {
|
|
1986
1986
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "pts-alertInText-container", children: [
|
|
1987
1987
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "pts-alertInText-left", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(AlertInTextIcon, {}) }),
|
|
1988
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "pts-alertInText-right", role: "note", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1989
|
-
|
|
1990
|
-
|
|
1988
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "pts-alertInText-right", role: "note", children: /<\/?[a-z][\s\S]*>/i.test(content) ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1989
|
+
"div",
|
|
1990
|
+
{
|
|
1991
|
+
dangerouslySetInnerHTML: { __html: import_dompurify5.default.sanitize(content) }
|
|
1992
|
+
}
|
|
1993
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: content }) })
|
|
1991
1994
|
] });
|
|
1992
1995
|
};
|
|
1993
1996
|
var AlertInTextStandard_default = AlertInTextStandard;
|
|
@@ -2341,7 +2344,7 @@ var OptionTextBody = ({
|
|
|
2341
2344
|
id: `${questionOptionTextId}`,
|
|
2342
2345
|
"aria-atomic": "true"
|
|
2343
2346
|
},
|
|
2344
|
-
children: optionInfoText.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { id: questionOptionTextId + "-placeholder", className: "pts-
|
|
2347
|
+
children: optionInfoText.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { id: questionOptionTextId + "-placeholder", className: "pts-optionTextBody-container", children: [
|
|
2345
2348
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "sr-only", children: [
|
|
2346
2349
|
selectedLabel,
|
|
2347
2350
|
`${activatedLanguage === "en" ? `More information about this option` : `Mer information om detta val`}.`
|
|
@@ -2396,6 +2399,7 @@ var CustomDropdownStandard = ({
|
|
|
2396
2399
|
"aria-required": question.isQuestionMandatory,
|
|
2397
2400
|
"aria-invalid": question.hasValidationError ? question.hasValidationError : void 0,
|
|
2398
2401
|
"aria-describedby": describedBy || void 0,
|
|
2402
|
+
className: describedBy === errorId ? "pts-root-question-input-error-border" : "",
|
|
2399
2403
|
children: [
|
|
2400
2404
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: "", children: activatedLanguage === "en" ? "Select an option" : "V\xE4lj alternativ" }),
|
|
2401
2405
|
(_a = question.options) == null ? void 0 : _a.map((option, index) => {
|
|
@@ -3259,7 +3263,8 @@ var QuestionRenderer = ({
|
|
|
3259
3263
|
{
|
|
3260
3264
|
question,
|
|
3261
3265
|
handleQuestionInputChange,
|
|
3262
|
-
showPreview
|
|
3266
|
+
showPreview,
|
|
3267
|
+
activatedLanguage
|
|
3263
3268
|
}
|
|
3264
3269
|
)
|
|
3265
3270
|
] });
|