@navikt/ds-react 0.13.3 → 0.14.0-beta.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.
- package/cjs/loader/Loader.js +1 -1
- package/dist/complete.js +15978 -0
- package/dist/partial.js +4039 -0
- package/esm/loader/Loader.js +1 -1
- package/esm/loader/Loader.js.map +1 -1
- package/package.json +9 -6
- package/src/grid/stories/grid.stories.mdx +3 -3
- package/src/guide-panel/stories/example.css +4 -4
- package/src/guide-panel/stories/guidepanel.stories.mdx +7 -7
- package/src/guide-panel/stories/guidepanel.stories.tsx +6 -6
- package/src/loader/Loader.tsx +1 -1
- package/src/loader/stories/loader.stories.mdx +0 -16
- package/src/popover/stories/popover.stories.tsx +1 -1
- package/src/speech-bubble/stories/speechbubble.stories.mdx +4 -4
- package/src/speech-bubble/stories/speechbubble.stories.tsx +2 -2
- package/src/typography/stories/index.css +1 -1
- package/LICENCE +0 -31
package/esm/loader/Loader.js
CHANGED
|
@@ -20,7 +20,7 @@ const Loader = forwardRef((_a, ref) => {
|
|
|
20
20
|
}), focusable: "false", viewBox: "0 0 50 50", preserveAspectRatio: "xMidYMid" }, rest),
|
|
21
21
|
React.createElement("title", { id: id !== null && id !== void 0 ? id : `loader-${internalId}` }, title),
|
|
22
22
|
React.createElement("circle", { className: "navds-loader__background", xmlns: "http://www.w3.org/2000/svg", cx: "25", cy: "25", r: "20", fill: "none", strokeWidth: "5" }),
|
|
23
|
-
React.createElement("circle", { className: "navds-loader__foreground", cx: "25", cy: "25", r: "20", stroke: "var(--navds-color-gray-
|
|
23
|
+
React.createElement("circle", { className: "navds-loader__foreground", cx: "25", cy: "25", r: "20", stroke: "var(--navds-global-color-gray-400)", fill: "none", strokeWidth: "5", strokeDasharray: "50 155", strokeLinecap: "round" })));
|
|
24
24
|
});
|
|
25
25
|
export default Loader;
|
|
26
26
|
//# sourceMappingURL=Loader.js.map
|
package/esm/loader/Loader.js.map
CHANGED
|
@@ -1 +1 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AC,IAAI,EACN,MAAM,EAAE,oCAAoC,EAC5C,IAAI,EAAC,MAAM,EACX,WAAW,EAAC,GAAG,EACf,eAAe,EAAC,QAAQ,EACxB,aAAa,EAAC,OAAO,GACrB,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": "0.
|
|
3
|
+
"version": "0.14.0-beta.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "NAV designsystem react components",
|
|
6
6
|
"author": "NAV Designsystem team",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"files": [
|
|
25
25
|
"/cjs",
|
|
26
26
|
"/esm",
|
|
27
|
-
"/src"
|
|
27
|
+
"/src",
|
|
28
|
+
"/dist"
|
|
28
29
|
],
|
|
29
30
|
"scripts": {
|
|
30
31
|
"create-package-json-pointers-to-esm": "node ../../../utilities/scripts/createPackageJsonsWithESMPointers.js",
|
|
@@ -35,7 +36,7 @@
|
|
|
35
36
|
},
|
|
36
37
|
"dependencies": {
|
|
37
38
|
"@material-ui/core": "^4.12.3",
|
|
38
|
-
"@navikt/ds-icons": "^0.
|
|
39
|
+
"@navikt/ds-icons": "^0.7.0",
|
|
39
40
|
"@popperjs/core": "^2.10.1",
|
|
40
41
|
"classnames": "^2.2.6",
|
|
41
42
|
"react-collapse": "^5.1.0",
|
|
@@ -45,6 +46,8 @@
|
|
|
45
46
|
"uuid": "^8.3.2"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
49
|
+
"webpack-node-externals": "^3.0.0",
|
|
50
|
+
"webpack": "^5.65.0",
|
|
48
51
|
"@testing-library/jest-dom": "^5.14.1",
|
|
49
52
|
"@testing-library/react": "^12.1.0",
|
|
50
53
|
"@testing-library/user-event": "^13.2.1",
|
|
@@ -61,7 +64,7 @@
|
|
|
61
64
|
"ts-jest": "^27.0.5"
|
|
62
65
|
},
|
|
63
66
|
"peerDependencies": {
|
|
64
|
-
"react": "^
|
|
65
|
-
|
|
66
|
-
|
|
67
|
+
"@types/react": "^17.0.30",
|
|
68
|
+
"react": "^17.0.0"
|
|
69
|
+
}
|
|
67
70
|
}
|
|
@@ -31,13 +31,13 @@ Stylingen som blir satt av den:
|
|
|
31
31
|
.navds-content-container {
|
|
32
32
|
margin-left: auto;
|
|
33
33
|
margin-right: auto;
|
|
34
|
-
max-width:
|
|
35
|
-
padding: var(--navds-
|
|
34
|
+
max-width: 79.5rem; # (1272px)
|
|
35
|
+
padding: var(--navds-spacing-4); # 1rem
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
@media (min-width: 448px) {
|
|
39
39
|
.navds-content-container {
|
|
40
|
-
padding: var(--navds-
|
|
40
|
+
padding: var(--navds-spacing-6); # 1.5rem
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
```
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
.sb-guidepanel__tokens--purple {
|
|
2
|
-
--navds-guide-panel-color-border: var(--navds-color-purple-
|
|
2
|
+
--navds-guide-panel-color-border: var(--navds-global-color-purple-400);
|
|
3
3
|
--navds-guide-panel-color-illustration-background: var(
|
|
4
|
-
--navds-color-purple-
|
|
4
|
+
--navds-global-color-purple-200
|
|
5
5
|
);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.sb-guidepanel__tokens--green {
|
|
9
|
-
--navds-guide-panel-color-border: var(--navds-color-green-
|
|
9
|
+
--navds-guide-panel-color-border: var(--navds-global-color-green-400);
|
|
10
10
|
--navds-guide-panel-color-illustration-background: var(
|
|
11
|
-
--navds-color-green-
|
|
11
|
+
--navds-global-color-green-200
|
|
12
12
|
);
|
|
13
13
|
}
|
|
@@ -38,9 +38,9 @@ Istedenfor fargetema/themes slik som tidligere veileder brukte velger man nå se
|
|
|
38
38
|
overskrive tokens. Det anbefalses å gjøre dette med eks Styled-Components eller css-klasser, men kan inlines også
|
|
39
39
|
|
|
40
40
|
```css
|
|
41
|
-
/*
|
|
42
|
-
--navds-guide-panel-color-border
|
|
43
|
-
--navds-guide-panel-color-illustration-background
|
|
41
|
+
/* Tokens */
|
|
42
|
+
--navds-guide-panel-color-border
|
|
43
|
+
--navds-guide-panel-color-illustration-background
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
```jsx
|
|
@@ -55,16 +55,16 @@ overskrive tokens. Det anbefalses å gjøre dette med eks Styled-Components elle
|
|
|
55
55
|
/* Inline */
|
|
56
56
|
<GuidePanel
|
|
57
57
|
style={{
|
|
58
|
-
["--navds-guide-panel-color-illustration-background" as any]: "var(--navds-color-orange-
|
|
59
|
-
["--navds-guide-panel-color-border" as any]: "var(--navds-color-orange-
|
|
58
|
+
["--navds-guide-panel-color-illustration-background" as any]: "var(--navds-global-color-orange-200)",
|
|
59
|
+
["--navds-guide-panel-color-border" as any]: "var(--navds-global-color-orange-400)",
|
|
60
60
|
}}
|
|
61
61
|
>
|
|
62
62
|
Cupidatat proident adipisicing eu nulla laborum dolore irure aliqua.
|
|
63
63
|
</GuidePanel>
|
|
64
64
|
<GuidePanel
|
|
65
65
|
style={{
|
|
66
|
-
["--navds-guide-panel-color-illustration-background" as any]: "var(--navds-color-orange-
|
|
67
|
-
["--navds-guide-panel-color-border" as any]: "var(--navds-color-orange-
|
|
66
|
+
["--navds-guide-panel-color-illustration-background" as any]: "var(--navds-global-color-orange-200)",
|
|
67
|
+
["--navds-guide-panel-color-border" as any]: "var(--navds-global-color-orange-400)",
|
|
68
68
|
}}
|
|
69
69
|
>
|
|
70
70
|
Cupidatat proident adipisicing eu nulla laborum dolore irure aliqua.
|
|
@@ -21,24 +21,24 @@ export const All = () => {
|
|
|
21
21
|
<h2>custom colors</h2>
|
|
22
22
|
<GuidePanel
|
|
23
23
|
style={{
|
|
24
|
-
["--navds-guide-panel-color-illustration-background" as any]: "var(--navds-color-purple-
|
|
25
|
-
["--navds-guide-panel-color-border" as any]: "var(--navds-color-purple-
|
|
24
|
+
["--navds-guide-panel-color-illustration-background" as any]: "var(--navds-global-color-purple-200)",
|
|
25
|
+
["--navds-guide-panel-color-border" as any]: "var(--navds-global-color-purple-400)",
|
|
26
26
|
}}
|
|
27
27
|
>
|
|
28
28
|
{panelText}
|
|
29
29
|
</GuidePanel>
|
|
30
30
|
<GuidePanel
|
|
31
31
|
style={{
|
|
32
|
-
["--navds-guide-panel-color-illustration-background" as any]: "var(--navds-color-green-
|
|
33
|
-
["--navds-guide-panel-color-border" as any]: "var(--navds-color-green-
|
|
32
|
+
["--navds-guide-panel-color-illustration-background" as any]: "var(--navds-global-color-green-200)",
|
|
33
|
+
["--navds-guide-panel-color-border" as any]: "var(--navds-global-color-green-400)",
|
|
34
34
|
}}
|
|
35
35
|
>
|
|
36
36
|
{panelText}
|
|
37
37
|
</GuidePanel>
|
|
38
38
|
<GuidePanel
|
|
39
39
|
style={{
|
|
40
|
-
["--navds-guide-panel-color-illustration-background" as any]: "var(--navds-color-orange-
|
|
41
|
-
["--navds-guide-panel-color-border" as any]: "var(--navds-color-orange-
|
|
40
|
+
["--navds-guide-panel-color-illustration-background" as any]: "var(--navds-global-color-orange-200)",
|
|
41
|
+
["--navds-guide-panel-color-border" as any]: "var(--navds-global-color-orange-400)",
|
|
42
42
|
}}
|
|
43
43
|
>
|
|
44
44
|
{panelText}Ullamco reprehenderit fugiat reprehenderit ad nisi aliqua
|
package/src/loader/Loader.tsx
CHANGED
|
@@ -85,19 +85,3 @@ Størrelsen justeres også automatisk, slik at alt man trenger er å sette Loade
|
|
|
85
85
|
<Loader />
|
|
86
86
|
</Button>
|
|
87
87
|
</Canvas>
|
|
88
|
-
|
|
89
|
-
## Overskrive farger for å sikre kontrast
|
|
90
|
-
|
|
91
|
-
I de casene der man må justere fargene for å ha bedre kontrast så kan man endre på selve css-variablene som bli brukt
|
|
92
|
-
|
|
93
|
-
```css
|
|
94
|
-
--navds-loader-color-foreground: var(--navds-color-gray-40);
|
|
95
|
-
--navds-loader-color-background: var(--navds-color-gray-10);
|
|
96
|
-
--navds-loader-color-neutral-foreground: var(--navds-color-gray-40);
|
|
97
|
-
--navds-loader-color-interaction-foreground: var(--navds-color-blue-50);
|
|
98
|
-
--navds-loader-color-inverted-foreground: var(--navds-color-white);
|
|
99
|
-
--navds-loader-color-inverted-background: rgba(255, 255, 255, 0.3);
|
|
100
|
-
--navds-loader-color-transparent-background: transparent;
|
|
101
|
-
--navds-loader-color-on-button-background: rgba(255, 255, 255, 0.3);
|
|
102
|
-
--navds-loader-color-on-button-foreground: currentColor;
|
|
103
|
-
```
|
|
@@ -80,8 +80,8 @@ Man kan endre bakgrunnsfargen selv med `illustrationBgColor` og `backgroundColor
|
|
|
80
80
|
<SpeechBubble
|
|
81
81
|
illustration="OLA"
|
|
82
82
|
position="left"
|
|
83
|
-
illustrationBgColor="var(--navds-color-lightblue-
|
|
84
|
-
backgroundColor="var(--navds-color-lightblue-
|
|
83
|
+
illustrationBgColor="var(--navds-global-color-lightblue-100)"
|
|
84
|
+
backgroundColor="var(--navds-global-color-lightblue-200)"
|
|
85
85
|
>
|
|
86
86
|
<SpeechBubble.Bubble>
|
|
87
87
|
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
|
|
@@ -93,8 +93,8 @@ Man kan endre bakgrunnsfargen selv med `illustrationBgColor` og `backgroundColor
|
|
|
93
93
|
<SpeechBubble
|
|
94
94
|
illustration="OLA"
|
|
95
95
|
position="left"
|
|
96
|
-
illustrationBgColor="var(--navds-color-lightblue-
|
|
97
|
-
backgroundColor="var(--navds-color-lightblue-
|
|
96
|
+
illustrationBgColor="var(--navds-global-color-lightblue-100)"
|
|
97
|
+
backgroundColor="var(--navds-global-color-lightblue-200)"
|
|
98
98
|
>
|
|
99
99
|
<SpeechBubble.Bubble>
|
|
100
100
|
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
|
|
@@ -14,7 +14,7 @@ export const All = () => {
|
|
|
14
14
|
<SpeechBubble
|
|
15
15
|
illustration={<Illustration />}
|
|
16
16
|
topText="Ola Normann 01.01.21 14:00"
|
|
17
|
-
backgroundColor="var(--navds-color-lightblue-
|
|
17
|
+
backgroundColor="var(--navds-global-color-lightblue-200)"
|
|
18
18
|
>
|
|
19
19
|
<SpeechBubble.Bubble>
|
|
20
20
|
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
|
|
@@ -42,7 +42,7 @@ export const All = () => {
|
|
|
42
42
|
</div>
|
|
43
43
|
}
|
|
44
44
|
position="right"
|
|
45
|
-
backgroundColor="var(--navds-color-gray-
|
|
45
|
+
backgroundColor="var(--navds-global-color-gray-100)"
|
|
46
46
|
>
|
|
47
47
|
<SpeechBubble.Bubble>
|
|
48
48
|
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
|
package/LICENCE
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
Font License
|
|
2
|
-
|
|
3
|
-
The Source Sans Pro font files in packages/node_modules/nav-frontend-typografi-style/assets are a subset of Source Sans Pro, licensed under the SIL Open Font License, and copyright Adobe Systems Incorporated, with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
|
|
4
|
-
|
|
5
|
-
Icon License
|
|
6
|
-
|
|
7
|
-
This project uses Streamline Icons. If you use nav-frontend-moduler in your project please adhere to the Streamline Icons license agreement found here: https://streamlineicons.com/ux/extended-license.html
|
|
8
|
-
|
|
9
|
-
The rest of the codebase (excluding 3rd party dependencies):
|
|
10
|
-
|
|
11
|
-
# The MIT License
|
|
12
|
-
|
|
13
|
-
Copyright 2019 NAV (Arbeids- og velferdsdirektoratet) - The Norwegian Labour and Welfare Administration
|
|
14
|
-
|
|
15
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
16
|
-
a copy of this software and associated documentation files (the "Software"),
|
|
17
|
-
to deal in the Software without restriction, including without limitation
|
|
18
|
-
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
19
|
-
and/or sell copies of the Software, and to permit persons to whom the
|
|
20
|
-
Software is furnished to do so, subject to the following conditions:
|
|
21
|
-
|
|
22
|
-
The above copyright notice and this permission notice shall be included
|
|
23
|
-
in all copies or substantial portions of the Software.
|
|
24
|
-
|
|
25
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
26
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
27
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
28
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
29
|
-
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
30
|
-
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
31
|
-
USE OR OTHER DEALINGS IN THE SOFTWARE.
|