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.mjs CHANGED
@@ -1897,9 +1897,12 @@ import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
1897
1897
  var AlertInTextStandard = ({ content = "" }) => {
1898
1898
  return /* @__PURE__ */ jsxs14("div", { className: "pts-alertInText-container", children: [
1899
1899
  /* @__PURE__ */ jsx17("div", { className: "pts-alertInText-left", children: /* @__PURE__ */ jsx17(AlertInTextIcon, {}) }),
1900
- /* @__PURE__ */ jsx17("div", { className: "pts-alertInText-right", role: "note", children: /* @__PURE__ */ jsx17("div", { dangerouslySetInnerHTML: {
1901
- __html: DOMPurify5.sanitize(content, { ALLOWED_ATTR: ["style", "target", "href"] })
1902
- } }) })
1900
+ /* @__PURE__ */ jsx17("div", { className: "pts-alertInText-right", role: "note", children: /<\/?[a-z][\s\S]*>/i.test(content) ? /* @__PURE__ */ jsx17(
1901
+ "div",
1902
+ {
1903
+ dangerouslySetInnerHTML: { __html: DOMPurify5.sanitize(content) }
1904
+ }
1905
+ ) : /* @__PURE__ */ jsx17("p", { children: content }) })
1903
1906
  ] });
1904
1907
  };
1905
1908
  var AlertInTextStandard_default = AlertInTextStandard;
@@ -2253,7 +2256,7 @@ var OptionTextBody = ({
2253
2256
  id: `${questionOptionTextId}`,
2254
2257
  "aria-atomic": "true"
2255
2258
  },
2256
- children: optionInfoText.length > 0 && /* @__PURE__ */ jsxs18("div", { id: questionOptionTextId + "-placeholder", className: "pts-root-question pts-optionTextBody-container", children: [
2259
+ children: optionInfoText.length > 0 && /* @__PURE__ */ jsxs18("div", { id: questionOptionTextId + "-placeholder", className: "pts-optionTextBody-container", children: [
2257
2260
  /* @__PURE__ */ jsxs18("span", { className: "sr-only", children: [
2258
2261
  selectedLabel,
2259
2262
  `${activatedLanguage === "en" ? `More information about this option` : `Mer information om detta val`}.`
@@ -2308,6 +2311,7 @@ var CustomDropdownStandard = ({
2308
2311
  "aria-required": question.isQuestionMandatory,
2309
2312
  "aria-invalid": question.hasValidationError ? question.hasValidationError : void 0,
2310
2313
  "aria-describedby": describedBy || void 0,
2314
+ className: describedBy === errorId ? "pts-root-question-input-error-border" : "",
2311
2315
  children: [
2312
2316
  /* @__PURE__ */ jsx23("option", { value: "", children: activatedLanguage === "en" ? "Select an option" : "V\xE4lj alternativ" }),
2313
2317
  (_a = question.options) == null ? void 0 : _a.map((option, index) => {
@@ -3174,7 +3178,8 @@ var QuestionRenderer = ({
3174
3178
  {
3175
3179
  question,
3176
3180
  handleQuestionInputChange,
3177
- showPreview
3181
+ showPreview,
3182
+ activatedLanguage
3178
3183
  }
3179
3184
  )
3180
3185
  ] });