Skip to content

Commit 5506a19

Browse files
jordanjones243rmenner
authored andcommitted
feat: add new body-emphasized classes #269
1 parent 9290d08 commit 5506a19

8 files changed

Lines changed: 187 additions & 41 deletions

File tree

package-lock.json

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"sass": "^1.42.1"
1717
},
1818
"dependencies": {
19-
"@aurodesignsystem/design-tokens": "8.5.0",
19+
"@aurodesignsystem/design-tokens": "^8.6.0",
2020
"chalk": "^5.4.1"
2121
},
2222
"devDependencies": {

src/config/alaska-classic/type/body.scss

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,57 @@
22
$alaska-classic-type-body-config: (
33
'family': v.$ds-basic-type-family-body,
44
'familyFallback': v.$ds-basic-type-family-body-fallback,
5-
'weight': v.$ds-basic-type-weight-body,
65
'letter-spacing': v.$ds-basic-type-letter-spacing-body,
76
'sizes': (
87
'default': (
98
'font-size': v.$ds-type-size-16,
10-
'line-height': v.$ds-basic-type-line-height-body2
9+
'line-height': v.$ds-basic-type-line-height-body2,
10+
'weight': v.$ds-basic-type-weight-body
11+
),
12+
'default-emphasized': (
13+
'font-size': v.$ds-type-size-16,
14+
'line-height': v.$ds-basic-type-line-height-body2,
15+
'weight': v.$ds-basic-type-weight-body2
1116
),
1217
'lg': (
1318
'font-size': v.$ds-type-size-18,
14-
'line-height': v.$ds-basic-type-line-height-body
19+
'line-height': v.$ds-basic-type-line-height-body,
20+
'weight': v.$ds-basic-type-weight-body
21+
),
22+
'lg-emphasized': (
23+
'font-size': v.$ds-type-size-18,
24+
'line-height': v.$ds-basic-type-line-height-body,
25+
'weight': v.$ds-basic-type-weight-body2
1526
),
1627
'sm': (
1728
'font-size': v.$ds-type-size-14,
18-
'line-height': v.$ds-basic-type-line-height-body3
29+
'line-height': v.$ds-basic-type-line-height-body3,
30+
'weight': v.$ds-basic-type-weight-body
31+
),
32+
'sm-emphasized': (
33+
'font-size': v.$ds-type-size-14,
34+
'line-height': v.$ds-basic-type-line-height-body3,
35+
'weight': v.$ds-basic-type-weight-body2
1936
),
2037
'xs': (
2138
'font-size': v.$ds-type-size-12,
22-
'line-height': v.$ds-basic-type-line-height-body4
39+
'line-height': v.$ds-basic-type-line-height-body4,
40+
'weight': v.$ds-basic-type-weight-body
41+
),
42+
'xs-emphasized': (
43+
'font-size': v.$ds-type-size-12,
44+
'line-height': v.$ds-basic-type-line-height-body4,
45+
'weight': v.$ds-basic-type-weight-body2
2346
),
2447
'2xs': (
2548
'font-size': v.$ds-type-size-10,
26-
'line-height': v.$ds-basic-type-line-height-body5
49+
'line-height': v.$ds-basic-type-line-height-body5,
50+
'weight': v.$ds-basic-type-weight-body
51+
),
52+
'2xs-emphasized': (
53+
'font-size': v.$ds-type-size-10,
54+
'line-height': v.$ds-basic-type-line-height-body5,
55+
'weight': v.$ds-basic-type-weight-body2
2756
)
2857
)
2958
);

src/config/alaska/type/body.scss

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,57 @@
22
$alaska-type-body-config: (
33
'family': v.$ds-basic-type-family-body,
44
'familyFallback': v.$ds-basic-type-family-body-fallback,
5-
'weight': v.$ds-basic-type-weight-body,
65
'letter-spacing': v.$ds-basic-type-letter-spacing-body,
76
'sizes': (
87
'default': (
98
'font-size': v.$ds-type-size-16,
10-
'line-height': v.$ds-basic-type-line-height-body2
9+
'line-height': v.$ds-basic-type-line-height-body2,
10+
'weight': v.$ds-basic-type-weight-body
11+
),
12+
'default-emphasized': (
13+
'font-size': v.$ds-type-size-16,
14+
'line-height': v.$ds-basic-type-line-height-body2,
15+
'weight': v.$ds-basic-type-weight-body2
1116
),
1217
'lg': (
1318
'font-size': v.$ds-type-size-18,
14-
'line-height': v.$ds-basic-type-line-height-body
19+
'line-height': v.$ds-basic-type-line-height-body,
20+
'weight': v.$ds-basic-type-weight-body
21+
),
22+
'lg-emphasized': (
23+
'font-size': v.$ds-type-size-18,
24+
'line-height': v.$ds-basic-type-line-height-body,
25+
'weight': v.$ds-basic-type-weight-body2
1526
),
1627
'sm': (
1728
'font-size': v.$ds-type-size-14,
18-
'line-height': v.$ds-basic-type-line-height-body3
29+
'line-height': v.$ds-basic-type-line-height-body3,
30+
'weight': v.$ds-basic-type-weight-body
31+
),
32+
'sm-emphasized': (
33+
'font-size': v.$ds-type-size-14,
34+
'line-height': v.$ds-basic-type-line-height-body3,
35+
'weight': v.$ds-basic-type-weight-body2
1936
),
2037
'xs': (
2138
'font-size': v.$ds-type-size-12,
22-
'line-height': v.$ds-basic-type-line-height-body4
39+
'line-height': v.$ds-basic-type-line-height-body4,
40+
'weight': v.$ds-basic-type-weight-body
41+
),
42+
'xs-emphasized': (
43+
'font-size': v.$ds-type-size-12,
44+
'line-height': v.$ds-basic-type-line-height-body4,
45+
'weight': v.$ds-basic-type-weight-body2
2346
),
2447
'2xs': (
2548
'font-size': v.$ds-type-size-10,
26-
'line-height': v.$ds-basic-type-line-height-body5
49+
'line-height': v.$ds-basic-type-line-height-body5,
50+
'weight': v.$ds-basic-type-weight-body
51+
),
52+
'2xs-emphasized': (
53+
'font-size': v.$ds-type-size-10,
54+
'line-height': v.$ds-basic-type-line-height-body5,
55+
'weight': v.$ds-basic-type-weight-body2
2756
)
2857
)
2958
);

src/config/auro-1/type/body.scss

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,57 @@
22
$auro-1-type-body-config: (
33
'family': v.$ds-basic-type-family-body,
44
'familyFallback': v.$ds-basic-type-family-body-fallback,
5-
'weight': v.$ds-basic-type-weight-body,
65
'letter-spacing': v.$ds-basic-type-letter-spacing-body,
76
'sizes': (
87
'default': (
98
'font-size': v.$ds-type-size-16,
10-
'line-height': v.$ds-basic-type-line-height-body2
9+
'line-height': v.$ds-basic-type-line-height-body2,
10+
'weight': v.$ds-basic-type-weight-body
11+
),
12+
'default-emphasized': (
13+
'font-size': v.$ds-type-size-16,
14+
'line-height': v.$ds-basic-type-line-height-body2,
15+
'weight': v.$ds-basic-type-weight-body2
1116
),
1217
'lg': (
1318
'font-size': v.$ds-type-size-18,
14-
'line-height': v.$ds-basic-type-line-height-body
19+
'line-height': v.$ds-basic-type-line-height-body,
20+
'weight': v.$ds-basic-type-weight-body
21+
),
22+
'lg-emphasized': (
23+
'font-size': v.$ds-type-size-18,
24+
'line-height': v.$ds-basic-type-line-height-body,
25+
'weight': v.$ds-basic-type-weight-body2
1526
),
1627
'sm': (
1728
'font-size': v.$ds-type-size-14,
18-
'line-height': v.$ds-basic-type-line-height-body3
29+
'line-height': v.$ds-basic-type-line-height-body3,
30+
'weight': v.$ds-basic-type-weight-body
31+
),
32+
'sm-emphasized': (
33+
'font-size': v.$ds-type-size-14,
34+
'line-height': v.$ds-basic-type-line-height-body3,
35+
'weight': v.$ds-basic-type-weight-body2
1936
),
2037
'xs': (
2138
'font-size': v.$ds-type-size-12,
22-
'line-height': v.$ds-basic-type-line-height-body4
39+
'line-height': v.$ds-basic-type-line-height-body4,
40+
'weight': v.$ds-basic-type-weight-body
41+
),
42+
'xs-emphasized': (
43+
'font-size': v.$ds-type-size-12,
44+
'line-height': v.$ds-basic-type-line-height-body4,
45+
'weight': v.$ds-basic-type-weight-body2
2346
),
2447
'2xs': (
2548
'font-size': v.$ds-type-size-10,
26-
'line-height': v.$ds-basic-type-line-height-body5
49+
'line-height': v.$ds-basic-type-line-height-body5,
50+
'weight': v.$ds-basic-type-weight-body
51+
),
52+
'2xs-emphasized': (
53+
'font-size': v.$ds-type-size-10,
54+
'line-height': v.$ds-basic-type-line-height-body5,
55+
'weight': v.$ds-basic-type-weight-body2
2756
)
2857
)
2958
);

src/config/auro-2/type/body.scss

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,57 @@
22
$auro-2-type-body-config: (
33
'family': v.$ds-basic-type-family-body,
44
'familyFallback': v.$ds-basic-type-family-body-fallback,
5-
'weight': v.$ds-basic-type-weight-body,
65
'letter-spacing': v.$ds-basic-type-letter-spacing-body,
76
'sizes': (
87
'default': (
98
'font-size': v.$ds-type-size-16,
10-
'line-height': v.$ds-basic-type-line-height-body2
9+
'line-height': v.$ds-basic-type-line-height-body2,
10+
'weight': v.$ds-basic-type-weight-body
11+
),
12+
'default-emphasized': (
13+
'font-size': v.$ds-type-size-16,
14+
'line-height': v.$ds-basic-type-line-height-body2,
15+
'weight': v.$ds-basic-type-weight-body2
1116
),
1217
'lg': (
1318
'font-size': v.$ds-type-size-18,
14-
'line-height': v.$ds-basic-type-line-height-body
19+
'line-height': v.$ds-basic-type-line-height-body,
20+
'weight': v.$ds-basic-type-weight-body
21+
),
22+
'lg-emphasized': (
23+
'font-size': v.$ds-type-size-18,
24+
'line-height': v.$ds-basic-type-line-height-body,
25+
'weight': v.$ds-basic-type-weight-body2
1526
),
1627
'sm': (
1728
'font-size': v.$ds-type-size-14,
18-
'line-height': v.$ds-basic-type-line-height-body3
29+
'line-height': v.$ds-basic-type-line-height-body3,
30+
'weight': v.$ds-basic-type-weight-body
31+
),
32+
'sm-emphasized': (
33+
'font-size': v.$ds-type-size-14,
34+
'line-height': v.$ds-basic-type-line-height-body3,
35+
'weight': v.$ds-basic-type-weight-body2
1936
),
2037
'xs': (
2138
'font-size': v.$ds-type-size-12,
22-
'line-height': v.$ds-basic-type-line-height-body4
39+
'line-height': v.$ds-basic-type-line-height-body4,
40+
'weight': v.$ds-basic-type-weight-body
41+
),
42+
'xs-emphasized': (
43+
'font-size': v.$ds-type-size-12,
44+
'line-height': v.$ds-basic-type-line-height-body4,
45+
'weight': v.$ds-basic-type-weight-body2
2346
),
2447
'2xs': (
2548
'font-size': v.$ds-type-size-10,
26-
'line-height': v.$ds-basic-type-line-height-body5
49+
'line-height': v.$ds-basic-type-line-height-body5,
50+
'weight': v.$ds-basic-type-weight-body
51+
),
52+
'2xs-emphasized': (
53+
'font-size': v.$ds-type-size-10,
54+
'line-height': v.$ds-basic-type-line-height-body5,
55+
'weight': v.$ds-basic-type-weight-body2
2756
)
2857
)
2958
);

src/config/hawaiian/type/body.scss

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,57 @@
22
$hawaiian-type-body-config: (
33
'family': v.$ds-basic-type-family-body,
44
'familyFallback': v.$ds-basic-type-family-body-fallback,
5-
'weight': v.$ds-basic-type-weight-body,
65
'letter-spacing': v.$ds-basic-type-letter-spacing-body,
76
'sizes': (
87
'default': (
98
'font-size': v.$ds-type-size-16,
10-
'line-height': v.$ds-basic-type-line-height-body2
9+
'line-height': v.$ds-basic-type-line-height-body2,
10+
'weight': v.$ds-basic-type-weight-body
11+
),
12+
'default-emphasized': (
13+
'font-size': v.$ds-type-size-16,
14+
'line-height': v.$ds-basic-type-line-height-body2,
15+
'weight': v.$ds-basic-type-weight-body2
1116
),
1217
'lg': (
1318
'font-size': v.$ds-type-size-18,
14-
'line-height': v.$ds-basic-type-line-height-body
19+
'line-height': v.$ds-basic-type-line-height-body,
20+
'weight': v.$ds-basic-type-weight-body
21+
),
22+
'lg-emphasized': (
23+
'font-size': v.$ds-type-size-18,
24+
'line-height': v.$ds-basic-type-line-height-body,
25+
'weight': v.$ds-basic-type-weight-body2
1526
),
1627
'sm': (
1728
'font-size': v.$ds-type-size-14,
18-
'line-height': v.$ds-basic-type-line-height-body3
29+
'line-height': v.$ds-basic-type-line-height-body3,
30+
'weight': v.$ds-basic-type-weight-body
31+
),
32+
'sm-emphasized': (
33+
'font-size': v.$ds-type-size-14,
34+
'line-height': v.$ds-basic-type-line-height-body3,
35+
'weight': v.$ds-basic-type-weight-body2
1936
),
2037
'xs': (
2138
'font-size': v.$ds-type-size-12,
22-
'line-height': v.$ds-basic-type-line-height-body4
39+
'line-height': v.$ds-basic-type-line-height-body4,
40+
'weight': v.$ds-basic-type-weight-body
41+
),
42+
'xs-emphasized': (
43+
'font-size': v.$ds-type-size-12,
44+
'line-height': v.$ds-basic-type-line-height-body4,
45+
'weight': v.$ds-basic-type-weight-body2
2346
),
2447
'2xs': (
2548
'font-size': v.$ds-type-size-10,
26-
'line-height': v.$ds-basic-type-line-height-body5
49+
'line-height': v.$ds-basic-type-line-height-body5,
50+
'weight': v.$ds-basic-type-weight-body
51+
),
52+
'2xs-emphasized': (
53+
'font-size': v.$ds-type-size-10,
54+
'line-height': v.$ds-basic-type-line-height-body5,
55+
'weight': v.$ds-basic-type-weight-body2
2756
)
2857
)
2958
);

src/type/partials/_body.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
@import '../../utilityFunctions/map-deep-get';
44
@import '../../utilityVariables/cssNamespace';
55

6-
$body-sizes: ('default', 'lg', 'sm', 'xs', '2xs');
6+
$body-sizes: ('default', 'default-emphasized', 'lg', 'lg-emphasized', 'sm', 'sm-emphasized', 'xs', 'xs-emphasized', '2xs', '2xs-emphasized');
77

88
// Generate CSS custom properties for Body
99
@mixin generate-body-css-vars($theme-config) {
1010
--#{$css-ns}-body-family: #{map-get($theme-config, 'family')};
1111
--#{$css-ns}-body-family-fallback: #{map-get($theme-config, 'familyFallback')};
12-
--#{$css-ns}-body-weight: #{map-get($theme-config, 'weight')};
1312
--#{$css-ns}-body-letter-spacing: #{map-get($theme-config, 'letter-spacing')};
1413

1514
@each $size in $body-sizes {
15+
--#{$css-ns}-body-#{$size}-weight: #{auro_map-deep-get($theme-config, 'sizes', $size, 'weight')};
1616
--#{$css-ns}-body-#{$size}-font-size: #{auro_map-deep-get($theme-config, 'sizes', $size, 'font-size')};
1717
--#{$css-ns}-body-#{$size}-line-height: #{auro_map-deep-get($theme-config, 'sizes', $size, 'line-height')};
1818
}
@@ -25,13 +25,13 @@ $body-sizes: ('default', 'lg', 'sm', 'xs', '2xs');
2525
@if $use-fallback and $fallback-config != null {
2626
// Use CSS fallback
2727
font-family: var(--#{$css-ns}-body-family, auro_map-deep-get($fallback-config, 'family')), auro_map-deep-get($fallback-config, 'familyFallback');
28-
font-weight: var(--#{$css-ns}-body-weight, auro_map-deep-get($fallback-config, 'weight'));
28+
font-weight: var(--#{$css-ns}-body-#{$size}-weight, auro_map-deep-get($fallback-config, 'weight'));
2929
letter-spacing: var(--#{$css-ns}-body-letter-spacing, auro_map-deep-get($fallback-config, 'letter-spacing'));
3030
font-size: var(--#{$css-ns}-body-#{$size}-font-size, auro_map-deep-get($fallback-config, 'sizes', $size, 'font-size'));
3131
line-height: var(--#{$css-ns}-body-#{$size}-line-height, auro_map-deep-get($fallback-config, 'sizes', $size, 'line-height'));
3232
} @else {
3333
font-family: var(--#{$css-ns}-body-family), var(--#{$css-ns}-body-family-fallback);
34-
font-weight: var(--#{$css-ns}-body-weight);
34+
font-weight: var(--#{$css-ns}-body-#{$size}-weight);
3535
letter-spacing: var(--#{$css-ns}-body-letter-spacing);
3636
font-size: var(--#{$css-ns}-body-#{$size}-font-size);
3737
line-height: var(--#{$css-ns}-body-#{$size}-line-height);

0 commit comments

Comments
 (0)