Files
assetx/landingpage/styles/tokens/typography.ts

179 lines
7.2 KiB
TypeScript
Raw Normal View History

/**
* Design System - Typography Tokens
*
*
*/
/**
* Serif Display (Domine/Noto Serif)
*
*/
export const serifDisplay = {
giant: {
bold: { fontSize: '100px', lineHeight: '100%', fontWeight: '700', letterSpacing: '-0.03em' },
regular: { fontSize: '100px', lineHeight: '100%', fontWeight: '400', letterSpacing: '-0.03em' },
},
hero: {
bold: { fontSize: '64px', lineHeight: '110%', fontWeight: '700', letterSpacing: '-0.02em' },
regular: { fontSize: '64px', lineHeight: '110%', fontWeight: '400', letterSpacing: '-0.02em' },
},
title1: {
bold: { fontSize: '48px', lineHeight: '120%', fontWeight: '700', letterSpacing: '-0.01em' },
regular: { fontSize: '48px', lineHeight: '120%', fontWeight: '400', letterSpacing: '-0.01em' },
},
title2: {
bold: { fontSize: '32px', lineHeight: '120%', fontWeight: '700', letterSpacing: '-0.01em' },
regular: { fontSize: '32px', lineHeight: '120%', fontWeight: '400', letterSpacing: '-0.01em' },
},
quote: {
bold: { fontSize: '24px', lineHeight: '130%', fontWeight: '700', letterSpacing: '-0.005em' },
regular: { fontSize: '24px', lineHeight: '130%', fontWeight: '400', letterSpacing: '-0.005em' },
},
text: {
bold: { fontSize: '16px', lineHeight: '150%', fontWeight: '700' },
regular: { fontSize: '16px', lineHeight: '150%', fontWeight: '400' },
},
} as const;
/**
* Sans Heading (Inter/Noto Sans)
*
*/
export const sansHeading = {
h1: {
bold: { fontSize: '48px', lineHeight: '120%', fontWeight: '700', letterSpacing: '-0.01em' },
medium: { fontSize: '48px', lineHeight: '120%', fontWeight: '500', letterSpacing: '-0.01em' },
regular: { fontSize: '48px', lineHeight: '120%', fontWeight: '400', letterSpacing: '-0.01em' },
},
h2: {
bold: { fontSize: '32px', lineHeight: '120%', fontWeight: '700', letterSpacing: '-0.01em' },
medium: { fontSize: '32px', lineHeight: '120%', fontWeight: '500', letterSpacing: '-0.01em' },
regular: { fontSize: '32px', lineHeight: '120%', fontWeight: '400', letterSpacing: '-0.01em' },
},
h3: {
bold: { fontSize: '24px', lineHeight: '130%', fontWeight: '700', letterSpacing: '-0.005em' },
medium: { fontSize: '24px', lineHeight: '130%', fontWeight: '500', letterSpacing: '-0.005em' },
regular: { fontSize: '24px', lineHeight: '130%', fontWeight: '400', letterSpacing: '-0.005em' },
},
h4: {
bold: { fontSize: '20px', lineHeight: '140%', fontWeight: '700' },
medium: { fontSize: '20px', lineHeight: '140%', fontWeight: '500' },
regular: { fontSize: '20px', lineHeight: '140%', fontWeight: '400' },
},
} as const;
/**
* Sans Body
*
*/
export const sansBody = {
large: {
bold: { fontSize: '18px', lineHeight: '150%', fontWeight: '700' },
medium: { fontSize: '18px', lineHeight: '150%', fontWeight: '500' },
regular: { fontSize: '18px', lineHeight: '150%', fontWeight: '400' },
},
default: {
bold: { fontSize: '16px', lineHeight: '150%', fontWeight: '700' },
medium: { fontSize: '16px', lineHeight: '150%', fontWeight: '500' },
regular: { fontSize: '16px', lineHeight: '150%', fontWeight: '400' },
},
small: {
bold: { fontSize: '14px', lineHeight: '150%', fontWeight: '700' },
medium: { fontSize: '14px', lineHeight: '150%', fontWeight: '500' },
regular: { fontSize: '14px', lineHeight: '150%', fontWeight: '400' },
},
} as const;
/**
* Sans Caption
*
*/
export const sansCaption = {
tiny: {
bold: { fontSize: '12px', lineHeight: '150%', fontWeight: '700', letterSpacing: '0.01em' },
medium: { fontSize: '12px', lineHeight: '150%', fontWeight: '500', letterSpacing: '0.01em' },
regular: { fontSize: '12px', lineHeight: '150%', fontWeight: '400', letterSpacing: '0.01em' },
},
minuscule: {
bold: { fontSize: '10px', lineHeight: '150%', fontWeight: '700', letterSpacing: '0.02em' },
medium: { fontSize: '10px', lineHeight: '150%', fontWeight: '500', letterSpacing: '0.02em' },
regular: { fontSize: '10px', lineHeight: '150%', fontWeight: '400', letterSpacing: '0.02em' },
},
} as const;
/**
* Mono Numeric (JetBrains Mono)
*
*/
export const monoNumeric = {
giant: {
extraBold: { fontSize: '48px', lineHeight: '110%', fontWeight: '800', letterSpacing: '-0.01em' },
bold: { fontSize: '48px', lineHeight: '110%', fontWeight: '700', letterSpacing: '-0.01em' },
medium: { fontSize: '48px', lineHeight: '110%', fontWeight: '500', letterSpacing: '-0.01em' },
regular: { fontSize: '48px', lineHeight: '110%', fontWeight: '400', letterSpacing: '-0.01em' },
},
huge: {
extraBold: { fontSize: '32px', lineHeight: '120%', fontWeight: '800', letterSpacing: '-0.005em' },
bold: { fontSize: '32px', lineHeight: '120%', fontWeight: '700', letterSpacing: '-0.005em' },
medium: { fontSize: '32px', lineHeight: '120%', fontWeight: '500', letterSpacing: '-0.005em' },
regular: { fontSize: '32px', lineHeight: '120%', fontWeight: '400', letterSpacing: '-0.005em' },
},
large: {
extraBold: { fontSize: '24px', lineHeight: '130%', fontWeight: '800' },
bold: { fontSize: '24px', lineHeight: '130%', fontWeight: '700' },
medium: { fontSize: '24px', lineHeight: '130%', fontWeight: '500' },
regular: { fontSize: '24px', lineHeight: '130%', fontWeight: '400' },
},
default: {
extraBold: { fontSize: '16px', lineHeight: '140%', fontWeight: '800' },
bold: { fontSize: '16px', lineHeight: '140%', fontWeight: '700' },
medium: { fontSize: '16px', lineHeight: '140%', fontWeight: '500' },
regular: { fontSize: '16px', lineHeight: '140%', fontWeight: '400' },
},
} as const;
/**
* Mono Code
*
*/
export const monoCode = {
small: {
extraBold: { fontSize: '14px', lineHeight: '150%', fontWeight: '800' },
bold: { fontSize: '14px', lineHeight: '150%', fontWeight: '700' },
medium: { fontSize: '14px', lineHeight: '150%', fontWeight: '500' },
regular: { fontSize: '14px', lineHeight: '150%', fontWeight: '400' },
},
tiny: {
extraBold: { fontSize: '12px', lineHeight: '150%', fontWeight: '800' },
bold: { fontSize: '12px', lineHeight: '150%', fontWeight: '700' },
medium: { fontSize: '12px', lineHeight: '150%', fontWeight: '500' },
regular: { fontSize: '12px', lineHeight: '150%', fontWeight: '400' },
},
minuscule: {
extraBold: { fontSize: '10px', lineHeight: '150%', fontWeight: '800' },
bold: { fontSize: '10px', lineHeight: '150%', fontWeight: '700' },
medium: { fontSize: '10px', lineHeight: '150%', fontWeight: '500' },
regular: { fontSize: '10px', lineHeight: '150%', fontWeight: '400' },
},
} as const;
/**
*
*/
export const typography = {
serif: {
display: serifDisplay,
},
sans: {
heading: sansHeading,
body: sansBody,
caption: sansCaption,
},
mono: {
numeric: monoNumeric,
code: monoCode,
},
} as const;
export type Typography = typeof typography;