optimized-react-component-library-xyz123 2.12.6 → 2.12.8
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.js +53 -31
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +53 -31
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/css/darkMode.css +12 -5
- package/src/css/mobileView.css +63 -6
- package/src/css/styles.css +49 -54
package/dist/index.mjs
CHANGED
|
@@ -1305,6 +1305,7 @@ __export(icons_exports, {
|
|
|
1305
1305
|
ChevronRightIcon: () => ChevronRightIcon,
|
|
1306
1306
|
CloseIcon: () => CloseIcon,
|
|
1307
1307
|
CollapseIcon: () => CollapseIcon,
|
|
1308
|
+
Cookie_icon: () => Cookie_icon,
|
|
1308
1309
|
ExpandIcon: () => ExpandIcon,
|
|
1309
1310
|
FileIcon: () => FileIcon,
|
|
1310
1311
|
LanguageIcon: () => LanguageIcon,
|
|
@@ -1890,6 +1891,13 @@ var Logo_en = () => /* @__PURE__ */ jsxs13(
|
|
|
1890
1891
|
]
|
|
1891
1892
|
}
|
|
1892
1893
|
);
|
|
1894
|
+
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(
|
|
1895
|
+
"path",
|
|
1896
|
+
{
|
|
1897
|
+
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",
|
|
1898
|
+
fill: "white"
|
|
1899
|
+
}
|
|
1900
|
+
) });
|
|
1893
1901
|
|
|
1894
1902
|
// src/components/layout/AlertInTextStandard/AlertInTextStandard.tsx
|
|
1895
1903
|
import DOMPurify5 from "dompurify";
|
|
@@ -3355,7 +3363,11 @@ var CookieBanner_default = CookieBanner;
|
|
|
3355
3363
|
|
|
3356
3364
|
// src/components/layout/FooterStandard/FooterStandard.tsx
|
|
3357
3365
|
import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3358
|
-
var Footer = ({
|
|
3366
|
+
var Footer = ({
|
|
3367
|
+
activatedLanguage = "sv",
|
|
3368
|
+
appUsesCookies = false,
|
|
3369
|
+
openCookieBanner
|
|
3370
|
+
}) => {
|
|
3359
3371
|
return /* @__PURE__ */ jsxs23("footer", { className: "pts-footer-container", children: [
|
|
3360
3372
|
/* @__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" }) }),
|
|
3361
3373
|
/* @__PURE__ */ jsxs23("div", { className: "pts-footer-content", children: [
|
|
@@ -3430,9 +3442,10 @@ var Footer = ({ activatedLanguage = "sv", appUsesCookies = false, openCookieBann
|
|
|
3430
3442
|
type: "button",
|
|
3431
3443
|
"aria-controls": "cookie-banner",
|
|
3432
3444
|
onClick: openCookieBanner,
|
|
3433
|
-
className: "pts-footer-button",
|
|
3445
|
+
className: "pts-footer-button pts-secondary-button",
|
|
3434
3446
|
children: [
|
|
3435
3447
|
/* @__PURE__ */ jsx27("span", { className: "sr-only", children: activatedLanguage === "en" ? "PTS Cookies (opens cookie banner)" : "PTS Kakor (\xF6ppnar kakbanner)" }),
|
|
3448
|
+
/* @__PURE__ */ jsx27("span", { "aria-hidden": "true", className: "secondary_icon", children: /* @__PURE__ */ jsx27(Cookie_icon, {}) }),
|
|
3436
3449
|
/* @__PURE__ */ jsx27("span", { "aria-hidden": "true", children: activatedLanguage === "en" ? "Cookies" : "Kakor" })
|
|
3437
3450
|
]
|
|
3438
3451
|
}
|
|
@@ -3866,7 +3879,7 @@ var Header = ({
|
|
|
3866
3879
|
"button",
|
|
3867
3880
|
{
|
|
3868
3881
|
lang: activatedLanguage === "en" ? "en" : "sv",
|
|
3869
|
-
className: "pts-languageButton",
|
|
3882
|
+
className: "pts-languageButton pts-secondary-button",
|
|
3870
3883
|
onClick: handleLanguageClick,
|
|
3871
3884
|
children: [
|
|
3872
3885
|
/* @__PURE__ */ jsx29("div", { className: "languageIcon", children: /* @__PURE__ */ jsx29("span", { "aria-hidden": "true", children: /* @__PURE__ */ jsx29(LanguageIcon2, {}) }) }),
|
|
@@ -3914,12 +3927,10 @@ var Navigation = ({
|
|
|
3914
3927
|
setOpenSubMenu(null);
|
|
3915
3928
|
return;
|
|
3916
3929
|
}
|
|
3917
|
-
const defaultOpenSubMenu = activePath == null ? null : (_b = (_a = menuLinks.find(
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
}
|
|
3922
|
-
)) == null ? void 0 : _a.label[activatedLanguage]) != null ? _b : null;
|
|
3930
|
+
const defaultOpenSubMenu = activePath == null ? null : (_b = (_a = menuLinks.find((link) => {
|
|
3931
|
+
var _a2;
|
|
3932
|
+
return (_a2 = link.children) == null ? void 0 : _a2.some((child) => child.href.includes(activePath));
|
|
3933
|
+
})) == null ? void 0 : _a.label[activatedLanguage]) != null ? _b : null;
|
|
3923
3934
|
setOpenSubMenu(defaultOpenSubMenu);
|
|
3924
3935
|
}, [isOpen, activePath, menuLinks, activatedLanguage]);
|
|
3925
3936
|
useEffect13(() => {
|
|
@@ -4000,7 +4011,7 @@ var Navigation = ({
|
|
|
4000
4011
|
/* @__PURE__ */ jsx30("div", { className: "pts-navigation-close-container ", id: "menu-close", children: /* @__PURE__ */ jsxs26(
|
|
4001
4012
|
"button",
|
|
4002
4013
|
{
|
|
4003
|
-
className: "pts-navigation-close-button",
|
|
4014
|
+
className: "pts-navigation-close-button pts-secondary-button",
|
|
4004
4015
|
onClick: () => handleMenuClick("close"),
|
|
4005
4016
|
type: "button",
|
|
4006
4017
|
children: [
|
|
@@ -4016,14 +4027,7 @@ var Navigation = ({
|
|
|
4016
4027
|
lang: activatedLanguage,
|
|
4017
4028
|
children: [
|
|
4018
4029
|
/* @__PURE__ */ jsx30("div", { children: /* @__PURE__ */ jsxs26("div", { className: "pts-navigation-button", children: [
|
|
4019
|
-
/* @__PURE__ */ jsx30("span", { children: href && href.length === 0 ? /* @__PURE__ */ jsx30("span", { children: label[activatedLanguage] }) : /* @__PURE__ */ jsx30(
|
|
4020
|
-
LinkComponent,
|
|
4021
|
-
{
|
|
4022
|
-
onClick: () => handleMenuClick("link"),
|
|
4023
|
-
href,
|
|
4024
|
-
children: label[activatedLanguage]
|
|
4025
|
-
}
|
|
4026
|
-
) }),
|
|
4030
|
+
/* @__PURE__ */ jsx30("span", { children: href && href.length === 0 ? /* @__PURE__ */ jsx30("span", { children: label[activatedLanguage] }) : /* @__PURE__ */ jsx30(LinkComponent, { onClick: () => handleMenuClick("link"), href, children: label[activatedLanguage] }) }),
|
|
4027
4031
|
children && /* @__PURE__ */ jsx30(
|
|
4028
4032
|
"button",
|
|
4029
4033
|
{
|
|
@@ -4046,14 +4050,15 @@ var Navigation = ({
|
|
|
4046
4050
|
className: "pts-sub-navigation-container",
|
|
4047
4051
|
id: "sub-menu-" + index,
|
|
4048
4052
|
role: "region",
|
|
4049
|
-
children: /* @__PURE__ */ jsx30("ul", { className: "pts-sub-navigation-list", lang: activatedLanguage, children: children.map(({ label: label2, href: href2 }, index2) => /* @__PURE__ */ jsx30(
|
|
4050
|
-
|
|
4053
|
+
children: /* @__PURE__ */ jsx30("ul", { className: "pts-sub-navigation-list", lang: activatedLanguage, children: children.map(({ label: label2, href: href2 }, index2) => /* @__PURE__ */ jsx30(
|
|
4054
|
+
"li",
|
|
4051
4055
|
{
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
children: label2[activatedLanguage]
|
|
4055
|
-
}
|
|
4056
|
-
|
|
4056
|
+
className: "pts-sub-navigation-item",
|
|
4057
|
+
lang: activatedLanguage,
|
|
4058
|
+
children: /* @__PURE__ */ jsx30(LinkComponent, { onClick: () => handleMenuClick("link"), href: href2, children: label2[activatedLanguage] })
|
|
4059
|
+
},
|
|
4060
|
+
"nav-child-" + index2
|
|
4061
|
+
)) })
|
|
4057
4062
|
}
|
|
4058
4063
|
)
|
|
4059
4064
|
]
|
|
@@ -4120,7 +4125,7 @@ import { Fragment as Fragment21, jsx as jsx33, jsxs as jsxs29 } from "react/jsx-
|
|
|
4120
4125
|
var NavigationHeader = ({
|
|
4121
4126
|
headline = void 0,
|
|
4122
4127
|
homelink = "",
|
|
4123
|
-
//??
|
|
4128
|
+
//??
|
|
4124
4129
|
activatedLanguage = "sv",
|
|
4125
4130
|
useLanguage = false,
|
|
4126
4131
|
useNavigationMenu = true,
|
|
@@ -4194,14 +4199,23 @@ var NavigationHeader = ({
|
|
|
4194
4199
|
) }),
|
|
4195
4200
|
/* @__PURE__ */ jsx33("div", { className: `${hasHeadline ? "pts-navigation-header-headline-container" : ""}`, children: hasHeadline && /* @__PURE__ */ jsx33("div", { className: "pts-site-headline", children: headline }) }),
|
|
4196
4201
|
/* @__PURE__ */ jsx33("div", { className: "pts-navigation-header-nav-container", children: (useLanguage || useNavigationMenu || useSearch) && /* @__PURE__ */ jsxs29(Fragment21, { children: [
|
|
4197
|
-
useSearch && !isMenuOpen && /* @__PURE__ */ jsx33(Fragment21, { children: /* @__PURE__ */ jsxs29(
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4202
|
+
useSearch && !isMenuOpen && /* @__PURE__ */ jsx33(Fragment21, { children: /* @__PURE__ */ jsxs29(
|
|
4203
|
+
"button",
|
|
4204
|
+
{
|
|
4205
|
+
type: "button",
|
|
4206
|
+
className: "pts-secondary-button",
|
|
4207
|
+
onClick: handleSearchClick,
|
|
4208
|
+
children: [
|
|
4209
|
+
/* @__PURE__ */ jsx33("span", { "aria-hidden": "true", className: "pts-navigation-header-icons", children: getSearchIcon() }),
|
|
4210
|
+
/* @__PURE__ */ jsx33("span", { className: "pts-navigation-header-button-label", children: getSearchLabel() })
|
|
4211
|
+
]
|
|
4212
|
+
}
|
|
4213
|
+
) }),
|
|
4201
4214
|
useLanguage && !isMenuOpen && /* @__PURE__ */ jsxs29(
|
|
4202
4215
|
"button",
|
|
4203
4216
|
{
|
|
4204
4217
|
type: "button",
|
|
4218
|
+
className: "pts-secondary-button",
|
|
4205
4219
|
lang: activatedLanguage === "en" ? "en" : "sv",
|
|
4206
4220
|
onClick: handleLanguageClick,
|
|
4207
4221
|
"aria-label": activatedLanguage === "sv" ? "Change language to English" : "\xC4ndra spr\xE5k till svenska",
|
|
@@ -4215,12 +4229,20 @@ var NavigationHeader = ({
|
|
|
4215
4229
|
"button",
|
|
4216
4230
|
{
|
|
4217
4231
|
type: "button",
|
|
4232
|
+
className: "pts-secondary-button",
|
|
4218
4233
|
onClick: handleMenuClick,
|
|
4219
4234
|
"aria-expanded": isMenuOpen,
|
|
4220
4235
|
"aria-controls": "main-navigation",
|
|
4221
4236
|
ref: menuButtonFocusRef,
|
|
4222
4237
|
children: [
|
|
4223
|
-
/* @__PURE__ */ jsx33(
|
|
4238
|
+
/* @__PURE__ */ jsx33(
|
|
4239
|
+
"span",
|
|
4240
|
+
{
|
|
4241
|
+
"aria-hidden": "true",
|
|
4242
|
+
className: isMenuOpen ? "pts-close-icon" : "pts-open-icon",
|
|
4243
|
+
children: getMenuIcon()
|
|
4244
|
+
}
|
|
4245
|
+
),
|
|
4224
4246
|
/* @__PURE__ */ jsx33("span", { className: "pts-navigation-header-button-label", children: getMenuLabel() })
|
|
4225
4247
|
]
|
|
4226
4248
|
}
|