Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@elvia/elvis-typography

Package Overview
Dependencies
Maintainers
7
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elvia/elvis-typography - npm Package Compare versions

Comparing version 2.3.1 to 2.3.2

7

CHANGELOG.md
# Elvia Typography Changelog
## 2.3.2 (09.03.23)
### Patch
- The line height for 'Text medium' typography on mobile has been adjusted to 160% from its previous value of
175%.
## 2.3.1 (29.08.22)

@@ -4,0 +11,0 @@

598

dist/elviaTypography.d.ts

@@ -1,73 +0,531 @@

// THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN.
// DO NOT MAKE CHANGES TO THIS FILE DIRECTLY.
export declare const ElviaTypography: {
'title-lg': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontSizeMobile: string;
fontWeight: string;
lineHeight: string;
lineHeightMobile: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'title-md': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontSizeMobile: string;
fontWeight: string;
lineHeight: string;
lineHeightMobile: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'title-sm': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontSizeMobile: string;
fontWeight: string;
lineHeight: string;
lineHeightMobile: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'title-xs': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontSizeMobile: string;
fontWeight: string;
lineHeight: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'title-caps': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontWeight: string;
lineHeight: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-lead': {
fontFamily: string;
fontSize: string;
fontSizeMobile: string;
fontWeight: string;
lineHeight: string;
lineHeightMobile: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-lg': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontSizeMobile: string;
fontWeight: string;
lineHeight: string;
lineHeightMobile: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-lg-strong': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontSizeMobile: string;
fontWeight: string;
lineHeight: string;
lineHeightMobile: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-lg-light': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontSizeMobile: string;
fontWeight: string;
lineHeight: string;
lineHeightMobile: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-md': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontWeight: string;
lineHeight: string;
lineHeightMobile: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-md-strong': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontWeight: string;
lineHeight: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-md-light': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontWeight: string;
lineHeight: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-sm': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontWeight: string;
lineHeight: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-sm-strong': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontWeight: string;
lineHeight: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-sm-light': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontWeight: string;
lineHeight: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-micro': {
fontFamily: string;
fontSize: string;
fontWeight: string;
lineHeight: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-micro-strong': {
fontFamily: string;
fontSize: string;
fontWeight: string;
lineHeight: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-micro-light': {
fontFamily: string;
fontSize: string;
fontWeight: string;
lineHeight: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-quote': {
fontFamily: string;
fontSize: string;
fontSizeMobile: string;
fontWeight: string;
lineHeight: string;
lineHeightMobile: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-img': {
fontFamily: string;
fontSize: string;
fontSizeMobile: string;
fontWeight: string;
lineHeight: string;
lineHeightMobile: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
textAlign: string;
};
'text-label': {
deprecated: string;
fontFamily: string;
fontSize: string;
fontWeight: string;
lineHeight: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-option': {
deprecated: string;
fontFamily: string;
fontSize: string;
fontWeight: string;
lineHeight: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
};
export default ElviaTypography;
export type TypographyName = keyof typeof ElviaTypography;
/**
* elvis-typography package containing typographies to use in Elvia's design profile.
* Typographies are provided as objects containing CSS properties.
* Get a typography style from elvis-typography.
* @param typographyName Name of requested typography.
* @returns Object containing CSS properties of typography.
*
* @version 1.2.1
*/
declare module '@elvia/elvis-typography' {
/**
* Get a typography style from elvis-typography.
* @param typographyName Name of requested typography.
* @returns Object containing CSS properties of typography.
*
*/
export const getTypography: (typographyName: TypographyName) => { [property: string]: string };
/**
* @param typographyName Name of requested typography.
* @returns CSS-formated string with all the properties of the typography, including a media query for mobile font properties.
*/
export const getTypographyCss: (typographyName: TypographyName) => string;
export type TypographyName =
| 'title-lg'
| 'title-large'
| 'title-md'
| 'title-medium'
| 'title-sm'
| 'title-small'
| 'title-xs'
| 'title-xsmall'
| 'title-caps'
| 'text-caps'
| 'text-lead'
| 'text-lg'
| 'text-large'
| 'text-body'
| 'text-lg-strong'
| 'text-large-strong'
| 'text-lg-light'
| 'text-large-light'
| 'text-md'
| 'text-medium'
| 'text-description'
| 'text-md-strong'
| 'text-medium-strong'
| 'text-md-light'
| 'text-medium-light'
| 'text-sm'
| 'text-small'
| 'text-info'
| 'text-sm-strong'
| 'text-small-strong'
| 'text-sm-light'
| 'text-small-light'
| 'text-micro'
| 'text-micro-strong'
| 'text-micro-light'
| 'text-quote'
| 'text-img'
| 'text-label'
| 'text-option'
// eslint-disable-next-line @typescript-eslint/ban-types
| (string & {});
/**
* Object containing all Elvia typographies.
*/
const ElviaTypography: { [typography: TypographyName]: { [property: string]: string } };
export default ElviaTypography;
}
export declare const getTypography: <Key extends "title-lg" | "title-md" | "title-sm" | "title-xs" | "title-caps" | "text-lead" | "text-lg" | "text-lg-strong" | "text-lg-light" | "text-md" | "text-md-strong" | "text-md-light" | "text-sm" | "text-sm-strong" | "text-sm-light" | "text-micro" | "text-micro-strong" | "text-micro-light" | "text-quote" | "text-img" | "text-label" | "text-option">(typographyName: Key) => {
'title-lg': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontSizeMobile: string;
fontWeight: string;
lineHeight: string;
lineHeightMobile: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'title-md': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontSizeMobile: string;
fontWeight: string;
lineHeight: string;
lineHeightMobile: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'title-sm': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontSizeMobile: string;
fontWeight: string;
lineHeight: string;
lineHeightMobile: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'title-xs': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontSizeMobile: string;
fontWeight: string;
lineHeight: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'title-caps': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontWeight: string;
lineHeight: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-lead': {
fontFamily: string;
fontSize: string;
fontSizeMobile: string;
fontWeight: string;
lineHeight: string;
lineHeightMobile: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-lg': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontSizeMobile: string;
fontWeight: string;
lineHeight: string;
lineHeightMobile: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-lg-strong': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontSizeMobile: string;
fontWeight: string;
lineHeight: string;
lineHeightMobile: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-lg-light': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontSizeMobile: string;
fontWeight: string;
lineHeight: string;
lineHeightMobile: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-md': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontWeight: string;
lineHeight: string;
lineHeightMobile: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-md-strong': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontWeight: string;
lineHeight: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-md-light': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontWeight: string;
lineHeight: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-sm': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontWeight: string;
lineHeight: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-sm-strong': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontWeight: string;
lineHeight: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-sm-light': {
altLabels: string[];
fontFamily: string;
fontSize: string;
fontWeight: string;
lineHeight: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-micro': {
fontFamily: string;
fontSize: string;
fontWeight: string;
lineHeight: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-micro-strong': {
fontFamily: string;
fontSize: string;
fontWeight: string;
lineHeight: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-micro-light': {
fontFamily: string;
fontSize: string;
fontWeight: string;
lineHeight: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-quote': {
fontFamily: string;
fontSize: string;
fontSizeMobile: string;
fontWeight: string;
lineHeight: string;
lineHeightMobile: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-img': {
fontFamily: string;
fontSize: string;
fontSizeMobile: string;
fontWeight: string;
lineHeight: string;
lineHeightMobile: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
textAlign: string;
};
'text-label': {
deprecated: string;
fontFamily: string;
fontSize: string;
fontWeight: string;
lineHeight: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
'text-option': {
deprecated: string;
fontFamily: string;
fontSize: string;
fontWeight: string;
lineHeight: string;
letterSpacing: string;
fontStyle: string;
textTransform: string;
color: string;
};
}[Key] | null;
/**
* @param typographyName Name of requested typography.
* @returns CSS-formatted string with all the properties of the typography, including a media query for mobile font properties.
*/
export declare const getTypographyCss: <Key extends "title-lg" | "title-md" | "title-sm" | "title-xs" | "title-caps" | "text-lead" | "text-lg" | "text-lg-strong" | "text-lg-light" | "text-md" | "text-md-strong" | "text-md-light" | "text-sm" | "text-sm-strong" | "text-sm-light" | "text-micro" | "text-micro-strong" | "text-micro-light" | "text-quote" | "text-img" | "text-label" | "text-option">(typographyName: Key) => string;

