Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/storybook-react-native/.storybook/FontLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const FontLoader = ({ children }) => {
'Geist Regular Italic': require('../fonts/Geist/Geist Regular Italic.otf'),
'Geist Medium': require('../fonts/Geist/Geist Medium.otf'),
'Geist Medium Italic': require('../fonts/Geist/Geist Medium Italic.otf'),
'Geist SemiBold': require('../fonts/Geist/Geist SemiBold.otf'),
'Geist SemiBold Italic': require('../fonts/Geist/Geist SemiBold Italic.otf'),
'Geist Bold': require('../fonts/Geist/Geist Bold.otf'),
'Geist Bold Italic': require('../fonts/Geist/Geist Bold Italic.otf'),
'MM Poly Regular': require('../fonts/MMPoly/MM Poly Regular.otf'),
'MM Sans Regular': require('../fonts/MMSans/MM Sans Regular.otf'),
'MM Sans Medium': require('../fonts/MMSans/MM Sans Medium.otf'),
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
12 changes: 6 additions & 6 deletions apps/storybook-react/tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
@font-face {
font-family: 'Geist';
font-style: normal;
font-weight: 600;
src: url('fonts/Geist/Geist SemiBold.woff2') format('woff2');
font-weight: 700;
src: url('fonts/Geist/Geist Bold.woff2') format('woff2');
}

@font-face {
font-family: 'Geist';
font-style: italic;
font-weight: 600;
src: url('fonts/Geist/Geist SemiBold Italic.woff2') format('woff2');
font-weight: 700;
src: url('fonts/Geist/Geist Bold Italic.woff2') format('woff2');
}

/* MM Sans */
Expand All @@ -63,7 +63,7 @@
@font-face {
font-family: 'MMSans';
font-style: normal;
font-weight: 600;
font-weight: 700;
src: url('fonts/MMSans/MM Sans Bold.woff2') format('woff2');
}

Expand All @@ -85,6 +85,6 @@
@font-face {
font-family: 'MMPoly';
font-style: normal;
font-weight: 600;
font-weight: 700;
src: url('fonts/MMPoly/MM Poly Regular.woff2') format('woff2');
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Available `FontWeight` options:

- `FontWeight.Regular` (Weight `400`)
- `FontWeight.Medium` (Weight `500`)
- `FontWeight.Bold` (Weight `600`)
- `FontWeight.Bold` (Weight `700`)

### `fontStyle`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export const FontWeightStory: Story = {
<View>
<Text fontWeight={FontWeight.Regular}>Regular (400)</Text>
<Text fontWeight={FontWeight.Medium}>Medium (500)</Text>
<Text fontWeight={FontWeight.Bold}>Bold (600)</Text>
<Text fontWeight={FontWeight.Bold}>Bold (700)</Text>
</View>
),
name: 'Font Weight',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export type TextProps = {
* Optional prop to control the font weight of the text.
* Normal: 400
* Medium: 500
* Bold: 600
* Bold: 700
*/
fontWeight?: FontWeight;
/**
Expand Down
4 changes: 2 additions & 2 deletions packages/design-system-react-native/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,9 @@ export enum TextColor {
*/
export enum FontWeight {
/**
* Weight - 600
* Weight - 700
*/
Bold = '600',
Bold = '700',
/**
* Weight - 500
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ Use the `fontWeight` prop and the `FontWeight` enum from `@metamask/design-syste
<td>
<code>bold</code>
</td>
<td>600</td>
<td>700</td>
</tr>
</tbody>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const meta: Meta<typeof Text> = {
options: Object.keys(FontWeight),
mapping: FontWeight,
description:
'Optional prop to control the font weight of the text. Normal: 400, Medium: 500, Bold: 600',
'Optional prop to control the font weight of the text. Normal: 400, Medium: 500, Bold: 700',
},
fontFamily: {
control: 'select',
Expand Down Expand Up @@ -221,7 +221,7 @@ export const FontWeightStory: Story = {
<div className="space-y-4">
<Text fontWeight={FontWeight.Regular}>Regular (400)</Text>
<Text fontWeight={FontWeight.Medium}>Medium (500)</Text>
<Text fontWeight={FontWeight.Bold}>Bold (600)</Text>
<Text fontWeight={FontWeight.Bold}>Bold (700)</Text>
</div>
),
name: 'Font Weight',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export type TextProps = {
* Optional prop to control the font weight of the text.
* Regular: 400
* Medium: 500
* Bold: 600
* Bold: 700
*/
fontWeight?: FontWeight;
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/design-system-react/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ export enum TextAlign {
*/
export enum FontWeight {
/**
* Weight - 600
* Weight - 700
*/
Bold = 'font-bold',
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export type FontStyle = 'normal' | 'italic';
* 'display-md': {
* fontFamily: 'Geist Bold',
* fontSize: '32',
* fontWeight: '600',
* fontWeight: '700',
* letterSpacing: '0',
* lineHeight: '40px',
* },
Expand Down
2 changes: 1 addition & 1 deletion packages/design-tokens/src/css/typography.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
/* font weights */
--font-weight-regular: 400;
--font-weight-medium: 500;
--font-weight-bold: 600;
--font-weight-bold: 700;
/* letter spacing */
--letter-spacing-0: 0;
--letter-spacing-1: 2.5%;
Expand Down
2 changes: 1 addition & 1 deletion packages/design-tokens/src/figma/tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@
"type": "fontWeights"
},
"bold": {
"value": "600",
"value": "700",
"type": "fontWeights"
}
},
Expand Down
2 changes: 1 addition & 1 deletion packages/design-tokens/src/js/typography/fontWeights.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import type { FontWeights } from './types';
export const fontWeights: FontWeights = {
regular: '400',
medium: '500',
bold: '600',
bold: '700',
};
22 changes: 11 additions & 11 deletions packages/design-tokens/src/js/typography/typography.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function createNewFigmaTokenObject(str: string, obj: any) {
describe('Typography', () => {
describe('Typography Small Screen', () => {
it('js tokens for sDisplayMD matches figma tokens sDisplayMD', () => {
expect(typography.sDisplayMD.fontWeight).toBe('600');
expect(typography.sDisplayMD.fontWeight).toBe('700');

expect(typography.sDisplayMD.fontSize).toStrictEqual(
Number(
Expand Down Expand Up @@ -86,7 +86,7 @@ describe('Typography', () => {
});

it('js tokens for sHeadingLG matches figma tokens sHeadingLG', () => {
expect(typography.sHeadingLG.fontWeight).toBe('600');
expect(typography.sHeadingLG.fontWeight).toBe('700');

expect(typography.sHeadingLG.fontSize).toStrictEqual(
Number(
Expand Down Expand Up @@ -117,7 +117,7 @@ describe('Typography', () => {
});

it('js tokens for sHeadingMD matches figma tokens sHeadingMD', () => {
expect(typography.sHeadingMD.fontWeight).toBe('600');
expect(typography.sHeadingMD.fontWeight).toBe('700');

expect(typography.sHeadingMD.fontSize).toStrictEqual(
Number(
Expand Down Expand Up @@ -148,7 +148,7 @@ describe('Typography', () => {
});

it('js tokens for sHeadingSM matches figma tokens sHeadingSM', () => {
expect(typography.sHeadingSM.fontWeight).toBe('600');
expect(typography.sHeadingSM.fontWeight).toBe('700');

expect(typography.sHeadingSM.fontSize).toStrictEqual(
Number(
Expand Down Expand Up @@ -210,7 +210,7 @@ describe('Typography', () => {
});

it('js tokens for sBodyMDBold matches figma tokens sBodyMDBold', () => {
expect(typography.sBodyMDBold.fontWeight).toBe('600');
expect(typography.sBodyMDBold.fontWeight).toBe('700');

expect(typography.sBodyMDBold.fontSize).toStrictEqual(
Number(
Expand Down Expand Up @@ -303,7 +303,7 @@ describe('Typography', () => {
});

it('js tokens for sBodySMBold matches figma tokens sBodySMBold', () => {
expect(typography.sBodySMBold.fontWeight).toBe('600');
expect(typography.sBodySMBold.fontWeight).toBe('700');

expect(typography.sBodySMBold.fontSize).toStrictEqual(
Number(
Expand Down Expand Up @@ -491,7 +491,7 @@ describe('Typography', () => {
});

it('js tokens for lHeadingLG matches figma tokens lHeadingLG', () => {
expect(typography.lHeadingLG.fontWeight).toBe('600');
expect(typography.lHeadingLG.fontWeight).toBe('700');

expect(typography.lHeadingLG.fontSize).toStrictEqual(
Number(
Expand Down Expand Up @@ -522,7 +522,7 @@ describe('Typography', () => {
});

it('js tokens for lHeadingMD matches figma tokens lHeadingMD', () => {
expect(typography.lHeadingMD.fontWeight).toBe('600');
expect(typography.lHeadingMD.fontWeight).toBe('700');

expect(typography.lHeadingMD.fontSize).toStrictEqual(
Number(
Expand Down Expand Up @@ -553,7 +553,7 @@ describe('Typography', () => {
});

it('js tokens for lHeadingSM matches figma tokens lHeadingSM', () => {
expect(typography.lHeadingSM.fontWeight).toBe('600');
expect(typography.lHeadingSM.fontWeight).toBe('700');

expect(typography.lHeadingSM.fontSize).toStrictEqual(
Number(
Expand Down Expand Up @@ -615,7 +615,7 @@ describe('Typography', () => {
});

it('js tokens for lBodyMDBold matches figma tokens lBodyMDBold', () => {
expect(typography.lBodyMDBold.fontWeight).toBe('600');
expect(typography.lBodyMDBold.fontWeight).toBe('700');

expect(typography.lBodyMDBold.fontSize).toStrictEqual(
Number(
Expand Down Expand Up @@ -708,7 +708,7 @@ describe('Typography', () => {
});

it('js tokens for lBodySMBold matches figma tokens lBodySMBold', () => {
expect(typography.lBodySMBold.fontWeight).toBe('600');
expect(typography.lBodySMBold.fontWeight).toBe('700');

expect(typography.lBodySMBold.fontSize).toStrictEqual(
Number(
Expand Down
2 changes: 1 addition & 1 deletion packages/design-tokens/stories/Typography.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ For screens sizes `768px <` or larger, use the large screen typography scale

## Font Weight

There are three available font weights: regular (`400`), medium (`500`), and bold (`600`).
There are three available font weights: regular (`400`), medium (`500`), and bold (`700`).

<Canvas of={TypographyStories.FontWeight} />

Expand Down
2 changes: 1 addition & 1 deletion packages/design-tokens/stories/Typography.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ export const FontWeight: StoryFn<typeof Text> = () => {
<>
<Text style={styles.regular}>Regular 400</Text>
<Text style={styles.medium}>Medium 500</Text>
<Text style={styles.bold}>Bold 600</Text>
<Text style={styles.bold}>Bold 700</Text>
</>
);
};
Expand Down
Loading