@telia/teddy 0.6.16 → 0.7.0

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.
Files changed (138) hide show
  1. package/dist/assets/ajax-loader.0b80f665-teddy.gif +0 -0
  2. package/dist/assets/slick.25572f22-teddy.eot +0 -0
  3. package/dist/assets/slick.653a4cbb-teddy.woff +0 -0
  4. package/dist/assets/slick.6aa1ee46-teddy.ttf +0 -0
  5. package/dist/components/avatar/avatar-root.d.ts +1 -1
  6. package/dist/components/avatar/index.d.ts +1 -1
  7. package/dist/components/avatar/utils.cjs +1 -2
  8. package/dist/components/avatar/utils.js +1 -2
  9. package/dist/components/badge/badge.js +1 -1
  10. package/dist/components/button/button.js +1 -1
  11. package/dist/components/card/card-availability.d.ts +1 -1
  12. package/dist/components/card/card.cjs +6 -12
  13. package/dist/components/card/card.js +6 -12
  14. package/dist/components/channel-button/channel-button-root.d.ts +3 -3
  15. package/dist/components/channel-button/index.d.ts +3 -3
  16. package/dist/components/checkbox/checkbox-group.cjs +1 -2
  17. package/dist/components/checkbox/checkbox-group.js +1 -2
  18. package/dist/components/chip/chip-indicator.d.ts +1 -1
  19. package/dist/components/chip/index.d.ts +1 -1
  20. package/dist/components/circle-bar/css.cjs +1 -2
  21. package/dist/components/circle-bar/css.js +1 -2
  22. package/dist/components/dashboard-card/dashboard-card-avatar.d.ts +1 -1
  23. package/dist/components/dashboard-card/dashboard-card-root.js +1 -1
  24. package/dist/components/date-picker/css.cjs +1 -2
  25. package/dist/components/date-picker/css.js +1 -2
  26. package/dist/components/date-picker/date-picker-month.js +1 -1
  27. package/dist/components/date-picker/date-picker.cjs +6 -12
  28. package/dist/components/date-picker/date-picker.js +7 -13
  29. package/dist/components/date-picker/date-utils.cjs +13 -26
  30. package/dist/components/date-picker/date-utils.js +13 -26
  31. package/dist/components/expandable-card/expandable-card-button.d.ts +2 -2
  32. package/dist/components/expandable-card/index.d.ts +2 -2
  33. package/dist/components/flip-card/flip-card-root.cjs +1 -2
  34. package/dist/components/flip-card/flip-card-root.js +1 -2
  35. package/dist/components/flip-card/flip-card-trigger.d.ts +2 -2
  36. package/dist/components/icon/AllIcons.cjs +9 -9
  37. package/dist/components/icon/AllIcons.js +9 -9
  38. package/dist/components/icon/icon.cjs +2 -2
  39. package/dist/components/icon/icon.js +2 -2
  40. package/dist/components/icon/index.cjs +1 -2
  41. package/dist/components/icon/index.d.ts +0 -2
  42. package/dist/components/icon/index.js +3 -4
  43. package/dist/components/icon/utils.d.ts +1 -1
  44. package/dist/components/index.cjs +6 -7
  45. package/dist/components/index.js +3 -4
  46. package/dist/components/input/index.cjs +5 -5
  47. package/dist/components/input/index.d.ts +1 -1
  48. package/dist/components/input/input-clear-button.cjs +2 -3
  49. package/dist/components/input/input-clear-button.js +1 -2
  50. package/dist/components/input/input-group.cjs +10 -14
  51. package/dist/components/input/input-group.js +10 -14
  52. package/dist/components/input/input-indicator.cjs +1 -1
  53. package/dist/components/input/input.cjs +2 -2
  54. package/dist/components/meter-bar/index.cjs +2 -2
  55. package/dist/components/meter-bar/meter-bar-indicator.cjs +3 -0
  56. package/dist/components/meter-bar/meter-bar-indicator.js +5 -2
  57. package/dist/components/meter-bar/meter-bar-root.cjs +3 -3
  58. package/dist/components/metricmeter/css.cjs +1 -2
  59. package/dist/components/metricmeter/css.js +1 -2
  60. package/dist/components/modal/index.cjs +1 -1
  61. package/dist/components/modal/modal-close.cjs +1 -1
  62. package/dist/components/modal/modal-title.d.ts +2 -2
  63. package/dist/components/navigation-menu/global-navigation/global-navigation-desktop-simplified.cjs +1 -1
  64. package/dist/components/navigation-menu/global-navigation/global-navigation-desktop.cjs +1 -1
  65. package/dist/components/navigation-menu/global-navigation/global-navigation-mobile-simplified.cjs +1 -1
  66. package/dist/components/navigation-menu/global-navigation/global-navigation-mobile.cjs +2 -2
  67. package/dist/components/navigation-menu/global-navigation/global-navigation-mobile.d.ts +1 -1
  68. package/dist/components/navigation-menu/global-navigation/global-navigation-my-pages.cjs +1 -1
  69. package/dist/components/navigation-menu/global-navigation/global-navigation-root.cjs +1 -1
  70. package/dist/components/navigation-menu/global-navigation/global-navigation-root.d.ts +2 -1
  71. package/dist/components/navigation-menu/global-navigation/global-navigation-search-field.cjs +1 -1
  72. package/dist/components/navigation-menu/global-navigation/global-navigation-search.cjs +1 -1
  73. package/dist/components/navigation-menu/global-navigation/global-navigation-shopping-cart.cjs +1 -1
  74. package/dist/components/navigation-menu/global-navigation/index.cjs +1 -1
  75. package/dist/components/navigation-menu/global-navigation/utils.cjs +32 -0
  76. package/dist/components/navigation-menu/global-navigation/utils.d.ts +26 -0
  77. package/dist/components/navigation-menu/global-navigation/utils.js +32 -0
  78. package/dist/components/navigation-menu/index.cjs +2 -2
  79. package/dist/components/navigation-menu/index.d.ts +1 -0
  80. package/dist/components/navigation-menu/navigation-menu.cjs +3 -3
  81. package/dist/components/notabene/notabene-icon.cjs +1 -2
  82. package/dist/components/notabene/notabene-icon.d.ts +1 -1
  83. package/dist/components/notabene/notabene-icon.js +1 -2
  84. package/dist/components/notification/index.d.ts +4 -4
  85. package/dist/components/notification/notification-footer.cjs +1 -2
  86. package/dist/components/notification/notification-footer.js +1 -2
  87. package/dist/components/notification/notification-heading.cjs +1 -2
  88. package/dist/components/notification/notification-heading.js +1 -2
  89. package/dist/components/notification/notification-icon.cjs +1 -2
  90. package/dist/components/notification/notification-icon.d.ts +1 -1
  91. package/dist/components/notification/notification-icon.js +1 -2
  92. package/dist/components/notification/notification-root.d.ts +4 -4
  93. package/dist/components/radio-card-group/index.cjs +1 -1
  94. package/dist/components/radio-card-group/radio-card-group-content.cjs +1 -1
  95. package/dist/components/radio-card-group/radio-card-group-item-title.cjs +53 -49
  96. package/dist/components/radio-card-group/radio-card-group-item-title.js +54 -50
  97. package/dist/components/radio-card-group/radio-card-group-item.cjs +2 -2
  98. package/dist/components/scroll-area/index.cjs +3 -3
  99. package/dist/components/scroll-area/index.d.ts +2 -2
  100. package/dist/components/scroll-area/index.js +1 -1
  101. package/dist/components/scroll-area/scroll-area-bar.cjs +1 -1
  102. package/dist/components/scroll-area/scroll-area-button.cjs +1 -1
  103. package/dist/components/scroll-area/scroll-area-button.d.ts +2 -2
  104. package/dist/components/scroll-area/scroll-area-corner.cjs +1 -1
  105. package/dist/components/scroll-area/scroll-area-item.cjs +4 -6
  106. package/dist/components/scroll-area/scroll-area-item.js +2 -4
  107. package/dist/components/scroll-area/scroll-area-root.cjs +3 -3
  108. package/dist/components/scroll-area/scroll-area-thumb.cjs +9 -6
  109. package/dist/components/scroll-area/scroll-area-thumb.js +9 -6
  110. package/dist/components/select/select-root.cjs +1 -2
  111. package/dist/components/select/select-root.js +1 -2
  112. package/dist/components/skeleton/skeleton-root.cjs +1 -2
  113. package/dist/components/skeleton/skeleton-root.js +1 -2
  114. package/dist/components/spinner/spinner.cjs +2 -9
  115. package/dist/components/spinner/spinner.js +2 -9
  116. package/dist/components/tabs/tabs-list.cjs +1 -2
  117. package/dist/components/tabs/tabs-list.js +1 -2
  118. package/dist/components/tabs/tabs-scroll-button.d.ts +2 -2
  119. package/dist/components/tabs/tabs-trigger.cjs +1 -2
  120. package/dist/components/tabs/tabs-trigger.js +1 -2
  121. package/dist/components/text-field/index.d.ts +2 -2
  122. package/dist/components/text-field/text-field-button.d.ts +2 -2
  123. package/dist/components/text-field/text-field-error-list.cjs +2 -4
  124. package/dist/components/text-field/text-field-error-list.d.ts +1 -1
  125. package/dist/components/text-field/text-field-error-list.js +2 -4
  126. package/dist/components/toggle/toggle.cjs +2 -4
  127. package/dist/components/toggle/toggle.d.ts +1 -1
  128. package/dist/components/toggle/toggle.js +2 -4
  129. package/dist/icons/category.cjs +3 -3
  130. package/dist/icons/category.d.ts +8 -8
  131. package/dist/icons/category.js +3 -3
  132. package/dist/icons/name.cjs +3 -3
  133. package/dist/icons/name.d.ts +1 -1
  134. package/dist/icons/name.js +3 -3
  135. package/dist/main.cjs +6 -7
  136. package/dist/main.js +3 -4
  137. package/dist/style.css +3 -3
  138. package/package.json +67 -77
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import React__default, { useEffect } from "react";
3
3
  import clsx from "clsx";
