@navikt/ds-react 6.9.0 → 6.10.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 +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;IAAY,OAAA,CAC/B,uDAAS,IAAI,IAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAA,cAAE,EAAC,mBAAmB,EAAE,SAAS,CAAC,IAAI,CAC3E,CAAA;CAAA,CACF,CAAC;AAEF,kBAAe,SAAS,CAAC"}
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;IAAY,OAAA,CAC/B,uDAAS,IAAI,IAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAA,cAAE,EAAC,qBAAqB,EAAE,SAAS,CAAC,IAAI,CAC7E,CAAA;CAAA,CACF,CAAC;AAEF,kBAAe,WAAW,CAAC"}
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"}
@@ -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.
@@ -18,25 +18,25 @@ export interface PaginationProps extends React.HTMLAttributes<HTMLElement> {
18
18
  */
19
19
  boundaryCount?: number;
20
20
  /**
21
- * Callback when current page changes
21
+ * Callback when current page changes.
22
22
  */
23
23
  onPageChange?: (page: number) => void;
24
24
  /**
25
- * Total number of pages
25
+ * Total number of pages.
26
26
  */
27
27
  count: number;
28
28
  /**
29
- * Changes padding, height and font-size
29
+ * Changes padding, height and font-size.
30
30
  * @default "medium"
31
31
  */
32
32
  size?: "medium" | "small" | "xsmall";
33
33
  /**
34
- * Display text alongside "previous" and "next" icons
34
+ * Display text alongside "previous" and "next" icons.
35
35
  * @default false
36
36
  */
37
37
  prevNextTexts?: boolean;
38
38
  /**
39
- * Override pagination item rendering
39
+ * Override pagination item rendering.
40
40
  * @default (item: PaginationItemProps) => <PaginationItem {...item} />
41
41
  */
42
42
  renderItem?: (item: PaginationItemProps) => ReturnType<React.FC>;
@@ -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;IAAY,OAAA,CAC/B,6CAAS,IAAI,IAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,mBAAmB,EAAE,SAAS,CAAC,IAAI,CAC3E,CAAA;CAAA,CACF,CAAC;AAEF,eAAe,SAAS,CAAC"}
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;IAAY,OAAA,CAC/B,6CAAS,IAAI,IAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,IAAI,CAC7E,CAAA;CAAA,CACF,CAAC;AAEF,eAAe,WAAW,CAAC"}
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"}
@@ -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.
@@ -18,25 +18,25 @@ export interface PaginationProps extends React.HTMLAttributes<HTMLElement> {
18
18
  */
19
19
  boundaryCount?: number;
20
20
  /**
21
- * Callback when current page changes
21
+ * Callback when current page changes.
22
22
  */
23
23
  onPageChange?: (page: number) => void;
24
24
  /**
25
- * Total number of pages
25
+ * Total number of pages.
26
26
  */
27
27
  count: number;
28
28
  /**
29
- * Changes padding, height and font-size
29
+ * Changes padding, height and font-size.
30
30
  * @default "medium"
31
31
  */
32
32
  size?: "medium" | "small" | "xsmall";
33
33
  /**
34
- * Display text alongside "previous" and "next" icons
34
+ * Display text alongside "previous" and "next" icons.
35
35
  * @default false
36
36
  */
37
37
  prevNextTexts?: boolean;
38
38
  /**
39
- * Override pagination item rendering
39
+ * Override pagination item rendering.
40
40
  * @default (item: PaginationItemProps) => <PaginationItem {...item} />
41
41
  */
42
42
  renderItem?: (item: PaginationItemProps) => ReturnType<React.FC>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navikt/ds-react",
3
- "version": "6.9.0",
3
+ "version": "6.10.1",
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.9.0",
598
- "@navikt/ds-tokens": "^6.9.0",
597
+ "@navikt/aksel-icons": "^6.10.1",
598
+ "@navikt/ds-tokens": "^6.10.1",
599
599
  "clsx": "^2.1.0",
600
600
  "date-fns": "^3.0.0",
601
601
  "react-day-picker": "8.10.0"
@@ -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
- <div {...rest} ref={ref} className={cl("navds-modal__body", className)} />
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
- <div {...rest} ref={ref} className={cl("navds-modal__footer", className)} />
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;
@@ -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.
@@ -25,25 +25,25 @@ export interface PaginationProps extends React.HTMLAttributes<HTMLElement> {
25
25
  */
26
26
  boundaryCount?: number;
27
27
  /**
28
- * Callback when current page changes
28
+ * Callback when current page changes.
29
29
  */
30
30
  onPageChange?: (page: number) => void;
31
31
  /**
32
- * Total number of pages
32
+ * Total number of pages.
33
33
  */
34
34
  count: number;
35
35
  /**
36
- * Changes padding, height and font-size
36
+ * Changes padding, height and font-size.
37
37
  * @default "medium"
38
38
  */
39
39
  size?: "medium" | "small" | "xsmall";
40
40
  /**
41
- * Display text alongside "previous" and "next" icons
41
+ * Display text alongside "previous" and "next" icons.
42
42
  * @default false
43
43
  */
44
44
  prevNextTexts?: boolean;
45
45
  /**
46
- * Override pagination item rendering
46
+ * Override pagination item rendering.
47
47
  * @default (item: PaginationItemProps) => <PaginationItem {...item} />
48
48
  */
49
49
  renderItem?: (item: PaginationItemProps) => ReturnType<React.FC>;