@navikt/ds-react 5.7.4 → 5.7.5
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/_docs.json +17 -17
- package/esm/loader/Loader.d.ts +7 -1
- package/esm/loader/Loader.js.map +1 -1
- package/package.json +3 -3
- package/src/loader/Loader.tsx +7 -1
- package/src/loader/loader.stories.tsx +3 -3
package/_docs.json
CHANGED
|
@@ -5656,46 +5656,46 @@
|
|
|
5656
5656
|
"name": "\"neutral\" | \"interaction\" | \"inverted\""
|
|
5657
5657
|
}
|
|
5658
5658
|
},
|
|
5659
|
-
"
|
|
5659
|
+
"ref": {
|
|
5660
5660
|
"defaultValue": null,
|
|
5661
|
-
"description": "",
|
|
5662
|
-
"name": "
|
|
5661
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).\n@see https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom\n@see https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom",
|
|
5662
|
+
"name": "ref",
|
|
5663
5663
|
"parent": {
|
|
5664
|
-
"fileName": "
|
|
5665
|
-
"name": "
|
|
5664
|
+
"fileName": "src/loader/Loader.tsx",
|
|
5665
|
+
"name": "LoaderProps"
|
|
5666
5666
|
},
|
|
5667
5667
|
"declarations": [
|
|
5668
|
+
{
|
|
5669
|
+
"fileName": "src/loader/Loader.tsx",
|
|
5670
|
+
"name": "LoaderProps"
|
|
5671
|
+
},
|
|
5668
5672
|
{
|
|
5669
5673
|
"fileName": "aksel/node_modules/@types/react/index.d.ts",
|
|
5670
|
-
"name": "
|
|
5674
|
+
"name": "RefAttributes"
|
|
5671
5675
|
}
|
|
5672
5676
|
],
|
|
5673
5677
|
"required": false,
|
|
5674
5678
|
"type": {
|
|
5675
|
-
"name": "
|
|
5679
|
+
"name": "Ref<SVGSVGElement>"
|
|
5676
5680
|
}
|
|
5677
5681
|
},
|
|
5678
|
-
"
|
|
5682
|
+
"className": {
|
|
5679
5683
|
"defaultValue": null,
|
|
5680
|
-
"description": "
|
|
5681
|
-
"name": "
|
|
5684
|
+
"description": "",
|
|
5685
|
+
"name": "className",
|
|
5682
5686
|
"parent": {
|
|
5683
5687
|
"fileName": "aksel/node_modules/@types/react/index.d.ts",
|
|
5684
|
-
"name": "
|
|
5688
|
+
"name": "SVGAttributes"
|
|
5685
5689
|
},
|
|
5686
5690
|
"declarations": [
|
|
5687
5691
|
{
|
|
5688
5692
|
"fileName": "aksel/node_modules/@types/react/index.d.ts",
|
|
5689
|
-
"name": "
|
|
5690
|
-
},
|
|
5691
|
-
{
|
|
5692
|
-
"fileName": "aksel/node_modules/@types/react/index.d.ts",
|
|
5693
|
-
"name": "RefAttributes"
|
|
5693
|
+
"name": "SVGAttributes"
|
|
5694
5694
|
}
|
|
5695
5695
|
],
|
|
5696
5696
|
"required": false,
|
|
5697
5697
|
"type": {
|
|
5698
|
-
"name": "
|
|
5698
|
+
"name": "string"
|
|
5699
5699
|
}
|
|
5700
5700
|
}
|
|
5701
5701
|
}
|
package/esm/loader/Loader.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { SVGProps } from "react";
|
|
2
|
-
export interface LoaderProps extends SVGProps<SVGSVGElement> {
|
|
2
|
+
export interface LoaderProps extends Omit<SVGProps<SVGSVGElement>, "ref"> {
|
|
3
3
|
/**
|
|
4
4
|
* Changes Loader width/height
|
|
5
5
|
* 88px | 64px | 40px | 32px | 24px | 20px | 16px
|
|
@@ -21,6 +21,12 @@ export interface LoaderProps extends SVGProps<SVGSVGElement> {
|
|
|
21
21
|
* @default "neutral"
|
|
22
22
|
*/
|
|
23
23
|
variant?: "neutral" | "interaction" | "inverted";
|
|
24
|
+
/**
|
|
25
|
+
* Allows getting a ref to the component instance.
|
|
26
|
+
* Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
|
|
27
|
+
* @see https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom
|
|
28
|
+
*/
|
|
29
|
+
ref?: React.Ref<SVGSVGElement>;
|
|
24
30
|
}
|
|
25
31
|
export type LoaderType = React.ForwardRefExoticComponent<LoaderProps & React.RefAttributes<SVGSVGElement>>;
|
|
26
32
|
/**
|
package/esm/loader/Loader.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Loader.js","sourceRoot":"","sources":["../../src/loader/Loader.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,MAAM,CAAC;AACtB,OAAO,KAAK,EAAE,EAAE,UAAU,EAAY,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Loader.js","sourceRoot":"","sources":["../../src/loader/Loader.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,MAAM,CAAC;AACtB,OAAO,KAAK,EAAE,EAAE,UAAU,EAAY,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA4CtC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,MAAM,GAAe,UAAU,CAC1C,CACE,EAQC,EACD,GAAG,EACH,EAAE;QAVF,EACE,SAAS,EACT,IAAI,GAAG,QAAQ,EACf,KAAK,GAAG,WAAW,EACnB,WAAW,GAAG,KAAK,EACnB,OAAO,GAAG,SAAS,EACnB,EAAE,OAEH,EADI,IAAI,cAPT,8DAQC,CADQ;IAIT,MAAM,UAAU,GAAG,KAAK,EAAE,CAAC;IAE3B,OAAO,CACL,8DACmB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,UAAU,UAAU,EAAE,EAC7C,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,cAAc,EACd,SAAS,EACT,iBAAiB,IAAI,EAAE,EACvB,iBAAiB,OAAO,EAAE,EAC1B;YACE,2BAA2B,EAAE,WAAW;SACzC,CACF,EACD,SAAS,EAAC,OAAO,EACjB,OAAO,EAAC,WAAW,EACnB,mBAAmB,EAAC,UAAU,IAC1B,IAAI,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,CAAC;QAE5B,+BAAO,EAAE,EAAE,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,UAAU,UAAU,EAAE,IAAG,KAAK,CAAS;QACxD,gCACE,SAAS,EAAC,0BAA0B,EACpC,KAAK,EAAC,4BAA4B,EAClC,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,IAAI,EACP,CAAC,EAAC,IAAI,EACN,IAAI,EAAC,MAAM,GACX;QACF,gCACE,SAAS,EAAC,0BAA0B,EACpC,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,IAAI,EACP,CAAC,EAAC,IAAI,EACN,IAAI,EAAC,MAAM,EACX,eAAe,EAAC,QAAQ,GACxB,CACE,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@navikt/ds-react",
|
|
3
|
-
"version": "5.7.
|
|
3
|
+
"version": "5.7.5",
|
|
4
4
|
"description": "Aksel react-components for NAV designsystem",
|
|
5
5
|
"author": "Aksel | NAV designsystem team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@floating-ui/react": "0.25.4",
|
|
41
|
-
"@navikt/aksel-icons": "^5.7.
|
|
42
|
-
"@navikt/ds-tokens": "^5.7.
|
|
41
|
+
"@navikt/aksel-icons": "^5.7.5",
|
|
42
|
+
"@navikt/ds-tokens": "^5.7.5",
|
|
43
43
|
"@radix-ui/react-tabs": "1.0.0",
|
|
44
44
|
"@radix-ui/react-toggle-group": "1.0.0",
|
|
45
45
|
"clsx": "^1.2.1",
|
package/src/loader/Loader.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import cl from "clsx";
|
|
|
2
2
|
import React, { forwardRef, SVGProps } from "react";
|
|
3
3
|
import { omit, useId } from "../util";
|
|
4
4
|
|
|
5
|
-
export interface LoaderProps extends SVGProps<SVGSVGElement> {
|
|
5
|
+
export interface LoaderProps extends Omit<SVGProps<SVGSVGElement>, "ref"> {
|
|
6
6
|
/**
|
|
7
7
|
* Changes Loader width/height
|
|
8
8
|
* 88px | 64px | 40px | 32px | 24px | 20px | 16px
|
|
@@ -31,6 +31,12 @@ export interface LoaderProps extends SVGProps<SVGSVGElement> {
|
|
|
31
31
|
* @default "neutral"
|
|
32
32
|
*/
|
|
33
33
|
variant?: "neutral" | "interaction" | "inverted";
|
|
34
|
+
/**
|
|
35
|
+
* Allows getting a ref to the component instance.
|
|
36
|
+
* Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
|
|
37
|
+
* @see https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom
|
|
38
|
+
*/
|
|
39
|
+
ref?: React.Ref<SVGSVGElement>;
|
|
34
40
|
}
|
|
35
41
|
|
|
36
42
|
/* Workaround for @types/react v17/v18 feil */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Loader } from "..";
|
|
3
1
|
import { Meta } from "@storybook/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Loader, LoaderProps } from "..";
|
|
4
4
|
export default {
|
|
5
5
|
title: "ds-react/Loader",
|
|
6
6
|
component: Loader,
|
|
@@ -29,7 +29,7 @@ export default {
|
|
|
29
29
|
} as Meta;
|
|
30
30
|
|
|
31
31
|
export const Default = {
|
|
32
|
-
render: (props:
|
|
32
|
+
render: (props: LoaderProps) => {
|
|
33
33
|
return <Loader {...props} />;
|
|
34
34
|
},
|
|
35
35
|
|