4
- import { MY_PAGE_LINKS, LOGGED_IN_LINKS_BUSINESS, PRIVATE_LINKS, BUSINESS_LINKS, BUSINESS_UKKO_LINKS, MDU_LINKS, getLinks, getActiveSubLink } from "../navigation-menu/global-navigation/utils.js";
4
+ import { MY_PAGE_RETAILER_LINKS, MY_PAGE_LINKS, LOGGED_IN_LINKS_BUSINESS, PRIVATE_LINKS, BUSINESS_LINKS, BUSINESS_UKKO_LINKS, MDU_LINKS, getLinks, getActiveSubLink } from "../navigation-menu/global-navigation/utils.js";
5
5
  import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
6
6
  import { useComposedRefs } from "../../utils/composeRefs.js";
7
7
  import { VisuallyHidden } from "../visually-hidden/visually-hidden.js";
@@ -218,15 +218,13 @@ const Root$1 = React__default.forwardRef(
218
218
  if (contentRef.current) {
219
219
  restoreContentTabOrderRef.current();
220
220
  const candidates = getTabbableCandidates(contentRef.current);
221
- if (candidates.length)
222
- focusFirst(side === "start" ? candidates : candidates.reverse());
221
+ if (candidates.length) focusFirst(side === "start" ? candidates : candidates.reverse());
223
222
  }
224
223
  }, []);
