New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@leafygreen-ui/banner

Package Overview
Dependencies
Maintainers
4
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafygreen-ui/banner - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

dist/ts3.4/Banner.d.ts

11

CHANGELOG.md
# @leafygreen-ui/banner
## 3.0.1
### Patch Changes
- dac3f38b: Fixes a publishing error that prevented UMD modules from being distributed
- Updated dependencies [dac3f38b]
- @leafygreen-ui/emotion@3.0.1
- @leafygreen-ui/icon@7.0.1
- @leafygreen-ui/lib@6.0.1
- @leafygreen-ui/palette@3.0.1
## 3.0.0

@@ -4,0 +15,0 @@

2

dist/esm/index.js

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

import n from"react";import r from"@leafygreen-ui/icon/dist/ImportantWithCircle";import e from"@leafygreen-ui/icon/dist/InfoWithCircle";import o from"@leafygreen-ui/icon/dist/Warning";import t from"@leafygreen-ui/icon/dist/CheckmarkWithCircle";import i from"@leafygreen-ui/icon/dist/X";import{cx as l,css as a}from"@leafygreen-ui/emotion";import{uiColors as c}from"@leafygreen-ui/palette";function u(n,r,e){return r in n?Object.defineProperty(n,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[r]=e,n}function f(){return(f=Object.assign||function(n){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}return n}).apply(this,arguments)}function g(n,r){if(null==n)return{};var e,o,t=function(n,r){if(null==n)return{};var e,o,t={},i=Object.keys(n);for(o=0;o<i.length;o++)e=i[o],r.indexOf(e)>=0||(t[e]=n[e]);return t}(n,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(o=0;o<i.length;o++)e=i[o],r.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(n,e)&&(t[e]=n[e])}return t}function d(n,r){return r||(r=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(r)}}))}var b,s;function p(){var n=d(["\n margin-top: 1px;\n "]);return p=function(){return n},n}function m(){var n=d(["\n align-self: center;\n flex-grow: 1;\n margin-left: ",";\n margin-right: ",";\n "]);return m=function(){return n},n}function h(){var n=d(["\n color: ",";\n border-color: ",";\n border-left-color: ",";\n background-color: ",";\n\n &:before {\n background-color: ",";\n }\n\n &:after {\n border-color: ",";\n background-color: ",";\n }\n "]);return h=function(){return n},n}function x(){var n=d(["\n color: ",";\n border-color: ",";\n border-left-color: ",";\n background-color: ",";\n\n &:before {\n background-color: ",";\n }\n\n &:after {\n border-color: ",";\n background-color: ",";\n }\n "]);return x=function(){return n},n}function v(){var n=d(["\n color: ",";\n border-color: ",";\n border-left-color: ",";\n background-color: ",";\n\n &:before {\n background-color: ",";\n }\n\n &:after {\n border-color: ",";\n background-color: ",";\n }\n "]);return v=function(){return n},n}function y(){var n=d(["\n color: ",";\n border-color: ",";\n border-left-color: ",";\n background-color: ",";\n\n &:before {\n background-color: ",";\n }\n\n &:after {\n border-color: ",";\n background-color: ",";\n }\n "]);return y=function(){return n},n}function k(){var n=d(["\n // this margin is set to control text alignment with the base of the renderedImage\n margin-top: 3px;\n margin-bottom: 3px;\n\n width: 32px;\n height: 32px;\n flex-shrink: 0;\n"]);return k=function(){return n},n}function w(){var n=d(["\n cursor: pointer;\n"]);return w=function(){return n},n}function O(){var n=d(["\n flex-shrink: 0;\n"]);return O=function(){return n},n}function j(){var n=d(["\n position: relative;\n display: flex;\n min-height: 40px;\n padding: 9px 12px 9px 20px;\n border-width: 1px 1px 1px 0px;\n border-style: solid;\n border-radius: 6px;\n font-size: 14px;\n line-height: 20px;\n\n &:before {\n content: '';\n position: absolute;\n width: 6px;\n top: -1px;\n bottom: -1px;\n left: 0px;\n border-radius: 6px 0px 0px 6px;\n }\n\n &:after {\n content: '';\n position: absolute;\n left: 4px;\n top: -1px;\n bottom: -1px;\n width: 2px;\n border-top: 1px solid;\n border-bottom: 1px solid;\n border-radius: 0.5px 0px 0px 0.5px;\n }\n"]);return j=function(){return n},n}var I={Info:"info",Warning:"warning",Danger:"danger",Success:"success"},C=a(j()),N=a(O()),W=a(w()),E=a(k()),R=(u(b={},I.Info,a(y(),c.blue.dark2,c.blue.light2,c.blue.base,c.blue.light3,c.blue.base,c.blue.light2,c.blue.light3)),u(b,I.Warning,a(v(),c.yellow.dark2,c.yellow.light2,c.yellow.base,c.yellow.light3,c.yellow.base,c.yellow.light2,c.yellow.light3)),u(b,I.Danger,a(x(),c.red.dark2,c.red.light2,c.red.base,c.red.light3,c.red.base,c.red.light2,c.red.light3)),u(b,I.Success,a(h(),c.green.dark2,c.green.light2,c.green.base,c.green.light3,c.green.base,c.green.light2,c.green.light3)),b),P=(u(s={},I.Info,{color:c.blue.base,icon:e}),u(s,I.Warning,{color:c.yellow.dark2,icon:r}),u(s,I.Danger,{color:c.red.base,icon:o}),u(s,I.Success,{color:c.green.base,icon:t}),s),S=function(n,r){var e={marginLeft:void 0,marginRight:void 0};return n?(e.marginLeft="15px",e.marginRight="4px",r&&(e.marginRight="".concat(28,"px"))):(e.marginLeft="".concat(15,"px"),e.marginRight="10px",r&&(e.marginRight="".concat(32,"px"))),a(m(),e.marginLeft,e.marginRight)};export default function(r){var e=r.variant,o=void 0===e?I.Info:e,t=r.dismissible,c=void 0!==t&&t,u=r.onClose,d=void 0===u?function(){}:u,b=r.image,s=r.children,m=r.className,h=g(r,["variant","dismissible","onClose","image","children","className"]),x=P[o],v=x.icon,y=x.color,k=b?n.cloneElement(b,{className:E}):n.createElement(v,{fill:y,className:l(N,a(p()))});return n.createElement("div",f({role:"alert",className:l(C,R[o],m)},h),k,n.createElement("div",{className:S(null!=b,c)},s),c&&n.createElement(i,{fill:y,onClick:d,className:l(N,W)}))}export{I as Variant};
import n from"react";import r from"@leafygreen-ui/icon/dist/ImportantWithCircle";import e from"@leafygreen-ui/icon/dist/InfoWithCircle";import o from"@leafygreen-ui/icon/dist/Warning";import t from"@leafygreen-ui/icon/dist/CheckmarkWithCircle";import i from"@leafygreen-ui/icon/dist/X";import{cx as l,css as a}from"@leafygreen-ui/emotion";import{uiColors as c}from"@leafygreen-ui/palette";function u(n,r,e){return r in n?Object.defineProperty(n,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[r]=e,n}function f(){return(f=Object.assign||function(n){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}return n}).apply(this,arguments)}function g(n,r){if(null==n)return{};var e,o,t=function(n,r){if(null==n)return{};var e,o,t={},i=Object.keys(n);for(o=0;o<i.length;o++)e=i[o],r.indexOf(e)>=0||(t[e]=n[e]);return t}(n,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(o=0;o<i.length;o++)e=i[o],r.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(n,e)&&(t[e]=n[e])}return t}function d(n,r){return r||(r=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(r)}}))}var b,s;function p(){var n=d(["\n margin-top: 1px;\n "]);return p=function(){return n},n}function m(){var n=d(["\n align-self: center;\n flex-grow: 1;\n margin-left: ",";\n margin-right: ",";\n "]);return m=function(){return n},n}function h(){var n=d(["\n color: ",";\n border-color: ",";\n border-left-color: ",";\n background-color: ",";\n\n &:before {\n background-color: ",";\n }\n\n &:after {\n border-color: ",";\n background-color: ",";\n }\n "]);return h=function(){return n},n}function x(){var n=d(["\n color: ",";\n border-color: ",";\n border-left-color: ",";\n background-color: ",";\n\n &:before {\n background-color: ",";\n }\n\n &:after {\n border-color: ",";\n background-color: ",";\n }\n "]);return x=function(){return n},n}function v(){var n=d(["\n color: ",";\n border-color: ",";\n border-left-color: ",";\n background-color: ",";\n\n &:before {\n background-color: ",";\n }\n\n &:after {\n border-color: ",";\n background-color: ",";\n }\n "]);return v=function(){return n},n}function y(){var n=d(["\n color: ",";\n border-color: ",";\n border-left-color: ",";\n background-color: ",";\n\n &:before {\n background-color: ",";\n }\n\n &:after {\n border-color: ",";\n background-color: ",";\n }\n "]);return y=function(){return n},n}function k(){var n=d(["\n // this margin is set to control text alignment with the base of the renderedImage\n margin-top: 3px;\n margin-bottom: 3px;\n\n width: 32px;\n height: 32px;\n flex-shrink: 0;\n"]);return k=function(){return n},n}function w(){var n=d(["\n cursor: pointer;\n"]);return w=function(){return n},n}function O(){var n=d(["\n flex-shrink: 0;\n"]);return O=function(){return n},n}function j(){var n=d(["\n position: relative;\n display: flex;\n min-height: 40px;\n padding: 9px 12px 9px 20px;\n border-width: 1px 1px 1px 0px;\n border-style: solid;\n border-radius: 6px;\n font-size: 14px;\n line-height: 20px;\n\n &:before {\n content: '';\n position: absolute;\n width: 6px;\n top: -1px;\n bottom: -1px;\n left: 0px;\n border-radius: 6px 0px 0px 6px;\n }\n\n &:after {\n content: '';\n position: absolute;\n left: 4px;\n top: -1px;\n bottom: -1px;\n width: 2px;\n border-top: 1px solid;\n border-bottom: 1px solid;\n border-radius: 0.5px 0px 0px 0.5px;\n }\n"]);return j=function(){return n},n}var I={Info:"info",Warning:"warning",Danger:"danger",Success:"success"},C=a(j()),N=a(O()),W=a(w()),E=a(k()),R=(u(b={},I.Info,a(y(),c.blue.dark2,c.blue.light2,c.blue.base,c.blue.light3,c.blue.base,c.blue.light2,c.blue.light3)),u(b,I.Warning,a(v(),c.yellow.dark2,c.yellow.light2,c.yellow.base,c.yellow.light3,c.yellow.base,c.yellow.light2,c.yellow.light3)),u(b,I.Danger,a(x(),c.red.dark2,c.red.light2,c.red.base,c.red.light3,c.red.base,c.red.light2,c.red.light3)),u(b,I.Success,a(h(),c.green.dark2,c.green.light2,c.green.base,c.green.light3,c.green.base,c.green.light2,c.green.light3)),b),P=(u(s={},I.Info,{color:c.blue.base,icon:e}),u(s,I.Warning,{color:c.yellow.dark2,icon:r}),u(s,I.Danger,{color:c.red.base,icon:o}),u(s,I.Success,{color:c.green.base,icon:t}),s),S=function(n,r){var e={marginLeft:void 0,marginRight:void 0};return n?(e.marginLeft="15px",e.marginRight="4px",r&&(e.marginRight="".concat(28,"px"))):(e.marginLeft="".concat(15,"px"),e.marginRight="10px",r&&(e.marginRight="".concat(32,"px"))),a(m(),e.marginLeft,e.marginRight)};function L(r){var e=r.variant,o=void 0===e?I.Info:e,t=r.dismissible,c=void 0!==t&&t,u=r.onClose,d=void 0===u?function(){}:u,b=r.image,s=r.children,m=r.className,h=g(r,["variant","dismissible","onClose","image","children","className"]),x=P[o],v=x.icon,y=x.color,k=b?n.cloneElement(b,{className:E}):n.createElement(v,{fill:y,className:l(N,a(p()))});return n.createElement("div",f({role:"alert",className:l(C,R[o],m)},h),k,n.createElement("div",{className:S(null!=b,c)},s),c&&n.createElement(i,{fill:y,onClick:d,className:l(N,W)}))}export default L;export{I as Variant};
//# sourceMappingURL=index.js.map

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

