@contentful/f36-typography
Advanced tools
Comparing version 4.0.1-next-v4-4531.2002 to 4.0.1-next-v4-4759.2074
@@ -1,2 +0,2 @@ | ||
import e from"@babel/runtime/helpers/esm/extends";import{cx as t,css as i}from"emotion";import a,{useContext as n,createContext as r}from"react";import o from"@contentful/f36-tokens";import{Box as s}from"@contentful/f36-core";function l(e,t,i,a){Object.defineProperty(e,t,{get:i,set:a,enumerable:!0,configurable:!0})}var c={};l(c,"Heading",(()=>h)),l(c,"Subheading",(()=>u)),l(c,"Typography",(()=>m)),l(c,"DisplayText",(()=>H)),l(c,"SectionHeading",(()=>y)),l(c,"Paragraph",(()=>b));const g={displayText:"spacingL",displayTextLarge:"spacingXl",heading:"spacingM",paragraph:"spacingM",sectionHeading:"spacingL",subheading:"spacingM"},f=r({});function m(t){return a.createElement(f.Provider,{value:g},a.createElement(s,e({testId:"cf-ui-text-container"},t)))}const d=({children:r,className:l,...c},g)=>{const m=n(f);return a.createElement(s,e({as:"h1",display:"block",margin:"none",marginBottom:m.heading,testId:"cf-ui-heading",className:t(i({fontFamily:o.fontStackPrimary,fontWeight:o.fontWeightDemiBold,color:o.colorTextDark,fontSize:o.fontSizeXl,lineHeight:o.lineHeightXl,textRendering:"optimizeLegibility"},""),l)},c,{ref:g}),r)},h=a.forwardRef(d),p=({children:r,className:s,...l},c)=>{const g=n(f);return a.createElement(h,e({as:"h2",testId:"cf-ui-subheading",marginBottom:g.subheading,className:t(i({fontSize:o.fontSizeL,lineHeight:o.lineHeightL},""),s)},l,{ref:c}),r)},u=a.forwardRef(p),S=({children:r,className:s,size:l="default",...c},g)=>{const m=n(f);let d="";return d=i("huge"===l?{fontSize:o.fontSize4Xl,lineHeight:o.lineHeight4Xl}:"large"===l?{fontSize:o.fontSize3Xl,lineHeight:o.lineHeight3Xl}:{fontSize:o.fontSize2Xl,lineHeight:o.lineHeight2Xl},""),a.createElement(h,e({as:"h1",testId:"cf-ui-display-text",marginBottom:"default"===l?m.displayText:m.displayTextLarge,className:t(d,s)},c,{ref:g}),r)},H=a.forwardRef(S),x=({children:r,className:s,...l},c)=>{const g=n(f);return a.createElement(h,e({as:"h3",testId:"cf-ui-section-heading",marginBottom:g.sectionHeading,className:t(i({fontSize:o.fontSizeS,lineHeight:o.lineHeightS,letterSpacing:o.letterSpacingWide,textTransform:"uppercase"},""),s)},l,{ref:c}),r)},y=a.forwardRef(x),z=({children:r,className:s,...l},c)=>{const g=n(f);return a.createElement(h,e({as:"p",testId:"cf-ui-paragraph",marginBottom:g.paragraph,className:t(i({fontWeight:o.fontWeightNormal,color:o.colorTextMid,fontSize:o.fontSizeM,lineHeight:o.lineHeightM},""),s)},l,{ref:c}),r)},b=a.forwardRef(z);export{h as Heading,u as Subheading,m as Typography,H as DisplayText,y as SectionHeading,b as Paragraph}; | ||
import e from"@babel/runtime/helpers/esm/extends";import{css as t,cx as i}from"emotion";import a,{useContext as n,createContext as r}from"react";import o from"@contentful/f36-tokens";import{Box as s}from"@contentful/f36-core";function l(e,t,i,a){Object.defineProperty(e,t,{get:i,set:a,enumerable:!0,configurable:!0})}var c={};l(c,"Heading",(()=>h)),l(c,"Subheading",(()=>u)),l(c,"Typography",(()=>m)),l(c,"DisplayText",(()=>H)),l(c,"SectionHeading",(()=>y)),l(c,"Paragraph",(()=>b));const g={displayText:"spacingL",displayTextLarge:"spacingXl",heading:"spacingM",paragraph:"spacingM",sectionHeading:"spacingL",subheading:"spacingM"},f=r({});function m(t){return a.createElement(f.Provider,{value:g},a.createElement(s,e({testId:"cf-ui-text-container"},t)))}const d=({children:r,className:l,...c},g)=>{const m=n(f);return a.createElement(s,e({as:"h1",display:"block",margin:"none",marginBottom:m.heading,testId:"cf-ui-heading",className:i(t({fontFamily:o.fontStackPrimary,fontWeight:o.fontWeightDemiBold,color:o.colorTextDark,fontSize:o.fontSizeXl,lineHeight:o.lineHeightXl,textRendering:"optimizeLegibility"},""),l)},c,{ref:g}),r)},h=a.forwardRef(d),p=({children:r,className:s,...l},c)=>{const g=n(f);return a.createElement(h,e({as:"h2",testId:"cf-ui-subheading",marginBottom:g.subheading,className:i(t({fontSize:o.fontSizeL,lineHeight:o.lineHeightL},""),s)},l,{ref:c}),r)},u=a.forwardRef(p),S=({children:r,className:s,size:l="default",...c},g)=>{const m=n(f);let d="";return d=t("huge"===l?{fontSize:o.fontSize4Xl,lineHeight:o.lineHeight4Xl}:"large"===l?{fontSize:o.fontSize3Xl,lineHeight:o.lineHeight3Xl}:{fontSize:o.fontSize2Xl,lineHeight:o.lineHeight2Xl},""),a.createElement(h,e({as:"h1",testId:"cf-ui-display-text",marginBottom:"default"===l?m.displayText:m.displayTextLarge,className:i(d,s)},c,{ref:g}),r)},H=a.forwardRef(S),x=({children:r,className:s,...l},c)=>{const g=n(f);return a.createElement(h,e({as:"h3",testId:"cf-ui-section-heading",marginBottom:g.sectionHeading,className:i(t({fontSize:o.fontSizeS,lineHeight:o.lineHeightS,letterSpacing:o.letterSpacingWide,textTransform:"uppercase"},""),s)},l,{ref:c}),r)},y=a.forwardRef(x),z=({children:r,className:s,...l},c)=>{const g=n(f);return a.createElement(h,e({as:"p",testId:"cf-ui-paragraph",marginBottom:g.paragraph,className:i(t({fontWeight:o.fontWeightNormal,color:o.colorTextMid,fontSize:o.fontSizeM,lineHeight:o.lineHeightM},""),s)},l,{ref:c}),r)},b=a.forwardRef(z);export{h as Heading,u as Subheading,m as Typography,H as DisplayText,y as SectionHeading,b as Paragraph}; | ||
//# sourceMappingURL=module.js.map |
{ | ||
"name": "@contentful/f36-typography", | ||
"version": "4.0.1-next-v4-4531.2002+529a1c05", | ||
"version": "4.0.1-next-v4-4759.2074+4129a7dd", | ||
"description": "Forma 36: typography React Component", | ||
@@ -25,4 +25,4 @@ "license": "MIT", | ||
"@babel/runtime": "^7.6.2", | ||
"@contentful/f36-core": "4.0.1-next-v4-4531.2002+529a1c05", | ||
"@contentful/f36-tokens": "4.0.1-next-v4-4531.2002+529a1c05", | ||
"@contentful/f36-core": "4.0.1-next-v4-4759.2074+4129a7dd", | ||
"@contentful/f36-tokens": "4.0.1-next-v4-4759.2074+4129a7dd", | ||
"emotion": "^10.0.17" | ||
@@ -36,3 +36,3 @@ }, | ||
}, | ||
"gitHead": "529a1c056c757b4c8c9638bd9c01e0a244ce0aba" | ||
"gitHead": "4129a7dd5a2f38fc7ae3544fb7e4b62916c13a6d" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package