@telia/teddy 0.1.36 → 0.1.37
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.
|
@@ -902,66 +902,73 @@ const Desktop = React.forwardRef(() => {
|
|
|
902
902
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
903
903
|
NavigationMenu.List,
|
|
904
904
|
{
|
|
905
|
-
onMouseEnter: () => setShowMenu(true),
|
|
906
|
-
onMouseLeave: () => setShowMenu(false),
|
|
907
905
|
value: link.name,
|
|
908
906
|
children: [
|
|
909
907
|
(_a = link.links) == null ? void 0 : _a.map(
|
|
910
908
|
(subLink) => {
|
|
911
909
|
var _a2, _b, _c;
|
|
912
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
921
|
-
"a",
|
|
922
|
-
{
|
|
923
|
-
href: subLink.link,
|
|
924
|
-
onMouseEnter: () => handleInteractions(),
|
|
925
|
-
onClick: () => handleInteractions(),
|
|
926
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
910
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
911
|
+
NavigationMenu.Item,
|
|
912
|
+
{
|
|
913
|
+
value: subLink.name,
|
|
914
|
+
onMouseEnter: () => setShowMenu(true),
|
|
915
|
+
onMouseLeave: () => setShowMenu(false),
|
|
916
|
+
children: [
|
|
917
|
+
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, onMouseEnter: () => handleInteractions(), onClick: () => handleInteractions(), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
927
918
|
"img",
|
|
928
919
|
{
|
|
929
920
|
src: "https://cdn.voca.teliacompany.com/logo/Telia-primary-default-v2.svg",
|
|
930
921
|
draggable: "false",
|
|
931
922
|
alt: "Telia logo"
|
|
932
923
|
}
|
|
933
|
-
)
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
924
|
+
) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
925
|
+
"a",
|
|
926
|
+
{
|
|
927
|
+
href: subLink.link,
|
|
928
|
+
onMouseEnter: () => handleInteractions(),
|
|
929
|
+
onClick: () => handleInteractions(),
|
|
930
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
931
|
+
"img",
|
|
932
|
+
{
|
|
933
|
+
src: "https://cdn.voca.teliacompany.com/logo/Telia-primary-default-v2.svg",
|
|
934
|
+
draggable: "false",
|
|
935
|
+
alt: "Telia logo"
|
|
936
|
+
}
|
|
937
|
+
)
|
|
938
|
+
}
|
|
939
|
+
) }) : ((_a2 = subLink.links) == null ? void 0 : _a2.length) ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
940
|
+
NavigationMenu.Trigger,
|
|
941
|
+
{
|
|
942
|
+
asChild: true,
|
|
943
|
+
active: currentLocation === subLink.link,
|
|
944
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(components_button_button.Button, { onMouseEnter: () => handleInteractions(subLink.name), onClick: () => handleInteractions(subLink.name), children: subLink.name })
|
|
945
|
+
}
|
|
946
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
947
|
+
NavigationMenu.Link,
|
|
948
|
+
{
|
|
949
|
+
asChild: true,
|
|
950
|
+
active: selectedMenuItem === subLink.name && currentLocation === subLink.link,
|
|
951
|
+
children: subLink.appKey === rootContext.appKey || rootContext.appKey === "storybook" ? /* @__PURE__ */ jsxRuntime.jsx(Link2, { onMouseEnter: () => handleInteractions(subLink.name), onClick: () => handleInteractions(subLink.name), href: subLink.link, children: subLink.name }) : /* @__PURE__ */ jsxRuntime.jsx("a", { onMouseEnter: () => handleInteractions(subLink.name), onClick: () => handleInteractions(subLink.name), href: subLink.link, children: subLink.name })
|
|
952
|
+
}
|
|
955
953
|
),
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
954
|
+
typeof window !== "undefined" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
955
|
+
"div",
|
|
956
|
+
{
|
|
957
|
+
style: utils_generateStyling_index.mergeStyles(
|
|
958
|
+
{ ["--teddy-viewport-wrapper-height"]: viewPortHeight }
|
|
959
|
+
),
|
|
960
|
+
className: styles[`${rootClassName}__viewport-wrapper`],
|
|
961
|
+
"data-state": showMenu ? "open" : "closed",
|
|
962
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(NavigationMenu.Content, { children: !!specifiedLink && subLink.name === specifiedLink && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
963
|
+
((_b = subLink.links) == null ? void 0 : _b.length) > 0 && /* @__PURE__ */ jsxRuntime.jsx(components_flex_flex.Flex, { direction: "column", pt: "400", pl: "150", pb: "250", children: /* @__PURE__ */ jsxRuntime.jsx(HightlightedLinksDesktop, { listName: subLink.name, setShowMenu, links: subLink.links }) }),
|
|
964
|
+
((_c = subLink.highlightedLinks) == null ? void 0 : _c.length) > 0 && /* @__PURE__ */ jsxRuntime.jsx(components_flex_flex.Flex, { direction: "column", pt: "400", pl: "400", pr: "400", pb: "250", className: styles[`${rootClassName}__colored-box`], children: /* @__PURE__ */ jsxRuntime.jsx(HightlightedLinksDesktop, { listName: "Nyttige snarveier", setShowMenu, links: subLink.highlightedLinks }) })
|
|
965
|
+
] }) })
|
|
966
|
+
}
|
|
967
|
+
)
|
|
968
|
+
]
|
|
969
|
+
},
|
|
970
|
+
subLink.name
|
|
971
|
+
);
|
|
965
972
|
}
|
|
966
973
|
),
|
|
967
974
|
/* @__PURE__ */ jsxRuntime.jsx(components_box_box.Box, { ml: "auto" }),
|
|
@@ -881,66 +881,73 @@ const Desktop = React__default.forwardRef(() => {
|
|
|
881
881
|
return /* @__PURE__ */ jsxs(
|
|
882
882
|
NavigationMenu.List,
|
|
883
883
|
{
|
|
884
|
-
onMouseEnter: () => setShowMenu(true),
|
|
885
|
-
onMouseLeave: () => setShowMenu(false),
|
|
886
884
|
value: link.name,
|
|
887
885
|
children: [
|
|
888
886
|
(_a = link.links) == null ? void 0 : _a.map(
|
|
889
887
|
(subLink) => {
|
|
890
888
|
var _a2, _b, _c;
|
|
891
|
-
return /* @__PURE__ */ jsxs(
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
) }) : /* @__PURE__ */ jsx(
|
|
900
|
-
"a",
|
|
901
|
-
{
|
|
902
|
-
href: subLink.link,
|
|
903
|
-
onMouseEnter: () => handleInteractions(),
|
|
904
|
-
onClick: () => handleInteractions(),
|
|
905
|
-
children: /* @__PURE__ */ jsx(
|
|
889
|
+
return /* @__PURE__ */ jsxs(
|
|
890
|
+
NavigationMenu.Item,
|
|
891
|
+
{
|
|
892
|
+
value: subLink.name,
|
|
893
|
+
onMouseEnter: () => setShowMenu(true),
|
|
894
|
+
onMouseLeave: () => setShowMenu(false),
|
|
895
|
+
children: [
|
|
896
|
+
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, onMouseEnter: () => handleInteractions(), onClick: () => handleInteractions(), children: /* @__PURE__ */ jsx(
|
|
906
897
|
"img",
|
|
907
898
|
{
|
|
908
899
|
src: "https://cdn.voca.teliacompany.com/logo/Telia-primary-default-v2.svg",
|
|
909
900
|
draggable: "false",
|
|
910
901
|
alt: "Telia logo"
|
|
911
902
|
}
|
|
912
|
-
)
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
903
|
+
) }) : /* @__PURE__ */ jsx(
|
|
904
|
+
"a",
|
|
905
|
+
{
|
|
906
|
+
href: subLink.link,
|
|
907
|
+
onMouseEnter: () => handleInteractions(),
|
|
908
|
+
onClick: () => handleInteractions(),
|
|
909
|
+
children: /* @__PURE__ */ jsx(
|
|
910
|
+
"img",
|
|
911
|
+
{
|
|
912
|
+
src: "https://cdn.voca.teliacompany.com/logo/Telia-primary-default-v2.svg",
|
|
913
|
+
draggable: "false",
|
|
914
|
+
alt: "Telia logo"
|
|
915
|
+
}
|
|
916
|
+
)
|
|
917
|
+
}
|
|
918
|
+
) }) : ((_a2 = subLink.links) == null ? void 0 : _a2.length) ? /* @__PURE__ */ jsx(
|
|
919
|
+
NavigationMenu.Trigger,
|
|
920
|
+
{
|
|
921
|
+
asChild: true,
|
|
922
|
+
active: currentLocation === subLink.link,
|
|
923
|
+
children: /* @__PURE__ */ jsx(Button, { onMouseEnter: () => handleInteractions(subLink.name), onClick: () => handleInteractions(subLink.name), children: subLink.name })
|
|
924
|
+
}
|
|
925
|
+
) : /* @__PURE__ */ jsx(
|
|
926
|
+
NavigationMenu.Link,
|
|
927
|
+
{
|
|
928
|
+
asChild: true,
|
|
929
|
+
active: selectedMenuItem === subLink.name && currentLocation === subLink.link,
|
|
930
|
+
children: subLink.appKey === rootContext.appKey || rootContext.appKey === "storybook" ? /* @__PURE__ */ jsx(Link2, { onMouseEnter: () => handleInteractions(subLink.name), onClick: () => handleInteractions(subLink.name), href: subLink.link, children: subLink.name }) : /* @__PURE__ */ jsx("a", { onMouseEnter: () => handleInteractions(subLink.name), onClick: () => handleInteractions(subLink.name), href: subLink.link, children: subLink.name })
|
|
931
|
+
}
|
|
934
932
|
),
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
933
|
+
typeof window !== "undefined" && /* @__PURE__ */ jsx(
|
|
934
|
+
"div",
|
|
935
|
+
{
|
|
936
|
+
style: mergeStyles(
|
|
937
|
+
{ ["--teddy-viewport-wrapper-height"]: viewPortHeight }
|
|
938
|
+
),
|
|
939
|
+
className: styles[`${rootClassName}__viewport-wrapper`],
|
|
940
|
+
"data-state": showMenu ? "open" : "closed",
|
|
941
|
+
children: /* @__PURE__ */ jsx(NavigationMenu.Content, { children: !!specifiedLink && subLink.name === specifiedLink && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
942
|
+
((_b = subLink.links) == null ? void 0 : _b.length) > 0 && /* @__PURE__ */ jsx(Flex, { direction: "column", pt: "400", pl: "150", pb: "250", children: /* @__PURE__ */ jsx(HightlightedLinksDesktop, { listName: subLink.name, setShowMenu, links: subLink.links }) }),
|
|
943
|
+
((_c = subLink.highlightedLinks) == null ? void 0 : _c.length) > 0 && /* @__PURE__ */ jsx(Flex, { direction: "column", pt: "400", pl: "400", pr: "400", pb: "250", className: styles[`${rootClassName}__colored-box`], children: /* @__PURE__ */ jsx(HightlightedLinksDesktop, { listName: "Nyttige snarveier", setShowMenu, links: subLink.highlightedLinks }) })
|
|
944
|
+
] }) })
|
|
945
|
+
}
|
|
946
|
+
)
|
|
947
|
+
]
|
|
948
|
+
},
|
|
949
|
+
subLink.name
|
|
950
|
+
);
|
|
944
951
|
}
|
|
945
952
|
),
|
|
946
953
|
/* @__PURE__ */ jsx(Box, { ml: "auto" }),
|