Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@contentful/f36-note

Package Overview
Dependencies
Maintainers
100
Versions
357
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contentful/f36-note - npm Package Compare versions

Comparing version 4.0.1-next-v4-6282.2214 to 4.0.1-next-v4-6289.2215

2

dist/main.js

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

var e=p(require("@babel/runtime/helpers/extends")),{cx:r,css:t}=require("emotion"),n=p(require("react")),{Flex:o,Box:a}=require("@contentful/f36-core"),{Button:i}=require("@contentful/f36-button"),{Text:l,Heading:s}=require("@contentful/f36-typography"),{Close:c,Warning:u,InfoCircle:g,CheckCircle:d,ErrorCircle:f}=require("@contentful/f36-icons"),m=p(require("@contentful/f36-tokens"));function p(e){return e&&e.__esModule?e.default:e}var b,h,C,y,v={};b=v,h="Note",C=()=>k,Object.defineProperty(b,h,{get:C,set:y,enumerable:!0,configurable:!0});const E=e=>{switch(e){case"primary":return{backgroundColor:m.blue100,borderColor:m.blue300,a:{color:m.blue700}};case"positive":return{backgroundColor:m.green100,borderColor:m.green300,a:{color:m.green700}};case"negative":return{backgroundColor:m.red100,borderColor:m.red300,a:{color:m.red700}};case"warning":return{backgroundColor:m.orange100,borderColor:m.orange300,a:{color:m.orange700}};default:return{}}},N={primary:g,positive:d,negative:f,warning:u},k=n.forwardRef(((u,g)=>{const{children:d,className:f,hasCloseButton:p,variant:b="primary",onClose:h,testId:C="cf-ui-note",title:y,...v}=u,k={note:({variant:e,hasCloseButton:r})=>t({padding:m.spacingM,margin:0,fontFamily:m.fontStackPrimary,fontWeight:m.fontWeightNormal,lineHeight:m.lineHeightDefault,fontSize:m.fontSizeM,display:"flex",flexDirection:"row",alignItems:"flex-start",borderRadius:m.borderRadiusMedium,paddingRight:r?m.spacingS:m.spacingM,border:"1px solid",...E(e)},""),title:t({color:m.gray800,fontWeight:m.fontWeightMedium,fontSize:m.fontSizeL,marginBottom:m.spacingXs},""),info:({hasCloseButton:e})=>t({marginLeft:m.spacingXs,fill:"currentColor",marginRight:e?m.spacingS:"unset"},""),content:t({color:m.gray700,width:"100%"},""),close:t({name:"eql546",styles:"&:hover{background-color:transparent;}"})},x=N[b];if(!x)throw new Error(`Intent ${b} is not supported in Note component.`);return n.createElement(a,e({as:"article",className:r(k.note({variant:b,hasCloseButton:p}),f),testId:C},v,{ref:g}),n.createElement(o,{marginRight:"spacingS"},n.createElement(x,{variant:b,size:y?"medium":"small"})),n.createElement("div",{className:k.info({hasCloseButton:p})},y&&n.createElement(s,{as:"h2",className:k.title},y),n.createElement(l,{as:"p",className:k.content},d)),p&&n.createElement(i,{variant:"transparent",icon:n.createElement(c,null),onClick:()=>{h&&h()},testId:`${C}-close`,label:"Dismiss",className:k.close}))}));var x,q;k.displayName="Note",x=module.exports,q=v,Object.keys(q).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(x,e,{enumerable:!0,get:function(){return q[e]}})}));
var e=p(require("@babel/runtime/helpers/extends")),{cx:r,css:t}=require("emotion"),n=p(require("react")),{Box:o,Flex:a}=require("@contentful/f36-core"),{Button:i}=require("@contentful/f36-button"),{Text:l,Heading:s}=require("@contentful/f36-typography"),{CheckCircle:c,ErrorCircle:u,InfoCircle:g,Close:d,Warning:f}=require("@contentful/f36-icons"),m=p(require("@contentful/f36-tokens"));function p(e){return e&&e.__esModule?e.default:e}var b,h,C,y,v={};b=v,h="Note",C=()=>k,Object.defineProperty(b,h,{get:C,set:y,enumerable:!0,configurable:!0});const E=e=>{switch(e){case"primary":return{backgroundColor:m.blue100,borderColor:m.blue300,a:{color:m.blue700}};case"positive":return{backgroundColor:m.green100,borderColor:m.green300,a:{color:m.green700}};case"negative":return{backgroundColor:m.red100,borderColor:m.red300,a:{color:m.red700}};case"warning":return{backgroundColor:m.orange100,borderColor:m.orange300,a:{color:m.orange700}};default:return{}}},N={primary:g,positive:c,negative:u,warning:f},k=n.forwardRef(((c,u)=>{const{children:g,className:f,hasCloseButton:p,variant:b="primary",onClose:h,testId:C="cf-ui-note",title:y,...v}=c,k={note:({variant:e,hasCloseButton:r})=>t({padding:m.spacingM,margin:0,fontFamily:m.fontStackPrimary,fontWeight:m.fontWeightNormal,lineHeight:m.lineHeightDefault,fontSize:m.fontSizeM,display:"flex",flexDirection:"row",alignItems:"flex-start",borderRadius:m.borderRadiusMedium,paddingRight:r?m.spacingS:m.spacingM,border:"1px solid",...E(e)},""),title:t({color:m.gray800,fontWeight:m.fontWeightMedium,fontSize:m.fontSizeL,marginBottom:m.spacingXs},""),info:({hasCloseButton:e})=>t({marginLeft:m.spacingXs,fill:"currentColor",marginRight:e?m.spacingS:"unset"},""),content:t({color:m.gray700,width:"100%"},""),close:t({name:"eql546",styles:"&:hover{background-color:transparent;}"})},x=N[b];if(!x)throw new Error(`Intent ${b} is not supported in Note component.`);return n.createElement(o,e({as:"article",className:r(k.note({variant:b,hasCloseButton:p}),f),testId:C},v,{ref:u}),n.createElement(a,{marginRight:"spacingS"},n.createElement(x,{variant:b,size:y?"medium":"small"})),n.createElement("div",{className:k.info({hasCloseButton:p})},y&&n.createElement(s,{as:"h2",className:k.title},y),n.createElement(l,{as:"p",className:k.content},g)),p&&n.createElement(i,{variant:"transparent",icon:n.createElement(d,null),onClick:()=>{h&&h()},testId:`${C}-close`,label:"Dismiss",className:k.close}))}));var x,q;k.displayName="Note",x=module.exports,q=v,Object.keys(q).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(x,e,{enumerable:!0,get:function(){return q[e]}})}));
//# sourceMappingURL=main.js.map

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

