optimized-react-component-library-xyz123 0.1.37 → 0.1.39
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 +26 -30
- package/dist/index.mjs +26 -30
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -118,10 +118,10 @@ var RadioMultipleStandard_default = InputRadio;
|
|
|
118
118
|
var PreviewRadio = ({ question }) => {
|
|
119
119
|
var _a, _b;
|
|
120
120
|
const previewId = `preview-${question.id}`;
|
|
121
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.
|
|
122
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("
|
|
123
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("
|
|
124
|
-
] })
|
|
121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
122
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
|
|
123
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { className: "pts-radioMultiple-preview pts-root-answer", id: `answer-${previewId}`, children: ((_b = question.answer) == null ? void 0 : _b.trim()) ? question.answer : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "no-answer-preview-page", children: "Inget svar" }) })
|
|
124
|
+
] });
|
|
125
125
|
};
|
|
126
126
|
|
|
127
127
|
// src/NewInputComponentStandard/MultipleCheckboxesStandard/MultipleCheckboxesStandard.tsx
|
|
@@ -158,7 +158,7 @@ var MultipleCheckboxes = ({
|
|
|
158
158
|
};
|
|
159
159
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
160
160
|
!showPreview && question.visible && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { id: questionId, className: "pts-root-question pts-multipleCheckboxes-container", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("section", { role: "group", "aria-labelledby": `label-${questionId}`, children: [
|
|
161
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("
|
|
161
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("h3", { id: `label-${questionId}`, children: [
|
|
162
162
|
question.questionLabel,
|
|
163
163
|
" ",
|
|
164
164
|
question.isQuestionMandatory && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { "aria-hidden": true, className: "pts-root-mandatoryAsterisk", children: "*" }),
|
|
@@ -193,20 +193,16 @@ var PrevieMultipleCheckboxes = ({
|
|
|
193
193
|
}) => {
|
|
194
194
|
var _a, _b;
|
|
195
195
|
const previewId = `preview-${question.id}`;
|
|
196
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.
|
|
197
|
-
"
|
|
198
|
-
{
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
}).map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("li", { children: option.label }, index)) }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "no-answer-preview-page", children: activatedLanguage === "en" ? "No Answer" : "Inget svar" }) })
|
|
207
|
-
]
|
|
208
|
-
}
|
|
209
|
-
) });
|
|
196
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
197
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
|
|
198
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("dd", { className: "pts-multipleCheckboxes-preview pts-root-answer", id: `answer-${previewId}`, children: [
|
|
199
|
+
question.answer ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("ul", { "aria-labelledby": previewId, children: (_b = question.options) == null ? void 0 : _b.filter((option) => {
|
|
200
|
+
var _a2;
|
|
201
|
+
return (_a2 = question.answer) == null ? void 0 : _a2.includes(option.label);
|
|
202
|
+
}).map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("li", { children: option.label }, index)) }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "no-answer-preview-page", children: activatedLanguage === "en" ? "No Answer" : "Inget svar" }),
|
|
203
|
+
" "
|
|
204
|
+
] })
|
|
205
|
+
] });
|
|
210
206
|
};
|
|
211
207
|
|
|
212
208
|
// src/NewInputComponentStandard/TextAreaStandard/TextAreaStandard.tsx
|
|
@@ -256,7 +252,7 @@ var InputTextarea = ({
|
|
|
256
252
|
"aria-required": question.isQuestionMandatory,
|
|
257
253
|
"aria-invalid": question.hasValidationError,
|
|
258
254
|
maxLength: ((_a = question.questionExtraAttribute) == null ? void 0 : _a.answerMaxLength) || defaultMaxLength,
|
|
259
|
-
"aria-describedby":
|
|
255
|
+
"aria-describedby": [question.aboutText ? aboutId : null, question.hasValidationError ? errorId : null].filter(Boolean).join(" ") || void 0,
|
|
260
256
|
id: inputId
|
|
261
257
|
}
|
|
262
258
|
),
|
|
@@ -292,10 +288,10 @@ var PreviewTextarea = ({
|
|
|
292
288
|
}) => {
|
|
293
289
|
var _a, _b;
|
|
294
290
|
const previewId = `preview-${question.id}`;
|
|
295
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.
|
|
296
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("
|
|
297
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("
|
|
298
|
-
] })
|
|
291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
292
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
|
|
293
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dd", { className: "pts-textArea-preview pts-root-answer", id: `answer-${previewId}`, children: ((_b = question.answer) == null ? void 0 : _b.trim()) ? question.answer : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "no-answer-preview-page", children: activatedLanguage === "en" ? "No Answer" : "Inget svar" }) })
|
|
294
|
+
] });
|
|
299
295
|
};
|
|
300
296
|
|
|
301
297
|
// src/NewInputComponentStandard/TextFieldStandard/TextFieldStandard.tsx
|
|
@@ -349,7 +345,7 @@ var TextFieldStandard = ({
|
|
|
349
345
|
disabled: (_g = question.questionExtraAttribute) == null ? void 0 : _g.disabled,
|
|
350
346
|
required: question.isQuestionMandatory,
|
|
351
347
|
"aria-required": question.isQuestionMandatory,
|
|
352
|
-
"aria-describedby":
|
|
348
|
+
"aria-describedby": [question.aboutText ? aboutId : null, question.hasValidationError ? errorId : null].filter(Boolean).join(" ") || void 0,
|
|
353
349
|
"aria-invalid": question.hasValidationError,
|
|
354
350
|
"aria-errormessage": question.hasValidationError ? errorId : void 0
|
|
355
351
|
}
|
|
@@ -371,10 +367,10 @@ var PreviewTextField = ({
|
|
|
371
367
|
}) => {
|
|
372
368
|
var _a, _b;
|
|
373
369
|
const previewId = `preview-${question.id}`;
|
|
374
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.
|
|
375
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("
|
|
376
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("
|
|
377
|
-
] })
|
|
370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
371
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
|
|
372
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("dd", { className: "pts-textField-preview pts-root-answer", id: `answer-${previewId}`, children: ((_b = question.answer) == null ? void 0 : _b.trim()) ? question.answer : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "no-answer-preview-page", children: activatedLanguage === "en" ? "No Answer" : "Inget svar" }) })
|
|
373
|
+
] });
|
|
378
374
|
};
|
|
379
375
|
|
|
380
376
|
// src/NewInputComponentStandard/FilesUploadStandard/FilesUploadStandard.tsx
|
|
@@ -1226,7 +1222,7 @@ var Footer = ({ activatedLanguage = "sv" }) => {
|
|
|
1226
1222
|
}
|
|
1227
1223
|
),
|
|
1228
1224
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1229
|
-
"
|
|
1225
|
+
"nav",
|
|
1230
1226
|
{
|
|
1231
1227
|
className: "pts-footer-linkList",
|
|
1232
1228
|
"aria-label": activatedLanguage === "en" ? "Footer navigation" : "Sidfotsnavigering",
|
package/dist/index.mjs
CHANGED
|
@@ -54,10 +54,10 @@ var RadioMultipleStandard_default = InputRadio;
|
|
|
54
54
|
var PreviewRadio = ({ question }) => {
|
|
55
55
|
var _a, _b;
|
|
56
56
|
const previewId = `preview-${question.id}`;
|
|
57
|
-
return /* @__PURE__ */
|
|
58
|
-
/* @__PURE__ */ jsx("
|
|
59
|
-
/* @__PURE__ */ jsx("
|
|
60
|
-
] })
|
|
57
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
58
|
+
/* @__PURE__ */ jsx("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
|
|
59
|
+
/* @__PURE__ */ jsx("dd", { className: "pts-radioMultiple-preview pts-root-answer", id: `answer-${previewId}`, children: ((_b = question.answer) == null ? void 0 : _b.trim()) ? question.answer : /* @__PURE__ */ jsx("span", { className: "no-answer-preview-page", children: "Inget svar" }) })
|
|
60
|
+
] });
|
|
61
61
|
};
|
|
62
62
|
|
|
63
63
|
// src/NewInputComponentStandard/MultipleCheckboxesStandard/MultipleCheckboxesStandard.tsx
|
|
@@ -94,7 +94,7 @@ var MultipleCheckboxes = ({
|
|
|
94
94
|
};
|
|
95
95
|
return /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
96
96
|
!showPreview && question.visible && /* @__PURE__ */ jsx2("div", { id: questionId, className: "pts-root-question pts-multipleCheckboxes-container", children: /* @__PURE__ */ jsxs2("section", { role: "group", "aria-labelledby": `label-${questionId}`, children: [
|
|
97
|
-
/* @__PURE__ */ jsxs2("
|
|
97
|
+
/* @__PURE__ */ jsxs2("h3", { id: `label-${questionId}`, children: [
|
|
98
98
|
question.questionLabel,
|
|
99
99
|
" ",
|
|
100
100
|
question.isQuestionMandatory && /* @__PURE__ */ jsx2("span", { "aria-hidden": true, className: "pts-root-mandatoryAsterisk", children: "*" }),
|
|
@@ -129,20 +129,16 @@ var PrevieMultipleCheckboxes = ({
|
|
|
129
129
|
}) => {
|
|
130
130
|
var _a, _b;
|
|
131
131
|
const previewId = `preview-${question.id}`;
|
|
132
|
-
return /* @__PURE__ */
|
|
133
|
-
"
|
|
134
|
-
{
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}).map((option, index) => /* @__PURE__ */ jsx2("li", { children: option.label }, index)) }) : /* @__PURE__ */ jsx2("span", { className: "no-answer-preview-page", children: activatedLanguage === "en" ? "No Answer" : "Inget svar" }) })
|
|
143
|
-
]
|
|
144
|
-
}
|
|
145
|
-
) });
|
|
132
|
+
return /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
133
|
+
/* @__PURE__ */ jsx2("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
|
|
134
|
+
/* @__PURE__ */ jsxs2("dd", { className: "pts-multipleCheckboxes-preview pts-root-answer", id: `answer-${previewId}`, children: [
|
|
135
|
+
question.answer ? /* @__PURE__ */ jsx2("ul", { "aria-labelledby": previewId, children: (_b = question.options) == null ? void 0 : _b.filter((option) => {
|
|
136
|
+
var _a2;
|
|
137
|
+
return (_a2 = question.answer) == null ? void 0 : _a2.includes(option.label);
|
|
138
|
+
}).map((option, index) => /* @__PURE__ */ jsx2("li", { children: option.label }, index)) }) : /* @__PURE__ */ jsx2("span", { className: "no-answer-preview-page", children: activatedLanguage === "en" ? "No Answer" : "Inget svar" }),
|
|
139
|
+
" "
|
|
140
|
+
] })
|
|
141
|
+
] });
|
|
146
142
|
};
|
|
147
143
|
|
|
148
144
|
// src/NewInputComponentStandard/TextAreaStandard/TextAreaStandard.tsx
|
|
@@ -192,7 +188,7 @@ var InputTextarea = ({
|
|
|
192
188
|
"aria-required": question.isQuestionMandatory,
|
|
193
189
|
"aria-invalid": question.hasValidationError,
|
|
194
190
|
maxLength: ((_a = question.questionExtraAttribute) == null ? void 0 : _a.answerMaxLength) || defaultMaxLength,
|
|
195
|
-
"aria-describedby":
|
|
191
|
+
"aria-describedby": [question.aboutText ? aboutId : null, question.hasValidationError ? errorId : null].filter(Boolean).join(" ") || void 0,
|
|
196
192
|
id: inputId
|
|
197
193
|
}
|
|
198
194
|
),
|
|
@@ -228,10 +224,10 @@ var PreviewTextarea = ({
|
|
|
228
224
|
}) => {
|
|
229
225
|
var _a, _b;
|
|
230
226
|
const previewId = `preview-${question.id}`;
|
|
231
|
-
return /* @__PURE__ */
|
|
232
|
-
/* @__PURE__ */ jsx3("
|
|
233
|
-
/* @__PURE__ */ jsx3("
|
|
234
|
-
] })
|
|
227
|
+
return /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
228
|
+
/* @__PURE__ */ jsx3("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
|
|
229
|
+
/* @__PURE__ */ jsx3("dd", { className: "pts-textArea-preview pts-root-answer", id: `answer-${previewId}`, children: ((_b = question.answer) == null ? void 0 : _b.trim()) ? question.answer : /* @__PURE__ */ jsx3("span", { className: "no-answer-preview-page", children: activatedLanguage === "en" ? "No Answer" : "Inget svar" }) })
|
|
230
|
+
] });
|
|
235
231
|
};
|
|
236
232
|
|
|
237
233
|
// src/NewInputComponentStandard/TextFieldStandard/TextFieldStandard.tsx
|
|
@@ -285,7 +281,7 @@ var TextFieldStandard = ({
|
|
|
285
281
|
disabled: (_g = question.questionExtraAttribute) == null ? void 0 : _g.disabled,
|
|
286
282
|
required: question.isQuestionMandatory,
|
|
287
283
|
"aria-required": question.isQuestionMandatory,
|
|
288
|
-
"aria-describedby":
|
|
284
|
+
"aria-describedby": [question.aboutText ? aboutId : null, question.hasValidationError ? errorId : null].filter(Boolean).join(" ") || void 0,
|
|
289
285
|
"aria-invalid": question.hasValidationError,
|
|
290
286
|
"aria-errormessage": question.hasValidationError ? errorId : void 0
|
|
291
287
|
}
|
|
@@ -307,10 +303,10 @@ var PreviewTextField = ({
|
|
|
307
303
|
}) => {
|
|
308
304
|
var _a, _b;
|
|
309
305
|
const previewId = `preview-${question.id}`;
|
|
310
|
-
return /* @__PURE__ */
|
|
311
|
-
/* @__PURE__ */ jsx4("
|
|
312
|
-
/* @__PURE__ */ jsx4("
|
|
313
|
-
] })
|
|
306
|
+
return /* @__PURE__ */ jsxs4(Fragment4, { children: [
|
|
307
|
+
/* @__PURE__ */ jsx4("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
|
|
308
|
+
/* @__PURE__ */ jsx4("dd", { className: "pts-textField-preview pts-root-answer", id: `answer-${previewId}`, children: ((_b = question.answer) == null ? void 0 : _b.trim()) ? question.answer : /* @__PURE__ */ jsx4("span", { className: "no-answer-preview-page", children: activatedLanguage === "en" ? "No Answer" : "Inget svar" }) })
|
|
309
|
+
] });
|
|
314
310
|
};
|
|
315
311
|
|
|
316
312
|
// src/NewInputComponentStandard/FilesUploadStandard/FilesUploadStandard.tsx
|
|
@@ -1162,7 +1158,7 @@ var Footer = ({ activatedLanguage = "sv" }) => {
|
|
|
1162
1158
|
}
|
|
1163
1159
|
),
|
|
1164
1160
|
/* @__PURE__ */ jsx9(
|
|
1165
|
-
"
|
|
1161
|
+
"nav",
|
|
1166
1162
|
{
|
|
1167
1163
|
className: "pts-footer-linkList",
|
|
1168
1164
|
"aria-label": activatedLanguage === "en" ? "Footer navigation" : "Sidfotsnavigering",
|
package/package.json
CHANGED