optimized-react-component-library-xyz123 2.14.1 → 2.14.2
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 +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +65 -31
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +65 -31
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/css/darkMode.css +22 -5
- package/src/css/mobileView.css +70 -4
- package/src/css/styles.css +64 -41
package/dist/index.mjs
CHANGED
|
@@ -1322,6 +1322,7 @@ __export(icons_exports, {
|
|
|
1322
1322
|
ChevronRightIcon: () => ChevronRightIcon,
|
|
1323
1323
|
CloseIcon: () => CloseIcon,
|
|
1324
1324
|
CollapseIcon: () => CollapseIcon,
|
|
1325
|
+
Cookie_icon: () => Cookie_icon,
|
|
1325
1326
|
ExpandIcon: () => ExpandIcon,
|
|
1326
1327
|
FileIcon: () => FileIcon,
|
|
1327
1328
|
LanguageIcon: () => LanguageIcon,
|
|
@@ -1907,6 +1908,13 @@ var Logo_en = () => /* @__PURE__ */ jsxs13(
|
|
|
1907
1908
|
]
|
|
1908
1909
|
}
|
|
1909
1910
|
);
|
|
1911
|
+
var Cookie_icon = () => /* @__PURE__ */ jsx16("svg", { xmlns: "http://www.w3.org/2000/svg", width: "13", height: "16", viewBox: "0 0 13 16", fill: "none", children: /* @__PURE__ */ jsx16(
|
|
1912
|
+
"path",
|
|
1913
|
+
{
|
|
1914
|
+
d: "M4.67907 11.2981H8.32186C8.53419 11.2981 8.71217 11.228 8.85579 11.0878C8.9994 10.9476 9.07121 10.7736 9.07121 10.5658V7.91662C9.07121 7.70938 8.9994 7.53567 8.85579 7.39549C8.71217 7.25532 8.53388 7.18523 8.32093 7.18523H8.16029V6.27892C8.16029 5.82637 8.00243 5.44572 7.68671 5.13697C7.371 4.82882 6.98131 4.67475 6.51764 4.67475C6.05398 4.67475 5.66429 4.82882 5.34857 5.13697C5.03286 5.44511 4.875 5.82576 4.875 6.27892V7.18523H4.67814C4.46581 7.18523 4.28783 7.25532 4.14421 7.39549C4.0006 7.53567 3.92879 7.70938 3.92879 7.91662V10.5658C3.92879 10.7736 4.0006 10.9476 4.14421 11.0878C4.28783 11.228 4.46612 11.2981 4.67907 11.2981ZM5.58907 7.18523V6.27892C5.58907 6.02213 5.67821 5.80673 5.8565 5.63272C6.03479 5.45871 6.25517 5.3717 6.51764 5.3717C6.78012 5.3717 7.00081 5.45871 7.17971 5.63272C7.35862 5.80673 7.44745 6.02213 7.44621 6.27892V7.18523H5.58907ZM6.2335 15.9773C6.14064 15.9622 6.05398 15.9396 5.9735 15.9094C4.14607 15.2296 2.69379 14.0768 1.61664 12.4509C0.5395 10.825 0.000619048 9.06491 0 7.17073V3.289C0 2.97844 0.0906907 2.69869 0.272072 2.44976C0.452834 2.20082 0.687143 2.02047 0.975 1.90869L5.97536 0.0960688C6.15612 0.0320229 6.331 0 6.5 0C6.669 0 6.84419 0.0320229 7.02557 0.0960688L12.025 1.90869C12.3122 2.02107 12.5465 2.20143 12.7279 2.44976C12.9093 2.69869 13 2.97844 13 3.289V7.17073C13 9.06491 12.4614 10.825 11.3843 12.4509C10.3071 14.0768 8.85486 15.2296 7.02743 15.9094C6.94633 15.9396 6.85936 15.9622 6.7665 15.9773C6.67364 15.9924 6.58481 16 6.5 16C6.41519 16 6.32636 15.9924 6.2335 15.9773ZM6.5 15.1463C8.10952 14.6478 9.44048 13.6508 10.4929 12.1554C11.5452 10.66 12.0714 8.99845 12.0714 7.17073V3.27178C12.0714 3.15577 12.0386 3.05124 11.973 2.9582C11.908 2.86515 11.8158 2.79567 11.6963 2.74975L6.69686 0.937125C6.63743 0.912957 6.57181 0.900873 6.5 0.900873C6.42819 0.900873 6.36257 0.912957 6.30314 0.937125L1.30371 2.74975C1.18424 2.79567 1.092 2.86515 1.027 2.9582C0.961381 3.05124 0.928571 3.15577 0.928571 3.27178V7.17073C0.928571 8.99845 1.45476 10.66 2.50714 12.1554C3.55952 13.6508 4.89048 14.6478 6.5 15.1463Z",
|
|
1915
|
+
fill: "white"
|
|
1916
|
+
}
|
|
1917
|
+
) });
|
|
1910
1918
|
|
|
1911
1919
|
// src/components/layout/AlertInTextStandard/AlertInTextStandard.tsx
|
|
1912
1920
|
import DOMPurify5 from "dompurify";
|
|
@@ -3384,7 +3392,11 @@ var CookieBanner_default = CookieBanner;
|
|
|
3384
3392
|
|
|
3385
3393
|
// src/components/layout/FooterStandard/FooterStandard.tsx
|
|
3386
3394
|
import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3387
|
-
var Footer = ({
|
|
3395
|
+
var Footer = ({
|
|
3396
|
+
activatedLanguage = "sv",
|
|
3397
|
+
appUsesCookies = false,
|
|
3398
|
+
openCookieBanner
|
|
3399
|
+
}) => {
|
|
3388
3400
|
return /* @__PURE__ */ jsxs23("footer", { className: "pts-footer-container", children: [
|
|
3389
3401
|
/* @__PURE__ */ jsx27("div", { className: "pts-footer-slogan-text-container", children: /* @__PURE__ */ jsx27("p", { className: "pts-footer-slogan-text", children: activatedLanguage === "sv" ? "S\xE4ker och tillg\xE4nglig kommunikation f\xF6r Sverige" : "Secure and accessible communication for Sweden" }) }),
|
|
3390
3402
|
/* @__PURE__ */ jsxs23("div", { className: "pts-footer-content", children: [
|
|
@@ -3453,7 +3465,20 @@ var Footer = ({ activatedLanguage = "sv" }) => {
|
|
|
3453
3465
|
]
|
|
3454
3466
|
}
|
|
3455
3467
|
) }),
|
|
3456
|
-
/* @__PURE__ */ jsx27("li", { children: /* @__PURE__ */ jsxs23(
|
|
3468
|
+
/* @__PURE__ */ jsx27("li", { children: appUsesCookies ? /* @__PURE__ */ jsxs23(
|
|
3469
|
+
"button",
|
|
3470
|
+
{
|
|
3471
|
+
type: "button",
|
|
3472
|
+
"aria-controls": "cookie-banner",
|
|
3473
|
+
onClick: openCookieBanner,
|
|
3474
|
+
className: "pts-footer-button pts-secondary-button",
|
|
3475
|
+
children: [
|
|
3476
|
+
/* @__PURE__ */ jsx27("span", { className: "sr-only", children: activatedLanguage === "en" ? "PTS Cookies (opens cookie banner)" : "PTS Kakor (\xF6ppnar kakbanner)" }),
|
|
3477
|
+
/* @__PURE__ */ jsx27("span", { "aria-hidden": "true", className: "secondary_icon", children: /* @__PURE__ */ jsx27(Cookie_icon, {}) }),
|
|
3478
|
+
/* @__PURE__ */ jsx27("span", { "aria-hidden": "true", children: activatedLanguage === "en" ? "Cookies" : "Kakor" })
|
|
3479
|
+
]
|
|
3480
|
+
}
|
|
3481
|
+
) : /* @__PURE__ */ jsxs23(
|
|
3457
3482
|
"a",
|
|
3458
3483
|
{
|
|
3459
3484
|
href: activatedLanguage === "en" ? "https://pts.se/en/cookies-eservices" : "https://www.pts.se/kakor-etjanster",
|
|
@@ -3883,7 +3908,7 @@ var Header = ({
|
|
|
3883
3908
|
"button",
|
|
3884
3909
|
{
|
|
3885
3910
|
lang: activatedLanguage === "en" ? "en" : "sv",
|
|
3886
|
-
className: "pts-languageButton",
|
|
3911
|
+
className: "pts-languageButton pts-secondary-button",
|
|
3887
3912
|
onClick: handleLanguageClick,
|
|
3888
3913
|
children: [
|
|
3889
3914
|
/* @__PURE__ */ jsx29("div", { className: "languageIcon", children: /* @__PURE__ */ jsx29("span", { "aria-hidden": "true", children: /* @__PURE__ */ jsx29(LanguageIcon2, {}) }) }),
|
|
@@ -3931,12 +3956,10 @@ var Navigation = ({
|
|
|
3931
3956
|
setOpenSubMenu(null);
|
|
3932
3957
|
return;
|
|
3933
3958
|
}
|
|
3934
|
-
const defaultOpenSubMenu = activePath == null ? null : (_b = (_a = menuLinks.find(
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
}
|
|
3939
|
-
)) == null ? void 0 : _a.label[activatedLanguage]) != null ? _b : null;
|
|
3959
|
+
const defaultOpenSubMenu = activePath == null ? null : (_b = (_a = menuLinks.find((link) => {
|
|
3960
|
+
var _a2;
|
|
3961
|
+
return (_a2 = link.children) == null ? void 0 : _a2.some((child) => child.href.includes(activePath));
|
|
3962
|
+
})) == null ? void 0 : _a.label[activatedLanguage]) != null ? _b : null;
|
|
3940
3963
|
setOpenSubMenu(defaultOpenSubMenu);
|
|
3941
3964
|
}, [isOpen, activePath, menuLinks, activatedLanguage]);
|
|
3942
3965
|
useEffect13(() => {
|
|
@@ -4017,7 +4040,7 @@ var Navigation = ({
|
|
|
4017
4040
|
/* @__PURE__ */ jsx30("div", { className: "pts-navigation-close-container ", id: "menu-close", children: /* @__PURE__ */ jsxs26(
|
|
4018
4041
|
"button",
|
|
4019
4042
|
{
|
|
4020
|
-
className: "pts-navigation-close-button",
|
|
4043
|
+
className: "pts-navigation-close-button pts-secondary-button",
|
|
4021
4044
|
onClick: () => handleMenuClick("close"),
|
|
4022
4045
|
type: "button",
|
|
4023
4046
|
children: [
|
|
@@ -4033,14 +4056,7 @@ var Navigation = ({
|
|
|
4033
4056
|
lang: activatedLanguage,
|
|
4034
4057
|
children: [
|
|
4035
4058
|
/* @__PURE__ */ jsx30("div", { children: /* @__PURE__ */ jsxs26("div", { className: "pts-navigation-button", children: [
|
|
4036
|
-
/* @__PURE__ */ jsx30("span", { children: href && href.length === 0 ? /* @__PURE__ */ jsx30("span", { children: label[activatedLanguage] }) : /* @__PURE__ */ jsx30(
|
|
4037
|
-
LinkComponent,
|
|
4038
|
-
{
|
|
4039
|
-
onClick: () => handleMenuClick("link"),
|
|
4040
|
-
href,
|
|
4041
|
-
children: label[activatedLanguage]
|
|
4042
|
-
}
|
|
4043
|
-
) }),
|
|
4059
|
+
/* @__PURE__ */ jsx30("span", { children: href && href.length === 0 ? /* @__PURE__ */ jsx30("span", { children: label[activatedLanguage] }) : /* @__PURE__ */ jsx30(LinkComponent, { onClick: () => handleMenuClick("link"), href, children: label[activatedLanguage] }) }),
|
|
4044
4060
|
children && /* @__PURE__ */ jsx30(
|
|
4045
4061
|
"button",
|
|
4046
4062
|
{
|
|
@@ -4063,14 +4079,15 @@ var Navigation = ({
|
|
|
4063
4079
|
className: "pts-sub-navigation-container",
|
|
4064
4080
|
id: "sub-menu-" + index,
|
|
4065
4081
|
role: "region",
|
|
4066
|
-
children: /* @__PURE__ */ jsx30("ul", { className: "pts-sub-navigation-list", lang: activatedLanguage, children: children.map(({ label: label2, href: href2 }, index2) => /* @__PURE__ */ jsx30(
|
|
4067
|
-
|
|
4082
|
+
children: /* @__PURE__ */ jsx30("ul", { className: "pts-sub-navigation-list", lang: activatedLanguage, children: children.map(({ label: label2, href: href2 }, index2) => /* @__PURE__ */ jsx30(
|
|
4083
|
+
"li",
|
|
4068
4084
|
{
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
children: label2[activatedLanguage]
|
|
4072
|
-
}
|
|
4073
|
-
|
|
4085
|
+
className: "pts-sub-navigation-item",
|
|
4086
|
+
lang: activatedLanguage,
|
|
4087
|
+
children: /* @__PURE__ */ jsx30(LinkComponent, { onClick: () => handleMenuClick("link"), href: href2, children: label2[activatedLanguage] })
|
|
4088
|
+
},
|
|
4089
|
+
"nav-child-" + index2
|
|
4090
|
+
)) })
|
|
4074
4091
|
}
|
|
4075
4092
|
)
|
|
4076
4093
|
]
|
|
@@ -4137,7 +4154,7 @@ import { Fragment as Fragment21, jsx as jsx33, jsxs as jsxs29 } from "react/jsx-
|
|
|
4137
4154
|
var NavigationHeader = ({
|
|
4138
4155
|
headline = void 0,
|
|
4139
4156
|
homelink = "",
|
|
4140
|
-
//??
|
|
4157
|
+
//??
|
|
4141
4158
|
activatedLanguage = "sv",
|
|
4142
4159
|
useLanguage = false,
|
|
4143
4160
|
useNavigationMenu = true,
|
|
@@ -4211,14 +4228,23 @@ var NavigationHeader = ({
|
|
|
4211
4228
|
) }),
|
|
4212
4229
|
/* @__PURE__ */ jsx33("div", { className: `${hasHeadline ? "pts-navigation-header-headline-container" : ""}`, children: hasHeadline && /* @__PURE__ */ jsx33("div", { className: "pts-site-headline", children: headline }) }),
|
|
4213
4230
|
/* @__PURE__ */ jsx33("div", { className: "pts-navigation-header-nav-container", children: (useLanguage || useNavigationMenu || useSearch) && /* @__PURE__ */ jsxs29(Fragment21, { children: [
|
|
4214
|
-
useSearch && !isMenuOpen && /* @__PURE__ */ jsx33(Fragment21, { children: /* @__PURE__ */ jsxs29(
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4231
|
+
useSearch && !isMenuOpen && /* @__PURE__ */ jsx33(Fragment21, { children: /* @__PURE__ */ jsxs29(
|
|
4232
|
+
"button",
|
|
4233
|
+
{
|
|
4234
|
+
type: "button",
|
|
4235
|
+
className: "pts-secondary-button",
|
|
4236
|
+
onClick: handleSearchClick,
|
|
4237
|
+
children: [
|
|
4238
|
+
/* @__PURE__ */ jsx33("span", { "aria-hidden": "true", className: "pts-navigation-header-icons", children: getSearchIcon() }),
|
|
4239
|
+
/* @__PURE__ */ jsx33("span", { className: "pts-navigation-header-button-label", children: getSearchLabel() })
|
|
4240
|
+
]
|
|
4241
|
+
}
|
|
4242
|
+
) }),
|
|
4218
4243
|
useLanguage && !isMenuOpen && /* @__PURE__ */ jsxs29(
|
|
4219
4244
|
"button",
|
|
4220
4245
|
{
|
|
4221
4246
|
type: "button",
|
|
4247
|
+
className: "pts-secondary-button",
|
|
4222
4248
|
lang: activatedLanguage === "en" ? "en" : "sv",
|
|
4223
4249
|
onClick: handleLanguageClick,
|
|
4224
4250
|
"aria-label": activatedLanguage === "sv" ? "Change language to English" : "\xC4ndra spr\xE5k till svenska",
|
|
@@ -4232,12 +4258,20 @@ var NavigationHeader = ({
|
|
|
4232
4258
|
"button",
|
|
4233
4259
|
{
|
|
4234
4260
|
type: "button",
|
|
4261
|
+
className: "pts-secondary-button",
|
|
4235
4262
|
onClick: handleMenuClick,
|
|
4236
4263
|
"aria-expanded": isMenuOpen,
|
|
4237
4264
|
"aria-controls": "main-navigation",
|
|
4238
4265
|
ref: menuButtonFocusRef,
|
|
4239
4266
|
children: [
|
|
4240
|
-
/* @__PURE__ */ jsx33(
|
|
4267
|
+
/* @__PURE__ */ jsx33(
|
|
4268
|
+
"span",
|
|
4269
|
+
{
|
|
4270
|
+
"aria-hidden": "true",
|
|
4271
|
+
className: isMenuOpen ? "pts-close-icon" : "pts-open-icon",
|
|
4272
|
+
children: getMenuIcon()
|
|
4273
|
+
}
|
|
4274
|
+
),
|
|
4241
4275
|
/* @__PURE__ */ jsx33("span", { className: "pts-navigation-header-button-label", children: getMenuLabel() })
|
|
4242
4276
|
]
|
|
4243
4277
|
}
|