@digdir/designsystemet-react 1.0.5 → 1.0.7

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 (31) hide show
  1. package/LICENSE +7 -0
  2. package/dist/cjs/components/Combobox/useFloatingCombobox.js +1 -1
  3. package/dist/cjs/components/ErrorSummary/ErrorSummary.js +2 -2
  4. package/dist/cjs/components/ErrorSummary/ErrorSummaryItem.js +5 -1
  5. package/dist/cjs/components/Field/index.js +1 -1
  6. package/dist/cjs/components/MultiSuggestion/index.js +7 -7
  7. package/dist/cjs/components/Popover/Popover.js +1 -3
  8. package/dist/cjs/components/Tooltip/Tooltip.js +1 -3
  9. package/dist/esm/components/Combobox/useFloatingCombobox.js +1 -1
  10. package/dist/esm/components/ErrorSummary/ErrorSummary.js +2 -2
  11. package/dist/esm/components/ErrorSummary/ErrorSummaryItem.js +5 -1
  12. package/dist/esm/components/Field/index.js +1 -1
  13. package/dist/esm/components/MultiSuggestion/index.js +7 -7
  14. package/dist/esm/components/Popover/Popover.js +1 -3
  15. package/dist/esm/components/Tooltip/Tooltip.js +1 -3
  16. package/dist/types/colors.d.ts +1 -1
  17. package/dist/types/components/Combobox/useFloatingCombobox.d.ts +12 -35
  18. package/dist/types/components/Combobox/useFloatingCombobox.d.ts.map +1 -1
  19. package/dist/types/components/Dropdown/index.d.ts +1 -1
  20. package/dist/types/components/ErrorSummary/ErrorSummary.d.ts.map +1 -1
  21. package/dist/types/components/ErrorSummary/ErrorSummaryItem.d.ts +5 -1
  22. package/dist/types/components/ErrorSummary/ErrorSummaryItem.d.ts.map +1 -1
  23. package/dist/types/components/Field/index.d.ts +1 -1
  24. package/dist/types/components/Popover/Popover.d.ts.map +1 -1
  25. package/dist/types/components/Popover/index.d.ts +1 -1
  26. package/dist/types/components/Tooltip/Tooltip.d.ts.map +1 -1
  27. package/dist/types/index.d.ts +1 -1
  28. package/dist/types/index.d.ts.map +1 -1
  29. package/dist/types/utilities/RovingFocus/useRovingFocus.d.ts +1 -3
  30. package/dist/types/utilities/RovingFocus/useRovingFocus.d.ts.map +1 -1
  31. package/package.json +24 -17
package/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright 2024 Digitaliseringsdirektoratet (Digdir)
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -6,7 +6,7 @@ var react = require('react');
6
6
  var reactDom = require('react-dom');
7
7
  var ComboboxIdContext = require('./ComboboxIdContext.js');
8
8
 
