@digdir/designsystemet-react 0.0.0-test-20250716071620 → 0.0.0-test-20250717082628

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 (40) hide show
  1. package/dist/cjs/components/dialog/dialog.js +3 -2
  2. package/dist/cjs/components/field/field-observer.js +7 -5
  3. package/dist/esm/components/dialog/dialog.js +3 -2
  4. package/dist/esm/components/field/field-observer.js +7 -5
  5. package/dist/react-types.d.ts +1 -2
  6. package/dist/types/colors.d.ts +1 -23
  7. package/dist/types/colors.d.ts.map +1 -1
  8. package/dist/types/components/Combobox/Combobox.d.ts +2 -2
  9. package/dist/types/components/Combobox/useFormField/useFormField.d.ts +1 -1
  10. package/dist/types/components/Combobox/useFormField/useFormField.d.ts.map +1 -1
  11. package/dist/types/components/alert/alert.d.ts +1 -1
  12. package/dist/types/components/alert/alert.d.ts.map +1 -1
  13. package/dist/types/components/avatar/avatar.d.ts +2 -1
  14. package/dist/types/components/avatar/avatar.d.ts.map +1 -1
  15. package/dist/types/components/badge/badge.d.ts +1 -1
  16. package/dist/types/components/badge/badge.d.ts.map +1 -1
  17. package/dist/types/components/badge/index.d.ts +1 -1
  18. package/dist/types/components/button/button.d.ts +3 -3
  19. package/dist/types/components/button/button.d.ts.map +1 -1
  20. package/dist/types/components/dialog/dialog-trigger.d.ts +1 -1
  21. package/dist/types/components/dialog/dialog.d.ts.map +1 -1
  22. package/dist/types/components/dialog/index.d.ts +1 -1
  23. package/dist/types/components/field/field-counter.d.ts +1 -1
  24. package/dist/types/components/field/field-observer.d.ts.map +1 -1
  25. package/dist/types/components/field/index.d.ts +1 -1
  26. package/dist/types/components/popover/index.d.ts +1 -1
  27. package/dist/types/components/popover/popover.d.ts +1 -1
  28. package/dist/types/components/popover/popover.d.ts.map +1 -1
  29. package/dist/types/components/search/index.d.ts +1 -1
  30. package/dist/types/components/search/search-button.d.ts +1 -1
  31. package/dist/types/components/tag/tag.d.ts +1 -1
  32. package/dist/types/components/tag/tag.d.ts.map +1 -1
  33. package/dist/types/components/validation-message/validation-message.d.ts +1 -1
  34. package/dist/types/components/validation-message/validation-message.d.ts.map +1 -1
  35. package/dist/types/index.d.ts +4 -1
  36. package/dist/types/index.d.ts.map +1 -1
  37. package/dist/types/types.d.ts +1 -1
  38. package/dist/types/types.d.ts.map +1 -1
  39. package/dist/types/utilities/roving-focus/use-roving-focus.d.ts +2 -2
  40. package/package.json +3 -2
@@ -73,8 +73,9 @@ const Dialog = react.forwardRef(function Dialog({ asChild, children, className,
73
73
  /* handle closing */
74
74
  react.useEffect(() => {
75
75
  const handleClose = (event) => onClose?.(event);
76
- dialogRef.current?.addEventListener('close', handleClose);
77
- return () => dialogRef.current?.removeEventListener('close', handleClose);
76
+ const currentRef = dialogRef.current;
77
+ currentRef?.addEventListener('close', handleClose);
78
+ return () => currentRef?.removeEventListener('close', handleClose);
78
79
  }, [onClose]);
79
80
  return (jsxRuntime.jsxs(Component, { className: cl('ds-dialog', className), ref: mergedRefs, "data-modal": modal, ...rest, children: [closeButton !== false && (jsxRuntime.jsx("form", { method: 'dialog', children: jsxRuntime.jsx(button.Button, { "aria-label": closeButton, autoFocus: true, "data-color": 'neutral', icon: true, name: 'close', type: 'submit', variant: 'tertiary' }) })), children] }));
80
81
  });
@@ -44,7 +44,7 @@ function fieldObserver(fieldElement) {
44
44
  }
45
45
  }
