@contentful/f36-typography
Advanced tools
Comparing version 4.0.1-next-v4-5363.2130 to 4.0.1-next-v4-5419.2131
@@ -1,2 +0,2 @@ | ||
import e from"@babel/runtime/helpers/esm/extends";import{css as t,cx as i}from"emotion";import n,{useContext as a,createContext as o}from"react";import r from"@contentful/f36-tokens";import{Box as s}from"@contentful/f36-core";function l(e,t,i,n){Object.defineProperty(e,t,{get:i,set:n,enumerable:!0,configurable:!0})}var c={};l(c,"Heading",(()=>h)),l(c,"Subheading",(()=>u)),l(c,"Typography",(()=>m)),l(c,"DisplayText",(()=>S)),l(c,"SectionHeading",(()=>y)),l(c,"Text",(()=>T));const f={displayText:"spacingL",displayTextLarge:"spacingXl",heading:"spacingM",sectionHeading:"spacingL",subheading:"spacingM",text:"spacingM"},g=o({});function m(t){return n.createElement(g.Provider,{value:f},n.createElement(s,e({testId:"cf-ui-text-container"},t)))}const d=({children:o,className:l,...c},f)=>{const m=a(g);return n.createElement(s,e({as:"h1",display:"block",margin:"none",marginBottom:m.heading,testId:"cf-ui-heading",className:i(t({fontFamily:r.fontStackPrimary,fontWeight:r.fontWeightDemiBold,color:r.colorTextDark,fontSize:r.fontSizeXl,lineHeight:r.lineHeightXl,textRendering:"optimizeLegibility"},""),l)},c,{ref:f}),o)},h=n.forwardRef(d),p=({children:o,className:s,...l},c)=>{const f=a(g);return n.createElement(h,e({as:"h2",testId:"cf-ui-subheading",marginBottom:f.subheading,className:i(t({fontSize:r.fontSizeL,lineHeight:r.lineHeightL},""),s)},l,{ref:c}),o)},u=n.forwardRef(p),x=({children:o,className:s,size:l="default",...c},f)=>{const m=a(g);let d="";return d=t("huge"===l?{fontSize:r.fontSize4Xl,lineHeight:r.lineHeight4Xl}:"large"===l?{fontSize:r.fontSize3Xl,lineHeight:r.lineHeight3Xl}:{fontSize:r.fontSize2Xl,lineHeight:r.lineHeight2Xl},""),n.createElement(h,e({as:"h1",testId:"cf-ui-display-text",marginBottom:"default"===l?m.displayText:m.displayTextLarge,className:i(d,s)},c,{ref:f}),o)},S=n.forwardRef(x),H=({children:o,className:s,...l},c)=>{const f=a(g);return n.createElement(h,e({as:"h3",testId:"cf-ui-section-heading",marginBottom:f.sectionHeading,className:i(t({fontSize:r.fontSizeS,lineHeight:r.lineHeightS,letterSpacing:r.letterSpacingWide,textTransform:"uppercase"},""),s)},l,{ref:c}),o)},y=n.forwardRef(H),z=({children:o,className:s,...l},c)=>{const f=a(g);return n.createElement(h,e({as:"p",testId:"cf-ui-text",marginBottom:f.text,className:i(t({fontWeight:r.fontWeightNormal,color:r.colorTextMid,fontSize:r.fontSizeM,lineHeight:r.lineHeightM},""),s)},l,{ref:c}),o)},T=n.forwardRef(z);export{h as Heading,u as Subheading,m as Typography,S as DisplayText,y as SectionHeading,T as Text}; | ||
import e from"@babel/runtime/helpers/esm/extends";import{cx as t,css as i}from"emotion";import n,{useContext as a,createContext as o}from"react";import r from"@contentful/f36-tokens";import{Box as s}from"@contentful/f36-core";function l(e,t,i,n){Object.defineProperty(e,t,{get:i,set:n,enumerable:!0,configurable:!0})}var c={};l(c,"Heading",(()=>h)),l(c,"Subheading",(()=>u)),l(c,"Typography",(()=>m)),l(c,"DisplayText",(()=>S)),l(c,"SectionHeading",(()=>y)),l(c,"Text",(()=>T));const f={displayText:"spacingL",displayTextLarge:"spacingXl",heading:"spacingM",sectionHeading:"spacingL",subheading:"spacingM",text:"spacingM"},g=o({});function m(t){return n.createElement(g.Provider,{value:f},n.createElement(s,e({testId:"cf-ui-text-container"},t)))}const d=({children:o,className:l,...c},f)=>{const m=a(g);return n.createElement(s,e({as:"h1",display:"block",margin:"none",marginBottom:m.heading,testId:"cf-ui-heading",className:t(i({fontFamily:r.fontStackPrimary,fontWeight:r.fontWeightDemiBold,color:r.colorTextDark,fontSize:r.fontSizeXl,lineHeight:r.lineHeightXl,textRendering:"optimizeLegibility"},""),l)},c,{ref:f}),o)},h=n.forwardRef(d),p=({children:o,className:s,...l},c)=>{const f=a(g);return n.createElement(h,e({as:"h2",testId:"cf-ui-subheading",marginBottom:f.subheading,className:t(i({fontSize:r.fontSizeL,lineHeight:r.lineHeightL},""),s)},l,{ref:c}),o)},u=n.forwardRef(p),x=({children:o,className:s,size:l="default",...c},f)=>{const m=a(g);let d="";return d=i("huge"===l?{fontSize:r.fontSize4Xl,lineHeight:r.lineHeight4Xl}:"large"===l?{fontSize:r.fontSize3Xl,lineHeight:r.lineHeight3Xl}:{fontSize:r.fontSize2Xl,lineHeight:r.lineHeight2Xl},""),n.createElement(h,e({as:"h1",testId:"cf-ui-display-text",marginBottom:"default"===l?m.displayText:m.displayTextLarge,className:t(d,s)},c,{ref:f}),o)},S=n.forwardRef(x),H=({children:o,className:s,...l},c)=>{const f=a(g);return n.createElement(h,e({as:"h3",testId:"cf-ui-section-heading",marginBottom:f.sectionHeading,className:t(i({fontSize:r.fontSizeS,lineHeight:r.lineHeightS,letterSpacing:r.letterSpacingWide,textTransform:"uppercase"},""),s)},l,{ref:c}),o)},y=n.forwardRef(H),z=({children:o,className:s,...l},c)=>{const f=a(g);return n.createElement(h,e({as:"p",testId:"cf-ui-text",marginBottom:f.text,className:t(i({fontWeight:r.fontWeightNormal,color:r.colorTextMid,fontSize:r.fontSizeM,lineHeight:r.lineHeightM},""),s)},l,{ref:c}),o)},T=n.forwardRef(z);export{h as Heading,u as Subheading,m as Typography,S as DisplayText,y as SectionHeading,T as Text}; | ||
//# sourceMappingURL=module.js.map |
{ | ||
"name": "@contentful/f36-typography", | ||
"version": "4.0.1-next-v4-5363.2130+d4bb4b25", | ||
"version": "4.0.1-next-v4-5419.2131+712a0da4", | ||
"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-5363.2130+d4bb4b25", | ||
"@contentful/f36-tokens": "4.0.1-next-v4-5363.2130+d4bb4b25", | ||
"@contentful/f36-core": "4.0.1-next-v4-5419.2131+712a0da4", | ||
"@contentful/f36-tokens": "4.0.1-next-v4-5419.2131+712a0da4", | ||
"emotion": "^10.0.17" | ||
@@ -36,3 +36,3 @@ }, | ||
}, | ||
"gitHead": "d4bb4b258684d14646c6e6c7666177a0801e33fd" | ||
"gitHead": "712a0da43c4aa881d8375537c7c18ac983edb065" | ||
} |
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