@digdir/designsystemet-react 0.0.0-test-20250715124908 → 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.
- package/dist/cjs/components/dialog/dialog.js +3 -2
- package/dist/cjs/components/field/field-observer.js +7 -5
- package/dist/esm/components/dialog/dialog.js +3 -2
- package/dist/esm/components/field/field-observer.js +7 -5
- package/dist/react-types.d.ts +1 -2
- package/dist/types/colors.d.ts +1 -23
- package/dist/types/colors.d.ts.map +1 -1
- package/dist/types/components/Combobox/Combobox.d.ts +2 -2
- package/dist/types/components/Combobox/useFormField/useFormField.d.ts +1 -1
- package/dist/types/components/Combobox/useFormField/useFormField.d.ts.map +1 -1
- package/dist/types/components/alert/alert.d.ts +1 -1
- package/dist/types/components/alert/alert.d.ts.map +1 -1
- package/dist/types/components/avatar/avatar.d.ts +2 -1
- package/dist/types/components/avatar/avatar.d.ts.map +1 -1
- package/dist/types/components/badge/badge.d.ts +1 -1
- package/dist/types/components/badge/badge.d.ts.map +1 -1
- package/dist/types/components/badge/index.d.ts +1 -1
- package/dist/types/components/button/button.d.ts +3 -3
- package/dist/types/components/button/button.d.ts.map +1 -1
- package/dist/types/components/dialog/dialog-trigger.d.ts +1 -1
- package/dist/types/components/dialog/dialog.d.ts.map +1 -1
- package/dist/types/components/dialog/index.d.ts +1 -1
- package/dist/types/components/field/field-counter.d.ts +1 -1
- package/dist/types/components/field/field-observer.d.ts.map +1 -1
- package/dist/types/components/field/index.d.ts +1 -1
- package/dist/types/components/popover/index.d.ts +1 -1
- package/dist/types/components/popover/popover.d.ts +1 -1
- package/dist/types/components/popover/popover.d.ts.map +1 -1
- package/dist/types/components/search/index.d.ts +1 -1
- package/dist/types/components/search/search-button.d.ts +1 -1
- package/dist/types/components/suggestion/index.d.ts +2 -2
- package/dist/types/components/suggestion/index.d.ts.map +1 -1
- package/dist/types/components/suggestion/suggestion.d.ts +14 -18
- package/dist/types/components/suggestion/suggestion.d.ts.map +1 -1
- package/dist/types/components/tag/tag.d.ts +1 -1
- package/dist/types/components/tag/tag.d.ts.map +1 -1
- package/dist/types/components/validation-message/validation-message.d.ts +1 -1
- package/dist/types/components/validation-message/validation-message.d.ts.map +1 -1
- package/dist/types/index.d.ts +4 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types.d.ts +1 -1
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utilities/roving-focus/use-roving-focus.d.ts +2 -2
- 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
|
|
77
|
-
|
|
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 = [
|
|
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 (
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
|
75
|
-
|
|
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 = [
|
|
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 (
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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());
|
package/dist/react-types.d.ts
CHANGED
package/dist/types/colors.d.ts
CHANGED
|
@@ -1,24 +1,2 @@
|
|
|
1
|
-
|
|
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":"
|
|
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("
|
|
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("
|
|
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":"
|
|
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":"
|
|
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
|
|
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":"
|
|
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
|
|
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,
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE1E,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,UAAU,CACjC,YAAY,GAAG,cAAc,CAAC,eAAe,CAAC,EAC9C;IACE;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,GAAG,cAAc,CAAC;IACtC,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB,CACF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,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("
|
|
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,
|
|
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 |
|
|
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 |
|
|
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,
|
|
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("
|
|
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;
|
|
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("
|
|
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("
|
|
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,
|
|
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("
|
|
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("
|
|
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
|
|
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,
|
|
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,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"}
|
|
@@ -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("
|
|
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("
|
|
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;
|
|
@@ -5,7 +5,7 @@ import { SuggestionEmpty } from './suggestion-empty';
|
|
|
5
5
|
import { SuggestionInput } from './suggestion-input';
|
|
6
6
|
import { SuggestionList } from './suggestion-list';
|
|
7
7
|
import { SuggestionOption } from './suggestion-option';
|
|
8
|
-
type
|
|
8
|
+
type Suggestion = typeof SuggestionRoot & {
|
|
9
9
|
/**
|
|
10
10
|
* @deprecated Suggestion.Chips is deprecated, use `renderSelected` on `Suggestion` instead
|
|
11
11
|
*/
|
|
@@ -86,7 +86,7 @@ type SuggestionCompound = typeof SuggestionRoot & {
|
|
|
86
86
|
* </Suggestion.List>
|
|
87
87
|
* </Suggestion>
|
|
88
88
|
*/
|
|
89
|
-
declare const EXPERIMENTAL_Suggestion:
|
|
89
|
+
declare const EXPERIMENTAL_Suggestion: Suggestion;
|
|
90
90
|
export { EXPERIMENTAL_Suggestion, SuggestionChips as EXPERIMENTAL_SuggestionChips, SuggestionList as EXPERIMENTAL_SuggestionList, SuggestionInput as EXPERIMENTAL_SuggestionInput, SuggestionEmpty as EXPERIMENTAL_SuggestionEmpty, SuggestionOption as EXPERIMENTAL_SuggestionOption, SuggestionClear as EXPERIMENTAL_SuggestionClear, };
|
|
91
91
|
export type { SuggestionProps, SuggestionSelected, // Export SuggestionValues for easier useState
|
|
92
92
|
SuggestionSelected as SuggestionValues, } from './suggestion';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/suggestion/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/suggestion/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,mB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Context: React.Context<SuggestionContextType>;
|
|
44
44
|
export type SuggestionProps = {
|
|
45
45
|
/**
|
|
46
|
-
* Filter options
|
|
46
|
+
* Filter options; boolean or a custom callback.
|
|
47
47
|
*
|
|
48
|
-
*
|
|
49
|
-
* If false, the <datalist> will not handle filtering.
|
|
50
|
-
* If a custom callback, the callback will be used to filter the <option> elements.
|
|
48
|
+
* See {@link Filter} for the callback signature.
|
|
51
49
|
*
|
|
52
50
|
* @default true
|
|
53
51
|
*/
|
|
@@ -69,13 +67,13 @@ export type SuggestionProps = {
|
|
|
69
67
|
*
|
|
70
68
|
* If `label` and `value` is the same, you can use `string[]`.
|
|
71
69
|
*
|
|
72
|
-
* If `label` and `value` is different, use `
|
|
70
|
+
* If `label` and `value` is different, you must use `{ value: string; label: string}[]`.
|
|
73
71
|
*
|
|
74
|
-
* Using this makes the component controlled and it must be used in combination with {@
|
|
72
|
+
* Using this makes the component controlled and it must be used in combination with {@linkcode SuggestionProps.onSelectedChange|onSelectedChange}.
|
|
75
73
|
*/
|
|
76
74
|
selected?: SuggestionSelected;
|
|
77
75
|
/**
|
|
78
|
-
* @deprecated Use
|
|
76
|
+
* @deprecated Use {@linkcode SuggestionProps.selected|selected} instead
|
|
79
77
|
*/
|
|
80
78
|
value?: SuggestionSelected;
|
|
81
79
|
/**
|
|
@@ -83,7 +81,7 @@ export type SuggestionProps = {
|
|
|
83
81
|
*/
|
|
84
82
|
defaultSelected?: SuggestionSelected;
|
|
85
83
|
/**
|
|
86
|
-
* @deprecated Use `defaultSelected
|
|
84
|
+
* @deprecated Use `{@linkcode SuggestionProps.defaultSelected|defaultSelected} instead
|
|
87
85
|
*/
|
|
88
86
|
defaultValue?: SuggestionSelected;
|
|
89
87
|
/**
|
|
@@ -91,7 +89,7 @@ export type SuggestionProps = {
|
|
|
91
89
|
*/
|
|
92
90
|
onSelectedChange?: (value: Item[]) => void;
|
|
93
91
|
/**
|
|
94
|
-
* @deprecated Use
|
|
92
|
+
* @deprecated Use {@linkcode SuggestionProps.onSelectedChange|onSelectedChange} instead
|
|
95
93
|
*/
|
|
96
94
|
onValueChange?: (value: Item[]) => void;
|
|
97
95
|
/**
|
|
@@ -116,11 +114,9 @@ export type SuggestionProps = {
|
|
|
116
114
|
} & HTMLAttributes<UHTMLComboboxElement>;
|
|
117
115
|
export declare const Suggestion: React.ForwardRefExoticComponent<{
|
|
118
116
|
/**
|
|
119
|
-
* Filter options
|
|
117
|
+
* Filter options; boolean or a custom callback.
|
|
120
118
|
*
|
|
121
|
-
*
|
|
122
|
-
* If false, the <datalist> will not handle filtering.
|
|
123
|
-
* If a custom callback, the callback will be used to filter the <option> elements.
|
|
119
|
+
* See {@link Filter} for the callback signature.
|
|
124
120
|
*
|
|
125
121
|
* @default true
|
|
126
122
|
*/
|
|
@@ -142,13 +138,13 @@ export declare const Suggestion: React.ForwardRefExoticComponent<{
|
|
|
142
138
|
*
|
|
143
139
|
* If `label` and `value` is the same, you can use `string[]`.
|
|
144
140
|
*
|
|
145
|
-
* If `label` and `value` is different, use `
|
|
141
|
+
* If `label` and `value` is different, you must use `{ value: string; label: string}[]`.
|
|
146
142
|
*
|
|
147
|
-
* Using this makes the component controlled and it must be used in combination with {@
|
|
143
|
+
* Using this makes the component controlled and it must be used in combination with {@linkcode SuggestionProps.onSelectedChange|onSelectedChange}.
|
|
148
144
|
*/
|
|
149
145
|
selected?: SuggestionSelected;
|
|
150
146
|
/**
|
|
151
|
-
* @deprecated Use
|
|
147
|
+
* @deprecated Use {@linkcode SuggestionProps.selected|selected} instead
|
|
152
148
|
*/
|
|
153
149
|
value?: SuggestionSelected;
|
|
154
150
|
/**
|
|
@@ -156,7 +152,7 @@ export declare const Suggestion: React.ForwardRefExoticComponent<{
|
|
|
156
152
|
*/
|
|
157
153
|
defaultSelected?: SuggestionSelected;
|
|
158
154
|
/**
|
|
159
|
-
* @deprecated Use `defaultSelected
|
|
155
|
+
* @deprecated Use `{@linkcode SuggestionProps.defaultSelected|defaultSelected} instead
|
|
160
156
|
*/
|
|
161
157
|
defaultValue?: SuggestionSelected;
|
|
162
158
|
/**
|
|
@@ -164,7 +160,7 @@ export declare const Suggestion: React.ForwardRefExoticComponent<{
|
|
|
164
160
|
*/
|
|
165
161
|
onSelectedChange?: (value: Item[]) => void;
|
|
166
162
|
/**
|
|
167
|
-
* @deprecated Use
|
|
163
|
+
* @deprecated Use {@linkcode SuggestionProps.onSelectedChange|onSelectedChange} instead
|
|
168
164
|
*/
|
|
169
165
|
onValueChange?: (value: Item[]) => void;
|
|
170
166
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestion.d.ts","sourceRoot":"","sources":["../../../src/components/suggestion/suggestion.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AACf,OAAO,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAKnE,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC;AAExE,KAAK,IAAI,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAC7C,KAAK,gBAAgB,GAAG,IAAI,CAC1B,WAAW,CAAC,iBAAiB,GAAG,SAAS,CAAC,EAC1C,eAAe,CAChB,GAAG;IACF,aAAa,EAAE,oBAAoB,CAAC;CACrC,CAAC;AAEF,KAAK,MAAM,GAAG,CAAC,IAAI,EAAE;IACnB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,aAAa,EAAE,iBAAiB,CAAC;IACjC;;OAEG;IACH,KAAK,EAA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AO,MAAM,UAAU;IAvGrB;;;;;;OAMG;aACM,OAAO,GAAG,MAAM;IACzB;;;;OAIG;gBACS,OAAO;IACnB;;;;OAIG;eACQ,OAAO;IAClB;;;;;;;;OAQG;eACQ,kBAAkB;IAC7B;;OAEG;YACK,kBAAkB;IAC1B;;OAEG;sBACe,kBAAkB;IACpC;;OAEG;mBACY,kBAAkB;IACjC;;OAEG;uBACgB,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI;IAC1C;;OAEG;oBACa,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI;IACvC;;OAEG;oBACa,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI;IACjD;;;;OAIG;WACI,MAAM;IACb;;;;OAIG;qBACc,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,SAAS;qFA2JvE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Color, SeverityColors } from '@digdir/designsystemet
|
|
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,
|
|
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":"
|
|
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"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -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
|
|
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,
|
|
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"}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,aAAa,GACrB;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,KAAK,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,GAClE;IAAE,YAAY,CAAC,EAAE,KAAK,CAAC;IAAC,iBAAiB,CAAC,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAAE,GACrE;IAAE,YAAY,CAAC,EAAE,KAAK,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAC;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("
|
|
69
|
-
'data-color'?: import("
|
|
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-
|
|
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
|
|
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",
|