optimized-react-component-library-xyz123 2.2.18 → 2.2.19

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
@@ -43,6 +43,10 @@ interface IOption {
43
43
  value?: string;
44
44
  id?: string;
45
45
  }
46
+ interface IOptionInfoText {
47
+ selectedValue: string;
48
+ infoText: string;
49
+ }
46
50
  interface IPTSLink {
47
51
  title: string;
48
52
  url: string;
@@ -81,6 +85,7 @@ interface IQuestion {
81
85
  isQuestionMandatory?: boolean;
82
86
  questionType?: string;
83
87
  options?: Array<IOption>;
88
+ optionsInfoText?: Array<IOptionInfoText>;
84
89
  visible?: boolean;
85
90
  isDisplayed?: boolean;
86
91
  hasValidationError?: boolean;
package/dist/index.d.ts CHANGED
@@ -43,6 +43,10 @@ interface IOption {
43
43
  value?: string;
44
44
  id?: string;
45
45
  }
46
+ interface IOptionInfoText {
47
+ selectedValue: string;
48
+ infoText: string;
49
+ }
46
50
  interface IPTSLink {
47
51
  title: string;
48
52
  url: string;
@@ -81,6 +85,7 @@ interface IQuestion {
81
85
  isQuestionMandatory?: boolean;
82
86
  questionType?: string;
83
87
  options?: Array<IOption>;
88
+ optionsInfoText?: Array<IOptionInfoText>;
84
89
  visible?: boolean;
85
90
  isDisplayed?: boolean;
86
91
  hasValidationError?: boolean;
package/dist/index.js CHANGED
@@ -1250,8 +1250,14 @@ var PreviewSingleCheckbox = ({
1250
1250
  var import_react9 = require("react");
1251
1251
  var import_dompurify4 = __toESM(require("dompurify"));
1252
1252
  var import_jsx_runtime14 = require("react/jsx-runtime");
1253
- var ExpandIcon = () => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.7073 15.7069C12.5198 15.8943 12.2655 15.9996 12.0003 15.9996C11.7352 15.9996 11.4809 15.8943 11.2933 15.7069L5.63634 10.0499C5.54083 9.95761 5.46465 9.84726 5.41224 9.72526C5.35983 9.60326 5.33225 9.47204 5.33109 9.33926C5.32994 9.20648 5.35524 9.0748 5.40552 8.9519C5.4558 8.829 5.53006 8.71735 5.62395 8.62346C5.71784 8.52957 5.82949 8.45531 5.95239 8.40503C6.07529 8.35475 6.20696 8.32945 6.33974 8.3306C6.47252 8.33176 6.60374 8.35934 6.72575 8.41175C6.84775 8.46416 6.9581 8.54034 7.05034 8.63585L12.0003 13.5859L16.9503 8.63585C17.1389 8.4537 17.3915 8.3529 17.6537 8.35518C17.9159 8.35746 18.1668 8.46263 18.3522 8.64804C18.5376 8.83344 18.6427 9.08426 18.645 9.34645C18.6473 9.60865 18.5465 9.86125 18.3643 10.0499L12.7073 15.7069Z", fill: "white" }) });
1254
- var CollapseIcon = () => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.7073 8.29315C12.5198 8.10567 12.2655 8.00036 12.0003 8.00036C11.7352 8.00036 11.4809 8.10567 11.2933 8.29315L5.63634 13.9501C5.54083 14.0424 5.46465 14.1527 5.41224 14.2747C5.35983 14.3967 5.33225 14.528 5.33109 14.6607C5.32994 14.7935 5.35524 14.9252 5.40552 15.0481C5.4558 15.171 5.53006 15.2826 5.62395 15.3765C5.71784 15.4704 5.82949 15.5447 5.95239 15.595C6.07529 15.6452 6.20696 15.6705 6.33974 15.6694C6.47252 15.6682 6.60374 15.6407 6.72575 15.5882C6.84775 15.5358 6.9581 15.4597 7.05034 15.3641L12.0003 10.4141L16.9503 15.3641C17.1389 15.5463 17.3915 15.6471 17.6537 15.6448C17.9159 15.6425 18.1668 15.5374 18.3522 15.352C18.5376 15.1666 18.6427 14.9157 18.645 14.6535C18.6473 14.3913 18.5465 14.1387 18.3643 13.9501L12.7073 8.29315Z", fill: "white" }) });
1253
+ var ExpandIcon = () => (
1254
+ //Todo delete and use import
1255
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.7073 15.7069C12.5198 15.8943 12.2655 15.9996 12.0003 15.9996C11.7352 15.9996 11.4809 15.8943 11.2933 15.7069L5.63634 10.0499C5.54083 9.95761 5.46465 9.84726 5.41224 9.72526C5.35983 9.60326 5.33225 9.47204 5.33109 9.33926C5.32994 9.20648 5.35524 9.0748 5.40552 8.9519C5.4558 8.829 5.53006 8.71735 5.62395 8.62346C5.71784 8.52957 5.82949 8.45531 5.95239 8.40503C6.07529 8.35475 6.20696 8.32945 6.33974 8.3306C6.47252 8.33176 6.60374 8.35934 6.72575 8.41175C6.84775 8.46416 6.9581 8.54034 7.05034 8.63585L12.0003 13.5859L16.9503 8.63585C17.1389 8.4537 17.3915 8.3529 17.6537 8.35518C17.9159 8.35746 18.1668 8.46263 18.3522 8.64804C18.5376 8.83344 18.6427 9.08426 18.645 9.34645C18.6473 9.60865 18.5465 9.86125 18.3643 10.0499L12.7073 15.7069Z", fill: "white" }) })
1256
+ );
1257
+ var CollapseIcon = () => (
1258
+ //Todo delete and use import
1259
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.7073 8.29315C12.5198 8.10567 12.2655 8.00036 12.0003 8.00036C11.7352 8.00036 11.4809 8.10567 11.2933 8.29315L5.63634 13.9501C5.54083 14.0424 5.46465 14.1527 5.41224 14.2747C5.35983 14.3967 5.33225 14.528 5.33109 14.6607C5.32994 14.7935 5.35524 14.9252 5.40552 15.0481C5.4558 15.171 5.53006 15.2826 5.62395 15.3765C5.71784 15.4704 5.82949 15.5447 5.95239 15.595C6.07529 15.6452 6.20696 15.6705 6.33974 15.6694C6.47252 15.6682 6.60374 15.6407 6.72575 15.5882C6.84775 15.5358 6.9581 15.4597 7.05034 15.3641L12.0003 10.4141L16.9503 15.3641C17.1389 15.5463 17.3915 15.6471 17.6537 15.6448C17.9159 15.6425 18.1668 15.5374 18.3522 15.352C18.5376 15.1666 18.6427 14.9157 18.645 14.6535C18.6473 14.3913 18.5465 14.1387 18.3643 13.9501L12.7073 8.29315Z", fill: "white" }) })
1260
+ );
1255
1261
  var RadioCollapseItem = ({
1256
1262
  index,
1257
1263
  questionId,
@@ -1321,6 +1327,7 @@ var RadioCollapseItem = ({
1321
1327
  id: contentId,
1322
1328
  "aria-labelledby": `${groupId}-option-${index}`,
1323
1329
  "aria-hidden": !isOpen,
1330
+ inert: !isOpen,
1324
1331
  children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: `pts-radio-collapse-content `, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { dangerouslySetInnerHTML: {
1325
1332
  __html: import_dompurify4.default.sanitize(optionText != null ? optionText : "")
1326
1333
  } }) })
@@ -1380,7 +1387,7 @@ var InputRadio2 = ({
1380
1387
  handleInputChange,
1381
1388
  setOpen: question.answer === option.value,
1382
1389
  questionIsMandatory: (_c2 = question.isQuestionMandatory) != null ? _c2 : false,
1383
- optionText: (_e = (_d = optionsInfoText.find((optionI) => optionI.selectedValue === option.value)) == null ? void 0 : _d.infoText) != null ? _e : ""
1390
+ optionText: (_e = (_d = optionsInfoText.find((optionInfo) => optionInfo.selectedValue === option.value)) == null ? void 0 : _d.infoText) != null ? _e : ""
1384
1391
  }
1385
1392
  );
1386
1393
  }),