9
- const useFloatingCombobox = ({ listRef }) => {
9
+ const useFloatingCombobox = ({ listRef, }) => {
10
10
  const [open, setOpen] = react.useState(false);
11
11
  const { activeIndex } = ComboboxIdContext.useComboboxId();
12
12
  const dispatch = ComboboxIdContext.useComboboxIdDispatch();
@@ -26,11 +26,11 @@ const ErrorSummaryContext = react.createContext({
26
26
  * </ErrorSummary.List>
27
27
  * </ErrorSummary>
28
28
  */
29
- const ErrorSummary = react.forwardRef(function ErrorSummary({ asChild, role = 'alert', 'aria-live': ariaLive = 'polite', 'aria-relevant': ariaRelevant = 'all', className, ...rest }, ref) {
29
+ const ErrorSummary = react.forwardRef(function ErrorSummary({ asChild, className, ...rest }, ref) {
30
30
  const randomId = react.useId();
31
31
  const [headingId, setHeadingId] = react.useState(randomId);
32
32
  const Component = asChild ? reactSlot.Slot : 'div';
33
- return (jsxRuntime.jsx(ErrorSummaryContext.Provider, { value: { headingId, setHeadingId }, children: jsxRuntime.jsx(Component, { "aria-labelledby": headingId, "aria-live": ariaLive, "aria-relevant": ariaRelevant, className: cl('ds-error-summary', className), ref: ref, role: role, ...rest }) }));
33
+ return (jsxRuntime.jsx(ErrorSummaryContext.Provider, { value: { headingId, setHeadingId }, children: jsxRuntime.jsx(Component, { tabIndex: -1, "aria-labelledby": headingId, className: cl('ds-error-summary', className), ref: ref, ...rest }) }));
34
34
  });
35
35
 
36
36
  exports.ErrorSummary = ErrorSummary;
@@ -10,7 +10,11 @@ var ListItem = require('../List/ListItem.js');
10
10
  * ErrorSummaryItem component, used to display an error link in the ErrorSummary.
11
11
  *
12
12
  * @example
13
- * <ErrorSummary.Item href='#'>Link to error</ErrorSummary.Item>
13
+ * <ErrorSummary.Item>
14
+ * <ErrorSummary.Link href="#">
15
+ * Link to error
16
+ * </ErrorSummary.Link>
17
+ * </ErrorSummary.Item>
14
18
  */
15
19
  const ErrorSummaryItem = react.forwardRef(function ErrorSummaryItem({ ...rest }, ref) {
16
20
  return jsxRuntime.jsx(ListItem.ListItem, { ref: ref, ...rest });
@@ -10,7 +10,7 @@ var FieldDescription = require('./FieldDescription.js');
10
10
  * Field component, used to wrap a form field.
11
11
  *
12
12
  * @example
13
- * <Field data-my-field>
13
+ * <Field>
14
14
  * <Label>Kort beskrivelse</Label>
15
15
  * <Field.Description>Beskrivelse</Field.Description>
16
16
  * <Input />
@@ -17,13 +17,13 @@ const MultiSuggestion = Object.assign(MultiSuggestion$1.MultiSuggestion, {
17
17
  Empty: MultiSuggestionEmpty.MultiSuggestionEmpty,
18
18
  Clear: MultiSuggestionClear.MultiSuggestionClear,
19
19
  });
20
- MultiSuggestion.displayName = 'EXPERIMENTRAL_MultiSuggestion';
21
- MultiSuggestion.Input.displayName = 'EXPERIMENTRAL_MultiSuggestion.Input';
22
- MultiSuggestion.List.displayName = 'EXPERIMENTRAL_MultiSuggestion.List';
23
- MultiSuggestion.Option.displayName = 'EXPERIMENTRAL_MultiSuggestion.Option';
24
- MultiSuggestion.Chips.displayName = 'EXPERIMENTRAL_MultiSuggestion.Chips';
25
- MultiSuggestion.Empty.displayName = 'EXPERIMENTRAL_MultiSuggestion.Empty';
26
- MultiSuggestion.Clear.displayName = 'EXPERIMENTRAL_MultiSuggestion.Clear';
20
+ MultiSuggestion.displayName = 'EXPERIMENTAL_MultiSuggestion';
21
+ MultiSuggestion.Input.displayName = 'EXPERIMENTAL_MultiSuggestion.Input';
22
+ MultiSuggestion.List.displayName = 'EXPERIMENTAL_MultiSuggestion.List';
23
+ MultiSuggestion.Option.displayName = 'EXPERIMENTAL_MultiSuggestion.Option';
24
+ MultiSuggestion.Chips.displayName = 'EXPERIMENTAL_MultiSuggestion.Chips';
25
+ MultiSuggestion.Empty.displayName = 'EXPERIMENTAL_MultiSuggestion.Empty';
26
+ MultiSuggestion.Clear.displayName = 'EXPERIMENTAL_MultiSuggestion.Clear';
27
27
 
28
28
  exports.EXPERIMENTAL_MultiSuggestionChips = MultiSuggestionChips.MultiSuggestionChips;
29
29
  exports.EXPERIMENTAL_MultiSuggestionClear = MultiSuggestionClear.MultiSuggestionClear;
@@ -95,9 +95,7 @@ const Popover = react.forwardRef(function Popover({ id, className, onClose, onOp
95
95
  if (id)
96
96
  setPopoverId?.(id);
97
97
  }, [id]);
98
- return (jsxRuntime.jsx(Component, { className: cl('ds-popover', className), id: id || popoverId,
99
- // @ts-ignore @types/react-dom does not understand popover yet
100
- popover: 'manual', "data-variant": variant, ref: mergedRefs, ...rest }));
98
+ return (jsxRuntime.jsx(Component, { className: cl('ds-popover', className), id: id || popoverId, popover: 'manual', "data-variant": variant, ref: mergedRefs, ...rest }));
101
99
  });
102
100
  const arrowPseudoElement = {
103
101
  name: 'ArrowPseudoElement',
@@ -89,9 +89,7 @@ const Tooltip = react.forwardRef(function Tooltip({ id, children, content, place
89
89
  ? 'popoverTargetAction'
90
90
  : 'popovertargetaction']: 'show',
91
91
  };
92
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ChildContainer, { ref: triggerRef, ...popoverProps, onMouseEnter: setOpen, onMouseLeave: setClose, onFocus: setOpen, onBlur: setClose, children: children }), jsxRuntime.jsx("div", { ref: mergedRefs, role: 'tooltip', className: cl('ds-tooltip', className), id: id ?? randomTooltipId,
93
- // @ts-ignore @types/react-dom does not understand popover yet
94
- popover: 'manual', ...rest, children: content })] }));
92
+ 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", { ref: mergedRefs, role: 'tooltip', className: cl('ds-tooltip', className), id: id ?? randomTooltipId, popover: 'manual', ...rest, children: content })] }));
95
93
  });
96
94
  const arrowPseudoElement = {
97
95
  name: 'ArrowPseudoElement',
@@ -4,7 +4,7 @@ import { useState } from 'react';
4
4
  import { flushSync } from 'react-dom';
5
5
  import { useComboboxId, useComboboxIdDispatch } from './ComboboxIdContext.js';
6
6
 
7
- const useFloatingCombobox = ({ listRef }) => {
7
+ const useFloatingCombobox = ({ listRef, }) => {
8
8
  const [open, setOpen] = useState(false);
9
9
  const { activeIndex } = useComboboxId();
10
10
  const dispatch = useComboboxIdDispatch();
@@ -24,11 +24,11 @@ const ErrorSummaryContext = createContext({
24
24
  * </ErrorSummary.List>
25
25
  * </ErrorSummary>
26
26
  */
27
- const ErrorSummary = forwardRef(function ErrorSummary({ asChild, role = 'alert', 'aria-live': ariaLive = 'polite', 'aria-relevant': ariaRelevant = 'all', className, ...rest }, ref) {
27
+ const ErrorSummary = forwardRef(function ErrorSummary({ asChild, className, ...rest }, ref) {
28
28
  const randomId = useId();
29
29
  const [headingId, setHeadingId] = useState(randomId);
30
30
  const Component = asChild ? Slot : 'div';
31
- return (jsx(ErrorSummaryContext.Provider, { value: { headingId, setHeadingId }, children: jsx(Component, { "aria-labelledby": headingId, "aria-live": ariaLive, "aria-relevant": ariaRelevant, className: cl('ds-error-summary', className), ref: ref, role: role, ...rest }) }));
31
+ return (jsx(ErrorSummaryContext.Provider, { value: { headingId, setHeadingId }, children: jsx(Component, { tabIndex: -1, "aria-labelledby": headingId, className: cl('ds-error-summary', className), ref: ref, ...rest }) }));
32
32
  });
33
33
 
34
34
  export { ErrorSummary, ErrorSummaryContext };
@@ -8,7 +8,11 @@ import { ListItem } from '../List/ListItem.js';
8
8
  * ErrorSummaryItem component, used to display an error link in the ErrorSummary.
9
9
  *
10
10
  * @example
11
- * <ErrorSummary.Item href='#'>Link to error</ErrorSummary.Item>
11
+ * <ErrorSummary.Item>
12
+ * <ErrorSummary.Link href="#">
13
+ * Link to error
14
+ * </ErrorSummary.Link>
15
+ * </ErrorSummary.Item>
12
16
  */
13
17
  const ErrorSummaryItem = forwardRef(function ErrorSummaryItem({ ...rest }, ref) {
14
18
  return jsx(ListItem, { ref: ref, ...rest });
@@ -8,7 +8,7 @@ import { FieldDescription } from './FieldDescription.js';
8
8
  * Field component, used to wrap a form field.
9
9
  *
10
10
  * @example
11
- * <Field data-my-field>
11
+ * <Field>
12
12
  * <Label>Kort beskrivelse</Label>
13
13
  * <Field.Description>Beskrivelse</Field.Description>
14
14
  * <Input />
@@ -15,12 +15,12 @@ const MultiSuggestion = Object.assign(MultiSuggestion$1, {
15
15
  Empty: MultiSuggestionEmpty,
16
16
  Clear: MultiSuggestionClear,
17
17
  });
18
- MultiSuggestion.displayName = 'EXPERIMENTRAL_MultiSuggestion';
19
- MultiSuggestion.Input.displayName = 'EXPERIMENTRAL_MultiSuggestion.Input';
20
- MultiSuggestion.List.displayName = 'EXPERIMENTRAL_MultiSuggestion.List';
21
- MultiSuggestion.Option.displayName = 'EXPERIMENTRAL_MultiSuggestion.Option';
22
- MultiSuggestion.Chips.displayName = 'EXPERIMENTRAL_MultiSuggestion.Chips';
23
- MultiSuggestion.Empty.displayName = 'EXPERIMENTRAL_MultiSuggestion.Empty';
24
- MultiSuggestion.Clear.displayName = 'EXPERIMENTRAL_MultiSuggestion.Clear';
18
+ MultiSuggestion.displayName = 'EXPERIMENTAL_MultiSuggestion';
19
+ MultiSuggestion.Input.displayName = 'EXPERIMENTAL_MultiSuggestion.Input';
20
+ MultiSuggestion.List.displayName = 'EXPERIMENTAL_MultiSuggestion.List';
21
+ MultiSuggestion.Option.displayName = 'EXPERIMENTAL_MultiSuggestion.Option';
22
+ MultiSuggestion.Chips.displayName = 'EXPERIMENTAL_MultiSuggestion.Chips';
23
+ MultiSuggestion.Empty.displayName = 'EXPERIMENTAL_MultiSuggestion.Empty';
24
+ MultiSuggestion.Clear.displayName = 'EXPERIMENTAL_MultiSuggestion.Clear';
25
25
 
26
26
  export { MultiSuggestion as EXPERIMENTAL_MultiSuggestion, MultiSuggestionChips as EXPERIMENTAL_MultiSuggestionChips, MultiSuggestionClear as EXPERIMENTAL_MultiSuggestionClear, MultiSuggestionEmpty as EXPERIMENTAL_MultiSuggestionEmpty, MultiSuggestionInput as EXPERIMENTAL_MultiSuggestionInput, MultiSuggestionList as EXPERIMENTAL_MultiSuggestionList, MultiSuggestionOption as EXPERIMENTAL_MultiSuggestionOption };
@@ -93,9 +93,7 @@ const Popover = forwardRef(function Popover({ id, className, onClose, onOpen, op
93
93
  if (id)
94
94
  setPopoverId?.(id);
95
95
  }, [id]);
96
- return (jsx(Component, { className: cl('ds-popover', className), id: id || popoverId,
97
- // @ts-ignore @types/react-dom does not understand popover yet
98
- popover: 'manual', "data-variant": variant, ref: mergedRefs, ...rest }));
96
+ return (jsx(Component, { className: cl('ds-popover', className), id: id || popoverId, popover: 'manual', "data-variant": variant, ref: mergedRefs, ...rest }));
99
97
  });
100
98
  const arrowPseudoElement = {
101
99
  name: 'ArrowPseudoElement',
@@ -87,9 +87,7 @@ const Tooltip = forwardRef(function Tooltip({ id, children, content, placement =
87
87
  ? 'popoverTargetAction'
88
88
  : 'popovertargetaction']: 'show',
89
89
  };
90
- return (jsxs(Fragment$1, { children: [jsx(ChildContainer, { ref: triggerRef, ...popoverProps, onMouseEnter: setOpen, onMouseLeave: setClose, onFocus: setOpen, onBlur: setClose, children: children }), jsx("div", { ref: mergedRefs, role: 'tooltip', className: cl('ds-tooltip', className), id: id ?? randomTooltipId,
91
- // @ts-ignore @types/react-dom does not understand popover yet
92
- popover: 'manual', ...rest, children: content })] }));
90
+ return (jsxs(Fragment$1, { children: [jsx(ChildContainer, { ref: triggerRef, ...popoverProps, onMouseEnter: setOpen, onMouseLeave: setClose, onFocus: setOpen, onBlur: setClose, children: children }), jsx("span", { ref: mergedRefs, role: 'tooltip', className: cl('ds-tooltip', className), id: id ?? randomTooltipId, popover: 'manual', ...rest, children: content })] }));
93
91
  });
94
92
  const arrowPseudoElement = {
95
93
  name: 'ArrowPseudoElement',
@@ -3,7 +3,7 @@ type EmptyObject = {
3
3
  [emptyObjectSymbol]?: never;
4
4
  };
5
5
  /**
6
- * Base interface for available colors in the design system.
6
+ * Base interface for available colors in Designsystemet.
7
7
  * The CLI will generate augmentations of this interface to allow
8
8
  * type safety of custom color names.
9
9
  */
@@ -1,42 +1,19 @@
1
- import type { MutableRefObject } from 'react';
1
+ import { useInteractions } from '@floating-ui/react';
2
+ import type { UseFloatingReturn } from '@floating-ui/react';
3
+ import type { RefObject } from 'react';
2
4
  type UseFloatingComboboxProps = {
3
- listRef: MutableRefObject<(HTMLElement | null)[]>;
5
+ listRef: RefObject<(HTMLElement | null)[]>;
4
6
  };
5
- export declare const useFloatingCombobox: ({ listRef }: UseFloatingComboboxProps) => {
7
+ export declare const useFloatingCombobox: ({ listRef, }: UseFloatingComboboxProps) => {
6
8
  open: boolean;
7
9
  setOpen: React.Dispatch<React.SetStateAction<boolean>>;
8
- activeIndex: number;
9
- refs: {
10
- reference: MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
11
- floating: React.MutableRefObject<HTMLElement | null>;
12
- setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
13
- setFloating: (node: HTMLElement | null) => void;
14
- } & import("@floating-ui/react").ExtendedRefs<HTMLInputElement>;
15
- floatingStyles: React.CSSProperties;
16
- context: {
17
- x: number;
18
- y: number;
19
- placement: import("@floating-ui/utils").Placement;
20
- strategy: import("@floating-ui/utils").Strategy;
21
- middlewareData: import("@floating-ui/core").MiddlewareData;
22
- isPositioned: boolean;
23
- update: () => void;
24
- floatingStyles: React.CSSProperties;
25
- open: boolean;
26
- onOpenChange: (open: boolean, event?: Event, reason?: import("@floating-ui/react").OpenChangeReason) => void;
27
- events: import("@floating-ui/react").FloatingEvents;
28
- dataRef: React.MutableRefObject<import("@floating-ui/react").ContextData>;
29
- nodeId: string | undefined;
30
- floatingId: string;
31
- refs: import("@floating-ui/react").ExtendedRefs<HTMLInputElement>;
32
- elements: import("@floating-ui/react").ExtendedElements<HTMLInputElement>;
33
- };
34
- getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
35
- getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
36
- getItemProps: (userProps?: Omit<React.HTMLProps<HTMLElement>, "selected" | "active"> & {
37
- active?: boolean;
38
- selected?: boolean;
39
- }) => Record<string, unknown>;
10
+ activeIndex: number | null;
11
+ refs: UseFloatingReturn<HTMLInputElement>["refs"];
12
+ floatingStyles: UseFloatingReturn<HTMLInputElement>["floatingStyles"];
13
+ context: UseFloatingReturn<HTMLInputElement>["context"];
14
+ getReferenceProps: ReturnType<typeof useInteractions>["getReferenceProps"];
15
+ getFloatingProps: ReturnType<typeof useInteractions>["getFloatingProps"];
16
+ getItemProps: ReturnType<typeof useInteractions>["getItemProps"];
40
17
  };
41
18
  export {};
42
19
  //# sourceMappingURL=useFloatingCombobox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFloatingCombobox.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/useFloatingCombobox.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAK9C,KAAK,wBAAwB,GAAG;IAC9B,OAAO,EAAE,gBAAgB,CAAC,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,aAAa,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuExE,CAAC"}
1
+ {"version":3,"file":"useFloatingCombobox.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/useFloatingCombobox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,eAAe,EAGhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,KAAK,wBAAwB,GAAG;IAC9B,OAAO,EAAE,SAAS,CAAC,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,cAEjC,wBAAwB,KAAG;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACvD,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;IAClD,cAAc,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAC,gBAAgB,CAAC,CAAC;IACtE,OAAO,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,CAAC;IACxD,iBAAiB,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,mBAAmB,CAAC,CAAC;IAC3E,gBAAgB,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,kBAAkB,CAAC,CAAC;IACzE,YAAY,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,cAAc,CAAC,CAAC;CAwElE,CAAC"}
@@ -21,7 +21,7 @@ import { DropdownTriggerContext } from './DropdownTriggerContext';
21
21
  * </Dropdown.TriggerContext>
22
22
  */
23
23
  declare const Dropdown: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & Omit<import("..").PopoverProps, "variant">, "placement"> & {
24
- placement?: import("@floating-ui/utils").Placement;
24
+ placement?: import("@floating-ui/dom").Placement;
25
25
  } & React.RefAttributes<HTMLDivElement>> & {
26
26
  TriggerContext: {
27
27
  ({ children, }: import("./DropdownTriggerContext").DropdownTriggerContextProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorSummary.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorSummary/ErrorSummary.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,KAAK,uBAAuB,GAAG;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,mBAAmB,wCAG9B,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,YAAY,EAAE,YAAY,CAAC,CAAC;AAEtE;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,YAAY;cAnBb,KAAK,CAAC,SAAS;4GAkD1B,CAAC"}
1
+ {"version":3,"file":"ErrorSummary.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorSummary/ErrorSummary.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,KAAK,uBAAuB,GAAG;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,mBAAmB,wCAG9B,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,YAAY,EAAE,YAAY,CAAC,CAAC;AAEtE;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,YAAY;cAnBb,KAAK,CAAC,SAAS;4GAsC1B,CAAC"}
@@ -4,7 +4,11 @@ export type ErrorSummaryItemProps = ListItemProps;
4
4
  * ErrorSummaryItem component, used to display an error link in the ErrorSummary.
5
5
  *
6
6
  * @example
7
- * <ErrorSummary.Item href='#'>Link to error</ErrorSummary.Item>
7
+ * <ErrorSummary.Item>
8
+ * <ErrorSummary.Link href="#">
9
+ * Link to error
10
+ * </ErrorSummary.Link>
11
+ * </ErrorSummary.Item>
8
12
  */
9
13
  export declare const ErrorSummaryItem: React.ForwardRefExoticComponent<{
10
14
  asChild?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorSummaryItem.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorSummary/ErrorSummaryItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAEvD,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC;AAElD;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;+EAK3B,CAAC"}
1
+ {"version":3,"file":"ErrorSummaryItem.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorSummary/ErrorSummaryItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAEvD,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC;AAElD;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB;;+EAK3B,CAAC"}
@@ -5,7 +5,7 @@ import { FieldDescription } from './FieldDescription';
5
5
  * Field component, used to wrap a form field.
6
6
  *
7
7
  * @example
8
- * <Field data-my-field>
8
+ * <Field>
9
9
  * <Label>Kort beskrivelse</Label>
10
10
  * <Field.Description>Beskrivelse</Field.Description>
11
11
  * <Input />
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,cAAc,EACf,MAAM,qCAAqC,CAAC;AAQ7C,OAAO,KAAK,EAAmB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAInE,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;AAMlD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC,GAAG,CAAC;QAClB,UAAU,mBAAmB;YAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB;KACF;IACD,UAAU,KAAK,CAAC;QACd,UAAU,cAAc,CAAC,CAAC;YACxB,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB;KACF;CACF;AAED,MAAM,MAAM,YAAY,GAAG,UAAU,CACnC,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,EAC7C;IACE;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC/B;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,GAAG,cAAc,CAAC;IACtC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CACF,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,OAAO;IA9DhB;;OAEG;SACE,MAAM;IACX;;;OAGG;gBACS,SAAS;IACrB;;;OAGG;WACI,OAAO;IACd;;;;OAIG;cACO,SAAS,GAAG,QAAQ;IAC9B;;OAEG;mBACY,KAAK,GAAG,cAAc;IACrC;;OAEG;aACM,MAAM,IAAI;IACnB;;OAEG;cACO,MAAM,IAAI;IACpB;;;OAGG;oBACa,OAAO;IACvB;;;OAGG;cACO,OAAO;wCAiIpB,CAAC"}
1
+ {"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,cAAc,EACf,MAAM,qCAAqC,CAAC;AAQ7C,OAAO,KAAK,EAAmB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAInE,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;AAMlD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC,GAAG,CAAC;QAClB,UAAU,mBAAmB;YAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB;KACF;IACD,UAAU,KAAK,CAAC;QACd,UAAU,cAAc,CAAC,CAAC;YACxB,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB;KACF;CACF;AAED,MAAM,MAAM,YAAY,GAAG,UAAU,CACnC,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,EAC7C;IACE;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC/B;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,GAAG,cAAc,CAAC;IACtC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CACF,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,OAAO;IA9DhB;;OAEG;SACE,MAAM;IACX;;;OAGG;gBACS,SAAS;IACrB;;;OAGG;WACI,OAAO;IACd;;;;OAIG;cACO,SAAS,GAAG,QAAQ;IAC9B;;OAEG;mBACY,KAAK,GAAG,cAAc;IACrC;;OAEG;aACM,MAAM,IAAI;IACnB;;OAEG;cACO,MAAM,IAAI;IACpB;;;OAGG;oBACa,OAAO;IACvB;;;OAGG;cACO,OAAO;wCAgIpB,CAAC"}
@@ -13,7 +13,7 @@ import { PopoverTriggerContext } from './PopoverTriggerContext';
13
13
  */
14
14
  declare const Popover: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & React.HTMLAttributes<HTMLDivElement>, "id" | "data-color" | "variant" | "asChild" | "open" | "placement" | "onClose" | "autoPlacement" | "onOpen"> & {
15
15
  id?: string;
16
- placement?: import("@floating-ui/utils").Placement;
16
+ placement?: import("@floating-ui/dom").Placement;
17
17
  open?: boolean;
18
18
  variant?: "default" | "tinted";
19
19
  'data-color'?: import("../../colors").Color | import("../../colors").SeverityColors;
@@ -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;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CACF,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,OAAO;IA1ChB;;;;;OAKG;cACO,CAAC,YAAY,GAAG,aAAa,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;kCA+IjB,CAAC"}
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;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CACF,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,OAAO;IA1ChB;;;;;OAKG;cACO,CAAC,YAAY,GAAG,aAAa,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;kCA8IjB,CAAC"}
@@ -1,4 +1,4 @@
1
1
  export * from './components';
2
2
  export * from './utilities';
3
- export type { Size } from './types';
3
+ export type { Size, LabelRequired } from './types';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,YAAY,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC"}
@@ -141,7 +141,7 @@ export declare const useRovingFocus: (value: string) => {
141
141
  onBlurCapture?: React.FocusEventHandler<T> | undefined;
142
142
  onChange?: React.FormEventHandler<T> | undefined;
143
143
  onChangeCapture?: React.FormEventHandler<T> | undefined;
144
- onBeforeInput?: React.FormEventHandler<T> | undefined;
144
+ onBeforeInput?: React.InputEventHandler<T> | undefined;
145
145
  onBeforeInputCapture?: React.FormEventHandler<T> | undefined;
146
146
  onInput?: React.FormEventHandler<T> | undefined;
147
147
  onInputCapture?: React.FormEventHandler<T> | undefined;
@@ -190,8 +190,6 @@ export declare const useRovingFocus: (value: string) => {
190
190
  onProgressCapture?: React.ReactEventHandler<T> | undefined;
191
191
  onRateChange?: React.ReactEventHandler<T> | undefined;
192
192
  onRateChangeCapture?: React.ReactEventHandler<T> | undefined;
193
- onResize?: React.ReactEventHandler<T> | undefined;
194
- onResizeCapture?: React.ReactEventHandler<T> | undefined;
195
193
  onSeeked?: React.ReactEventHandler<T> | undefined;
196
194
  onSeekedCapture?: React.ReactEventHandler<T> | undefined;
197
195
  onSeeking?: React.ReactEventHandler<T> | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"useRovingFocus.d.ts","sourceRoot":"","sources":["../../../src/utilities/RovingFocus/useRovingFocus.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAK5C,wEAAwE;AACxE,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM;;;;qBAcvB,CAAC,SAAS,WAAW,SAAS,cAAc,CAAC,CAAC,CAAC;uBAE/C,WAAW,GAAG,IAAI;uBAOlB,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;qBAOxB,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQrC,CAAC"}
1
+ {"version":3,"file":"useRovingFocus.d.ts","sourceRoot":"","sources":["../../../src/utilities/RovingFocus/useRovingFocus.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAK5C,wEAAwE;AACxE,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM;;;;qBAcvB,CAAC,SAAS,WAAW,SAAS,cAAc,CAAC,CAAC,CAAC;uBAE/C,WAAW,GAAG,IAAI;uBAOlB,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;qBAOxB,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQrC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@digdir/designsystemet-react",
3
3
  "type": "module",
4
- "version": "1.0.5",
4
+ "version": "1.0.7",
5
5
  "description": "React components for Designsystemet",
6
6
  "author": "Designsystemet team",
7
7
  "repository": {
@@ -28,12 +28,6 @@
28
28
  "files": [
29
29
  "dist/**"
30
30
  ],
31
- "scripts": {
32
- "build": "yarn run clean && tsc -b tsconfig.lib.json --emitDeclarationOnly false && rollup -c --bundleConfigAsCjs",
33
- "clean": "rimraf dist && rimraf tsc-build && rimraf --glob \"*.tsbuildinfo\"",
34
- "copy-css-to-build": "copyfiles -u 1 ./src/**/*.css ./tsc-build/",
35
- "types": "tsc --noEmit"
36
- },
37
31
  "peerDependencies": {
38
32
  "react": ">=18.3.1 || ^19.0.0",
39
33
  "react-dom": ">=18.3.1 || ^19.0.0"
@@ -42,11 +36,11 @@
42
36
  "access": "public"
43
37
  },
44
38
  "dependencies": {
45
- "@floating-ui/dom": "^1.6.13",
39
+ "@floating-ui/dom": "^1.7.0",
46
40
  "@floating-ui/react": "0.26.23",
47
- "@navikt/aksel-icons": "^7.18.0",
48
- "@radix-ui/react-slot": "^1.1.2",
49
- "@tanstack/react-virtual": "^3.13.6",
41
+ "@navikt/aksel-icons": "^7.22.0",
42
+ "@radix-ui/react-slot": "^1.2.3",
43
+ "@tanstack/react-virtual": "^3.13.9",
50
44
  "@u-elements/u-datalist": "^0.1.5",
51
45
  "@u-elements/u-details": "^0.1.1",
52
46
  "@u-elements/u-tags": "^0.1.4",
@@ -55,19 +49,32 @@
55
49
  "devDependencies": {
56
50
  "@rollup/plugin-commonjs": "^28.0.3",
57
51
  "@rollup/plugin-node-resolve": "^16.0.1",
52
+ "@storybook/blocks": "^8.6.14",
53
+ "@storybook/preview-api": "^8.6.14",
54
+ "@storybook/react": "^8.6.14",
55
+ "@storybook/test": "^8.6.14",
56
+ "@storybook/types": "^8.6.14",
58
57
  "@testing-library/dom": "^10.4.0",
59
58
  "@testing-library/jest-dom": "^6.6.3",
60
59
  "@testing-library/react": "^16.3.0",
61
60
  "@testing-library/user-event": "^14.6.1",
62
- "@types/react": "^19.1.0",
63
- "@types/react-dom": "^19.1.1",
61
+ "@types/react": "^19.1.5",
62
+ "@types/react-dom": "^19.1.5",
64
63
  "copyfiles": "^2.4.1",
65
- "jsdom": "^26.0.0",
64
+ "jsdom": "^26.1.0",
66
65
  "react": "^19.1.0",
67
66
  "react-dom": "^19.1.0",
68
67
  "rimraf": "^6.0.1",
69
- "rollup": "^4.39.0",
68
+ "rollup": "^4.41.1",
70
69
  "rollup-plugin-copy": "^3.5.0",
71
- "typescript": "^5.8.2"
70
+ "tsx": "4.19.4",
71
+ "typescript": "^5.8.3",
72
+ "@digdir/designsystemet-css": "^1.0.7"
73
+ },
74
+ "scripts": {
75
+ "build": "pnpm run clean && tsc -b tsconfig.lib.json --emitDeclarationOnly false && rollup -c --bundleConfigAsCjs",
76
+ "clean": "rimraf dist && rimraf tsc-build && rimraf --glob \"*.tsbuildinfo\"",
77
+ "copy-css-to-build": "copyfiles -u 1 ./src/**/*.css ./tsc-build/",
78
+ "types": "tsc --noEmit"
72
79
  }
73
- }
80
+ }