@contentful/f36-note
Advanced tools
Comparing version 4.0.1-next-v4-6423.2245 to 4.0.1-next-v4-6436.2246
@@ -1,2 +0,2 @@ | ||
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:c}=require("@contentful/f36-typography"),{CheckCircleIcon:s,WarningIcon:u,CloseIcon:g,ErrorCircleIcon:d,InfoCircleIcon: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=()=>N,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{}}},I={primary:f,positive:s,negative:d,warning:u},N=n.forwardRef(((s,u)=>{const{children:d,className:f,hasCloseButton:p,variant:b="primary",onClose:h,testId:C="cf-ui-note",title:y,...v}=s,N={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;}"})},k=I[b];if(!k)throw new Error(`Intent ${b} is not supported in Note component.`);return n.createElement(o,e({as:"article",className:r(N.note({variant:b,hasCloseButton:p}),f),testId:C},v,{ref:u}),n.createElement(a,{marginRight:"spacingS"},n.createElement(k,{variant:b,size:y?"medium":"small"})),n.createElement("div",{className:N.info({hasCloseButton:p})},y&&n.createElement(c,{as:"h2",className:N.title},y),n.createElement(l,{as:"p",className:N.content},d)),p&&n.createElement(i,{variant:"transparent",icon:n.createElement(g,null),onClick:()=>{h&&h()},testId:`${C}-close`,label:"Dismiss",className:N.close}))}));var k,x;N.displayName="Note",k=module.exports,x=v,Object.keys(x).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(k,e,{enumerable:!0,get:function(){return x[e]}})})); | ||
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"),{Heading:l,Text:c}=require("@contentful/f36-typography"),{InfoCircleIcon:s,ErrorCircleIcon:u,WarningIcon:g,CheckCircleIcon:d,CloseIcon: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=()=>N,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{}}},I={primary:s,positive:d,negative:u,warning:g},N=n.forwardRef(((s,u)=>{const{children:g,className:d,hasCloseButton:p,variant:b="primary",onClose:h,testId:C="cf-ui-note",title:y,...v}=s,N={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;}"})},k=I[b];if(!k)throw new Error(`Intent ${b} is not supported in Note component.`);return n.createElement(a,e({as:"article",className:r(N.note({variant:b,hasCloseButton:p}),d),testId:C},v,{ref:u}),n.createElement(o,{marginRight:"spacingS"},n.createElement(k,{variant:b,size:y?"medium":"small"})),n.createElement("div",{className:N.info({hasCloseButton:p})},y&&n.createElement(l,{as:"h2",className:N.title},y),n.createElement(c,{as:"p",className:N.content},g)),p&&n.createElement(i,{variant:"transparent",icon:n.createElement(f,null),onClick:()=>{h&&h()},testId:`${C}-close`,label:"Dismiss",className:N.close}))}));var k,x;N.displayName="Note",k=module.exports,x=v,Object.keys(x).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(k,e,{enumerable:!0,get:function(){return x[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{Text as s,Heading as l}from"@contentful/f36-typography";import{ErrorCircleIcon as c,WarningIcon as m,InfoCircleIcon as g,CloseIcon as f,CheckCircleIcon 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:c,warning:m},N=r.forwardRef(((c,m)=>{const{children:g,className:u,hasCloseButton:p,variant:h="primary",onClose:b,testId:C="cf-ui-note",title:N,...I}=c,x={note:({variant:e,hasCloseButton:t})=>o({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:o({color:d.gray800,fontWeight:d.fontWeightMedium,fontSize:d.fontSizeL,marginBottom:d.spacingXs},""),info:({hasCloseButton:e})=>o({marginLeft:d.spacingXs,fill:"currentColor",marginRight:e?d.spacingS:"unset"},""),content:o({color:d.gray700,width:"100%"},""),close:o({name:"eql546",styles:"&:hover{background-color:transparent;}"})},E=v[h];if(!E)throw new Error(`Intent ${h} is not supported in Note component.`);return r.createElement(n,e({as:"article",className:t(x.note({variant:h,hasCloseButton:p}),u),testId:C},I,{ref:m}),r.createElement(a,{marginRight:"spacingS"},r.createElement(E,{variant:h,size:N?"medium":"small"})),r.createElement("div",{className:x.info({hasCloseButton:p})},N&&r.createElement(l,{as:"h2",className:x.title},N),r.createElement(s,{as:"p",className:x.content},g)),p&&r.createElement(i,{variant:"transparent",icon:r.createElement(f,null),onClick:()=>{b&&b()},testId:`${C}-close`,label:"Dismiss",className:x.close}))}));N.displayName="Note";export{N 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{Text as s,Heading as l}from"@contentful/f36-typography";import{WarningIcon as c,CheckCircleIcon as m,ErrorCircleIcon as g,InfoCircleIcon as f,CloseIcon 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:f,positive:m,negative:g,warning:c},N=r.forwardRef(((c,m)=>{const{children:g,className:f,hasCloseButton:p,variant:h="primary",onClose:b,testId:C="cf-ui-note",title:N,...I}=c,x={note:({variant:e,hasCloseButton:t})=>o({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:o({color:d.gray800,fontWeight:d.fontWeightMedium,fontSize:d.fontSizeL,marginBottom:d.spacingXs},""),info:({hasCloseButton:e})=>o({marginLeft:d.spacingXs,fill:"currentColor",marginRight:e?d.spacingS:"unset"},""),content:o({color:d.gray700,width:"100%"},""),close:o({name:"eql546",styles:"&:hover{background-color:transparent;}"})},E=v[h];if(!E)throw new Error(`Intent ${h} is not supported in Note component.`);return r.createElement(a,e({as:"article",className:t(x.note({variant:h,hasCloseButton:p}),f),testId:C},I,{ref:m}),r.createElement(n,{marginRight:"spacingS"},r.createElement(E,{variant:h,size:N?"medium":"small"})),r.createElement("div",{className:x.info({hasCloseButton:p})},N&&r.createElement(l,{as:"h2",className:x.title},N),r.createElement(s,{as:"p",className:x.content},g)),p&&r.createElement(i,{variant:"transparent",icon:r.createElement(u,null),onClick:()=>{b&&b()},testId:`${C}-close`,label:"Dismiss",className:x.close}))}));N.displayName="Note";export{N as Note}; | ||
//# sourceMappingURL=module.js.map |
{ | ||
"name": "@contentful/f36-note", | ||
"version": "4.0.1-next-v4-6423.2245+4464dc89", | ||
"version": "4.0.1-next-v4-6436.2246+ab39734f", | ||
"description": "Forma 36: Note component", | ||
@@ -10,7 +10,7 @@ "scripts": { | ||
"@babel/runtime": "^7.6.2", | ||
"@contentful/f36-button": "4.0.1-next-v4-6423.2245+4464dc89", | ||
"@contentful/f36-core": "4.0.1-next-v4-6423.2245+4464dc89", | ||
"@contentful/f36-icons": "4.0.1-next-v4-6423.2245+4464dc89", | ||
"@contentful/f36-tokens": "4.0.1-next-v4-6423.2245+4464dc89", | ||
"@contentful/f36-typography": "4.0.1-next-v4-6423.2245+4464dc89", | ||
"@contentful/f36-button": "4.0.1-next-v4-6436.2246+ab39734f", | ||
"@contentful/f36-core": "4.0.1-next-v4-6436.2246+ab39734f", | ||
"@contentful/f36-icons": "4.0.1-next-v4-6436.2246+ab39734f", | ||
"@contentful/f36-tokens": "4.0.1-next-v4-6436.2246+ab39734f", | ||
"@contentful/f36-typography": "4.0.1-next-v4-6436.2246+ab39734f", | ||
"emotion": "^10.0.17" | ||
@@ -42,3 +42,3 @@ }, | ||
}, | ||
"gitHead": "4464dc892504c11cc533a8e9d6efc34c8fa2cf2a" | ||
"gitHead": "ab39734f4c9f68e016c9f54ad78968569c3c12f2" | ||
} |
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-6436.2246+ab39734f
Updated@contentful/f36-core@4.0.1-next-v4-6436.2246+ab39734f
Updated@contentful/f36-icons@4.0.1-next-v4-6436.2246+ab39734f
Updated@contentful/f36-tokens@4.0.1-next-v4-6436.2246+ab39734f
Updated@contentful/f36-typography@4.0.1-next-v4-6436.2246+ab39734f