@contentful/f36-typography 4.0.1-beta.2590 → 4.0.1-beta.2595
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/dist/main.js +13 -13
- package/dist/main.js.map +1 -1
- package/dist/module.js +1 -1
- package/package.json +4 -4
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var $5fdCT$react = require("react");
|
|
2
1
|
var $5fdCT$reactjsxruntime = require("react/jsx-runtime");
|
|
2
|
+
var $5fdCT$react = require("react");
|
|
3
3
|
var $5fdCT$emotion = require("emotion");
|
|
4
4
|
var $5fdCT$contentfulf36tokens = require("@contentful/f36-tokens");
|
|
5
5
|
var $5fdCT$contentfulf36core = require("@contentful/f36-core");
|
|
@@ -40,18 +40,18 @@ function $dd9fe96501c8d4c8$var$_Text({ fontSize: fontSize = 'fontSizeM' , fontSt
|
|
|
40
40
|
as: Element,
|
|
41
41
|
className: $5fdCT$emotion.cx(/*#__PURE__*/ $5fdCT$emotion.css({
|
|
42
42
|
padding: 0,
|
|
43
|
-
fontFamily: $parcel$interopDefault($5fdCT$contentfulf36tokens)[fontStack],
|
|
44
|
-
fontWeight: $parcel$interopDefault($5fdCT$contentfulf36tokens)[fontWeight],
|
|
45
|
-
color: $parcel$interopDefault($5fdCT$contentfulf36tokens)[fontColor],
|
|
46
|
-
fontSize: $parcel$interopDefault($5fdCT$contentfulf36tokens)[fontSize],
|
|
47
|
-
lineHeight: $parcel$interopDefault($5fdCT$contentfulf36tokens)[lineHeight]
|
|
43
|
+
fontFamily: ($parcel$interopDefault($5fdCT$contentfulf36tokens))[fontStack],
|
|
44
|
+
fontWeight: ($parcel$interopDefault($5fdCT$contentfulf36tokens))[fontWeight],
|
|
45
|
+
color: ($parcel$interopDefault($5fdCT$contentfulf36tokens))[fontColor],
|
|
46
|
+
fontSize: ($parcel$interopDefault($5fdCT$contentfulf36tokens))[fontSize],
|
|
47
|
+
lineHeight: ($parcel$interopDefault($5fdCT$contentfulf36tokens))[lineHeight]
|
|
48
48
|
}), isTruncated ? $dd9fe96501c8d4c8$var$truncatedStyle() : null, className),
|
|
49
49
|
margin: margin,
|
|
50
50
|
ref: ref,
|
|
51
51
|
children: children
|
|
52
52
|
}));
|
|
53
53
|
}
|
|
54
|
-
const $dd9fe96501c8d4c8$export$5f1af8db9871e1d6 = /*#__PURE__*/ $parcel$interopDefault($5fdCT$react).forwardRef($dd9fe96501c8d4c8$var$_Text);
|
|
54
|
+
const $dd9fe96501c8d4c8$export$5f1af8db9871e1d6 = /*#__PURE__*/ ($parcel$interopDefault($5fdCT$react)).forwardRef($dd9fe96501c8d4c8$var$_Text);
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
const $edf6509e8a752df1$var$HEADING_DEFAULT_TAG = 'h1';
|
|
@@ -69,7 +69,7 @@ function $edf6509e8a752df1$var$_Heading({ children: children , testId: testId =
|
|
|
69
69
|
children: children
|
|
70
70
|
}));
|
|
71
71
|
}
|
|
72
|
-
const $edf6509e8a752df1$export$a8a3e93435678ff9 = /*#__PURE__*/ $parcel$interopDefault($5fdCT$react).forwardRef($edf6509e8a752df1$var$_Heading);
|
|
72
|
+
const $edf6509e8a752df1$export$a8a3e93435678ff9 = /*#__PURE__*/ ($parcel$interopDefault($5fdCT$react)).forwardRef($edf6509e8a752df1$var$_Heading);
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
|
|
@@ -90,7 +90,7 @@ function $831292c032eb183f$var$_Subheading({ children: children , testId: testId
|
|
|
90
90
|
children: children
|
|
91
91
|
}));
|
|
92
92
|
}
|
|
93
|
-
const $831292c032eb183f$export$5404b1d39162d870 = /*#__PURE__*/ $parcel$interopDefault($5fdCT$react).forwardRef($831292c032eb183f$var$_Subheading);
|
|
93
|
+
const $831292c032eb183f$export$5404b1d39162d870 = /*#__PURE__*/ ($parcel$interopDefault($5fdCT$react)).forwardRef($831292c032eb183f$var$_Subheading);
|
|
94
94
|
|
|
95
95
|
|
|
96
96
|
|
|
@@ -132,7 +132,7 @@ function $2918aeb7dafaacc0$var$_DisplayText({ children: children , size: size =
|
|
|
132
132
|
children: children
|
|
133
133
|
}));
|
|
134
134
|
}
|
|
135
|
-
const $2918aeb7dafaacc0$export$60374ee25b7d5e87 = /*#__PURE__*/ $parcel$interopDefault($5fdCT$react).forwardRef($2918aeb7dafaacc0$var$_DisplayText);
|
|
135
|
+
const $2918aeb7dafaacc0$export$60374ee25b7d5e87 = /*#__PURE__*/ ($parcel$interopDefault($5fdCT$react)).forwardRef($2918aeb7dafaacc0$var$_DisplayText);
|
|
136
136
|
|
|
137
137
|
|
|
138
138
|
|
|
@@ -152,7 +152,7 @@ function $6b033735b9eed406$var$_SectionHeading({ children: children , className:
|
|
|
152
152
|
fontSize: "fontSizeS",
|
|
153
153
|
lineHeight: "lineHeightS",
|
|
154
154
|
className: $5fdCT$emotion.cx(/*#__PURE__*/ $5fdCT$emotion.css({
|
|
155
|
-
letterSpacing: $parcel$interopDefault($5fdCT$contentfulf36tokens).letterSpacingWide,
|
|
155
|
+
letterSpacing: ($parcel$interopDefault($5fdCT$contentfulf36tokens)).letterSpacingWide,
|
|
156
156
|
textTransform: 'uppercase'
|
|
157
157
|
}), className),
|
|
158
158
|
...otherProps,
|
|
@@ -160,13 +160,13 @@ function $6b033735b9eed406$var$_SectionHeading({ children: children , className:
|
|
|
160
160
|
children: children
|
|
161
161
|
}));
|
|
162
162
|
}
|
|
163
|
-
const $6b033735b9eed406$export$72d7ca7a5d1d4807 = /*#__PURE__*/ $parcel$interopDefault($5fdCT$react).forwardRef($6b033735b9eed406$var$_SectionHeading);
|
|
163
|
+
const $6b033735b9eed406$export$72d7ca7a5d1d4807 = /*#__PURE__*/ ($parcel$interopDefault($5fdCT$react)).forwardRef($6b033735b9eed406$var$_SectionHeading);
|
|
164
164
|
|
|
165
165
|
|
|
166
166
|
|
|
167
167
|
|
|
168
168
|
|
|
169
|
-
const $4236a7ca048922f6$export$358a232cca1ab2ac = /*#__PURE__*/ $parcel$interopDefault($5fdCT$react).forwardRef(({ children: children , testId: testId = 'cf-ui-paragraph' , ...otherProps }, ref)=>{
|
|
169
|
+
const $4236a7ca048922f6$export$358a232cca1ab2ac = /*#__PURE__*/ ($parcel$interopDefault($5fdCT$react)).forwardRef(({ children: children , testId: testId = 'cf-ui-paragraph' , ...otherProps }, ref)=>{
|
|
170
170
|
return(/*#__PURE__*/ $5fdCT$reactjsxruntime.jsx($dd9fe96501c8d4c8$export$5f1af8db9871e1d6, {
|
|
171
171
|
as: "p",
|
|
172
172
|
testId: testId,
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AE4BA,KAAA,CAAMgD,sCAAgB,GAAG,CAAzB;SAESC,oCAAT,GAA0B,CAA1B;IACE,MAAA,CAAA,EAAO,AAAP,SAAO,AAAP,EAAO,CAAA,kBAAP,CAAA,CAAA;QAAO,IAAA,EAAA,CAAA;QAAA,MAAA,EAAA,CAAA;IAAA,CAAA;AAKR,CAAA;SAMQC,2BAAK,CACZ,CADF,WAEIP,QAAQ,GAAG,CADb,wBAEEE,SAAS,GAAG,CAFd,gCAGEC,UAAU,GAAG,CAHf,+BAIEC,SAAS,GAAG,CAJd,uBAKEH,UAAU,GAAG,CALf,yBAMEpB,QANF,gBAOEE,WAPF,OAQEH,EARF,cASE4B,SATF,WAUEC,MAAM,GAAG,CAVX,WAWKrB,UAAH,CACU,CAbd,EAcEC,GAdF,EAeE,CAdA;IAeA,KAAA,CAAMqB,OAAO,GAAsB9B,EAAE,IAAIyB,sCAAzC;IAEA,MAAA,0CACG,4BAAD;WACMjB,UAAJ;QACA,EAAA,EAAIsB,OAAD;QACH,SAAA,EAAW,iBAAA,CAAA,EACT,AADS,SACT,AADS,EACT,CAAA,kBAAA,CAAI,CALV;YAMQC,OAAO,EAAE,CADP;YAEFC,UAAU,EAAEpB,kDAAM,CAACU,SAAD;YAClBC,UAAU,E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,CAAMC,iDAA2B,GAAG,CAApC;SAWSE,qCAAe,CAGtB,CAHF,WAII9C,QADF,cAEE2B,SAFF,WAGErB,MAAM,GAAG,CAHX,4BAIKC,UAAH,CACoB,CARxB,EASEC,GATF,EAUE,CAPA;IAQA,MAAA,0CACG,yCAAD;QACE,EAAA,EAAIoC,iDAAD;QACH,MAAA,EAAQtC,MAAD;QACP,YAAA,EAAa,CAHf;QAIE,UAAA,EAAW,CAJb;QAKE,SAAA,EAAU,CALZ;QAME,QAAA,EAAS,CANX;QAOE,UAAA,EAAW,CAPb;QAQE,SAAA,EAAW,iBAAA,CAAA,EACT,AADS,SACT,AADS,EACT,CAAA,kBAAA,CAAI,CAVV;YAWQyC,aAAa,EAAEpC,kDAAM,CAACqC,iBADpB;YAEFC,aAAa,EAAE,CAAfA;QAFE,CAAJ,GAIAtB,SALS;WAOPpB,UAAJ;QACA,GAAA,EAAKC,GAAD;kBAEHR,QAAD;;AAGL,CAAA;AAEM,KAAA,CAAMf,yCAAc,iBAGvBM,oCAAK,CAACmB,UAAN,CAAiBoC,qCAAjB;;;;;;AC7CG,KAAA,CAAM3D,yCAAS,iBAAGI,oCAAK,CAACmB,UAAU,EAGtC,CAHH,WAGKV,QAAF,WAAYM,MAAM,GAAG,CAArB,sBAA2CC,UAAH,CAAxC,CAAD,EAA0DC,GAA1D,GAAkE,CAAjE;IACD,MAAA,0CACG,yCAAD;QACE,EAAA,EAAG,CADL;QAEE,MAAA,EAAQF,MAAD;QACP,YAAA,EAAa,CAHf;QAIE,UAAA,EAAW,CAJb;WAKMC,UAAJ;QACA,GAAA,EAAKC,GAAD;kBAEHR,QAAD;;AAGL,CAhBwB;AAkBzBb,yCAAS,CAACkE,WAAV,GAAwB,CAAxB;;","sources":["packages/components/typography/src/index.ts","packages/components/typography/src/Heading.tsx","packages/components/typography/src/Text.tsx","packages/components/typography/src/Subheading.tsx","packages/components/typography/src/Typography.tsx","packages/components/typography/src/DisplayText.tsx","packages/components/typography/src/SectionHeading.tsx","packages/components/typography/src/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","import React from 'react';\nimport {\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}\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\nexport const Heading: PolymorphicComponent<\n ExpandProps<HeadingInternalProps>,\n typeof HEADING_DEFAULT_TAG\n> = React.forwardRef(_Heading);\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 {\n PolymorphicComponent,\n CommonProps,\n MarginProps,\n PolymorphicProps,\n Box,\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}\n\nconst TEXT_DEFAULT_TAG = 'span';\n\nfunction truncatedStyle() {\n return css({\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\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 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 className,\n )}\n margin={margin}\n ref={ref}\n >\n {children}\n </Box>\n );\n}\n\nexport const Text: PolymorphicComponent<\n ExpandProps<TextInternalProps>,\n typeof TEXT_DEFAULT_TAG\n> = React.forwardRef(_Text);\n","import React from 'react';\nimport {\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}\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\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","import React from 'react';\nimport { FontSizeTokens, LineHeightTokens } from '@contentful/f36-tokens';\nimport {\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' | 'huge';\n as?: HeadingElement;\n isTruncated?: 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 === 'huge') {\n fontSize = 'fontSize4Xl';\n lineHeight = 'lineHeight4Xl';\n } else 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\nexport const DisplayText: PolymorphicComponent<\n ExpandProps<DisplayTextInternalProps>,\n typeof DISPLAY_TEXT_DEFAULT_TAG\n> = React.forwardRef(_DisplayText);\n","import React from 'react';\nimport tokens from '@contentful/f36-tokens';\nimport { css, cx } from 'emotion';\nimport {\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}\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\nexport const SectionHeading: PolymorphicComponent<\n ExpandProps<SectionHeadingInternalProps>,\n typeof SECTION_HEADING_DEFAULT_TAG\n> = React.forwardRef(_SectionHeading);\n","import React from 'react';\nimport {\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 };\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","ElementType","E","_Heading","testId","otherProps","ref","Ref","forwardRef","tokens","FontSizeTokens","LineHeightTokens","FontWeightTokens","FontStackTokens","ColorTokens","Box","TextInternalProps","fontSize","lineHeight","fontStack","fontWeight","fontColor","TEXT_DEFAULT_TAG","truncatedStyle","_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","displayName"],"version":3,"file":"main.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AE4BA,KAAA,CAAMgD,sCAAgB,GAAG,CAAzB;SAESC,oCAAT,GAA0B,CAA1B;IACE,MAAA,CAAA,EAAO,AAAP,SAAO,AAAP,EAAO,CAAA,kBAAP,CAAA,CAAA;QAAO,IAAA,EAAA,CAAA;QAAA,MAAA,EAAA,CAAA;IAAA,CAAA;AAKR,CAAA;SAMQC,2BAAK,CACZ,CADF,WAEIP,QAAQ,GAAG,CADb,wBAEEE,SAAS,GAAG,CAFd,gCAGEC,UAAU,GAAG,CAHf,+BAIEC,SAAS,GAAG,CAJd,uBAKEH,UAAU,GAAG,CALf,yBAMEpB,QANF,gBAOEE,WAPF,OAQEH,EARF,cASE4B,SATF,WAUEC,MAAM,GAAG,CAVX,WAWKrB,UAAH,CACU,CAbd,EAcEC,GAdF,EAeE,CAdA;IAeA,KAAA,CAAMqB,OAAO,GAAsB9B,EAAE,IAAIyB,sCAAzC;IAEA,MAAA,0CACG,4BAAD;WACMjB,UAAJ;QACA,EAAA,EAAIsB,OAAD;QACH,SAAA,EAAW,iBAAA,CAAA,EACT,AADS,SACT,AADS,EACT,CAAA,kBAAA,CAAI,CALV;YAMQC,OAAO,EAAE,CADP;YAEFC,UAAU,EAAEpB,oDAAM,CAACU,SAAD;YAClBC,UAAU,EAAEX,oDAAM,CAACW,UAAD;YAClBU,KAAK,EAAErB,oDAAM,CAACY,SAAD;YACbJ,QAAQ,EAAER,oDAAM,CAACQ,QAAD;YAChBC,UAAU,EAAET,oDAAM,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B,EASEC,GATF,EAUE,CAPA;IAQA,MAAA,0CACG,yCAAD;QACE,EAAA,EAAIoC,iDAAD;QACH,MAAA,EAAQtC,MAAD;QACP,YAAA,EAAa,CAHf;QAIE,UAAA,EAAW,CAJb;QAKE,SAAA,EAAU,CALZ;QAME,QAAA,EAAS,CANX;QAOE,UAAA,EAAW,CAPb;QAQE,SAAA,EAAW,iBAAA,CAAA,EACT,AADS,SACT,AADS,EACT,CAAA,kBAAA,CAAI,CAVV;YAWQyC,aAAa,EAAEpC,oDAAM,CAACqC,iBADpB;YAEFC,aAAa,EAAE,CAAfA;QAFE,CAAJ,GAIAtB,SALS;WAOPpB,UAAJ;QACA,GAAA,EAAKC,GAAD;kBAEHR,QAAD;;AAGL,CAAA;AAEM,KAAA,CAAMf,yCAAc,iBAGvBM,sCAAK,CAACmB,UAAN,CAAiBoC,qCAAjB;;;;;;AC7CG,KAAA,CAAM3D,yCAAS,iBAAGI,sCAAK,CAACmB,UAAU,EAGtC,CAHH,WAGKV,QAAF,WAAYM,MAAM,GAAG,CAArB,sBAA2CC,UAAH,CAAxC,CAAD,EAA0DC,GAA1D,GAAkE,CAAjE;IACD,MAAA,0CACG,yCAAD;QACE,EAAA,EAAG,CADL;QAEE,MAAA,EAAQF,MAAD;QACP,YAAA,EAAa,CAHf;QAIE,UAAA,EAAW,CAJb;WAKMC,UAAJ;QACA,GAAA,EAAKC,GAAD;kBAEHR,QAAD;;AAGL,CAhBwB;AAkBzBb,yCAAS,CAACkE,WAAV,GAAwB,CAAxB;;","sources":["packages/components/typography/src/index.ts","packages/components/typography/src/Heading.tsx","packages/components/typography/src/Text.tsx","packages/components/typography/src/Subheading.tsx","packages/components/typography/src/Typography.tsx","packages/components/typography/src/DisplayText.tsx","packages/components/typography/src/SectionHeading.tsx","packages/components/typography/src/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","import React from 'react';\nimport {\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}\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\nexport const Heading: PolymorphicComponent<\n ExpandProps<HeadingInternalProps>,\n typeof HEADING_DEFAULT_TAG\n> = React.forwardRef(_Heading);\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 {\n PolymorphicComponent,\n CommonProps,\n MarginProps,\n PolymorphicProps,\n Box,\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}\n\nconst TEXT_DEFAULT_TAG = 'span';\n\nfunction truncatedStyle() {\n return css({\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\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 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 className,\n )}\n margin={margin}\n ref={ref}\n >\n {children}\n </Box>\n );\n}\n\nexport const Text: PolymorphicComponent<\n ExpandProps<TextInternalProps>,\n typeof TEXT_DEFAULT_TAG\n> = React.forwardRef(_Text);\n","import React from 'react';\nimport {\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}\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\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","import React from 'react';\nimport { FontSizeTokens, LineHeightTokens } from '@contentful/f36-tokens';\nimport {\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' | 'huge';\n as?: HeadingElement;\n isTruncated?: 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 === 'huge') {\n fontSize = 'fontSize4Xl';\n lineHeight = 'lineHeight4Xl';\n } else 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\nexport const DisplayText: PolymorphicComponent<\n ExpandProps<DisplayTextInternalProps>,\n typeof DISPLAY_TEXT_DEFAULT_TAG\n> = React.forwardRef(_DisplayText);\n","import React from 'react';\nimport tokens from '@contentful/f36-tokens';\nimport { css, cx } from 'emotion';\nimport {\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}\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\nexport const SectionHeading: PolymorphicComponent<\n ExpandProps<SectionHeadingInternalProps>,\n typeof SECTION_HEADING_DEFAULT_TAG\n> = React.forwardRef(_SectionHeading);\n","import React from 'react';\nimport {\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 };\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","ElementType","E","_Heading","testId","otherProps","ref","Ref","forwardRef","tokens","FontSizeTokens","LineHeightTokens","FontWeightTokens","FontStackTokens","ColorTokens","Box","TextInternalProps","fontSize","lineHeight","fontStack","fontWeight","fontColor","TEXT_DEFAULT_TAG","truncatedStyle","_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","displayName"],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import $4MbOE$react, {useEffect as $4MbOE$useEffect} from "react";
|
|
2
1
|
import {jsx as $4MbOE$jsx, Fragment as $4MbOE$Fragment} from "react/jsx-runtime";
|
|
2
|
+
import $4MbOE$react, {useEffect as $4MbOE$useEffect} from "react";
|
|
3
3
|
import {css as $4MbOE$css, cx as $4MbOE$cx} from "emotion";
|
|
4
4
|
import $4MbOE$contentfulf36tokens from "@contentful/f36-tokens";
|
|
5
5
|
import {Box as $4MbOE$Box} from "@contentful/f36-core";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/f36-typography",
|
|
3
|
-
"version": "4.0.1-beta.
|
|
3
|
+
"version": "4.0.1-beta.2595+7499852fef",
|
|
4
4
|
"description": "Forma 36: typography React Component",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@babel/runtime": "^7.6.2",
|
|
24
|
-
"@contentful/f36-core": "4.0.1-beta.
|
|
25
|
-
"@contentful/f36-tokens": "4.0.1-beta.
|
|
24
|
+
"@contentful/f36-core": "4.0.1-beta.2595+7499852fef",
|
|
25
|
+
"@contentful/f36-tokens": "4.0.1-beta.2595+7499852fef",
|
|
26
26
|
"emotion": "^10.0.17"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "7499852fef1921bc0636f4d544fde90ae91cb05c"
|
|
35
35
|
}
|