46
46
  // Connect elements
47
- const describedbyIds = [describedby]; // Keep original aria-describedby
47
+ const describedbyIds = describedby ? describedby.split(' ') : []; // Keep original aria-describedby
48
48
  const inputId = input?.id || uuid;
49
49
  // Reset type counters since we reprocess all elements
50
50
  typeCounter.clear();
@@ -62,10 +62,12 @@ function fieldObserver(fieldElement) {
62
62
  }
63
63
  if (!value)
64
64
  setAttr(el, isLabel(el) ? 'for' : 'id', id); // Ensure we have a value
65
- if (descriptionType === 'validation')
66
- describedbyIds.unshift(el.id); // Validations to the front
67
- else if (descriptionType)
68
- describedbyIds.push(el.id); // Other descriptions to the back
65
+ if (!describedbyIds.includes(el.id)) {
66
+ if (descriptionType === 'validation')
67
+ describedbyIds.unshift(el.id); // Validations to the front
68
+ else if (descriptionType)
69
+ describedbyIds.push(el.id); // Other descriptions to the back
70
+ }
69
71
  }
70
72
  setAttr(input, 'id', inputId);
71
73
  setAttr(input, 'aria-describedby', describedbyIds.join(' ').trim());
@@ -71,8 +71,9 @@ const Dialog = forwardRef(function Dialog({ asChild, children, className, closeB
71
71
  /* handle closing */
72
72
  useEffect(() => {
73
73
  const handleClose = (event) => onClose?.(event);
74
- dialogRef.current?.addEventListener('close', handleClose);
75
- return () => dialogRef.current?.removeEventListener('close', handleClose);
74
+ const currentRef = dialogRef.current;
75
+ currentRef?.addEventListener('close', handleClose);
76
+ return () => currentRef?.removeEventListener('close', handleClose);
76
77
  }, [onClose]);
77
78
  return (jsxs(Component, { className: cl('ds-dialog', className), ref: mergedRefs, "data-modal": modal, ...rest, children: [closeButton !== false && (jsx("form", { method: 'dialog', children: jsx(Button, { "aria-label": closeButton, autoFocus: true, "data-color": 'neutral', icon: true, name: 'close', type: 'submit', variant: 'tertiary' }) })), children] }));
78
79
  });
@@ -42,7 +42,7 @@ function fieldObserver(fieldElement) {
42
42
  }
43
43
  }
44
44
  // Connect elements
45
- const describedbyIds = [describedby]; // Keep original aria-describedby
45
+ const describedbyIds = describedby ? describedby.split(' ') : []; // Keep original aria-describedby
46
46
  const inputId = input?.id || uuid;
47
47
  // Reset type counters since we reprocess all elements
48
48
  typeCounter.clear();
@@ -60,10 +60,12 @@ function fieldObserver(fieldElement) {
60
60
  }
61
61
  if (!value)
62
62
  setAttr(el, isLabel(el) ? 'for' : 'id', id); // Ensure we have a value
63
- if (descriptionType === 'validation')
64
- describedbyIds.unshift(el.id); // Validations to the front
65
- else if (descriptionType)
66
- describedbyIds.push(el.id); // Other descriptions to the back
63
+ if (!describedbyIds.includes(el.id)) {
64
+ if (descriptionType === 'validation')
65
+ describedbyIds.unshift(el.id); // Validations to the front
66
+ else if (descriptionType)
67
+ describedbyIds.push(el.id); // Other descriptions to the back
68
+ }
67
69
  }
68
70
  setAttr(input, 'id', inputId);
69
71
  setAttr(input, 'aria-describedby', describedbyIds.join(' ').trim());
@@ -1,5 +1,4 @@
1
- import type { Size } from '@digdir/designsystemet-react';
2
- import type { Color } from '@digdir/designsystemet-react/colors';
1
+ import type { Color, Size } from '@digdir/designsystemet/types';
3
2
 
