optimized-react-component-library-xyz123 0.23.4 → 0.23.5
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 +18 -29
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +62 -73
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -83,14 +83,16 @@ module.exports = __toCommonJS(index_exports);
|
|
|
83
83
|
// src/components/input-components/InfoTextStandard/InfoTextStandard.tsx
|
|
84
84
|
var import_dompurify = __toESM(require("dompurify"));
|
|
85
85
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
86
|
-
var InfoTextStandard = ({ text, value, questionId, activatedLanguage
|
|
87
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
86
|
+
var InfoTextStandard = ({ text, value, questionId, activatedLanguage }) => {
|
|
87
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
88
|
+
"div",
|
|
89
|
+
{
|
|
90
|
+
id: "textinfo-questionId",
|
|
91
|
+
"aria-live": "polite",
|
|
92
|
+
"aria-atomic": "true",
|
|
93
|
+
children: text.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { id: questionId, className: "pts-root-question pts-infoTextdStandard-container", children: [
|
|
94
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "sr-only", children: activatedLanguage === "sv" ? `Information om valt alternativ - ${value}` : `Information about selected alternative - ${value}` }),
|
|
95
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
94
96
|
"div",
|
|
95
97
|
{
|
|
96
98
|
id: questionId,
|
|
@@ -99,10 +101,9 @@ var InfoTextStandard = ({ text, value, questionId, activatedLanguage, showPrevie
|
|
|
99
101
|
}
|
|
100
102
|
}
|
|
101
103
|
)
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
] });
|
|
104
|
+
] })
|
|
105
|
+
}
|
|
106
|
+
);
|
|
106
107
|
};
|
|
107
108
|
var InfoTextStandard_default = InfoTextStandard;
|
|
108
109
|
|
|
@@ -113,7 +114,7 @@ var InputRadio = ({
|
|
|
113
114
|
handleQuestionInputChange,
|
|
114
115
|
showPreview = false
|
|
115
116
|
}) => {
|
|
116
|
-
var _a, _b, _c, _d;
|
|
117
|
+
var _a, _b, _c, _d, _e;
|
|
117
118
|
const questionId = `question-${question.id}`;
|
|
118
119
|
const groupId = `radio-group-${question.id}`;
|
|
119
120
|
const errorId = `error-${question.id}`;
|
|
@@ -169,23 +170,11 @@ var InputRadio = ({
|
|
|
169
170
|
}
|
|
170
171
|
),
|
|
171
172
|
optionsInfoText.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
172
|
-
|
|
173
|
+
InfoTextStandard_default,
|
|
173
174
|
{
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
178
|
-
InfoTextStandard_default,
|
|
179
|
-
{
|
|
180
|
-
text: (_d = (_c = optionsInfoText.find(
|
|
181
|
-
(op) => op.value === question.answer
|
|
182
|
-
)) == null ? void 0 : _c.text) != null ? _d : "",
|
|
183
|
-
value: "",
|
|
184
|
-
showPreview: false,
|
|
185
|
-
questionId,
|
|
186
|
-
showText: true
|
|
187
|
-
}
|
|
188
|
-
)
|
|
175
|
+
text: (_d = (_c = optionsInfoText.find((op) => op.value === question.answer)) == null ? void 0 : _c.text) != null ? _d : "",
|
|
176
|
+
value: (_e = question.answer) != null ? _e : "",
|
|
177
|
+
questionId
|
|
189
178
|
}
|
|
190
179
|
)
|
|
191
180
|
] }),
|