export { default, Variant } from './Banner';
//# sourceMappingURL=index.js.map
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react"),require("@leafygreen-ui/icon/dist/ImportantWithCircle"),require("@leafygreen-ui/icon/dist/InfoWithCircle"),require("@leafygreen-ui/icon/dist/Warning"),require("@leafygreen-ui/icon/dist/CheckmarkWithCircle"),require("@leafygreen-ui/icon/dist/X"),require("@leafygreen-ui/emotion"),require("@leafygreen-ui/palette")):"function"==typeof define&&define.amd?define(["exports","react","@leafygreen-ui/icon/dist/ImportantWithCircle","@leafygreen-ui/icon/dist/InfoWithCircle","@leafygreen-ui/icon/dist/Warning","@leafygreen-ui/icon/dist/CheckmarkWithCircle","@leafygreen-ui/icon/dist/X","@leafygreen-ui/emotion","@leafygreen-ui/palette"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/banner"]={},e.React,e.ImportantWithCircle,e.InfoWithCircle,e.Warning,e.CheckmarkWithCircle,e.X,e["@leafygreen-ui/emotion"],e["@leafygreen-ui/palette"])}(this,(function(e,n,r,o,i,t,l,a,u){"use strict";function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s,f,d=c(n),g=c(r),b=c(o),p=c(i),h=c(t),m=c(l);function x(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function C(){return(C=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)}function y(e,n){if(null==e)return{};var r,o,i=function(e,n){if(null==e)return{};var r,o,i={},t=Object.keys(e);for(o=0;o<t.length;o++)r=t[o],n.indexOf(r)>=0||(i[r]=e[r]);return i}(e,n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);for(o=0;o<t.length;o++)r=t[o],n.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function v(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function k(){var e=v(["\n margin-top: 1px;\n "]);return k=function(){return e},e}function w(){var e=v(["\n align-self: center;\n flex-grow: 1;\n margin-left: ",";\n margin-right: ",";\n "]);return w=function(){return e},e}function O(){var e=v(["\n color: ",";\n border-color: ",";\n border-left-color: ",";\n background-color: ",";\n\n &:before {\n background-color: ",";\n }\n\n &:after {\n border-color: ",";\n background-color: ",";\n }\n "]);return O=function(){return e},e}function W(){var e=v(["\n color: ",";\n border-color: ",";\n border-left-color: ",";\n background-color: ",";\n\n &:before {\n background-color: ",";\n }\n\n &:after {\n border-color: ",";\n background-color: ",";\n }\n "]);return W=function(){return e},e}function j(){var e=v(["\n color: ",";\n border-color: ",";\n border-left-color: ",";\n background-color: ",";\n\n &:before {\n background-color: ",";\n }\n\n &:after {\n border-color: ",";\n background-color: ",";\n }\n "]);return j=function(){return e},e}function I(){var e=v(["\n color: ",";\n border-color: ",";\n border-left-color: ",";\n background-color: ",";\n\n &:before {\n background-color: ",";\n }\n\n &:after {\n border-color: ",";\n background-color: ",";\n }\n "]);return I=function(){return e},e}function q(){var e=v(["\n // this margin is set to control text alignment with the base of the renderedImage\n margin-top: 3px;\n margin-bottom: 3px;\n\n width: 32px;\n height: 32px;\n flex-shrink: 0;\n"]);return q=function(){return e},e}function N(){var e=v(["\n cursor: pointer;\n"]);return N=function(){return e},e}function R(){var e=v(["\n flex-shrink: 0;\n"]);return R=function(){return e},e}function E(){var e=v(["\n position: relative;\n display: flex;\n min-height: 40px;\n padding: 9px 12px 9px 20px;\n border-width: 1px 1px 1px 0px;\n border-style: solid;\n border-radius: 6px;\n font-size: 14px;\n line-height: 20px;\n\n &:before {\n content: '';\n position: absolute;\n width: 6px;\n top: -1px;\n bottom: -1px;\n left: 0px;\n border-radius: 6px 0px 0px 6px;\n }\n\n &:after {\n content: '';\n position: absolute;\n left: 4px;\n top: -1px;\n bottom: -1px;\n width: 2px;\n border-top: 1px solid;\n border-bottom: 1px solid;\n border-radius: 0.5px 0px 0px 0.5px;\n }\n"]);return E=function(){return e},e}var P={Info:"info",Warning:"warning",Danger:"danger",Success:"success"},S=a.css(E()),L=a.css(R()),z=a.css(N()),D=a.css(q()),X=(x(s={},P.Info,a.css(I(),u.uiColors.blue.dark2,u.uiColors.blue.light2,u.uiColors.blue.base,u.uiColors.blue.light3,u.uiColors.blue.base,u.uiColors.blue.light2,u.uiColors.blue.light3)),x(s,P.Warning,a.css(j(),u.uiColors.yellow.dark2,u.uiColors.yellow.light2,u.uiColors.yellow.base,u.uiColors.yellow.light3,u.uiColors.yellow.base,u.uiColors.yellow.light2,u.uiColors.yellow.light3)),x(s,P.Danger,a.css(W(),u.uiColors.red.dark2,u.uiColors.red.light2,u.uiColors.red.base,u.uiColors.red.light3,u.uiColors.red.base,u.uiColors.red.light2,u.uiColors.red.light3)),x(s,P.Success,a.css(O(),u.uiColors.green.dark2,u.uiColors.green.light2,u.uiColors.green.base,u.uiColors.green.light3,u.uiColors.green.base,u.uiColors.green.light2,u.uiColors.green.light3)),s),T=(x(f={},P.Info,{color:u.uiColors.blue.base,icon:b.default}),x(f,P.Warning,{color:u.uiColors.yellow.dark2,icon:g.default}),x(f,P.Danger,{color:u.uiColors.red.base,icon:p.default}),x(f,P.Success,{color:u.uiColors.green.base,icon:h.default}),f),_=function(e,n){var r={marginLeft:void 0,marginRight:void 0};return e?(r.marginLeft="15px",r.marginRight="4px",n&&(r.marginRight="".concat(28,"px"))):(r.marginLeft="".concat(15,"px"),r.marginRight="10px",n&&(r.marginRight="".concat(32,"px"))),a.css(w(),r.marginLeft,r.marginRight)};e.Variant=P,e.default=function(e){var n=e.variant,r=void 0===n?P.Info:n,o=e.dismissible,i=void 0!==o&&o,t=e.onClose,l=void 0===t?function(){}:t,u=e.image,c=e.children,s=e.className,f=y(e,["variant","dismissible","onClose","image","children","className"]),g=T[r],b=g.icon,p=g.color,h=u?d.default.cloneElement(u,{className:D}):d.default.createElement(b,{fill:p,className:a.cx(L,a.css(k()))});return d.default.createElement("div",C({role:"alert",className:a.cx(S,X[r],s)},f),h,d.default.createElement("div",{className:_(null!=u,i)},c),i&&d.default.createElement(m.default,{fill:p,onClick:l,className:a.cx(L,z)}))},Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=index.js.map
{
"name": "@leafygreen-ui/banner",
"version": "3.0.0",
"version": "3.0.1",
"description": "leafyGreen UI Kit Banner",

@@ -23,7 +23,7 @@ "main": "./dist/index.js",

"dependencies": {
"@leafygreen-ui/lib": "^6.0.0",
"@leafygreen-ui/emotion": "^3.0.0",
"@leafygreen-ui/palette": "^3.0.0",
"@leafygreen-ui/icon": "^7.0.0"
"@leafygreen-ui/lib": "^6.0.1",
"@leafygreen-ui/emotion": "^3.0.1",
"@leafygreen-ui/palette": "^3.0.1",
"@leafygreen-ui/icon": "^7.0.1"
}
}

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

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