@contentful/f36-note
Advanced tools
Comparing version 4.0.1-next-v4-6763.2280 to 4.0.1-next-v4-6795.2281
@@ -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"),{Text:l,Heading:c}=require("@contentful/f36-typography"),{WarningIcon:s,CheckCircleIcon:u,InfoCircleIcon:g,ErrorCircleIcon:f,CloseIcon: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:g,positive:u,negative:f,warning:s},q=n.forwardRef(((s,u)=>{const{children:g,className:f,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}),f),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(c,{as:"h2",className:q.title},v),n.createElement(l,{as:"p",className:q.content},g)),b&&n.createElement(i,{variant:"transparent",icon:n.createElement(d,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"),{Text:l,Heading:c}=require("@contentful/f36-typography"),{CheckCircleIcon:s,InfoCircleIcon:u,ErrorCircleIcon:g,WarningIcon:f,CloseIcon: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:u,positive:s,negative:g,warning:f},q=n.forwardRef(((s,u)=>{const{children:g,className:f,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}),f),testId:y,ref:u}),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(c,{as:"h2",className:q.title},v),n.createElement(l,{as:"p",className:q.content},g)),b&&n.createElement(i,{variant:"transparent",icon:n.createElement(d,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{Box as n,Flex 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{CheckCircleIcon as c,CloseIcon as m,WarningIcon as f,InfoCircleIcon as g,ErrorCircleIcon 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:g,positive:c,negative:u,warning:f},I=r.forwardRef(((c,f)=>{const{children:g,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(n,e({},N,{as:"article",className:t(x.note({variant:h,withCloseButton:b}),u),testId:y,ref:f}),r.createElement(a,{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(m,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{WarningIcon as c,InfoCircleIcon as m,ErrorCircleIcon as f,CloseIcon 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:c},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-6763.2280+68ec7ca7", | ||
"version": "4.0.1-next-v4-6795.2281+a79c4356", | ||
"description": "Forma 36: Note component", | ||
@@ -10,7 +10,7 @@ "scripts": { | ||
"@babel/runtime": "^7.6.2", | ||
"@contentful/f36-button": "4.0.1-next-v4-6763.2280+68ec7ca7", | ||
"@contentful/f36-core": "4.0.1-next-v4-6763.2280+68ec7ca7", | ||
"@contentful/f36-icons": "4.0.1-next-v4-6763.2280+68ec7ca7", | ||
"@contentful/f36-tokens": "4.0.1-next-v4-6763.2280+68ec7ca7", | ||
"@contentful/f36-typography": "4.0.1-next-v4-6763.2280+68ec7ca7", | ||
"@contentful/f36-button": "4.0.1-next-v4-6795.2281+a79c4356", | ||
"@contentful/f36-core": "4.0.1-next-v4-6795.2281+a79c4356", | ||
"@contentful/f36-icons": "4.0.1-next-v4-6795.2281+a79c4356", | ||
"@contentful/f36-tokens": "4.0.1-next-v4-6795.2281+a79c4356", | ||
"@contentful/f36-typography": "4.0.1-next-v4-6795.2281+a79c4356", | ||
"emotion": "^10.0.17" | ||
@@ -42,3 +42,3 @@ }, | ||
}, | ||
"gitHead": "68ec7ca78ed6341bed0b5d20a383f1589123569f" | ||
"gitHead": "a79c43565da14e28a3ca93825c0dbad7b20fa068" | ||
} |
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
Updated@contentful/f36-button@4.0.1-next-v4-6795.2281+a79c4356
Updated@contentful/f36-core@4.0.1-next-v4-6795.2281+a79c4356
Updated@contentful/f36-icons@4.0.1-next-v4-6795.2281+a79c4356
Updated@contentful/f36-tokens@4.0.1-next-v4-6795.2281+a79c4356
Updated@contentful/f36-typography@4.0.1-next-v4-6795.2281+a79c4356