@telia/teddy 0.0.71 → 0.0.73

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 (60) hide show
  1. package/dist/components/breadcrumbs/breadcrumbs-link.d.ts +1 -1
  2. package/dist/components/breadcrumbs/index.d.ts +1 -1
  3. package/dist/components/card/card-button.cjs +2 -2
  4. package/dist/components/card/card-button.js +2 -2
  5. package/dist/components/card/card-link.d.ts +1 -1
  6. package/dist/components/card/card-price.cjs +20 -28
  7. package/dist/components/card/card-price.d.ts +4 -1
  8. package/dist/components/card/card-price.js +21 -29
  9. package/dist/components/card/card.cjs +50 -49
  10. package/dist/components/card/card.d.ts +1 -1
  11. package/dist/components/card/card.js +50 -49
  12. package/dist/components/card/index.d.ts +1 -1
  13. package/dist/components/chip/chip-indicator.d.ts +2 -2
  14. package/dist/components/chip/index.d.ts +2 -2
  15. package/dist/components/expandable-card/expandable-card-button.d.ts +2 -2
  16. package/dist/components/expandable-card/index.d.ts +3 -3
  17. package/dist/components/index.cjs +2 -0
  18. package/dist/components/index.d.ts +1 -0
  19. package/dist/components/index.js +2 -0
  20. package/dist/components/modal/modal.cjs +1 -0
  21. package/dist/components/modal/modal.js +1 -0
  22. package/dist/components/navigation-card/index.cjs +10 -0
  23. package/dist/components/navigation-card/index.d.ts +15 -0
  24. package/dist/components/navigation-card/index.js +10 -0
  25. package/dist/components/navigation-card/navigation-card-content.cjs +49 -0
  26. package/dist/components/navigation-card/navigation-card-content.d.ts +10 -0
  27. package/dist/components/navigation-card/navigation-card-content.js +49 -0
  28. package/dist/components/navigation-card/navigation-card-root.cjs +32 -0
  29. package/dist/components/navigation-card/navigation-card-root.d.ts +6 -0
  30. package/dist/components/navigation-card/navigation-card-root.js +32 -0
  31. package/dist/components/navigation-menu/navigation-menu.cjs +1 -0
  32. package/dist/components/navigation-menu/navigation-menu.js +1 -0
  33. package/dist/components/notabene/notabene-icon.d.ts +2 -2
  34. package/dist/components/notification/notification.d.ts +2 -2
  35. package/dist/components/radio-card-group/radio-card-group-content.cjs +1 -0
  36. package/dist/components/radio-card-group/radio-card-group-content.js +1 -0
  37. package/dist/components/radio-card-group/radio-card-group-item-body.cjs +1 -0
  38. package/dist/components/radio-card-group/radio-card-group-item-body.js +1 -0
  39. package/dist/components/radio-card-group/radio-card-group-item-title.cjs +1 -0
  40. package/dist/components/radio-card-group/radio-card-group-item-title.js +1 -0
  41. package/dist/components/radio-card-group/radio-card-group-item.cjs +1 -0
  42. package/dist/components/radio-card-group/radio-card-group-item.js +1 -0
  43. package/dist/components/scroll-area/index.d.ts +2 -2
  44. package/dist/components/scroll-area/scroll-area-bar.cjs +71 -29
  45. package/dist/components/scroll-area/scroll-area-bar.js +71 -29
  46. package/dist/components/scroll-area/scroll-area-button.d.ts +4 -4
  47. package/dist/components/scroll-area/scroll-area-item.cjs +13 -2
  48. package/dist/components/scroll-area/scroll-area-item.js +13 -2
  49. package/dist/components/tabs/index.d.ts +2 -2
  50. package/dist/components/tabs/tabs-scroll-button.d.ts +2 -2
  51. package/dist/components/text-field/index.d.ts +2 -2
  52. package/dist/components/text-field/text-field-button.d.ts +2 -2
  53. package/dist/components/toggle/toggle.d.ts +2 -2
  54. package/dist/main.cjs +2 -0
  55. package/dist/main.js +2 -0
  56. package/dist/style.css +1133 -1087
  57. package/dist/utils/generate-styling/grid.d.ts +24 -24
  58. package/dist/utils/generate-styling/index.d.ts +16 -16
  59. package/dist/utils/generate-styling/util.d.ts +2 -2
  60. package/package.json +2 -1
