@norges-domstoler/dds-components 4.1.0 → 4.1.1

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.
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  export declare const Checkbox: import("react").ForwardRefExoticComponent<{
3
- htmlProps?: Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "aria-describedby" | "name" | "checked" | "onChange"> | undefined;
4
- } & Pick<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "aria-describedby" | "name" | "checked" | "onChange">, "id" | "className"> & {
3
+ htmlProps?: Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "aria-describedby" | "name" | "checked" | "defaultChecked" | "value" | "defaultValue" | "onChange" | "onBlur"> | undefined;
4
+ } & Pick<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "aria-describedby" | "name" | "checked" | "defaultChecked" | "value" | "defaultValue" | "onChange" | "onBlur">, "id" | "className"> & {
5
5
  label?: string | undefined;
6
6
  error?: boolean | undefined;
7
7
  disabled?: boolean | undefined;
@@ -11,5 +11,9 @@ export declare const Checkbox: import("react").ForwardRefExoticComponent<{
11
11
  'aria-describedby'?: string | undefined;
12
12
  name?: string | undefined;
13
13
  checked?: boolean | undefined;
14
+ defaultChecked?: boolean | undefined;
15
+ value?: string | number | readonly string[] | undefined;
16
+ defaultValue?: string | number | readonly string[] | undefined;
14
17
  onChange?: import("react").ChangeEventHandler<HTMLInputElement> | undefined;
18
+ onBlur?: import("react").FocusEventHandler<HTMLInputElement> | undefined;
15
19
  } & import("react").RefAttributes<HTMLInputElement>>;
@@ -3,17 +3,21 @@ import { CheckboxProps } from '.';
3
3
  declare const _default: {
4
4
  title: string;
5
5
  component: import("react").ForwardRefExoticComponent<{
6
- htmlProps?: Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "aria-describedby" | "onChange" | "name" | "checked"> | undefined;
7
- } & Pick<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "aria-describedby" | "onChange" | "name" | "checked">, "id" | "className"> & {
6
+ htmlProps?: Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "defaultChecked" | "defaultValue" | "aria-describedby" | "onBlur" | "onChange" | "name" | "value" | "checked"> | undefined;
7
+ } & Pick<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "defaultChecked" | "defaultValue" | "aria-describedby" | "onBlur" | "onChange" | "name" | "value" | "checked">, "id" | "className"> & {
8
8
  label?: string | undefined;
9
9
  error?: boolean | undefined;
10
10
  disabled?: boolean | undefined;
11
11
  readOnly?: boolean | undefined;
12
12
  indeterminate?: boolean | undefined;
13
13
  } & {
14
+ defaultChecked?: boolean | undefined;
15
+ defaultValue?: string | number | readonly string[] | undefined;
14
16
  'aria-describedby'?: string | undefined;
17
+ onBlur?: import("react").FocusEventHandler<HTMLInputElement> | undefined;
15
18
  onChange?: import("react").ChangeEventHandler<HTMLInputElement> | undefined;
16
19
  name?: string | undefined;
20
+ value?: string | number | readonly string[] | undefined;
17
21
  checked?: boolean | undefined;
18
22
  } & import("react").RefAttributes<HTMLInputElement>>;
19
23
  argTypes: {
@@ -1,6 +1,6 @@
1
1
  import { InputHTMLAttributes } from 'react';
2
2
  import { BaseComponentProps } from '../../types';
3
- declare type PickedHTMLAttributes = Pick<InputHTMLAttributes<HTMLInputElement>, 'aria-describedby' | 'name' | 'checked' | 'onChange'>;
3
+ declare type PickedHTMLAttributes = Pick<InputHTMLAttributes<HTMLInputElement>, 'aria-describedby' | 'name' | 'checked' | 'defaultChecked' | 'value' | 'defaultValue' | 'onChange' | 'onBlur'>;
4
4
  export declare type CheckboxProps = BaseComponentProps<HTMLInputElement, {
5
5
  /** Ledetekst for inputelementet. */
6
6
  label?: string;
@@ -2,10 +2,10 @@
2
2
  import { Strategy } from '@floating-ui/react-dom';
3
3
  export declare type Placement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
4
4
  export declare const useFloatPosition: (arrowRef: HTMLElement | null, placement?: Placement, offset?: number) => {
5
- reference: (node: (Element | import("@floating-ui/core").VirtualElement) | null) => void;
5
+ reference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
6
6
  floating: (node: HTMLElement | null) => void;
7
7
  refs: {
8
- reference: import("react").MutableRefObject<(Element | import("@floating-ui/core").VirtualElement) | null>;
8
+ reference: import("react").MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
9
9
  floating: import("react").MutableRefObject<HTMLElement | null>;
10
10
  };
11
11
  styles: {
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  export declare const Checkbox: import("react").ForwardRefExoticComponent<{
3
- htmlProps?: Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "aria-describedby" | "name" | "checked" | "onChange"> | undefined;
4
- } & Pick<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "aria-describedby" | "name" | "checked" | "onChange">, "id" | "className"> & {
3
+ htmlProps?: Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "aria-describedby" | "name" | "checked" | "defaultChecked" | "value" | "defaultValue" | "onChange" | "onBlur"> | undefined;
4
+ } & Pick<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "aria-describedby" | "name" | "checked" | "defaultChecked" | "value" | "defaultValue" | "onChange" | "onBlur">, "id" | "className"> & {
5
5
  label?: string | undefined;
6
6
  error?: boolean | undefined;
7
7
  disabled?: boolean | undefined;
@@ -11,5 +11,9 @@ export declare const Checkbox: import("react").ForwardRefExoticComponent<{
11
11
  'aria-describedby'?: string | undefined;
12
12
  name?: string | undefined;
13
13
  checked?: boolean | undefined;
14
+ defaultChecked?: boolean | undefined;
15
+ value?: string | number | readonly string[] | undefined;
16
+ defaultValue?: string | number | readonly string[] | undefined;
14
17
  onChange?: import("react").ChangeEventHandler<HTMLInputElement> | undefined;
18
+ onBlur?: import("react").FocusEventHandler<HTMLInputElement> | undefined;
15
19
  } & import("react").RefAttributes<HTMLInputElement>>;
@@ -3,17 +3,21 @@ import { CheckboxProps } from '.';
3
3
  declare const _default: {
4
4
  title: string;
5
5
  component: import("react").ForwardRefExoticComponent<{
6
- htmlProps?: Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "aria-describedby" | "onChange" | "name" | "checked"> | undefined;
7
- } & Pick<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "aria-describedby" | "onChange" | "name" | "checked">, "id" | "className"> & {
6
+ htmlProps?: Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "defaultChecked" | "defaultValue" | "aria-describedby" | "onBlur" | "onChange" | "name" | "value" | "checked"> | undefined;
7
+ } & Pick<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "defaultChecked" | "defaultValue" | "aria-describedby" | "onBlur" | "onChange" | "name" | "value" | "checked">, "id" | "className"> & {
8
8
  label?: string | undefined;
9
9
  error?: boolean | undefined;
10
10
  disabled?: boolean | undefined;
11
11
  readOnly?: boolean | undefined;
12
12
  indeterminate?: boolean | undefined;
13
13
  } & {
14
+ defaultChecked?: boolean | undefined;
15
+ defaultValue?: string | number | readonly string[] | undefined;
14
16
  'aria-describedby'?: string | undefined;
17
+ onBlur?: import("react").FocusEventHandler<HTMLInputElement> | undefined;
15
18
  onChange?: import("react").ChangeEventHandler<HTMLInputElement> | undefined;
16
19
  name?: string | undefined;
20
+ value?: string | number | readonly string[] | undefined;
17
21
  checked?: boolean | undefined;
18
22
  } & import("react").RefAttributes<HTMLInputElement>>;
19
23
  argTypes: {
@@ -1,6 +1,6 @@
1
1
  import { InputHTMLAttributes } from 'react';
2
2
  import { BaseComponentProps } from '../../types';
3
- declare type PickedHTMLAttributes = Pick<InputHTMLAttributes<HTMLInputElement>, 'aria-describedby' | 'name' | 'checked' | 'onChange'>;
3
+ declare type PickedHTMLAttributes = Pick<InputHTMLAttributes<HTMLInputElement>, 'aria-describedby' | 'name' | 'checked' | 'defaultChecked' | 'value' | 'defaultValue' | 'onChange' | 'onBlur'>;
4
4
  export declare type CheckboxProps = BaseComponentProps<HTMLInputElement, {
5
5
  /** Ledetekst for inputelementet. */
6
6
  label?: string;
@@ -2,10 +2,10 @@
2
2
  import { Strategy } from '@floating-ui/react-dom';
3
3
  export declare type Placement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
4
4
  export declare const useFloatPosition: (arrowRef: HTMLElement | null, placement?: Placement, offset?: number) => {
5
- reference: (node: (Element | import("@floating-ui/core").VirtualElement) | null) => void;
5
+ reference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
6
6
  floating: (node: HTMLElement | null) => void;
7
7
  refs: {
8
- reference: import("react").MutableRefObject<(Element | import("@floating-ui/core").VirtualElement) | null>;
8
+ reference: import("react").MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
9
9
  floating: import("react").MutableRefObject<HTMLElement | null>;
10
10
  };
11
11
  styles: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@norges-domstoler/dds-components",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
4
4
  "description": "React components used in Elsa - domstolenes designsystem",
5
5
  "author": "Elsa team",
6
6
  "license": "MIT",
@@ -62,7 +62,7 @@
62
62
  "@testing-library/user-event": "^14.1.0",
63
63
  "@types/jest": "^27.4.1",
64
64
  "@types/react": "^17.0.2",
65
- "@types/react-dom": "^17.0.2",
65
+ "@types/react-dom": "^18.0.6",
66
66
  "@types/styled-components": "^5.1.9",
67
67
  "@typescript-eslint/eslint-plugin": "^5.19.0",
68
68
  "@typescript-eslint/parser": "^5.19.0",
@@ -80,7 +80,7 @@
80
80
  "rollup-plugin-copy": "^3.4.0",
81
81
  "rollup-plugin-import-css": "^3.0.3",
82
82
  "rollup-plugin-sass": "^1.2.12",
83
- "rollup-plugin-typescript2": "^0.31.2",
83
+ "rollup-plugin-typescript2": "^0.32.1",
84
84
  "ts-jest": "^27.1.4",
85
85
  "typescript": "^4.6.3"
86
86
  },
@@ -111,7 +111,7 @@
111
111
  "dependencies": {
112
112
  "@emotion/react": "^11.9.0",
113
113
  "@emotion/styled": "^11.8.1",
114
- "@floating-ui/react-dom": "^0.6.3",
114
+ "@floating-ui/react-dom": "^0.7.2",
115
115
  "@mui/icons-material": "^5.6.2",
116
116
  "@mui/material": "^5.6.3",
117
117
  "focus-visible": "^5.2.0",