@contentful/f36-typography
Advanced tools
Comparing version 4.0.1-next-v4-5719.2157 to 4.0.1-next-v4-5782.2167
@@ -1,2 +0,2 @@ | ||
import e from"@babel/runtime/helpers/esm/extends";import{cx as t,css as i}from"emotion";import n,{useContext as a,createContext as r}from"react";import o 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",(()=>x)),l(c,"SectionHeading",(()=>y)),l(c,"Text",(()=>b));const g={displayText:"spacingL",displayTextLarge:"spacingXl",heading:"spacingM",sectionHeading:"spacingL",subheading:"spacingM",text:"spacingM"},f=r({});function m(t){return n.createElement(f.Provider,{value:g},n.createElement(s,e({testId:"cf-ui-text-container"},t)))}const d=({children:r,className:l,...c},g)=>{const m=a(f);return n.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=n.forwardRef(d),p=({children:r,className:s,...l},c)=>{const g=a(f);return n.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=n.forwardRef(p),S=({children:r,className:s,size:l="default",...c},g)=>{const m=a(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},""),n.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)},x=n.forwardRef(S),H=({children:r,className:s,...l},c)=>{const g=a(f);return n.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=n.forwardRef(H),z=({children:r,className:s,...l},c)=>{const g=a(f);return n.createElement(h,e({as:"p",testId:"cf-ui-text",marginBottom:g.text,className:t(i({fontWeight:o.fontWeightNormal,color:o.gray700,fontSize:o.fontSizeM,lineHeight:o.lineHeightM},""),s)},l,{ref:c}),r)},b=n.forwardRef(z);export{h as Heading,u as Subheading,m as Typography,x as DisplayText,y as SectionHeading,b as Text}; | ||
import e from"@babel/runtime/helpers/esm/extends";import{css as t,cx as i}from"emotion";import n,{useContext as a,createContext as r}from"react";import o 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",(()=>x)),l(c,"SectionHeading",(()=>y)),l(c,"Text",(()=>b));const g={displayText:"spacingL",displayTextLarge:"spacingXl",heading:"spacingM",sectionHeading:"spacingL",subheading:"spacingM",text:"spacingM"},f=r({});function m(t){return n.createElement(f.Provider,{value:g},n.createElement(s,e({testId:"cf-ui-text-container"},t)))}const d=({children:r,className:l,...c},g)=>{const m=a(f);return n.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=n.forwardRef(d),p=({children:r,className:s,...l},c)=>{const g=a(f);return n.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=n.forwardRef(p),S=({children:r,className:s,size:l="default",...c},g)=>{const m=a(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},""),n.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)},x=n.forwardRef(S),H=({children:r,className:s,...l},c)=>{const g=a(f);return n.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=n.forwardRef(H),z=({children:r,className:s,...l},c)=>{const g=a(f);return n.createElement(h,e({as:"p",testId:"cf-ui-text",marginBottom:g.text,className:i(t({fontWeight:o.fontWeightNormal,color:o.gray700,fontSize:o.fontSizeM,lineHeight:o.lineHeightM},""),s)},l,{ref:c}),r)},b=n.forwardRef(z);export{h as Heading,u as Subheading,m as Typography,x as DisplayText,y as SectionHeading,b as Text}; | ||
//# sourceMappingURL=module.js.map |
{ | ||
"name": "@contentful/f36-typography", | ||
"version": "4.0.1-next-v4-5719.2157+cd8b7115", | ||
"version": "4.0.1-next-v4-5782.2167+9e62ae66", | ||
"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-5719.2157+cd8b7115", | ||
"@contentful/f36-tokens": "4.0.1-next-v4-5719.2157+cd8b7115", | ||
"@contentful/f36-core": "4.0.1-next-v4-5782.2167+9e62ae66", | ||
"@contentful/f36-tokens": "4.0.1-next-v4-5782.2167+9e62ae66", | ||
"emotion": "^10.0.17" | ||
@@ -36,3 +36,3 @@ }, | ||
}, | ||
"gitHead": "cd8b7115fba2be2e4f770c271952c91a75438465" | ||
"gitHead": "9e62ae6629c3b7c9143be6cb9263c31640cfefff" | ||
} |
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