@metamask/design-system-twrnc-preset
Version:
1 lines • 10.9 kB
Source Map (JSON)
{"version":3,"file":"typography.cjs","sourceRoot":"","sources":["../src/typography.ts"],"names":[],"mappings":";;;AAAA,2DAAqD;AAIxC,QAAA,wBAAwB,GAAkC;IACrE,QAAQ,EAAE;QACR,YAAY,EAAE;YACZ,0BAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,EAAE;YACzC;gBACE,UAAU,EAAE,GAAG,0BAAU,CAAC,UAAU,CAAC,UAAoB,IAAI;gBAC7D,aAAa,EAAE,GAAG,0BAAU,CAAC,UAAU,CAAC,aAAuB,EAAE;aAClE;SACF;QACD,YAAY,EAAE;YACZ,0BAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,EAAE;YACzC;gBACE,UAAU,EAAE,GAAG,0BAAU,CAAC,UAAU,CAAC,UAAoB,IAAI;gBAC7D,aAAa,EAAE,GAAG,0BAAU,CAAC,UAAU,CAAC,aAAuB,EAAE;aAClE;SACF;QACD,YAAY,EAAE;YACZ,0BAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,EAAE;YACzC;gBACE,UAAU,EAAE,GAAG,0BAAU,CAAC,UAAU,CAAC,UAAoB,IAAI;gBAC7D,aAAa,EAAE,GAAG,0BAAU,CAAC,UAAU,CAAC,aAAuB,EAAE;aAClE;SACF;QACD,YAAY,EAAE;YACZ,0BAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,EAAE;YACzC;gBACE,UAAU,EAAE,GAAG,0BAAU,CAAC,UAAU,CAAC,UAAoB,IAAI;gBAC7D,aAAa,EAAE,GAAG,0BAAU,CAAC,UAAU,CAAC,aAAuB,EAAE;aAClE;SACF;QACD,YAAY,EAAE;YACZ,0BAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,EAAE;YACzC;gBACE,UAAU,EAAE,GAAG,0BAAU,CAAC,UAAU,CAAC,UAAoB,IAAI;gBAC7D,aAAa,EAAE,GAAG,0BAAU,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oB,IAAI;QACzD,SAAS,EAAE,GAAG,0BAAU,CAAC,OAAO,CAAC,UAAoB,IAAI;QACzD,SAAS,EAAE,GAAG,0BAAU,CAAC,OAAO,CAAC,UAAoB,IAAI;QACzD,cAAc,EAAE,GAAG,0BAAU,CAAC,YAAY,CAAC,UAAoB,IAAI;QACnE,iBAAiB,EAAE,GAAG,0BAAU,CAAC,eAAe,CAAC,UAAoB,IAAI;QACzE,iBAAiB,EAAE,GAAG,0BAAU,CAAC,cAAc,CAAC,UAAoB,IAAI;QACxE,iBAAiB,EAAE,GAAG,0BAAU,CAAC,cAAc,CAAC,UAAoB,IAAI;QACxE,mBAAmB,EAAE,GAAG,0BAAU,CAAC,gBAAgB,CAAC,UAAoB,IAAI;KAC7E;CACF,CAAC","sourcesContent":["import { typography } from '@metamask/design-tokens';\n\nimport type { TypographyTailwindConfigProps } from './typography.types';\n\nexport const typographyTailwindConfig: TypographyTailwindConfigProps = {\n fontSize: {\n 'display-lg': [\n typography.sDisplayLG.fontSize.toString(),\n {\n lineHeight: `${typography.sDisplayLG.lineHeight as number}px`,\n letterSpacing: `${typography.sDisplayLG.letterSpacing as number}`,\n },\n ],\n 'display-md': [\n typography.sDisplayMD.fontSize.toString(),\n {\n lineHeight: `${typography.sDisplayMD.lineHeight as number}px`,\n letterSpacing: `${typography.sDisplayMD.letterSpacing as number}`,\n },\n ],\n 'heading-lg': [\n typography.sHeadingLG.fontSize.toString(),\n {\n lineHeight: `${typography.sHeadingLG.lineHeight as number}px`,\n letterSpacing: `${typography.sHeadingLG.letterSpacing as number}`,\n },\n ],\n 'heading-md': [\n typography.sHeadingMD.fontSize.toString(),\n {\n lineHeight: `${typography.sHeadingMD.lineHeight as number}px`,\n letterSpacing: `${typography.sHeadingMD.letterSpacing as number}`,\n },\n ],\n 'heading-sm': [\n typography.sHeadingSM.fontSize.toString(),\n {\n lineHeight: `${typography.sHeadingSM.lineHeight as number}px`,\n letterSpacing: `${typography.sHeadingSM.letterSpacing as number}`,\n },\n ],\n 'body-lg': [\n typography.sBodyLGMedium.fontSize.toString(),\n {\n lineHeight: `${typography.sBodyLGMedium.lineHeight as number}px`,\n letterSpacing: `${typography.sBodyLGMedium.letterSpacing as number}`,\n },\n ],\n 'body-md': [\n typography.sBodyMD.fontSize.toString(),\n {\n lineHeight: `${typography.sBodyMD.lineHeight as number}px`,\n letterSpacing: `${typography.sBodyMD.letterSpacing as number}`,\n },\n ],\n 'body-sm': [\n typography.sBodySM.fontSize.toString(),\n {\n lineHeight: `${typography.sBodySM.lineHeight as number}px`,\n letterSpacing: `${typography.sBodySM.letterSpacing as number}`,\n },\n ],\n 'body-xs': [\n typography.sBodyXS.fontSize.toString(),\n {\n lineHeight: `${typography.sBodyXS.lineHeight as number}px`,\n letterSpacing: `${typography.sBodyXS.letterSpacing as number}`,\n },\n ],\n 'page-heading': [\n typography.sPageHeading.fontSize.toString(),\n {\n lineHeight: `${typography.sPageHeading.lineHeight as number}px`,\n letterSpacing: `${typography.sPageHeading.letterSpacing as number}`,\n },\n ],\n 'section-heading': [\n typography.sSectionHeading.fontSize.toString(),\n {\n lineHeight: `${typography.sSectionHeading.lineHeight as number}px`,\n letterSpacing: `${typography.sSectionHeading.letterSpacing as number}`,\n },\n ],\n 'button-label-md': [\n typography.sButtonLabelMd.fontSize.toString(),\n {\n lineHeight: `${typography.sButtonLabelMd.lineHeight as number}px`,\n letterSpacing: `${typography.sButtonLabelMd.letterSpacing as number}`,\n },\n ],\n 'button-label-lg': [\n typography.sButtonLabelLg.fontSize.toString(),\n {\n lineHeight: `${typography.sButtonLabelLg.lineHeight as number}px`,\n letterSpacing: `${typography.sButtonLabelLg.letterSpacing as number}`,\n },\n ],\n 'amount-display-lg': [\n typography.sAmountDisplayLg.fontSize.toString(),\n {\n lineHeight: `${typography.sAmountDisplayLg.lineHeight as number}px`,\n letterSpacing: `${typography.sAmountDisplayLg.letterSpacing as number}`,\n },\n ],\n },\n fontFamily: {\n 'default-regular': 'Geist-Regular',\n 'default-regular-italic': 'Geist-RegularItalic',\n 'default-medium': 'Geist-Medium',\n 'default-medium-italic': 'Geist-MediumItalic',\n 'default-bold': 'Geist-SemiBold',\n 'default-bold-italic': 'Geist-SemiBoldItalic',\n 'accent-regular': 'MMSans-Regular',\n 'accent-medium': 'MMSans-Medium',\n 'accent-bold': 'MMSans-Bold',\n 'hero-regular': 'MMPoly-Regular',\n },\n letterSpacing: {\n 'display-lg': `${typography.sDisplayLG.letterSpacing as number}`,\n 'display-md': `${typography.sDisplayMD.letterSpacing as number}`,\n 'heading-lg': `${typography.sHeadingLG.letterSpacing as number}`,\n 'heading-md': `${typography.sHeadingMD.letterSpacing as number}`,\n 'heading-sm': `${typography.sHeadingSM.letterSpacing as number}`,\n 'body-lg': `${typography.sBodyLGMedium.letterSpacing as number}`,\n 'body-md': `${typography.sBodyMD.letterSpacing as number}`,\n 'body-sm': `${typography.sBodySM.letterSpacing as number}`,\n 'body-xs': `${typography.sBodyXS.letterSpacing as number}`,\n 'page-heading': `${typography.sPageHeading.letterSpacing as number}`,\n 'section-heading': `${typography.sSectionHeading.letterSpacing as number}`,\n 'button-label-md': `${typography.sButtonLabelMd.letterSpacing as number}`,\n 'button-label-lg': `${typography.sButtonLabelLg.letterSpacing as number}`,\n 'amount-display-lg': `${typography.sAmountDisplayLg.letterSpacing as number}`,\n },\n lineHeight: {\n 'display-lg': `${typography.sDisplayLG.lineHeight as number}px`,\n 'display-md': `${typography.sDisplayMD.lineHeight as number}px`,\n 'heading-lg': `${typography.sHeadingLG.lineHeight as number}px`,\n 'heading-md': `${typography.sHeadingMD.lineHeight as number}px`,\n 'heading-sm': `${typography.sHeadingSM.lineHeight as number}px`,\n 'body-lg': `${typography.sBodyLGMedium.lineHeight as number}px`,\n 'body-md': `${typography.sBodyMD.lineHeight as number}px`,\n 'body-sm': `${typography.sBodySM.lineHeight as number}px`,\n 'body-xs': `${typography.sBodyXS.lineHeight as number}px`,\n 'page-heading': `${typography.sPageHeading.lineHeight as number}px`,\n 'section-heading': `${typography.sSectionHeading.lineHeight as number}px`,\n 'button-label-md': `${typography.sButtonLabelMd.lineHeight as number}px`,\n 'button-label-lg': `${typography.sButtonLabelLg.lineHeight as number}px`,\n 'amount-display-lg': `${typography.sAmountDisplayLg.lineHeight as number}px`,\n },\n};\n"]}