optimized-react-component-library-xyz123 0.22.2 → 0.22.3

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 CHANGED
@@ -87,15 +87,15 @@ var InputRadio = ({
87
87
  handleQuestionInputChange,
88
88
  showPreview = false
89
89
  }) => {
90
- var _a;
90
+ var _a, _b;
91
91
  const questionId = `question-${question.id}`;
92
92
  const groupId = `radio-group-${question.id}`;
93
93
  const errorId = `error-${question.id}`;
94
- let optionsInfoText = [];
95
94
  const languageObj = question.languageSupport[0];
95
+ let optionsInfoText = [];
96
96
  if ("optionsInfoText" in languageObj) {
97
97
  optionsInfoText.push(languageObj.optionsInfoText);
98
- console.log(languageObj.optionsInfoText);
98
+ console.log(languageObj.optionsInfoText, question);
99
99
  }
100
100
  const handleInputChange = (event) => {
101
101
  const e = { target: { value: event.target.value } };
@@ -139,12 +139,15 @@ var InputRadio = ({
139
139
  ]
140
140
  }
141
141
  ),
142
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
142
+ optionsInfoText.length && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
143
143
  "div",
144
144
  {
145
145
  id: "textinfo-option3",
146
146
  "aria-live": "polite",
147
- "aria-atomic": "true"
147
+ "aria-atomic": "true",
148
+ children: (_b = optionsInfoText.find(
149
+ (op) => op.value === question.answer
150
+ )) == null ? void 0 : _b.text
148
151
  }
149
152
  )
150
153
  ] }),