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

@twilio-paste/alert

Package Overview
Dependencies
Maintainers
5
Versions
167
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twilio-paste/alert - npm Package Compare versions

Comparing version 0.1.17 to 0.1.18

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [0.1.18](https://github.com/twilio-labs/paste/compare/@twilio-paste/alert@0.1.17...@twilio-paste/alert@0.1.18) (2020-03-02)
**Note:** Version bump only for package @twilio-paste/alert
## [0.1.17](https://github.com/twilio-labs/paste/compare/@twilio-paste/alert@0.1.16...@twilio-paste/alert@0.1.17) (2020-02-28)

@@ -8,0 +16,0 @@

4

dist/index.es.js

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

import{createElement as r}from"react";import{node as o,func as e,string as i,oneOf as t}from"prop-types";import{Box as n,safelySpreadBoxProps as l}from"@twilio-paste/box";import{MediaObject as a,MediaFigure as c,MediaBody as s}from"@twilio-paste/media-object";import{Button as d}from"@twilio-paste/button";import{UID as u}from"react-uid";import p from"@emotion/styled";import{system as f,compose as m,size as v}from"styled-system";
import{createElement as r}from"react";import{node as o,func as e,string as i,oneOf as t}from"prop-types";import{Box as n,safelySpreadBoxProps as l}from"@twilio-paste/box";import{MediaObject as a,MediaFigure as c,MediaBody as s}from"@twilio-paste/media-object";import{Button as d}from"@twilio-paste/button";import{UID as u}from"react-uid";import p from"@emotion/styled";import{system as f,compose as m,size as h}from"styled-system";
/*! *****************************************************************************

@@ -15,2 +15,2 @@ Copyright (c) Microsoft Corporation. All rights reserved.

and limitations under the License.
***************************************************************************** */var h=function(){return(h=Object.assign||function(r){for(var o,e=1,i=arguments.length;e<i;e++)for(var t in o=arguments[e])Object.prototype.hasOwnProperty.call(o,t)&&(r[t]=o[t]);return r}).apply(this,arguments)};var g=f({iconColor:{property:"color",scale:"textColors"}}),y=p.span({display:"inline-block"},m(g,v));y.defaultProps={size:"sizeIcon20",iconColor:"currentColor"},y.displayName="IconWrapper";var R=function(o){var e=o.as,i=o.size,t=o.iconColor,n=o.title,l=o.decorative;if(!l&&null==n)throw new Error("[CloseIcon]: Missing a title for non-decorative icon.");return r(y,{as:e,size:i,iconColor:t},r(u,null,(function(o){return r("svg",{role:"img","aria-hidden":l,"aria-labelledby":o,width:"100%",height:"100%",viewBox:"0 0 24 24"},n?r("title",{id:o},n):null,r("path",{fill:"currentColor",fillRule:"evenodd",d:"M.67.847L.753.753A1 1 0 012.073.67l.094.083 9.835 9.835L21.836.753a1 1 0 011.32-.083l.094.083a1 1 0 01.084 1.32l-.084.094-9.834 9.835 9.834 9.834a1 1 0 01.084 1.32l-.084.094a1 1 0 01-1.32.084l-.094-.084-9.834-9.834-9.835 9.834a1 1 0 01-1.32.084l-.094-.084a1 1 0 01-.083-1.32l.083-.094 9.835-9.834L.753 2.167A1 1 0 01.67.847L.753.753.67.847z"}))})))};R.displayName="CloseIcon";var z=function(o){var e=o.as,i=o.size,t=o.iconColor,n=o.title,l=o.decorative;if(!l&&null==n)throw new Error("[ErrorIcon]: Missing a title for non-decorative icon.");return r(y,{as:e,size:i,iconColor:t},r(u,null,(function(o){return r("svg",{role:"img","aria-hidden":l,"aria-labelledby":o,width:"100%",height:"100%",viewBox:"0 0 24 24"},n?r("title",{id:o},n):null,r("path",{fill:"currentColor",fillRule:"evenodd",d:"M19.778 4.222c4.296 4.296 4.296 11.26 0 15.556-4.296 4.296-11.26 4.296-15.556 0-4.296-4.296-4.296-11.26 0-15.556 4.296-4.296 11.26-4.296 15.556 0zM5.636 5.636a9.001 9.001 0 00-.668 11.982l12.65-12.65a9.001 9.001 0 00-11.982.668zm13.397.747l-12.65 12.65a9.001 9.001 0 0012.65-12.65z"}))})))};z.displayName="ErrorIcon";var C=function(o){var e=o.as,i=o.size,t=o.iconColor,n=o.title,l=o.decorative;if(!l&&null==n)throw new Error("[InformationIcon]: Missing a title for non-decorative icon.");return r(y,{as:e,size:i,iconColor:t},r(u,null,(function(o){return r("svg",{role:"img","aria-hidden":l,"aria-labelledby":o,width:"100%",height:"100%",viewBox:"0 0 24 24"},n?r("title",{id:o},n):null,r("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.002.48c6.362 0 11.521 5.159 11.521 11.522s-5.159 11.521-11.521 11.521C5.638 23.523.48 18.365.48 12.002.48 5.638 5.638.48 12.002.48zm0 2a9.521 9.521 0 00-9.522 9.522 9.521 9.521 0 009.522 9.521c5.258 0 9.521-4.263 9.521-9.521 0-5.259-4.263-9.522-9.521-9.522zm.301 7.609a1 1 0 011 1v5.608h1.866a1 1 0 01.993.884l.007.116a1 1 0 01-1 1H9.43a1 1 0 110-2h1.873v-4.608h-.913a1 1 0 010-2zm-.475-4.305a1.478 1.478 0 110 2.956 1.478 1.478 0 010-2.956z"}))})))};C.displayName="InformationIcon";var b=function(o){var e=o.as,i=o.size,t=o.iconColor,n=o.title,l=o.decorative;if(!l&&null==n)throw new Error("[WarningIcon]: Missing a title for non-decorative icon.");return r(y,{as:e,size:i,iconColor:t},r(u,null,(function(o){return r("svg",{role:"img","aria-hidden":l,"aria-labelledby":o,width:"100%",height:"100%",viewBox:"0 0 24 24"},n?r("title",{id:o},n):null,r("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.897 1.033L23.42 22.076a1 1 0 01-.894 1.447H1.48a1 1 0 01-.894-1.447L11.109 1.033a1 1 0 011.788 0zm-.894 2.683L3.099 21.523h17.808L12.003 3.716zm0 13.486a1.478 1.478 0 110 2.957 1.478 1.478 0 010-2.957zm0-8.401c.552 0 1 .336 1 .751v5.498c0 .415-.448.75-1 .75s-1-.335-1-.75V9.552c0-.415.448-.751 1-.751z"}))})))};b.displayName="WarningIcon";var w={ERROR:"alert",NEUTRAL:"status",WARNING:"alert"},I={ERROR:"error",NEUTRAL:"neutral",WARNING:"warning"},N={ERROR:"colorBackgroundErrorLightest",NEUTRAL:"colorBackgroundNeutralLightest",WARNING:"colorBackgroundWarningLightest"},E={ERROR:"colorBorderErrorLight",NEUTRAL:"colorBorderNeutralLight",WARNING:"colorBorderWarningLight"},L=function(o){var e=o.children,i=o.onDismiss,t=o.variant,u=o.role,p=function(r,o){var e={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&o.indexOf(i)<0&&(e[i]=r[i]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(i=Object.getOwnPropertySymbols(r);t<i.length;t++)o.indexOf(i[t])<0&&Object.prototype.propertyIsEnumerable.call(r,i[t])&&(e[i[t]]=r[i[t]])}return e}(o,["children","onDismiss","variant","role"]);return r(n,h({},l(p),{backgroundColor:N[t.toUpperCase()],borderColor:E[t.toUpperCase()],borderBottomWidth:"borderWidth20",borderBottomStyle:"solid",paddingLeft:"space70",paddingRight:"space70",paddingTop:"space40",paddingBottom:"space30",role:null!=u?u:w[t.toUpperCase()]}),r(a,null,r(c,{spacing:"space40"},function(o){switch(o){case I.ERROR:return r(z,{iconColor:"colorTextErrorDark",decorative:!1,title:"error: ",size:"sizeIcon30"});case I.WARNING:return r(b,{iconColor:"colorTextWarningDark",decorative:!1,title:"warning: ",size:"sizeIcon30"});case I.NEUTRAL:default:return r(C,{iconColor:"colorTextIcon",decorative:!1,title:"information: ",size:"sizeIcon30"})}}(t)),r(s,null,e),i&&"function"==typeof i&&r(c,{align:"end",spacing:"space70"},r(d,{onClick:i,variant:"link",size:"reset"},r(R,{iconColor:"colorTextIcon",decorative:!1,title:"dismiss this alert",size:"sizeIcon30"})))))};L.propTypes={children:o.isRequired,onDismiss:e,role:i,variant:t(Object.keys(I).map((function(r){return I[r]}))).isRequired},L.displayName="Alert";export{L as Alert,N as AlertBackgroundColors,E as AlertBorderColors,w as AlertRoles,I as AlertVariants};
***************************************************************************** */var v=function(){return(v=Object.assign||function(r){for(var o,e=1,i=arguments.length;e<i;e++)for(var t in o=arguments[e])Object.prototype.hasOwnProperty.call(o,t)&&(r[t]=o[t]);return r}).apply(this,arguments)};var g=f({iconColor:{property:"color",scale:"textColors"}}),y=p.span({display:"inline-flex"},m(g,h));y.defaultProps={size:"sizeIcon30",iconColor:"currentColor"},y.displayName="IconWrapper";var R=function(o){var e=o.as,i=o.size,t=o.iconColor,n=o.title,l=o.decorative;if(!l&&null==n)throw new Error("[CloseIcon]: Missing a title for non-decorative icon.");return r(y,{as:e,size:i,iconColor:t},r(u,null,(function(o){return r("svg",{role:"img","aria-hidden":l,"aria-labelledby":o,width:"100%",height:"100%",viewBox:"0 0 24 24"},n?r("title",{id:o},n):null,r("path",{fill:"currentColor",fillRule:"evenodd",d:"M18.01 5.99c.17.169.189.432.057.622l-.051.062-5.327 5.325 5.327 5.327c.19.19.185.494-.006.684a.488.488 0 01-.622.057l-.062-.051L12 12.689l-5.326 5.327a.481.481 0 01-.684-.006.488.488 0 01-.057-.622l.051-.062L11.311 12 5.984 6.674a.481.481 0 01.006-.684.488.488 0 01.622-.057l.062.051L12 11.31l5.326-5.326a.481.481 0 01.684.006z"}))})))};R.displayName="CloseIcon";var z=function(o){var e=o.as,i=o.size,t=o.iconColor,n=o.title,l=o.decorative;if(!l&&null==n)throw new Error("[ErrorIcon]: Missing a title for non-decorative icon.");return r(y,{as:e,size:i,iconColor:t},r(u,null,(function(o){return r("svg",{role:"img","aria-hidden":l,"aria-labelledby":o,width:"100%",height:"100%",viewBox:"0 0 24 24"},n?r("title",{id:o},n):null,r("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 2a9.968 9.968 0 017.06 2.918l.011.01.011.012a9.967 9.967 0 012.913 6.765L22 12c0 5.523-4.477 10-10 10a9.969 9.969 0 01-7.066-2.924l-.005-.005A9.973 9.973 0 012 12C2 6.477 6.477 2 12 2zm6.709 4L5.999 18.707a8.966 8.966 0 006 2.293c4.883 0 8.856-3.886 8.997-8.72l.004-.266-.004-.28A8.96 8.96 0 0018.709 6zm-6.71-3A9 9 0 003 12c0 2.305.867 4.408 2.292 6L18 5.293A8.97 8.97 0 0012 3z"}))})))};z.displayName="ErrorIcon";var C=function(o){var e=o.as,i=o.size,t=o.iconColor,n=o.title,l=o.decorative;if(!l&&null==n)throw new Error("[InformationIcon]: Missing a title for non-decorative icon.");return r(y,{as:e,size:i,iconColor:t},r(u,null,(function(o){return r("svg",{role:"img","aria-hidden":l,"aria-labelledby":o,width:"100%",height:"100%",viewBox:"0 0 24 24"},n?r("title",{id:o},n):null,r("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 2c5.522 0 10 4.478 10 10s-4.478 10-10 10C6.477 22 2 17.523 2 12S6.477 2 12 2zm0 .994A9.006 9.006 0 002.994 12 9.007 9.007 0 1012 2.994zm.24 7.506a.5.5 0 01.491.41l.008.09v5.25h2.133a.5.5 0 01.09.992l-.09.008H9.628a.5.5 0 01-.09-.992l.09-.008h2.111V11.5H10.5a.5.5 0 01-.492-.41L10 11a.5.5 0 01.41-.492l.09-.008h1.74zm-.405-3.745a.935.935 0 110 1.87.935.935 0 010-1.87z"}))})))};C.displayName="InformationIcon";var b=function(o){var e=o.as,i=o.size,t=o.iconColor,n=o.title,l=o.decorative;if(!l&&null==n)throw new Error("[WarningIcon]: Missing a title for non-decorative icon.");return r(y,{as:e,size:i,iconColor:t},r(u,null,(function(o){return r("svg",{role:"img","aria-hidden":l,"aria-labelledby":o,width:"100%",height:"100%",viewBox:"0 0 24 24"},n?r("title",{id:o},n):null,r("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.546 2.267a.52.52 0 01.908 0L21.946 20.3c.169.321-.077.7-.454.7H2.508c-.377 0-.623-.379-.454-.7zM12 3.56L3.33 20.033h17.34L12 3.561zM12.005 16a.935.935 0 110 1.87.935.935 0 010-1.87zM12 9c.245 0 .45.155.492.359l.008.078v4.126c0 .241-.224.437-.5.437-.245 0-.45-.155-.492-.359l-.008-.078V9.437c0-.241.224-.437.5-.437z"}))})))};b.displayName="WarningIcon";var w={ERROR:"alert",NEUTRAL:"status",WARNING:"alert"},I={ERROR:"error",NEUTRAL:"neutral",WARNING:"warning"},N={ERROR:"colorBackgroundErrorLightest",NEUTRAL:"colorBackgroundNeutralLightest",WARNING:"colorBackgroundWarningLightest"},L={ERROR:"colorBorderErrorLight",NEUTRAL:"colorBorderNeutralLight",WARNING:"colorBorderWarningLight"},E=function(o){var e=o.children,i=o.onDismiss,t=o.variant,u=o.role,p=function(r,o){var e={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&o.indexOf(i)<0&&(e[i]=r[i]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(i=Object.getOwnPropertySymbols(r);t<i.length;t++)o.indexOf(i[t])<0&&Object.prototype.propertyIsEnumerable.call(r,i[t])&&(e[i[t]]=r[i[t]])}return e}(o,["children","onDismiss","variant","role"]);return r(n,v({},l(p),{backgroundColor:N[t.toUpperCase()],borderColor:L[t.toUpperCase()],borderBottomWidth:"borderWidth20",borderBottomStyle:"solid",paddingLeft:"space70",paddingRight:"space70",paddingTop:"space40",paddingBottom:"space30",role:null!=u?u:w[t.toUpperCase()]}),r(a,null,r(c,{spacing:"space40"},function(o){switch(o){case I.ERROR:return r(z,{iconColor:"colorTextErrorDark",decorative:!1,title:"error: ",size:"sizeIcon30"});case I.WARNING:return r(b,{iconColor:"colorTextWarningDark",decorative:!1,title:"warning: ",size:"sizeIcon30"});case I.NEUTRAL:default:return r(C,{iconColor:"colorTextIcon",decorative:!1,title:"information: ",size:"sizeIcon30"})}}(t)),r(s,null,e),i&&"function"==typeof i&&r(c,{align:"end",spacing:"space70"},r(d,{onClick:i,variant:"link",size:"reset"},r(R,{iconColor:"colorTextIcon",decorative:!1,title:"dismiss this alert",size:"sizeIcon30"})))))};E.propTypes={children:o.isRequired,onDismiss:e,role:i,variant:t(Object.keys(I).map((function(r){return I[r]}))).isRequired},E.displayName="Alert";export{E as Alert,N as AlertBackgroundColors,L as AlertBorderColors,w as AlertRoles,I as AlertVariants};

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r=require("react"),t=require("prop-types"),o=require("@twilio-paste/box"),i=require("@twilio-paste/media-object"),n=require("@twilio-paste/button"),l=require("react-uid"),a=(e=require("@emotion/styled"))&&"object"==typeof e&&"default"in e?e.default:e,c=require("styled-system"),s=function(){return(s=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var i in r=arguments[t])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e}).apply(this,arguments)};var d=c.system({iconColor:{property:"color",scale:"textColors"}}),u=a.span({display:"inline-block"},c.compose(d,c.size));u.defaultProps={size:"sizeIcon20",iconColor:"currentColor"},u.displayName="IconWrapper";var p=function(e){var t=e.as,o=e.size,i=e.iconColor,n=e.title,a=e.decorative;if(!a&&null==n)throw new Error("[CloseIcon]: Missing a title for non-decorative icon.");return r.createElement(u,{as:t,size:o,iconColor:i},r.createElement(l.UID,null,(function(e){return r.createElement("svg",{role:"img","aria-hidden":a,"aria-labelledby":e,width:"100%",height:"100%",viewBox:"0 0 24 24"},n?r.createElement("title",{id:e},n):null,r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M.67.847L.753.753A1 1 0 012.073.67l.094.083 9.835 9.835L21.836.753a1 1 0 011.32-.083l.094.083a1 1 0 01.084 1.32l-.084.094-9.834 9.835 9.834 9.834a1 1 0 01.084 1.32l-.084.094a1 1 0 01-1.32.084l-.094-.084-9.834-9.834-9.835 9.834a1 1 0 01-1.32.084l-.094-.084a1 1 0 01-.083-1.32l.083-.094 9.835-9.834L.753 2.167A1 1 0 01.67.847L.753.753.67.847z"}))})))};p.displayName="CloseIcon";var m=function(e){var t=e.as,o=e.size,i=e.iconColor,n=e.title,a=e.decorative;if(!a&&null==n)throw new Error("[ErrorIcon]: Missing a title for non-decorative icon.");return r.createElement(u,{as:t,size:o,iconColor:i},r.createElement(l.UID,null,(function(e){return r.createElement("svg",{role:"img","aria-hidden":a,"aria-labelledby":e,width:"100%",height:"100%",viewBox:"0 0 24 24"},n?r.createElement("title",{id:e},n):null,r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M19.778 4.222c4.296 4.296 4.296 11.26 0 15.556-4.296 4.296-11.26 4.296-15.556 0-4.296-4.296-4.296-11.26 0-15.556 4.296-4.296 11.26-4.296 15.556 0zM5.636 5.636a9.001 9.001 0 00-.668 11.982l12.65-12.65a9.001 9.001 0 00-11.982.668zm13.397.747l-12.65 12.65a9.001 9.001 0 0012.65-12.65z"}))})))};m.displayName="ErrorIcon";var f=function(e){var t=e.as,o=e.size,i=e.iconColor,n=e.title,a=e.decorative;if(!a&&null==n)throw new Error("[InformationIcon]: Missing a title for non-decorative icon.");return r.createElement(u,{as:t,size:o,iconColor:i},r.createElement(l.UID,null,(function(e){return r.createElement("svg",{role:"img","aria-hidden":a,"aria-labelledby":e,width:"100%",height:"100%",viewBox:"0 0 24 24"},n?r.createElement("title",{id:e},n):null,r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.002.48c6.362 0 11.521 5.159 11.521 11.522s-5.159 11.521-11.521 11.521C5.638 23.523.48 18.365.48 12.002.48 5.638 5.638.48 12.002.48zm0 2a9.521 9.521 0 00-9.522 9.522 9.521 9.521 0 009.522 9.521c5.258 0 9.521-4.263 9.521-9.521 0-5.259-4.263-9.522-9.521-9.522zm.301 7.609a1 1 0 011 1v5.608h1.866a1 1 0 01.993.884l.007.116a1 1 0 01-1 1H9.43a1 1 0 110-2h1.873v-4.608h-.913a1 1 0 010-2zm-.475-4.305a1.478 1.478 0 110 2.956 1.478 1.478 0 010-2.956z"}))})))};f.displayName="InformationIcon";var g=function(e){var t=e.as,o=e.size,i=e.iconColor,n=e.title,a=e.decorative;if(!a&&null==n)throw new Error("[WarningIcon]: Missing a title for non-decorative icon.");return r.createElement(u,{as:t,size:o,iconColor:i},r.createElement(l.UID,null,(function(e){return r.createElement("svg",{role:"img","aria-hidden":a,"aria-labelledby":e,width:"100%",height:"100%",viewBox:"0 0 24 24"},n?r.createElement("title",{id:e},n):null,r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.897 1.033L23.42 22.076a1 1 0 01-.894 1.447H1.48a1 1 0 01-.894-1.447L11.109 1.033a1 1 0 011.788 0zm-.894 2.683L3.099 21.523h17.808L12.003 3.716zm0 13.486a1.478 1.478 0 110 2.957 1.478 1.478 0 010-2.957zm0-8.401c.552 0 1 .336 1 .751v5.498c0 .415-.448.75-1 .75s-1-.335-1-.75V9.552c0-.415.448-.751 1-.751z"}))})))};g.displayName="WarningIcon";var E={ERROR:"alert",NEUTRAL:"status",WARNING:"alert"},v={ERROR:"error",NEUTRAL:"neutral",WARNING:"warning"},h={ERROR:"colorBackgroundErrorLightest",NEUTRAL:"colorBackgroundNeutralLightest",WARNING:"colorBackgroundWarningLightest"},y={ERROR:"colorBorderErrorLight",NEUTRAL:"colorBorderNeutralLight",WARNING:"colorBorderWarningLight"},R=function(e){var t=e.children,l=e.onDismiss,a=e.variant,c=e.role,d=function(e,r){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)r.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(t[o[i]]=e[o[i]])}return t}(e,["children","onDismiss","variant","role"]);return r.createElement(o.Box,s({},o.safelySpreadBoxProps(d),{backgroundColor:h[a.toUpperCase()],borderColor:y[a.toUpperCase()],borderBottomWidth:"borderWidth20",borderBottomStyle:"solid",paddingLeft:"space70",paddingRight:"space70",paddingTop:"space40",paddingBottom:"space30",role:null!=c?c:E[a.toUpperCase()]}),r.createElement(i.MediaObject,null,r.createElement(i.MediaFigure,{spacing:"space40"},function(e){switch(e){case v.ERROR:return r.createElement(m,{iconColor:"colorTextErrorDark",decorative:!1,title:"error: ",size:"sizeIcon30"});case v.WARNING:return r.createElement(g,{iconColor:"colorTextWarningDark",decorative:!1,title:"warning: ",size:"sizeIcon30"});case v.NEUTRAL:default:return r.createElement(f,{iconColor:"colorTextIcon",decorative:!1,title:"information: ",size:"sizeIcon30"})}}(a)),r.createElement(i.MediaBody,null,t),l&&"function"==typeof l&&r.createElement(i.MediaFigure,{align:"end",spacing:"space70"},r.createElement(n.Button,{onClick:l,variant:"link",size:"reset"},r.createElement(p,{iconColor:"colorTextIcon",decorative:!1,title:"dismiss this alert",size:"sizeIcon30"})))))};R.propTypes={children:t.node.isRequired,onDismiss:t.func,role:t.string,variant:t.oneOf(Object.keys(v).map((function(e){return v[e]}))).isRequired},R.displayName="Alert",exports.Alert=R,exports.AlertBackgroundColors=h,exports.AlertBorderColors=y,exports.AlertRoles=E,exports.AlertVariants=v;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r=require("react"),t=require("prop-types"),o=require("@twilio-paste/box"),i=require("@twilio-paste/media-object"),n=require("@twilio-paste/button"),l=require("react-uid"),a=(e=require("@emotion/styled"))&&"object"==typeof e&&"default"in e?e.default:e,c=require("styled-system"),s=function(){return(s=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var i in r=arguments[t])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e}).apply(this,arguments)};var d=c.system({iconColor:{property:"color",scale:"textColors"}}),u=a.span({display:"inline-flex"},c.compose(d,c.size));u.defaultProps={size:"sizeIcon30",iconColor:"currentColor"},u.displayName="IconWrapper";var p=function(e){var t=e.as,o=e.size,i=e.iconColor,n=e.title,a=e.decorative;if(!a&&null==n)throw new Error("[CloseIcon]: Missing a title for non-decorative icon.");return r.createElement(u,{as:t,size:o,iconColor:i},r.createElement(l.UID,null,(function(e){return r.createElement("svg",{role:"img","aria-hidden":a,"aria-labelledby":e,width:"100%",height:"100%",viewBox:"0 0 24 24"},n?r.createElement("title",{id:e},n):null,r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M18.01 5.99c.17.169.189.432.057.622l-.051.062-5.327 5.325 5.327 5.327c.19.19.185.494-.006.684a.488.488 0 01-.622.057l-.062-.051L12 12.689l-5.326 5.327a.481.481 0 01-.684-.006.488.488 0 01-.057-.622l.051-.062L11.311 12 5.984 6.674a.481.481 0 01.006-.684.488.488 0 01.622-.057l.062.051L12 11.31l5.326-5.326a.481.481 0 01.684.006z"}))})))};p.displayName="CloseIcon";var m=function(e){var t=e.as,o=e.size,i=e.iconColor,n=e.title,a=e.decorative;if(!a&&null==n)throw new Error("[ErrorIcon]: Missing a title for non-decorative icon.");return r.createElement(u,{as:t,size:o,iconColor:i},r.createElement(l.UID,null,(function(e){return r.createElement("svg",{role:"img","aria-hidden":a,"aria-labelledby":e,width:"100%",height:"100%",viewBox:"0 0 24 24"},n?r.createElement("title",{id:e},n):null,r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 2a9.968 9.968 0 017.06 2.918l.011.01.011.012a9.967 9.967 0 012.913 6.765L22 12c0 5.523-4.477 10-10 10a9.969 9.969 0 01-7.066-2.924l-.005-.005A9.973 9.973 0 012 12C2 6.477 6.477 2 12 2zm6.709 4L5.999 18.707a8.966 8.966 0 006 2.293c4.883 0 8.856-3.886 8.997-8.72l.004-.266-.004-.28A8.96 8.96 0 0018.709 6zm-6.71-3A9 9 0 003 12c0 2.305.867 4.408 2.292 6L18 5.293A8.97 8.97 0 0012 3z"}))})))};m.displayName="ErrorIcon";var f=function(e){var t=e.as,o=e.size,i=e.iconColor,n=e.title,a=e.decorative;if(!a&&null==n)throw new Error("[InformationIcon]: Missing a title for non-decorative icon.");return r.createElement(u,{as:t,size:o,iconColor:i},r.createElement(l.UID,null,(function(e){return r.createElement("svg",{role:"img","aria-hidden":a,"aria-labelledby":e,width:"100%",height:"100%",viewBox:"0 0 24 24"},n?r.createElement("title",{id:e},n):null,r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 2c5.522 0 10 4.478 10 10s-4.478 10-10 10C6.477 22 2 17.523 2 12S6.477 2 12 2zm0 .994A9.006 9.006 0 002.994 12 9.007 9.007 0 1012 2.994zm.24 7.506a.5.5 0 01.491.41l.008.09v5.25h2.133a.5.5 0 01.09.992l-.09.008H9.628a.5.5 0 01-.09-.992l.09-.008h2.111V11.5H10.5a.5.5 0 01-.492-.41L10 11a.5.5 0 01.41-.492l.09-.008h1.74zm-.405-3.745a.935.935 0 110 1.87.935.935 0 010-1.87z"}))})))};f.displayName="InformationIcon";var g=function(e){var t=e.as,o=e.size,i=e.iconColor,n=e.title,a=e.decorative;if(!a&&null==n)throw new Error("[WarningIcon]: Missing a title for non-decorative icon.");return r.createElement(u,{as:t,size:o,iconColor:i},r.createElement(l.UID,null,(function(e){return r.createElement("svg",{role:"img","aria-hidden":a,"aria-labelledby":e,width:"100%",height:"100%",viewBox:"0 0 24 24"},n?r.createElement("title",{id:e},n):null,r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.546 2.267a.52.52 0 01.908 0L21.946 20.3c.169.321-.077.7-.454.7H2.508c-.377 0-.623-.379-.454-.7zM12 3.56L3.33 20.033h17.34L12 3.561zM12.005 16a.935.935 0 110 1.87.935.935 0 010-1.87zM12 9c.245 0 .45.155.492.359l.008.078v4.126c0 .241-.224.437-.5.437-.245 0-.45-.155-.492-.359l-.008-.078V9.437c0-.241.224-.437.5-.437z"}))})))};g.displayName="WarningIcon";var E={ERROR:"alert",NEUTRAL:"status",WARNING:"alert"},v={ERROR:"error",NEUTRAL:"neutral",WARNING:"warning"},h={ERROR:"colorBackgroundErrorLightest",NEUTRAL:"colorBackgroundNeutralLightest",WARNING:"colorBackgroundWarningLightest"},y={ERROR:"colorBorderErrorLight",NEUTRAL:"colorBorderNeutralLight",WARNING:"colorBorderWarningLight"},R=function(e){var t=e.children,l=e.onDismiss,a=e.variant,c=e.role,d=function(e,r){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)r.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(t[o[i]]=e[o[i]])}return t}(e,["children","onDismiss","variant","role"]);return r.createElement(o.Box,s({},o.safelySpreadBoxProps(d),{backgroundColor:h[a.toUpperCase()],borderColor:y[a.toUpperCase()],borderBottomWidth:"borderWidth20",borderBottomStyle:"solid",paddingLeft:"space70",paddingRight:"space70",paddingTop:"space40",paddingBottom:"space30",role:null!=c?c:E[a.toUpperCase()]}),r.createElement(i.MediaObject,null,r.createElement(i.MediaFigure,{spacing:"space40"},function(e){switch(e){case v.ERROR:return r.createElement(m,{iconColor:"colorTextErrorDark",decorative:!1,title:"error: ",size:"sizeIcon30"});case v.WARNING:return r.createElement(g,{iconColor:"colorTextWarningDark",decorative:!1,title:"warning: ",size:"sizeIcon30"});case v.NEUTRAL:default:return r.createElement(f,{iconColor:"colorTextIcon",decorative:!1,title:"information: ",size:"sizeIcon30"})}}(a)),r.createElement(i.MediaBody,null,t),l&&"function"==typeof l&&r.createElement(i.MediaFigure,{align:"end",spacing:"space70"},r.createElement(n.Button,{onClick:l,variant:"link",size:"reset"},r.createElement(p,{iconColor:"colorTextIcon",decorative:!1,title:"dismiss this alert",size:"sizeIcon30"})))))};R.propTypes={children:t.node.isRequired,onDismiss:t.func,role:t.string,variant:t.oneOf(Object.keys(v).map((function(e){return v[e]}))).isRequired},R.displayName="Alert",exports.Alert=R,exports.AlertBackgroundColors=h,exports.AlertBorderColors=y,exports.AlertRoles=E,exports.AlertVariants=v;
{
"name": "@twilio-paste/alert",
"version": "0.1.17",
"version": "0.1.18",
"category": "feedback",

@@ -34,12 +34,12 @@ "status": "beta",

"@styled-system/theme-get": "^5.1.2",
"@twilio-paste/absolute": "^2.0.15",
"@twilio-paste/box": "^2.1.10",
"@twilio-paste/button": "^1.1.20",
"@twilio-paste/design-tokens": "^4.1.3",
"@twilio-paste/icons": "^1.7.1",
"@twilio-paste/media-object": "^1.2.2",
"@twilio-paste/spinner": "^1.1.17",
"@twilio-paste/style-props": "^0.1.8",
"@twilio-paste/theme-tokens": "^3.0.4",
"@twilio-paste/types": "^2.2.5",
"@twilio-paste/absolute": "^2.0.16",
"@twilio-paste/box": "^2.1.11",
"@twilio-paste/button": "^1.1.21",
"@twilio-paste/design-tokens": "^4.1.4",
"@twilio-paste/icons": "^1.7.2",
"@twilio-paste/media-object": "^1.2.3",
"@twilio-paste/spinner": "^1.1.18",
"@twilio-paste/style-props": "^0.1.9",
"@twilio-paste/theme-tokens": "^3.0.5",
"@twilio-paste/types": "^2.2.6",
"prop-types": "^15.7.2",

@@ -60,7 +60,7 @@ "react": "^16.8.6",

"@twilio-paste/box": "^2.1.11",
"@twilio-paste/button": "^1.1.21",
"@twilio-paste/button": "^1.1.22",
"@twilio-paste/design-tokens": "^4.1.4",
"@twilio-paste/icons": "^1.7.2",
"@twilio-paste/icons": "^2.0.0",
"@twilio-paste/media-object": "^1.2.3",
"@twilio-paste/spinner": "^1.1.18",
"@twilio-paste/spinner": "^1.1.19",
"@twilio-paste/style-props": "^0.1.9",

@@ -81,3 +81,3 @@ "@twilio-paste/theme-tokens": "^3.0.5",

},
"gitHead": "ab410ea8b72cc0e391a09448038ec170c83e7a92"
"gitHead": "7ea7296b2d1c8f3ac998cd13eb7a3a3e31d780c2"
}
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