614

dist/elviaTypography.js

@@ -1,323 +0,313 @@

// THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN.
// DO NOT MAKE CHANGES TO THIS FILE DIRECTLY.
const ElviaTypography = {
'title-lg': {
altLabels: ['title-large'],
fontFamily: '"Red Hat Display", Verdana, sans-serif',
fontSize: '44px',
fontSizeMobile: '32px',
fontWeight: '900',
lineHeight: '53px',
lineHeightMobile: '34px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'title-md': {
altLabels: ['title-medium'],
fontFamily: '"Red Hat Display", Verdana, sans-serif',
fontSize: '30px',
fontSizeMobile: '24px',
fontWeight: '700',
lineHeight: '36px',
lineHeightMobile: '29px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'title-sm': {
altLabels: ['title-small'],
fontFamily: '"Red Hat Display", Verdana, sans-serif',
fontSize: '24px',
fontSizeMobile: '20px',
fontWeight: '700',
lineHeight: '29px',
lineHeightMobile: '24px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'title-xs': {
altLabels: ['title-xsmall'],
fontFamily: '"Red Hat Display", Verdana, sans-serif',
fontSize: '18px',
fontSizeMobile: '16px',
fontWeight: '700',
lineHeight: '22px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'title-caps': {
altLabels: ['text-caps'],
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '14px',
fontWeight: '500',
lineHeight: '17px',
letterSpacing: '0.8px',
fontStyle: 'unset',
textTransform: 'uppercase',
color: 'inherit',
},
'text-lead': {
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '24px',
fontSizeMobile: '22px',
fontWeight: '400',
lineHeight: '39px',
lineHeightMobile: '36px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'text-lg': {
altLabels: ['text-large', 'text-body'],
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '20px',
fontSizeMobile: '18px',
fontWeight: '400',
lineHeight: '32px',
lineHeightMobile: '29px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'text-lg-strong': {
altLabels: ['text-large-strong'],
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '20px',
fontSizeMobile: '18px',
fontWeight: '500',
lineHeight: '32px',
lineHeightMobile: '29px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'text-lg-light': {
altLabels: ['text-large-light'],
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '20px',
fontSizeMobile: '18px',
fontWeight: '400',
lineHeight: '32px',
lineHeightMobile: '29px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: '#515151',
},
'text-md': {
altLabels: ['text-medium', 'text-description'],
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '16px',
fontWeight: '400',
lineHeight: '28px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'text-md-strong': {
altLabels: ['text-medium-strong'],
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '16px',
fontWeight: '500',
lineHeight: '28px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'text-md-light': {
altLabels: ['text-medium-light'],
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '16px',
fontWeight: '400',
lineHeight: '28px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: '#515151',
},
'text-sm': {
altLabels: ['text-small', 'text-info'],
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '14px',
fontWeight: '400',
lineHeight: '22px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'text-sm-strong': {
altLabels: ['text-small-strong'],
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '14px',
fontWeight: '500',
lineHeight: '22px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'text-sm-light': {
altLabels: ['text-small-light'],
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '14px',
fontWeight: '400',
lineHeight: '22px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: '#515151',
},
'text-micro': {
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '11px',
fontWeight: '400',
lineHeight: '14px',
letterSpacing: '0.2px',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'text-micro-strong': {
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '11px',
fontWeight: '500',
lineHeight: '14px',
letterSpacing: '0.2px',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'text-micro-light': {
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '11px',
fontWeight: '400',
lineHeight: '14px',
letterSpacing: '0.2px',
fontStyle: 'unset',
textTransform: 'unset',
color: '#515151',
},
'text-quote': {
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '26px',
fontSizeMobile: '20px',
fontWeight: '400',
lineHeight: '42px',
lineHeightMobile: '32px',
letterSpacing: 'unset',
fontStyle: 'italic',
textTransform: 'unset',
color: 'inherit',
},
'text-img': {
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '18px',
fontSizeMobile: '16px',
fontWeight: '400',
lineHeight: '29px',
lineHeightMobile: '26px',
letterSpacing: 'unset',
fontStyle: 'italic',
textTransform: 'unset',
color: 'inherit',
textAlign: 'center',
},
'text-label': {
deprecated: '1.0.0',
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '16px',
fontWeight: '500',
lineHeight: '23px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'text-option': {
deprecated: '1.0.0',
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '16px',
fontWeight: '400',
lineHeight: '22px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTypographyCss = exports.getTypography = exports.ElviaTypography = void 0;
exports.ElviaTypography = {
'title-lg': {
altLabels: ['title-large'],
fontFamily: '"Red Hat Display", Verdana, sans-serif',
fontSize: '44px',
fontSizeMobile: '32px',
fontWeight: '900',
lineHeight: '53px',
lineHeightMobile: '34px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'title-md': {
altLabels: ['title-medium'],
fontFamily: '"Red Hat Display", Verdana, sans-serif',
fontSize: '30px',
fontSizeMobile: '24px',
fontWeight: '700',
lineHeight: '36px',
lineHeightMobile: '29px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'title-sm': {
altLabels: ['title-small'],
fontFamily: '"Red Hat Display", Verdana, sans-serif',
fontSize: '24px',
fontSizeMobile: '20px',
fontWeight: '700',
lineHeight: '29px',
lineHeightMobile: '24px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'title-xs': {
altLabels: ['title-xsmall'],
fontFamily: '"Red Hat Display", Verdana, sans-serif',
fontSize: '18px',
fontSizeMobile: '16px',
fontWeight: '700',
lineHeight: '22px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'title-caps': {
altLabels: ['text-caps'],
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '14px',
fontWeight: '500',
lineHeight: '17px',
letterSpacing: '0.8px',
fontStyle: 'unset',
textTransform: 'uppercase',
color: 'inherit',
},
'text-lead': {
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '24px',
fontSizeMobile: '22px',
fontWeight: '400',
lineHeight: '39px',
lineHeightMobile: '36px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'text-lg': {
altLabels: ['text-large', 'text-body'],
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '20px',
fontSizeMobile: '18px',
fontWeight: '400',
lineHeight: '32px',
lineHeightMobile: '29px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'text-lg-strong': {
altLabels: ['text-large-strong'],
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '20px',
fontSizeMobile: '18px',
fontWeight: '500',
lineHeight: '32px',
lineHeightMobile: '29px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'text-lg-light': {
altLabels: ['text-large-light'],
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '20px',
fontSizeMobile: '18px',
fontWeight: '400',
lineHeight: '32px',
lineHeightMobile: '29px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: '#515151',
},
'text-md': {
altLabels: ['text-medium', 'text-description'],
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '16px',
fontWeight: '400',
lineHeight: '28px',
lineHeightMobile: '160%',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'text-md-strong': {
altLabels: ['text-medium-strong'],
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '16px',
fontWeight: '500',
lineHeight: '28px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'text-md-light': {
altLabels: ['text-medium-light'],
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '16px',
fontWeight: '400',
lineHeight: '28px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: '#515151',
},
'text-sm': {
altLabels: ['text-small', 'text-info'],
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '14px',
fontWeight: '400',
lineHeight: '22px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'text-sm-strong': {
altLabels: ['text-small-strong'],
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '14px',
fontWeight: '500',
lineHeight: '22px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'text-sm-light': {
altLabels: ['text-small-light'],
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '14px',
fontWeight: '400',
lineHeight: '22px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: '#515151',
},
'text-micro': {
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '11px',
fontWeight: '400',
lineHeight: '14px',
letterSpacing: '0.2px',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'text-micro-strong': {
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '11px',
fontWeight: '500',
lineHeight: '14px',
letterSpacing: '0.2px',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'text-micro-light': {
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '11px',
fontWeight: '400',
lineHeight: '14px',
letterSpacing: '0.2px',
fontStyle: 'unset',
textTransform: 'unset',
color: '#515151',
},
'text-quote': {
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '26px',
fontSizeMobile: '20px',
fontWeight: '400',
lineHeight: '42px',
lineHeightMobile: '32px',
letterSpacing: 'unset',
fontStyle: 'italic',
textTransform: 'unset',
color: 'inherit',
},
'text-img': {
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '18px',
fontSizeMobile: '16px',
fontWeight: '400',
lineHeight: '29px',
lineHeightMobile: '26px',
letterSpacing: 'unset',
fontStyle: 'italic',
textTransform: 'unset',
color: 'inherit',
textAlign: 'center',
},
'text-label': {
deprecated: '1.0.0',
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '16px',
fontWeight: '500',
lineHeight: '23px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
'text-option': {
deprecated: '1.0.0',
fontFamily: '"Red Hat Text", Verdana, sans-serif',
fontSize: '16px',
fontWeight: '400',
lineHeight: '22px',
letterSpacing: 'unset',
fontStyle: 'unset',
textTransform: 'unset',
color: 'inherit',
},
};
exports.default = exports.ElviaTypography;
/**
* Get a typography style from elvis-typography.
* @param typographyName Name of requested typography.
* @returns Object containing CSS properties of typography.
*
*/
const getTypography = (typographyName) => {
if (!ElviaTypography[typographyName]) {
console.error(`Cannot get typography ${typographyName} from elvis-typography.`);
} else {
return ElviaTypography[typographyName];
}
if (exports.ElviaTypography[typographyName]) {
return exports.ElviaTypography[typographyName];
}
else {
console.error(`Cannot get typography ${typographyName} from elvis-typography.`);
return null;
}
};
exports.getTypography = getTypography;
const camelCaseToKebabCase = (camel) => {
return camel.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`);
return camel.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`);
};
/**
* @param typographyName Name of requested typography.
* @returns CSS-formatted string with all the properties of the typography, including a media query for mobile font properties.
*/
const getTypographyCss = (typographyName) => {
if (!ElviaTypography[typographyName]) {
console.error(`Cannot get typography ${typographyName} from elvis-typography.`);
return '';
}
let typographyString = '';
const mobileProperties = {};
for (const property in ElviaTypography[typographyName]) {
const value = ElviaTypography[typographyName][property];
if (property.endsWith('Mobile')) {
mobileProperties[property] = value;
} else if (property !== 'altLabels') {
typographyString += `${camelCaseToKebabCase(property)}: ${value};\n`;
const typography = (0, exports.getTypography)(typographyName);
if (!typography) {
console.error(`Cannot get typography ${typographyName} from elvis-typography.`);
return '';
}
}
if (Object.keys(mobileProperties).length > 0) {
typographyString += `@media (max-width: 767px) {\n`;
{
for (const property in mobileProperties) {
const value = mobileProperties[property];
typographyString += `\t${camelCaseToKebabCase(property.slice(0, -6))}: ${value};\n`;
}
let typographyString = '';
for (const property in typography) {
const value = typography[property];
if (!property.endsWith('Mobile') && property !== 'altLabels') {
typographyString += `${camelCaseToKebabCase(property)}: ${value};\n`;
}
}
typographyString += `}\n`;
}
return typographyString;
const mobileProperties = Object.fromEntries(Object.entries(typography).filter(([key]) => key.endsWith('Mobile')));
if (Object.keys(mobileProperties).length > 0) {
typographyString += `@media (max-width: 767px) {\n`;
{
for (const property in mobileProperties) {
const value = mobileProperties[property];
typographyString += `\t${camelCaseToKebabCase(property.slice(0, -6))}: ${value};\n`;
}
}
typographyString += `}\n`;
}
return typographyString;
};
exports.getTypographyCss = getTypographyCss;
exports.default = ElviaTypography;

@@ -1,258 +0,1 @@

{
"title-lg": {
"altLabels": ["title-large"],
"fontFamily": "\"Red Hat Display\", Verdana, sans-serif",
"fontSize": "44px",
"fontSizeMobile": "32px",
"fontWeight": "900",
"lineHeight": "53px",
"lineHeightMobile": "34px",
"letterSpacing": "unset",
"fontStyle": "unset",
"textTransform": "unset",
"color": "inherit"
},
"title-md": {
"altLabels": ["title-medium"],
"fontFamily": "\"Red Hat Display\", Verdana, sans-serif",
"fontSize": "30px",
"fontSizeMobile": "24px",
"fontWeight": "700",
"lineHeight": "36px",
"lineHeightMobile": "29px",
"letterSpacing": "unset",
"fontStyle": "unset",
"textTransform": "unset",
"color": "inherit"
},
"title-sm": {
"altLabels": ["title-small"],
"fontFamily": "\"Red Hat Display\", Verdana, sans-serif",
"fontSize": "24px",
"fontSizeMobile": "20px",
"fontWeight": "700",
"lineHeight": "29px",
"lineHeightMobile": "24px",
"letterSpacing": "unset",
"fontStyle": "unset",
"textTransform": "unset",
"color": "inherit"
},
"title-xs": {
"altLabels": ["title-xsmall"],
"fontFamily": "\"Red Hat Display\", Verdana, sans-serif",
"fontSize": "18px",
"fontSizeMobile": "16px",
"fontWeight": "700",
"lineHeight": "22px",
"letterSpacing": "unset",
"fontStyle": "unset",
"textTransform": "unset",
"color": "inherit"
},
"title-caps": {
"altLabels": ["text-caps"],
"fontFamily": "\"Red Hat Text\", Verdana, sans-serif",
"fontSize": "14px",
"fontWeight": "500",
"lineHeight": "17px",
"letterSpacing": "0.8px",
"fontStyle": "unset",
"textTransform": "uppercase",
"color": "inherit"
},
"text-lead": {
"fontFamily": "\"Red Hat Text\", Verdana, sans-serif",
"fontSize": "24px",
"fontSizeMobile": "22px",
"fontWeight": "400",
"lineHeight": "39px",
"lineHeightMobile": "36px",
"letterSpacing": "unset",
"fontStyle": "unset",
"textTransform": "unset",
"color": "inherit"
},
"text-lg": {
"altLabels": ["text-large", "text-body"],
"fontFamily": "\"Red Hat Text\", Verdana, sans-serif",
"fontSize": "20px",
"fontSizeMobile": "18px",
"fontWeight": "400",
"lineHeight": "32px",
"lineHeightMobile": "29px",
"letterSpacing": "unset",
"fontStyle": "unset",
"textTransform": "unset",
"color": "inherit"
},
"text-lg-strong": {
"altLabels": ["text-large-strong"],
"fontFamily": "\"Red Hat Text\", Verdana, sans-serif",
"fontSize": "20px",
"fontSizeMobile": "18px",
"fontWeight": "500",
"lineHeight": "32px",
"lineHeightMobile": "29px",
"letterSpacing": "unset",
"fontStyle": "unset",
"textTransform": "unset",
"color": "inherit"
},
"text-lg-light": {
"altLabels": ["text-large-light"],
"fontFamily": "\"Red Hat Text\", Verdana, sans-serif",
"fontSize": "20px",
"fontSizeMobile": "18px",
"fontWeight": "400",
"lineHeight": "32px",
"lineHeightMobile": "29px",
"letterSpacing": "unset",
"fontStyle": "unset",
"textTransform": "unset",
"color": "#515151"
},
"text-md": {
"altLabels": ["text-medium", "text-description"],
"fontFamily": "\"Red Hat Text\", Verdana, sans-serif",
"fontSize": "16px",
"fontWeight": "400",
"lineHeight": "28px",
"letterSpacing": "unset",
"fontStyle": "unset",
"textTransform": "unset",
"color": "inherit"
},
"text-md-strong": {
"altLabels": ["text-medium-strong"],
"fontFamily": "\"Red Hat Text\", Verdana, sans-serif",
"fontSize": "16px",
"fontWeight": "500",
"lineHeight": "28px",
"letterSpacing": "unset",
"fontStyle": "unset",
"textTransform": "unset",
"color": "inherit"
},
"text-md-light": {
"altLabels": ["text-medium-light"],
"fontFamily": "\"Red Hat Text\", Verdana, sans-serif",
"fontSize": "16px",
"fontWeight": "400",
"lineHeight": "28px",
"letterSpacing": "unset",
"fontStyle": "unset",
"textTransform": "unset",
"color": "#515151"
},
"text-sm": {
"altLabels": ["text-small", "text-info"],
"fontFamily": "\"Red Hat Text\", Verdana, sans-serif",
"fontSize": "14px",
"fontWeight": "400",
"lineHeight": "22px",
"letterSpacing": "unset",
"fontStyle": "unset",
"textTransform": "unset",
"color": "inherit"
},
"text-sm-strong": {
"altLabels": ["text-small-strong"],
"fontFamily": "\"Red Hat Text\", Verdana, sans-serif",
"fontSize": "14px",
"fontWeight": "500",
"lineHeight": "22px",
"letterSpacing": "unset",
"fontStyle": "unset",
"textTransform": "unset",
"color": "inherit"
},
"text-sm-light": {
"altLabels": ["text-small-light"],
"fontFamily": "\"Red Hat Text\", Verdana, sans-serif",
"fontSize": "14px",
"fontWeight": "400",
"lineHeight": "22px",
"letterSpacing": "unset",
"fontStyle": "unset",
"textTransform": "unset",
"color": "#515151"
},
"text-micro": {
"fontFamily": "\"Red Hat Text\", Verdana, sans-serif",
"fontSize": "11px",
"fontWeight": "400",
"lineHeight": "14px",
"letterSpacing": "0.2px",
"fontStyle": "unset",
"textTransform": "unset",
"color": "inherit"
},
"text-micro-strong": {
"fontFamily": "\"Red Hat Text\", Verdana, sans-serif",
"fontSize": "11px",
"fontWeight": "500",
"lineHeight": "14px",
"letterSpacing": "0.2px",
"fontStyle": "unset",
"textTransform": "unset",
"color": "inherit"
},
"text-micro-light": {
"fontFamily": "\"Red Hat Text\", Verdana, sans-serif",
"fontSize": "11px",
"fontWeight": "400",
"lineHeight": "14px",
"letterSpacing": "0.2px",
"fontStyle": "unset",
"textTransform": "unset",
"color": "#515151"
},
"text-quote": {
"fontFamily": "\"Red Hat Text\", Verdana, sans-serif",
"fontSize": "26px",
"fontSizeMobile": "20px",
"fontWeight": "400",
"lineHeight": "42px",
"lineHeightMobile": "32px",
"letterSpacing": "unset",
"fontStyle": "italic",
"textTransform": "unset",
"color": "inherit"
},
"text-img": {
"fontFamily": "\"Red Hat Text\", Verdana, sans-serif",
"fontSize": "18px",
"fontSizeMobile": "16px",
"fontWeight": "400",
"lineHeight": "29px",
"lineHeightMobile": "26px",
"letterSpacing": "unset",
"fontStyle": "italic",
"textTransform": "unset",
"color": "inherit",
"textAlign": "center"
},
"text-label": {
"deprecated": "1.0.0",
"fontFamily": "\"Red Hat Text\", Verdana, sans-serif",
"fontSize": "16px",
"fontWeight": "500",
"lineHeight": "23px",
"letterSpacing": "unset",
"fontStyle": "unset",
"textTransform": "unset",
"color": "inherit"
},
"text-option": {
"deprecated": "1.0.0",
"fontFamily": "\"Red Hat Text\", Verdana, sans-serif",
"fontSize": "16px",
"fontWeight": "400",
"lineHeight": "22px",
"letterSpacing": "unset",
"fontStyle": "unset",
"textTransform": "unset",
"color": "inherit"
}
}
{"title-lg":{"altLabels":["title-large"],"fontFamily":"\"Red Hat Display\", Verdana, sans-serif","fontSize":"44px","fontSizeMobile":"32px","fontWeight":"900","lineHeight":"53px","lineHeightMobile":"34px","letterSpacing":"unset","fontStyle":"unset","textTransform":"unset","color":"inherit"},"title-md":{"altLabels":["title-medium"],"fontFamily":"\"Red Hat Display\", Verdana, sans-serif","fontSize":"30px","fontSizeMobile":"24px","fontWeight":"700","lineHeight":"36px","lineHeightMobile":"29px","letterSpacing":"unset","fontStyle":"unset","textTransform":"unset","color":"inherit"},"title-sm":{"altLabels":["title-small"],"fontFamily":"\"Red Hat Display\", Verdana, sans-serif","fontSize":"24px","fontSizeMobile":"20px","fontWeight":"700","lineHeight":"29px","lineHeightMobile":"24px","letterSpacing":"unset","fontStyle":"unset","textTransform":"unset","color":"inherit"},"title-xs":{"altLabels":["title-xsmall"],"fontFamily":"\"Red Hat Display\", Verdana, sans-serif","fontSize":"18px","fontSizeMobile":"16px","fontWeight":"700","lineHeight":"22px","letterSpacing":"unset","fontStyle":"unset","textTransform":"unset","color":"inherit"},"title-caps":{"altLabels":["text-caps"],"fontFamily":"\"Red Hat Text\", Verdana, sans-serif","fontSize":"14px","fontWeight":"500","lineHeight":"17px","letterSpacing":"0.8px","fontStyle":"unset","textTransform":"uppercase","color":"inherit"},"text-lead":{"fontFamily":"\"Red Hat Text\", Verdana, sans-serif","fontSize":"24px","fontSizeMobile":"22px","fontWeight":"400","lineHeight":"39px","lineHeightMobile":"36px","letterSpacing":"unset","fontStyle":"unset","textTransform":"unset","color":"inherit"},"text-lg":{"altLabels":["text-large","text-body"],"fontFamily":"\"Red Hat Text\", Verdana, sans-serif","fontSize":"20px","fontSizeMobile":"18px","fontWeight":"400","lineHeight":"32px","lineHeightMobile":"29px","letterSpacing":"unset","fontStyle":"unset","textTransform":"unset","color":"inherit"},"text-lg-strong":{"altLabels":["text-large-strong"],"fontFamily":"\"Red Hat Text\", Verdana, sans-serif","fontSize":"20px","fontSizeMobile":"18px","fontWeight":"500","lineHeight":"32px","lineHeightMobile":"29px","letterSpacing":"unset","fontStyle":"unset","textTransform":"unset","color":"inherit"},"text-lg-light":{"altLabels":["text-large-light"],"fontFamily":"\"Red Hat Text\", Verdana, sans-serif","fontSize":"20px","fontSizeMobile":"18px","fontWeight":"400","lineHeight":"32px","lineHeightMobile":"29px","letterSpacing":"unset","fontStyle":"unset","textTransform":"unset","color":"#515151"},"text-md":{"altLabels":["text-medium","text-description"],"fontFamily":"\"Red Hat Text\", Verdana, sans-serif","fontSize":"16px","fontWeight":"400","lineHeight":"28px","lineHeightMobile":"160%","letterSpacing":"unset","fontStyle":"unset","textTransform":"unset","color":"inherit"},"text-md-strong":{"altLabels":["text-medium-strong"],"fontFamily":"\"Red Hat Text\", Verdana, sans-serif","fontSize":"16px","fontWeight":"500","lineHeight":"28px","letterSpacing":"unset","fontStyle":"unset","textTransform":"unset","color":"inherit"},"text-md-light":{"altLabels":["text-medium-light"],"fontFamily":"\"Red Hat Text\", Verdana, sans-serif","fontSize":"16px","fontWeight":"400","lineHeight":"28px","letterSpacing":"unset","fontStyle":"unset","textTransform":"unset","color":"#515151"},"text-sm":{"altLabels":["text-small","text-info"],"fontFamily":"\"Red Hat Text\", Verdana, sans-serif","fontSize":"14px","fontWeight":"400","lineHeight":"22px","letterSpacing":"unset","fontStyle":"unset","textTransform":"unset","color":"inherit"},"text-sm-strong":{"altLabels":["text-small-strong"],"fontFamily":"\"Red Hat Text\", Verdana, sans-serif","fontSize":"14px","fontWeight":"500","lineHeight":"22px","letterSpacing":"unset","fontStyle":"unset","textTransform":"unset","color":"inherit"},"text-sm-light":{"altLabels":["text-small-light"],"fontFamily":"\"Red Hat Text\", Verdana, sans-serif","fontSize":"14px","fontWeight":"400","lineHeight":"22px","letterSpacing":"unset","fontStyle":"unset","textTransform":"unset","color":"#515151"},"text-micro":{"fontFamily":"\"Red Hat Text\", Verdana, sans-serif","fontSize":"11px","fontWeight":"400","lineHeight":"14px","letterSpacing":"0.2px","fontStyle":"unset","textTransform":"unset","color":"inherit"},"text-micro-strong":{"fontFamily":"\"Red Hat Text\", Verdana, sans-serif","fontSize":"11px","fontWeight":"500","lineHeight":"14px","letterSpacing":"0.2px","fontStyle":"unset","textTransform":"unset","color":"inherit"},"text-micro-light":{"fontFamily":"\"Red Hat Text\", Verdana, sans-serif","fontSize":"11px","fontWeight":"400","lineHeight":"14px","letterSpacing":"0.2px","fontStyle":"unset","textTransform":"unset","color":"#515151"},"text-quote":{"fontFamily":"\"Red Hat Text\", Verdana, sans-serif","fontSize":"26px","fontSizeMobile":"20px","fontWeight":"400","lineHeight":"42px","lineHeightMobile":"32px","letterSpacing":"unset","fontStyle":"italic","textTransform":"unset","color":"inherit"},"text-img":{"fontFamily":"\"Red Hat Text\", Verdana, sans-serif","fontSize":"18px","fontSizeMobile":"16px","fontWeight":"400","lineHeight":"29px","lineHeightMobile":"26px","letterSpacing":"unset","fontStyle":"italic","textTransform":"unset","color":"inherit","textAlign":"center"},"text-label":{"deprecated":"1.0.0","fontFamily":"\"Red Hat Text\", Verdana, sans-serif","fontSize":"16px","fontWeight":"500","lineHeight":"23px","letterSpacing":"unset","fontStyle":"unset","textTransform":"unset","color":"inherit"},"text-option":{"deprecated":"1.0.0","fontFamily":"\"Red Hat Text\", Verdana, sans-serif","fontSize":"16px","fontWeight":"400","lineHeight":"22px","letterSpacing":"unset","fontStyle":"unset","textTransform":"unset","color":"inherit"}}
{
"name": "@elvia/elvis-typography",
"version": "2.3.1",
"version": "2.3.2",
"description": "Elvia typography",
"license": "MIT",
"author": "",
"main": "dist/elviaTypography.js",
"types": "dist/elviaTypography.d.ts",
"style": "dist/elviaTypography.scss",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "gulp"
},
"files": [
"CHANGELOG.json",
"README.md",
"dist/**/*"
],
"devDependencies": {
"@types/gulp": "^4.0.10",
"@types/gulp-typescript": "^2.13.0",
"@types/node": "^18.11.18",
"del": "^6.0.0",
"gulp": "^4.0.2",
"gulp-header": "^2.0.9",
"gulp-prettier": "^4.0.0",
"gulp-tap": "^2.0.0"
"gulp-typescript": "^6.0.0-alpha.1",
"ts-node": "^10.9.1",
"typescript": "~4.9.5"
}
}
}
# Elvia typography
**This package is meant for internal use only. All typographies are available through
[Elvis](https://www.npmjs.com/package/@elvia/elvis). This package should not be imported by an end-user
directly.**
Available typography reflect the typography classes availabe at

@@ -4,0 +8,0 @@ [design.elvia.io](https://design.elvia.io/brand/typography).

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc