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 CHANGED
@@ -1393,6 +1393,7 @@ __export(icons_exports, {
1393
1393
  ChevronRightIcon: () => ChevronRightIcon,
1394
1394
  CloseIcon: () => CloseIcon,
1395
1395
  CollapseIcon: () => CollapseIcon,
1396
+ Cookie_icon: () => Cookie_icon,
1396
1397
  ExpandIcon: () => ExpandIcon,
1397
1398
  FileIcon: () => FileIcon,
1398
1399
  LanguageIcon: () => LanguageIcon,
@@ -1978,6 +1979,13 @@ var Logo_en = () => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1978
1979
  ]
1979
1980
  }
1980
1981
  );
1982
+ var Cookie_icon = () => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "13", height: "16", viewBox: "0 0 13 16", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1983
+ "path",
1984
+ {
1985
+ 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",
1986
+ fill: "white"
1987
+ }
1988
+ ) });
1981
1989
 
1982
1990
  // src/components/layout/AlertInTextStandard/AlertInTextStandard.tsx
1983
1991
  var import_dompurify5 = __toESM(require("dompurify"));
@@ -3440,7 +3448,11 @@ var CookieBanner_default = CookieBanner;
3440
3448
 
3441
3449
  // src/components/layout/FooterStandard/FooterStandard.tsx
3442
3450
  var import_jsx_runtime27 = require("react/jsx-runtime");
3443
- var Footer = ({ activatedLanguage = "sv", appUsesCookies = false, openCookieBanner }) => {
3451
+ var Footer = ({
3452
+ activatedLanguage = "sv",
3453
+ appUsesCookies = false,
3454
+ openCookieBanner
3455
+ }) => {
3444
3456
  return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("footer", { className: "pts-footer-container", children: [
3445
3457
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "pts-footer-slogan-text-container", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "pts-footer-slogan-text", children: activatedLanguage === "sv" ? "S\xE4ker och tillg\xE4nglig kommunikation f\xF6r Sverige" : "Secure and accessible communication for Sweden" }) }),
3446
3458
  /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "pts-footer-content", children: [
@@ -3515,9 +3527,10 @@ var Footer = ({ activatedLanguage = "sv", appUsesCookies = false, openCookieBann
3515
3527
  type: "button",
3516
3528
  "aria-controls": "cookie-banner",
3517
3529
  onClick: openCookieBanner,
3518
- className: "pts-footer-button",
3530
+ className: "pts-footer-button pts-secondary-button",
3519
3531
  children: [
3520
3532
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "sr-only", children: activatedLanguage === "en" ? "PTS Cookies (opens cookie banner)" : "PTS Kakor (\xF6ppnar kakbanner)" }),
3533
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { "aria-hidden": "true", className: "secondary_icon", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Cookie_icon, {}) }),
3521
3534
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { "aria-hidden": "true", children: activatedLanguage === "en" ? "Cookies" : "Kakor" })
3522
3535
  ]
3523
3536
  }
@@ -3951,7 +3964,7 @@ var Header = ({
3951
3964
  "button",
3952
3965
  {
3953
3966
  lang: activatedLanguage === "en" ? "en" : "sv",
3954
- className: "pts-languageButton",
3967
+ className: "pts-languageButton pts-secondary-button",
3955
3968
  onClick: handleLanguageClick,
3956
3969
  children: [
3957
3970
  /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "languageIcon", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(LanguageIcon2, {}) }) }),
@@ -3999,12 +4012,10 @@ var Navigation = ({
3999
4012
  setOpenSubMenu(null);
4000
4013
  return;
4001
4014
  }
4002
- const defaultOpenSubMenu = activePath == null ? null : (_b = (_a = menuLinks.find(
4003
- (link) => {
4004
- var _a2;
4005
- return (_a2 = link.children) == null ? void 0 : _a2.some((child) => child.href.includes(activePath));
4006
- }
4007
- )) == null ? void 0 : _a.label[activatedLanguage]) != null ? _b : null;
4015
+ const defaultOpenSubMenu = activePath == null ? null : (_b = (_a = menuLinks.find((link) => {
4016
+ var _a2;
4017
+ return (_a2 = link.children) == null ? void 0 : _a2.some((child) => child.href.includes(activePath));
4018
+ })) == null ? void 0 : _a.label[activatedLanguage]) != null ? _b : null;
4008
4019
  setOpenSubMenu(defaultOpenSubMenu);
4009
4020
  }, [isOpen, activePath, menuLinks, activatedLanguage]);
