optimized-react-component-library-xyz123 1.1.17 → 1.1.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
@@ -856,6 +856,7 @@ interface LinkProps extends IPTSLink {
856
856
  customClass?: string;
857
857
  openTarget?: string;
858
858
  useDownLoad?: boolean;
859
+ linkComponent?: ElementType;
859
860
  }
860
861
 
861
862
  declare const LinkStandard: FC<LinkProps>;
@@ -864,6 +865,7 @@ interface LinkListProps {
864
865
  linkArray: IPTSLink[];
865
866
  activatedLanguage?: string;
866
867
  customCss?: string;
868
+ linkComponent?: ElementType;
867
869
  }
868
870
 
869
871
  declare const LinkList: FC<LinkListProps>;
package/dist/index.d.ts CHANGED
@@ -856,6 +856,7 @@ interface LinkProps extends IPTSLink {
856
856
  customClass?: string;
857
857
  openTarget?: string;
858
858
  useDownLoad?: boolean;
859
+ linkComponent?: ElementType;
859
860
  }
860
861
 
861
862
  declare const LinkStandard: FC<LinkProps>;
@@ -864,6 +865,7 @@ interface LinkListProps {
864
865
  linkArray: IPTSLink[];
865
866
  activatedLanguage?: string;
866
867
  customCss?: string;
868
+ linkComponent?: ElementType;
867
869
  }
868
870
 
869
871
  declare const LinkList: FC<LinkListProps>;
package/dist/index.js CHANGED
@@ -3351,7 +3351,7 @@ var Navigation = ({
3351
3351
  className: `pts-navigation-link ${openSubMenu === label[activatedLanguage] ? "open" : ""}`,
3352
3352
  children: [
3353
3353
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "pts-navigation-button", children: [
3354
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: href.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: label[activatedLanguage] }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(LinkComponent, { onClick: handleCloseButton, href, children: label[activatedLanguage] }) }),
3354
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: href.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: label[activatedLanguage] }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(LinkComponent, { onClick: handleCloseButton, to: href, href, children: label[activatedLanguage] }) }),
3355
3355
  children && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3356
3356
  "button",
3357
3357
  {
@@ -3370,7 +3370,7 @@ var Navigation = ({
3370
3370
  hidden: openSubMenu !== label[activatedLanguage],
3371
3371
  className: "pts-sub-navigation-container",
3372
3372
  id: "sub-menu-" + index,
3373
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("ul", { className: "pts-sub-navigation-list", children: children.map(({ label: label2, href: href2 }, index2) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("li", { className: "pts-sub-navigation-item", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(LinkComponent, { onClick: handleCloseButton, href: href2, children: label2[activatedLanguage] }) }, "nav-child-" + index2)) })
3373
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("ul", { className: "pts-sub-navigation-list", children: children.map(({ label: label2, href: href2 }, index2) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("li", { className: "pts-sub-navigation-item", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(LinkComponent, { onClick: handleCloseButton, href: href2, to: href2, children: label2[activatedLanguage] }) }, "nav-child-" + index2)) })
3374
3374
  }
3375
3375
  )
3376
3376
  ]
@@ -3533,6 +3533,7 @@ var NavigationHeader = ({
3533
3533
  {
3534
3534
  className: "pts-navigation-header-logo",
3535
3535
  href: logoLink,
3536
+ to: logoLink,
3536
3537
  target: "_blank",
3537
3538
  rel: "noopener",
3538
3539
  "aria-label": activatedLanguage === "en" ? "PTS logotype (to the homepage on pts.se, opens in new tab)" : "PTS logotyp (till startsidan p\xE5 pts.se, \xF6ppnas i ny flik)",
@@ -3657,7 +3658,8 @@ var LinkStandard = ({
3657
3658
  iconType,
3658
3659
  customClass = "",
3659
3660
  openTarget = "_blank",
3660
- useDownLoad
3661
+ useDownLoad,
3662
+ linkComponent: LinkComponent = "a"
3661
3663
  }) => {
3662
3664
  const excelExtensions = ["xls", "xlsx", "xlsm", "xlsb", "xltx", "xltm", "xlam", "csv"];
3663
3665
  const getFileExtension = (url2) => {
@@ -3674,10 +3676,11 @@ var LinkStandard = ({
3674
3676
  IconComponent = excelExtensions.includes(fileExtension2) ? ReportIcon : FileIcon;
3675
3677
  }
3676
3678
  return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "pts-standard-link", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
3677
- "a",
3679
+ LinkComponent,
3678
3680
  {
3679
3681
  download: useDownLoad ? true : void 0,
3680
3682
  href: url,
3683
+ to: url,
3681
3684
  target: openTarget,
3682
3685
  rel: openTarget === "_blank" ? "noopener" : void 0,
3683
3686
  "aria-label": openTarget === "_blank" ? ariaLabel && activatedLanguage === "sv" ? "L\xE4nk (\xF6ppnas i ny flik)" : "Link (opens in new tab)" : ariaLabel,
@@ -3696,7 +3699,8 @@ var import_react17 = require("react");
3696
3699
  var import_jsx_runtime29 = require("react/jsx-runtime");
3697
3700
  var LinkList = ({
3698
3701
  linkArray,
3699
- activatedLanguage
3702
+ activatedLanguage,
3703
+ linkComponent: LinkComponent = "a"
3700
3704
  }) => {
3701
3705
  const uniqueId = (0, import_react17.useId)();
3702
3706
  console.log(uniqueId);
@@ -3709,7 +3713,8 @@ var LinkList = ({
3709
3713
  title: link.title,
3710
3714
  activatedLanguage: activatedLanguage != null ? activatedLanguage : "sv",
3711
3715
  ariaLabel: (_a = link.ariaLabel) != null ? _a : "",
3712
- openTarget: (_b = link.openTarget) != null ? _b : "_blank"
3716
+ openTarget: (_b = link.openTarget) != null ? _b : "_blank",
3717
+ linkComponent: LinkComponent
3713
3718
  }
3714
3719
  ) }, uniqueId + "_" + index);
3715
3720
  }) }) });