@digdir/designsystemet-react 1.7.1 → 1.7.2

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.
@@ -45,16 +45,20 @@ const Dialog = react.forwardRef(function Dialog({ asChild, children, className,
45
45
  if (event.defaultPrevented)
46
46
  return; // Skip if default action is prevented
47
47
  const { clientY: y, clientX: x, target } = event;
48
- if (event instanceof KeyboardEvent)
49
- return (closedby === 'none' &&
50
- event.key === 'Escape' &&
51
- event.preventDefault()); // Skip ESC-key if closedby="none"
52
48
  /* Check if clicked element or its closest parent has data-command='close' */
53
- if (target instanceof Element) {
49
+ if (target instanceof Element && event.type === 'click') {
54
50
  const closeElement = target.closest('[data-command="close"]');
55
51
  if (closeElement)
56
52
  return dialog?.close();
57
53
  }
54
+ // if the browser supports closedBy, we let the browser handle it
55
+ // see https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/closedBy
56
+ if (dialog && 'closedBy' in dialog)
57
+ return;
58
+ if (event instanceof KeyboardEvent)
59
+ return (closedby === 'none' &&
60
+ event.key === 'Escape' &&
61
+ event.preventDefault()); // Skip ESC-key if closedby="none"
58
62
  if (window.getSelection()?.toString())
59
63
  return; // Fix bug where if you select text spanning two divs it thinks you clicked outside
60
64
  if (dialog && target === dialog && closedby === 'any') {
@@ -85,7 +89,7 @@ const Dialog = react.forwardRef(function Dialog({ asChild, children, className,
85
89
  currentRef?.addEventListener('close', handleClose);
86
90
  return () => currentRef?.removeEventListener('close', handleClose);
87
91
  }, [onClose]);
88
- return (jsxRuntime.jsxs(Component, { className: cl('ds-dialog', className), ref: mergedRefs, "data-modal": modal, ...rest, children: [closeButton !== false && (jsxRuntime.jsx(button.Button, { "aria-label": closeButton, "data-color": 'neutral', icon: true, variant: 'tertiary', "data-command": 'close' })), children] }));
92
+ return (jsxRuntime.jsxs(Component, { className: cl('ds-dialog', className), ref: mergedRefs, "data-modal": modal, closedby: closedby, ...rest, children: [closeButton !== false && (jsxRuntime.jsx(button.Button, { "aria-label": closeButton, "data-color": 'neutral', icon: true, variant: 'tertiary', "data-command": 'close' })), children] }));
89
93
  });
90
94
 
91
95
  exports.Dialog = Dialog;
@@ -11,8 +11,8 @@ var react = require('react');
11
11
  * @example
12
12
  * <Tag>Melk</Tag>
13
13
  */
14
- const Tag = react.forwardRef(function Tag({ className, ...rest }, ref) {
15
- return jsxRuntime.jsx("span", { className: cl('ds-tag', className), ref: ref, ...rest });
14
+ const Tag = react.forwardRef(function Tag({ className, variant = 'default', ...rest }, ref) {
15
+ return (jsxRuntime.jsx("span", { className: cl('ds-tag', className), ref: ref, "data-variant": variant, ...rest }));
16
16
  });
17
17
 
18
18
  exports.Tag = Tag;
@@ -21,13 +21,14 @@ var useMergeRefs = require('../../utilities/hooks/use-merge-refs/use-merge-refs.
21
21
  * Hover me
22
22
  * </Tooltip>
23
23
  */
24
- const Tooltip = react.forwardRef(function Tooltip({ id, children, content, placement = 'top', autoPlacement = true, open, className, ...rest }, ref) {
24
+ const Tooltip = react.forwardRef(function Tooltip({ id, children, content, placement = 'top', autoPlacement = true, open, className, type, ...rest }, ref) {
25
25
  const randomTooltipId = react.useId();
26
26
  const [internalOpen, setInternalOpen] = react.useState(false);
27
27
  const triggerRef = react.useRef(null);
28
28
  const tooltipRef = react.useRef(null);
29
29
  const mergedRefs = useMergeRefs.useMergeRefs([tooltipRef, ref]);
30
30
  const controlledOpen = open ?? internalOpen;
31
+ const tooltipId = id ?? randomTooltipId;
31
32
  const setOpen = () => {
32
33
  setInternalOpen(true);
33
34
  };
@@ -101,12 +102,13 @@ const Tooltip = react.forwardRef(function Tooltip({ id, children, content, place
101
102
  return null;
102
103
  }
103
104
  const popoverProps = {
104
- [react.version.startsWith('19') ? 'popoverTarget' : 'popovertarget']: id ?? randomTooltipId,
105
+ [react.version.startsWith('19') ? 'popoverTarget' : 'popovertarget']: tooltipId,
105
106
  [react.version.startsWith('19')
106
107
  ? 'popoverTargetAction'
107
108
  : 'popovertargetaction']: 'show',
108
109
  };
109
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ChildContainer, { ref: triggerRef, ...popoverProps, onMouseEnter: setOpen, onMouseLeave: setClose, onFocus: setOpen, onBlur: setClose, children: children }), jsxRuntime.jsx("span", { onMouseEnter: setOpen, onMouseLeave: setClose, ref: mergedRefs, role: 'tooltip', className: cl('ds-tooltip', className), id: id ?? randomTooltipId, popover: 'manual', ...rest, children: content })] }));
110
+ const autoType = `aria-${triggerRef.current?.innerText.trim() ? 'describedby' : 'labelledby'}`;
111
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ChildContainer, { ref: triggerRef, ...popoverProps, onMouseEnter: setOpen, onMouseLeave: setClose, onFocus: setOpen, onBlur: setClose, [type ? 'aria-' + type : autoType]: tooltipId, children: children }), jsxRuntime.jsx("span", { onMouseEnter: setOpen, onMouseLeave: setClose, ref: mergedRefs, role: 'tooltip', className: cl('ds-tooltip', className), id: tooltipId, popover: 'manual', ...rest, children: content })] }));
110
112
  });
111
113
  const arrowPseudoElement = {
112
114
  name: 'ArrowPseudoElement',
@@ -43,16 +43,20 @@ const Dialog = forwardRef(function Dialog({ asChild, children, className, closeB
43
43
  if (event.defaultPrevented)
44
44
  return; // Skip if default action is prevented
45
45
  const { clientY: y, clientX: x, target } = event;
46
- if (event instanceof KeyboardEvent)
47
- return (closedby === 'none' &&
48
- event.key === 'Escape' &&
49
- event.preventDefault()); // Skip ESC-key if closedby="none"
50
46
  /* Check if clicked element or its closest parent has data-command='close' */
51
- if (target instanceof Element) {
47
+ if (target instanceof Element && event.type === 'click') {
52
48
  const closeElement = target.closest('[data-command="close"]');
53
49
  if (closeElement)
54
50
  return dialog?.close();
55
51
  }
52
+ // if the browser supports closedBy, we let the browser handle it
53
+ // see https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/closedBy
54
+ if (dialog && 'closedBy' in dialog)
55
+ return;
56
+ if (event instanceof KeyboardEvent)
57
+ return (closedby === 'none' &&
58
+ event.key === 'Escape' &&
59
+ event.preventDefault()); // Skip ESC-key if closedby="none"
56
60
  if (window.getSelection()?.toString())
57
61
  return; // Fix bug where if you select text spanning two divs it thinks you clicked outside
58
62
  if (dialog && target === dialog && closedby === 'any') {
@@ -83,7 +87,7 @@ const Dialog = forwardRef(function Dialog({ asChild, children, className, closeB
83
87
  currentRef?.addEventListener('close', handleClose);
84
88
  return () => currentRef?.removeEventListener('close', handleClose);
85
89
  }, [onClose]);
86
- return (jsxs(Component, { className: cl('ds-dialog', className), ref: mergedRefs, "data-modal": modal, ...rest, children: [closeButton !== false && (jsx(Button, { "aria-label": closeButton, "data-color": 'neutral', icon: true, variant: 'tertiary', "data-command": 'close' })), children] }));
90
+ return (jsxs(Component, { className: cl('ds-dialog', className), ref: mergedRefs, "data-modal": modal, closedby: closedby, ...rest, children: [closeButton !== false && (jsx(Button, { "aria-label": closeButton, "data-color": 'neutral', icon: true, variant: 'tertiary', "data-command": 'close' })), children] }));
87
91
  });
88
92
 
89
93
  export { Dialog };
@@ -9,8 +9,8 @@ import { forwardRef } from 'react';
9
9
  * @example
10
10
  * <Tag>Melk</Tag>
11
11
  */
12
- const Tag = forwardRef(function Tag({ className, ...rest }, ref) {
13
- return jsx("span", { className: cl('ds-tag', className), ref: ref, ...rest });
12
+ const Tag = forwardRef(function Tag({ className, variant = 'default', ...rest }, ref) {
13
+ return (jsx("span", { className: cl('ds-tag', className), ref: ref, "data-variant": variant, ...rest }));
14
14
  });
15
15
 
16
16
  export { Tag };
@@ -19,13 +19,14 @@ import { useMergeRefs } from '../../utilities/hooks/use-merge-refs/use-merge-ref
19
19
  * Hover me
20
20
  * </Tooltip>
21
21
  */
22
- const Tooltip = forwardRef(function Tooltip({ id, children, content, placement = 'top', autoPlacement = true, open, className, ...rest }, ref) {
22
+ const Tooltip = forwardRef(function Tooltip({ id, children, content, placement = 'top', autoPlacement = true, open, className, type, ...rest }, ref) {
23
23
  const randomTooltipId = useId();
24
24
  const [internalOpen, setInternalOpen] = useState(false);
25
25
  const triggerRef = useRef(null);
26
26
  const tooltipRef = useRef(null);
27
27
  const mergedRefs = useMergeRefs([tooltipRef, ref]);
28
28
  const controlledOpen = open ?? internalOpen;
29
+ const tooltipId = id ?? randomTooltipId;
29
30
  const setOpen = () => {
30
31
  setInternalOpen(true);
31
32
  };
@@ -99,12 +100,13 @@ const Tooltip = forwardRef(function Tooltip({ id, children, content, placement =
99
100
  return null;
100
101
  }
101
102
  const popoverProps = {
102
- [version.startsWith('19') ? 'popoverTarget' : 'popovertarget']: id ?? randomTooltipId,
103
+ [version.startsWith('19') ? 'popoverTarget' : 'popovertarget']: tooltipId,
103
104
  [version.startsWith('19')
104
105
  ? 'popoverTargetAction'
105
106
  : 'popovertargetaction']: 'show',
106
107
  };
107
- return (jsxs(Fragment$1, { children: [jsx(ChildContainer, { ref: triggerRef, ...popoverProps, onMouseEnter: setOpen, onMouseLeave: setClose, onFocus: setOpen, onBlur: setClose, children: children }), jsx("span", { onMouseEnter: setOpen, onMouseLeave: setClose, ref: mergedRefs, role: 'tooltip', className: cl('ds-tooltip', className), id: id ?? randomTooltipId, popover: 'manual', ...rest, children: content })] }));
108
+ const autoType = `aria-${triggerRef.current?.innerText.trim() ? 'describedby' : 'labelledby'}`;
109
+ return (jsxs(Fragment$1, { children: [jsx(ChildContainer, { ref: triggerRef, ...popoverProps, onMouseEnter: setOpen, onMouseLeave: setClose, onFocus: setOpen, onBlur: setClose, [type ? 'aria-' + type : autoType]: tooltipId, children: children }), jsx("span", { onMouseEnter: setOpen, onMouseLeave: setClose, ref: mergedRefs, role: 'tooltip', className: cl('ds-tooltip', className), id: tooltipId, popover: 'manual', ...rest, children: content })] }));
108
110
  });
109
111
  const arrowPseudoElement = {
110
112
  name: 'ArrowPseudoElement',
@@ -10,6 +10,8 @@ export type DialogProps = MergeRight<DefaultProps & DialogHTMLAttributes<HTMLDia
10
10
  /**
11
11
  * Light dismiss behavior, allowing to close on backdrop click by setting `closedby="any"`.
12
12
  *
13
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/closedBy
14
+ *
13
15
  * @default 'closerequest'
14
16
  */
15
17
  closedby?: 'none' | 'closerequest' | 'any';
@@ -69,6 +71,8 @@ export declare const Dialog: import("react").ForwardRefExoticComponent<Omit<Defa
69
71
  /**
70
72
  * Light dismiss behavior, allowing to close on backdrop click by setting `closedby="any"`.
71
73
  *
74
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/closedBy
75
+ *
72
76
  * @default 'closerequest'
73
77
  */
74
78
  closedby?: "none" | "closerequest" | "any";
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAKlD,MAAM,MAAM,WAAW,GAAG,UAAU,CAClC,YAAY,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,EACtD;IACE;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,cAAc,GAAG,KAAK,CAAC;IAC3C;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CACF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,MAAM;IA5Df;;;OAGG;kBACW,MAAM,GAAG,KAAK;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AC"}
@@ -7,6 +7,12 @@ export type TagProps = MergeRight<DefaultProps & HTMLAttributes<HTMLSpanElement>
7
7
  * Change the color scheme of the tag
8
8
  */
9
9
  'data-color'?: Color | SeverityColors;
10
+ /**
11
+ * The visual variant of the tag
12
+ *
13
+ * @default 'default'
14
+ */
15
+ variant?: 'default' | 'outline';
10
16
  }>;
11
17
  /**
12
18
  * Use `Tag` to display categories or statuses.
@@ -14,10 +20,16 @@ export type TagProps = MergeRight<DefaultProps & HTMLAttributes<HTMLSpanElement>
14
20
  * @example
15
21
  * <Tag>Melk</Tag>
16
22
  */
17
- export declare const Tag: import("react").ForwardRefExoticComponent<Omit<DefaultProps & HTMLAttributes<HTMLSpanElement>, "data-color"> & {
23
+ export declare const Tag: import("react").ForwardRefExoticComponent<Omit<DefaultProps & HTMLAttributes<HTMLSpanElement>, "data-color" | "variant"> & {
18
24
  /**
19
25
  * Change the color scheme of the tag
20
26
  */
21
27
  'data-color'?: Color | SeverityColors;
28
+ /**
29
+ * The visual variant of the tag
30
+ *
31
+ * @default 'default'
32
+ */
33
+ variant?: "default" | "outline";
22
34
  } & import("react").RefAttributes<HTMLSpanElement>>;
23
35
  //# sourceMappingURL=tag.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../../src/components/tag/tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,QAAQ,GAAG,UAAU,CAC/B,YAAY,GAAG,cAAc,CAAC,eAAe,CAAC,EAC9C;IACE;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,GAAG,cAAc,CAAC;CACvC,CACF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,GAAG;IAbZ;;OAEG;mBACY,KAAK,GAAG,cAAc;mDAevC,CAAC"}
1
+ {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../../src/components/tag/tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,QAAQ,GAAG,UAAU,CAC/B,YAAY,GAAG,cAAc,CAAC,eAAe,CAAC,EAC9C;IACE;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,GAAG,cAAc,CAAC;IACtC;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC,CACF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,GAAG;IAnBZ;;OAEG;mBACY,KAAK,GAAG,cAAc;IACrC;;;;OAIG;cACO,SAAS,GAAG,SAAS;mDAsBjC,CAAC"}
@@ -28,6 +28,11 @@ export type TooltipProps = MergeRight<Omit<DefaultProps, 'data-color'> & HTMLAtt
28
28
  * This overrides the internal state of the tooltip.
29
29
  */
30
30
  open?: boolean;
31
+ /**
32
+ * Override if `aria-describedby` or `aria-labelledby` is used.
33
+ * By default, if the trigger element has no inner text, `aria-labelledby` is used.
34
+ */
35
+ type?: 'describedby' | 'labelledby';
31
36
  }>;
32
37
  /**
33
38
  * Tooltip component that displays a small piece of information when hovering or focusing on an element.
@@ -42,7 +47,7 @@ export type TooltipProps = MergeRight<Omit<DefaultProps, 'data-color'> & HTMLAtt
42
47
  * Hover me
43
48
  * </Tooltip>
44
49
  */
45
- export declare const Tooltip: import("react").ForwardRefExoticComponent<Omit<Omit<DefaultProps, "data-color"> & HTMLAttributes<HTMLDivElement>, "content" | "children" | "open" | "placement" | "autoPlacement"> & {
50
+ export declare const Tooltip: import("react").ForwardRefExoticComponent<Omit<Omit<DefaultProps, "data-color"> & HTMLAttributes<HTMLDivElement>, "type" | "content" | "children" | "open" | "placement" | "autoPlacement"> & {
46
51
  /**
47
52
  * The element or string that triggers the tooltip.
48
53
  *
@@ -69,5 +74,10 @@ export declare const Tooltip: import("react").ForwardRefExoticComponent<Omit<Omi
69
74
  * This overrides the internal state of the tooltip.
70
75
  */
71
76
  open?: boolean;
77
+ /**
78
+ * Override if `aria-describedby` or `aria-labelledby` is used.
79
+ * By default, if the trigger element has no inner text, `aria-labelledby` is used.
80
+ */
81
+ type?: "describedby" | "labelledby";
72
82
  } & RefAttributes<HTMLDivElement>>;
73
83
  //# sourceMappingURL=tooltip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/tooltip/tooltip.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAWzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,MAAM,YAAY,GAAG,UAAU,CACnC,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,GAAG,cAAc,CAAC,cAAc,CAAC,EACjE;IACE;;;;;OAKG;IACH,QAAQ,EAAE,CAAC,YAAY,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC,GAAG,MAAM,CAAC;IAC/D;;QAEI;IACJ,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAChD;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG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AAa,CAAC,WAAW,CAAC,CAAC,GAAG,MAAM;IAC9D;;QAEI;aACK,MAAM;IACf;;;OAGG;gBACS,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM;IAC/C;;;OAGG;oBACa,OAAO;IACvB;;;OAGG;WACI,OAAO;IACd;;;OAGG;WACI,aAAa,GAAG,YAAY;kCAwKtC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@digdir/designsystemet-react",
3
3
  "type": "module",
4
- "version": "1.7.1",
4
+ "version": "1.7.2",
5
5
  "description": "React components for Designsystemet",
6
6
  "author": "Designsystemet team",
7
7
  "repository": {
@@ -38,20 +38,20 @@
38
38
  "dependencies": {
39
39
  "@floating-ui/dom": "^1.7.4",
40
40
  "@floating-ui/react": "0.26.23",
41
- "@navikt/aksel-icons": "^7.32.2",
41
+ "@navikt/aksel-icons": "^7.32.5",
42
42
  "@radix-ui/react-slot": "^1.2.3",
43
43
  "@tanstack/react-virtual": "^3.13.12",
44
- "@u-elements/u-combobox": "^1.0.2",
44
+ "@u-elements/u-combobox": "^1.0.4",
45
45
  "@u-elements/u-datalist": "^1.0.14",
46
46
  "@u-elements/u-details": "^0.1.5",
47
47
  "clsx": "^2.1.1"
48
48
  },
49
49
  "devDependencies": {
50
- "@rollup/plugin-commonjs": "^28.0.8",
50
+ "@rollup/plugin-commonjs": "^28.0.9",
51
51
  "@rollup/plugin-node-resolve": "^16.0.3",
52
- "@storybook/addon-docs": "^9.1.13",
53
- "@storybook/addon-vitest": "^9.1.13",
54
- "@storybook/react-vite": "^9.1.13",
52
+ "@storybook/addon-docs": "^9.1.16",
53
+ "@storybook/addon-vitest": "^9.1.16",
54
+ "@storybook/react-vite": "^9.1.16",
55
55
  "@testing-library/dom": "^10.4.1",
56
56
  "@testing-library/jest-dom": "^6.9.1",
57
57
  "@testing-library/react": "^16.3.0",
@@ -60,14 +60,14 @@
60
60
  "@types/react-dom": "^19.2.2",
61
61
  "react": "^19.2.0",
62
62
  "react-dom": "^19.2.0",
63
- "rimraf": "^6.0.1",
63
+ "rimraf": "^6.1.0",
64
64
  "rollup": "^4.52.5",
65
65
  "rollup-plugin-copy": "^3.5.0",
66
- "storybook": "^9.1.13",
66
+ "storybook": "^9.1.16",
67
67
  "tsx": "4.20.6",
68
68
  "typescript": "^5.9.3",
69
- "@digdir/designsystemet": "^1.7.1",
70
- "@digdir/designsystemet-css": "^1.7.1"
69
+ "@digdir/designsystemet": "^1.7.2",
70
+ "@digdir/designsystemet-css": "^1.7.2"
71
71
  },
72
72
  "scripts": {
73
73
  "build": "pnpm run clean && tsc -b tsconfig.lib.json --emitDeclarationOnly false && rollup -c --bundleConfigAsCjs",