optimized-react-component-library-xyz123 1.1.16 → 1.1.18
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 +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +12 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/css/styles.css +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React$1, { ComponentType, SVGProps, FC,
|
|
1
|
+
import React$1, { ComponentType, SVGProps, FC, ElementType, RefObject, ReactNode } from 'react';
|
|
2
2
|
import * as reselect from 'reselect';
|
|
3
3
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
4
4
|
import { PayloadAction, ActionReducerMapBuilder } from '@reduxjs/toolkit';
|
|
@@ -802,6 +802,7 @@ interface NavigationHeaderProps {
|
|
|
802
802
|
useBreadCrumbs?: boolean;
|
|
803
803
|
showNavigationCloseButton?: boolean;
|
|
804
804
|
menuLinks: INavigationItem[];
|
|
805
|
+
linkComponent?: ElementType;
|
|
805
806
|
}
|
|
806
807
|
|
|
807
808
|
declare const NavigationHeader: FC<NavigationHeaderProps>;
|
|
@@ -855,6 +856,7 @@ interface LinkProps extends IPTSLink {
|
|
|
855
856
|
customClass?: string;
|
|
856
857
|
openTarget?: string;
|
|
857
858
|
useDownLoad?: boolean;
|
|
859
|
+
linkComponent?: ElementType;
|
|
858
860
|
}
|
|
859
861
|
|
|
860
862
|
declare const LinkStandard: FC<LinkProps>;
|
|
@@ -863,6 +865,7 @@ interface LinkListProps {
|
|
|
863
865
|
linkArray: IPTSLink[];
|
|
864
866
|
activatedLanguage?: string;
|
|
865
867
|
customCss?: string;
|
|
868
|
+
linkComponent?: ElementType;
|
|
866
869
|
}
|
|
867
870
|
|
|
868
871
|
declare const LinkList: FC<LinkListProps>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React$1, { ComponentType, SVGProps, FC,
|
|
1
|
+
import React$1, { ComponentType, SVGProps, FC, ElementType, RefObject, ReactNode } from 'react';
|
|
2
2
|
import * as reselect from 'reselect';
|
|
3
3
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
4
4
|
import { PayloadAction, ActionReducerMapBuilder } from '@reduxjs/toolkit';
|
|
@@ -802,6 +802,7 @@ interface NavigationHeaderProps {
|
|
|
802
802
|
useBreadCrumbs?: boolean;
|
|
803
803
|
showNavigationCloseButton?: boolean;
|
|
804
804
|
menuLinks: INavigationItem[];
|
|
805
|
+
linkComponent?: ElementType;
|
|
805
806
|
}
|
|
806
807
|
|
|
807
808
|
declare const NavigationHeader: FC<NavigationHeaderProps>;
|
|
@@ -855,6 +856,7 @@ interface LinkProps extends IPTSLink {
|
|
|
855
856
|
customClass?: string;
|
|
856
857
|
openTarget?: string;
|
|
857
858
|
useDownLoad?: boolean;
|
|
859
|
+
linkComponent?: ElementType;
|
|
858
860
|
}
|
|
859
861
|
|
|
860
862
|
declare const LinkStandard: FC<LinkProps>;
|
|
@@ -863,6 +865,7 @@ interface LinkListProps {
|
|
|
863
865
|
linkArray: IPTSLink[];
|
|
864
866
|
activatedLanguage?: string;
|
|
865
867
|
customCss?: string;
|
|
868
|
+
linkComponent?: ElementType;
|
|
866
869
|
}
|
|
867
870
|
|
|
868
871
|
declare const LinkList: FC<LinkListProps>;
|
package/dist/index.js
CHANGED
|
@@ -3476,7 +3476,8 @@ var NavigationHeader = ({
|
|
|
3476
3476
|
menuLinks = void 0,
|
|
3477
3477
|
showNavigationCloseButton = false,
|
|
3478
3478
|
SetActivatedLanguage = () => {
|
|
3479
|
-
}
|
|
3479
|
+
},
|
|
3480
|
+
linkComponent: LinkComponent = "a"
|
|
3480
3481
|
}) => {
|
|
3481
3482
|
const logoLink = activatedLanguage === "en" ? "https://pts.se/en" : "https://pts.se/";
|
|
3482
3483
|
const hasHeadline = headline && headline.length > 0;
|
|
@@ -3528,7 +3529,7 @@ var NavigationHeader = ({
|
|
|
3528
3529
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { children: [
|
|
3529
3530
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("header", { className: "pts-navigation-header-container", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "pts-navigation-header-content", children: [
|
|
3530
3531
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "pts-navigation-header-logo-container", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3531
|
-
|
|
3532
|
+
LinkComponent,
|
|
3532
3533
|
{
|
|
3533
3534
|
className: "pts-navigation-header-logo",
|
|
3534
3535
|
href: logoLink,
|
|
@@ -3588,7 +3589,8 @@ var NavigationHeader = ({
|
|
|
3588
3589
|
menuLinks,
|
|
3589
3590
|
showCloseButton: showNavigationCloseButton != null ? showNavigationCloseButton : true,
|
|
3590
3591
|
isOpen: isMenuOpen,
|
|
3591
|
-
openButtonRef: menuButtonFocusRef
|
|
3592
|
+
openButtonRef: menuButtonFocusRef,
|
|
3593
|
+
linkComponent: LinkComponent
|
|
3592
3594
|
}
|
|
3593
3595
|
),
|
|
3594
3596
|
!isMenuOpen && isSearchOpen && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SearchBarStandard_default, { activatedLanguage }),
|
|
@@ -3655,7 +3657,8 @@ var LinkStandard = ({
|
|
|
3655
3657
|
iconType,
|
|
3656
3658
|
customClass = "",
|
|
3657
3659
|
openTarget = "_blank",
|
|
3658
|
-
useDownLoad
|
|
3660
|
+
useDownLoad,
|
|
3661
|
+
linkComponent: LinkComponent = "a"
|
|
3659
3662
|
}) => {
|
|
3660
3663
|
const excelExtensions = ["xls", "xlsx", "xlsm", "xlsb", "xltx", "xltm", "xlam", "csv"];
|
|
3661
3664
|
const getFileExtension = (url2) => {
|
|
@@ -3672,7 +3675,7 @@ var LinkStandard = ({
|
|
|
3672
3675
|
IconComponent = excelExtensions.includes(fileExtension2) ? ReportIcon : FileIcon;
|
|
3673
3676
|
}
|
|
3674
3677
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "pts-standard-link", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
3675
|
-
|
|
3678
|
+
LinkComponent,
|
|
3676
3679
|
{
|
|
3677
3680
|
download: useDownLoad ? true : void 0,
|
|
3678
3681
|
href: url,
|
|
@@ -3694,7 +3697,8 @@ var import_react17 = require("react");
|
|
|
3694
3697
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3695
3698
|
var LinkList = ({
|
|
3696
3699
|
linkArray,
|
|
3697
|
-
activatedLanguage
|
|
3700
|
+
activatedLanguage,
|
|
3701
|
+
linkComponent: LinkComponent = "a"
|
|
3698
3702
|
}) => {
|
|
3699
3703
|
const uniqueId = (0, import_react17.useId)();
|
|
3700
3704
|
console.log(uniqueId);
|
|
@@ -3707,7 +3711,8 @@ var LinkList = ({
|
|
|
3707
3711
|
title: link.title,
|
|
3708
3712
|
activatedLanguage: activatedLanguage != null ? activatedLanguage : "sv",
|
|
3709
3713
|
ariaLabel: (_a = link.ariaLabel) != null ? _a : "",
|
|
3710
|
-
openTarget: (_b = link.openTarget) != null ? _b : "_blank"
|
|
3714
|
+
openTarget: (_b = link.openTarget) != null ? _b : "_blank",
|
|
3715
|
+
linkComponent: LinkComponent
|
|
3711
3716
|
}
|
|
3712
3717
|
) }, uniqueId + "_" + index);
|
|
3713
3718
|
}) }) });
|