@@ -46,54 +46,96 @@ const Corner = React__default.forwardRef(
46
46
  );
47
47
  Corner.displayName = "Corner";
48
48
  const Button = React__default.forwardRef(
49
- ({ className, hidden, direction, children, ...props }, forwardRef) => {
49
+ ({ className, hidden, direction = "right", children, ...props }, forwardRef) => {
50
50
  const context = React__default.useContext(RootContext);
51
- const internalHidden = hidden ?? (direction === "up" && !(context == null ? void 0 : context.hasScrollTop) || direction === "down" && !(context == null ? void 0 : context.hasScrollBottom) || direction === "left" && !(context == null ? void 0 : context.hasScrollLeft) || direction === "right" && !(context == null ? void 0 : context.hasScrollRight));
51
+ const isHidden = hidden ?? (direction === "up" && !(context == null ? void 0 : context.hasScrollTop) || direction === "down" && !(context == null ? void 0 : context.hasScrollBottom) || direction === "left" && !(context == null ? void 0 : context.hasScrollLeft) || direction === "right" && !(context == null ? void 0 : context.hasScrollRight));
52
52
  const classes = clsx(
53
- [styles[`${rootClassName}__button`]],
53
+ styles[`${rootClassName}__button`],
54
54
  {
55
- [styles[`${rootClassName}__button--hidden`]]: internalHidden
55
+ [styles[`${rootClassName}__button--hidden`]]: isHidden
56
56
  },
57
57
  className
58
58
  );
59
+ const directionLabels = {
60
+ up: "Scroll opp",
61
+ down: "Scroll ned",
62
+ left: "Scroll til venstre",
63
+ right: "Scroll til høyre"
64
+ };
65
+ const directionIcons = {
66
+ up: "chevron-up",
67
+ down: "chevron-down",
68
+ left: "chevron-left",
69
+ right: "chevron-right"
70
+ };
71
+ const handleClick = composeEventHandlers(props.onClick, (e) => {
72
+ if (e.defaultPrevented)
73
+ return;
74
+ const scrollArea = context == null ? void 0 : context.scrollRef;
75
+ if (!scrollArea)
76
+ return;
77
+ const itemNodes = Array.from(scrollArea.querySelectorAll("[data-in-view]"));
78
+ const isHorizontal = direction === "left" || direction === "right";
79
+ const scrollAxis = isHorizontal ? "left" : "top";
80
+ const isBackward = direction === "left" || direction === "up";
81
+ const scrollPos = isHorizontal ? scrollArea.scrollLeft : scrollArea.scrollTop;
82
+ const scrollAreaSize = isHorizontal ? scrollArea.clientWidth : scrollArea.clientHeight;
83
+ const maxScrollPos = isHorizontal ? scrollArea.scrollWidth - scrollAreaSize : scrollArea.scrollHeight - scrollAreaSize;
84
+ const buttonSize = isHorizontal ? e.currentTarget.offsetWidth : e.currentTarget.offsetHeight;
85
+ const visibleStart = scrollPos + (isBackward ? buttonSize : 0);
86
+ const visibleEnd = scrollPos + scrollAreaSize - (!isBackward ? buttonSize : 0);
87
+ const getElementBounds = (element) => {
88
+ const elementStart = isHorizontal ? element.offsetLeft : element.offsetTop;
89
+ const elementEnd = elementStart + (isHorizontal ? element.offsetWidth : element.offsetHeight);
90
+ return { elementStart, elementEnd };
91
+ };
92
+ const isElementFullyVisible = (element) => {
93
+ const { elementStart, elementEnd } = getElementBounds(element);
94
+ return elementStart >= visibleStart && elementEnd <= visibleEnd;
95
+ };
96
+ const inViewIndices = itemNodes.map((node, index) => {
97
+ const dataInView = node.getAttribute("data-in-view") === "true";
98
+ const fullyVisible = isElementFullyVisible(node);
99
+ return dataInView && fullyVisible ? index : -1;
100
+ }).filter((index) => index !== -1);
101
+ const hasReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
102
+ const scrollBehavior = hasReducedMotion ? "auto" : (context == null ? void 0 : context.scrollBehavior) ?? "smooth";
103
+ let scrollAmount = scrollPos;
104
+ if (inViewIndices.length > 0) {
105
+ const currentIndex = isBackward ? inViewIndices[0] : inViewIndices[inViewIndices.length - 1];
106
+ const targetIndex = isBackward ? currentIndex > 0 ? currentIndex - 1 : currentIndex : currentIndex < itemNodes.length - 1 ? currentIndex + 1 : currentIndex;
107
+ const targetItem = itemNodes[targetIndex];
108
+ const { elementStart, elementEnd } = getElementBounds(targetItem);
109
+ const targetSize = elementEnd - elementStart;
110
+ scrollAmount = isBackward ? elementStart + targetSize - scrollAreaSize + buttonSize : elementStart - buttonSize;
111
+ } else {
112
+ const scrollBy = scrollAreaSize - buttonSize * 2;
113
+ scrollAmount = isBackward ? scrollPos - scrollBy : scrollPos + scrollBy;
114
+ }
115
+ scrollAmount = Math.max(0, Math.min(scrollAmount, maxScrollPos));
116
+ scrollArea.scrollTo({
117
+ [scrollAxis]: scrollAmount,
118
+ behavior: scrollBehavior
119
+ });
120
+ });
59
121
  return /* @__PURE__ */ jsx(
60
122
  Button$1,
61
123
  {
62
124
  iconOnly: true,
63
125
  variant: "primary",
64
- "aria-label": direction === "down" ? "Scroll ned" : direction === "up" ? "Scroll opp" : direction === "left" ? "Scroll venstre" : "Scroll høyre",
126
+ "aria-label": directionLabels[direction],
65
127
  "data-direction": direction,
66
- tabIndex: internalHidden ? -1 : void 0,
128
+ tabIndex: isHidden ? -1 : void 0,
67
129
  ...props,
68
- onClick: composeEventHandlers(props.onClick, (e) => {
69
- var _a, _b;
70
- if (e.defaultPrevented)
71
- return;
72
- const scroll = (_a = context == null ? void 0 : context.scrollRef) == null ? void 0 : _a.getBoundingClientRect();
73
- const scrollDirection = direction === "up" || direction === "left" ? -1 : 1;
74
- const scrollAxis = direction === "up" || direction === "down" ? "top" : "left";
75
- const buttonSize = direction === "up" || direction === "down" ? e.currentTarget.offsetHeight : e.currentTarget.offsetWidth;
76
- const scrollAmount = ((direction === "up" || direction === "down" ? scroll == null ? void 0 : scroll.height : scroll == null ? void 0 : scroll.width) || 0) - buttonSize * 2;
77
- const hasReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
78
- const scrollBehavior = hasReducedMotion ? "auto" : (context == null ? void 0 : context.scrollBehavior) ?? "smooth";
79
- (_b = context == null ? void 0 : context.scrollRef) == null ? void 0 : _b.scrollBy({
80
- [scrollAxis]: scrollAmount * scrollDirection,
81
- behavior: scrollBehavior
82
- });
83
- }),
130
+ onClick: handleClick,
84
131
  ref: forwardRef,
85
132
  className: classes,
86
- children: children || /* @__PURE__ */ jsx(
87
- Icon,
88
- {
89
- name: direction === "down" ? "chevron-down" : direction === "up" ? "chevron-up" : direction === "left" ? "chevron-left" : "chevron-right"
90
- }
91
- )
133
+ children: children || /* @__PURE__ */ jsx(Icon, { name: directionIcons[direction] })
92
134
  }
93
135
  );
94
136
  }
95
137
  );
96
- Button$1.displayName = "Button";
138
+ Button.displayName = "Button";
97
139
  const rootClassName = "teddy-scroll-area";
98
140
  const RootContext = React__default.createContext(void 0);
99
141
  function isScrollable(element) {
@@ -5,7 +5,7 @@ import { Button as PrimitiveButton } from '../button';
5
5
  * Props for the ScrollAreaButton component.
6
6
  */
7
7
  export type ButtonProps = Omit<React.ComponentPropsWithoutRef<typeof PrimitiveButton>, 'hidden'> & {
8
- /** In which direction the button should point and scroll to */
8
+ /** The direction in which the button should point and scroll */
9
9
  direction?: 'up' | 'down' | 'left' | 'right';
10
10
  /** Hidden will fade the button out. Used when the scrollbar is at the end */
11
11
  hidden?: boolean;
@@ -17,7 +17,7 @@ export declare const Button: React.ForwardRefExoticComponent<Omit<Omit<Omit<Reac
17
17
  loading?: boolean | undefined;
18
18
  fullWidth?: boolean | undefined;
19
19
  size?: "sm" | "md" | "lg" | undefined;
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;
20
+ variant?: "text" | "text-negative" | "primary" | "list-item" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "expressive-negative" | undefined;
21
21
  } & {
22
22
  iconOnly: true;
23
23
  "aria-label": string;
@@ -28,12 +28,12 @@ export declare const Button: React.ForwardRefExoticComponent<Omit<Omit<Omit<Reac
28
28
  loading?: boolean | undefined;
29
29
  fullWidth?: boolean | undefined;
30
30
  size?: "sm" | "md" | "lg" | undefined;
31
- variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
31
+ variant?: "text" | "text-negative" | "primary" | "list-item" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "expressive-negative" | undefined;
32
32
  } & {
33
33
  iconOnly?: false | undefined;
34
34
  "aria-label"?: string | undefined;
35
35
  } & React.RefAttributes<HTMLButtonElement>, "ref">, "hidden"> & {
36
- /** In which direction the button should point and scroll to */
36
+ /** The direction in which the button should point and scroll */
37
37
  direction?: "left" | "right" | "up" | "down" | undefined;
38
38
  /** Hidden will fade the button out. Used when the scrollbar is at the end */
39
39
  hidden?: boolean | undefined;
@@ -7,6 +7,7 @@ const components_scrollArea_scrollAreaBar = require("./scroll-area-bar.cjs");
7
7
  const reactSlot = require("@radix-ui/react-slot");
8
8
  const utils_composeEventHandlers = require("../../utils/composeEventHandlers.cjs");
9
9
  const utils_composeRefs = require("../../utils/composeRefs.cjs");
10
+ const reactIntersectionObserver = require("react-intersection-observer");
10
11
  function scrollItemToCenter(item, scrollArea, scrollBehavior) {
11
12
  const itemRect = item.getBoundingClientRect();
12
13
  const scrollAreaRect = scrollArea.getBoundingClientRect();
@@ -26,7 +27,16 @@ const Item = React.forwardRef(
26
27
  const classes = clsx([components_scrollArea_scrollAreaBar.styles[`${components_scrollArea_scrollAreaBar.rootClassName}__item`]], className);
27
28
  const Comp = asChild ? reactSlot.Slot : "div";
28
29
  const ref = React.useRef(null);
29
- const composedRef = utils_composeRefs.useComposedRefs(ref, forwardRef);
30
+ const { ref: inViewRef, inView } = reactIntersectionObserver.useInView({
31
+ threshold: 1
32
+ });
33
+ const adjustedInViewRef = React.useCallback(
34
+ (node) => {
35
+ inViewRef(node);
36
+ },
37
+ [inViewRef]
38
+ );
39
+ const composedRef = utils_composeRefs.useComposedRefs(ref, forwardRef, adjustedInViewRef);
30
40
  const context = React.useContext(components_scrollArea_scrollAreaBar.RootContext);
31
41
  const internalScrollBehavior = scrollBehavior ?? (context == null ? void 0 : context.scrollBehavior) ?? "smooth";
32
42
  React.useEffect(() => {
@@ -46,7 +56,8 @@ const Item = React.forwardRef(
46
56
  scrollItemToCenter(ref.current, context == null ? void 0 : context.scrollRef, internalScrollBehavior);
47
57
  }),
48
58
  ref: composedRef,
49
- className: classes
59
+ className: classes,
60
+ "data-in-view": inView
50
61
  }
51
62
  );
52
63
  }
@@ -5,6 +5,7 @@ import { s as styles, r as rootClassName, a as RootContext } from "./scroll-area
5
5
  import { Slot } from "@radix-ui/react-slot";
6
6
  import { composeEventHandlers } from "../../utils/composeEventHandlers.js";
7
7
  import { useComposedRefs } from "../../utils/composeRefs.js";
8
+ import { useInView } from "react-intersection-observer";
8
9
  function scrollItemToCenter(item, scrollArea, scrollBehavior) {
9
10
  const itemRect = item.getBoundingClientRect();
10
11
  const scrollAreaRect = scrollArea.getBoundingClientRect();
@@ -24,7 +25,16 @@ const Item = React__default.forwardRef(
24
25
  const classes = clsx([styles[`${rootClassName}__item`]], className);
25
26
  const Comp = asChild ? Slot : "div";
26
27
  const ref = React__default.useRef(null);
27
- const composedRef = useComposedRefs(ref, forwardRef);
28
+ const { ref: inViewRef, inView } = useInView({
29
+ threshold: 1
30
+ });
31
+ const adjustedInViewRef = React__default.useCallback(
32
+ (node) => {
33
+ inViewRef(node);
34
+ },
35
+ [inViewRef]
36
+ );
37
+ const composedRef = useComposedRefs(ref, forwardRef, adjustedInViewRef);
28
38
  const context = React__default.useContext(RootContext);
29
39
  const internalScrollBehavior = scrollBehavior ?? (context == null ? void 0 : context.scrollBehavior) ?? "smooth";
30
40
  React__default.useEffect(() => {
@@ -44,7 +54,8 @@ const Item = React__default.forwardRef(
44
54
  scrollItemToCenter(ref.current, context == null ? void 0 : context.scrollRef, internalScrollBehavior);
45
55
  }),
46
56
  ref: composedRef,
47
- className: classes
57
+ className: classes,
58
+ "data-in-view": inView
48
59
  }
49
60
  );
50
61
  }
@@ -34,7 +34,7 @@ export declare const Tabs: import('react').ForwardRefExoticComponent<Omit<Omit<i
34
34
  loading?: boolean | undefined;
35
35
  fullWidth?: boolean | undefined;
36
36
  size?: "sm" | "md" | "lg" | undefined;
37
- 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
+ variant?: "text" | "text-negative" | "primary" | "list-item" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "expressive-negative" | undefined;
38
38
  } & {
39
39
  iconOnly: true;
40
40
  "aria-label": string;
@@ -45,7 +45,7 @@ export declare const Tabs: import('react').ForwardRefExoticComponent<Omit<Omit<i
45
45
  loading?: boolean | undefined;
46
46
  fullWidth?: boolean | undefined;
47
47
  size?: "sm" | "md" | "lg" | undefined;
48
- variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
48
+ variant?: "text" | "text-negative" | "primary" | "list-item" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "expressive-negative" | undefined;
49
49
  } & {
50
50
  iconOnly?: false | undefined;
51
51
  "aria-label"?: string | undefined;
@@ -10,7 +10,7 @@ export declare const ScrollButton: React.ForwardRefExoticComponent<Omit<Omit<Omi
10
10
  loading?: boolean | undefined;
11
11
  fullWidth?: boolean | undefined;
12
12
  size?: "sm" | "md" | "lg" | undefined;
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;
13
+ variant?: "text" | "text-negative" | "primary" | "list-item" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "expressive-negative" | undefined;
14
14
  } & {
15
15
  iconOnly: true;
16
16
  "aria-label": string;
@@ -21,7 +21,7 @@ export declare const ScrollButton: React.ForwardRefExoticComponent<Omit<Omit<Omi
21
21
  loading?: boolean | undefined;
22
22
  fullWidth?: boolean | undefined;
23
23
  size?: "sm" | "md" | "lg" | undefined;
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;
24
+ variant?: "text" | "text-negative" | "primary" | "list-item" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "expressive-negative" | undefined;
25
25
  } & {
26
26
  iconOnly?: false | undefined;
27
27
  "aria-label"?: string | undefined;
@@ -34,7 +34,7 @@ export declare const TextField: import('react').ForwardRefExoticComponent<Omit<i
34
34
  loading?: boolean | undefined;
35
35
  fullWidth?: boolean | undefined;
36
36
  size?: "sm" | "md" | "lg" | undefined;
37
- 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
+ variant?: "text" | "text-negative" | "primary" | "list-item" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "expressive-negative" | undefined;
38
38
  } & {
39
39
  iconOnly: true;
40
40
  "aria-label": string;
@@ -45,7 +45,7 @@ export declare const TextField: import('react').ForwardRefExoticComponent<Omit<i
45
45
  loading?: boolean | undefined;
46
46
  fullWidth?: boolean | undefined;
47
47
  size?: "sm" | "md" | "lg" | undefined;
48
- variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
48
+ variant?: "text" | "text-negative" | "primary" | "list-item" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "expressive-negative" | undefined;
49
49
  } & {
50
50
  iconOnly?: false | undefined;
51
51
  "aria-label"?: string | undefined;
@@ -11,7 +11,7 @@ export declare const Button: React.ForwardRefExoticComponent<Omit<Omit<Omit<Reac
11
11
  loading?: boolean | undefined;
12
12
  fullWidth?: boolean | undefined;
13
13
  size?: "sm" | "md" | "lg" | undefined;
14
- 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
+ variant?: "text" | "text-negative" | "primary" | "list-item" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "expressive-negative" | undefined;
15
15
  } & {
16
16
  iconOnly: true;
17
17
  "aria-label": string;
@@ -22,7 +22,7 @@ export declare const Button: React.ForwardRefExoticComponent<Omit<Omit<Omit<Reac
22
22
  loading?: boolean | undefined;
23
23
  fullWidth?: boolean | undefined;
24
24
  size?: "sm" | "md" | "lg" | undefined;
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;
25
+ variant?: "text" | "text-negative" | "primary" | "list-item" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "expressive-negative" | undefined;
26
26
  } & {
27
27
  iconOnly?: false | undefined;
28
28
  "aria-label"?: string | undefined;
@@ -29,8 +29,8 @@ declare const Toggle: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHT
29
29
  Input: React.ForwardRefExoticComponent<ToggleInputProps & React.RefAttributes<HTMLButtonElement>>;
30
30
  Thumb: React.ForwardRefExoticComponent<Omit<SwitchPrimitive.SwitchThumbProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
31
31
  Indicator: React.ForwardRefExoticComponent<Partial<Omit<React.SVGProps<SVGSVGElement> & {
32
- name: "link" | "map" | "menu" | "search" | "summary" | "time" | "video" | "filter" | "image" | "stop" | "key" | "x" | "download" | "split" | "alert" | "radio" | "email" | "copy" | "alarm-off" | "alarm-on" | "attachment" | "bookmark-filled" | "bookmark" | "copy-filled" | "dislike" | "edit" | "heart-filled" | "heart" | "invisible" | "like" | "lock-open" | "lock" | "login" | "logout" | "maximize" | "minimize" | "mute" | "password-invisible" | "password-visible" | "play-filled" | "play" | "remove-filled" | "remove" | "save" | "send" | "settings" | "share" | "shortcut" | "shuffle" | "sync" | "skip-back-10sec" | "skip-back-30sec" | "skip-forward-10sec" | "skip-forward-30sec" | "star-filled" | "star" | "switch-arrows" | "tv-next" | "tv-pause" | "tv-previous" | "tv-stop" | "upload" | "visible" | "volume" | "zoom-out" | "zoom" | "connected-building" | "home" | "hospital" | "industry" | "premises-datacenter" | "premises-large" | "premises-medium" | "premises-small" | "premises" | "store" | "address-book" | "b2b-customer" | "care" | "chat-robot" | "chat" | "child-1" | "child-2" | "conversation" | "customer-dialogue" | "dsl-hub" | "end-user" | "handshake" | "headphones" | "letter" | "mms" | "new-contact" | "new-group" | "news" | "parental-guide" | "people-hub" | "people" | "portal" | "signature" | "smiley-happy" | "smiley-sad" | "sms" | "support" | "user-admin" | "vcard" | "voicemail" | "battery" | "bluetooth" | "broadband" | "broken-phone" | "cast" | "cloud-connect" | "connected" | "core-router" | "daas-device" | "data-transfer" | "desktop" | "devices" | "esim-simcard" | "esim" | "face-id" | "fiber" | "fingerprint" | "fiveg" | "fourg" | "home-installation" | "industrial-iot" | "internet" | "it-service" | "laptop" | "mobile-broadband" | "network" | "phone-recycling" | "phone-ringing" | "phone" | "rack" | "refill-card" | "remote-control" | "repair" | "roaming" | "router" | "secure-device" | "sense-car" | "server" | "service-device" | "service-supervision" | "slow-wifi" | "smart-wifi" | "smartphone" | "smartwatch" | "tablet" | "trade-phone" | "tv" | "usb" | "voice-switch" | "wallplug" | "wireless-off" | "wireless-weak" | "wireless" | "world-alert" | "world-off" | "world-question" | "bar-chart" | "doc" | "document-doc" | "document-edit" | "document-pdf" | "document-ppt" | "excel" | "folder-copy" | "folder-new" | "folder" | "gif" | "graph" | "media-content" | "org-chart" | "pie-chart" | "print" | "register" | "report" | "simcard" | "spell-check" | "credit-card" | "euro" | "invoice" | "kontantkort" | "kr" | "late-payment" | "money-back-euro" | "money-back-kr" | "money-euro" | "money-kr" | "pay-monthly-euro" | "pay-monthly-kr" | "pay-once-euro" | "pay-once-kr" | "payment-success" | "savings" | "wallet" | "airplay" | "camera" | "entertainment" | "external" | "film" | "games" | "megaphone" | "microphone" | "music" | "player-settings" | "record" | "stream" | "trailer" | "video-conference" | "activity-level" | "add" | "ai-robot" | "bag" | "basketball" | "blood-pressure" | "bulb" | "business-continuity" | "business-intelligence" | "calendar" | "cart" | "close-circle" | "cloud" | "coffee" | "compass" | "construction" | "cookie" | "delivery" | "drone" | "education" | "efficiency" | "environment" | "facemask" | "flag" | "focus" | "food" | "fraud" | "getting-started" | "home-care" | "infinite" | "job-search" | "layers" | "measuring-health" | "moisture" | "offering" | "offshore" | "optimization" | "pebble" | "pet-dog" | "pin" | "plane" | "plus-minus" | "police" | "power-grid" | "present" | "press-button" | "price" | "pulse" | "recycle" | "reservation" | "reverse" | "route" | "ruler" | "satellite" | "secured-1" | "secured-2" | "security-camera" | "shopping" | "snowflake" | "speedometer" | "spyware" | "suitcase" | "sustainability" | "tag" | "temperature" | "thinking" | "train" | "transfer" | "undo" | "wavelength" | "weather" | "world" | "android" | "apple" | "bankid-norway" | "bankid" | "facebook" | "instagram" | "youtube" | "linkedin" | "snapchat" | "telia-logo" | "whatsapp" | "windows" | "alert-filled" | "check-circle-filled" | "check-circle" | "error-filled" | "error" | "help" | "info-filled" | "info" | "question-filled" | "question" | "warning" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-subdirectory" | "arrow-up" | "card-view" | "checkmark-bold" | "checkmark" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "close" | "grid-view" | "list-view" | "minus-bold" | "minus" | "more-horizontal" | "more-vertical" | "plus" | "services" | "sorter" | "table-view";
33
- size?: ("font" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl") | undefined;
32
+ name: "link" | "map" | "menu" | "search" | "summary" | "time" | "video" | "filter" | "image" | "stop" | "key" | "download" | "x" | "split" | "alert" | "radio" | "email" | "copy" | "add" | "reverse" | "infinite" | "visible" | "help" | "zoom-out" | "zoom" | "alarm-off" | "alarm-on" | "attachment" | "bookmark-filled" | "bookmark" | "copy-filled" | "dislike" | "edit" | "heart-filled" | "heart" | "invisible" | "like" | "lock-open" | "lock" | "login" | "logout" | "maximize" | "minimize" | "mute" | "password-invisible" | "password-visible" | "play-filled" | "play" | "remove-filled" | "remove" | "save" | "send" | "settings" | "share" | "shortcut" | "shuffle" | "sync" | "skip-back-10sec" | "skip-back-30sec" | "skip-forward-10sec" | "skip-forward-30sec" | "star-filled" | "star" | "switch-arrows" | "tv-next" | "tv-pause" | "tv-previous" | "tv-stop" | "upload" | "volume" | "connected-building" | "home" | "hospital" | "industry" | "premises-datacenter" | "premises-large" | "premises-medium" | "premises-small" | "premises" | "store" | "address-book" | "b2b-customer" | "care" | "chat-robot" | "chat" | "child-1" | "child-2" | "conversation" | "customer-dialogue" | "dsl-hub" | "end-user" | "handshake" | "headphones" | "letter" | "mms" | "new-contact" | "new-group" | "news" | "parental-guide" | "people-hub" | "people" | "portal" | "signature" | "smiley-happy" | "smiley-sad" | "sms" | "support" | "user-admin" | "vcard" | "voicemail" | "battery" | "bluetooth" | "broadband" | "broken-phone" | "cast" | "cloud-connect" | "connected" | "core-router" | "daas-device" | "data-transfer" | "desktop" | "devices" | "esim-simcard" | "esim" | "face-id" | "fiber" | "fingerprint" | "fiveg" | "fourg" | "home-installation" | "industrial-iot" | "internet" | "it-service" | "laptop" | "mobile-broadband" | "network" | "phone-recycling" | "phone-ringing" | "phone" | "rack" | "refill-card" | "remote-control" | "repair" | "roaming" | "router" | "secure-device" | "sense-car" | "server" | "service-device" | "service-supervision" | "slow-wifi" | "smart-wifi" | "smartphone" | "smartwatch" | "tablet" | "trade-phone" | "tv" | "usb" | "voice-switch" | "wallplug" | "wireless-off" | "wireless-weak" | "wireless" | "world-alert" | "world-off" | "world-question" | "bar-chart" | "doc" | "document-doc" | "document-edit" | "document-pdf" | "document-ppt" | "excel" | "folder-copy" | "folder-new" | "folder" | "gif" | "graph" | "media-content" | "org-chart" | "pie-chart" | "print" | "register" | "report" | "simcard" | "spell-check" | "credit-card" | "euro" | "invoice" | "kontantkort" | "kr" | "late-payment" | "money-back-euro" | "money-back-kr" | "money-euro" | "money-kr" | "pay-monthly-euro" | "pay-monthly-kr" | "pay-once-euro" | "pay-once-kr" | "payment-success" | "savings" | "wallet" | "airplay" | "camera" | "entertainment" | "external" | "film" | "games" | "megaphone" | "microphone" | "music" | "player-settings" | "record" | "stream" | "trailer" | "video-conference" | "activity-level" | "ai-robot" | "bag" | "basketball" | "blood-pressure" | "bulb" | "business-continuity" | "business-intelligence" | "calendar" | "cart" | "close-circle" | "cloud" | "coffee" | "compass" | "construction" | "cookie" | "delivery" | "drone" | "education" | "efficiency" | "environment" | "facemask" | "flag" | "focus" | "food" | "fraud" | "getting-started" | "home-care" | "job-search" | "layers" | "measuring-health" | "moisture" | "offering" | "offshore" | "optimization" | "pebble" | "pet-dog" | "pin" | "plane" | "plus-minus" | "police" | "power-grid" | "present" | "press-button" | "price" | "pulse" | "recycle" | "reservation" | "route" | "ruler" | "satellite" | "secured-1" | "secured-2" | "security-camera" | "shopping" | "snowflake" | "speedometer" | "spyware" | "suitcase" | "sustainability" | "tag" | "temperature" | "thinking" | "train" | "transfer" | "undo" | "wavelength" | "weather" | "world" | "android" | "apple" | "bankid-norway" | "bankid" | "facebook" | "instagram" | "youtube" | "linkedin" | "snapchat" | "telia-logo" | "whatsapp" | "windows" | "alert-filled" | "check-circle-filled" | "check-circle" | "error-filled" | "error" | "info-filled" | "info" | "question-filled" | "question" | "warning" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-subdirectory" | "arrow-up" | "card-view" | "checkmark-bold" | "checkmark" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "close" | "grid-view" | "list-view" | "minus-bold" | "minus" | "more-horizontal" | "more-vertical" | "plus" | "services" | "sorter" | "table-view";
33
+ size?: ("xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "font") | undefined;
34
34
  children?: React.ReactNode;
35
35
  }, "ref">> & React.RefAttributes<SVGSVGElement>>;
36
36
  };
package/dist/main.cjs CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const components_navigationCard_index = require("./components/navigation-card/index.cjs");
3
4
  const components_checkbox_index = require("./components/checkbox/index.cjs");
4
5
  const components_toast_index = require("./components/toast/index.cjs");
5
6
  const components_toggletip_index = require("./components/toggletip/index.cjs");
@@ -55,6 +56,7 @@ const tokens_spacing_variables = require("./tokens/spacing/variables.cjs");
55
56
  const tokens_typography_variables = require("./tokens/typography/variables.cjs");
56
57
  const sonner = require("sonner");
57
58
  const components_input_inputGroup = require("./components/input/input-group.cjs");
59
+ exports.NavigationCard = components_navigationCard_index.NavigationCard;
58
60
  exports.Checkbox = components_checkbox_index.Checkbox;
59
61
  exports.CheckboxGroup = components_checkbox_index.CheckboxGroup;
60
62
  exports.Toast = components_toast_index.Toast;
package/dist/main.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { NavigationCard } from "./components/navigation-card/index.js";
1
2
  import { Checkbox, CheckboxGroup } from "./components/checkbox/index.js";
2
3
  import { Toast } from "./components/toast/index.js";
3
4
  import { Toggletip } from "./components/toggletip/index.js";
@@ -86,6 +87,7 @@ export {
86
87
  Link,
87
88
  List,
88
89
  M as Modal,
90
+ NavigationCard,
89
91
  N as NavigationMenu,
90
92
  Notabene,
91
93
  Notification,