import e from"@babel/runtime/helpers/esm/extends";import{cx as t,css as r}from"emotion";import o from"react";import{Box as n,Flex as a}from"@contentful/f36-core";import{Button as i}from"@contentful/f36-button";import{Text as s,Heading as l}from"@contentful/f36-typography";import{Close as c,Warning as m,InfoCircle as g,ErrorCircle as f,CheckCircle as u}from"@contentful/f36-icons";import d from"@contentful/f36-tokens";var p,h,b,C;p={},h="Note",b=()=>N,Object.defineProperty(p,h,{get:b,set:C,enumerable:!0,configurable:!0});const y=e=>{switch(e){case"primary":return{backgroundColor:d.blue100,borderColor:d.blue300,a:{color:d.blue700}};case"positive":return{backgroundColor:d.green100,borderColor:d.green300,a:{color:d.green700}};case"negative":return{backgroundColor:d.red100,borderColor:d.red300,a:{color:d.red700}};case"warning":return{backgroundColor:d.orange100,borderColor:d.orange300,a:{color:d.orange700}};default:return{}}},v={primary:g,positive:u,negative:f,warning:m},N=o.forwardRef(((m,g)=>{const{children:f,className:u,hasCloseButton:p,variant:h="primary",onClose:b,testId:C="cf-ui-note",title:N,...x}=m,E={note:({variant:e,hasCloseButton:t})=>r({padding:d.spacingM,margin:0,fontFamily:d.fontStackPrimary,fontWeight:d.fontWeightNormal,lineHeight:d.lineHeightDefault,fontSize:d.fontSizeM,display:"flex",flexDirection:"row",alignItems:"flex-start",borderRadius:d.borderRadiusMedium,paddingRight:t?d.spacingS:d.spacingM,border:"1px solid",...y(e)},""),title:r({color:d.gray800,fontWeight:d.fontWeightMedium,fontSize:d.fontSizeL,marginBottom:d.spacingXs},""),info:({hasCloseButton:e})=>r({marginLeft:d.spacingXs,fill:"currentColor",marginRight:e?d.spacingS:"unset"},""),content:r({color:d.gray700,width:"100%"},""),close:r({name:"eql546",styles:"&:hover{background-color:transparent;}"})},k=v[h];if(!k)throw new Error(`Intent ${h} is not supported in Note component.`);return o.createElement(n,e({as:"article",className:t(E.note({variant:h,hasCloseButton:p}),u),testId:C},x,{ref:g}),o.createElement(a,{marginRight:"spacingS"},o.createElement(k,{variant:h,size:N?"medium":"small"})),o.createElement("div",{className:E.info({hasCloseButton:p})},N&&o.createElement(l,{as:"h2",className:E.title},N),o.createElement(s,{as:"p",className:E.content},f)),p&&o.createElement(i,{variant:"transparent",icon:o.createElement(c,null),onClick:()=>{b&&b()},testId:`${C}-close`,label:"Dismiss",className:E.close}))}));N.displayName="Note";export{N as Note};
import e from"@babel/runtime/helpers/esm/extends";import{cx as t,css as r}from"emotion";import o from"react";import{Flex as n,Box as a}from"@contentful/f36-core";import{Button as i}from"@contentful/f36-button";import{Heading as s,Text as l}from"@contentful/f36-typography";import{InfoCircle as c,ErrorCircle as m,Warning as g,Close as f,CheckCircle as u}from"@contentful/f36-icons";import d from"@contentful/f36-tokens";var p,h,b,C;p={},h="Note",b=()=>N,Object.defineProperty(p,h,{get:b,set:C,enumerable:!0,configurable:!0});const y=e=>{switch(e){case"primary":return{backgroundColor:d.blue100,borderColor:d.blue300,a:{color:d.blue700}};case"positive":return{backgroundColor:d.green100,borderColor:d.green300,a:{color:d.green700}};case"negative":return{backgroundColor:d.red100,borderColor:d.red300,a:{color:d.red700}};case"warning":return{backgroundColor:d.orange100,borderColor:d.orange300,a:{color:d.orange700}};default:return{}}},v={primary:c,positive:u,negative:m,warning:g},N=o.forwardRef(((c,m)=>{const{children:g,className:u,hasCloseButton:p,variant:h="primary",onClose:b,testId:C="cf-ui-note",title:N,...x}=c,E={note:({variant:e,hasCloseButton:t})=>r({padding:d.spacingM,margin:0,fontFamily:d.fontStackPrimary,fontWeight:d.fontWeightNormal,lineHeight:d.lineHeightDefault,fontSize:d.fontSizeM,display:"flex",flexDirection:"row",alignItems:"flex-start",borderRadius:d.borderRadiusMedium,paddingRight:t?d.spacingS:d.spacingM,border:"1px solid",...y(e)},""),title:r({color:d.gray800,fontWeight:d.fontWeightMedium,fontSize:d.fontSizeL,marginBottom:d.spacingXs},""),info:({hasCloseButton:e})=>r({marginLeft:d.spacingXs,fill:"currentColor",marginRight:e?d.spacingS:"unset"},""),content:r({color:d.gray700,width:"100%"},""),close:r({name:"eql546",styles:"&:hover{background-color:transparent;}"})},k=v[h];if(!k)throw new Error(`Intent ${h} is not supported in Note component.`);return o.createElement(a,e({as:"article",className:t(E.note({variant:h,hasCloseButton:p}),u),testId:C},x,{ref:m}),o.createElement(n,{marginRight:"spacingS"},o.createElement(k,{variant:h,size:N?"medium":"small"})),o.createElement("div",{className:E.info({hasCloseButton:p})},N&&o.createElement(s,{as:"h2",className:E.title},N),o.createElement(l,{as:"p",className:E.content},g)),p&&o.createElement(i,{variant:"transparent",icon:o.createElement(f,null),onClick:()=>{b&&b()},testId:`${C}-close`,label:"Dismiss",className:E.close}))}));N.displayName="Note";export{N as Note};
//# sourceMappingURL=module.js.map
{
"name": "@contentful/f36-note",
"version": "4.0.1-next-v4-6282.2214+38deaded",
"version": "4.0.1-next-v4-6289.2215+a6d6282a",
"description": "Forma 36: Note component",

@@ -10,7 +10,7 @@ "scripts": {

"@babel/runtime": "^7.6.2",
"@contentful/f36-button": "4.0.1-next-v4-6282.2214+38deaded",
"@contentful/f36-core": "4.0.1-next-v4-6282.2214+38deaded",
"@contentful/f36-icons": "4.0.1-next-v4-6282.2214+38deaded",
"@contentful/f36-tokens": "4.0.1-next-v4-6282.2214+38deaded",
"@contentful/f36-typography": "4.0.1-next-v4-6282.2214+38deaded",
"@contentful/f36-button": "4.0.1-next-v4-6289.2215+a6d6282a",
"@contentful/f36-core": "4.0.1-next-v4-6289.2215+a6d6282a",
"@contentful/f36-icons": "4.0.1-next-v4-6289.2215+a6d6282a",
"@contentful/f36-tokens": "4.0.1-next-v4-6289.2215+a6d6282a",
"@contentful/f36-typography": "4.0.1-next-v4-6289.2215+a6d6282a",
"emotion": "^10.0.17"

@@ -42,3 +42,3 @@ },

},
"gitHead": "38deadedaa10600369e511f5cbf369dcde83c53f"
"gitHead": "a6d6282aa585bcf2675a6d8708791105b4584802"
}
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