Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@leafygreen-ui/marketing-modal

Package Overview
Dependencies
Maintainers
4
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafygreen-ui/marketing-modal - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

18

CHANGELOG.md
# @leafygreen-ui/marketing-modal
## 2.0.3
### Patch Changes
- e14fbae7: Fixes bug where scrollbars were displayed when content was not scrollable
- Updated dependencies [10bdc295]
- Updated dependencies [374430ea]
- Updated dependencies [c18f16e6]
- Updated dependencies [fe861d52]
- Updated dependencies [c9a0d89f]
- Updated dependencies [9ee1d5fc]
- Updated dependencies [aab4e65b]
- @leafygreen-ui/button@9.0.0
- @leafygreen-ui/typography@7.1.0
- @leafygreen-ui/modal@5.1.0
- @leafygreen-ui/palette@3.1.0
- @leafygreen-ui/lib@6.1.1
## 2.0.2

@@ -4,0 +22,0 @@

2

dist/esm/index.js

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

import n from"react";import e from"prop-types";import{css as t,cx as r}from"@leafygreen-ui/emotion";import i from"@leafygreen-ui/button";import{Link as o}from"@leafygreen-ui/typography";import l from"@leafygreen-ui/modal";import{uiColors as a}from"@leafygreen-ui/palette";function c(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function u(){return(u=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n}).apply(this,arguments)}function p(n,e){if(null==n)return{};var t,r,i=function(n,e){if(null==n)return{};var t,r,i={},o=Object.keys(n);for(r=0;r<o.length;r++)t=o[r],e.indexOf(t)>=0||(i[t]=n[t]);return i}(n,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(r=0;r<o.length;r++)t=o[r],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(i[t]=n[t])}return i}function f(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}function s(){var n=f(["\n line-height: 24px;\n padding-bottom: 50px;\n\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n\n & > * {\n padding: 4px;\n }\n"]);return s=function(){return n},n}function d(){var n=f(["\n color: ",";\n font-family: Akzidenz, ‘Helvetica Neue’, Helvetica, Arial, sans-serif;\n font-size: 16px;\n letter-spacing: 0;\n line-height: 24px;\n text-align: center;\n\n padding: 0 92px;\n padding-bottom: 24px;\n"]);return d=function(){return n},n}function m(){var n=f(["\n width: 100%;\n"]);return m=function(){return n},n}function g(){var n=f(["\n padding-bottom: 24px;\n"]);return g=function(){return n},n}function y(){var n=f(["\n padding-top: 20px;\n padding-bottom: 8px;\n"]);return y=function(){return n},n}function b(){var n=f(["\n display: block;\n"]);return b=function(){return n},n}function v(){var n=f(["\n display: flex;\n align-items: center;\n justify-content: center;\n"]);return v=function(){return n},n}function x(){var n=f(["\n width: 600px;\n padding: initial;\n overflow: scroll;\n"]);return x=function(){return n},n}function h(){var n=f(["\n color: ",";\n font-size: 24px;\n font-weight: bold;\n line-height: 25px;\n\n margin-bottom: 10px;\n"]);return h=function(){return n},n}var k={Center:"center",Fill:"fill"},O=t(h(),a.gray.dark2),C=t(x()),j=t(v()),E=t(b()),N=t(y()),w=t(g()),T=t(m()),z=t(d(),a.gray.dark1),P=t(s()),S=function(e){var t,a,f=e.children,s=e.title,d=e.graphic,m=e.graphicStyle,g=void 0===m?"center":m,y=e.onButtonClick,b=e.onLinkClick,v=e.onClose,x=e.buttonText,h=e.linkText,S=p(e,["children","title","graphic","graphicStyle","onButtonClick","onLinkClick","onClose","buttonText","linkText"]);return n.createElement(l,u({},S,{contentClassName:C,setOpen:v}),n.createElement("div",{className:r(j,(t={},c(t,N,g===k.Center),c(t,w,g===k.Fill),t))},n.cloneElement(d,{className:"".concat(null!==(a=d.props.className)&&void 0!==a?a:""," ").concat(r(E,c({},T,g===k.Fill)))})),n.createElement("div",{className:z},n.createElement("div",{className:O},s),f),n.createElement("div",{className:P},n.createElement(i,{variant:"primary",onClick:y},x),n.createElement(o,{tabIndex:0,onClick:b,hideExternalIcon:!0},h)))};S.displayName="MarketingModal",S.propTypes={title:e.string.isRequired,graphic:e.element.isRequired,graphicStyle:e.oneOf(Object.values(k)),open:e.bool,onButtonClick:e.func,onLinkClick:e.func,onClose:e.func,children:e.node,className:e.string,buttonText:e.string.isRequired,linkText:e.string.isRequired};export default S;export{k as GraphicStyle};
import n from"react";import e from"prop-types";import{css as t,cx as r}from"@leafygreen-ui/emotion";import i from"@leafygreen-ui/button";import{Link as o}from"@leafygreen-ui/typography";import l from"@leafygreen-ui/modal";import{uiColors as a}from"@leafygreen-ui/palette";function c(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function u(){return(u=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n}).apply(this,arguments)}function p(n,e){if(null==n)return{};var t,r,i=function(n,e){if(null==n)return{};var t,r,i={},o=Object.keys(n);for(r=0;r<o.length;r++)t=o[r],e.indexOf(t)>=0||(i[t]=n[t]);return i}(n,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(r=0;r<o.length;r++)t=o[r],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(i[t]=n[t])}return i}function f(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}function s(){var n=f(["\n line-height: 24px;\n padding-bottom: 50px;\n\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n\n & > * {\n padding: 4px;\n }\n"]);return s=function(){return n},n}function d(){var n=f(["\n color: ",";\n font-family: Akzidenz, ‘Helvetica Neue’, Helvetica, Arial, sans-serif;\n font-size: 16px;\n letter-spacing: 0;\n line-height: 24px;\n text-align: center;\n\n padding: 0 92px;\n padding-bottom: 24px;\n"]);return d=function(){return n},n}function m(){var n=f(["\n width: 100%;\n"]);return m=function(){return n},n}function g(){var n=f(["\n padding-bottom: 24px;\n"]);return g=function(){return n},n}function y(){var n=f(["\n padding-top: 20px;\n padding-bottom: 8px;\n"]);return y=function(){return n},n}function b(){var n=f(["\n display: block;\n"]);return b=function(){return n},n}function v(){var n=f(["\n display: flex;\n align-items: center;\n justify-content: center;\n"]);return v=function(){return n},n}function x(){var n=f(["\n width: 600px;\n padding: initial;\n overflow: auto;\n"]);return x=function(){return n},n}function h(){var n=f(["\n color: ",";\n font-size: 24px;\n font-weight: bold;\n line-height: 25px;\n\n margin-bottom: 10px;\n"]);return h=function(){return n},n}var k={Center:"center",Fill:"fill"},O=t(h(),a.gray.dark2),C=t(x()),j=t(v()),E=t(b()),N=t(y()),w=t(g()),T=t(m()),z=t(d(),a.gray.dark1),P=t(s()),S=function(e){var t,a,f=e.children,s=e.title,d=e.graphic,m=e.graphicStyle,g=void 0===m?"center":m,y=e.onButtonClick,b=e.onLinkClick,v=e.onClose,x=e.buttonText,h=e.linkText,S=p(e,["children","title","graphic","graphicStyle","onButtonClick","onLinkClick","onClose","buttonText","linkText"]);return n.createElement(l,u({},S,{contentClassName:C,setOpen:v}),n.createElement("div",{className:r(j,(t={},c(t,N,g===k.Center),c(t,w,g===k.Fill),t))},n.cloneElement(d,{className:"".concat(null!==(a=d.props.className)&&void 0!==a?a:""," ").concat(r(E,c({},T,g===k.Fill)))})),n.createElement("div",{className:z},n.createElement("div",{className:O},s),f),n.createElement("div",{className:P},n.createElement(i,{variant:"primary",onClick:y},x),n.createElement(o,{tabIndex:0,onClick:b,hideExternalIcon:!0},h)))};S.displayName="MarketingModal",S.propTypes={title:e.string.isRequired,graphic:e.element.isRequired,graphicStyle:e.oneOf(Object.values(k)),open:e.bool,onButtonClick:e.func,onLinkClick:e.func,onClose:e.func,children:e.node,className:e.string,buttonText:e.string.isRequired,linkText:e.string.isRequired};export default S;export{k as GraphicStyle};
//# sourceMappingURL=index.js.map

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

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react"),require("prop-types"),require("@leafygreen-ui/emotion"),require("@leafygreen-ui/button"),require("@leafygreen-ui/typography"),require("@leafygreen-ui/modal"),require("@leafygreen-ui/palette")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@leafygreen-ui/emotion","@leafygreen-ui/button","@leafygreen-ui/typography","@leafygreen-ui/modal","@leafygreen-ui/palette"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/marketing-modal"]={},e.React,e.PropTypes,e["@leafygreen-ui/emotion"],e["@leafygreen-ui/button"],e["@leafygreen-ui/typography"],e["@leafygreen-ui/modal"],e["@leafygreen-ui/palette"])}(this,(function(e,n,t,r,i,l,a,o){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=u(n),f=u(t),s=u(i),d=u(a);function p(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function g(){return(g=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function y(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function m(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function b(){var e=m(["\n line-height: 24px;\n padding-bottom: 50px;\n\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n\n & > * {\n padding: 4px;\n }\n"]);return b=function(){return e},e}function x(){var e=m(["\n color: ",";\n font-family: Akzidenz, ‘Helvetica Neue’, Helvetica, Arial, sans-serif;\n font-size: 16px;\n letter-spacing: 0;\n line-height: 24px;\n text-align: center;\n\n padding: 0 92px;\n padding-bottom: 24px;\n"]);return x=function(){return e},e}function v(){var e=m(["\n width: 100%;\n"]);return v=function(){return e},e}function h(){var e=m(["\n padding-bottom: 24px;\n"]);return h=function(){return e},e}function k(){var e=m(["\n padding-top: 20px;\n padding-bottom: 8px;\n"]);return k=function(){return e},e}function O(){var e=m(["\n display: block;\n"]);return O=function(){return e},e}function j(){var e=m(["\n display: flex;\n align-items: center;\n justify-content: center;\n"]);return j=function(){return e},e}function C(){var e=m(["\n width: 600px;\n padding: initial;\n overflow: scroll;\n"]);return C=function(){return e},e}function q(){var e=m(["\n color: ",";\n font-size: 24px;\n font-weight: bold;\n line-height: 25px;\n\n margin-bottom: 10px;\n"]);return q=function(){return e},e}var E={Center:"center",Fill:"fill"},N=r.css(q(),o.uiColors.gray.dark2),T=r.css(C()),w=r.css(j()),P=r.css(O()),z=r.css(k()),S=r.css(h()),R=r.css(v()),L=r.css(x(),o.uiColors.gray.dark1),B=r.css(b()),F=function(e){var n,t,i=e.children,a=e.title,o=e.graphic,u=e.graphicStyle,f=void 0===u?"center":u,m=e.onButtonClick,b=e.onLinkClick,x=e.onClose,v=e.buttonText,h=e.linkText,k=y(e,["children","title","graphic","graphicStyle","onButtonClick","onLinkClick","onClose","buttonText","linkText"]);return c.default.createElement(d.default,g({},k,{contentClassName:T,setOpen:x}),c.default.createElement("div",{className:r.cx(w,(n={},p(n,z,f===E.Center),p(n,S,f===E.Fill),n))},c.default.cloneElement(o,{className:"".concat(null!==(t=o.props.className)&&void 0!==t?t:""," ").concat(r.cx(P,p({},R,f===E.Fill)))})),c.default.createElement("div",{className:L},c.default.createElement("div",{className:N},a),i),c.default.createElement("div",{className:B},c.default.createElement(s.default,{variant:"primary",onClick:m},v),c.default.createElement(l.Link,{tabIndex:0,onClick:b,hideExternalIcon:!0},h)))};F.displayName="MarketingModal",F.propTypes={title:f.default.string.isRequired,graphic:f.default.element.isRequired,graphicStyle:f.default.oneOf(Object.values(E)),open:f.default.bool,onButtonClick:f.default.func,onLinkClick:f.default.func,onClose:f.default.func,children:f.default.node,className:f.default.string,buttonText:f.default.string.isRequired,linkText:f.default.string.isRequired},e.GraphicStyle=E,e.default=F,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react"),require("prop-types"),require("@leafygreen-ui/emotion"),require("@leafygreen-ui/button"),require("@leafygreen-ui/typography"),require("@leafygreen-ui/modal"),require("@leafygreen-ui/palette")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@leafygreen-ui/emotion","@leafygreen-ui/button","@leafygreen-ui/typography","@leafygreen-ui/modal","@leafygreen-ui/palette"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/marketing-modal"]={},e.React,e.PropTypes,e["@leafygreen-ui/emotion"],e["@leafygreen-ui/button"],e["@leafygreen-ui/typography"],e["@leafygreen-ui/modal"],e["@leafygreen-ui/palette"])}(this,(function(e,n,t,r,i,l,a,o){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=u(n),f=u(t),s=u(i),d=u(a);function p(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function g(){return(g=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function y(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function m(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function b(){var e=m(["\n line-height: 24px;\n padding-bottom: 50px;\n\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n\n & > * {\n padding: 4px;\n }\n"]);return b=function(){return e},e}function x(){var e=m(["\n color: ",";\n font-family: Akzidenz, ‘Helvetica Neue’, Helvetica, Arial, sans-serif;\n font-size: 16px;\n letter-spacing: 0;\n line-height: 24px;\n text-align: center;\n\n padding: 0 92px;\n padding-bottom: 24px;\n"]);return x=function(){return e},e}function v(){var e=m(["\n width: 100%;\n"]);return v=function(){return e},e}function h(){var e=m(["\n padding-bottom: 24px;\n"]);return h=function(){return e},e}function k(){var e=m(["\n padding-top: 20px;\n padding-bottom: 8px;\n"]);return k=function(){return e},e}function O(){var e=m(["\n display: block;\n"]);return O=function(){return e},e}function j(){var e=m(["\n display: flex;\n align-items: center;\n justify-content: center;\n"]);return j=function(){return e},e}function C(){var e=m(["\n width: 600px;\n padding: initial;\n overflow: auto;\n"]);return C=function(){return e},e}function q(){var e=m(["\n color: ",";\n font-size: 24px;\n font-weight: bold;\n line-height: 25px;\n\n margin-bottom: 10px;\n"]);return q=function(){return e},e}var E={Center:"center",Fill:"fill"},N=r.css(q(),o.uiColors.gray.dark2),T=r.css(C()),w=r.css(j()),P=r.css(O()),z=r.css(k()),S=r.css(h()),R=r.css(v()),L=r.css(x(),o.uiColors.gray.dark1),B=r.css(b()),F=function(e){var n,t,i=e.children,a=e.title,o=e.graphic,u=e.graphicStyle,f=void 0===u?"center":u,m=e.onButtonClick,b=e.onLinkClick,x=e.onClose,v=e.buttonText,h=e.linkText,k=y(e,["children","title","graphic","graphicStyle","onButtonClick","onLinkClick","onClose","buttonText","linkText"]);return c.default.createElement(d.default,g({},k,{contentClassName:T,setOpen:x}),c.default.createElement("div",{className:r.cx(w,(n={},p(n,z,f===E.Center),p(n,S,f===E.Fill),n))},c.default.cloneElement(o,{className:"".concat(null!==(t=o.props.className)&&void 0!==t?t:""," ").concat(r.cx(P,p({},R,f===E.Fill)))})),c.default.createElement("div",{className:L},c.default.createElement("div",{className:N},a),i),c.default.createElement("div",{className:B},c.default.createElement(s.default,{variant:"primary",onClick:m},v),c.default.createElement(l.Link,{tabIndex:0,onClick:b,hideExternalIcon:!0},h)))};F.displayName="MarketingModal",F.propTypes={title:f.default.string.isRequired,graphic:f.default.element.isRequired,graphicStyle:f.default.oneOf(Object.values(E)),open:f.default.bool,onButtonClick:f.default.func,onLinkClick:f.default.func,onClose:f.default.func,children:f.default.node,className:f.default.string,buttonText:f.default.string.isRequired,linkText:f.default.string.isRequired},e.GraphicStyle=E,e.default=F,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=index.js.map
{
"name": "@leafygreen-ui/marketing-modal",
"version": "2.0.2",
"version": "2.0.3",
"description": "leafyGreen UI Kit Marketing Modal",

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

"dependencies": {
"@leafygreen-ui/button": "^8.0.1",
"@leafygreen-ui/lib": "^6.0.1",
"@leafygreen-ui/modal": "^5.0.1",
"@leafygreen-ui/palette": "^3.0.1",
"@leafygreen-ui/typography": "^7.0.0"
"@leafygreen-ui/button": "^9.0.0",
"@leafygreen-ui/lib": "^6.1.1",
"@leafygreen-ui/modal": "^5.1.0",
"@leafygreen-ui/palette": "^3.1.0",
"@leafygreen-ui/typography": "^7.1.0"
}
}

@@ -111,13 +111,13 @@ # Marketing Modal

| Prop | Type | Description | Default |
| --------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ---------- |
| `open` | `boolean` | Determines open state of `Modal` component | `false` |
| `onButtonClick` | `function` | Callback that fires when the primary button is clicked. This can be used to set the modal to be closed. | `() => {}` |
| `onLinkClick` | `function` | Callback that fires when the secondary link is clicked. This can be used to set the modal to be closed. | `() => {}` |
| `onClose` | `function` | Callback that fires when the cancel button, x button, or backdrop is clicked. This can be used to set the modal to be closed. | `() => {}` | `title` | `string` | Title text to display above the main content text. | |
| `graphic` | `React.ReactElement` | Element to be used as the main graphic of the modal. | |
| `graphicStyle` | `'center'`, `'fill'` | Determines how the main graphic should be displayed in the modal. | `'center'` |
| `children` | `node` | Children that will be rendered inside `<ConfirmationModal />` component. | |
| `buttonText` | `string` | Text content of the confirmation button. | |
| `linkText` | `string` | Text content of the alternate action link. | |
| `className` | `string` | Style to be applied to the container's root node. | |
| Prop | Type | Description | Default |
| --------------- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ---------- |
| `open` | `boolean` | Determines open state of `Modal` component | `false` |
| `onButtonClick` | `function` | Callback that fires when the primary button is clicked. This can be used to set the modal to be closed. | `() => {}` |
| `onLinkClick` | `function` | Callback that fires when the secondary link is clicked. This can be used to set the modal to be closed. | `() => {}` |
| `onClose` | `function` | Callback that fires when the cancel button, x button, or backdrop is clicked. This can be used to set the modal to be closed. | `() => {}` | `title` | `string` | Title text to display above the main content text. | |
| `graphic` | `React.ReactElement` | Element to be used as the main graphic of the modal. | |
| `graphicStyle` | `'center'` \| `'fill'` | Determines how the main graphic should be displayed in the modal. | `'center'` |
| `children` | `node` | Children that will be rendered inside `<ConfirmationModal />` component. | |
| `buttonText` | `string` | Text content of the confirmation button. | |
| `linkText` | `string` | Text content of the alternate action link. | |
| `className` | `string` | Style to be applied to the container's root node. | |

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

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