Skip to content

Commit 270ac75

Browse files
committed
feat: updated typography of wave design system
1 parent fedf564 commit 270ac75

File tree

7 files changed

+60
-10
lines changed

7 files changed

+60
-10
lines changed

jest.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@ module.exports = {
77
testRegex: '(test|spec)\\.tsx?$',
88
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'svg'],
99
setupFiles: ['jest-date-mock'],
10-
setupFilesAfterEnv: ['<rootDir>/src/utils/testing.ts']
10+
setupFilesAfterEnv: ['<rootDir>/src/utils/testing.ts'],
11+
moduleNameMapper: {
12+
'@fontsource': 'identity-obj-proxy'
13+
}
1114
};

package-lock.json

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

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@
130130
"eslint-plugin-storybook": "^0.8.0",
131131
"eslint-plugin-unicorn": "^34.0.1",
132132
"husky": "^4.2.3",
133+
"identity-obj-proxy": "^3.0.0",
133134
"jest": "^26.6.3",
134135
"jest-axe": "^3.4.0",
135136
"jest-date-mock": "^1.0.8",
@@ -161,6 +162,7 @@
161162
},
162163
"dependencies": {
163164
"@datepicker-react/hooks": "^2.3.1",
165+
"@fontsource-variable/roboto-flex": "^5.2.6",
164166
"@popperjs/core": "^2.11.5",
165167
"@styled-system/theme-get": "^5.1.2",
166168
"@types/react-select": "^4.0.18",

src/components/FilePicker/__snapshots__/FilePicker.spec.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ exports[`when a file gets submitted component removes the initial button 1`] = `
6666
.c7 {
6767
color: inherit;
6868
font-size: 1rem;
69-
font-family: "Roboto Flex","Open Sans",sans-serif;
69+
font-family: "Roboto Flex Variable","Open Sans",sans-serif;
7070
line-height: 1.4;
7171
margin: 0;
7272
font-size: 0.875rem;
@@ -75,7 +75,7 @@ exports[`when a file gets submitted component removes the initial button 1`] = `
7575
.c8 {
7676
color: var(--wave-s-color-foreground-neutral-emphasized);
7777
font-size: 1rem;
78-
font-family: "Roboto Flex","Open Sans",sans-serif;
78+
font-family: "Roboto Flex Variable","Open Sans",sans-serif;
7979
line-height: 1.4;
8080
margin: 0;
8181
font-size: 0.875rem;

src/components/TabBar/__snapshots__/Link.spec.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ exports[`TabBar.Link has a bright color if selected 1`] = `
1212
cursor: pointer;
1313
font-size: 0.875rem;
1414
font-weight: 600;
15-
font-family: "Roboto Flex","Open Sans",sans-serif;
15+
font-family: "Roboto Flex Variable","Open Sans",sans-serif;
1616
margin-right: 1.5rem;
1717
-webkit-text-decoration: none;
1818
text-decoration: none;
@@ -53,7 +53,7 @@ exports[`TabBar.Link renders with default props 1`] = `
5353
cursor: pointer;
5454
font-size: 0.875rem;
5555
font-weight: 600;
56-
font-family: "Roboto Flex","Open Sans",sans-serif;
56+
font-family: "Roboto Flex Variable","Open Sans",sans-serif;
5757
margin-right: 1.5rem;
5858
-webkit-text-decoration: none;
5959
text-decoration: none;

src/essentials/Colors/globalStyles.ts

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { createGlobalStyle, DefaultTheme, GlobalStyleComponent } from 'styled-components';
22

3+
import '@fontsource-variable/roboto-flex/index.css';
4+
35
import {
46
generateBareTierCssVariables,
57
generateSemanticTierCssVariables,
@@ -23,7 +25,7 @@ export const createThemeGlobalStyle = (
2325
color-scheme: dark;
2426
${generateSemanticTierCssVariables(darkScheme)}
2527
}
26-
28+
2729
.light-scheme {
2830
color-scheme: light;
2931
${generateSemanticTierCssVariables(lightScheme)}
@@ -35,12 +37,24 @@ export const createThemeGlobalStyle = (
3537
${generateSemanticTierCssVariables(darkScheme)}
3638
}
3739
}
38-
40+
3941
body, .wave {
4042
color: ${getSemanticValue('foreground-primary')};
41-
background-color: ${getSemanticValue('background-page-default')}
43+
background-color: ${getSemanticValue('background-page-default')};
44+
font-family: "Roboto Flex Variable", system-ui, sans-serif;
45+
font-style: normal;
46+
font-variation-settings:
47+
"GRAD" 0,
48+
"XOPQ" 100,
49+
"XTRA" 506,
50+
"YOPQ" 85,
51+
"YTAS" 730,
52+
"YTDE" -203,
53+
"YTFI" 738,
54+
"YTLC" 550,
55+
"YTUC" 712;
4256
}
43-
57+
4458
svg {
4559
fill: currentColor;
4660
}

src/essentials/theme.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const theme: DefaultTheme = {
1111
bold: 700
1212
},
1313
fonts: {
14-
normal: fontStack(['Roboto Flex', 'Open Sans', 'sans-serif']),
14+
normal: fontStack(['Roboto Flex Variable', 'Open Sans', 'sans-serif']),
1515
monospace: fontStack(['Hack', 'monospace'])
1616
},
1717
mediaQueries: MediaQueries,

0 commit comments

Comments
 (0)