Socket
Socket
Sign inDemoInstall

@contentful/f36-typography

Package Overview
Dependencies
Maintainers
100
Versions
400
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contentful/f36-typography - npm Package Compare versions

Comparing version 4.0.1-next-v4-4389.1990 to 4.0.1-next-v4-4457.1996

2

dist/main.js

@@ -1,2 +0,2 @@

function e(e){return e&&e.__esModule?e.default:e}function t(e,t,n){Object.defineProperty(e,t,{get:n,enumerable:!0})}var{Box:n}=require("@contentful/f36-core"),i=e(require("@contentful/f36-tokens")),r=require("react"),a=e(r),{useContext:o,createContext:s}=r,{cx:c,css:l}=require("emotion"),g=e(require("@babel/runtime/helpers/extends")),f={};const u={displayText:"spacingL",displayTextLarge:"spacingXl",heading:"spacingM",paragraph:"spacingM",sectionHeading:"spacingL",subheading:"spacingM"},d=s({});function h(e){return a.createElement(d.Provider,{value:u},a.createElement(n,g({testId:"cf-ui-text-container"},e)))}exports.Typography=h;const p=({children:e,className:t,...r},s)=>{const f=o(d);return a.createElement(n,g({as:"h1",display:"block",margin:"none",marginBottom:f.heading,testId:"cf-ui-heading",className:c(l({fontFamily:i.fontStackPrimary,fontWeight:i.fontWeightDemiBold,color:i.colorTextDark,fontSize:i.fontSizeXl,lineHeight:i.lineHeightXl,textRendering:"optimizeLegibility"},""),t)},r,{ref:s}),e)},m=a.forwardRef(p);exports.Heading=m;const x=({children:e,className:t,...n},r)=>{const s=o(d);return a.createElement(m,g({as:"h2",testId:"cf-ui-subheading",marginBottom:s.subheading,className:c(l({fontSize:i.fontSizeL,lineHeight:i.lineHeightL},""),t)},n,{ref:r}),e)},S=a.forwardRef(x);exports.Subheading=S;const H=({children:e,className:t,size:n="default",...r},s)=>{const f=o(d);let u="";return u=l("huge"===n?{fontSize:i.fontSize4Xl,lineHeight:i.lineHeight4Xl}:"large"===n?{fontSize:i.fontSize3Xl,lineHeight:i.lineHeight3Xl}:{fontSize:i.fontSize2Xl,lineHeight:i.lineHeight2Xl},""),a.createElement(m,g({as:"h1",testId:"cf-ui-display-text",marginBottom:"default"===n?f.displayText:f.displayTextLarge,className:c(u,t)},r,{ref:s}),e)},y=a.forwardRef(H);exports.DisplayText=y;const z=({children:e,className:t,...n},r)=>{const s=o(d);return a.createElement(m,g({as:"h3",testId:"cf-ui-section-heading",marginBottom:s.sectionHeading,className:c(l({fontSize:i.fontSizeS,lineHeight:i.lineHeightS,letterSpacing:i.letterSpacingWide,textTransform:"uppercase"},""),t)},n,{ref:r}),e)},b=a.forwardRef(z);exports.SectionHeading=b;const N=({children:e,className:t,...n},r)=>{const s=o(d);return a.createElement(m,g({as:"p",testId:"cf-ui-paragraph",marginBottom:s.paragraph,className:c(l({fontWeight:i.fontWeightNormal,color:i.colorTextMid,fontSize:i.fontSizeM,lineHeight:i.lineHeightM},""),t)},n,{ref:r}),e)},T=a.forwardRef(N);exports.Paragraph=T,t(f,"Heading",(function(){return m})),t(f,"Subheading",(function(){return S})),t(f,"Typography",(function(){return h})),t(f,"DisplayText",(function(){return y})),t(f,"SectionHeading",(function(){return b})),t(f,"Paragraph",(function(){return T}));
var e=f(require("@babel/runtime/helpers/extends")),{cx:t,css:i}=require("emotion"),n=require("react"),a=f(n),{useContext:r,createContext:o}=n,l=f(require("@contentful/f36-tokens")),{Box:c}=require("@contentful/f36-core");function s(e,t,i,n){Object.defineProperty(e,t,{get:i,set:n,enumerable:!0,configurable:!0})}function f(e){return e&&e.__esModule?e.default:e}var g={};s(g,"Heading",(()=>p)),s(g,"Subheading",(()=>H)),s(g,"Typography",(()=>h)),s(g,"DisplayText",(()=>z)),s(g,"SectionHeading",(()=>b)),s(g,"Paragraph",(()=>T));const d={displayText:"spacingL",displayTextLarge:"spacingXl",heading:"spacingM",paragraph:"spacingM",sectionHeading:"spacingL",subheading:"spacingM"},u=o({});function h(t){return a.createElement(u.Provider,{value:d},a.createElement(c,e({testId:"cf-ui-text-container"},t)))}const m=({children:n,className:o,...s},f)=>{const g=r(u);return a.createElement(c,e({as:"h1",display:"block",margin:"none",marginBottom:g.heading,testId:"cf-ui-heading",className:t(i({fontFamily:l.fontStackPrimary,fontWeight:l.fontWeightDemiBold,color:l.colorTextDark,fontSize:l.fontSizeXl,lineHeight:l.lineHeightXl,textRendering:"optimizeLegibility"},""),o)},s,{ref:f}),n)},p=a.forwardRef(m),S=({children:n,className:o,...c},s)=>{const f=r(u);return a.createElement(p,e({as:"h2",testId:"cf-ui-subheading",marginBottom:f.subheading,className:t(i({fontSize:l.fontSizeL,lineHeight:l.lineHeightL},""),o)},c,{ref:s}),n)},H=a.forwardRef(S),x=({children:n,className:o,size:c="default",...s},f)=>{const g=r(u);let d="";return d=i("huge"===c?{fontSize:l.fontSize4Xl,lineHeight:l.lineHeight4Xl}:"large"===c?{fontSize:l.fontSize3Xl,lineHeight:l.lineHeight3Xl}:{fontSize:l.fontSize2Xl,lineHeight:l.lineHeight2Xl},""),a.createElement(p,e({as:"h1",testId:"cf-ui-display-text",marginBottom:"default"===c?g.displayText:g.displayTextLarge,className:t(d,o)},s,{ref:f}),n)},z=a.forwardRef(x),y=({children:n,className:o,...c},s)=>{const f=r(u);return a.createElement(p,e({as:"h3",testId:"cf-ui-section-heading",marginBottom:f.sectionHeading,className:t(i({fontSize:l.fontSizeS,lineHeight:l.lineHeightS,letterSpacing:l.letterSpacingWide,textTransform:"uppercase"},""),o)},c,{ref:s}),n)},b=a.forwardRef(y),N=({children:n,className:o,...c},s)=>{const f=r(u);return a.createElement(p,e({as:"p",testId:"cf-ui-paragraph",marginBottom:f.paragraph,className:t(i({fontWeight:l.fontWeightNormal,color:l.colorTextMid,fontSize:l.fontSizeM,lineHeight:l.lineHeightM},""),o)},c,{ref:s}),n)},T=a.forwardRef(N);var X,E;X=module.exports,E=g,Object.keys(E).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(X,e,{enumerable:!0,get:function(){return E[e]}})}));
//# sourceMappingURL=main.js.map

@@ -1,2 +0,2 @@

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

@@ -36,3 +36,3 @@ },

},
"gitHead": "46acac9e2ca6e5eab92567ca267a3066f2bafce0"
"gitHead": "a8e784c0a708a6ff8f86b1e95e882b7333126c48"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc