@telia/teddy 0.2.8 → 0.2.9

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.
@@ -1233,25 +1233,29 @@ const DesktopSimplified = React.forwardRef(() => {
1233
1233
  if (!rootContext)
1234
1234
  return null;
1235
1235
  const { setSelectedMenuItem, linkComponent: Link2 } = rootContext;
1236
+ const isBusinessRental = rootContext.pathname.includes("bedrift/utstyrsavtale");
1236
1237
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1237
- components_navigationMenu_globalNavigation_utils.getLinks(rootContext.pathname.includes("bedrift/utstyrsavtale")).map((link) => {
1238
+ components_navigationMenu_globalNavigation_utils.getLinks(isBusinessRental).map((link) => {
1238
1239
  var _a;
1239
1240
  return /* @__PURE__ */ jsxRuntime.jsxs(NavigationMenu.List, { value: link.name, children: [
1240
- (_a = link.links) == null ? void 0 : _a.map((subLink) => /* @__PURE__ */ jsxRuntime.jsx(NavigationMenu.Item, { value: subLink.name, children: subLink.name === "Logo" && /* @__PURE__ */ jsxRuntime.jsx(NavigationMenu.Link, { asChild: true, variant: "button", children: subLink.appKey === rootContext.appKey || rootContext.appKey === "storybook" ? /* @__PURE__ */ jsxRuntime.jsx(Link2, { href: subLink.link, onClick: () => setSelectedMenuItem(""), children: /* @__PURE__ */ jsxRuntime.jsx(
1241
- "img",
1242
- {
1243
- src: "https://cdn.voca.teliacompany.com/logo/Telia-primary-default-v2.svg",
1244
- draggable: "false",
1245
- alt: "Telia logo"
1246
- }
1247
- ) }) : /* @__PURE__ */ jsxRuntime.jsx("a", { href: subLink.link, onClick: () => setSelectedMenuItem(""), children: /* @__PURE__ */ jsxRuntime.jsx(
1248
- "img",
1249
- {
1250
- src: "https://cdn.voca.teliacompany.com/logo/Telia-primary-default-v2.svg",
1251
- draggable: "false",
1252
- alt: "Telia logo"
1253
- }
1254
- ) }) }) }, subLink.name)),
1241
+ (_a = link.links) == null ? void 0 : _a.map((subLink) => /* @__PURE__ */ jsxRuntime.jsxs(NavigationMenu.Item, { value: subLink.name, children: [
1242
+ subLink.name === "Logo" && /* @__PURE__ */ jsxRuntime.jsx(NavigationMenu.Link, { asChild: true, variant: "button", children: subLink.appKey === rootContext.appKey || rootContext.appKey === "storybook" ? /* @__PURE__ */ jsxRuntime.jsx(Link2, { href: subLink.link, onClick: () => setSelectedMenuItem(""), children: /* @__PURE__ */ jsxRuntime.jsx(
1243
+ "img",
1244
+ {
1245
+ src: "https://cdn.voca.teliacompany.com/logo/Telia-primary-default-v2.svg",
1246
+ draggable: "false",
1247
+ alt: "Telia logo"
1248
+ }
1249
+ ) }) : /* @__PURE__ */ jsxRuntime.jsx("a", { href: subLink.link, onClick: () => setSelectedMenuItem(""), children: /* @__PURE__ */ jsxRuntime.jsx(
1250
+ "img",
1251
+ {
1252
+ src: "https://cdn.voca.teliacompany.com/logo/Telia-primary-default-v2.svg",
1253
+ draggable: "false",
1254
+ alt: "Telia logo"
1255
+ }
1256
+ ) }) }),
1257
+ subLink.name === "Hjem" && isBusinessRental && /* @__PURE__ */ jsxRuntime.jsx(NavigationMenu.Link, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: subLink.link, children: subLink.name }) })
1258
+ ] }, subLink.name)),
1255
1259
  /* @__PURE__ */ jsxRuntime.jsx(components_box_box.Box, { ml: "auto" }),
1256
1260
  /* @__PURE__ */ jsxRuntime.jsx(NavigationMenu.Item, { children: /* @__PURE__ */ jsxRuntime.jsx(ShoppingCart, {}) })
1257
1261
  ] }, link.name);
@@ -1212,25 +1212,29 @@ const DesktopSimplified = React__default.forwardRef(() => {
1212
1212
  if (!rootContext)
1213
1213
  return null;
1214
1214
  const { setSelectedMenuItem, linkComponent: Link2 } = rootContext;
1215
+ const isBusinessRental = rootContext.pathname.includes("bedrift/utstyrsavtale");
1215
1216
  return /* @__PURE__ */ jsxs(Fragment, { children: [
1216
- getLinks(rootContext.pathname.includes("bedrift/utstyrsavtale")).map((link) => {
1217
+ getLinks(isBusinessRental).map((link) => {
1217
1218
  var _a;
1218
1219
  return /* @__PURE__ */ jsxs(NavigationMenu.List, { value: link.name, children: [
1219
- (_a = link.links) == null ? void 0 : _a.map((subLink) => /* @__PURE__ */ jsx(NavigationMenu.Item, { value: subLink.name, children: subLink.name === "Logo" && /* @__PURE__ */ jsx(NavigationMenu.Link, { asChild: true, variant: "button", children: subLink.appKey === rootContext.appKey || rootContext.appKey === "storybook" ? /* @__PURE__ */ jsx(Link2, { href: subLink.link, onClick: () => setSelectedMenuItem(""), children: /* @__PURE__ */ jsx(
1220
- "img",
1221
- {
1222
- src: "https://cdn.voca.teliacompany.com/logo/Telia-primary-default-v2.svg",
1223
- draggable: "false",
1224
- alt: "Telia logo"
1225
- }
1226
- ) }) : /* @__PURE__ */ jsx("a", { href: subLink.link, onClick: () => setSelectedMenuItem(""), children: /* @__PURE__ */ jsx(
1227
- "img",
1228
- {
1229
- src: "https://cdn.voca.teliacompany.com/logo/Telia-primary-default-v2.svg",
1230
- draggable: "false",
1231
- alt: "Telia logo"
1232
- }
1233
- ) }) }) }, subLink.name)),
1220
+ (_a = link.links) == null ? void 0 : _a.map((subLink) => /* @__PURE__ */ jsxs(NavigationMenu.Item, { value: subLink.name, children: [
1221
+ subLink.name === "Logo" && /* @__PURE__ */ jsx(NavigationMenu.Link, { asChild: true, variant: "button", children: subLink.appKey === rootContext.appKey || rootContext.appKey === "storybook" ? /* @__PURE__ */ jsx(Link2, { href: subLink.link, onClick: () => setSelectedMenuItem(""), children: /* @__PURE__ */ jsx(
1222
+ "img",
1223
+ {
1224
+ src: "https://cdn.voca.teliacompany.com/logo/Telia-primary-default-v2.svg",
1225
+ draggable: "false",
1226
+ alt: "Telia logo"
1227
+ }
1228
+ ) }) : /* @__PURE__ */ jsx("a", { href: subLink.link, onClick: () => setSelectedMenuItem(""), children: /* @__PURE__ */ jsx(
1229
+ "img",
1230
+ {
1231
+ src: "https://cdn.voca.teliacompany.com/logo/Telia-primary-default-v2.svg",
1232
+ draggable: "false",
1233
+ alt: "Telia logo"
1234
+ }
1235
+ ) }) }),
1236
+ subLink.name === "Hjem" && isBusinessRental && /* @__PURE__ */ jsx(NavigationMenu.Link, { asChild: true, children: /* @__PURE__ */ jsx("a", { href: subLink.link, children: subLink.name }) })
1237
+ ] }, subLink.name)),
1234
1238
  /* @__PURE__ */ jsx(Box, { ml: "auto" }),
1235
1239
  /* @__PURE__ */ jsx(NavigationMenu.Item, { children: /* @__PURE__ */ jsx(ShoppingCart, {}) })
1236
1240
  ] }, link.name);
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "pnpm": ">=9"
21
21
  },
22
22
  "private": false,
23
- "version": "0.2.8",
23
+ "version": "0.2.9",
24
24
  "sideEffects": [
25
25
  "**/*.css",
26
26
  "**/*.svg"