@navikt/ds-react 6.9.0 → 6.10.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/cjs/modal/ModalBody.js.map +1 -1
- package/cjs/modal/ModalFooter.js.map +1 -1
- package/cjs/modal/types.d.ts +5 -1
- package/esm/modal/ModalBody.js.map +1 -1
- package/esm/modal/ModalFooter.js.map +1 -1
- package/esm/modal/types.d.ts +5 -1
- package/package.json +3 -3
- package/src/modal/ModalBody.tsx +5 -3
- package/src/modal/ModalFooter.tsx +9 -3
- package/src/modal/types.ts +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalBody.js","sourceRoot":"","sources":["../../src/modal/ModalBody.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAsB;AACtB,+CAA0C;AAM1C,MAAM,SAAS,GAAG,IAAA,kBAAU,EAC1B,CAAC,EAAsB,EAAE,GAAG,EAAE,EAAE;QAA/B,EAAE,SAAS,OAAW,EAAN,IAAI,cAApB,aAAsB,CAAF;
|
|
1
|
+
{"version":3,"file":"ModalBody.js","sourceRoot":"","sources":["../../src/modal/ModalBody.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAsB;AACtB,+CAA0C;AAM1C,MAAM,SAAS,GAAG,IAAA,kBAAU,EAC1B,CAAC,EAAsB,EAAE,GAAG,EAAE,EAAE;QAA/B,EAAE,SAAS,OAAW,EAAN,IAAI,cAApB,aAAsB,CAAF;IACnB,OAAO,CACL,uDAAS,IAAI,IAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAA,cAAE,EAAC,mBAAmB,EAAE,SAAS,CAAC,IAAI,CAC3E,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,kBAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalFooter.js","sourceRoot":"","sources":["../../src/modal/ModalFooter.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAsB;AACtB,+CAA0C;AAM1C,MAAM,WAAW,GAAG,IAAA,kBAAU,EAC5B,CAAC,EAAsB,EAAE,GAAG,EAAE,EAAE;QAA/B,EAAE,SAAS,OAAW,EAAN,IAAI,cAApB,aAAsB,CAAF;
|
|
1
|
+
{"version":3,"file":"ModalFooter.js","sourceRoot":"","sources":["../../src/modal/ModalFooter.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAsB;AACtB,+CAA0C;AAM1C,MAAM,WAAW,GAAG,IAAA,kBAAU,EAC5B,CAAC,EAAsB,EAAE,GAAG,EAAE,EAAE;QAA/B,EAAE,SAAS,OAAW,EAAN,IAAI,cAApB,aAAsB,CAAF;IACnB,OAAO,CACL,uDACM,IAAI,IACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,cAAE,EAAC,qBAAqB,EAAE,SAAS,CAAC,IAC/C,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,kBAAe,WAAW,CAAC"}
|
package/cjs/modal/types.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
interface ModalPropsBase extends React.DialogHTMLAttributes<HTMLDialogElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Affects internal padding
|
|
5
|
+
*/
|
|
6
|
+
size?: "small" | "medium";
|
|
3
7
|
/**
|
|
4
8
|
* Content for the header. Alteratively you can use `<Modal.Header>` instead for more control, but then you have to set `aria-label` or `aria-labelledby` on the modal manually.
|
|
5
9
|
*/
|
|
@@ -10,7 +14,7 @@ interface ModalPropsBase extends React.DialogHTMLAttributes<HTMLDialogElement> {
|
|
|
10
14
|
/**
|
|
11
15
|
* Heading size.
|
|
12
16
|
* @default "medium"
|
|
13
|
-
|
|
17
|
+
*/
|
|
14
18
|
size?: "medium" | "small";
|
|
15
19
|
/**
|
|
16
20
|
* Removes close-button (X) when false.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalBody.js","sourceRoot":"","sources":["../../src/modal/ModalBody.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,MAAM,CAAC;AACtB,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAM1C,MAAM,SAAS,GAAG,UAAU,CAC1B,CAAC,EAAsB,EAAE,GAAG,EAAE,EAAE;QAA/B,EAAE,SAAS,OAAW,EAAN,IAAI,cAApB,aAAsB,CAAF;
|
|
1
|
+
{"version":3,"file":"ModalBody.js","sourceRoot":"","sources":["../../src/modal/ModalBody.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,MAAM,CAAC;AACtB,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAM1C,MAAM,SAAS,GAAG,UAAU,CAC1B,CAAC,EAAsB,EAAE,GAAG,EAAE,EAAE;QAA/B,EAAE,SAAS,OAAW,EAAN,IAAI,cAApB,aAAsB,CAAF;IACnB,OAAO,CACL,6CAAS,IAAI,IAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,mBAAmB,EAAE,SAAS,CAAC,IAAI,CAC3E,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalFooter.js","sourceRoot":"","sources":["../../src/modal/ModalFooter.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,MAAM,CAAC;AACtB,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAM1C,MAAM,WAAW,GAAG,UAAU,CAC5B,CAAC,EAAsB,EAAE,GAAG,EAAE,EAAE;QAA/B,EAAE,SAAS,OAAW,EAAN,IAAI,cAApB,aAAsB,CAAF;
|
|
1
|
+
{"version":3,"file":"ModalFooter.js","sourceRoot":"","sources":["../../src/modal/ModalFooter.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,MAAM,CAAC;AACtB,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAM1C,MAAM,WAAW,GAAG,UAAU,CAC5B,CAAC,EAAsB,EAAE,GAAG,EAAE,EAAE;QAA/B,EAAE,SAAS,OAAW,EAAN,IAAI,cAApB,aAAsB,CAAF;IACnB,OAAO,CACL,6CACM,IAAI,IACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,IAC/C,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
package/esm/modal/types.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
interface ModalPropsBase extends React.DialogHTMLAttributes<HTMLDialogElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Affects internal padding
|
|
5
|
+
*/
|
|
6
|
+
size?: "small" | "medium";
|
|
3
7
|
/**
|
|
4
8
|
* Content for the header. Alteratively you can use `<Modal.Header>` instead for more control, but then you have to set `aria-label` or `aria-labelledby` on the modal manually.
|
|
5
9
|
*/
|
|
@@ -10,7 +14,7 @@ interface ModalPropsBase extends React.DialogHTMLAttributes<HTMLDialogElement> {
|
|
|
10
14
|
/**
|
|
11
15
|
* Heading size.
|
|
12
16
|
* @default "medium"
|
|
13
|
-
|
|
17
|
+
*/
|
|
14
18
|
size?: "medium" | "small";
|
|
15
19
|
/**
|
|
16
20
|
* Removes close-button (X) when false.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@navikt/ds-react",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.10.0",
|
|
4
4
|
"description": "React components from the Norwegian Labour and Welfare Administration.",
|
|
5
5
|
"author": "Aksel, a team part of the Norwegian Labour and Welfare Administration.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -594,8 +594,8 @@
|
|
|
594
594
|
"dependencies": {
|
|
595
595
|
"@floating-ui/react": "0.25.4",
|
|
596
596
|
"@floating-ui/react-dom": "^2.0.9",
|
|
597
|
-
"@navikt/aksel-icons": "^6.
|
|
598
|
-
"@navikt/ds-tokens": "^6.
|
|
597
|
+
"@navikt/aksel-icons": "^6.10.0",
|
|
598
|
+
"@navikt/ds-tokens": "^6.10.0",
|
|
599
599
|
"clsx": "^2.1.0",
|
|
600
600
|
"date-fns": "^3.0.0",
|
|
601
601
|
"react-day-picker": "8.10.0"
|
package/src/modal/ModalBody.tsx
CHANGED
|
@@ -6,9 +6,11 @@ export interface ModalBodyProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
const ModalBody = forwardRef<HTMLDivElement, ModalBodyProps>(
|
|
9
|
-
({ className, ...rest }, ref) =>
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
({ className, ...rest }, ref) => {
|
|
10
|
+
return (
|
|
11
|
+
<div {...rest} ref={ref} className={cl("navds-modal__body", className)} />
|
|
12
|
+
);
|
|
13
|
+
},
|
|
12
14
|
);
|
|
13
15
|
|
|
14
16
|
export default ModalBody;
|
|
@@ -6,9 +6,15 @@ export interface ModalFooterProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
const ModalFooter = forwardRef<HTMLDivElement, ModalFooterProps>(
|
|
9
|
-
({ className, ...rest }, ref) =>
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
({ className, ...rest }, ref) => {
|
|
10
|
+
return (
|
|
11
|
+
<div
|
|
12
|
+
{...rest}
|
|
13
|
+
ref={ref}
|
|
14
|
+
className={cl("navds-modal__footer", className)}
|
|
15
|
+
/>
|
|
16
|
+
);
|
|
17
|
+
},
|
|
12
18
|
);
|
|
13
19
|
|
|
14
20
|
export default ModalFooter;
|
package/src/modal/types.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
interface ModalPropsBase extends React.DialogHTMLAttributes<HTMLDialogElement> {
|
|
2
|
+
/**
|
|
3
|
+
* Affects internal padding
|
|
4
|
+
*/
|
|
5
|
+
size?: "small" | "medium";
|
|
2
6
|
/**
|
|
3
7
|
* Content for the header. Alteratively you can use `<Modal.Header>` instead for more control, but then you have to set `aria-label` or `aria-labelledby` on the modal manually.
|
|
4
8
|
*/
|
|
@@ -9,7 +13,7 @@ interface ModalPropsBase extends React.DialogHTMLAttributes<HTMLDialogElement> {
|
|
|
9
13
|
/**
|
|
10
14
|
* Heading size.
|
|
11
15
|
* @default "medium"
|
|
12
|
-
|
|
16
|
+
*/
|
|
13
17
|
size?: "medium" | "small";
|
|
14
18
|
/**
|
|
15
19
|
* Removes close-button (X) when false.
|