225
224
  const handleContentExit = React__default.useCallback(() => {
226
225
  if (contentRef.current) {
227
226
  const candidates = getTabbableCandidates(contentRef.current);
228
- if (candidates.length)
229
- restoreContentTabOrderRef.current = removeFromTabOrder(candidates);
227
+ if (candidates.length) restoreContentTabOrderRef.current = removeFromTabOrder(candidates);
230
228
  }
231
229
  }, []);
232
230
  React__default.useEffect(() => {
@@ -320,13 +318,11 @@ const TopMenuTrigger = React__default.forwardRef(
320
318
  const isFocusNavigationKey = ["Home", "End", ...ARROW_KEYS].includes(event.key);
321
319
  if (isFocusNavigationKey) {
322
320
  const triggers = (_a = context.topMenuRef.current) == null ? void 0 : _a.querySelectorAll(`[${ITEM_DATA_ATTR}]`);
323
- if (!triggers)
324
- return;
321
+ if (!triggers) return;
325
322
  let candidateNodes = Array.from(triggers == null ? void 0 : triggers.values());
326
323
  const prevItemKey = context.dir === "rtl" ? "ArrowRight" : "ArrowLeft";
327
324
  const prevKeys = [prevItemKey, "ArrowUp", "End"];
328
- if (prevKeys.includes(event.key))
329
- candidateNodes.reverse();
325
+ if (prevKeys.includes(event.key)) candidateNodes.reverse();
330
326
  if (ARROW_KEYS.includes(event.key)) {
331
327
  const currentIndex = candidateNodes.indexOf(event.currentTarget);
332
328
  candidateNodes = candidateNodes.slice(currentIndex + 1);
@@ -363,8 +359,7 @@ const List = React__default.forwardRef(
363
359
  const refOnOpen = useComposedRefs(context.contentRef, forwardRef);
364
360
  const hasTopMenu = context.selectedTopMenu !== void 0;
365
361
  const isOpen = context.selectedTopMenu === value;
366
- if (!isOpen)
367
- return null;
362
+ if (!isOpen) return null;
368
363
  return /* @__PURE__ */ jsx(
369
364
  NavigationMenuPrimitive.List,
370
365
  {
@@ -373,8 +368,7 @@ const List = React__default.forwardRef(
373
368
  ...props,
374
369
  onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
375
370
  var _a;
376
- if (!value)
377
- return;
371
+ if (!value) return;
378
372
  const isMetaKey = event.altKey || event.ctrlKey || event.metaKey;
379
373
  const isTabKey = event.key === "Tab" && !isMetaKey;
380
374
  if (isTabKey) {
@@ -513,20 +507,17 @@ function getTabbableCandidates(container) {
513
507
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
514
508
  acceptNode: (node) => {
515
509
  const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
516
- if (node.disabled || node.hidden || isHiddenInput)
517
- return NodeFilter.FILTER_SKIP;
510
+ if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
518
511
  return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
519
512
  }
520
513
  });
521
- while (walker.nextNode())
522
- nodes.push(walker.currentNode);
514
+ while (walker.nextNode()) nodes.push(walker.currentNode);
523
515
  return nodes;
524
516
  }
525
517
  function focusFirst(candidates) {
526
518
  const previouslyFocusedElement = document.activeElement;
527
519
  return candidates.some((candidate) => {
528
- if (candidate === previouslyFocusedElement)
529
- return true;
520
+ if (candidate === previouslyFocusedElement) return true;
530
521
  candidate.focus();
531
522
  return document.activeElement !== previouslyFocusedElement;
532
523
  });
@@ -622,8 +613,16 @@ function LoggedOutContent() {
622
613
  ] });
623
614
  }
624
615
  function LoggedInContent() {
625
- var _a;
616
+ var _a, _b, _c;
626
617
  const rootContext = React__default.useContext(RootContext);
618
+ const isRetailerLoggedIn = (_a = rootContext == null ? void 0 : rootContext.loggedInUser) == null ? void 0 : _a.isRetailer;
619
+ if (isRetailerLoggedIn) {
620
+ return /* @__PURE__ */ jsxs(TextSpacing, { children: [
621
+ /* @__PURE__ */ jsx(Heading, { variant: "title-100", as: "h3", mb: "100", mt: "400", children: "Min Side" }),
622
+ (_b = MY_PAGE_RETAILER_LINKS.links) == null ? void 0 : _b.map((link) => /* @__PURE__ */ jsx(Button, { variant: "list-item", fullWidth: true, asChild: true, children: /* @__PURE__ */ jsx("a", { href: link.link, children: /* @__PURE__ */ jsx(Icon, { name: link.icon, children: link.name }) }) }, link.link)),
623
+ /* @__PURE__ */ jsx(Button, { mt: "200", onClick: () => rootContext == null ? void 0 : rootContext.onLogoutClick(), variant: "secondary", children: /* @__PURE__ */ jsx(Icon, { name: "logout", children: "Logg ut" }) })
624
+ ] });
625
+ }
627
626
  return /* @__PURE__ */ jsxs(Fragment, { children: [
628
627
  /* @__PURE__ */ jsx(Drawer.Title, { children: "Mine sider" }),
629
628
  /* @__PURE__ */ jsxs(Tabs, { defaultValue: "private", children: [
@@ -634,7 +633,7 @@ function LoggedInContent() {
634
633
  /* @__PURE__ */ jsxs(TextSpacing, { children: [
635
634
  /* @__PURE__ */ jsxs(Tabs.Content, { value: "private", children: [
636
635
  /* @__PURE__ */ jsx(Heading, { variant: "title-100", as: "h3", mb: "100", mt: "400", children: "Min Side" }),
637
- (_a = MY_PAGE_LINKS.links) == null ? void 0 : _a.map((link) => /* @__PURE__ */ jsx(Button, { variant: "list-item", fullWidth: true, asChild: true, children: /* @__PURE__ */ jsx("a", { href: link.link, children: /* @__PURE__ */ jsx(Icon, { name: link.icon, children: link.name }) }) }, link.link))
636
+ (_c = MY_PAGE_LINKS.links) == null ? void 0 : _c.map((link) => /* @__PURE__ */ jsx(Button, { variant: "list-item", fullWidth: true, asChild: true, children: /* @__PURE__ */ jsx("a", { href: link.link, children: /* @__PURE__ */ jsx(Icon, { name: link.icon, children: link.name }) }) }, link.link))
638
637
  ] }),
639
638
  /* @__PURE__ */ jsxs(Tabs.Content, { value: "business", children: [
640
639
  /* @__PURE__ */ jsx(Heading, { variant: "title-100", as: "h3", mb: "100", mt: "400", children: "Bedriftsportaler" }),
@@ -659,8 +658,7 @@ const SearchField = React__default.forwardRef(
659
658
  if (context == null ? void 0 : context.onSearchSubmit) {
660
659
  context.onSearchSubmit(e, (_a = ref.current) == null ? void 0 : _a.value);
661
660
  }
662
- if (!window || e.isDefaultPrevented())
663
- return;
661
+ if (!window || e.isDefaultPrevented()) return;
664
662
  e.preventDefault();
665
663
  window.location.href = `/sok?q=${encodeURIComponent(((_b = ref.current) == null ? void 0 : _b.value) || "")}`;
666
664
  },
@@ -735,8 +733,7 @@ const ShoppingCart = React__default.forwardRef(() => {
735
733
  const shoppingCartContent = rootContext == null ? void 0 : rootContext.shoppingCart;
736
734
  const numberOfItemsInCart = (rootContext == null ? void 0 : rootContext.shoppingCartNumberOfItems) || 0;
737
735
  const titleSuffix = numberOfItemsInCart > 0 ? `(${numberOfItemsInCart})` : "";
738
- if (!numberOfItemsInCart)
739
- return null;
736
+ if (!numberOfItemsInCart) return null;
740
737
  return /* @__PURE__ */ jsxs(Drawer, { open: rootContext == null ? void 0 : rootContext.isCartOpen, onOpenChange: rootContext == null ? void 0 : rootContext.onCartOpenChange, children: [
741
738
  /* @__PURE__ */ jsx(NavigationMenu.Link, { asChild: true, variant: "button", children: /* @__PURE__ */ jsx(Drawer.Trigger, { children: /* @__PURE__ */ jsxs("button", { children: [
742
739
  /* @__PURE__ */ jsxs("div", { className: clsx([styles[`${rootClassName}__item-wrapper`]]), children: [
@@ -776,8 +773,7 @@ const Desktop = React__default.forwardRef(() => {
776
773
  React__default.useEffect(() => {
777
774
  setIsClientSide(true);
778
775
  }, []);
779
- if (!rootContext)
780
- return null;
776
+ if (!rootContext) return null;
781
777
  const { selectedMenuItem, setSelectedMenuItem, linkComponent: Link2, specifiedLink, setSpecifiedLink } = rootContext;
782
778
  const currentLocation = rootContext.pathname.endsWith("/") ? rootContext.pathname : `${rootContext.pathname}/`;
783
779
  const handleInteractions = (linkName) => {
@@ -929,8 +925,7 @@ const Desktop = React__default.forwardRef(() => {
929
925
  Desktop.displayName = "Desktop";
930
926
  const HightlightedLinksDesktop = ({ links, listName, colored, setShowMenu }) => {
931
927
  const rootContext = React__default.useContext(RootContext);
932
- if (!rootContext)
933
- return null;
928
+ if (!rootContext) return null;
934
929
  const { linkComponent: Link2, setSpecifiedLink, setSelectedMenuItem } = rootContext;
935
930
  const currentLocation = rootContext.pathname.endsWith("/") ? rootContext.pathname : `${rootContext.pathname}/`;
936
931
  const firstPart = links.slice(0, 4);
@@ -991,8 +986,7 @@ function Mobile(props) {
991
986
  const [specifiedLink, setSpecifiedLink] = React__default.useState("");
992
987
  const rootContext = React__default.useContext(RootContext);
993
988
  const drawerRef = React__default.useRef(null);
994
- if (!rootContext)
995
- return null;
989
+ if (!rootContext) return null;
996
990
  const { linkComponent: NavLink } = rootContext;
997
991
  const classes = clsx([styles[`${rootClassName}__mobile`]], props.className);
998
992
  const linkClasses = clsx([styles[`${rootClassName}__link`]]);
@@ -1107,8 +1101,7 @@ const HighlightedLinks = ({
1107
1101
  drawerRef
1108
1102
  }) => {
1109
1103
  const rootContext = React__default.useContext(RootContext);
1110
- if (!rootContext)
1111
- return null;
1104
+ if (!rootContext) return null;
1112
1105
  const { linkComponent: NavLink } = rootContext;
1113
1106
  const currentLocation = rootContext.pathname;
1114
1107
  return /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -1137,8 +1130,7 @@ const HighlightedLinks = ({
1137
1130
  };
1138
1131
  const DesktopSimplified = React__default.forwardRef(() => {
1139
1132
  const rootContext = React__default.useContext(RootContext);
1140
- if (!rootContext)
1141
- return null;
1133
+ if (!rootContext) return null;
1142
1134
  const { setSelectedMenuItem, linkComponent: Link2 } = rootContext;
1143
1135
  const isBusinessRental = rootContext.pathname.includes("bedrift/utstyrsavtale");
1144
1136
  return /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -1173,8 +1165,7 @@ const DesktopSimplified = React__default.forwardRef(() => {
1173
1165
  DesktopSimplified.displayName = "DesktopSimplified";
1174
1166
  function MobileSimplified(props) {
1175
1167
  const rootContext = React__default.useContext(RootContext);
1176
- if (!rootContext)
1177
- return null;
1168
+ if (!rootContext) return null;
1178
1169
  const { linkComponent: NavLink } = rootContext;
1179
1170
  const classes = clsx([styles[`${rootClassName}__mobile`]], props.className);
1180
1171
  return /* @__PURE__ */ jsx(Flex, { ...props, className: classes, children: /* @__PURE__ */ jsxs(Flex, { flexGrow: "1", justify: "between", align: "center", gap: "200", children: [
@@ -1222,21 +1213,18 @@ function Root({
1222
1213
  loggedInUser,
1223
1214
  selectedMenuItem,
1224
1215
  setSelectedMenuItem(v, onlyStateChange) {
1225
- if (appKey === "open-pages" && !onlyStateChange)
1226
- return;
1216
+ if (appKey === "open-pages" && !onlyStateChange) return;
1227
1217
  setSelectedMenuItem(v);
1228
1218
  },
1229
1219
  linkComponent,
1230
1220
  selectedDomainItem,
1231
1221
  setSelectedDomainItem(v, onlyStateChange) {
1232
- if (appKey === "open-pages" && !onlyStateChange)
1233
- return;
1222
+ if (appKey === "open-pages" && !onlyStateChange) return;
1234
1223
  setSelectedDomainItem(v);
1235
1224
  },
1236
1225
  pathname,
1237
1226
  setPathname(v) {
1238
- if (appKey === "open-pages")
1239
- return;
1227
+ if (appKey === "open-pages") return;
1240
1228
  setPathname(v);
1241
1229
  },
1242
1230
  onLogoutClick,
@@ -1261,8 +1249,7 @@ function Root({
1261
1249
  onTopMenuValueChange: setSelectedDomainItem,
1262
1250
  value: selectedMenuItem,
1263
1251
  onValueChange: (v) => {
1264
- if (v === "" || appKey === "open-pages")
1265
- return;
1252
+ if (v === "" || appKey === "open-pages") return;
1266
1253
  setSelectedMenuItem(v);
1267
1254
  },
1268
1255
  children: [
@@ -1282,8 +1269,7 @@ function Root({
1282
1269
  }
1283
1270
  Root.displayName = "Root";
1284
1271
  function getInitialDomain(currentPath) {
1285
- if (!currentPath)
1286
- return PRIVATE_LINKS.name;
1272
+ if (!currentPath) return PRIVATE_LINKS.name;
1287
1273
  const locationArray = currentPath ? currentPath.split("/") : [];
1288
1274
  const domainPartOfLocation = `/${locationArray[1].toLowerCase()}/`;
1289
1275
  const initDomain = domainPartOfLocation === BUSINESS_LINKS.link ? BUSINESS_LINKS.name : domainPartOfLocation === MDU_LINKS.link ? MDU_LINKS.name : PRIVATE_LINKS.name;
@@ -1291,8 +1277,7 @@ function getInitialDomain(currentPath) {
1291
1277
  }
1292
1278
  function getInitialMenuItem(currentPath) {
1293
1279
  var _a, _b, _c, _d, _e, _f;
1294
- if (!currentPath)
1295
- return;
1280
+ if (!currentPath) return;
1296
1281
  const locationArray = currentPath ? currentPath.split("/") : [];
1297
1282
  const initialDomain = getInitialDomain(currentPath);
1298
1283
  if (initialDomain === "Bedrift") {
@@ -1318,14 +1303,32 @@ Root.displayName = "GlobalNavigation";
1318
1303
  const GlobalNavigation = Root;
1319
1304
  export {
1320
1305
  Content$1 as C,
1306
+ Close,
1307
+ Content$1 as Content,
1321
1308
  Desktop as D,
1309
+ Desktop,
1310
+ DesktopSimplified,
1322
1311
  GlobalNavigation as G,
1312
+ GlobalNavigation,
1323
1313
  HighlightedLinks as H,
1314
+ HighlightedLinks,
1324
1315
  ItemContext as I,
1316
+ Item$1 as Item,
1317
+ ItemContext,
1325
1318
  Modal as M,
1319
+ Mobile,
1320
+ MobileSimplified,
1321
+ Modal,
1322
+ MyPages,
1326
1323
  NavigationMenu as N,
1324
+ NavigationMenu,
1327
1325
  RadioCardGroup as R,
1326
+ RadioCardGroup,
1328
1327
  Separator as S,
1328
+ Search,
1329
+ SearchField,
1330
+ Separator,
1331
+ ShoppingCart,
1329
1332
  Title,
1330
1333
  Item$1 as a,
1331
1334
  Close as b,
@@ -1339,5 +1342,6 @@ export {
1339
1342
  rootClassName as j,
1340
1343
  RootContext as k,
1341
1344
  Root as l,
1342
- rootClassName$1 as r
1345
+ rootClassName$1 as r,
1346
+ rootClassName$1 as rootClassName
1343
1347
  };
@@ -60,5 +60,5 @@ require("../container/container.cjs");
60
60
  require("../carousel/carousel-root.cjs");
61
61
  require("../slider/slider.cjs");
62
62
  require("../../utils/composeRefs.cjs");
63
- exports.Item = components_radioCardGroup_radioCardGroupItemTitle.Item;
64
- exports.ItemContext = components_radioCardGroup_radioCardGroupItemTitle.ItemContext;
63
+ exports.Item = components_radioCardGroup_radioCardGroupItemTitle.Item$1;
64
+ exports.ItemContext = components_radioCardGroup_radioCardGroupItemTitle.ItemContext$1;
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const components_scrollArea_scrollAreaThumb = require("./scroll-area-thumb.cjs");
4
4
  const components_scrollArea_scrollAreaItem = require("./scroll-area-item.cjs");
5
- const ScrollArea = Object.assign(components_scrollArea_scrollAreaThumb.Root, {
5
+ const ScrollArea = Object.assign(components_scrollArea_scrollAreaThumb.Root$1, {
6
6
  Item: components_scrollArea_scrollAreaItem.Item,
7
- Button: components_scrollArea_scrollAreaThumb.Button,
8
- Scrollbar: components_scrollArea_scrollAreaThumb.Scrollbar
7
+ Button: components_scrollArea_scrollAreaThumb.Button$1,
8
+ Scrollbar: components_scrollArea_scrollAreaThumb.Scrollbar$1
9
9
  });
10
10
  exports.ScrollArea = ScrollArea;
@@ -22,7 +22,7 @@ export declare const ScrollArea: import('react').ForwardRefExoticComponent<Omit<
22
22
  fullWidth?: boolean | undefined;
23
23
  size?: "sm" | "md" | "lg" | undefined;
24
24
  variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
25
- borderStyle?: ("default" | "dashed") | undefined;
25
+ borderStyle?: ("dashed" | "default") | undefined;
26
26
  } & {
27
27
  iconOnly: true;
28
28
  "aria-label": string;
@@ -34,7 +34,7 @@ export declare const ScrollArea: import('react').ForwardRefExoticComponent<Omit<
34
34
  fullWidth?: boolean | undefined;
35
35
  size?: "sm" | "md" | "lg" | undefined;
36
36
  variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
37
- borderStyle?: ("default" | "dashed") | undefined;
37
+ borderStyle?: ("dashed" | "default") | undefined;
38
38
  } & {
39
39
  iconOnly?: false | undefined;
40
40
  "aria-label"?: string | undefined;
@@ -1,4 +1,4 @@
1
- import { R as Root, B as Button, S as Scrollbar } from "./scroll-area-thumb.js";
1
+ import { R as Root, S as Scrollbar, B as Button } from "./scroll-area-thumb.js";
2
2
  import { Item } from "./scroll-area-item.js";
3
3
  const ScrollArea = Object.assign(Root, {
4
4
  Item,
@@ -5,4 +5,4 @@ require("react");
5
5
  require("clsx");
6
6
  require("@radix-ui/react-scroll-area");
7
7
  const components_scrollArea_scrollAreaThumb = require("./scroll-area-thumb.cjs");
8
- exports.Scrollbar = components_scrollArea_scrollAreaThumb.Scrollbar;
8
+ exports.Scrollbar = components_scrollArea_scrollAreaThumb.Scrollbar$1;
@@ -8,4 +8,4 @@ require("../button/button.cjs");
8
8
  require("../../utils/composeEventHandlers.cjs");
9
9
  require("../../assets/sprite.c7653d19-teddy.svg");
10
10
  require("../icon/icon.cjs");
11
- exports.Button = components_scrollArea_scrollAreaThumb.Button;
11
+ exports.Button = components_scrollArea_scrollAreaThumb.Button$1;
@@ -18,7 +18,7 @@ export declare const Button: React.ForwardRefExoticComponent<Omit<Omit<Omit<Reac
18
18
  fullWidth?: boolean | undefined;
19
19
  size?: "sm" | "md" | "lg" | undefined;
20
20
  variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
21
- borderStyle?: ("default" | "dashed") | undefined;
21
+ borderStyle?: ("dashed" | "default") | undefined;
22
22
  } & {
23
23
  iconOnly: true;
24
24
  "aria-label": string;
@@ -30,7 +30,7 @@ export declare const Button: React.ForwardRefExoticComponent<Omit<Omit<Omit<Reac
30
30
  fullWidth?: boolean | undefined;
31
31
  size?: "sm" | "md" | "lg" | undefined;
32
32
  variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
33
- borderStyle?: ("default" | "dashed") | undefined;
33
+ borderStyle?: ("dashed" | "default") | undefined;
34
34
  } & {
35
35
  iconOnly?: false | undefined;
36
36
  "aria-label"?: string | undefined;
@@ -5,4 +5,4 @@ require("react");
5
5
  require("clsx");
6
6
  require("@radix-ui/react-scroll-area");
7
7
  const components_scrollArea_scrollAreaThumb = require("./scroll-area-thumb.cjs");
8
- exports.Corner = components_scrollArea_scrollAreaThumb.Corner;
8
+ exports.Corner = components_scrollArea_scrollAreaThumb.Corner$1;
@@ -24,7 +24,7 @@ function scrollItemToCenter(item, scrollArea, scrollBehavior) {
24
24
  }
25
25
  const Item = React.forwardRef(
26
26
  ({ className, asChild, isSelected, scrollBehavior, scrollBehaviorOnMount, ...props }, forwardRef) => {
27
- const classes = clsx([components_scrollArea_scrollAreaThumb.styles[`${components_scrollArea_scrollAreaThumb.rootClassName}__item`]], className);
27
+ const classes = clsx([components_scrollArea_scrollAreaThumb.styles[`${components_scrollArea_scrollAreaThumb.rootClassName$1}__item`]], className);
28
28
  const Comp = asChild ? reactSlot.Slot : "div";
29
29
  const ref = React.useRef(null);
30
30
  const { ref: inViewRef, inView } = reactIntersectionObserver.useInView({
@@ -37,7 +37,7 @@ const Item = React.forwardRef(
37
37
  [inViewRef]
38
38
  );
39
39
  const composedRef = utils_composeRefs.useComposedRefs(ref, forwardRef, adjustedInViewRef);
40
- const context = React.useContext(components_scrollArea_scrollAreaThumb.RootContext);
40
+ const context = React.useContext(components_scrollArea_scrollAreaThumb.RootContext$1);
41
41
  const internalScrollBehavior = scrollBehavior ?? (context == null ? void 0 : context.scrollBehavior) ?? "smooth";
42
42
  React.useEffect(() => {
43
43
  if (isSelected && ref.current && (context == null ? void 0 : context.scrollRef)) {
@@ -49,10 +49,8 @@ const Item = React.forwardRef(
49
49
  {
50
50
  ...props,
51
51
  onClick: utils_composeEventHandlers.composeEventHandlers(props.onClick, (e) => {
52
- if (e.defaultPrevented)
53
- return;
54
- if (!ref.current || !(context == null ? void 0 : context.scrollRef))
55
- return;
52
+ if (e.defaultPrevented) return;
53
+ if (!ref.current || !(context == null ? void 0 : context.scrollRef)) return;
56
54
  scrollItemToCenter(ref.current, context == null ? void 0 : context.scrollRef, internalScrollBehavior);
57
55
  }),
58
56
  ref: composedRef,
@@ -47,10 +47,8 @@ const Item = React__default.forwardRef(
47
47
  {
48
48
  ...props,
49
49
  onClick: composeEventHandlers(props.onClick, (e) => {
50
- if (e.defaultPrevented)
51
- return;
52
- if (!ref.current || !(context == null ? void 0 : context.scrollRef))
53
- return;
50
+ if (e.defaultPrevented) return;
51
+ if (!ref.current || !(context == null ? void 0 : context.scrollRef)) return;
54
52
  scrollItemToCenter(ref.current, context == null ? void 0 : context.scrollRef, internalScrollBehavior);
55
53
  }),
56
54
  ref: composedRef,
@@ -5,6 +5,6 @@ require("react");
5
5
  require("clsx");
6
6
  require("@radix-ui/react-scroll-area");
7
7
  const components_scrollArea_scrollAreaThumb = require("./scroll-area-thumb.cjs");
8
- exports.Root = components_scrollArea_scrollAreaThumb.Root;
9
- exports.RootContext = components_scrollArea_scrollAreaThumb.RootContext;
10
- exports.rootClassName = components_scrollArea_scrollAreaThumb.rootClassName;
8
+ exports.Root = components_scrollArea_scrollAreaThumb.Root$1;
9
+ exports.RootContext = components_scrollArea_scrollAreaThumb.RootContext$1;
10
+ exports.rootClassName = components_scrollArea_scrollAreaThumb.rootClassName$1;
@@ -87,11 +87,9 @@ const Button = React.forwardRef(
87
87
  className
88
88
  );
89
89
  const handleButtonClick = utils_composeEventHandlers.composeEventHandlers(props.onClick, (event) => {
90
- if (event.defaultPrevented)
91
- return;
90
+ if (event.defaultPrevented) return;
92
91
  const scrollAreaElement = scrollAreaContext == null ? void 0 : scrollAreaContext.scrollRef;
93
- if (!scrollAreaElement)
94
- return;
92
+ if (!scrollAreaElement) return;
95
93
  const scrollableItems = Array.from(scrollAreaElement.querySelectorAll("[data-in-view]"));
96
94
  const isHorizontalScroll = direction === "left" || direction === "right";
97
95
  const scrollProperty = isHorizontalScroll ? "left" : "top";
@@ -158,8 +156,7 @@ Button.displayName = "Button";
158
156
  const rootClassName = "teddy-scroll-area";
159
157
  const RootContext = React.createContext(void 0);
160
158
  function isScrollable(element) {
161
- if (!element)
162
- return null;
159
+ if (!element) return null;
163
160
  const buffer = 1;
164
161
  const scrollLeft = element.scrollLeft;
165
162
  const scrollWidth = element.scrollWidth;
@@ -244,10 +241,16 @@ const Root = React.forwardRef(
244
241
  );
245
242
  Root.displayName = "Root";
246
243
  exports.Button = Button;
244
+ exports.Button$1 = Button;
247
245
  exports.Corner = Corner;
246
+ exports.Corner$1 = Corner;
248
247
  exports.Root = Root;
248
+ exports.Root$1 = Root;
249
249
  exports.RootContext = RootContext;
250
+ exports.RootContext$1 = RootContext;
250
251
  exports.Scrollbar = Scrollbar;
252
+ exports.Scrollbar$1 = Scrollbar;
251
253
  exports.Thumb = Thumb;
252
254
  exports.rootClassName = rootClassName;
255
+ exports.rootClassName$1 = rootClassName;
253
256
  exports.styles = styles;
@@ -68,11 +68,9 @@ const Button = React__default.forwardRef(
68
68
  className
69
69
  );
70
70
  const handleButtonClick = composeEventHandlers(props.onClick, (event) => {
71
- if (event.defaultPrevented)
72
- return;
71
+ if (event.defaultPrevented) return;
73
72
  const scrollAreaElement = scrollAreaContext == null ? void 0 : scrollAreaContext.scrollRef;
74
- if (!scrollAreaElement)
75
- return;
73
+ if (!scrollAreaElement) return;
76
74
  const scrollableItems = Array.from(scrollAreaElement.querySelectorAll("[data-in-view]"));
77
75
  const isHorizontalScroll = direction === "left" || direction === "right";
78
76
  const scrollProperty = isHorizontalScroll ? "left" : "top";
@@ -139,8 +137,7 @@ Button.displayName = "Button";
139
137
  const rootClassName = "teddy-scroll-area";
140
138
  const RootContext = React__default.createContext(void 0);
141
139
  function isScrollable(element) {
142
- if (!element)
143
- return null;
140
+ if (!element) return null;
144
141
  const buffer = 1;
145
142
  const scrollLeft = element.scrollLeft;
146
143
  const scrollWidth = element.scrollWidth;
@@ -226,11 +223,17 @@ const Root = React__default.forwardRef(
226
223
  Root.displayName = "Root";
227
224
  export {
228
225
  Button as B,
226
+ Button,
229
227
  Corner as C,
228
+ Corner,
230
229
  Root as R,
230
+ Root,
231
+ RootContext,
231
232
  Scrollbar as S,
233
+ Scrollbar,
232
234
  Thumb,
233
235
  RootContext as a,
234
236
  rootClassName as r,
237
+ rootClassName,
235
238
  styles as s
236
239
  };
@@ -63,8 +63,7 @@ const Root = React.forwardRef(
63
63
  const [isDirty, setIsDirty] = React.useState(false);
64
64
  const [currentValue, setCurrentValue] = React.useState("");
65
65
  const handleValueChange = (value2) => {
66
- if (onValueChange)
67
- onValueChange(value2);
66
+ if (onValueChange) onValueChange(value2);
68
67
  setCurrentValue(value2);
69
68
  return value2;
70
69
  };
@@ -44,8 +44,7 @@ const Root = React__default.forwardRef(
44
44
  const [isDirty, setIsDirty] = React__default.useState(false);
45
45
  const [currentValue, setCurrentValue] = React__default.useState("");
46
46
  const handleValueChange = (value2) => {
47
- if (onValueChange)
48
- onValueChange(value2);
47
+ if (onValueChange) onValueChange(value2);
49
48
  setCurrentValue(value2);
50
49
  return value2;
51
50
  };
@@ -12,8 +12,7 @@ const rootClassName = "teddy-skeleton";
12
12
  const Root = React.forwardRef(
13
13
  ({ className, radius = "md", loading = true, ...props }, forwardRef) => {
14
14
  const classes = clsx([styles[`${rootClassName}`]], className);
15
- if (!loading)
16
- return props.children;
15
+ if (!loading) return props.children;
17
16
  return /* @__PURE__ */ jsxRuntime.jsx(components_box_box.Box, { "aria-hidden": true, ...props, radius, ref: forwardRef, className: classes });
18
17
  }
19
18
  );
@@ -10,8 +10,7 @@ const rootClassName = "teddy-skeleton";
10
10
  const Root = React__default.forwardRef(
11
11
  ({ className, radius = "md", loading = true, ...props }, forwardRef) => {
12
12
  const classes = clsx([styles[`${rootClassName}`]], className);
13
- if (!loading)
14
- return props.children;
13
+ if (!loading) return props.children;
15
14
  return /* @__PURE__ */ jsx(Box, { "aria-hidden": true, ...props, radius, ref: forwardRef, className: classes });
16
15
  }
17
16
  );
@@ -20,17 +20,10 @@ const styles = {
20
20
  };
21
21
  const rootClassName = "teddy-spinner";
22
22
  const SPINNER_VARIANT = {
23
- PRIMARY: "primary",
24
- DISABLED: "disabled",
25
- NEGATIVE: "negative",
26
- NEGATIVE_DISABLED: "negative-disabled"
23
+ PRIMARY: "primary"
27
24
  };
28
25
  const SPINNER_SIZE = {
29
- XXS: "xxs",
30
- XS: "xs",
31
- SM: "sm",
32
- MD: "md",
33
- LG: "lg"
26
+ SM: "sm"
34
27
  };
35
28
  const Spinner = React.forwardRef(
36
29
  ({ size = SPINNER_SIZE.SM, variant = SPINNER_VARIANT.PRIMARY, className, ...props }, forwardRef) => {
@@ -18,17 +18,10 @@ const styles = {
18
18
  };
19
19
  const rootClassName = "teddy-spinner";
20
20
  const SPINNER_VARIANT = {
21
- PRIMARY: "primary",
22
- DISABLED: "disabled",
23
- NEGATIVE: "negative",
24
- NEGATIVE_DISABLED: "negative-disabled"
21
+ PRIMARY: "primary"
25
22
  };
26
23
  const SPINNER_SIZE = {
27
- XXS: "xxs",
28
- XS: "xs",
29
- SM: "sm",
30
- MD: "md",
31
- LG: "lg"
24
+ SM: "sm"
32
25
  };
33
26
  const Spinner = React__default.forwardRef(
34
27
  ({ size = SPINNER_SIZE.SM, variant = SPINNER_VARIANT.PRIMARY, className, ...props }, forwardRef) => {
@@ -34,8 +34,7 @@ const List = React.forwardRef(
34
34
  React.useEffect(() => {
35
35
  if (rootContext) {
36
36
  const tabsContainer = rootContext == null ? void 0 : rootContext.listElement.current;
37
- if (!tabsContainer)
38
- return;
37
+ if (!tabsContainer) return;
39
38
  tabsContainer.style.setProperty("--_duration", isFirstRender.current ? "0ms" : tokens_motion_variables.teddyMotionDuration200);
40
39
  isFirstRender.current = false;
41
40
  }
@@ -15,8 +15,7 @@ const List = React__default.forwardRef(
15
15
  React__default.useEffect(() => {
16
16
  if (rootContext) {
17
17
  const tabsContainer = rootContext == null ? void 0 : rootContext.listElement.current;
18
- if (!tabsContainer)
19
- return;
18
+ if (!tabsContainer) return;
20
19
  tabsContainer.style.setProperty("--_duration", isFirstRender.current ? "0ms" : teddyMotionDuration200);
21
20
  isFirstRender.current = false;
22
21
  }
@@ -11,7 +11,7 @@ export declare const ScrollButton: React.ForwardRefExoticComponent<Omit<Omit<Omi
11
11
  fullWidth?: boolean | undefined;
12
12
  size?: "sm" | "md" | "lg" | undefined;
13
13
  variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
14
- borderStyle?: ("default" | "dashed") | undefined;
14
+ borderStyle?: ("dashed" | "default") | undefined;
15
15
  } & {
16
16
  iconOnly: true;
17
17
  "aria-label": string;
@@ -23,7 +23,7 @@ export declare const ScrollButton: React.ForwardRefExoticComponent<Omit<Omit<Omi
23
23
  fullWidth?: boolean | undefined;
24
24
  size?: "sm" | "md" | "lg" | undefined;
25
25
  variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
26
- borderStyle?: ("default" | "dashed") | undefined;
26
+ borderStyle?: ("dashed" | "default") | undefined;
27
27
  } & {
28
28
  iconOnly?: false | undefined;
29
29
  "aria-label"?: string | undefined;