@volue/design-typography 0.1.0-next.3 → 0.2.0-next.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.
@@ -7,53 +7,69 @@ declare const tokens: {
7
7
  "mono": "ui-monospace, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace"
8
8
  },
9
9
  "style": {
10
- "base": {
11
- "fontFamily": "'Source Sans Pro', system-ui, -apple-system, 'Segoe UI'",
12
- "fontSize": "16px",
13
- "lineHeight": number,
14
- "fontWeight": "400"
10
+ "body": {
11
+ "base": {
12
+ "fontFamily": "'Source Sans Pro', system-ui, -apple-system, 'Segoe UI'",
13
+ "fontSize": "16px",
14
+ "lineHeight": "1.5rem",
15
+ "fontWeight": "400"
16
+ },
17
+ "small": {
18
+ "fontFamily": "'Source Sans Pro', system-ui, -apple-system, 'Segoe UI'",
19
+ "fontSize": "14px",
20
+ "lineHeight": "1.25rem",
21
+ "fontWeight": "400"
22
+ },
23
+ "xsmall": {
24
+ "fontFamily": "'Source Sans Pro', system-ui, -apple-system, 'Segoe UI'",
25
+ "fontSize": "12px",
26
+ "lineHeight": "1.125rem",
27
+ "fontWeight": "400"
28
+ }
15
29
  },
16
- "giga": {
17
- "fontFamily": "'FK Display', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif",
18
- "fontSize": "51px",
19
- "lineHeight": number,
20
- "fontWeight": "400"
21
- },
22
- "alpha": {
23
- "fontFamily": "'FK Display', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif",
24
- "fontSize": "38px",
25
- "lineHeight": number,
26
- "fontWeight": "400"
27
- },
28
- "beta": {
29
- "fontFamily": "'FK Display', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif",
30
- "fontSize": "28px",
31
- "lineHeight": number,
32
- "fontWeight": "400"
33
- },
34
- "gamma": {
35
- "fontFamily": "'FK Display', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif",
36
- "fontSize": "21px",
37
- "lineHeight": number,
38
- "fontWeight": "400"
39
- },
40
- "delta": {
41
- "fontFamily": "'Source Sans Pro', system-ui, -apple-system, 'Segoe UI'",
42
- "fontSize": "19px",
43
- "lineHeight": number,
44
- "fontWeight": "400"
45
- },
46
- "epsilon": {
47
- "fontFamily": "'Source Sans Pro', system-ui, -apple-system, 'Segoe UI'",
48
- "fontSize": "16px",
49
- "lineHeight": number,
50
- "fontWeight": "400"
51
- },
52
- "zeta": {
53
- "fontFamily": "'Source Sans Pro', system-ui, -apple-system, 'Segoe UI'",
54
- "fontSize": "14px",
55
- "lineHeight": number,
56
- "fontWeight": "400"
30
+ "headlines": {
31
+ "giga": {
32
+ "fontFamily": "'FK Display', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif",
33
+ "fontSize": "51px",
34
+ "lineHeight": number,
35
+ "fontWeight": "400"
36
+ },
37
+ "alpha": {
38
+ "fontFamily": "'FK Display', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif",
39
+ "fontSize": "38px",
40
+ "lineHeight": number,
41
+ "fontWeight": "400"
42
+ },
43
+ "beta": {
44
+ "fontFamily": "'FK Display', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif",
45
+ "fontSize": "28px",
46
+ "lineHeight": number,
47
+ "fontWeight": "400"
48
+ },
49
+ "gamma": {
50
+ "fontFamily": "'FK Display', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif",
51
+ "fontSize": "21px",
52
+ "lineHeight": number,
53
+ "fontWeight": "400"
54
+ },
55
+ "delta": {
56
+ "fontFamily": "'Source Sans Pro', system-ui, -apple-system, 'Segoe UI'",
57
+ "fontSize": "19px",
58
+ "lineHeight": number,
59
+ "fontWeight": "400"
60
+ },
61
+ "epsilon": {
62
+ "fontFamily": "'Source Sans Pro', system-ui, -apple-system, 'Segoe UI'",
63
+ "fontSize": "16px",
64
+ "lineHeight": number,
65
+ "fontWeight": "400"
66
+ },
67
+ "zeta": {
68
+ "fontFamily": "'Source Sans Pro', system-ui, -apple-system, 'Segoe UI'",
69
+ "fontSize": "14px",
70
+ "lineHeight": number,
71
+ "fontWeight": "400"
72
+ }
57
73
  }
58
74
  },
59
75
  "weight": {
@@ -64,6 +80,8 @@ declare const tokens: {
64
80
  "size": {
65
81
  "font": {
66
82
  "base": "16px",
83
+ "small": "14px",
84
+ "xsmall": "12px",
67
85
  "zeta": "14px",
68
86
  "epsilon": "16px",
69
87
  "delta": "19px",
@@ -81,9 +99,12 @@ declare const tokens: {
81
99
  "widest": "0.1em"
82
100
  },
83
101
  "lineHeight": {
84
- "base": "24px",
85
102
  "none": number,
86
- "default": number,
103
+ "body": number,
104
+ "default": "24px",
105
+ "base": "1.5rem",
106
+ "small": "1.25rem",
107
+ "xsmall": "1.125rem",
87
108
  "zeta": number,
88
109
  "epsilon": number,
89
110
  "delta": number,
@@ -6,53 +6,69 @@ export default {
6
6
  "mono": "ui-monospace, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace"
7
7
  },
8
8
  "style": {
9
- "base": {
10
- "fontFamily": "'Source Sans Pro', system-ui, -apple-system, 'Segoe UI'",
11
- "fontSize": "16px",
12
- "lineHeight": 1.5,
13
- "fontWeight": "400"
9
+ "body": {
10
+ "base": {
11
+ "fontFamily": "'Source Sans Pro', system-ui, -apple-system, 'Segoe UI'",
12
+ "fontSize": "16px",
13
+ "lineHeight": "1.5rem",
14
+ "fontWeight": "400"
15
+ },
16
+ "small": {
17
+ "fontFamily": "'Source Sans Pro', system-ui, -apple-system, 'Segoe UI'",
18
+ "fontSize": "14px",
19
+ "lineHeight": "1.25rem",
20
+ "fontWeight": "400"
21
+ },
22
+ "xsmall": {
23
+ "fontFamily": "'Source Sans Pro', system-ui, -apple-system, 'Segoe UI'",
24
+ "fontSize": "12px",
25
+ "lineHeight": "1.125rem",
26
+ "fontWeight": "400"
27
+ }
14
28
  },
15
- "giga": {
16
- "fontFamily": "'FK Display', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif",
17
- "fontSize": "51px",
18
- "lineHeight": 1.4117647059,
19
- "fontWeight": "400"
20
- },
21
- "alpha": {
22
- "fontFamily": "'FK Display', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif",
23
- "fontSize": "38px",
24
- "lineHeight": 1.2631578947,
25
- "fontWeight": "400"
26
- },
27
- "beta": {
28
- "fontFamily": "'FK Display', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif",
29
- "fontSize": "28px",
30
- "lineHeight": 1.7142857143,
31
- "fontWeight": "400"
32
- },
33
- "gamma": {
34
- "fontFamily": "'FK Display', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif",
35
- "fontSize": "21px",
36
- "lineHeight": 1.5238095238,
37
- "fontWeight": "400"
38
- },
39
- "delta": {
40
- "fontFamily": "'Source Sans Pro', system-ui, -apple-system, 'Segoe UI'",
41
- "fontSize": "19px",
42
- "lineHeight": 1.2631578947,
43
- "fontWeight": "400"
44
- },
45
- "epsilon": {
46
- "fontFamily": "'Source Sans Pro', system-ui, -apple-system, 'Segoe UI'",
47
- "fontSize": "16px",
48
- "lineHeight": 1.5,
49
- "fontWeight": "400"
50
- },
51
- "zeta": {
52
- "fontFamily": "'Source Sans Pro', system-ui, -apple-system, 'Segoe UI'",
53
- "fontSize": "14px",
54
- "lineHeight": 1.7142857143,
55
- "fontWeight": "400"
29
+ "headlines": {
30
+ "giga": {
31
+ "fontFamily": "'FK Display', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif",
32
+ "fontSize": "51px",
33
+ "lineHeight": 1.4117647059,
34
+ "fontWeight": "400"
35
+ },
36
+ "alpha": {
37
+ "fontFamily": "'FK Display', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif",
38
+ "fontSize": "38px",
39
+ "lineHeight": 1.2631578947,
40
+ "fontWeight": "400"
41
+ },
42
+ "beta": {
43
+ "fontFamily": "'FK Display', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif",
44
+ "fontSize": "28px",
45
+ "lineHeight": 1.7142857143,
46
+ "fontWeight": "400"
47
+ },
48
+ "gamma": {
49
+ "fontFamily": "'FK Display', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif",
50
+ "fontSize": "21px",
51
+ "lineHeight": 1.5238095238,
52
+ "fontWeight": "400"
53
+ },
54
+ "delta": {
55
+ "fontFamily": "'Source Sans Pro', system-ui, -apple-system, 'Segoe UI'",
56
+ "fontSize": "19px",
57
+ "lineHeight": 1.2631578947,
58
+ "fontWeight": "400"
59
+ },
60
+ "epsilon": {
61
+ "fontFamily": "'Source Sans Pro', system-ui, -apple-system, 'Segoe UI'",
62
+ "fontSize": "16px",
63
+ "lineHeight": 1.5,
64
+ "fontWeight": "400"
65
+ },
66
+ "zeta": {
67
+ "fontFamily": "'Source Sans Pro', system-ui, -apple-system, 'Segoe UI'",
68
+ "fontSize": "14px",
69
+ "lineHeight": 1.7142857143,
70
+ "fontWeight": "400"
71
+ }
56
72
  }
57
73
  },
58
74
  "weight": {
@@ -63,6 +79,8 @@ export default {
63
79
  "size": {
64
80
  "font": {
65
81
  "base": "16px",
82
+ "small": "14px",
83
+ "xsmall": "12px",
66
84
  "zeta": "14px",
67
85
  "epsilon": "16px",
68
86
  "delta": "19px",
@@ -80,9 +98,12 @@ export default {
80
98
  "widest": "0.1em"
81
99
  },
82
100
  "lineHeight": {
83
- "base": "24px",
84
101
  "none": 1,
85
- "default": 1.5,
102
+ "body": 1.5,
103
+ "default": "24px",
104
+ "base": "1.5rem",
105
+ "small": "1.25rem",
106
+ "xsmall": "1.125rem",
86
107
  "zeta": 1.7142857143,
87
108
  "epsilon": 1.5,
88
109
  "delta": 1.2631578947,
package/dist/index.scss CHANGED
@@ -1,45 +1,55 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Tue, 28 Feb 2023 12:46:29 GMT
3
+ // Generated on Mon, 03 Apr 2023 08:11:38 GMT
4
4
 
5
5
  $font-family-base: 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI';
6
6
  $font-family-display: 'FK Display', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
7
7
  $font-family-mono: ui-monospace, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
8
- $font-style-base-font-family: 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI';
9
- $font-style-base-font-size: 16px;
10
- $font-style-base-line-height: 1.5;
11
- $font-style-base-font-weight: 400;
12
- $font-style-giga-font-family: 'FK Display', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
13
- $font-style-giga-font-size: 51px;
14
- $font-style-giga-line-height: 1.4117647059;
15
- $font-style-giga-font-weight: 400;
16
- $font-style-alpha-font-family: 'FK Display', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
17
- $font-style-alpha-font-size: 38px;
18
- $font-style-alpha-line-height: 1.2631578947;
19
- $font-style-alpha-font-weight: 400;
20
- $font-style-beta-font-family: 'FK Display', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
21
- $font-style-beta-font-size: 28px;
22
- $font-style-beta-line-height: 1.7142857143;
23
- $font-style-beta-font-weight: 400;
24
- $font-style-gamma-font-family: 'FK Display', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
25
- $font-style-gamma-font-size: 21px;
26
- $font-style-gamma-line-height: 1.5238095238;
27
- $font-style-gamma-font-weight: 400;
28
- $font-style-delta-font-family: 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI';
29
- $font-style-delta-font-size: 19px;
30
- $font-style-delta-line-height: 1.2631578947;
31
- $font-style-delta-font-weight: 400;
32
- $font-style-epsilon-font-family: 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI';
33
- $font-style-epsilon-font-size: 16px;
34
- $font-style-epsilon-line-height: 1.5;
35
- $font-style-epsilon-font-weight: 400;
36
- $font-style-zeta-font-family: 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI';
37
- $font-style-zeta-font-size: 14px;
38
- $font-style-zeta-line-height: 1.7142857143;
39
- $font-style-zeta-font-weight: 400;
8
+ $font-style-body-base-font-family: 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI';
9
+ $font-style-body-base-font-size: 16px;
10
+ $font-style-body-base-line-height: 1.5rem;
11
+ $font-style-body-base-font-weight: 400;
12
+ $font-style-body-small-font-family: 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI';
13
+ $font-style-body-small-font-size: 14px;
14
+ $font-style-body-small-line-height: 1.25rem;
15
+ $font-style-body-small-font-weight: 400;
16
+ $font-style-body-xsmall-font-family: 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI';
17
+ $font-style-body-xsmall-font-size: 12px;
18
+ $font-style-body-xsmall-line-height: 1.125rem;
19
+ $font-style-body-xsmall-font-weight: 400;
20
+ $font-style-headlines-giga-font-family: 'FK Display', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
21
+ $font-style-headlines-giga-font-size: 51px;
22
+ $font-style-headlines-giga-line-height: 1.4117647059;
23
+ $font-style-headlines-giga-font-weight: 400;
24
+ $font-style-headlines-alpha-font-family: 'FK Display', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
25
+ $font-style-headlines-alpha-font-size: 38px;
26
+ $font-style-headlines-alpha-line-height: 1.2631578947;
27
+ $font-style-headlines-alpha-font-weight: 400;
28
+ $font-style-headlines-beta-font-family: 'FK Display', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
29
+ $font-style-headlines-beta-font-size: 28px;
30
+ $font-style-headlines-beta-line-height: 1.7142857143;
31
+ $font-style-headlines-beta-font-weight: 400;
32
+ $font-style-headlines-gamma-font-family: 'FK Display', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
33
+ $font-style-headlines-gamma-font-size: 21px;
34
+ $font-style-headlines-gamma-line-height: 1.5238095238;
35
+ $font-style-headlines-gamma-font-weight: 400;
36
+ $font-style-headlines-delta-font-family: 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI';
37
+ $font-style-headlines-delta-font-size: 19px;
38
+ $font-style-headlines-delta-line-height: 1.2631578947;
39
+ $font-style-headlines-delta-font-weight: 400;
40
+ $font-style-headlines-epsilon-font-family: 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI';
41
+ $font-style-headlines-epsilon-font-size: 16px;
42
+ $font-style-headlines-epsilon-line-height: 1.5;
43
+ $font-style-headlines-epsilon-font-weight: 400;
44
+ $font-style-headlines-zeta-font-family: 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI';
45
+ $font-style-headlines-zeta-font-size: 14px;
46
+ $font-style-headlines-zeta-line-height: 1.7142857143;
47
+ $font-style-headlines-zeta-font-weight: 400;
40
48
  $font-weight-normal: 400;
41
49
  $font-weight-semibold: 600;
42
50
  $size-font-base: 16px;
51
+ $size-font-small: 14px;
52
+ $size-font-xsmall: 12px;
43
53
  $size-font-zeta: 14px;
44
54
  $size-font-epsilon: 16px;
45
55
  $size-font-delta: 19px;
@@ -53,9 +63,12 @@ $size-letter-spacing-normal: normal;
53
63
  $size-letter-spacing-wide: 0.025em;
54
64
  $size-letter-spacing-wider: 0.05em;
55
65
  $size-letter-spacing-widest: 0.1em;
56
- $size-line-height-base: 24px;
57
66
  $size-line-height-none: 1;
58
- $size-line-height-default: 1.5;
67
+ $size-line-height-body: 1.5;
68
+ $size-line-height-default: 24px;
69
+ $size-line-height-base: 1.5rem;
70
+ $size-line-height-small: 1.25rem;
71
+ $size-line-height-xsmall: 1.125rem;
59
72
  $size-line-height-zeta: 1.7142857143;
60
73
  $size-line-height-epsilon: 1.5;
61
74
  $size-line-height-delta: 1.2631578947;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volue/design-typography",
3
- "version": "0.1.0-next.3",
3
+ "version": "0.2.0-next.0",
4
4
  "description": "Typography primitives for Volue design primitives",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -31,14 +31,14 @@
31
31
  "prepack": "yarn run build"
32
32
  },
33
33
  "devDependencies": {
34
- "eslint": "8.34.0",
34
+ "eslint": "8.36.0",
35
35
  "eslint-config-powel": "14.2.1",
36
36
  "eslint-import-resolver-node": "0.3.7",
37
37
  "eslint-plugin-import": "2.27.5",
38
38
  "map-obj": "4.3.0",
39
39
  "npm-run-all": "4.1.5",
40
40
  "polished": "4.2.2",
41
- "prettier": "2.8.4",
41
+ "prettier": "2.8.6",
42
42
  "rimraf": "3.0.2",
43
43
  "style-dictionary": "3.7.3-rc.1",
44
44
  "typescript": "4.9.5"
package/src/font-size.js CHANGED
@@ -18,6 +18,12 @@ module.exports = {
18
18
  base: {
19
19
  value: px(baseFontSize)
20
20
  },
21
+ small: {
22
+ value: px(14)
23
+ },
24
+ xsmall: {
25
+ value: px(12)
26
+ },
21
27
  zeta: {
22
28
  value: px(round(baseFontSize * 0.857))
23
29
  },
@@ -6,6 +6,7 @@ const baseFontSize = parseInt(fontSizeTokens.size.font.base.value);
6
6
  const baseLineHeight = baseFontSize * 1.5; // 24
7
7
 
8
8
  const toPx = value => `${value}px`;
9
+ const toRem = value => `${value / baseFontSize}rem`;
9
10
 
10
11
  const { ceil } = Math;
11
12
 
@@ -26,15 +27,24 @@ const calcLineHeight = (fontSize, lineHeight = baseLineHeight) => {
26
27
  module.exports = {
27
28
  size: {
28
29
  lineHeight: {
29
- base: {
30
- value: toPx(baseLineHeight)
31
- },
32
30
  none: {
33
31
  value: 1
34
32
  },
35
- default: {
33
+ body: {
36
34
  value: calcLineHeight(baseFontSize)
37
35
  },
36
+ default: {
37
+ value: toPx(baseLineHeight)
38
+ },
39
+ base: {
40
+ value: toRem(baseLineHeight)
41
+ },
42
+ small: {
43
+ value: toRem(20)
44
+ },
45
+ xsmall: {
46
+ value: toRem(18)
47
+ },
38
48
  zeta: {
39
49
  value: calcLineHeight(fontSizeTokens.size.font.zeta.value)
40
50
  },