Socket
Socket
Sign inDemoInstall

@contentful/f36-note

Package Overview
Dependencies
Maintainers
102
Versions
350
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-6748.2278 to 4.0.1-next-v4-6754.2279

2

dist/main.js

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

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

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

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

"@babel/runtime": "^7.6.2",
"@contentful/f36-button": "4.0.1-next-v4-6748.2278+3d8c58a5",
"@contentful/f36-core": "4.0.1-next-v4-6748.2278+3d8c58a5",
"@contentful/f36-icons": "4.0.1-next-v4-6748.2278+3d8c58a5",
"@contentful/f36-tokens": "4.0.1-next-v4-6748.2278+3d8c58a5",
"@contentful/f36-typography": "4.0.1-next-v4-6748.2278+3d8c58a5",
"@contentful/f36-button": "4.0.1-next-v4-6754.2279+d702f155",
"@contentful/f36-core": "4.0.1-next-v4-6754.2279+d702f155",
"@contentful/f36-icons": "4.0.1-next-v4-6754.2279+d702f155",
"@contentful/f36-tokens": "4.0.1-next-v4-6754.2279+d702f155",
"@contentful/f36-typography": "4.0.1-next-v4-6754.2279+d702f155",
"emotion": "^10.0.17"

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

},
"gitHead": "3d8c58a50b62f4e2e2a9157e1385a21650ed191a"
"gitHead": "d702f155ce0fbb822f92e55422796f4f4c88ba0d"
}
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