@metamask/design-system-twrnc-preset
Version:
1 lines • 12.3 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;gBACjE,UAAU,EAAE,0BAAU,CAAC,UAAU,CAAC,UAAU;aAC7C;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;gBACjE,UAAU,EAAE,0BAAU,CAAC,UAAU,CAAC,UAAU;aAC7C;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;gBACjE,UAAU,EAAE,0BAAU,CAAC,UAAU,CAAC,UAAU;aAC7C;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;gBACjE,UAAU,EAAE,0BAAU,CAAC,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\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 fontWeight: typography.sDisplayLG.fontWeight,\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 fontWeight: typography.sDisplayMD.fontWeight,\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 fontWeight: typography.sHeadingLG.fontWeight,\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 fontWeight: typography.sHeadingMD.fontWeight,\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 fontWeight: typography.sHeadingSM.fontWeight,\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 fontWeight: typography.sBodyLGMedium.fontWeight,\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 fontWeight: typography.sBodyMD.fontWeight,\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 fontWeight: typography.sBodySM.fontWeight,\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 fontWeight: typography.sBodyXS.fontWeight,\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 fontWeight: typography.sPageHeading.fontWeight,\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 fontWeight: typography.sSectionHeading.fontWeight,\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 fontWeight: typography.sButtonLabelMd.fontWeight,\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 fontWeight: typography.sButtonLabelLg.fontWeight,\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 fontWeight: typography.sAmountDisplayLg.fontWeight,\n },\n ],\n },\n fontFamily: {\n 'default-regular': 'Geist Regular',\n 'default-regular-italic': 'Geist Regular Italic',\n 'default-medium': 'Geist Medium',\n 'default-medium-italic': 'Geist Medium Italic',\n 'default-bold': 'Geist Bold',\n 'default-bold-italic': 'Geist Bold Italic',\n 'accent-regular': 'MM Sans Regular',\n 'accent-medium': 'MM Sans Medium',\n 'accent-bold': 'MM Sans Bold',\n 'hero-regular': 'MM Poly 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"]}