@contentful/f36-note
Advanced tools
Comparing version 4.0.1-next-v4-6289.2215 to 4.0.1-next-v4-6313.2230
@@ -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: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]}})})); | ||
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"),{ErrorCircleIcon:s,InfoCircleIcon:u,CheckCircleIcon:g,CloseIcon: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:u,positive:g,negative:s,warning:f},N=n.forwardRef(((s,u)=>{const{children:g,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(a,e({as:"article",className:r(N.note({variant:b,hasCloseButton:p}),f),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(d,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 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}; | ||
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,CheckCircleIcon as m,InfoCircleIcon as g,WarningIcon 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:g,positive:m,negative:c,warning:f},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(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-6289.2215+a6d6282a", | ||
"version": "4.0.1-next-v4-6313.2230+cc8adb10", | ||
"description": "Forma 36: Note component", | ||
@@ -10,7 +10,7 @@ "scripts": { | ||
"@babel/runtime": "^7.6.2", | ||
"@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", | ||
"@contentful/f36-button": "4.0.1-next-v4-6313.2230+cc8adb10", | ||
"@contentful/f36-core": "4.0.1-next-v4-6313.2230+cc8adb10", | ||
"@contentful/f36-icons": "4.0.1-next-v4-6313.2230+cc8adb10", | ||
"@contentful/f36-tokens": "4.0.1-next-v4-6313.2230+cc8adb10", | ||
"@contentful/f36-typography": "4.0.1-next-v4-6313.2230+cc8adb10", | ||
"emotion": "^10.0.17" | ||
@@ -42,3 +42,3 @@ }, | ||
}, | ||
"gitHead": "a6d6282aa585bcf2675a6d8708791105b4584802" | ||
"gitHead": "cc8adb105e9227dbb2949a7847e2fcb4f8aab906" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
75827
Updated@contentful/f36-button@4.0.1-next-v4-6313.2230+cc8adb10
Updated@contentful/f36-core@4.0.1-next-v4-6313.2230+cc8adb10
Updated@contentful/f36-icons@4.0.1-next-v4-6313.2230+cc8adb10
Updated@contentful/f36-tokens@4.0.1-next-v4-6313.2230+cc8adb10
Updated@contentful/f36-typography@4.0.1-next-v4-6313.2230+cc8adb10