4
3
  declare global {
5
4
  namespace React {
@@ -1,24 +1,2 @@
1
- declare const emptyObjectSymbol: unique symbol;
2
- type EmptyObject = {
3
- [emptyObjectSymbol]?: never;
4
- };
5
- /**
6
- * Base interface for available colors in Designsystemet.
7
- * The CLI will generate augmentations of this interface to allow
8
- * type safety of custom color names.
9
- */
10
- export interface MainAndSupportColors {
11
- }
12
- /**
13
- * If {@link MainAndSupportColors} has been extended to include color names, return T,
14
- * otherwise return the arbitrary string type.
15
- */
16
- type ColorWithFallback<T> = MainAndSupportColors extends EmptyObject ? string : T;
17
- export type SeverityInfo = 'info';
18
- export type SeveritySuccess = 'success';
19
- export type SeverityWarning = 'warning';
20
- export type SeverityDanger = 'danger';
21
- export type SeverityColors = SeverityInfo | SeveritySuccess | SeverityWarning | SeverityDanger;
22
- export type Color = ColorWithFallback<'neutral' | keyof MainAndSupportColors>;
23
- export {};
1
+ export type { Color, SeverityColors, } from '@digdir/designsystemet/types';
24
2
  //# sourceMappingURL=colors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../src/colors.ts"],"names":[],"mappings":"AACA,OAAO,CAAC,MAAM,iBAAiB,EAAE,OAAO,MAAM,CAAC;AAC/C,KAAK,WAAW,GAAG;IAAE,CAAC,iBAAiB,CAAC,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAEnD;;;;GAIG;AAGH,MAAM,WAAW,oBAAoB;CAAG;AAExC;;;GAGG;AACH,KAAK,iBAAiB,CAAC,CAAC,IAAI,oBAAoB,SAAS,WAAW,GAChE,MAAM,GACN,CAAC,CAAC;AAEN,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAClC,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC;AACxC,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC;AACxC,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;AACtC,MAAM,MAAM,cAAc,GACtB,YAAY,GACZ,eAAe,GACf,eAAe,GACf,cAAc,CAAC;AAEnB,MAAM,MAAM,KAAK,GAAG,iBAAiB,CAAC,SAAS,GAAG,MAAM,oBAAoB,CAAC,CAAC"}
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../src/colors.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,KAAK,EACL,cAAc,GACf,MAAM,8BAA8B,CAAC"}
@@ -206,7 +206,7 @@ export declare const ComboboxComponent: React.ForwardRefExoticComponent<{
206
206
  description?: ReactNode;
207
207
  id?: string;
208
208
  readOnly?: boolean;
209
- size?: import("../..").Size;
209
+ size?: import("packages/cli/dist/src/types").Size;
210
210
  } & Pick<React.HTMLAttributes<HTMLElement>, "aria-describedby"> & Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & React.RefAttributes<HTMLInputElement>>;
211
211
  export declare const Combobox: React.ForwardRefExoticComponent<{
212
212
  /**
@@ -312,6 +312,6 @@ export declare const Combobox: React.ForwardRefExoticComponent<{
312
312
  description?: ReactNode;
313
313
  id?: string;
314
314
  readOnly?: boolean;
315
- size?: import("../..").Size;
315
+ size?: import("packages/cli/dist/src/types").Size;
316
316
  } & Pick<React.HTMLAttributes<HTMLElement>, "aria-describedby"> & Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & React.RefAttributes<HTMLInputElement>>;
317
317
  //# sourceMappingURL=Combobox.d.ts.map
@@ -1,5 +1,5 @@
1
+ import type { Size } from '@digdir/designsystemet/types';
1
2
  import type { HTMLAttributes, InputHTMLAttributes, ReactNode } from 'react';
2
- import type { Size } from '../../../types';
3
3
  export type FormFieldProps = {
4
4
  /** Error message for form field */
5
5
  error?: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"useFormField.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/useFormField/useFormField.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG5E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAG3C,MAAM,MAAM,cAAc,GAAG;IAC3B,mCAAmC;IACnC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4BAA4B;IAC5B,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,2BAA2B;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,wBAAwB;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;CACb,GAAG,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,kBAAkB,CAAC,CAAC;AAE1D,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE;QACV,EAAE,EAAE,MAAM,CAAC;KACZ,GAAG,IAAI,CACN,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,UAAU,GAAG,cAAc,GAAG,kBAAkB,CACjD,CAAC;CACH,GAAG,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC;AAE9C;;GAEG;AACH,eAAO,MAAM,YAAY,GACvB,OAAO,cAAc,EACrB,QAAQ,MAAM,KACb,SAkCF,CAAC"}
1
+ {"version":3,"file":"useFormField.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/useFormField/useFormField.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI5E,MAAM,MAAM,cAAc,GAAG;IAC3B,mCAAmC;IACnC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4BAA4B;IAC5B,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,2BAA2B;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,wBAAwB;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;CACb,GAAG,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,kBAAkB,CAAC,CAAC;AAE1D,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE;QACV,EAAE,EAAE,MAAM,CAAC;KACZ,GAAG,IAAI,CACN,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,UAAU,GAAG,cAAc,GAAG,kBAAkB,CACjD,CAAC;CACH,GAAG,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC;AAE9C;;GAEG;AACH,eAAO,MAAM,YAAY,GACvB,OAAO,cAAc,EACrB,QAAQ,MAAM,KACb,SAkCF,CAAC"}
@@ -1,5 +1,5 @@
1
+ import type { SeverityColors } from '@digdir/designsystemet/types';
1
2
  import type { HTMLAttributes } from 'react';
2
- import type { SeverityColors } from '../../colors';
3
3
  import type { DefaultProps } from '../../types';
4
4
  import type { MergeRight } from '../../utilities';
5
5
  export type AlertProps = MergeRight<DefaultProps & HTMLAttributes<HTMLDivElement>, {
@@ -1 +1 @@
1
- {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/components/alert/alert.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,UAAU,GAAG,UAAU,CACjC,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,EAC7C;IACE;;;;OAIG;IACH,YAAY,CAAC,EAAE,cAAc,CAAC;CAC/B,CACF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,KAAK;IAfd;;;;OAIG;mBACY,cAAc;wCAsB/B,CAAC"}
1
+ {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/components/alert/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE,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,UAAU,GAAG,UAAU,CACjC,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,EAC7C;IACE;;;;OAIG;IACH,YAAY,CAAC,EAAE,cAAc,CAAC;CAC/B,CACF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,KAAK;IAfd;;;;OAIG;mBACY,cAAc;wCAsB/B,CAAC"}
@@ -1,5 +1,6 @@
1
+ import type { Size } from '@digdir/designsystemet/types';
1
2
  import type { HTMLAttributes, ReactNode } from 'react';
2
- import type { DefaultProps, Size } from '../../types';
3
+ import type { DefaultProps } from '../../types';
3
4
  import type { MergeRight } from '../../utilities';
4
5
  export type AvatarProps = MergeRight<DefaultProps & HTMLAttributes<HTMLSpanElement>, {
5
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,WAAW,GAAG,UAAU,CAClC,YAAY,GAAG,cAAc,CAAC,eAAe,CAAC,EAC9C;IACE;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CACF,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM;IA3Cf;;OAEG;kBACW,MAAM;IACpB;;OAEG;kBACW,IAAI,GAAG,IAAI;IACzB;;;;OAIG;cACO,QAAQ,GAAG,QAAQ;IAC7B;;OAEG;eACQ,MAAM;IACjB;;;;OAIG;eACQ,SAAS;yCAkDtB,CAAC"}
1
+ {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAGzD,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,WAAW,GAAG,UAAU,CAClC,YAAY,GAAG,cAAc,CAAC,eAAe,CAAC,EAC9C;IACE;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CACF,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM;IA3Cf;;OAEG;kBACW,MAAM;IACpB;;OAEG;kBACW,IAAI,GAAG,IAAI;IACzB;;;;OAIG;cACO,QAAQ,GAAG,QAAQ;IAC7B;;OAEG;eACQ,MAAM;IACjB;;;;OAIG;eACQ,SAAS;yCAkDtB,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { Color, SeverityColors } from '@digdir/designsystemet-react/colors';
1
+ import type { Color, SeverityColors } from '@digdir/designsystemet/types';
2
2
  import { type HTMLAttributes } from 'react';
3
3
  import type { DefaultProps } from '../../types';
4
4
  import type { MergeRight } from '../../utilities';
@@ -1 +1 @@
1
- {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,cAAc,EACf,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,UAAU,GAAG,U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eAAO,MAAM,KAAK;IAjCd;;OAEG;YACK,MAAM;IACd;;OAEG;eACQ,MAAM;IACjB;;;;OAIG;cACO,MAAM,GAAG,QAAQ;IAC3B;;OAEG;mBACY,KAAK,GAAG,cAAc;eAC1B,KAAK;yCA8BlB,CAAC"}
@@ -9,7 +9,7 @@ declare const Badge: React.ForwardRefExoticComponent<Omit<import("../../types").
9
9
  count?: number;
10
10
  maxCount?: number;
11
11
  variant?: "base" | "tinted";
12
- 'data-color'?: import("../../colors").Color | import("../../colors").SeverityColors;
12
+ 'data-color'?: import("packages/cli/dist/src/types").Color | import("packages/cli/dist/src/types").SeverityColors;
13
13
  children?: never;
14
14
  } & React.RefAttributes<HTMLSpanElement>> & {
15
15
  Position: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & React.HTMLAttributes<HTMLSpanElement>, "placement" | "overlap"> & {
@@ -1,4 +1,4 @@
1
- import type { Color, SeverityDanger } from '@digdir/designsystemet-react/colors';
1
+ import type { Color, SeverityColors } from '@digdir/designsystemet/types';
2
2
  import type { ButtonHTMLAttributes, ReactNode } from 'react';
3
3
  import type { DefaultProps } from '../../types';
4
4
  import type { MergeRight } from '../../utilities';
@@ -11,7 +11,7 @@ export type ButtonProps = MergeRight<DefaultProps & ButtonHTMLAttributes<HTMLBut
11
11
  /**
12
12
  * Change the color scheme of the button
13
13
  */
14
- 'data-color'?: Color | SeverityDanger;
14
+ 'data-color'?: Color | Extract<SeverityColors, 'danger'>;
15
15
  /**
16
16
  * Toggle icon only styling, pass icon as children
17
17
  * @default false
@@ -50,7 +50,7 @@ export declare const Button: React.ForwardRefExoticComponent<Omit<DefaultProps &
50
50
  /**
51
51
  * Change the color scheme of the button
52
52
  */
53
- 'data-color'?: Color | SeverityDanger;
53
+ 'data-color'?: Color | Extract<SeverityColors, "danger">;
54
54
  /**
55
55
  * Toggle icon only styling, pass icon as children
56
56
  * @default false
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,cAAc,EACf,MAAM,qCAAqC,CAAC;AAG7C,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,MAAM,WAAW,GAAG,UAAU,CAClC,YAAY,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,EACtD;IACE;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;IAC/C;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,GAAG,cAAc,CAAC;IACtC;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;CACxD,CACF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,MAAM;IAxCf;;;OAGG;cACO,SAAS,GAAG,WAAW,GAAG,UAAU;IAC9C;;OAEG;mBACY,KAAK,GAAG,cAAc;IACrC;;;OAGG;WACI,OAAO;IACd;;;;;OAKG;cACO,OAAO,GAAG,SAAS;IAC7B;;;OAGG;cACO,OAAO;IACjB;;;OAGG;WACI,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC;2CAgDzD,CAAC"}
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAG1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,MAAM,WAAW,GAAG,UAAU,CAClC,YAAY,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,EACtD;IACE;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;IAC/C;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;IACzD;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;CACxD,CACF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,MAAM;IAxCf;;;OAGG;cACO,SAAS,GAAG,WAAW,GAAG,UAAU;IAC9C;;OAEG;mBACY,KAAK,GAAG,OAAO,CAAC,cAAc,EAAE,QAAQ,CAAC;IACxD;;;OAGG;WACI,OAAO;IACd;;;;;OAKG;cACO,OAAO,GAAG,SAAS;IAC7B;;;OAGG;cACO,OAAO;IACjB;;;OAGG;WACI,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC;2CAgDzD,CAAC"}
@@ -14,7 +14,7 @@ export type DialogTriggerProps = ComponentPropsWithRef<typeof Button>;
14
14
  */
15
15
  export declare const DialogTrigger: React.ForwardRefExoticComponent<Omit<Omit<import("../../types").DefaultProps & React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "data-color" | "variant" | "icon" | "loading" | "asChild"> & {
16
16
  variant?: "primary" | "secondary" | "tertiary";
17
- 'data-color'?: import("../../colors").Color | import("../../colors").SeverityDanger;
17
+ 'data-color'?: import("packages/cli/dist/src/types").Color | Extract<import("packages/cli/dist/src/types").SeverityColors, "danger">;
18
18
  icon?: boolean;
19
19
  loading?: boolean | React.ReactNode;
20
20
  asChild?: boolean;
@@ -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;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CACF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,MAAM;IA1Df;;;OAGG;kBACW,MAAM,GAAG,KAAK;IAC5B;;;;OAIG;eACQ,MAAM,GAAG,cAAc,GAAG,KAAK;IAC1C;;;;;;OAMG;YACK,OAAO;IACf;;OAEG;WACI,OAAO;IACd;;OAEG;cACO,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI;IAChC;;;OAGG;cACO,OAAO;2CAoHpB,CAAC"}
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;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CACF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,MAAM;IA1Df;;;OAGG;kBACW,MAAM,GAAG,KAAK;IAC5B;;;;OAIG;eACQ,MAAM,GAAG,cAAc,GAAG,KAAK;IAC1C;;;;;;OAMG;YACK,OAAO;IACf;;OAEG;WACI,OAAO;IACd;;OAEG;cACO,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI;IAChC;;;OAGG;cACO,OAAO;2CAqHpB,CAAC"}
@@ -31,7 +31,7 @@ declare const Dialog: React.ForwardRefExoticComponent<Omit<import("../../types")
31
31
  };
32
32
  Trigger: React.ForwardRefExoticComponent<Omit<Omit<import("../../types").DefaultProps & React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "data-color" | "variant" | "icon" | "loading" | "asChild"> & {
33
33
  variant?: "primary" | "secondary" | "tertiary";
34
- 'data-color'?: import("../../colors").Color | import("../../colors").SeverityDanger;
34
+ 'data-color'?: import("packages/cli/dist/src/types").Color | Extract<import("packages/cli/dist/src/types").SeverityColors, "danger">;
35
35
  icon?: boolean;
36
36
  loading?: boolean | React.ReactNode;
37
37
  asChild?: boolean;
@@ -52,7 +52,7 @@ export declare const FieldCounter: React.ForwardRefExoticComponent<{
52
52
  **/
53
53
  limit: number;
54
54
  } & Omit<Omit<import("../../types").DefaultProps, "data-color"> & React.HTMLAttributes<HTMLParagraphElement>, "data-color" | "asChild"> & {
55
- 'data-color'?: import("../../colors").SeverityColors;
55
+ 'data-color'?: import("packages/cli/dist/src/types").SeverityColors;
56
56
  asChild?: boolean;
57
57
  } & React.RefAttributes<HTMLParagraphElement>>;
58
58
  //# sourceMappingURL=field-counter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"field-observer.d.ts","sourceRoot":"","sources":["../../../src/components/field/field-observer.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,YAAY,EAAE,WAAW,GAAG,IAAI,4BAoF7D;AAGD,eAAO,MAAM,SAAS,GAAI,MAAM,IAAI,oBAA4B,CAAC;AACjE,eAAO,MAAM,OAAO,GAAI,MAAM,IAAI,6BAAqC,CAAC;AACxE,eAAO,MAAM,WAAW,GAAI,MAAM,OAAO,KAAG,IAAI,IAAI,gBAGd,CAAC"}
1
+ {"version":3,"file":"field-observer.d.ts","sourceRoot":"","sources":["../../../src/components/field/field-observer.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,YAAY,EAAE,WAAW,GAAG,IAAI,4BAsF7D;AAGD,eAAO,MAAM,SAAS,GAAI,MAAM,IAAI,oBAA4B,CAAC;AACjE,eAAO,MAAM,OAAO,GAAI,MAAM,IAAI,6BAAqC,CAAC;AACxE,eAAO,MAAM,WAAW,GAAI,MAAM,OAAO,KAAG,IAAI,IAAI,gBAGd,CAAC"}
@@ -24,7 +24,7 @@ declare const Field: React.ForwardRefExoticComponent<{
24
24
  under?: string;
25
25
  limit: number;
26
26
  } & Omit<Omit<import("../../types").DefaultProps, "data-color"> & React.HTMLAttributes<HTMLParagraphElement>, "data-color" | "asChild"> & {
27
- 'data-color'?: import("../../colors").SeverityColors;
27
+ 'data-color'?: import("packages/cli/dist/src/types").SeverityColors;
28
28
  asChild?: boolean;
29
29
  } & React.RefAttributes<HTMLParagraphElement>>;
30
30
  };
@@ -16,7 +16,7 @@ declare const Popover: React.ForwardRefExoticComponent<Omit<import("../../types"
16
16
  placement?: import("@floating-ui/dom").Placement;
17
17
  open?: boolean;
18
18
  variant?: "default" | "tinted";
19
- 'data-color'?: import("../../colors").Color | import("../../colors").SeverityColors;
19
+ 'data-color'?: import("packages/cli/dist/src/types").Color | import("packages/cli/dist/src/types").SeverityColors;
20
20
  onOpen?: () => void;
21
21
  onClose?: () => void;
22
22
  autoPlacement?: boolean;
@@ -1,4 +1,4 @@
1
- import type { Color, SeverityColors } from '@digdir/designsystemet-react/colors';
1
+ import type { Color, SeverityColors } from '@digdir/designsystemet/types';
2
2
  import type { Placement } from '@floating-ui/dom';
3
3
  import type { HTMLAttributes } from 'react';
4
4
  import type { DefaultProps } from '../../types';
@@ -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;AAC7C,OAAO,KAAK,EAAmB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAUnE,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;QAEd,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"}
1
+ {"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/components/popover/popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,KAAK,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IACrC;;OAEG;aACM,MAAM,IAAI;IACnB;;OAEG;cACO,MAAM,IAAI;IACpB;;;OAGG;oBACa,OAAO;IACvB;;;OAGG;cACO,OAAO;wCAgIpB,CAAC"}
@@ -23,7 +23,7 @@ declare const Search: React.ForwardRefExoticComponent<import("../../types").Defa
23
23
  } & React.RefAttributes<HTMLButtonElement>>;
24
24
  Button: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "data-color" | "variant" | "icon" | "loading" | "asChild"> & {
25
25
  variant?: "primary" | "secondary" | "tertiary";
26
- 'data-color'?: import("../../colors").Color | import("../../colors").SeverityDanger;
26
+ 'data-color'?: import("packages/cli/dist/src/types").Color | Extract<import("packages/cli/dist/src/types").SeverityColors, "danger">;
27
27
  icon?: boolean;
28
28
  loading?: boolean | React.ReactNode;
29
29
  asChild?: boolean;
@@ -24,7 +24,7 @@ export type SearchButtonProps = MergeRight<ButtonProps, {
24
24
  */
25
25
  export declare const SearchButton: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "data-color" | "variant" | "icon" | "loading" | "asChild"> & {
26
26
  variant?: "primary" | "secondary" | "tertiary";
27
- 'data-color'?: import("../../colors").Color | import("../../colors").SeverityDanger;
27
+ 'data-color'?: import("packages/cli/dist/src/types").Color | Extract<import("packages/cli/dist/src/types").SeverityColors, "danger">;
28
28
  icon?: boolean;
29
29
  loading?: boolean | ReactNode;
30
30
  asChild?: boolean;
@@ -1,4 +1,4 @@
1
- import type { Color, SeverityColors } from '@digdir/designsystemet-react/colors';
1
+ import type { Color, SeverityColors } from '@digdir/designsystemet/types';
2
2
  import type { HTMLAttributes } from 'react';
3
3
  import type { DefaultProps } from '../../types';
4
4
  import type { MergeRight } from '../../utilities';
@@ -1 +1 @@
1
- {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../../src/components/tag/tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,cAAc,EACf,MAAM,qCAAqC,CAAC;AAE7C,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;yCAevC,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;CACvC,CACF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,GAAG;IAbZ;;OAEG;mBACY,KAAK,GAAG,cAAc;yCAevC,CAAC"}
@@ -1,5 +1,5 @@
1
+ import type { SeverityColors } from '@digdir/designsystemet/types';
1
2
  import type { HTMLAttributes } from 'react';
2
- import type { SeverityColors } from '../../colors';
3
3
  import type { DefaultProps } from '../../types';
4
4
  import type { MergeRight } from '../../utilities';
5
5
  export type ValidationMessageProps = MergeRight<Omit<DefaultProps, 'data-color'> & HTMLAttributes<HTMLParagraphElement>, {
@@ -1 +1 @@
1
- {"version":3,"file":"validation-message.d.ts","sourceRoot":"","sources":["../../../src/components/validation-message/validation-message.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAC7C,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,GAAG,cAAc,CAAC,oBAAoB,CAAC,EACvE;IACE;;;OAGG;IACH,YAAY,CAAC,EAAE,cAAc,CAAC;IAC9B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CACF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;IAnB1B;;;OAGG;mBACY,cAAc;IAC7B;;;OAGG;cACO,OAAO;8CAwBnB,CAAC"}
1
+ {"version":3,"file":"validation-message.d.ts","sourceRoot":"","sources":["../../../src/components/validation-message/validation-message.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAGnE,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,sBAAsB,GAAG,UAAU,CAC7C,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,GAAG,cAAc,CAAC,oBAAoB,CAAC,EACvE;IACE;;;OAGG;IACH,YAAY,CAAC,EAAE,cAAc,CAAC;IAC9B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CACF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;IAnB1B;;;OAGG;mBACY,cAAc;IAC7B;;;OAGG;cACO,OAAO;8CAwBnB,CAAC"}
@@ -1,4 +1,7 @@
1
+ export type {
2
+ /** @deprecated This export is deprecated. Use Size from '@digdir/designsystemet/types' */
3
+ Size, } from '@digdir/designsystemet/types';
1
4
  export * from './components';
2
- export type { LabelRequired, Size } from './types';
5
+ export type { LabelRequired } from './types';
3
6
  export * from './utilities';
4
7
  //# 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,YAAY,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AACnD,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY;AACV,0FAA0F;AAC1F,IAAI,GACL,MAAM,8BAA8B,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,cAAc,aAAa,CAAC"}
@@ -1,6 +1,6 @@
1
+ import type { Size } from '@digdir/designsystemet/types';
1
2
  import type { ReactNode } from 'react';
2
3
  import type { Color } from './colors';
3
- export type Size = 'sm' | 'md' | 'lg';
4
4
  export type DefaultProps = {
5
5
  /**
6
6
  * Changes size for descendant Designsystemet components. Select from predefined sizes.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IA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AC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC"}
@@ -65,8 +65,8 @@ export declare const useRovingFocus: (value: string) => {
65
65
  exportparts?: string | undefined;
66
66
  part?: string | undefined;
67
67
  popovertarget?: string;
68
- 'data-size'?: import("../..").Size | (string & {});
69
- 'data-color'?: import("../../colors").Color | (string & {});
68
+ 'data-size'?: import("packages/cli/dist/src/types").Size | (string & {});
69
+ 'data-color'?: import("packages/cli/dist/src/types").Color | (string & {});
70
70
  "aria-activedescendant"?: string | undefined;
71
71
  "aria-atomic"?: (boolean | "true" | "false") | undefined;
72
72
  "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@digdir/designsystemet-react",
3
3
  "type": "module",
4
- "version": "0.0.0-test-20250716071620",
4
+ "version": "0.0.0-test-20250717082628",
5
5
  "description": "React components for Designsystemet",
6
6
  "author": "Designsystemet team",
7
7
  "repository": {
@@ -67,7 +67,8 @@
67
67
  "storybook": "^9.0.15",
68
68
  "tsx": "4.20.3",
69
69
  "typescript": "^5.8.3",
70
- "@digdir/designsystemet-css": "^0.0.0-test-20250716071620"
70
+ "@digdir/designsystemet": "^0.0.0-test-20250717082628",
71
+ "@digdir/designsystemet-css": "^0.0.0-test-20250717082628"
71
72
  },
72
73
  "scripts": {
73
74
  "build": "pnpm run clean && tsc -b tsconfig.lib.json --emitDeclarationOnly false && rollup -c --bundleConfigAsCjs",