@contentful/f36-typography 4.8.0 → 4.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2048](https://github.com/contentful/forma-36/pull/2048) [`7afca5e6`](https://github.com/contentful/forma-36/commit/7afca5e6f9d89b1f187fc48ab8e8fd39366f110b) Thanks [@andipaetzold](https://github.com/andipaetzold)! - Fix issue with types being generated wrongly
8
+
9
+ - Updated dependencies []:
10
+ - @contentful/f36-core@4.8.1
11
+
3
12
  ## 4.8.0
4
13
 
5
14
  ### Patch Changes
package/dist/main.js CHANGED
@@ -99,12 +99,12 @@ const $c0b2d07258fbc250$export$5404b1d39162d870 = /*#__PURE__*/ ($parcel$interop
99
99
 
100
100
 
101
101
 
102
- function $d22050ec5fdf0a29$export$1c6175f3aa4394b7(props) {
102
+ const $d22050ec5fdf0a29$export$1c6175f3aa4394b7 = (props)=>{
103
103
  $5fdCT$react.useEffect(()=>{
104
104
  console.warn('Forma 36: Typography component is deprecated. You can safely remove it from your components.');
105
105
  }, []);
106
106
  return /*#__PURE__*/ ($parcel$interopDefault($5fdCT$react)).createElement(($parcel$interopDefault($5fdCT$react)).Fragment, null, props.children);
107
- }
107
+ };
108
108
  $d22050ec5fdf0a29$export$1c6175f3aa4394b7.displayName = 'Typography';
109
109
 
110
110
 
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;AEAA;A;;;;;AE6BA,MAAMkD,sCAAgB,GAAG,MAAzB,AAAA;AAEA,SAASC,oCAAT,GAA0B;IACxB,OAAA,aAAO,CAAA,kBAAP,CAAA;QAAO,IAAA,EAAA,QAAA;QAAA,MAAA,EAAA,4DAAA;KAAA,CAAP,CAAO;CAKR;AAED,SAASC,oCAAT,GAA0B;IACxB,OAAA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AC,yCAAD;QACE,EAAA,EAAIsC,iDAAD;QACH,MAAA,EAAQxC,MAAD;QACP,YAAA,EAAa,UAHf;QAIE,UAAA,EAAW,oBAJb;QAKE,SAAA,EAAU,SALZ;QAME,QAAA,EAAS,WANX;QAOE,UAAA,EAAW,aAPb;QAQE,SAAA,EAAW,iBAAA,CAAA,aACT,CAAA,kBAAA,CAAI;YACF2C,aAAa,EAAErC,oDAAM,CAACsC,iBADpB;YAEFC,aAAa,EAAE,WAAfA;SAFF,CADS,EAKTtB,SALS,CAAD;QAOV,GAAItB,UAAJ;QACA,GAAA,EAAKC,GAAD;OAEHT,QAAD,CAnBJ,CAoBF;CAEC;AAEDiD,qCAAe,CAACtC,WAAhB,GAA8B,gBAA9B,CAAAsC;AAEO,MAAMhE,yCAAc,iBAGvBM,sCAAK,CAACqB,UAAN,CAAiBqC,qCAAjB,CAHG,AAAP;;;;AE9DA;;AAkBO,MAAM9D,yCAAS,iBAAGI,sCAAK,CAACqB,UAAU,CAGvC,CAAC,EArBH,UAqBKZ,QAAF,CAAA,UAAYO,MAAM,GAAG,iBAArB,GAAwC,GAAGC,UAAH,EAAzC,EAA0DC,GAA1D,GAAkE;IAClE,qBACE,qDAAC,yCAAD;QACE,EAAA,EAAG,GADL;QAEE,MAAA,EAAQF,MAAD;QACP,YAAA,EAAa,UAHf;QAIE,UAAA,EAAW,aAJb;QAKE,GAAIC,UAAJ;QACA,GAAA,EAAKC,GAAD;OAEHT,QAAD,CATJ,CAUF;CAdyB,CAAlB,AAgBN;AAEDb,yCAAS,CAACwB,WAAV,GAAwB,WAAxB,CAAAxB;;","sources":["packages/components/typography/src/index.ts","packages/components/typography/src/Heading/index.ts","packages/components/typography/src/Heading/Heading.tsx","packages/components/typography/src/Text/index.ts","packages/components/typography/src/Text/Text.tsx","packages/components/typography/src/Subheading/index.ts","packages/components/typography/src/Subheading/Subheading.tsx","packages/components/typography/src/Typography.tsx","packages/components/typography/src/DisplayText/index.ts","packages/components/typography/src/DisplayText/DisplayText.tsx","packages/components/typography/src/SectionHeading/index.ts","packages/components/typography/src/SectionHeading/SectionHeading.tsx","packages/components/typography/src/Paragraph/index.ts","packages/components/typography/src/Paragraph/Paragraph.tsx"],"sourcesContent":["export { Heading } from './Heading';\nexport type { HeadingProps, HeadingElement } from './Heading';\nexport { Subheading } from './Subheading';\nexport type { SubheadingProps } from './Subheading';\nexport { Typography } from './Typography';\nexport type { TypographyProps } from './Typography';\nexport { DisplayText } from './DisplayText';\nexport type { DisplayTextProps } from './DisplayText';\nexport { SectionHeading } from './SectionHeading';\nexport type { SectionHeadingProps } from './SectionHeading';\nexport { Paragraph } from './Paragraph';\nexport type { ParagraphProps } from './Paragraph';\nexport { Text } from './Text';\nexport type { TextProps } from './Text';\n","export { Heading } from './Heading';\nexport type { HeadingProps, HeadingElement } from './Heading';\n","import React from 'react';\nimport type {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport { Text } from '../Text';\n\nconst HEADING_DEFAULT_TAG = 'h1';\n\nexport type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n\nexport interface HeadingInternalProps extends CommonProps, MarginProps {\n as?: HeadingElement;\n children?: React.ReactNode;\n isTruncated?: boolean;\n isWordBreak?: boolean;\n}\n\nexport type HeadingProps<\n E extends React.ElementType = typeof HEADING_DEFAULT_TAG\n> = PolymorphicProps<HeadingInternalProps, E>;\n\nfunction _Heading<E extends React.ElementType = typeof HEADING_DEFAULT_TAG>(\n { children, testId = 'cf-ui-heading', ...otherProps }: HeadingProps<E>,\n ref: React.Ref<any>,\n) {\n return (\n <Text\n as={HEADING_DEFAULT_TAG}\n testId={testId}\n marginBottom=\"spacingM\"\n fontWeight=\"fontWeightDemiBold\"\n fontColor=\"gray900\"\n fontSize=\"fontSizeXl\"\n lineHeight=\"lineHeightXl\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\n_Heading.displayName = 'Heading';\n\nexport const Heading: PolymorphicComponent<\n ExpandProps<HeadingInternalProps>,\n typeof HEADING_DEFAULT_TAG\n> = React.forwardRef(_Heading);\n","export { Text } from './Text';\nexport type { TextProps } from './Text';\n","import React from 'react';\nimport tokens, {\n FontSizeTokens,\n LineHeightTokens,\n FontWeightTokens,\n FontStackTokens,\n ColorTokens,\n} from '@contentful/f36-tokens';\nimport { css, cx } from 'emotion';\nimport { Box } from '@contentful/f36-core';\nimport type {\n PolymorphicComponent,\n CommonProps,\n MarginProps,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\n\nexport interface TextInternalProps extends CommonProps, MarginProps {\n children?: React.ReactNode;\n fontSize?: FontSizeTokens;\n lineHeight?: LineHeightTokens;\n fontStack?: FontStackTokens;\n fontWeight?: FontWeightTokens;\n fontColor?: ColorTokens;\n isTruncated?: boolean;\n isWordBreak?: boolean;\n}\n\nconst TEXT_DEFAULT_TAG = 'span';\n\nfunction truncatedStyle() {\n return css({\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n });\n}\n\nfunction wordBreakStyle() {\n return css({\n wordBreak: 'break-word',\n });\n}\n\nexport type TextProps<\n E extends React.ElementType = typeof TEXT_DEFAULT_TAG\n> = PolymorphicProps<TextInternalProps, E>;\n\nfunction _Text<E extends React.ElementType = typeof TEXT_DEFAULT_TAG>(\n {\n fontSize = 'fontSizeM',\n fontStack = 'fontStackPrimary',\n fontWeight = 'fontWeightNormal',\n fontColor = 'gray800',\n lineHeight = 'lineHeightM',\n children,\n isTruncated,\n isWordBreak,\n as,\n className,\n margin = 'none',\n ...otherProps\n }: TextProps<E>,\n ref: React.Ref<any>,\n) {\n const Element: React.ElementType = as || TEXT_DEFAULT_TAG;\n\n return (\n <Box\n {...otherProps}\n as={Element}\n className={cx(\n css({\n padding: 0,\n fontFamily: tokens[fontStack],\n fontWeight: tokens[fontWeight],\n color: tokens[fontColor],\n fontSize: tokens[fontSize],\n lineHeight: tokens[lineHeight],\n }),\n isTruncated ? truncatedStyle() : null,\n isWordBreak ? wordBreakStyle() : null,\n className,\n )}\n margin={margin}\n ref={ref}\n >\n {children}\n </Box>\n );\n}\n\n_Text.displayName = 'Text';\n\nexport const Text: PolymorphicComponent<\n ExpandProps<TextInternalProps>,\n typeof TEXT_DEFAULT_TAG\n> = React.forwardRef(_Text);\n","export { Subheading } from './Subheading';\nexport type { SubheadingProps } from './Subheading';\n","import React from 'react';\nimport type {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport type { HeadingElement } from '../Heading';\nimport { Text } from '../Text';\n\nconst SUBHEADING_DEFAULT_TAG = 'h3';\n\nexport interface SubheadingInternalProps extends CommonProps, MarginProps {\n as?: HeadingElement;\n isTruncated?: boolean;\n isWordBreak?: boolean;\n}\n\nexport type SubheadingProps<\n E extends React.ElementType = typeof SUBHEADING_DEFAULT_TAG\n> = PolymorphicProps<SubheadingInternalProps, E>;\n\nfunction _Subheading<\n E extends React.ElementType = typeof SUBHEADING_DEFAULT_TAG\n>(\n { children, testId = 'cf-ui-subheading', ...otherProps }: SubheadingProps<E>,\n ref: React.Ref<any>,\n) {\n return (\n <Text\n as={SUBHEADING_DEFAULT_TAG}\n testId={testId}\n marginBottom=\"spacingM\"\n fontSize=\"fontSizeL\"\n lineHeight=\"lineHeightL\"\n fontWeight=\"fontWeightDemiBold\"\n fontColor=\"gray900\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\n_Subheading.displayName = 'Subheading';\n\nexport const Subheading: PolymorphicComponent<\n ExpandProps<SubheadingInternalProps>,\n typeof SUBHEADING_DEFAULT_TAG\n> = React.forwardRef(_Subheading);\n","import React, { useEffect } from 'react';\n\nexport interface TypographyProps {\n children?: React.ReactNode;\n}\n\n/**\n * @deprecated\n */\nexport function Typography(props: TypographyProps) {\n useEffect(() => {\n console.warn(\n 'Forma 36: Typography component is deprecated. You can safely remove it from your components.',\n );\n }, []);\n return <>{props.children}</>;\n}\n\nTypography.displayName = 'Typography';\n","export { DisplayText } from './DisplayText';\nexport type { DisplayTextProps } from './DisplayText';\n","import React from 'react';\nimport { FontSizeTokens, LineHeightTokens } from '@contentful/f36-tokens';\nimport type {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport { Text } from '../Text';\nimport type { HeadingElement } from '../Heading';\n\nconst DISPLAY_TEXT_DEFAULT_TAG = 'h2';\n\nexport interface DisplayTextInternalProps extends CommonProps, MarginProps {\n size?: 'default' | 'large';\n as?: HeadingElement;\n isTruncated?: boolean;\n isWordBreak?: boolean;\n}\n\nexport type DisplayTextProps<\n E extends React.ElementType = typeof DISPLAY_TEXT_DEFAULT_TAG\n> = PolymorphicProps<DisplayTextInternalProps, E>;\n\nfunction _DisplayText<\n E extends React.ElementType = typeof DISPLAY_TEXT_DEFAULT_TAG\n>(\n {\n children,\n size = 'default',\n testId = 'cf-ui-display-text',\n ...otherProps\n }: DisplayTextProps<E>,\n ref: React.Ref<any>,\n) {\n let fontSize: FontSizeTokens = 'fontSize2Xl';\n let lineHeight: LineHeightTokens = 'lineHeight2Xl';\n\n if (size === 'large') {\n fontSize = 'fontSize3Xl';\n lineHeight = 'lineHeight3Xl';\n }\n\n return (\n <Text\n as={DISPLAY_TEXT_DEFAULT_TAG}\n testId={testId}\n marginBottom={size === 'default' ? 'spacingL' : 'spacingXl'}\n fontSize={fontSize}\n lineHeight={lineHeight}\n fontColor=\"gray900\"\n fontWeight=\"fontWeightDemiBold\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\n_DisplayText.displayName = 'DisplayText';\n\nexport const DisplayText: PolymorphicComponent<\n ExpandProps<DisplayTextInternalProps>,\n typeof DISPLAY_TEXT_DEFAULT_TAG\n> = React.forwardRef(_DisplayText);\n","export { SectionHeading } from './SectionHeading';\nexport type { SectionHeadingProps } from './SectionHeading';\n","import React from 'react';\nimport tokens from '@contentful/f36-tokens';\nimport { css, cx } from 'emotion';\nimport type {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport type { HeadingElement } from '../Heading';\nimport { Text } from '../Text';\n\nconst SECTION_HEADING_DEFAULT_TAG = 'h2';\n\nexport interface SectionHeadingInternalProps extends CommonProps, MarginProps {\n as?: HeadingElement;\n isTruncated?: boolean;\n isWordBreak?: boolean;\n}\n\nexport type SectionHeadingProps<\n E extends React.ElementType = typeof SECTION_HEADING_DEFAULT_TAG\n> = PolymorphicProps<SectionHeadingInternalProps, E>;\n\nfunction _SectionHeading<\n E extends React.ElementType = typeof SECTION_HEADING_DEFAULT_TAG\n>(\n {\n children,\n className,\n testId = 'cf-ui-section-heading',\n ...otherProps\n }: SectionHeadingProps<E>,\n ref: React.Ref<any>,\n) {\n return (\n <Text\n as={SECTION_HEADING_DEFAULT_TAG}\n testId={testId}\n marginBottom=\"spacingL\"\n fontWeight=\"fontWeightDemiBold\"\n fontColor=\"gray900\"\n fontSize=\"fontSizeS\"\n lineHeight=\"lineHeightS\"\n className={cx(\n css({\n letterSpacing: tokens.letterSpacingWide,\n textTransform: 'uppercase',\n }),\n className,\n )}\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\n_SectionHeading.displayName = 'SectionHeading';\n\nexport const SectionHeading: PolymorphicComponent<\n ExpandProps<SectionHeadingInternalProps>,\n typeof SECTION_HEADING_DEFAULT_TAG\n> = React.forwardRef(_SectionHeading);\n","export { Paragraph } from './Paragraph';\nexport type { ParagraphProps } from './Paragraph';\n","import React from 'react';\nimport type {\n PropsWithHTMLElement,\n CommonProps,\n MarginProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport { Text } from '../Text';\n\nexport type ParagraphInternalProps = CommonProps &\n MarginProps & {\n children: React.ReactNode;\n isTruncated?: boolean;\n isWordBreak?: boolean;\n };\n\nexport type ParagraphProps = PropsWithHTMLElement<ParagraphInternalProps, 'p'>;\n\nexport const Paragraph = React.forwardRef<\n HTMLParagraphElement,\n ExpandProps<ParagraphProps>\n>(({ children, testId = 'cf-ui-paragraph', ...otherProps }, ref) => {\n return (\n <Text\n as=\"p\"\n testId={testId}\n marginBottom=\"spacingM\"\n lineHeight=\"lineHeightM\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n});\n\nParagraph.displayName = 'Paragraph';\n"],"names":["Heading","HeadingProps","HeadingElement","Subheading","SubheadingProps","Typography","TypographyProps","DisplayText","DisplayTextProps","SectionHeading","SectionHeadingProps","Paragraph","ParagraphProps","Text","TextProps","React","CommonProps","MarginProps","PolymorphicComponent","PolymorphicProps","ExpandProps","HEADING_DEFAULT_TAG","HeadingInternalProps","as","children","ReactNode","isTruncated","isWordBreak","ElementType","E","_Heading","testId","otherProps","ref","Ref","displayName","forwardRef","tokens","FontSizeTokens","LineHeightTokens","FontWeightTokens","FontStackTokens","ColorTokens","Box","TextInternalProps","fontSize","lineHeight","fontStack","fontWeight","fontColor","TEXT_DEFAULT_TAG","truncatedStyle","wordBreakStyle","_Text","className","margin","Element","padding","fontFamily","color","SUBHEADING_DEFAULT_TAG","SubheadingInternalProps","_Subheading","useEffect","props","console","warn","DISPLAY_TEXT_DEFAULT_TAG","DisplayTextInternalProps","size","_DisplayText","SECTION_HEADING_DEFAULT_TAG","SectionHeadingInternalProps","_SectionHeading","letterSpacing","letterSpacingWide","textTransform","PropsWithHTMLElement","ParagraphInternalProps","HTMLParagraphElement"],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;AEAA;A;;;;;AE6BA,MAAMkD,sCAAgB,GAAG,MAAzB,AAAA;AAEA,SAASC,oCAAT,GAA0B;IACxB,OAAA,aAAO,CAAA,kBAAP,CAAA;QAAO,IAAA,EAAA,QAAA;QAAA,MAAA,EAAA,4DAAA;KAAA,CAAP,CAAO;CAKR;AAED,SAASC,oCAAT,GAA0B;IACxB,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;IACA,qBACE,qDAAC,yCAAD;QACE,EAAA,EAAIsC,iDAAD;QACH,MAAA,EAAQxC,MAAD;QACP,YAAA,EAAa,UAHf;QAIE,UAAA,EAAW,oBAJb;QAKE,SAAA,EAAU,SALZ;QAME,QAAA,EAAS,WANX;QAOE,UAAA,EAAW,aAPb;QAQE,SAAA,EAAW,iBAAA,CAAA,aACT,CAAA,kBAAA,CAAI;YACF2C,aAAa,EAAErC,oDAAM,CAACsC,iBADpB;YAEFC,aAAa,EAAE,WAAfA;SAFF,CADS,EAKTtB,SALS,CAAD;QAOV,GAAItB,UAAJ;QACA,GAAA,EAAKC,GAAD;OAEHT,QAAD,CAnBJ,CAoBF;CAEC;AAEDiD,qCAAe,CAACtC,WAAhB,GAA8B,gBAA9B,CAAAsC;AAEO,MAAMhE,yCAAc,iBAGvBM,sCAAK,CAACqB,UAAN,CAAiBqC,qCAAjB,CAHG,AAAP;;;;AE9DA;;AAkBO,MAAM9D,yCAAS,iBAAGI,sCAAK,CAACqB,UAAU,CAGvC,CAAC,EArBH,UAqBKZ,QAAF,CAAA,UAAYO,MAAM,GAAG,iBAArB,GAAwC,GAAGC,UAAH,EAAzC,EAA0DC,GAA1D,GAAkE;IAClE,qBACE,qDAAC,yCAAD;QACE,EAAA,EAAG,GADL;QAEE,MAAA,EAAQF,MAAD;QACP,YAAA,EAAa,UAHf;QAIE,UAAA,EAAW,aAJb;QAKE,GAAIC,UAAJ;QACA,GAAA,EAAKC,GAAD;OAEHT,QAAD,CATJ,CAUF;CAdyB,CAAlB,AAgBN;AAEDb,yCAAS,CAACwB,WAAV,GAAwB,WAAxB,CAAAxB;;","sources":["packages/components/typography/src/index.ts","packages/components/typography/src/Heading/index.ts","packages/components/typography/src/Heading/Heading.tsx","packages/components/typography/src/Text/index.ts","packages/components/typography/src/Text/Text.tsx","packages/components/typography/src/Subheading/index.ts","packages/components/typography/src/Subheading/Subheading.tsx","packages/components/typography/src/Typography.tsx","packages/components/typography/src/DisplayText/index.ts","packages/components/typography/src/DisplayText/DisplayText.tsx","packages/components/typography/src/SectionHeading/index.ts","packages/components/typography/src/SectionHeading/SectionHeading.tsx","packages/components/typography/src/Paragraph/index.ts","packages/components/typography/src/Paragraph/Paragraph.tsx"],"sourcesContent":["export { Heading } from './Heading';\nexport type { HeadingProps, HeadingElement } from './Heading';\nexport { Subheading } from './Subheading';\nexport type { SubheadingProps } from './Subheading';\nexport { Typography } from './Typography';\nexport type { TypographyProps } from './Typography';\nexport { DisplayText } from './DisplayText';\nexport type { DisplayTextProps } from './DisplayText';\nexport { SectionHeading } from './SectionHeading';\nexport type { SectionHeadingProps } from './SectionHeading';\nexport { Paragraph } from './Paragraph';\nexport type { ParagraphProps } from './Paragraph';\nexport { Text } from './Text';\nexport type { TextProps } from './Text';\n","export { Heading } from './Heading';\nexport type { HeadingProps, HeadingElement } from './Heading';\n","import React from 'react';\nimport type {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport { Text } from '../Text';\n\nconst HEADING_DEFAULT_TAG = 'h1';\n\nexport type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n\nexport interface HeadingInternalProps extends CommonProps, MarginProps {\n as?: HeadingElement;\n children?: React.ReactNode;\n isTruncated?: boolean;\n isWordBreak?: boolean;\n}\n\nexport type HeadingProps<\n E extends React.ElementType = typeof HEADING_DEFAULT_TAG\n> = PolymorphicProps<HeadingInternalProps, E>;\n\nfunction _Heading<E extends React.ElementType = typeof HEADING_DEFAULT_TAG>(\n { children, testId = 'cf-ui-heading', ...otherProps }: HeadingProps<E>,\n ref: React.Ref<any>,\n) {\n return (\n <Text\n as={HEADING_DEFAULT_TAG}\n testId={testId}\n marginBottom=\"spacingM\"\n fontWeight=\"fontWeightDemiBold\"\n fontColor=\"gray900\"\n fontSize=\"fontSizeXl\"\n lineHeight=\"lineHeightXl\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\n_Heading.displayName = 'Heading';\n\nexport const Heading: PolymorphicComponent<\n ExpandProps<HeadingInternalProps>,\n typeof HEADING_DEFAULT_TAG\n> = React.forwardRef(_Heading);\n","export { Text } from './Text';\nexport type { TextProps } from './Text';\n","import React from 'react';\nimport tokens, {\n FontSizeTokens,\n LineHeightTokens,\n FontWeightTokens,\n FontStackTokens,\n ColorTokens,\n} from '@contentful/f36-tokens';\nimport { css, cx } from 'emotion';\nimport { Box } from '@contentful/f36-core';\nimport type {\n PolymorphicComponent,\n CommonProps,\n MarginProps,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\n\nexport interface TextInternalProps extends CommonProps, MarginProps {\n children?: React.ReactNode;\n fontSize?: FontSizeTokens;\n lineHeight?: LineHeightTokens;\n fontStack?: FontStackTokens;\n fontWeight?: FontWeightTokens;\n fontColor?: ColorTokens;\n isTruncated?: boolean;\n isWordBreak?: boolean;\n}\n\nconst TEXT_DEFAULT_TAG = 'span';\n\nfunction truncatedStyle() {\n return css({\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n });\n}\n\nfunction wordBreakStyle() {\n return css({\n wordBreak: 'break-word',\n });\n}\n\nexport type TextProps<\n E extends React.ElementType = typeof TEXT_DEFAULT_TAG\n> = PolymorphicProps<TextInternalProps, E>;\n\nfunction _Text<E extends React.ElementType = typeof TEXT_DEFAULT_TAG>(\n {\n fontSize = 'fontSizeM',\n fontStack = 'fontStackPrimary',\n fontWeight = 'fontWeightNormal',\n fontColor = 'gray800',\n lineHeight = 'lineHeightM',\n children,\n isTruncated,\n isWordBreak,\n as,\n className,\n margin = 'none',\n ...otherProps\n }: TextProps<E>,\n ref: React.Ref<any>,\n) {\n const Element: React.ElementType = as || TEXT_DEFAULT_TAG;\n\n return (\n <Box\n {...otherProps}\n as={Element}\n className={cx(\n css({\n padding: 0,\n fontFamily: tokens[fontStack],\n fontWeight: tokens[fontWeight],\n color: tokens[fontColor],\n fontSize: tokens[fontSize],\n lineHeight: tokens[lineHeight],\n }),\n isTruncated ? truncatedStyle() : null,\n isWordBreak ? wordBreakStyle() : null,\n className,\n )}\n margin={margin}\n ref={ref}\n >\n {children}\n </Box>\n );\n}\n\n_Text.displayName = 'Text';\n\nexport const Text: PolymorphicComponent<\n ExpandProps<TextInternalProps>,\n typeof TEXT_DEFAULT_TAG\n> = React.forwardRef(_Text);\n","export { Subheading } from './Subheading';\nexport type { SubheadingProps } from './Subheading';\n","import React from 'react';\nimport type {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport type { HeadingElement } from '../Heading';\nimport { Text } from '../Text';\n\nconst SUBHEADING_DEFAULT_TAG = 'h3';\n\nexport interface SubheadingInternalProps extends CommonProps, MarginProps {\n as?: HeadingElement;\n isTruncated?: boolean;\n isWordBreak?: boolean;\n}\n\nexport type SubheadingProps<\n E extends React.ElementType = typeof SUBHEADING_DEFAULT_TAG\n> = PolymorphicProps<SubheadingInternalProps, E>;\n\nfunction _Subheading<\n E extends React.ElementType = typeof SUBHEADING_DEFAULT_TAG\n>(\n { children, testId = 'cf-ui-subheading', ...otherProps }: SubheadingProps<E>,\n ref: React.Ref<any>,\n) {\n return (\n <Text\n as={SUBHEADING_DEFAULT_TAG}\n testId={testId}\n marginBottom=\"spacingM\"\n fontSize=\"fontSizeL\"\n lineHeight=\"lineHeightL\"\n fontWeight=\"fontWeightDemiBold\"\n fontColor=\"gray900\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\n_Subheading.displayName = 'Subheading';\n\nexport const Subheading: PolymorphicComponent<\n ExpandProps<SubheadingInternalProps>,\n typeof SUBHEADING_DEFAULT_TAG\n> = React.forwardRef(_Subheading);\n","import React, { useEffect } from 'react';\n\nexport interface TypographyProps {\n children?: React.ReactNode;\n}\n\n/**\n * @deprecated\n */\nexport const Typography = (props: TypographyProps) => {\n useEffect(() => {\n console.warn(\n 'Forma 36: Typography component is deprecated. You can safely remove it from your components.',\n );\n }, []);\n return <>{props.children}</>;\n};\n\nTypography.displayName = 'Typography';\n","export { DisplayText } from './DisplayText';\nexport type { DisplayTextProps } from './DisplayText';\n","import React from 'react';\nimport { FontSizeTokens, LineHeightTokens } from '@contentful/f36-tokens';\nimport type {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport { Text } from '../Text';\nimport type { HeadingElement } from '../Heading';\n\nconst DISPLAY_TEXT_DEFAULT_TAG = 'h2';\n\nexport interface DisplayTextInternalProps extends CommonProps, MarginProps {\n size?: 'default' | 'large';\n as?: HeadingElement;\n isTruncated?: boolean;\n isWordBreak?: boolean;\n}\n\nexport type DisplayTextProps<\n E extends React.ElementType = typeof DISPLAY_TEXT_DEFAULT_TAG\n> = PolymorphicProps<DisplayTextInternalProps, E>;\n\nfunction _DisplayText<\n E extends React.ElementType = typeof DISPLAY_TEXT_DEFAULT_TAG\n>(\n {\n children,\n size = 'default',\n testId = 'cf-ui-display-text',\n ...otherProps\n }: DisplayTextProps<E>,\n ref: React.Ref<any>,\n) {\n let fontSize: FontSizeTokens = 'fontSize2Xl';\n let lineHeight: LineHeightTokens = 'lineHeight2Xl';\n\n if (size === 'large') {\n fontSize = 'fontSize3Xl';\n lineHeight = 'lineHeight3Xl';\n }\n\n return (\n <Text\n as={DISPLAY_TEXT_DEFAULT_TAG}\n testId={testId}\n marginBottom={size === 'default' ? 'spacingL' : 'spacingXl'}\n fontSize={fontSize}\n lineHeight={lineHeight}\n fontColor=\"gray900\"\n fontWeight=\"fontWeightDemiBold\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\n_DisplayText.displayName = 'DisplayText';\n\nexport const DisplayText: PolymorphicComponent<\n ExpandProps<DisplayTextInternalProps>,\n typeof DISPLAY_TEXT_DEFAULT_TAG\n> = React.forwardRef(_DisplayText);\n","export { SectionHeading } from './SectionHeading';\nexport type { SectionHeadingProps } from './SectionHeading';\n","import React from 'react';\nimport tokens from '@contentful/f36-tokens';\nimport { css, cx } from 'emotion';\nimport type {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport type { HeadingElement } from '../Heading';\nimport { Text } from '../Text';\n\nconst SECTION_HEADING_DEFAULT_TAG = 'h2';\n\nexport interface SectionHeadingInternalProps extends CommonProps, MarginProps {\n as?: HeadingElement;\n isTruncated?: boolean;\n isWordBreak?: boolean;\n}\n\nexport type SectionHeadingProps<\n E extends React.ElementType = typeof SECTION_HEADING_DEFAULT_TAG\n> = PolymorphicProps<SectionHeadingInternalProps, E>;\n\nfunction _SectionHeading<\n E extends React.ElementType = typeof SECTION_HEADING_DEFAULT_TAG\n>(\n {\n children,\n className,\n testId = 'cf-ui-section-heading',\n ...otherProps\n }: SectionHeadingProps<E>,\n ref: React.Ref<any>,\n) {\n return (\n <Text\n as={SECTION_HEADING_DEFAULT_TAG}\n testId={testId}\n marginBottom=\"spacingL\"\n fontWeight=\"fontWeightDemiBold\"\n fontColor=\"gray900\"\n fontSize=\"fontSizeS\"\n lineHeight=\"lineHeightS\"\n className={cx(\n css({\n letterSpacing: tokens.letterSpacingWide,\n textTransform: 'uppercase',\n }),\n className,\n )}\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\n_SectionHeading.displayName = 'SectionHeading';\n\nexport const SectionHeading: PolymorphicComponent<\n ExpandProps<SectionHeadingInternalProps>,\n typeof SECTION_HEADING_DEFAULT_TAG\n> = React.forwardRef(_SectionHeading);\n","export { Paragraph } from './Paragraph';\nexport type { ParagraphProps } from './Paragraph';\n","import React from 'react';\nimport type {\n PropsWithHTMLElement,\n CommonProps,\n MarginProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport { Text } from '../Text';\n\nexport type ParagraphInternalProps = CommonProps &\n MarginProps & {\n children: React.ReactNode;\n isTruncated?: boolean;\n isWordBreak?: boolean;\n };\n\nexport type ParagraphProps = PropsWithHTMLElement<ParagraphInternalProps, 'p'>;\n\nexport const Paragraph = React.forwardRef<\n HTMLParagraphElement,\n ExpandProps<ParagraphProps>\n>(({ children, testId = 'cf-ui-paragraph', ...otherProps }, ref) => {\n return (\n <Text\n as=\"p\"\n testId={testId}\n marginBottom=\"spacingM\"\n lineHeight=\"lineHeightM\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n});\n\nParagraph.displayName = 'Paragraph';\n"],"names":["Heading","HeadingProps","HeadingElement","Subheading","SubheadingProps","Typography","TypographyProps","DisplayText","DisplayTextProps","SectionHeading","SectionHeadingProps","Paragraph","ParagraphProps","Text","TextProps","React","CommonProps","MarginProps","PolymorphicComponent","PolymorphicProps","ExpandProps","HEADING_DEFAULT_TAG","HeadingInternalProps","as","children","ReactNode","isTruncated","isWordBreak","ElementType","E","_Heading","testId","otherProps","ref","Ref","displayName","forwardRef","tokens","FontSizeTokens","LineHeightTokens","FontWeightTokens","FontStackTokens","ColorTokens","Box","TextInternalProps","fontSize","lineHeight","fontStack","fontWeight","fontColor","TEXT_DEFAULT_TAG","truncatedStyle","wordBreakStyle","_Text","className","margin","Element","padding","fontFamily","color","SUBHEADING_DEFAULT_TAG","SubheadingInternalProps","_Subheading","useEffect","props","console","warn","DISPLAY_TEXT_DEFAULT_TAG","DisplayTextInternalProps","size","_DisplayText","SECTION_HEADING_DEFAULT_TAG","SectionHeadingInternalProps","_SectionHeading","letterSpacing","letterSpacingWide","textTransform","PropsWithHTMLElement","ParagraphInternalProps","HTMLParagraphElement"],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -85,12 +85,12 @@ const $b9992727336642f5$export$5404b1d39162d870 = /*#__PURE__*/ $4MbOE$react.for
85
85
 
86
86
 
87
87
 
88
- function $3e422817efdc58c6$export$1c6175f3aa4394b7(props) {
88
+ const $3e422817efdc58c6$export$1c6175f3aa4394b7 = (props)=>{
89
89
  $4MbOE$useEffect(()=>{
90
90
  console.warn('Forma 36: Typography component is deprecated. You can safely remove it from your components.');
91
91
  }, []);
92
92
  return /*#__PURE__*/ $4MbOE$react.createElement($4MbOE$react.Fragment, null, props.children);
93
- }
93
+ };
94
94
  $3e422817efdc58c6$export$1c6175f3aa4394b7.displayName = 'Typography';
95
95
 
96
96
 
@@ -1 +1 @@
1
- {"mappings":";;;;;AEAA;A;;;;;AE6BA,MAAMkD,sCAAgB,GAAG,MAAzB,AAAA;AAEA,SAASC,oCAAT,GAA0B;IACxB,OAAA,aAAO,CAAA,UAAP,CAAA;QAAO,IAAA,EAAA,QAAA;QAAA,MAAA,EAAA,4DAAA;KAAA,CAAP,CAAO;CAKR;AAED,SAASC,oCAAT,GAA0B;IACxB,OAAA,aAAO,CAAA,UAAP,CAAA;QAAO,IAAA,EAAA,QAAA;QAAA,MAAA,EAAA,wBAAA;KAAA,CAAP,CAAO;CAGR;AAMD,SAASC,2BAAK,CACZ,YACER,QAAQ,GAAG,WADb,cAEEE,SAAS,GAAG,kBAFd,eAGEC,UAAU,GAAG,kBAHf,cAIEC,SAAS,GAAG,SAJd,eAKEH,UAAU,GAAG,aALf,G,UAMEtB,QANF,CAAA,E,aAOEE,WAPF,CAAA,E,aAQEC,WARF,CAAA,E,IASEJ,EATF,CAAA,E,WAUE+B,SAVF,CAAA,UAWEC,MAAM,GAAG,MAXX,GAYE,GAAGvB,UAAH,EAbJ,EAeEC,GAfF,EAgBE;IACA,MAAMuB,OAAO,GAAsBjC,EAAE,IAAI2B,sCAAzC,AAAA;IAEA,qBACE,2BAAC,UAAD;QACE,GAAIlB,UAAJ;QACA,EAAA,EAAIwB,OAAD;QACH,SAAA,EAAW,SAAA,CAAA,aACT,CAAA,UAAA,CAAI;YACFC,OAAO,EAAE,CADP;YAEFC,UAAU,EAAErB,0BAAM,CAACU,SAAD,CAFhB;YAGFC,UAAU,EAAEX,0BAAM,CAACW,UAAD,CAHhB;YAIFW,KAAK,EAAEtB,0BAAM,CAACY,SAAD,CAJX;YAKFJ,QAA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AAD;QACP,YAAA,EAAa,UAHf;QAIE,UAAA,EAAW,aAJb;QAKE,GAAIC,UAAJ;QACA,GAAA,EAAKC,GAAD;OAEHT,QAAD,CATJ,CAUF;CAdyB,CAAlB,AAgBN;AAEDb,yCAAS,CAACwB,WAAV,GAAwB,WAAxB,CAAAxB;;","sources":["packages/components/typography/src/index.ts","packages/components/typography/src/Heading/index.ts","packages/components/typography/src/Heading/Heading.tsx","packages/components/typography/src/Text/index.ts","packages/components/typography/src/Text/Text.tsx","packages/components/typography/src/Subheading/index.ts","packages/components/typography/src/Subheading/Subheading.tsx","packages/components/typography/src/Typography.tsx","packages/components/typography/src/DisplayText/index.ts","packages/components/typography/src/DisplayText/DisplayText.tsx","packages/components/typography/src/SectionHeading/index.ts","packages/components/typography/src/SectionHeading/SectionHeading.tsx","packages/components/typography/src/Paragraph/index.ts","packages/components/typography/src/Paragraph/Paragraph.tsx"],"sourcesContent":["export { Heading } from './Heading';\nexport type { HeadingProps, HeadingElement } from './Heading';\nexport { Subheading } from './Subheading';\nexport type { SubheadingProps } from './Subheading';\nexport { Typography } from './Typography';\nexport type { TypographyProps } from './Typography';\nexport { DisplayText } from './DisplayText';\nexport type { DisplayTextProps } from './DisplayText';\nexport { SectionHeading } from './SectionHeading';\nexport type { SectionHeadingProps } from './SectionHeading';\nexport { Paragraph } from './Paragraph';\nexport type { ParagraphProps } from './Paragraph';\nexport { Text } from './Text';\nexport type { TextProps } from './Text';\n","export { Heading } from './Heading';\nexport type { HeadingProps, HeadingElement } from './Heading';\n","import React from 'react';\nimport type {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport { Text } from '../Text';\n\nconst HEADING_DEFAULT_TAG = 'h1';\n\nexport type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n\nexport interface HeadingInternalProps extends CommonProps, MarginProps {\n as?: HeadingElement;\n children?: React.ReactNode;\n isTruncated?: boolean;\n isWordBreak?: boolean;\n}\n\nexport type HeadingProps<\n E extends React.ElementType = typeof HEADING_DEFAULT_TAG\n> = PolymorphicProps<HeadingInternalProps, E>;\n\nfunction _Heading<E extends React.ElementType = typeof HEADING_DEFAULT_TAG>(\n { children, testId = 'cf-ui-heading', ...otherProps }: HeadingProps<E>,\n ref: React.Ref<any>,\n) {\n return (\n <Text\n as={HEADING_DEFAULT_TAG}\n testId={testId}\n marginBottom=\"spacingM\"\n fontWeight=\"fontWeightDemiBold\"\n fontColor=\"gray900\"\n fontSize=\"fontSizeXl\"\n lineHeight=\"lineHeightXl\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\n_Heading.displayName = 'Heading';\n\nexport const Heading: PolymorphicComponent<\n ExpandProps<HeadingInternalProps>,\n typeof HEADING_DEFAULT_TAG\n> = React.forwardRef(_Heading);\n","export { Text } from './Text';\nexport type { TextProps } from './Text';\n","import React from 'react';\nimport tokens, {\n FontSizeTokens,\n LineHeightTokens,\n FontWeightTokens,\n FontStackTokens,\n ColorTokens,\n} from '@contentful/f36-tokens';\nimport { css, cx } from 'emotion';\nimport { Box } from '@contentful/f36-core';\nimport type {\n PolymorphicComponent,\n CommonProps,\n MarginProps,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\n\nexport interface TextInternalProps extends CommonProps, MarginProps {\n children?: React.ReactNode;\n fontSize?: FontSizeTokens;\n lineHeight?: LineHeightTokens;\n fontStack?: FontStackTokens;\n fontWeight?: FontWeightTokens;\n fontColor?: ColorTokens;\n isTruncated?: boolean;\n isWordBreak?: boolean;\n}\n\nconst TEXT_DEFAULT_TAG = 'span';\n\nfunction truncatedStyle() {\n return css({\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n });\n}\n\nfunction wordBreakStyle() {\n return css({\n wordBreak: 'break-word',\n });\n}\n\nexport type TextProps<\n E extends React.ElementType = typeof TEXT_DEFAULT_TAG\n> = PolymorphicProps<TextInternalProps, E>;\n\nfunction _Text<E extends React.ElementType = typeof TEXT_DEFAULT_TAG>(\n {\n fontSize = 'fontSizeM',\n fontStack = 'fontStackPrimary',\n fontWeight = 'fontWeightNormal',\n fontColor = 'gray800',\n lineHeight = 'lineHeightM',\n children,\n isTruncated,\n isWordBreak,\n as,\n className,\n margin = 'none',\n ...otherProps\n }: TextProps<E>,\n ref: React.Ref<any>,\n) {\n const Element: React.ElementType = as || TEXT_DEFAULT_TAG;\n\n return (\n <Box\n {...otherProps}\n as={Element}\n className={cx(\n css({\n padding: 0,\n fontFamily: tokens[fontStack],\n fontWeight: tokens[fontWeight],\n color: tokens[fontColor],\n fontSize: tokens[fontSize],\n lineHeight: tokens[lineHeight],\n }),\n isTruncated ? truncatedStyle() : null,\n isWordBreak ? wordBreakStyle() : null,\n className,\n )}\n margin={margin}\n ref={ref}\n >\n {children}\n </Box>\n );\n}\n\n_Text.displayName = 'Text';\n\nexport const Text: PolymorphicComponent<\n ExpandProps<TextInternalProps>,\n typeof TEXT_DEFAULT_TAG\n> = React.forwardRef(_Text);\n","export { Subheading } from './Subheading';\nexport type { SubheadingProps } from './Subheading';\n","import React from 'react';\nimport type {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport type { HeadingElement } from '../Heading';\nimport { Text } from '../Text';\n\nconst SUBHEADING_DEFAULT_TAG = 'h3';\n\nexport interface SubheadingInternalProps extends CommonProps, MarginProps {\n as?: HeadingElement;\n isTruncated?: boolean;\n isWordBreak?: boolean;\n}\n\nexport type SubheadingProps<\n E extends React.ElementType = typeof SUBHEADING_DEFAULT_TAG\n> = PolymorphicProps<SubheadingInternalProps, E>;\n\nfunction _Subheading<\n E extends React.ElementType = typeof SUBHEADING_DEFAULT_TAG\n>(\n { children, testId = 'cf-ui-subheading', ...otherProps }: SubheadingProps<E>,\n ref: React.Ref<any>,\n) {\n return (\n <Text\n as={SUBHEADING_DEFAULT_TAG}\n testId={testId}\n marginBottom=\"spacingM\"\n fontSize=\"fontSizeL\"\n lineHeight=\"lineHeightL\"\n fontWeight=\"fontWeightDemiBold\"\n fontColor=\"gray900\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\n_Subheading.displayName = 'Subheading';\n\nexport const Subheading: PolymorphicComponent<\n ExpandProps<SubheadingInternalProps>,\n typeof SUBHEADING_DEFAULT_TAG\n> = React.forwardRef(_Subheading);\n","import React, { useEffect } from 'react';\n\nexport interface TypographyProps {\n children?: React.ReactNode;\n}\n\n/**\n * @deprecated\n */\nexport function Typography(props: TypographyProps) {\n useEffect(() => {\n console.warn(\n 'Forma 36: Typography component is deprecated. You can safely remove it from your components.',\n );\n }, []);\n return <>{props.children}</>;\n}\n\nTypography.displayName = 'Typography';\n","export { DisplayText } from './DisplayText';\nexport type { DisplayTextProps } from './DisplayText';\n","import React from 'react';\nimport { FontSizeTokens, LineHeightTokens } from '@contentful/f36-tokens';\nimport type {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport { Text } from '../Text';\nimport type { HeadingElement } from '../Heading';\n\nconst DISPLAY_TEXT_DEFAULT_TAG = 'h2';\n\nexport interface DisplayTextInternalProps extends CommonProps, MarginProps {\n size?: 'default' | 'large';\n as?: HeadingElement;\n isTruncated?: boolean;\n isWordBreak?: boolean;\n}\n\nexport type DisplayTextProps<\n E extends React.ElementType = typeof DISPLAY_TEXT_DEFAULT_TAG\n> = PolymorphicProps<DisplayTextInternalProps, E>;\n\nfunction _DisplayText<\n E extends React.ElementType = typeof DISPLAY_TEXT_DEFAULT_TAG\n>(\n {\n children,\n size = 'default',\n testId = 'cf-ui-display-text',\n ...otherProps\n }: DisplayTextProps<E>,\n ref: React.Ref<any>,\n) {\n let fontSize: FontSizeTokens = 'fontSize2Xl';\n let lineHeight: LineHeightTokens = 'lineHeight2Xl';\n\n if (size === 'large') {\n fontSize = 'fontSize3Xl';\n lineHeight = 'lineHeight3Xl';\n }\n\n return (\n <Text\n as={DISPLAY_TEXT_DEFAULT_TAG}\n testId={testId}\n marginBottom={size === 'default' ? 'spacingL' : 'spacingXl'}\n fontSize={fontSize}\n lineHeight={lineHeight}\n fontColor=\"gray900\"\n fontWeight=\"fontWeightDemiBold\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\n_DisplayText.displayName = 'DisplayText';\n\nexport const DisplayText: PolymorphicComponent<\n ExpandProps<DisplayTextInternalProps>,\n typeof DISPLAY_TEXT_DEFAULT_TAG\n> = React.forwardRef(_DisplayText);\n","export { SectionHeading } from './SectionHeading';\nexport type { SectionHeadingProps } from './SectionHeading';\n","import React from 'react';\nimport tokens from '@contentful/f36-tokens';\nimport { css, cx } from 'emotion';\nimport type {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport type { HeadingElement } from '../Heading';\nimport { Text } from '../Text';\n\nconst SECTION_HEADING_DEFAULT_TAG = 'h2';\n\nexport interface SectionHeadingInternalProps extends CommonProps, MarginProps {\n as?: HeadingElement;\n isTruncated?: boolean;\n isWordBreak?: boolean;\n}\n\nexport type SectionHeadingProps<\n E extends React.ElementType = typeof SECTION_HEADING_DEFAULT_TAG\n> = PolymorphicProps<SectionHeadingInternalProps, E>;\n\nfunction _SectionHeading<\n E extends React.ElementType = typeof SECTION_HEADING_DEFAULT_TAG\n>(\n {\n children,\n className,\n testId = 'cf-ui-section-heading',\n ...otherProps\n }: SectionHeadingProps<E>,\n ref: React.Ref<any>,\n) {\n return (\n <Text\n as={SECTION_HEADING_DEFAULT_TAG}\n testId={testId}\n marginBottom=\"spacingL\"\n fontWeight=\"fontWeightDemiBold\"\n fontColor=\"gray900\"\n fontSize=\"fontSizeS\"\n lineHeight=\"lineHeightS\"\n className={cx(\n css({\n letterSpacing: tokens.letterSpacingWide,\n textTransform: 'uppercase',\n }),\n className,\n )}\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\n_SectionHeading.displayName = 'SectionHeading';\n\nexport const SectionHeading: PolymorphicComponent<\n ExpandProps<SectionHeadingInternalProps>,\n typeof SECTION_HEADING_DEFAULT_TAG\n> = React.forwardRef(_SectionHeading);\n","export { Paragraph } from './Paragraph';\nexport type { ParagraphProps } from './Paragraph';\n","import React from 'react';\nimport type {\n PropsWithHTMLElement,\n CommonProps,\n MarginProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport { Text } from '../Text';\n\nexport type ParagraphInternalProps = CommonProps &\n MarginProps & {\n children: React.ReactNode;\n isTruncated?: boolean;\n isWordBreak?: boolean;\n };\n\nexport type ParagraphProps = PropsWithHTMLElement<ParagraphInternalProps, 'p'>;\n\nexport const Paragraph = React.forwardRef<\n HTMLParagraphElement,\n ExpandProps<ParagraphProps>\n>(({ children, testId = 'cf-ui-paragraph', ...otherProps }, ref) => {\n return (\n <Text\n as=\"p\"\n testId={testId}\n marginBottom=\"spacingM\"\n lineHeight=\"lineHeightM\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n});\n\nParagraph.displayName = 'Paragraph';\n"],"names":["Heading","HeadingProps","HeadingElement","Subheading","SubheadingProps","Typography","TypographyProps","DisplayText","DisplayTextProps","SectionHeading","SectionHeadingProps","Paragraph","ParagraphProps","Text","TextProps","React","CommonProps","MarginProps","PolymorphicComponent","PolymorphicProps","ExpandProps","HEADING_DEFAULT_TAG","HeadingInternalProps","as","children","ReactNode","isTruncated","isWordBreak","ElementType","E","_Heading","testId","otherProps","ref","Ref","displayName","forwardRef","tokens","FontSizeTokens","LineHeightTokens","FontWeightTokens","FontStackTokens","ColorTokens","Box","TextInternalProps","fontSize","lineHeight","fontStack","fontWeight","fontColor","TEXT_DEFAULT_TAG","truncatedStyle","wordBreakStyle","_Text","className","margin","Element","padding","fontFamily","color","SUBHEADING_DEFAULT_TAG","SubheadingInternalProps","_Subheading","useEffect","props","console","warn","DISPLAY_TEXT_DEFAULT_TAG","DisplayTextInternalProps","size","_DisplayText","SECTION_HEADING_DEFAULT_TAG","SectionHeadingInternalProps","_SectionHeading","letterSpacing","letterSpacingWide","textTransform","PropsWithHTMLElement","ParagraphInternalProps","HTMLParagraphElement"],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;AEAA;A;;;;;AE6BA,MAAMkD,sCAAgB,GAAG,MAAzB,AAAA;AAEA,SAASC,oCAAT,GAA0B;IACxB,OAAA,aAAO,CAAA,UAAP,CAAA;QAAO,IAAA,EAAA,QAAA;QAAA,MAAA,EAAA,4DAAA;KAAA,CAAP,CAAO;CAKR;AAED,SAASC,oCAAT,GAA0B;IACxB,OAAA,aAAO,CAAA,UAAP,CAAA;QAAO,IAAA,EAAA,QAAA;QAAA,MAAA,EAAA,wBAAA;KAAA,CAAP,CAAO;CAGR;AAMD,SAASC,2BAAK,CACZ,YACER,QAAQ,GAAG,WADb,cAEEE,SAAS,GAAG,kBAFd,eAGEC,UAAU,GAAG,kBAHf,cAIEC,SAAS,GAAG,SAJd,eAKEH,UAAU,GAAG,aALf,G,UAMEtB,QANF,CAAA,E,aAOEE,WAPF,CAAA,E,aAQEC,WARF,CAAA,E,IASEJ,EATF,CAAA,E,WAUE+B,SAVF,CAAA,UAWEC,MAAM,GAAG,MAXX,GAYE,GAAGvB,UAAH,EAbJ,EAeEC,GAfF,EAgBE;IACA,MAAMuB,OAAO,GAAsBjC,EAAE,IAAI2B,sCAAzC,AAAA;IAEA,qBACE,2BAAC,UAAD;QACE,GAAIlB,UAAJ;QACA,EAAA,EAAIwB,OAAD;QACH,SAAA,EAAW,SAAA,CAAA,aACT,CAAA,UAAA,CAAI;YACFC,OAAO,EAAE,CADP;YAEFC,UAAU,EAAErB,0BAAM,CAACU,SAAD,CAFhB;YAGFC,UAAU,EAAEX,0BAAM,CAACW,UAAD,CAHhB;YAIFW,KAAK,EAAEtB,0BAAM,CAACY,SAAD,CAJX;YAKFJ,QAAQ,EAAER,0BAAM,CAACQ,QAA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AAa,UAHf;QAIE,UAAA,EAAW,aAJb;QAKE,GAAIC,UAAJ;QACA,GAAA,EAAKC,GAAD;OAEHT,QAAD,CATJ,CAUF;CAdyB,CAAlB,AAgBN;AAEDb,yCAAS,CAACwB,WAAV,GAAwB,WAAxB,CAAAxB;;","sources":["packages/components/typography/src/index.ts","packages/components/typography/src/Heading/index.ts","packages/components/typography/src/Heading/Heading.tsx","packages/components/typography/src/Text/index.ts","packages/components/typography/src/Text/Text.tsx","packages/components/typography/src/Subheading/index.ts","packages/components/typography/src/Subheading/Subheading.tsx","packages/components/typography/src/Typography.tsx","packages/components/typography/src/DisplayText/index.ts","packages/components/typography/src/DisplayText/DisplayText.tsx","packages/components/typography/src/SectionHeading/index.ts","packages/components/typography/src/SectionHeading/SectionHeading.tsx","packages/components/typography/src/Paragraph/index.ts","packages/components/typography/src/Paragraph/Paragraph.tsx"],"sourcesContent":["export { Heading } from './Heading';\nexport type { HeadingProps, HeadingElement } from './Heading';\nexport { Subheading } from './Subheading';\nexport type { SubheadingProps } from './Subheading';\nexport { Typography } from './Typography';\nexport type { TypographyProps } from './Typography';\nexport { DisplayText } from './DisplayText';\nexport type { DisplayTextProps } from './DisplayText';\nexport { SectionHeading } from './SectionHeading';\nexport type { SectionHeadingProps } from './SectionHeading';\nexport { Paragraph } from './Paragraph';\nexport type { ParagraphProps } from './Paragraph';\nexport { Text } from './Text';\nexport type { TextProps } from './Text';\n","export { Heading } from './Heading';\nexport type { HeadingProps, HeadingElement } from './Heading';\n","import React from 'react';\nimport type {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport { Text } from '../Text';\n\nconst HEADING_DEFAULT_TAG = 'h1';\n\nexport type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n\nexport interface HeadingInternalProps extends CommonProps, MarginProps {\n as?: HeadingElement;\n children?: React.ReactNode;\n isTruncated?: boolean;\n isWordBreak?: boolean;\n}\n\nexport type HeadingProps<\n E extends React.ElementType = typeof HEADING_DEFAULT_TAG\n> = PolymorphicProps<HeadingInternalProps, E>;\n\nfunction _Heading<E extends React.ElementType = typeof HEADING_DEFAULT_TAG>(\n { children, testId = 'cf-ui-heading', ...otherProps }: HeadingProps<E>,\n ref: React.Ref<any>,\n) {\n return (\n <Text\n as={HEADING_DEFAULT_TAG}\n testId={testId}\n marginBottom=\"spacingM\"\n fontWeight=\"fontWeightDemiBold\"\n fontColor=\"gray900\"\n fontSize=\"fontSizeXl\"\n lineHeight=\"lineHeightXl\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\n_Heading.displayName = 'Heading';\n\nexport const Heading: PolymorphicComponent<\n ExpandProps<HeadingInternalProps>,\n typeof HEADING_DEFAULT_TAG\n> = React.forwardRef(_Heading);\n","export { Text } from './Text';\nexport type { TextProps } from './Text';\n","import React from 'react';\nimport tokens, {\n FontSizeTokens,\n LineHeightTokens,\n FontWeightTokens,\n FontStackTokens,\n ColorTokens,\n} from '@contentful/f36-tokens';\nimport { css, cx } from 'emotion';\nimport { Box } from '@contentful/f36-core';\nimport type {\n PolymorphicComponent,\n CommonProps,\n MarginProps,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\n\nexport interface TextInternalProps extends CommonProps, MarginProps {\n children?: React.ReactNode;\n fontSize?: FontSizeTokens;\n lineHeight?: LineHeightTokens;\n fontStack?: FontStackTokens;\n fontWeight?: FontWeightTokens;\n fontColor?: ColorTokens;\n isTruncated?: boolean;\n isWordBreak?: boolean;\n}\n\nconst TEXT_DEFAULT_TAG = 'span';\n\nfunction truncatedStyle() {\n return css({\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n });\n}\n\nfunction wordBreakStyle() {\n return css({\n wordBreak: 'break-word',\n });\n}\n\nexport type TextProps<\n E extends React.ElementType = typeof TEXT_DEFAULT_TAG\n> = PolymorphicProps<TextInternalProps, E>;\n\nfunction _Text<E extends React.ElementType = typeof TEXT_DEFAULT_TAG>(\n {\n fontSize = 'fontSizeM',\n fontStack = 'fontStackPrimary',\n fontWeight = 'fontWeightNormal',\n fontColor = 'gray800',\n lineHeight = 'lineHeightM',\n children,\n isTruncated,\n isWordBreak,\n as,\n className,\n margin = 'none',\n ...otherProps\n }: TextProps<E>,\n ref: React.Ref<any>,\n) {\n const Element: React.ElementType = as || TEXT_DEFAULT_TAG;\n\n return (\n <Box\n {...otherProps}\n as={Element}\n className={cx(\n css({\n padding: 0,\n fontFamily: tokens[fontStack],\n fontWeight: tokens[fontWeight],\n color: tokens[fontColor],\n fontSize: tokens[fontSize],\n lineHeight: tokens[lineHeight],\n }),\n isTruncated ? truncatedStyle() : null,\n isWordBreak ? wordBreakStyle() : null,\n className,\n )}\n margin={margin}\n ref={ref}\n >\n {children}\n </Box>\n );\n}\n\n_Text.displayName = 'Text';\n\nexport const Text: PolymorphicComponent<\n ExpandProps<TextInternalProps>,\n typeof TEXT_DEFAULT_TAG\n> = React.forwardRef(_Text);\n","export { Subheading } from './Subheading';\nexport type { SubheadingProps } from './Subheading';\n","import React from 'react';\nimport type {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport type { HeadingElement } from '../Heading';\nimport { Text } from '../Text';\n\nconst SUBHEADING_DEFAULT_TAG = 'h3';\n\nexport interface SubheadingInternalProps extends CommonProps, MarginProps {\n as?: HeadingElement;\n isTruncated?: boolean;\n isWordBreak?: boolean;\n}\n\nexport type SubheadingProps<\n E extends React.ElementType = typeof SUBHEADING_DEFAULT_TAG\n> = PolymorphicProps<SubheadingInternalProps, E>;\n\nfunction _Subheading<\n E extends React.ElementType = typeof SUBHEADING_DEFAULT_TAG\n>(\n { children, testId = 'cf-ui-subheading', ...otherProps }: SubheadingProps<E>,\n ref: React.Ref<any>,\n) {\n return (\n <Text\n as={SUBHEADING_DEFAULT_TAG}\n testId={testId}\n marginBottom=\"spacingM\"\n fontSize=\"fontSizeL\"\n lineHeight=\"lineHeightL\"\n fontWeight=\"fontWeightDemiBold\"\n fontColor=\"gray900\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\n_Subheading.displayName = 'Subheading';\n\nexport const Subheading: PolymorphicComponent<\n ExpandProps<SubheadingInternalProps>,\n typeof SUBHEADING_DEFAULT_TAG\n> = React.forwardRef(_Subheading);\n","import React, { useEffect } from 'react';\n\nexport interface TypographyProps {\n children?: React.ReactNode;\n}\n\n/**\n * @deprecated\n */\nexport const Typography = (props: TypographyProps) => {\n useEffect(() => {\n console.warn(\n 'Forma 36: Typography component is deprecated. You can safely remove it from your components.',\n );\n }, []);\n return <>{props.children}</>;\n};\n\nTypography.displayName = 'Typography';\n","export { DisplayText } from './DisplayText';\nexport type { DisplayTextProps } from './DisplayText';\n","import React from 'react';\nimport { FontSizeTokens, LineHeightTokens } from '@contentful/f36-tokens';\nimport type {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport { Text } from '../Text';\nimport type { HeadingElement } from '../Heading';\n\nconst DISPLAY_TEXT_DEFAULT_TAG = 'h2';\n\nexport interface DisplayTextInternalProps extends CommonProps, MarginProps {\n size?: 'default' | 'large';\n as?: HeadingElement;\n isTruncated?: boolean;\n isWordBreak?: boolean;\n}\n\nexport type DisplayTextProps<\n E extends React.ElementType = typeof DISPLAY_TEXT_DEFAULT_TAG\n> = PolymorphicProps<DisplayTextInternalProps, E>;\n\nfunction _DisplayText<\n E extends React.ElementType = typeof DISPLAY_TEXT_DEFAULT_TAG\n>(\n {\n children,\n size = 'default',\n testId = 'cf-ui-display-text',\n ...otherProps\n }: DisplayTextProps<E>,\n ref: React.Ref<any>,\n) {\n let fontSize: FontSizeTokens = 'fontSize2Xl';\n let lineHeight: LineHeightTokens = 'lineHeight2Xl';\n\n if (size === 'large') {\n fontSize = 'fontSize3Xl';\n lineHeight = 'lineHeight3Xl';\n }\n\n return (\n <Text\n as={DISPLAY_TEXT_DEFAULT_TAG}\n testId={testId}\n marginBottom={size === 'default' ? 'spacingL' : 'spacingXl'}\n fontSize={fontSize}\n lineHeight={lineHeight}\n fontColor=\"gray900\"\n fontWeight=\"fontWeightDemiBold\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\n_DisplayText.displayName = 'DisplayText';\n\nexport const DisplayText: PolymorphicComponent<\n ExpandProps<DisplayTextInternalProps>,\n typeof DISPLAY_TEXT_DEFAULT_TAG\n> = React.forwardRef(_DisplayText);\n","export { SectionHeading } from './SectionHeading';\nexport type { SectionHeadingProps } from './SectionHeading';\n","import React from 'react';\nimport tokens from '@contentful/f36-tokens';\nimport { css, cx } from 'emotion';\nimport type {\n CommonProps,\n MarginProps,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport type { HeadingElement } from '../Heading';\nimport { Text } from '../Text';\n\nconst SECTION_HEADING_DEFAULT_TAG = 'h2';\n\nexport interface SectionHeadingInternalProps extends CommonProps, MarginProps {\n as?: HeadingElement;\n isTruncated?: boolean;\n isWordBreak?: boolean;\n}\n\nexport type SectionHeadingProps<\n E extends React.ElementType = typeof SECTION_HEADING_DEFAULT_TAG\n> = PolymorphicProps<SectionHeadingInternalProps, E>;\n\nfunction _SectionHeading<\n E extends React.ElementType = typeof SECTION_HEADING_DEFAULT_TAG\n>(\n {\n children,\n className,\n testId = 'cf-ui-section-heading',\n ...otherProps\n }: SectionHeadingProps<E>,\n ref: React.Ref<any>,\n) {\n return (\n <Text\n as={SECTION_HEADING_DEFAULT_TAG}\n testId={testId}\n marginBottom=\"spacingL\"\n fontWeight=\"fontWeightDemiBold\"\n fontColor=\"gray900\"\n fontSize=\"fontSizeS\"\n lineHeight=\"lineHeightS\"\n className={cx(\n css({\n letterSpacing: tokens.letterSpacingWide,\n textTransform: 'uppercase',\n }),\n className,\n )}\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n}\n\n_SectionHeading.displayName = 'SectionHeading';\n\nexport const SectionHeading: PolymorphicComponent<\n ExpandProps<SectionHeadingInternalProps>,\n typeof SECTION_HEADING_DEFAULT_TAG\n> = React.forwardRef(_SectionHeading);\n","export { Paragraph } from './Paragraph';\nexport type { ParagraphProps } from './Paragraph';\n","import React from 'react';\nimport type {\n PropsWithHTMLElement,\n CommonProps,\n MarginProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport { Text } from '../Text';\n\nexport type ParagraphInternalProps = CommonProps &\n MarginProps & {\n children: React.ReactNode;\n isTruncated?: boolean;\n isWordBreak?: boolean;\n };\n\nexport type ParagraphProps = PropsWithHTMLElement<ParagraphInternalProps, 'p'>;\n\nexport const Paragraph = React.forwardRef<\n HTMLParagraphElement,\n ExpandProps<ParagraphProps>\n>(({ children, testId = 'cf-ui-paragraph', ...otherProps }, ref) => {\n return (\n <Text\n as=\"p\"\n testId={testId}\n marginBottom=\"spacingM\"\n lineHeight=\"lineHeightM\"\n {...otherProps}\n ref={ref}\n >\n {children}\n </Text>\n );\n});\n\nParagraph.displayName = 'Paragraph';\n"],"names":["Heading","HeadingProps","HeadingElement","Subheading","SubheadingProps","Typography","TypographyProps","DisplayText","DisplayTextProps","SectionHeading","SectionHeadingProps","Paragraph","ParagraphProps","Text","TextProps","React","CommonProps","MarginProps","PolymorphicComponent","PolymorphicProps","ExpandProps","HEADING_DEFAULT_TAG","HeadingInternalProps","as","children","ReactNode","isTruncated","isWordBreak","ElementType","E","_Heading","testId","otherProps","ref","Ref","displayName","forwardRef","tokens","FontSizeTokens","LineHeightTokens","FontWeightTokens","FontStackTokens","ColorTokens","Box","TextInternalProps","fontSize","lineHeight","fontStack","fontWeight","fontColor","TEXT_DEFAULT_TAG","truncatedStyle","wordBreakStyle","_Text","className","margin","Element","padding","fontFamily","color","SUBHEADING_DEFAULT_TAG","SubheadingInternalProps","_Subheading","useEffect","props","console","warn","DISPLAY_TEXT_DEFAULT_TAG","DisplayTextInternalProps","size","_DisplayText","SECTION_HEADING_DEFAULT_TAG","SectionHeadingInternalProps","_SectionHeading","letterSpacing","letterSpacingWide","textTransform","PropsWithHTMLElement","ParagraphInternalProps","HTMLParagraphElement"],"version":3,"file":"module.js.map"}
package/dist/types.d.ts CHANGED
@@ -32,13 +32,16 @@ interface SubheadingInternalProps extends CommonProps, MarginProps {
32
32
  }
33
33
  export type SubheadingProps<E extends React.ElementType = typeof SUBHEADING_DEFAULT_TAG> = PolymorphicProps<SubheadingInternalProps, E>;
34
34
  export const Subheading: PolymorphicComponent<ExpandProps<SubheadingInternalProps>, typeof SUBHEADING_DEFAULT_TAG>;
35
- declare
35
+ export interface TypographyProps {
36
+ children?: React.ReactNode;
37
+ }
36
38
  /**
37
39
  * @deprecated
38
40
  */
39
- export namespace Typography {
40
- var displayName: string;
41
- }
41
+ export const Typography: {
42
+ (props: TypographyProps): JSX.Element;
43
+ displayName: string;
44
+ };
42
45
  declare const DISPLAY_TEXT_DEFAULT_TAG = "h2";
43
46
  interface DisplayTextInternalProps extends CommonProps, MarginProps {
44
47
  size?: 'default' | 'large';
@@ -1 +1 @@
1
- {"mappings":";;;AAkBA,2BAAmC,SAAQ,WAAW,EAAE,WAAW;IACjE,QAAQ,CAAC,EAAE,MAAM,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,QAAA,MAAM,yBAAyB,CAAC;AAgBhC,sBACE,CAAC,SAAS,MAAM,WAAW,GAAG,uBAAuB,IACnD,iBAAiB,iBAAiB,EAAE,CAAC,CAAC,CAAC;AAgD3C,OAAO,MAAM,MAAM,qBAC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+BAA+B,IAC3D,iBAAiB,wBAAwB,EAAE,CAAC,CAAC,CAAC;AAwClD,OAAO,MAAM,aAAa,qBACxB,YAAY,wBAAwB,CAAC,EACrC,+BAA+B,CACC,CAAC;AErDnC,QAAA,MAAM,kCAAkC,CAAC;AAEzC,qCAA6C,SAAQ,WAAW,EAAE,WAAW;IAC3E,EAAE,CAAC,EAAE,cAAc,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,gCACE,CAAC,SAAS,MAAM,WAAW,GAAG,kCAAkC,IAC9D,iBAAiB,2BAA2B,EAAE,CAAC,CAAC,CAAC;AAuCrD,OAAO,MAAM,gBAAgB,qBAC3B,YAAY,2BAA2B,CAAC,EACxC,kCAAkC,CACC,CAAC;AExDtC,8BAAqC,WAAW,GAC9C,WAAW,GAAG;IACZ,QAAQ,EAAE,MAAM,SAAS,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEJ,6BAA6B,qBAAqB,sBAAsB,EAAE,GAAG,CAAC,CAAC;AAE/E,OAAO,MAAM;cAPC,MAAM,SAAS;kBACX,OAAO;kBACP,OAAO;8CAqBvB,CAAC","sources":["packages/components/typography/src/src/Text/Text.tsx","packages/components/typography/src/src/Text/index.ts","packages/components/typography/src/src/Heading/Heading.tsx","packages/components/typography/src/src/Heading/index.ts","packages/components/typography/src/src/Subheading/Subheading.tsx","packages/components/typography/src/src/Subheading/index.ts","packages/components/typography/src/src/Typography.tsx","packages/components/typography/src/src/DisplayText/DisplayText.tsx","packages/components/typography/src/src/DisplayText/index.ts","packages/components/typography/src/src/SectionHeading/SectionHeading.tsx","packages/components/typography/src/src/SectionHeading/index.ts","packages/components/typography/src/src/Paragraph/Paragraph.tsx","packages/components/typography/src/src/Paragraph/index.ts","packages/components/typography/src/src/index.ts","packages/components/typography/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,"export { Heading } from './Heading';\nexport type { HeadingProps, HeadingElement } from './Heading';\nexport { Subheading } from './Subheading';\nexport type { SubheadingProps } from './Subheading';\nexport { Typography } from './Typography';\nexport type { TypographyProps } from './Typography';\nexport { DisplayText } from './DisplayText';\nexport type { DisplayTextProps } from './DisplayText';\nexport { SectionHeading } from './SectionHeading';\nexport type { SectionHeadingProps } from './SectionHeading';\nexport { Paragraph } from './Paragraph';\nexport type { ParagraphProps } from './Paragraph';\nexport { Text } from './Text';\nexport type { TextProps } from './Text';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;;AAkBA,2BAAmC,SAAQ,WAAW,EAAE,WAAW;IACjE,QAAQ,CAAC,EAAE,MAAM,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,QAAA,MAAM,yBAAyB,CAAC;AAgBhC,sBACE,CAAC,SAAS,MAAM,WAAW,GAAG,uBAAuB,IACnD,iBAAiB,iBAAiB,EAAE,CAAC,CAAC,CAAC;AAgD3C,OAAO,MAAM,MAAM,qBACjB,YAAY,iBAAiB,CAAC,EAC9B,uBAAuB,CACE,CAAC;AExF5B,QAAA,MAAM,0BAA0B,CAAC;AAEjC,6BAA6B,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAErE,8BAAsC,SAAQ,WAAW,EAAE,WAAW;IACpE,EAAE,CAAC,EAAE,cAAc,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,SAAS,CAAC;IAC3B,WAAW,CAA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Ac,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,gCACE,CAAC,SAAS,MAAM,WAAW,GAAG,kCAAkC,IAC9D,iBAAiB,2BAA2B,EAAE,CAAC,CAAC,CAAC;AAuCrD,OAAO,MAAM,gBAAgB,qBAC3B,YAAY,2BAA2B,CAAC,EACxC,kCAAkC,CACC,CAAC;AExDtC,8BAAqC,WAAW,GAC9C,WAAW,GAAG;IACZ,QAAQ,EAAE,MAAM,SAAS,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEJ,6BAA6B,qBAAqB,sBAAsB,EAAE,GAAG,CAAC,CAAC;AAE/E,OAAO,MAAM;cAPC,MAAM,SAAS;kBACX,OAAO;kBACP,OAAO;8CAqBvB,CAAC","sources":["packages/components/typography/src/src/Text/Text.tsx","packages/components/typography/src/src/Text/index.ts","packages/components/typography/src/src/Heading/Heading.tsx","packages/components/typography/src/src/Heading/index.ts","packages/components/typography/src/src/Subheading/Subheading.tsx","packages/components/typography/src/src/Subheading/index.ts","packages/components/typography/src/src/Typography.tsx","packages/components/typography/src/src/DisplayText/DisplayText.tsx","packages/components/typography/src/src/DisplayText/index.ts","packages/components/typography/src/src/SectionHeading/SectionHeading.tsx","packages/components/typography/src/src/SectionHeading/index.ts","packages/components/typography/src/src/Paragraph/Paragraph.tsx","packages/components/typography/src/src/Paragraph/index.ts","packages/components/typography/src/src/index.ts","packages/components/typography/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,"export { Heading } from './Heading';\nexport type { HeadingProps, HeadingElement } from './Heading';\nexport { Subheading } from './Subheading';\nexport type { SubheadingProps } from './Subheading';\nexport { Typography } from './Typography';\nexport type { TypographyProps } from './Typography';\nexport { DisplayText } from './DisplayText';\nexport type { DisplayTextProps } from './DisplayText';\nexport { SectionHeading } from './SectionHeading';\nexport type { SectionHeadingProps } from './SectionHeading';\nexport { Paragraph } from './Paragraph';\nexport type { ParagraphProps } from './Paragraph';\nexport { Text } from './Text';\nexport type { TextProps } from './Text';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/f36-typography",
3
- "version": "4.8.0",
3
+ "version": "4.8.1",
4
4
  "description": "Forma 36: typography React Component",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@babel/runtime": "^7.6.2",
24
- "@contentful/f36-core": "^4.8.0",
24
+ "@contentful/f36-core": "^4.8.1",
25
25
  "@contentful/f36-tokens": "^4.0.1",
26
26
  "emotion": "^10.0.17"
27
27
  },