optimized-react-component-library-xyz123 0.1.39 → 0.1.41

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.d.mts CHANGED
@@ -209,7 +209,7 @@ declare const RenderQuestion: ({ question, isTouched, activatedLanguage, showPre
209
209
  declare const RenderQuestionGroup: ({ questionArray, wrapper, legend, isTouched, activatedLanguage, showPreview, AddQuestionDisplayed, hideValidationMessage, }: any) => react_jsx_runtime.JSX.Element;
210
210
 
211
211
  interface EditPreviewLinkProps {
212
- step: number;
212
+ step: IStepObject;
213
213
  changeStepHandler: any;
214
214
  activatedLanguage?: string;
215
215
  }
package/dist/index.d.ts CHANGED
@@ -209,7 +209,7 @@ declare const RenderQuestion: ({ question, isTouched, activatedLanguage, showPre
209
209
  declare const RenderQuestionGroup: ({ questionArray, wrapper, legend, isTouched, activatedLanguage, showPreview, AddQuestionDisplayed, hideValidationMessage, }: any) => react_jsx_runtime.JSX.Element;
210
210
 
211
211
  interface EditPreviewLinkProps {
212
- step: number;
212
+ step: IStepObject;
213
213
  changeStepHandler: any;
214
214
  activatedLanguage?: string;
215
215
  }
package/dist/index.js CHANGED
@@ -120,7 +120,14 @@ var PreviewRadio = ({ question }) => {
120
120
  const previewId = `preview-${question.id}`;
121
121
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
122
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" }) })
123
+ ((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { className: "pts-radioMultiple-preview pts-root-answer", id: `answer-${previewId}`, children: question.answer }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
124
+ "dd",
125
+ {
126
+ className: "pts-radioMultiple-preview pts-root-answer no-answer-preview-page",
127
+ id: `answer-${previewId}`,
128
+ children: "Inget svar"
129
+ }
130
+ )
124
131
  ] });
125
132
  };
126
133
 
@@ -195,13 +202,11 @@ var PrevieMultipleCheckboxes = ({
195
202
  const previewId = `preview-${question.id}`;
196
203
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
197
204
  /* @__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
+ question.answer ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: (_b = question.options) == null ? void 0 : _b.filter((option) => {
206
+ var _a2;
207
+ return (_a2 = question.answer) == null ? void 0 : _a2.includes(option.label);
208
+ }).map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("dd", { children: option.label }, index)) }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("dd", { className: "no-answer-preview-page", children: activatedLanguage === "en" ? "No Answer" : "Inget svar" }),
209
+ " "
205
210
  ] });
206
211
  };
207
212
 
@@ -290,7 +295,14 @@ var PreviewTextarea = ({
290
295
  const previewId = `preview-${question.id}`;
291
296
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
292
297
  /* @__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" }) })
298
+ ((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dd", { className: "pts-textArea-preview pts-root-answer", id: `answer-${previewId}`, children: question.answer }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
299
+ "dd",
300
+ {
301
+ className: "pts-textArea-preview pts-root-answer no-answer-preview-page",
302
+ id: `answer-${previewId}`,
303
+ children: activatedLanguage === "en" ? "No Answer" : "Inget svar"
304
+ }
305
+ )
294
306
  ] });
295
307
  };
296
308
 
@@ -369,7 +381,14 @@ var PreviewTextField = ({
369
381
  const previewId = `preview-${question.id}`;
370
382
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
371
383
  /* @__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" }) })
384
+ ((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("dd", { className: "pts-textField-preview pts-root-answer", id: `answer-${previewId}`, children: question.answer }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
385
+ "dd",
386
+ {
387
+ className: "pts-textField-preview pts-root-answer no-answer-preview-page",
388
+ id: `answer-${previewId}`,
389
+ children: activatedLanguage === "en" ? "No Answer" : "Inget svar"
390
+ }
391
+ )
373
392
  ] });
374
393
  };
375
394
 
@@ -1161,30 +1180,39 @@ var EditPreviewLink = ({
1161
1180
  changeStepHandler,
1162
1181
  activatedLanguage = "sv"
1163
1182
  }) => {
1164
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "pts-editPreviewLink-container", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", onClick: () => changeStepHandler(step), role: "link", children: [
1165
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1166
- "svg",
1167
- {
1168
- "aria-hidden": "true",
1169
- focusable: "false",
1170
- xmlns: "http://www.w3.org/2000/svg",
1171
- width: "16",
1172
- height: "16",
1173
- viewBox: "0 0 16 16",
1174
- fill: "none",
1175
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1176
- "path",
1183
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "pts-editPreviewLink-container", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1184
+ "button",
1185
+ {
1186
+ type: "button",
1187
+ onClick: () => changeStepHandler(step),
1188
+ role: "link",
1189
+ "aria-label": `G\xE5 tillbaka till steg ${step.step} och redigera ${step.stepHeadline} `,
1190
+ children: [
1191
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1192
+ "svg",
1177
1193
  {
1178
- d: "M10.0001 3.99996L12.0001 5.99996M8.66675 13.3333H14.0001M3.33341 10.6666L2.66675 13.3333L5.33341 12.6666L13.0574 4.94263C13.3074 4.69259 13.4478 4.35351 13.4478 3.99996C13.4478 3.64641 13.3074 3.30733 13.0574 3.05729L12.9427 2.94263C12.6927 2.69267 12.3536 2.55225 12.0001 2.55225C11.6465 2.55225 11.3075 2.69267 11.0574 2.94263L3.33341 10.6666Z",
1179
- stroke: "#6E3282",
1180
- strokeLinecap: "round",
1181
- strokeLinejoin: "round"
1194
+ "aria-hidden": "true",
1195
+ focusable: "false",
1196
+ xmlns: "http://www.w3.org/2000/svg",
1197
+ width: "16",
1198
+ height: "16",
1199
+ viewBox: "0 0 16 16",
1200
+ fill: "none",
1201
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1202
+ "path",
1203
+ {
1204
+ d: "M10.0001 3.99996L12.0001 5.99996M8.66675 13.3333H14.0001M3.33341 10.6666L2.66675 13.3333L5.33341 12.6666L13.0574 4.94263C13.3074 4.69259 13.4478 4.35351 13.4478 3.99996C13.4478 3.64641 13.3074 3.30733 13.0574 3.05729L12.9427 2.94263C12.6927 2.69267 12.3536 2.55225 12.0001 2.55225C11.6465 2.55225 11.3075 2.69267 11.0574 2.94263L3.33341 10.6666Z",
1205
+ stroke: "#6E3282",
1206
+ strokeLinecap: "round",
1207
+ strokeLinejoin: "round"
1208
+ }
1209
+ )
1182
1210
  }
1183
- )
1184
- }
1185
- ),
1186
- activatedLanguage === "en" ? `Edit step ${step}` : `Redigera steg ${step}`
1187
- ] }) });
1211
+ ),
1212
+ activatedLanguage === "en" ? `Edit step ${step.step}` : `Redigera steg ${step.step}`
1213
+ ]
1214
+ }
1215
+ ) });
1188
1216
  };
1189
1217
  var EditPreviewLinkStandard_default = EditPreviewLink;
1190
1218
 
package/dist/index.mjs CHANGED
@@ -56,7 +56,14 @@ var PreviewRadio = ({ question }) => {
56
56
  const previewId = `preview-${question.id}`;
57
57
  return /* @__PURE__ */ jsxs(Fragment, { children: [
58
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" }) })
59
+ ((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */ jsx("dd", { className: "pts-radioMultiple-preview pts-root-answer", id: `answer-${previewId}`, children: question.answer }) : /* @__PURE__ */ jsx(
60
+ "dd",
61
+ {
62
+ className: "pts-radioMultiple-preview pts-root-answer no-answer-preview-page",
63
+ id: `answer-${previewId}`,
64
+ children: "Inget svar"
65
+ }
66
+ )
60
67
  ] });
61
68
  };
62
69
 
@@ -131,13 +138,11 @@ var PrevieMultipleCheckboxes = ({
131
138
  const previewId = `preview-${question.id}`;
132
139
  return /* @__PURE__ */ jsxs2(Fragment2, { children: [
133
140
  /* @__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
+ question.answer ? /* @__PURE__ */ jsx2(Fragment2, { children: (_b = question.options) == null ? void 0 : _b.filter((option) => {
142
+ var _a2;
143
+ return (_a2 = question.answer) == null ? void 0 : _a2.includes(option.label);
144
+ }).map((option, index) => /* @__PURE__ */ jsx2("dd", { children: option.label }, index)) }) : /* @__PURE__ */ jsx2("dd", { className: "no-answer-preview-page", children: activatedLanguage === "en" ? "No Answer" : "Inget svar" }),
145
+ " "
141
146
  ] });
142
147
  };
143
148
 
@@ -226,7 +231,14 @@ var PreviewTextarea = ({
226
231
  const previewId = `preview-${question.id}`;
227
232
  return /* @__PURE__ */ jsxs3(Fragment3, { children: [
228
233
  /* @__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" }) })
234
+ ((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */ jsx3("dd", { className: "pts-textArea-preview pts-root-answer", id: `answer-${previewId}`, children: question.answer }) : /* @__PURE__ */ jsx3(
235
+ "dd",
236
+ {
237
+ className: "pts-textArea-preview pts-root-answer no-answer-preview-page",
238
+ id: `answer-${previewId}`,
239
+ children: activatedLanguage === "en" ? "No Answer" : "Inget svar"
240
+ }
241
+ )
230
242
  ] });
231
243
  };
232
244
 
@@ -305,7 +317,14 @@ var PreviewTextField = ({
305
317
  const previewId = `preview-${question.id}`;
306
318
  return /* @__PURE__ */ jsxs4(Fragment4, { children: [
307
319
  /* @__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" }) })
320
+ ((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */ jsx4("dd", { className: "pts-textField-preview pts-root-answer", id: `answer-${previewId}`, children: question.answer }) : /* @__PURE__ */ jsx4(
321
+ "dd",
322
+ {
323
+ className: "pts-textField-preview pts-root-answer no-answer-preview-page",
324
+ id: `answer-${previewId}`,
325
+ children: activatedLanguage === "en" ? "No Answer" : "Inget svar"
326
+ }
327
+ )
309
328
  ] });
310
329
  };
311
330
 
@@ -1097,30 +1116,39 @@ var EditPreviewLink = ({
1097
1116
  changeStepHandler,
1098
1117
  activatedLanguage = "sv"
1099
1118
  }) => {
1100
- return /* @__PURE__ */ jsx8("div", { className: "pts-editPreviewLink-container", children: /* @__PURE__ */ jsxs8("button", { type: "button", onClick: () => changeStepHandler(step), role: "link", children: [
1101
- /* @__PURE__ */ jsx8(
1102
- "svg",
1103
- {
1104
- "aria-hidden": "true",
1105
- focusable: "false",
1106
- xmlns: "http://www.w3.org/2000/svg",
1107
- width: "16",
1108
- height: "16",
1109
- viewBox: "0 0 16 16",
1110
- fill: "none",
1111
- children: /* @__PURE__ */ jsx8(
1112
- "path",
1119
+ return /* @__PURE__ */ jsx8("div", { className: "pts-editPreviewLink-container", children: /* @__PURE__ */ jsxs8(
1120
+ "button",
1121
+ {
1122
+ type: "button",
1123
+ onClick: () => changeStepHandler(step),
1124
+ role: "link",
1125
+ "aria-label": `G\xE5 tillbaka till steg ${step.step} och redigera ${step.stepHeadline} `,
1126
+ children: [
1127
+ /* @__PURE__ */ jsx8(
1128
+ "svg",
1113
1129
  {
1114
- d: "M10.0001 3.99996L12.0001 5.99996M8.66675 13.3333H14.0001M3.33341 10.6666L2.66675 13.3333L5.33341 12.6666L13.0574 4.94263C13.3074 4.69259 13.4478 4.35351 13.4478 3.99996C13.4478 3.64641 13.3074 3.30733 13.0574 3.05729L12.9427 2.94263C12.6927 2.69267 12.3536 2.55225 12.0001 2.55225C11.6465 2.55225 11.3075 2.69267 11.0574 2.94263L3.33341 10.6666Z",
1115
- stroke: "#6E3282",
1116
- strokeLinecap: "round",
1117
- strokeLinejoin: "round"
1130
+ "aria-hidden": "true",
1131
+ focusable: "false",
1132
+ xmlns: "http://www.w3.org/2000/svg",
1133
+ width: "16",
1134
+ height: "16",
1135
+ viewBox: "0 0 16 16",
1136
+ fill: "none",
1137
+ children: /* @__PURE__ */ jsx8(
1138
+ "path",
1139
+ {
1140
+ d: "M10.0001 3.99996L12.0001 5.99996M8.66675 13.3333H14.0001M3.33341 10.6666L2.66675 13.3333L5.33341 12.6666L13.0574 4.94263C13.3074 4.69259 13.4478 4.35351 13.4478 3.99996C13.4478 3.64641 13.3074 3.30733 13.0574 3.05729L12.9427 2.94263C12.6927 2.69267 12.3536 2.55225 12.0001 2.55225C11.6465 2.55225 11.3075 2.69267 11.0574 2.94263L3.33341 10.6666Z",
1141
+ stroke: "#6E3282",
1142
+ strokeLinecap: "round",
1143
+ strokeLinejoin: "round"
1144
+ }
1145
+ )
1118
1146
  }
1119
- )
1120
- }
1121
- ),
1122
- activatedLanguage === "en" ? `Edit step ${step}` : `Redigera steg ${step}`
1123
- ] }) });
1147
+ ),
1148
+ activatedLanguage === "en" ? `Edit step ${step.step}` : `Redigera steg ${step.step}`
1149
+ ]
1150
+ }
1151
+ ) });
1124
1152
  };
1125
1153
  var EditPreviewLinkStandard_default = EditPreviewLink;
1126
1154
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "optimized-react-component-library-xyz123",
3
- "version": "0.1.39",
3
+ "version": "0.1.41",
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",