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 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.jsx)(import_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "pts-question-preview pts-radioMultiple-preview", id: `question-${previewId}`, children: [
122
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { id: previewId, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
123
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "pts-root-answer", "aria-labelledby": 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
- ] }) });
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)("h4", { id: `label-${questionId}`, children: [
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.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
197
- "div",
198
- {
199
- className: "pts-question-preview pts-multipleCheckboxes-preview",
200
- id: `question-${previewId}`,
201
- children: [
202
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h3", { id: previewId, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
203
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "pts-root-answer", children: question.answer ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("ul", { "aria-labelledby": previewId, children: (_b = question.options) == null ? void 0 : _b.filter((option) => {
204
- var _a2;
205
- return (_a2 = question.answer) == null ? void 0 : _a2.includes(option.label);
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": `${question.aboutText ? aboutId : ""} ${question.hasValidationError ? errorId : ""}`.trim(),
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.jsx)(import_jsx_runtime3.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "pts-question-preview pts-textArea-preview", id: `question-${previewId}`, children: [
296
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { id: previewId, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
297
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "pts-root-answer", "aria-labelledby": 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" }) })
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": `${question.aboutText ? aboutId : ""} ${question.hasValidationError ? errorId : ""}`.trim(),
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.jsx)(import_jsx_runtime4.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "pts-question-preview pts-textField-preview", id: `question-${previewId}`, children: [
375
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h3", { id: previewId, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
376
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "pts-root-answer", "aria-labelledby": 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" }) })
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
- "div",
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__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "pts-question-preview pts-radioMultiple-preview", id: `question-${previewId}`, children: [
58
- /* @__PURE__ */ jsx("h3", { id: previewId, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
59
- /* @__PURE__ */ jsx("div", { className: "pts-root-answer", "aria-labelledby": previewId, children: ((_b = question.answer) == null ? void 0 : _b.trim()) ? question.answer : /* @__PURE__ */ jsx("span", { className: "no-answer-preview-page", children: "Inget svar" }) })
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("h4", { id: `label-${questionId}`, children: [
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__ */ jsx2(Fragment2, { children: /* @__PURE__ */ jsxs2(
133
- "div",
134
- {
135
- className: "pts-question-preview pts-multipleCheckboxes-preview",
136
- id: `question-${previewId}`,
137
- children: [
138
- /* @__PURE__ */ jsx2("h3", { id: previewId, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
139
- /* @__PURE__ */ jsx2("div", { className: "pts-root-answer", children: question.answer ? /* @__PURE__ */ jsx2("ul", { "aria-labelledby": previewId, children: (_b = question.options) == null ? void 0 : _b.filter((option) => {
140
- var _a2;
141
- return (_a2 = question.answer) == null ? void 0 : _a2.includes(option.label);
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": `${question.aboutText ? aboutId : ""} ${question.hasValidationError ? errorId : ""}`.trim(),
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__ */ jsx3(Fragment3, { children: /* @__PURE__ */ jsxs3("div", { className: "pts-question-preview pts-textArea-preview", id: `question-${previewId}`, children: [
232
- /* @__PURE__ */ jsx3("h3", { id: previewId, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
233
- /* @__PURE__ */ jsx3("div", { className: "pts-root-answer", "aria-labelledby": 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" }) })
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": `${question.aboutText ? aboutId : ""} ${question.hasValidationError ? errorId : ""}`.trim(),
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__ */ jsx4(Fragment4, { children: /* @__PURE__ */ jsxs4("div", { className: "pts-question-preview pts-textField-preview", id: `question-${previewId}`, children: [
311
- /* @__PURE__ */ jsx4("h3", { id: previewId, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
312
- /* @__PURE__ */ jsx4("div", { className: "pts-root-answer", "aria-labelledby": 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" }) })
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
- "div",
1161
+ "nav",
1166
1162
  {
1167
1163
  className: "pts-footer-linkList",
1168
1164
  "aria-label": activatedLanguage === "en" ? "Footer navigation" : "Sidfotsnavigering",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "optimized-react-component-library-xyz123",
3
- "version": "0.1.37",
3
+ "version": "0.1.39",
4
4
  "description": "A modern React component library using TypeScript with React 19 support.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",