pn-design-assets 1.8.2 → 2.0.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/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarqube-scan/report-task.txt +3 -3
- package/README.md +57 -18
- package/bom.xml +495 -494
- package/package.json +8 -7
- package/pn-assets/colors.d.ts +1 -0
- package/pn-assets/colors.d.ts.map +1 -1
- package/pn-assets/colors.js +2 -1
- package/pn-assets/colors.ts +2 -1
- package/pn-assets/flags.d.ts +88 -88
- package/pn-assets/flags.d.ts.map +1 -1
- package/pn-assets/flags.js +88 -88
- package/pn-assets/flags.ts +88 -88
- package/pn-assets/flagsCamel.d.ts +88 -88
- package/pn-assets/flagsCamel.d.ts.map +1 -1
- package/pn-assets/flagsCamel.js +88 -88
- package/pn-assets/flagsCamel.ts +88 -88
- package/pn-assets/icons.d.ts +51 -51
- package/pn-assets/icons.d.ts.map +1 -1
- package/pn-assets/icons.js +51 -51
- package/pn-assets/icons.ts +51 -51
- package/pn-assets/iconsCamel.d.ts +51 -51
- package/pn-assets/iconsCamel.d.ts.map +1 -1
- package/pn-assets/iconsCamel.js +51 -51
- package/pn-assets/iconsCamel.ts +51 -51
- package/pn-assets/illustrations/circle/highfive-success.svg +37 -0
- package/pn-assets/illustrations/highfive_success.d.ts +3 -0
- package/pn-assets/illustrations/highfive_success.d.ts.map +1 -0
- package/pn-assets/illustrations/highfive_success.js +3 -0
- package/pn-assets/illustrations/highfive_success.ts +3 -0
- package/pn-assets/illustrations.d.ts +49 -48
- package/pn-assets/illustrations.d.ts.map +1 -1
- package/pn-assets/illustrations.js +49 -48
- package/pn-assets/illustrations.ts +49 -48
- package/pn-assets/illustrationsCamel.d.ts +49 -48
- package/pn-assets/illustrationsCamel.d.ts.map +1 -1
- package/pn-assets/illustrationsCamel.js +49 -48
- package/pn-assets/illustrationsCamel.ts +49 -48
- package/pn-assets/styles/_pn-colors.scss +2 -1
- package/pn-assets/styles/_pn-typography.scss +9 -8
- package/pn-assets/styles/pn-styles.scss +4 -4
package/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarqube-scan/report-task.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
projectKey=avupublicapis_DOCS_pn-design-guidelines
|
|
2
2
|
serverUrl=https://sqc.ess.postnord.com
|
|
3
|
-
serverVersion=10.
|
|
3
|
+
serverVersion=10.7.0.96327
|
|
4
4
|
dashboardUrl=https://sqc.ess.postnord.com/dashboard?id=avupublicapis_DOCS_pn-design-guidelines&branch=master
|
|
5
|
-
ceTaskId=
|
|
6
|
-
ceTaskUrl=https://sqc.ess.postnord.com/api/ce/task?id=
|
|
5
|
+
ceTaskId=f8ce9789-94a9-4170-b181-3e76fd66031f
|
|
6
|
+
ceTaskUrl=https://sqc.ess.postnord.com/api/ce/task?id=f8ce9789-94a9-4170-b181-3e76fd66031f
|
package/README.md
CHANGED
|
@@ -4,29 +4,68 @@ PostNords colors, fonts and resets used across our apps.
|
|
|
4
4
|
|
|
5
5
|
## SCSS
|
|
6
6
|
|
|
7
|
+
Remember to use SASS 8.0.0 and above. Change @import statements to @use.
|
|
8
|
+
|
|
9
|
+
### PostNord CSS resets
|
|
10
|
+
|
|
11
|
+
Resets 1 rem to 10px to make it easier to work with. **Mandatory if you want to use our web components.**
|
|
12
|
+
|
|
7
13
|
```css
|
|
8
|
-
|
|
9
|
-
|
|
14
|
+
@use 'node_modules/pn-design-assets/pn-assets/styles/_pn-resets';
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### PostNord fonts
|
|
10
18
|
|
|
11
|
-
|
|
12
|
-
@import "node_modules/pn-design-assets/pn-assets/styles/_pn-fonts";
|
|
19
|
+
Import PostNord-Sans fonts in your app.
|
|
13
20
|
|
|
14
|
-
|
|
15
|
-
@
|
|
21
|
+
```css
|
|
22
|
+
@use 'node_modules/pn-design-assets/pn-assets/styles/_pn-fonts';
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### PostNord typography classes
|
|
16
26
|
|
|
17
|
-
|
|
18
|
-
@import "node_modules/pn-design-assets/pn-assets/styles/_pn-colors";
|
|
27
|
+
This is all of the font sizes that we've decided on in the design team. In short it's sensible default sizes for all text elements and a bunch of helper classes to align our typography standards cross site.
|
|
19
28
|
|
|
20
|
-
|
|
21
|
-
@
|
|
29
|
+
```css
|
|
30
|
+
@use 'node_modules/pn-design-assets/pn-assets/styles/_pn-typography';
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Color variables
|
|
34
|
+
|
|
35
|
+
Our color palette, [you can get an overview of our colors in Storybook](https://portal.postnord.com/web-components/?path=/docs/components-design-tokens-colors--docs).
|
|
36
|
+
|
|
37
|
+
```css
|
|
38
|
+
@use 'node_modules/pn-design-assets/pn-assets/styles/_pn-colors' as *;
|
|
39
|
+
.class {
|
|
40
|
+
color: $blue900;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@use 'node_modules/pn-design-assets/pn-assets/styles/_pn-colors';
|
|
44
|
+
.class {
|
|
45
|
+
color: pn-colors.$blue900;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@use 'node_modules/pn-design-assets/pn-assets/styles/_pn-colors' as
|
|
49
|
+
my-custom-name;
|
|
50
|
+
.class {
|
|
51
|
+
color: my-custom-name.$blue900;
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Import all at once
|
|
56
|
+
|
|
57
|
+
You can import all of our CSS and SCSS files in one go.
|
|
58
|
+
|
|
59
|
+
```css
|
|
60
|
+
@use 'node_modules/pn-design-assets/pn-assets/styles/pn-styles';
|
|
22
61
|
```
|
|
23
62
|
|
|
24
|
-
|
|
63
|
+
## SVG & colors assets
|
|
25
64
|
|
|
26
65
|
You can import our SVG icons and illustrations from this repo. The raw SVG files can be found in `pn-design-assets/pn-assets/illustrations/circle/` and `pn-design-assets/pn-assets/icons/`.
|
|
27
|
-
We have
|
|
66
|
+
We have provided typed exports of all SVG content with declaration typescript maps.
|
|
28
67
|
|
|
29
|
-
|
|
68
|
+
### Icons
|
|
30
69
|
|
|
31
70
|
All icons are exported from `pn-design-assets/pn-assets/icons.js` file, we also provide a camelCase version named `iconsCamel.js`
|
|
32
71
|
|
|
@@ -40,7 +79,7 @@ import {
|
|
|
40
79
|
} from 'pn-design-assets/pn-assets/icons/arrow_right'
|
|
41
80
|
```
|
|
42
81
|
|
|
43
|
-
|
|
82
|
+
### Flags
|
|
44
83
|
|
|
45
84
|
All flags are exported from `pn-design-assets/pn-assets/flags.js` file, we also provide a camelCase version named `flagsCamel.js`
|
|
46
85
|
|
|
@@ -51,7 +90,7 @@ import { seFlag } from 'pn-design-assets/pn-assets/flagsCamel'
|
|
|
51
90
|
import { se_flag, seFlag } from 'pn-design-assets/pn-assets/flags/se_flag'
|
|
52
91
|
```
|
|
53
92
|
|
|
54
|
-
|
|
93
|
+
### Illustrations
|
|
55
94
|
|
|
56
95
|
All illustrations are exported from `pn-design-assets/pn-assets/illustrations.js` file, we also provide a camelCase version named `illustrationsCamel.js`
|
|
57
96
|
|
|
@@ -65,7 +104,7 @@ import {
|
|
|
65
104
|
} from 'pn-design-assets/pn-assets/flags/company_settings'
|
|
66
105
|
```
|
|
67
106
|
|
|
68
|
-
|
|
107
|
+
### Colors
|
|
69
108
|
|
|
70
109
|
We have all of our colors in the SCSS files mentioned above, but sometimes you need them in your javascript code.
|
|
71
110
|
|
|
@@ -73,7 +112,7 @@ We have all of our colors in the SCSS files mentioned above, but sometimes you n
|
|
|
73
112
|
import { blue700 } from 'pn-design-assets/pn-assets/colors'
|
|
74
113
|
```
|
|
75
114
|
|
|
76
|
-
|
|
115
|
+
## Typography classes
|
|
77
116
|
|
|
78
117
|
| Class | Desktop/Mobile | Line height | Element |
|
|
79
118
|
| ------ | -------------- | ----------- | ------------ |
|
|
@@ -85,7 +124,7 @@ import { blue700 } from 'pn-design-assets/pn-assets/colors'
|
|
|
85
124
|
| pn-xs | 14px / 14px | 1.5 | |
|
|
86
125
|
| pn-2xs | 12px / 12px | 1.5 | `<small>` |
|
|
87
126
|
|
|
88
|
-
|
|
127
|
+
## Optimize SCSS in your application
|
|
89
128
|
|
|
90
129
|
Many build tools allow you to append SCSS variables that are exposed to to all your SCSS files/components.
|
|
91
130
|
Make sure you only import `_pn-colors.scss`, as it is the only one containing our SCSS variables.
|