@norges-domstoler/dds-components 21.13.0 → 21.14.0
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/index.css +5 -3
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +9 -11
- package/dist/index.d.ts +9 -11
- package/dist/index.js +260 -134
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +275 -149
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -526,7 +526,7 @@ declare function createSizes<T extends Array<Size>>(...sizes: T): T;
|
|
|
526
526
|
declare const BORDER_RADII: readonly ["button", "input", "surface", "chip", "rounded", "0"];
|
|
527
527
|
declare const ELEVATIONS: readonly [1, 2, 3, 4];
|
|
528
528
|
declare const BORDER_COLORS: readonly ["border-default", "border-subtle", "border-inverse", "border-action-default", "border-action-hover", "border-success", "border-warning", "border-danger", "border-info", "border-on-action"];
|
|
529
|
-
declare const BACKGROUNDS: readonly ["surface-subtle", "surface-medium", "surface-inverse-default", "surface-danger-default", "surface-danger-strong", "surface-success-default", "surface-success-strong", "surface-warning-default", "surface-warning-strong", "surface-info-default", "surface-info-strong", "surface-paper-default", "surface-notification", "brand-primary-default", "brand-primary-subtle", "brand-primary-medium", "brand-primary-strong", "brand-secondary-default", "brand-secondary-subtle", "brand-secondary-medium", "brand-secondary-strong", "brand-tertiary-default", "brand-tertiary-subtle", "brand-tertiary-medium", "brand-tertiary-strong"];
|
|
529
|
+
declare const BACKGROUNDS: readonly ["surface-subtle", "surface-medium", "surface-inverse-default", "surface-danger-default", "surface-danger-strong", "surface-success-default", "surface-success-strong", "surface-warning-default", "surface-warning-strong", "surface-info-default", "surface-info-strong", "surface-paper-default", "surface-notification", "surface-field-disabled", "brand-primary-default", "brand-primary-subtle", "brand-primary-medium", "brand-primary-strong", "brand-secondary-default", "brand-secondary-subtle", "brand-secondary-medium", "brand-secondary-strong", "brand-tertiary-default", "brand-tertiary-subtle", "brand-tertiary-medium", "brand-tertiary-strong"];
|
|
530
530
|
type BorderRadius = (typeof BORDER_RADII)[number];
|
|
531
531
|
type Elevation = (typeof ELEVATIONS)[number];
|
|
532
532
|
type BorderColor = (typeof BORDER_COLORS)[number];
|
|
@@ -3048,8 +3048,7 @@ type MimeType = `image/${ImageMimeType | AnyMimeType}` | `video/${VideoMimeType
|
|
|
3048
3048
|
type FileUploaderAccept = MimeType | FileExtensionAccept;
|
|
3049
3049
|
type FileList = Array<File>;
|
|
3050
3050
|
|
|
3051
|
-
|
|
3052
|
-
id: string | undefined;
|
|
3051
|
+
type FileUploaderHookProps = {
|
|
3053
3052
|
/**Dersom komponenten skal styres internt. Utgangspunktet for filene som har blitt lastet opp. */
|
|
3054
3053
|
initialFiles: FileList | undefined;
|
|
3055
3054
|
/**Dersom komponenten styres utenfra. Filene som har blitt lastet opp. */
|
|
@@ -3058,13 +3057,14 @@ interface FileUploaderHookProps {
|
|
|
3058
3057
|
onChange: (newFiles: FileList) => void;
|
|
3059
3058
|
/**Hvilke filendelser eller mime-typer som filopplasteren skal akseptere. */
|
|
3060
3059
|
accept: Array<FileUploaderAccept> | undefined;
|
|
3061
|
-
/**Om filopplasteren er avslått eller ikke */
|
|
3062
|
-
disabled
|
|
3060
|
+
/**Om filopplasteren er avslått eller ikke. */
|
|
3061
|
+
disabled?: boolean;
|
|
3062
|
+
/**Om filopplasteren er read-only. */
|
|
3063
|
+
readOnly?: boolean;
|
|
3063
3064
|
/**Maks antall filer som tillates. */
|
|
3064
3065
|
maxFiles: number | undefined;
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
}
|
|
3066
|
+
onKeyDown?: ComponentProps<'input'>['onKeyDown'];
|
|
3067
|
+
} & Pick<InputProps, 'errorMessage' | 'id'>;
|
|
3068
3068
|
|
|
3069
3069
|
type FileUploaderProps = {
|
|
3070
3070
|
/**Id til filopplasteren. */
|
|
@@ -3079,8 +3079,6 @@ type FileUploaderProps = {
|
|
|
3079
3079
|
* @default Velg fil
|
|
3080
3080
|
*/
|
|
3081
3081
|
btnLabel?: string;
|
|
3082
|
-
/**Hjelpetekst. */
|
|
3083
|
-
tip?: string;
|
|
3084
3082
|
/**Om det er påkrevd med minst én fil. */
|
|
3085
3083
|
required?: boolean;
|
|
3086
3084
|
/**Callback for når fil-listen endres. */
|
|
@@ -3091,7 +3089,7 @@ type FileUploaderProps = {
|
|
|
3091
3089
|
withDragAndDrop?: boolean;
|
|
3092
3090
|
/**Om listen med opplastede filer skal skjules. Brukes kun hvis listen blir vist på egen måte. */
|
|
3093
3091
|
hideFileList?: boolean;
|
|
3094
|
-
} & Pick<ResponsiveProps, 'width'> & Partial<FileUploaderHookProps> & Omit<ComponentPropsWithRef<'div'>, 'onChange' | 'id'>;
|
|
3092
|
+
} & Pick<ResponsiveProps, 'width'> & Partial<FileUploaderHookProps> & Omit<ComponentPropsWithRef<'div'>, 'onChange' | 'id'> & Pick<InputProps, 'tip'>;
|
|
3095
3093
|
declare const FileUploader: {
|
|
3096
3094
|
(props: FileUploaderProps): react_jsx_runtime.JSX.Element;
|
|
3097
3095
|
displayName: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -526,7 +526,7 @@ declare function createSizes<T extends Array<Size>>(...sizes: T): T;
|
|
|
526
526
|
declare const BORDER_RADII: readonly ["button", "input", "surface", "chip", "rounded", "0"];
|
|
527
527
|
declare const ELEVATIONS: readonly [1, 2, 3, 4];
|
|
528
528
|
declare const BORDER_COLORS: readonly ["border-default", "border-subtle", "border-inverse", "border-action-default", "border-action-hover", "border-success", "border-warning", "border-danger", "border-info", "border-on-action"];
|
|
529
|
-
declare const BACKGROUNDS: readonly ["surface-subtle", "surface-medium", "surface-inverse-default", "surface-danger-default", "surface-danger-strong", "surface-success-default", "surface-success-strong", "surface-warning-default", "surface-warning-strong", "surface-info-default", "surface-info-strong", "surface-paper-default", "surface-notification", "brand-primary-default", "brand-primary-subtle", "brand-primary-medium", "brand-primary-strong", "brand-secondary-default", "brand-secondary-subtle", "brand-secondary-medium", "brand-secondary-strong", "brand-tertiary-default", "brand-tertiary-subtle", "brand-tertiary-medium", "brand-tertiary-strong"];
|
|
529
|
+
declare const BACKGROUNDS: readonly ["surface-subtle", "surface-medium", "surface-inverse-default", "surface-danger-default", "surface-danger-strong", "surface-success-default", "surface-success-strong", "surface-warning-default", "surface-warning-strong", "surface-info-default", "surface-info-strong", "surface-paper-default", "surface-notification", "surface-field-disabled", "brand-primary-default", "brand-primary-subtle", "brand-primary-medium", "brand-primary-strong", "brand-secondary-default", "brand-secondary-subtle", "brand-secondary-medium", "brand-secondary-strong", "brand-tertiary-default", "brand-tertiary-subtle", "brand-tertiary-medium", "brand-tertiary-strong"];
|
|
530
530
|
type BorderRadius = (typeof BORDER_RADII)[number];
|
|
531
531
|
type Elevation = (typeof ELEVATIONS)[number];
|
|
532
532
|
type BorderColor = (typeof BORDER_COLORS)[number];
|
|
@@ -3048,8 +3048,7 @@ type MimeType = `image/${ImageMimeType | AnyMimeType}` | `video/${VideoMimeType
|
|
|
3048
3048
|
type FileUploaderAccept = MimeType | FileExtensionAccept;
|
|
3049
3049
|
type FileList = Array<File>;
|
|
3050
3050
|
|
|
3051
|
-
|
|
3052
|
-
id: string | undefined;
|
|
3051
|
+
type FileUploaderHookProps = {
|
|
3053
3052
|
/**Dersom komponenten skal styres internt. Utgangspunktet for filene som har blitt lastet opp. */
|
|
3054
3053
|
initialFiles: FileList | undefined;
|
|
3055
3054
|
/**Dersom komponenten styres utenfra. Filene som har blitt lastet opp. */
|
|
@@ -3058,13 +3057,14 @@ interface FileUploaderHookProps {
|
|
|
3058
3057
|
onChange: (newFiles: FileList) => void;
|
|
3059
3058
|
/**Hvilke filendelser eller mime-typer som filopplasteren skal akseptere. */
|
|
3060
3059
|
accept: Array<FileUploaderAccept> | undefined;
|
|
3061
|
-
/**Om filopplasteren er avslått eller ikke */
|
|
3062
|
-
disabled
|
|
3060
|
+
/**Om filopplasteren er avslått eller ikke. */
|
|
3061
|
+
disabled?: boolean;
|
|
3062
|
+
/**Om filopplasteren er read-only. */
|
|
3063
|
+
readOnly?: boolean;
|
|
3063
3064
|
/**Maks antall filer som tillates. */
|
|
3064
3065
|
maxFiles: number | undefined;
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
}
|
|
3066
|
+
onKeyDown?: ComponentProps<'input'>['onKeyDown'];
|
|
3067
|
+
} & Pick<InputProps, 'errorMessage' | 'id'>;
|
|
3068
3068
|
|
|
3069
3069
|
type FileUploaderProps = {
|
|
3070
3070
|
/**Id til filopplasteren. */
|
|
@@ -3079,8 +3079,6 @@ type FileUploaderProps = {
|
|
|
3079
3079
|
* @default Velg fil
|
|
3080
3080
|
*/
|
|
3081
3081
|
btnLabel?: string;
|
|
3082
|
-
/**Hjelpetekst. */
|
|
3083
|
-
tip?: string;
|
|
3084
3082
|
/**Om det er påkrevd med minst én fil. */
|
|
3085
3083
|
required?: boolean;
|
|
3086
3084
|
/**Callback for når fil-listen endres. */
|
|
@@ -3091,7 +3089,7 @@ type FileUploaderProps = {
|
|
|
3091
3089
|
withDragAndDrop?: boolean;
|
|
3092
3090
|
/**Om listen med opplastede filer skal skjules. Brukes kun hvis listen blir vist på egen måte. */
|
|
3093
3091
|
hideFileList?: boolean;
|
|
3094
|
-
} & Pick<ResponsiveProps, 'width'> & Partial<FileUploaderHookProps> & Omit<ComponentPropsWithRef<'div'>, 'onChange' | 'id'>;
|
|
3092
|
+
} & Pick<ResponsiveProps, 'width'> & Partial<FileUploaderHookProps> & Omit<ComponentPropsWithRef<'div'>, 'onChange' | 'id'> & Pick<InputProps, 'tip'>;
|
|
3095
3093
|
declare const FileUploader: {
|
|
3096
3094
|
(props: FileUploaderProps): react_jsx_runtime.JSX.Element;
|
|
3097
3095
|
displayName: string;
|