4010
4021
  (0, import_react16.useEffect)(() => {
@@ -4085,7 +4096,7 @@ var Navigation = ({
4085
4096
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "pts-navigation-close-container ", id: "menu-close", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
4086
4097
  "button",
4087
4098
  {
4088
- className: "pts-navigation-close-button",
4099
+ className: "pts-navigation-close-button pts-secondary-button",
4089
4100
  onClick: () => handleMenuClick("close"),
4090
4101
  type: "button",
4091
4102
  children: [
@@ -4101,14 +4112,7 @@ var Navigation = ({
4101
4112
  lang: activatedLanguage,
4102
4113
  children: [
4103
4114
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "pts-navigation-button", children: [
4104
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: href && href.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: label[activatedLanguage] }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4105
- LinkComponent,
4106
- {
4107
- onClick: () => handleMenuClick("link"),
4108
- href,
4109
- children: label[activatedLanguage]
4110
- }
4111
- ) }),
4115
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: href && href.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: label[activatedLanguage] }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(LinkComponent, { onClick: () => handleMenuClick("link"), href, children: label[activatedLanguage] }) }),
4112
4116
  children && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4113
4117
  "button",
4114
4118
  {
@@ -4131,14 +4135,15 @@ var Navigation = ({
4131
4135
  className: "pts-sub-navigation-container",
4132
4136
  id: "sub-menu-" + index,
4133
4137
  role: "region",
4134
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("ul", { className: "pts-sub-navigation-list", lang: activatedLanguage, children: children.map(({ label: label2, href: href2 }, index2) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("li", { className: "pts-sub-navigation-item", lang: activatedLanguage, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4135
- LinkComponent,
4138
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("ul", { className: "pts-sub-navigation-list", lang: activatedLanguage, children: children.map(({ label: label2, href: href2 }, index2) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4139
+ "li",
4136
4140
  {
4137
- onClick: () => handleMenuClick("link"),
4138
- href: href2,
4139
- children: label2[activatedLanguage]
4140
- }
4141
- ) }, "nav-child-" + index2)) })
4141
+ className: "pts-sub-navigation-item",
4142
+ lang: activatedLanguage,
4143
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(LinkComponent, { onClick: () => handleMenuClick("link"), href: href2, children: label2[activatedLanguage] })
4144
+ },
4145
+ "nav-child-" + index2
4146
+ )) })
4142
4147
  }
4143
4148
  )
4144
4149
  ]
@@ -4205,7 +4210,7 @@ var import_jsx_runtime33 = require("react/jsx-runtime");
4205
4210
  var NavigationHeader = ({
4206
4211
  headline = void 0,
4207
4212
  homelink = "",
4208
- //??
4213
+ //??
4209
4214
  activatedLanguage = "sv",
4210
4215
  useLanguage = false,
4211
4216
  useNavigationMenu = true,
@@ -4279,14 +4284,23 @@ var NavigationHeader = ({
4279
4284
  ) }),
4280
4285
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: `${hasHeadline ? "pts-navigation-header-headline-container" : ""}`, children: hasHeadline && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "pts-site-headline", children: headline }) }),
4281
4286
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "pts-navigation-header-nav-container", children: (useLanguage || useNavigationMenu || useSearch) && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
4282
- useSearch && !isMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_jsx_runtime33.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("button", { type: "button", onClick: handleSearchClick, children: [
4283
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { "aria-hidden": "true", className: "pts-navigation-header-icons", children: getSearchIcon() }),
4284
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "pts-navigation-header-button-label", children: getSearchLabel() })
4285
- ] }) }),
4287
+ useSearch && !isMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_jsx_runtime33.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
4288
+ "button",
4289
+ {
4290
+ type: "button",
4291
+ className: "pts-secondary-button",
4292
+ onClick: handleSearchClick,
4293
+ children: [
4294
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { "aria-hidden": "true", className: "pts-navigation-header-icons", children: getSearchIcon() }),
4295
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "pts-navigation-header-button-label", children: getSearchLabel() })
4296
+ ]
4297
+ }
4298
+ ) }),
4286
4299
  useLanguage && !isMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
4287
4300
  "button",
4288
4301
  {
4289
4302
  type: "button",
4303
+ className: "pts-secondary-button",
4290
4304
  lang: activatedLanguage === "en" ? "en" : "sv",
4291
4305
  onClick: handleLanguageClick,
4292
4306
  "aria-label": activatedLanguage === "sv" ? "Change language to English" : "\xC4ndra spr\xE5k till svenska",
@@ -4300,12 +4314,20 @@ var NavigationHeader = ({
4300
4314
  "button",
4301
4315
  {
4302
4316
  type: "button",
4317
+ className: "pts-secondary-button",
4303
4318
  onClick: handleMenuClick,
4304
4319
  "aria-expanded": isMenuOpen,
4305
4320
  "aria-controls": "main-navigation",
4306
4321
  ref: menuButtonFocusRef,
4307
4322
  children: [
4308
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { "aria-hidden": "true", className: isMenuOpen ? "pts-close-icon" : "pts-open-icon", children: getMenuIcon() }),
4323
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4324
+ "span",
4325
+ {
4326
+ "aria-hidden": "true",
4327
+ className: isMenuOpen ? "pts-close-icon" : "pts-open-icon",
4328
+ children: getMenuIcon()
4329
+ }
4330
+ ),
4309
4331
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "pts-navigation-header-button-label", children: getMenuLabel() })
4310
4332
  ]
4311
4333
  }