@rocket.chat/fuselage-tokens 0.29.0 → 0.31.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020 Rocket.Chat
3
+ Copyright (c) 2021 Rocket.Chat
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
  ---
14
14
 
15
- ![npm@latest](https://img.shields.io/npm/v/@rocket.chat/fuselage-tokens/latest?style=flat-square) ![npm@next](https://img.shields.io/npm/v/@rocket.chat/fuselage-tokens/next?style=flat-square) ![npm downloads](https://img.shields.io/npm/dw/@rocket.chat/fuselage-tokens?style=flat-square) ![License: MIT](https://img.shields.io/npm/l/@rocket.chat/fuselage-tokens?style=flat-square)
15
+ [![npm@latest](https://img.shields.io/npm/v/@rocket.chat/fuselage-tokens/latest?style=flat-square)](https://www.npmjs.com/package/@rocket.chat/icons/v/latest) [![npm@next](https://img.shields.io/npm/v/@rocket.chat/fuselage-tokens/next?style=flat-square)](https://www.npmjs.com/package/@rocket.chat/icons/v/next) ![npm downloads](https://img.shields.io/npm/dw/@rocket.chat/fuselage-tokens?style=flat-square) ![License: MIT](https://img.shields.io/npm/l/@rocket.chat/fuselage-tokens?style=flat-square)
16
16
 
17
17
  ![deps](https://img.shields.io/david/RocketChat/Rocket.Chat.Fuselage?path=packages%2Ffuselage-tokens&style=flat-square) ![peer deps](https://img.shields.io/david/peer/RocketChat/Rocket.Chat.Fuselage?path=packages%2Ffuselage-tokens&style=flat-square) ![dev deps](https://img.shields.io/david/dev/RocketChat/Rocket.Chat.Fuselage?path=packages%2Ffuselage-tokens&style=flat-square) ![npm bundle size](https://img.shields.io/bundlephobia/min/@rocket.chat/fuselage-tokens?style=flat-square)
18
18
 
@@ -70,10 +70,10 @@ yarn lint
70
70
 
71
71
  Some linter warnings and errors can be automatically fixed:
72
72
 
73
- <!--yarn(lint-fix)-->
73
+ <!--yarn(lint-and-fix)-->
74
74
 
75
75
  ```sh
76
- yarn lint-fix
76
+ yarn lint-and-fix
77
77
  ```
78
78
 
79
- <!--/yarn(lint-fix)-->
79
+ <!--/yarn(lint-and-fix)-->
package/breakpoints.js CHANGED
@@ -1,11 +1,46 @@
1
1
  'use strict';
2
2
 
3
3
  module.exports = {
4
- xs: { name: 'xs', minViewportWidth: null, columns: 4, gutterWidth: 16 },
5
- sm: { name: 'sm', minViewportWidth: 600, columns: 8, gutterWidth: 16 },
6
- md: { name: 'md', minViewportWidth: 768, columns: 8, gutterWidth: 24 },
7
- lg: { name: 'lg', minViewportWidth: 1024, columns: 12, gutterWidth: 24 },
8
- xl: { name: 'xl', minViewportWidth: 1280, columns: 12, gutterWidth: 24 },
9
- xxl: { name: 'xxl', minViewportWidth: 1600, columns: 12, gutterWidth: 24 },
10
- xxxl: { name: 'xxxl', minViewportWidth: 1920, columns: 12, gutterWidth: 24 },
4
+ xs: {
5
+ name: 'xs',
6
+ minViewportWidth: null,
7
+ columns: 4,
8
+ gutterWidth: 16,
9
+ },
10
+ sm: {
11
+ name: 'sm',
12
+ minViewportWidth: 600,
13
+ columns: 8,
14
+ gutterWidth: 16,
15
+ },
16
+ md: {
17
+ name: 'md',
18
+ minViewportWidth: 768,
19
+ columns: 8,
20
+ gutterWidth: 24,
21
+ },
22
+ lg: {
23
+ name: 'lg',
24
+ minViewportWidth: 1024,
25
+ columns: 12,
26
+ gutterWidth: 24,
27
+ },
28
+ xl: {
29
+ name: 'xl',
30
+ minViewportWidth: 1280,
31
+ columns: 12,
32
+ gutterWidth: 24,
33
+ },
34
+ xxl: {
35
+ name: 'xxl',
36
+ minViewportWidth: 1600,
37
+ columns: 12,
38
+ gutterWidth: 24,
39
+ },
40
+ xxxl: {
41
+ name: 'xxxl',
42
+ minViewportWidth: 1920,
43
+ columns: 12,
44
+ gutterWidth: 24,
45
+ },
11
46
  };
package/breakpoints.mjs CHANGED
@@ -1,9 +1,44 @@
1
1
  export default {
2
- xs: { name: 'xs', minViewportWidth: null, columns: 4, gutterWidth: 16 },
3
- sm: { name: 'sm', minViewportWidth: 600, columns: 8, gutterWidth: 16 },
4
- md: { name: 'md', minViewportWidth: 768, columns: 8, gutterWidth: 24 },
5
- lg: { name: 'lg', minViewportWidth: 1024, columns: 12, gutterWidth: 24 },
6
- xl: { name: 'xl', minViewportWidth: 1280, columns: 12, gutterWidth: 24 },
7
- xxl: { name: 'xxl', minViewportWidth: 1600, columns: 12, gutterWidth: 24 },
8
- xxxl: { name: 'xxxl', minViewportWidth: 1920, columns: 12, gutterWidth: 24 },
2
+ xs: {
3
+ name: 'xs',
4
+ minViewportWidth: null,
5
+ columns: 4,
6
+ gutterWidth: 16,
7
+ },
8
+ sm: {
9
+ name: 'sm',
10
+ minViewportWidth: 600,
11
+ columns: 8,
12
+ gutterWidth: 16,
13
+ },
14
+ md: {
15
+ name: 'md',
16
+ minViewportWidth: 768,
17
+ columns: 8,
18
+ gutterWidth: 24,
19
+ },
20
+ lg: {
21
+ name: 'lg',
22
+ minViewportWidth: 1024,
23
+ columns: 12,
24
+ gutterWidth: 24,
25
+ },
26
+ xl: {
27
+ name: 'xl',
28
+ minViewportWidth: 1280,
29
+ columns: 12,
30
+ gutterWidth: 24,
31
+ },
32
+ xxl: {
33
+ name: 'xxl',
34
+ minViewportWidth: 1600,
35
+ columns: 12,
36
+ gutterWidth: 24,
37
+ },
38
+ xxxl: {
39
+ name: 'xxxl',
40
+ minViewportWidth: 1920,
41
+ columns: 12,
42
+ gutterWidth: 24,
43
+ },
9
44
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rocket.chat/fuselage-tokens",
3
- "version": "0.29.0",
3
+ "version": "0.31.0",
4
4
  "description": "Design tokens for Fuselage, Rocket.Chat's design system",
5
5
  "homepage": "https://rocketchat.github.io/Rocket.Chat.Fuselage/",
6
6
  "author": {
@@ -31,25 +31,27 @@
31
31
  "access": "public"
32
32
  },
33
33
  "scripts": {
34
- "build": "node scripts/build.js",
35
- "lint": "run-s .:lint:eslint .:lint:prettier",
36
- ".:lint:eslint": "eslint .",
37
- ".:lint:prettier": "prettier --check '**/*.{json,scss}'",
38
- "lint-fix": "run-s .:lint-fix:eslint .:lint-fix:prettier",
39
- ".:lint-fix:eslint": "eslint --fix .",
40
- ".:lint-fix:prettier": "prettier --write '**/*.{json,scss}'",
34
+ "build": "build-design-tokens",
35
+ "lint": "lint",
36
+ "lint-and-fix": "lint-and-fix",
41
37
  "lint-staged": "lint-staged"
42
38
  },
43
39
  "devDependencies": {
44
- "@rocket.chat/eslint-config-alt": "^0.29.0",
45
- "@rocket.chat/prettier-config": "^0.29.0",
46
- "eslint": "^7.29.0",
40
+ "@rocket.chat/eslint-config-alt": "^0.31.0",
41
+ "@rocket.chat/prettier-config": "^0.31.0",
42
+ "build-design-tokens": "^0.31.0",
43
+ "eslint": "^8.2.0",
47
44
  "eslint-config-prettier": "^8.3.0",
48
- "eslint-plugin-import": "^2.23.4",
49
- "eslint-plugin-prettier": "^3.4.0",
50
- "lint-staged": "^11.0.0",
45
+ "eslint-plugin-import": "^2.25.3",
46
+ "eslint-plugin-prettier": "^4.0.0",
47
+ "lint-all": "^0.31.0",
48
+ "lint-staged": "^11.2.6",
51
49
  "npm-run-all": "^4.1.5",
52
- "prettier": "^2.3.2"
50
+ "prettier": "^2.3.2",
51
+ "stylelint": "^13.13.1",
52
+ "stylelint-order": "^4.1.0",
53
+ "stylelint-prettier": "^1.2.0",
54
+ "stylelint-scss": "^3.21.0"
53
55
  },
54
- "gitHead": "7ee36639c794c70637ac1133469aea61594f16e9"
56
+ "gitHead": "7b970add494a221cf09c22389f514fd19bdf7808"
55
57
  }
package/typography.js CHANGED
@@ -29,17 +29,94 @@ module.exports = {
29
29
  ],
30
30
  },
31
31
  fontScales: {
32
- h1: { fontSize: 22, fontWeight: 400, letterSpacing: 0, lineHeight: 32 },
33
- s1: { fontSize: 16, fontWeight: 400, letterSpacing: 0, lineHeight: 22 },
34
- s2: { fontSize: 16, fontWeight: 500, letterSpacing: 0, lineHeight: 22 },
35
- p1: { fontSize: 14, fontWeight: 400, letterSpacing: 0, lineHeight: 20 },
36
- p2: { fontSize: 14, fontWeight: 500, letterSpacing: 0, lineHeight: 20 },
37
- c1: { fontSize: 12, fontWeight: 400, letterSpacing: 0, lineHeight: 16 },
38
- c2: { fontSize: 12, fontWeight: 600, letterSpacing: 0, lineHeight: 16 },
32
+ hero: {
33
+ fontSize: 48,
34
+ fontWeight: 800,
35
+ letterSpacing: 0,
36
+ lineHeight: 64,
37
+ },
38
+ h1: {
39
+ fontSize: 32,
40
+ fontWeight: 700,
41
+ letterSpacing: 0,
42
+ lineHeight: 40,
43
+ },
44
+ h2: {
45
+ fontSize: 24,
46
+ fontWeight: 700,
47
+ letterSpacing: 0,
48
+ lineHeight: 32,
49
+ },
50
+ h3: {
51
+ fontSize: 20,
52
+ fontWeight: 700,
53
+ letterSpacing: 0,
54
+ lineHeight: 28,
55
+ },
56
+ h4: {
57
+ fontSize: 16,
58
+ fontWeight: 700,
59
+ letterSpacing: 0,
60
+ lineHeight: 24,
61
+ },
62
+ h5: {
63
+ fontSize: 14,
64
+ fontWeight: 700,
65
+ letterSpacing: 0,
66
+ lineHeight: 20,
67
+ },
68
+ p1: {
69
+ fontSize: 16,
70
+ fontWeight: 400,
71
+ letterSpacing: 0,
72
+ lineHeight: 24,
73
+ },
74
+ p1m: {
75
+ fontSize: 16,
76
+ fontWeight: 500,
77
+ letterSpacing: 0,
78
+ lineHeight: 24,
79
+ },
80
+ p1b: {
81
+ fontSize: 16,
82
+ fontWeight: 700,
83
+ letterSpacing: 0,
84
+ lineHeight: 24,
85
+ },
86
+ p2: {
87
+ fontSize: 14,
88
+ fontWeight: 400,
89
+ letterSpacing: 0,
90
+ lineHeight: 20,
91
+ },
92
+ p2m: {
93
+ fontSize: 14,
94
+ fontWeight: 500,
95
+ letterSpacing: 0,
96
+ lineHeight: 20,
97
+ },
98
+ p2b: {
99
+ fontSize: 14,
100
+ fontWeight: 700,
101
+ letterSpacing: 0,
102
+ lineHeight: 20,
103
+ },
104
+ c1: {
105
+ fontSize: 12,
106
+ fontWeight: 400,
107
+ letterSpacing: 0,
108
+ lineHeight: 16,
109
+ },
110
+ c2: {
111
+ fontSize: 12,
112
+ fontWeight: 700,
113
+ letterSpacing: 0,
114
+ lineHeight: 16,
115
+ },
39
116
  micro: {
40
117
  fontSize: 10,
41
- fontWeight: 600,
42
- letterSpacing: 0.2,
118
+ fontWeight: 700,
119
+ letterSpacing: 0,
43
120
  lineHeight: 12,
44
121
  },
45
122
  },
package/typography.json CHANGED
@@ -27,36 +27,78 @@
27
27
  ]
28
28
  },
29
29
  "fontScales": {
30
+ "hero": {
31
+ "fontSize": 48,
32
+ "fontWeight": 800,
33
+ "letterSpacing": 0,
34
+ "lineHeight": 64
35
+ },
30
36
  "h1": {
31
- "fontSize": 22,
32
- "fontWeight": 400,
37
+ "fontSize": 32,
38
+ "fontWeight": 700,
39
+ "letterSpacing": 0,
40
+ "lineHeight": 40
41
+ },
42
+ "h2": {
43
+ "fontSize": 24,
44
+ "fontWeight": 700,
33
45
  "letterSpacing": 0,
34
46
  "lineHeight": 32
35
47
  },
36
- "s1": {
48
+ "h3": {
49
+ "fontSize": 20,
50
+ "fontWeight": 700,
51
+ "letterSpacing": 0,
52
+ "lineHeight": 28
53
+ },
54
+ "h4": {
55
+ "fontSize": 16,
56
+ "fontWeight": 700,
57
+ "letterSpacing": 0,
58
+ "lineHeight": 24
59
+ },
60
+ "h5": {
61
+ "fontSize": 14,
62
+ "fontWeight": 700,
63
+ "letterSpacing": 0,
64
+ "lineHeight": 20
65
+ },
66
+ "p1": {
37
67
  "fontSize": 16,
38
68
  "fontWeight": 400,
39
69
  "letterSpacing": 0,
40
- "lineHeight": 22
70
+ "lineHeight": 24
41
71
  },
42
- "s2": {
72
+ "p1m": {
43
73
  "fontSize": 16,
44
74
  "fontWeight": 500,
45
75
  "letterSpacing": 0,
46
- "lineHeight": 22
76
+ "lineHeight": 24
47
77
  },
48
- "p1": {
78
+ "p1b": {
79
+ "fontSize": 16,
80
+ "fontWeight": 700,
81
+ "letterSpacing": 0,
82
+ "lineHeight": 24
83
+ },
84
+ "p2": {
49
85
  "fontSize": 14,
50
86
  "fontWeight": 400,
51
87
  "letterSpacing": 0,
52
88
  "lineHeight": 20
53
89
  },
54
- "p2": {
90
+ "p2m": {
55
91
  "fontSize": 14,
56
92
  "fontWeight": 500,
57
93
  "letterSpacing": 0,
58
94
  "lineHeight": 20
59
95
  },
96
+ "p2b": {
97
+ "fontSize": 14,
98
+ "fontWeight": 700,
99
+ "letterSpacing": 0,
100
+ "lineHeight": 20
101
+ },
60
102
  "c1": {
61
103
  "fontSize": 12,
62
104
  "fontWeight": 400,
@@ -65,14 +107,14 @@
65
107
  },
66
108
  "c2": {
67
109
  "fontSize": 12,
68
- "fontWeight": 600,
110
+ "fontWeight": 700,
69
111
  "letterSpacing": 0,
70
112
  "lineHeight": 16
71
113
  },
72
114
  "micro": {
73
115
  "fontSize": 10,
74
- "fontWeight": 600,
75
- "letterSpacing": 0.2,
116
+ "fontWeight": 700,
117
+ "letterSpacing": 0,
76
118
  "lineHeight": 12
77
119
  }
78
120
  }
package/typography.mjs CHANGED
@@ -27,17 +27,94 @@ export default {
27
27
  ],
28
28
  },
29
29
  fontScales: {
30
- h1: { fontSize: 22, fontWeight: 400, letterSpacing: 0, lineHeight: 32 },
31
- s1: { fontSize: 16, fontWeight: 400, letterSpacing: 0, lineHeight: 22 },
32
- s2: { fontSize: 16, fontWeight: 500, letterSpacing: 0, lineHeight: 22 },
33
- p1: { fontSize: 14, fontWeight: 400, letterSpacing: 0, lineHeight: 20 },
34
- p2: { fontSize: 14, fontWeight: 500, letterSpacing: 0, lineHeight: 20 },
35
- c1: { fontSize: 12, fontWeight: 400, letterSpacing: 0, lineHeight: 16 },
36
- c2: { fontSize: 12, fontWeight: 600, letterSpacing: 0, lineHeight: 16 },
30
+ hero: {
31
+ fontSize: 48,
32
+ fontWeight: 800,
33
+ letterSpacing: 0,
34
+ lineHeight: 64,
35
+ },
36
+ h1: {
37
+ fontSize: 32,
38
+ fontWeight: 700,
39
+ letterSpacing: 0,
40
+ lineHeight: 40,
41
+ },
42
+ h2: {
43
+ fontSize: 24,
44
+ fontWeight: 700,
45
+ letterSpacing: 0,
46
+ lineHeight: 32,
47
+ },
48
+ h3: {
49
+ fontSize: 20,
50
+ fontWeight: 700,
51
+ letterSpacing: 0,
52
+ lineHeight: 28,
53
+ },
54
+ h4: {
55
+ fontSize: 16,
56
+ fontWeight: 700,
57
+ letterSpacing: 0,
58
+ lineHeight: 24,
59
+ },
60
+ h5: {
61
+ fontSize: 14,
62
+ fontWeight: 700,
63
+ letterSpacing: 0,
64
+ lineHeight: 20,
65
+ },
66
+ p1: {
67
+ fontSize: 16,
68
+ fontWeight: 400,
69
+ letterSpacing: 0,
70
+ lineHeight: 24,
71
+ },
72
+ p1m: {
73
+ fontSize: 16,
74
+ fontWeight: 500,
75
+ letterSpacing: 0,
76
+ lineHeight: 24,
77
+ },
78
+ p1b: {
79
+ fontSize: 16,
80
+ fontWeight: 700,
81
+ letterSpacing: 0,
82
+ lineHeight: 24,
83
+ },
84
+ p2: {
85
+ fontSize: 14,
86
+ fontWeight: 400,
87
+ letterSpacing: 0,
88
+ lineHeight: 20,
89
+ },
90
+ p2m: {
91
+ fontSize: 14,
92
+ fontWeight: 500,
93
+ letterSpacing: 0,
94
+ lineHeight: 20,
95
+ },
96
+ p2b: {
97
+ fontSize: 14,
98
+ fontWeight: 700,
99
+ letterSpacing: 0,
100
+ lineHeight: 20,
101
+ },
102
+ c1: {
103
+ fontSize: 12,
104
+ fontWeight: 400,
105
+ letterSpacing: 0,
106
+ lineHeight: 16,
107
+ },
108
+ c2: {
109
+ fontSize: 12,
110
+ fontWeight: 700,
111
+ letterSpacing: 0,
112
+ lineHeight: 16,
113
+ },
37
114
  micro: {
38
115
  fontSize: 10,
39
- fontWeight: 600,
40
- letterSpacing: 0.2,
116
+ fontWeight: 700,
117
+ letterSpacing: 0,
41
118
  lineHeight: 12,
42
119
  },
43
120
  },
package/typography.scss CHANGED
@@ -26,36 +26,78 @@ $font-families: (
26
26
  ),
27
27
  );
28
28
  $font-scales: (
29
+ hero: (
30
+ font-size: 48,
31
+ font-weight: 800,
32
+ letter-spacing: 0,
33
+ line-height: 64,
34
+ ),
29
35
  h1: (
30
- font-size: 22,
31
- font-weight: 400,
36
+ font-size: 32,
37
+ font-weight: 700,
38
+ letter-spacing: 0,
39
+ line-height: 40,
40
+ ),
41
+ h2: (
42
+ font-size: 24,
43
+ font-weight: 700,
32
44
  letter-spacing: 0,
33
45
  line-height: 32,
34
46
  ),
35
- s1: (
47
+ h3: (
48
+ font-size: 20,
49
+ font-weight: 700,
50
+ letter-spacing: 0,
51
+ line-height: 28,
52
+ ),
53
+ h4: (
54
+ font-size: 16,
55
+ font-weight: 700,
56
+ letter-spacing: 0,
57
+ line-height: 24,
58
+ ),
59
+ h5: (
60
+ font-size: 14,
61
+ font-weight: 700,
62
+ letter-spacing: 0,
63
+ line-height: 20,
64
+ ),
65
+ p1: (
36
66
  font-size: 16,
37
67
  font-weight: 400,
38
68
  letter-spacing: 0,
39
- line-height: 22,
69
+ line-height: 24,
40
70
  ),
41
- s2: (
71
+ p1m: (
42
72
  font-size: 16,
43
73
  font-weight: 500,
44
74
  letter-spacing: 0,
45
- line-height: 22,
75
+ line-height: 24,
46
76
  ),
47
- p1: (
77
+ p1b: (
78
+ font-size: 16,
79
+ font-weight: 700,
80
+ letter-spacing: 0,
81
+ line-height: 24,
82
+ ),
83
+ p2: (
48
84
  font-size: 14,
49
85
  font-weight: 400,
50
86
  letter-spacing: 0,
51
87
  line-height: 20,
52
88
  ),
53
- p2: (
89
+ p2m: (
54
90
  font-size: 14,
55
91
  font-weight: 500,
56
92
  letter-spacing: 0,
57
93
  line-height: 20,
58
94
  ),
95
+ p2b: (
96
+ font-size: 14,
97
+ font-weight: 700,
98
+ letter-spacing: 0,
99
+ line-height: 20,
100
+ ),
59
101
  c1: (
60
102
  font-size: 12,
61
103
  font-weight: 400,
@@ -64,14 +106,14 @@ $font-scales: (
64
106
  ),
65
107
  c2: (
66
108
  font-size: 12,
67
- font-weight: 600,
109
+ font-weight: 700,
68
110
  letter-spacing: 0,
69
111
  line-height: 16,
70
112
  ),
71
113
  micro: (
72
114
  font-size: 10,
73
- font-weight: 600,
74
- letter-spacing: 0.2,
115
+ font-weight: 700,
116
+ letter-spacing: 0,
75
117
  line-height: 12,
76
118
  ),
77
119
  );