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