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 1.0.15 to 1.0.16

8

CHANGELOG.md

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

## [1.0.16](https://github.com/twilio-labs/paste/compare/@twilio-paste/alert@1.0.15...@twilio-paste/alert@1.0.16) (2020-09-09)
**Note:** Version bump only for package @twilio-paste/alert
## [1.0.15](https://github.com/twilio-labs/paste/compare/@twilio-paste/alert@1.0.14...@twilio-paste/alert@1.0.15) (2020-09-09)

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

2

dist/index.es.js

@@ -30,2 +30,2 @@ import{createElement as r}from"react";import{node as e,func as o,string as i,oneOf as t}from"prop-types";import{Box as l,safelySpreadBoxProps as n}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 p}from"react-uid";

***************************************************************************** */
var f=function(){return(f=Object.assign||function(r){for(var e,o=1,i=arguments.length;o<i;o++)for(var t in e=arguments[o])Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r}).apply(this,arguments)},v=function(e){var o=e.display,i=e.color,t=e.size,a=function(r,e){var o={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&e.indexOf(i)<0&&(o[i]=r[i]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(i=Object.getOwnPropertySymbols(r);t<i.length;t++)e.indexOf(i[t])<0&&Object.prototype.propertyIsEnumerable.call(r,i[t])&&(o[i[t]]=r[i[t]])}return o}(e,["display","color","size"]);return r(l,f({},n(a),{lineHeight:"lineHeight0",display:o,color:i,size:t}))};v.defaultProps={as:"span",display:"block",color:"currentColor",size:"sizeIcon30"},v.displayName="IconWrapper";var g=function(e){var o=e.as,i=e.display,t=e.size,l=e.color,n=e.title,a=e.decorative;if(!a&&null==n)throw new Error("[CloseIcon]: Missing a title for non-decorative icon.");return r(v,{as:o,display:i,size:t,color:l},r(p,null,(function(e){return r("svg",{role:"img","aria-hidden":a,width:"100%",height:"100%",viewBox:"0 0 20 20","aria-labelledby":e},n?r("title",{id:e},n):null,r("path",{fill:"currentColor",fillRule:"evenodd",d:"M15.858 4.142a.475.475 0 01.055.606l-.05.061-5.191 5.19 5.191 5.192a.469.469 0 01-.005.667.475.475 0 01-.606.055l-.061-.05L10 10.671l-5.191 5.192a.469.469 0 01-.667-.005.475.475 0 01-.055-.606l.05-.061 5.191-5.192-5.191-5.19a.469.469 0 01.005-.667.475.475 0 01.606-.055l.061.05L10 9.327l5.191-5.19a.469.469 0 01.667.005z"}))})))};g.displayName="CloseIcon";var h=function(e){var o=e.as,i=e.display,t=e.size,l=e.color,n=e.title,a=e.decorative;if(!a&&null==n)throw new Error("[ErrorIcon]: Missing a title for non-decorative icon.");return r(v,{as:o,display:i,size:t,color:l},r(p,null,(function(e){return r("svg",{role:"img","aria-hidden":a,width:"100%",height:"100%",viewBox:"0 0 20 20","aria-labelledby":e},n?r("title",{id:e},n):null,r("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.247 2.517l6.236 6.236a1.764 1.764 0 010 2.494l-6.236 6.236a1.764 1.764 0 01-2.494 0l-6.236-6.236a1.764 1.764 0 010-2.494l6.236-6.236a1.764 1.764 0 012.494 0zM10 12a1 1 0 100 2 1 1 0 000-2zm.01-5h-.02c-.604 0-1.073.592-.978 1.244l.428 2.238c.04.296.278.518.557.518h.006c.279 0 .516-.222.557-.518l.428-2.238c.095-.652-.367-1.237-.978-1.244z"}))})))};h.displayName="ErrorIcon";var y=function(e){var o=e.as,i=e.display,t=e.size,l=e.color,n=e.title,a=e.decorative;if(!a&&null==n)throw new Error("[InformationIcon]: Missing a title for non-decorative icon.");return r(v,{as:o,display:i,size:t,color:l},r(p,null,(function(e){return r("svg",{role:"img","aria-hidden":a,width:"100%",height:"100%",viewBox:"0 0 20 20","aria-labelledby":e},n?r("title",{id:e},n):null,r("path",{fill:"currentColor",fillRule:"evenodd",d:"M10 2a8 8 0 110 16 8 8 0 010-16zm0 7c-.26.01-.528.08-.707.24-.178.158-.292.355-.292.575v3.37c0 .21.11.428.292.577.173.14.457.247.707.237.26-.008.528-.078.707-.237.178-.16.292-.355.292-.577v-3.37a.766.766 0 00-.292-.575A1.14 1.14 0 0010 9zm0-3l-.266.036c-.17.047-.318.131-.441.253l-.156.198A.958.958 0 009 6.98v.04a.728.728 0 00.086.378c.04.121.108.227.206.315.09.094.197.163.321.202.12.06.248.09.386.084l.266-.035c.17-.047.318-.131.441-.253l.156-.198A.958.958 0 0011 7.02v-.04a.728.728 0 00-.086-.378.721.721 0 00-.206-.315.757.757 0 00-.321-.202.767.767 0 00-.386-.084z"}))})))};y.displayName="InformationIcon";var m=function(e){var o=e.as,i=e.display,t=e.size,l=e.color,n=e.title,a=e.decorative;if(!a&&null==n)throw new Error("[WarningIcon]: Missing a title for non-decorative icon.");return r(v,{as:o,display:i,size:t,color:l},r(p,null,(function(e){return r("svg",{role:"img","aria-hidden":a,width:"100%",height:"100%",viewBox:"0 0 20 20","aria-labelledby":e},n?r("title",{id:e},n):null,r("path",{fill:"currentColor",fillRule:"evenodd",d:"M8.684 3.744c.582-.992 2.05-.992 2.632 0l6.482 11.048c.577.984-.152 2.208-1.316 2.208H3.518c-1.164 0-1.893-1.224-1.316-2.208zM10 13a1 1 0 100 2 1 1 0 000-2zm.01-5h-.02l-.112.007c-.549.067-.955.626-.866 1.237l.428 2.238.02.095c.074.247.29.423.543.423l.091-.008a.59.59 0 00.466-.51l.428-2.238.011-.121c.025-.602-.416-1.116-.989-1.123z"}))})))};m.displayName="WarningIcon";var b={ERROR:"alert",NEUTRAL:"status",WARNING:"alert"},z={ERROR:"error",NEUTRAL:"neutral",WARNING:"warning"},R={ERROR:"colorBackgroundErrorLightest",NEUTRAL:"colorBackgroundNeutralLightest",WARNING:"colorBackgroundWarningLightest"},O={ERROR:"colorBorderErrorLight",NEUTRAL:"colorBorderNeutralLight",WARNING:"colorBorderWarningLight"},w=function(e){var o=e.children,i=e.onDismiss,t=e.variant,p=e.role,f=function(r,e){var o={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&e.indexOf(i)<0&&(o[i]=r[i]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(i=Object.getOwnPropertySymbols(r);t<i.length;t++)e.indexOf(i[t])<0&&Object.prototype.propertyIsEnumerable.call(r,i[t])&&(o[i[t]]=r[i[t]])}return o}(e,["children","onDismiss","variant","role"]);return r(l,u({},n(f),{backgroundColor:R[t.toUpperCase()],borderColor:O[t.toUpperCase()],borderBottomWidth:"borderWidth20",borderBottomStyle:"solid",paddingLeft:"space70",paddingRight:"space70",paddingTop:"space40",paddingBottom:"space40",role:null!=p?p:b[t.toUpperCase()]}),r(a,{as:"div"},r(c,{as:"div",spacing:"space40"},function(e){switch(e){case z.ERROR:return r(h,{color:"colorTextError",decorative:!1,title:"error: ",size:"sizeIcon30"});case z.WARNING:return r(m,{color:"colorTextWarning",decorative:!1,title:"warning: ",size:"sizeIcon30"});case z.NEUTRAL:default:return r(y,{color:"colorTextIcon",decorative:!1,title:"information: ",size:"sizeIcon30"})}}(t)),r(s,{as:"div"},o),i&&"function"==typeof i&&r(c,{align:"end",spacing:"space70"},r(d,{onClick:i,variant:"link",size:"reset"},r(g,{color:"colorTextIcon",decorative:!1,title:"dismiss this alert",size:"sizeIcon30"})))))};w.displayName="Alert","development"===process.env.NODE_ENV&&(w.propTypes={children:e.isRequired,onDismiss:o,role:i,variant:t(Object.keys(z).map((function(r){return z[r]}))).isRequired});export{w as Alert,R as AlertBackgroundColors,O as AlertBorderColors,b as AlertRoles,z as AlertVariants};
var f=function(){return(f=Object.assign||function(r){for(var e,o=1,i=arguments.length;o<i;o++)for(var t in e=arguments[o])Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r}).apply(this,arguments)},v=function(e){var o=e.display,i=e.color,t=e.size,a=function(r,e){var o={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&e.indexOf(i)<0&&(o[i]=r[i]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(i=Object.getOwnPropertySymbols(r);t<i.length;t++)e.indexOf(i[t])<0&&Object.prototype.propertyIsEnumerable.call(r,i[t])&&(o[i[t]]=r[i[t]])}return o}(e,["display","color","size"]);return r(l,f({},n(a),{lineHeight:"lineHeight0",display:o,color:i,size:t}))};v.defaultProps={as:"span",display:"block",color:"currentColor",size:"sizeIcon30"},v.displayName="IconWrapper";var g=function(e){var o=e.as,i=e.display,t=e.size,l=e.color,n=e.title,a=e.decorative;if(!a&&null==n)throw new Error("[CloseIcon]: Missing a title for non-decorative icon.");return r(v,{as:o,display:i,size:t,color:l},r(p,null,(function(e){return r("svg",{role:"img","aria-hidden":a,width:"100%",height:"100%",viewBox:"0 0 20 20","aria-labelledby":e},n?r("title",{id:e},n):null,r("path",{fill:"currentColor",fillRule:"evenodd",d:"M15.16 13.514L11.645 10l3.515-3.514a1.165 1.165 0 00-1.646-1.646L10 8.355 6.486 4.84A1.165 1.165 0 004.84 6.486L8.355 10 4.84 13.514a1.165 1.165 0 001.646 1.646L10 11.645l3.514 3.515a1.165 1.165 0 001.646-1.646z"}))})))};g.displayName="CloseIcon";var h=function(e){var o=e.as,i=e.display,t=e.size,l=e.color,n=e.title,a=e.decorative;if(!a&&null==n)throw new Error("[ErrorIcon]: Missing a title for non-decorative icon.");return r(v,{as:o,display:i,size:t,color:l},r(p,null,(function(e){return r("svg",{role:"img","aria-hidden":a,width:"100%",height:"100%",viewBox:"0 0 20 20","aria-labelledby":e},n?r("title",{id:e},n):null,r("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.247 2.517l6.236 6.236a1.764 1.764 0 010 2.494l-6.236 6.236a1.764 1.764 0 01-2.494 0l-6.236-6.236a1.764 1.764 0 010-2.494l6.236-6.236a1.764 1.764 0 012.494 0zM10 12a1 1 0 100 2 1 1 0 000-2zm.01-5h-.02c-.604 0-1.073.592-.978 1.244l.428 2.238c.04.296.278.518.557.518h.006c.279 0 .516-.222.557-.518l.428-2.238c.095-.652-.367-1.237-.978-1.244z"}))})))};h.displayName="ErrorIcon";var y=function(e){var o=e.as,i=e.display,t=e.size,l=e.color,n=e.title,a=e.decorative;if(!a&&null==n)throw new Error("[InformationIcon]: Missing a title for non-decorative icon.");return r(v,{as:o,display:i,size:t,color:l},r(p,null,(function(e){return r("svg",{role:"img","aria-hidden":a,width:"100%",height:"100%",viewBox:"0 0 20 20","aria-labelledby":e},n?r("title",{id:e},n):null,r("path",{fill:"currentColor",fillRule:"evenodd",d:"M10 2a8 8 0 110 16 8 8 0 010-16zm0 7c-.26.01-.528.08-.707.24-.178.158-.292.355-.292.575v3.37c0 .21.11.428.292.577.173.14.457.247.707.237.26-.008.528-.078.707-.237.178-.16.292-.355.292-.577v-3.37a.766.766 0 00-.292-.575A1.14 1.14 0 0010 9zm0-3l-.266.036c-.17.047-.318.131-.441.253l-.156.198A.958.958 0 009 6.98v.04a.728.728 0 00.086.378c.04.121.108.227.206.315.09.094.197.163.321.202.12.06.248.09.386.084l.266-.035c.17-.047.318-.131.441-.253l.156-.198A.958.958 0 0011 7.02v-.04a.728.728 0 00-.086-.378.721.721 0 00-.206-.315.757.757 0 00-.321-.202.767.767 0 00-.386-.084z"}))})))};y.displayName="InformationIcon";var m=function(e){var o=e.as,i=e.display,t=e.size,l=e.color,n=e.title,a=e.decorative;if(!a&&null==n)throw new Error("[WarningIcon]: Missing a title for non-decorative icon.");return r(v,{as:o,display:i,size:t,color:l},r(p,null,(function(e){return r("svg",{role:"img","aria-hidden":a,width:"100%",height:"100%",viewBox:"0 0 20 20","aria-labelledby":e},n?r("title",{id:e},n):null,r("path",{fill:"currentColor",fillRule:"evenodd",d:"M8.684 3.744c.582-.992 2.05-.992 2.632 0l6.482 11.048c.577.984-.152 2.208-1.316 2.208H3.518c-1.164 0-1.893-1.224-1.316-2.208zM10 13a1 1 0 100 2 1 1 0 000-2zm.01-5h-.02l-.112.007c-.549.067-.955.626-.866 1.237l.428 2.238.02.095c.074.247.29.423.543.423l.091-.008a.59.59 0 00.466-.51l.428-2.238.011-.121c.025-.602-.416-1.116-.989-1.123z"}))})))};m.displayName="WarningIcon";var b={ERROR:"alert",NEUTRAL:"status",WARNING:"alert"},z={ERROR:"error",NEUTRAL:"neutral",WARNING:"warning"},R={ERROR:"colorBackgroundErrorLightest",NEUTRAL:"colorBackgroundNeutralLightest",WARNING:"colorBackgroundWarningLightest"},O={ERROR:"colorBorderErrorLight",NEUTRAL:"colorBorderNeutralLight",WARNING:"colorBorderWarningLight"},w=function(e){var o=e.children,i=e.onDismiss,t=e.variant,p=e.role,f=function(r,e){var o={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&e.indexOf(i)<0&&(o[i]=r[i]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(i=Object.getOwnPropertySymbols(r);t<i.length;t++)e.indexOf(i[t])<0&&Object.prototype.propertyIsEnumerable.call(r,i[t])&&(o[i[t]]=r[i[t]])}return o}(e,["children","onDismiss","variant","role"]);return r(l,u({},n(f),{backgroundColor:R[t.toUpperCase()],borderColor:O[t.toUpperCase()],borderBottomWidth:"borderWidth20",borderBottomStyle:"solid",paddingLeft:"space70",paddingRight:"space70",paddingTop:"space40",paddingBottom:"space40",role:null!=p?p:b[t.toUpperCase()]}),r(a,{as:"div"},r(c,{as:"div",spacing:"space40"},function(e){switch(e){case z.ERROR:return r(h,{color:"colorTextError",decorative:!1,title:"error: ",size:"sizeIcon30"});case z.WARNING:return r(m,{color:"colorTextWarning",decorative:!1,title:"warning: ",size:"sizeIcon30"});case z.NEUTRAL:default:return r(y,{color:"colorTextIcon",decorative:!1,title:"information: ",size:"sizeIcon30"})}}(t)),r(s,{as:"div"},o),i&&"function"==typeof i&&r(c,{align:"end",spacing:"space70"},r(d,{onClick:i,variant:"link",size:"reset"},r(g,{color:"colorTextIcon",decorative:!1,title:"dismiss this alert",size:"sizeIcon30"})))))};w.displayName="Alert","development"===process.env.NODE_ENV&&(w.propTypes={children:e.isRequired,onDismiss:o,role:i,variant:t(Object.keys(z).map((function(r){return z[r]}))).isRequired});export{w as Alert,R as AlertBackgroundColors,O as AlertBorderColors,b as AlertRoles,z as AlertVariants};

@@ -16,2 +16,2 @@ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("prop-types"),t=require("@twilio-paste/box"),o=require("@twilio-paste/media-object"),l=require("@twilio-paste/button"),i=require("react-uid"),n=function(){return(n=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var l in r=arguments[t])Object.prototype.hasOwnProperty.call(r,l)&&(e[l]=r[l]);return e}).apply(this,arguments)};

***************************************************************************** */
var a=function(){return(a=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var l in r=arguments[t])Object.prototype.hasOwnProperty.call(r,l)&&(e[l]=r[l]);return e}).apply(this,arguments)},c=function(r){var o=r.display,l=r.color,i=r.size,n=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 l=0;for(o=Object.getOwnPropertySymbols(e);l<o.length;l++)r.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(e,o[l])&&(t[o[l]]=e[o[l]])}return t}(r,["display","color","size"]);return e.createElement(t.Box,a({},t.safelySpreadBoxProps(n),{lineHeight:"lineHeight0",display:o,color:l,size:i}))};c.defaultProps={as:"span",display:"block",color:"currentColor",size:"sizeIcon30"},c.displayName="IconWrapper";var s=function(r){var t=r.as,o=r.display,l=r.size,n=r.color,a=r.title,s=r.decorative;if(!s&&null==a)throw new Error("[CloseIcon]: Missing a title for non-decorative icon.");return e.createElement(c,{as:t,display:o,size:l,color:n},e.createElement(i.UID,null,(function(r){return e.createElement("svg",{role:"img","aria-hidden":s,width:"100%",height:"100%",viewBox:"0 0 20 20","aria-labelledby":r},a?e.createElement("title",{id:r},a):null,e.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M15.858 4.142a.475.475 0 01.055.606l-.05.061-5.191 5.19 5.191 5.192a.469.469 0 01-.005.667.475.475 0 01-.606.055l-.061-.05L10 10.671l-5.191 5.192a.469.469 0 01-.667-.005.475.475 0 01-.055-.606l.05-.061 5.191-5.192-5.191-5.19a.469.469 0 01.005-.667.475.475 0 01.606-.055l.061.05L10 9.327l5.191-5.19a.469.469 0 01.667.005z"}))})))};s.displayName="CloseIcon";var d=function(r){var t=r.as,o=r.display,l=r.size,n=r.color,a=r.title,s=r.decorative;if(!s&&null==a)throw new Error("[ErrorIcon]: Missing a title for non-decorative icon.");return e.createElement(c,{as:t,display:o,size:l,color:n},e.createElement(i.UID,null,(function(r){return e.createElement("svg",{role:"img","aria-hidden":s,width:"100%",height:"100%",viewBox:"0 0 20 20","aria-labelledby":r},a?e.createElement("title",{id:r},a):null,e.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.247 2.517l6.236 6.236a1.764 1.764 0 010 2.494l-6.236 6.236a1.764 1.764 0 01-2.494 0l-6.236-6.236a1.764 1.764 0 010-2.494l6.236-6.236a1.764 1.764 0 012.494 0zM10 12a1 1 0 100 2 1 1 0 000-2zm.01-5h-.02c-.604 0-1.073.592-.978 1.244l.428 2.238c.04.296.278.518.557.518h.006c.279 0 .516-.222.557-.518l.428-2.238c.095-.652-.367-1.237-.978-1.244z"}))})))};d.displayName="ErrorIcon";var p=function(r){var t=r.as,o=r.display,l=r.size,n=r.color,a=r.title,s=r.decorative;if(!s&&null==a)throw new Error("[InformationIcon]: Missing a title for non-decorative icon.");return e.createElement(c,{as:t,display:o,size:l,color:n},e.createElement(i.UID,null,(function(r){return e.createElement("svg",{role:"img","aria-hidden":s,width:"100%",height:"100%",viewBox:"0 0 20 20","aria-labelledby":r},a?e.createElement("title",{id:r},a):null,e.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M10 2a8 8 0 110 16 8 8 0 010-16zm0 7c-.26.01-.528.08-.707.24-.178.158-.292.355-.292.575v3.37c0 .21.11.428.292.577.173.14.457.247.707.237.26-.008.528-.078.707-.237.178-.16.292-.355.292-.577v-3.37a.766.766 0 00-.292-.575A1.14 1.14 0 0010 9zm0-3l-.266.036c-.17.047-.318.131-.441.253l-.156.198A.958.958 0 009 6.98v.04a.728.728 0 00.086.378c.04.121.108.227.206.315.09.094.197.163.321.202.12.06.248.09.386.084l.266-.035c.17-.047.318-.131.441-.253l.156-.198A.958.958 0 0011 7.02v-.04a.728.728 0 00-.086-.378.721.721 0 00-.206-.315.757.757 0 00-.321-.202.767.767 0 00-.386-.084z"}))})))};p.displayName="InformationIcon";var u=function(r){var t=r.as,o=r.display,l=r.size,n=r.color,a=r.title,s=r.decorative;if(!s&&null==a)throw new Error("[WarningIcon]: Missing a title for non-decorative icon.");return e.createElement(c,{as:t,display:o,size:l,color:n},e.createElement(i.UID,null,(function(r){return e.createElement("svg",{role:"img","aria-hidden":s,width:"100%",height:"100%",viewBox:"0 0 20 20","aria-labelledby":r},a?e.createElement("title",{id:r},a):null,e.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8.684 3.744c.582-.992 2.05-.992 2.632 0l6.482 11.048c.577.984-.152 2.208-1.316 2.208H3.518c-1.164 0-1.893-1.224-1.316-2.208zM10 13a1 1 0 100 2 1 1 0 000-2zm.01-5h-.02l-.112.007c-.549.067-.955.626-.866 1.237l.428 2.238.02.095c.074.247.29.423.543.423l.091-.008a.59.59 0 00.466-.51l.428-2.238.011-.121c.025-.602-.416-1.116-.989-1.123z"}))})))};u.displayName="WarningIcon";var f={ERROR:"alert",NEUTRAL:"status",WARNING:"alert"},m={ERROR:"error",NEUTRAL:"neutral",WARNING:"warning"},v={ERROR:"colorBackgroundErrorLightest",NEUTRAL:"colorBackgroundNeutralLightest",WARNING:"colorBackgroundWarningLightest"},g={ERROR:"colorBorderErrorLight",NEUTRAL:"colorBorderNeutralLight",WARNING:"colorBorderWarningLight"},y=function(r){var i=r.children,a=r.onDismiss,c=r.variant,y=r.role,E=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 l=0;for(o=Object.getOwnPropertySymbols(e);l<o.length;l++)r.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(e,o[l])&&(t[o[l]]=e[o[l]])}return t}(r,["children","onDismiss","variant","role"]);return e.createElement(t.Box,n({},t.safelySpreadBoxProps(E),{backgroundColor:v[c.toUpperCase()],borderColor:g[c.toUpperCase()],borderBottomWidth:"borderWidth20",borderBottomStyle:"solid",paddingLeft:"space70",paddingRight:"space70",paddingTop:"space40",paddingBottom:"space40",role:null!=y?y:f[c.toUpperCase()]}),e.createElement(o.MediaObject,{as:"div"},e.createElement(o.MediaFigure,{as:"div",spacing:"space40"},function(r){switch(r){case m.ERROR:return e.createElement(d,{color:"colorTextError",decorative:!1,title:"error: ",size:"sizeIcon30"});case m.WARNING:return e.createElement(u,{color:"colorTextWarning",decorative:!1,title:"warning: ",size:"sizeIcon30"});case m.NEUTRAL:default:return e.createElement(p,{color:"colorTextIcon",decorative:!1,title:"information: ",size:"sizeIcon30"})}}(c)),e.createElement(o.MediaBody,{as:"div"},i),a&&"function"==typeof a&&e.createElement(o.MediaFigure,{align:"end",spacing:"space70"},e.createElement(l.Button,{onClick:a,variant:"link",size:"reset"},e.createElement(s,{color:"colorTextIcon",decorative:!1,title:"dismiss this alert",size:"sizeIcon30"})))))};y.displayName="Alert","development"===process.env.NODE_ENV&&(y.propTypes={children:r.node.isRequired,onDismiss:r.func,role:r.string,variant:r.oneOf(Object.keys(m).map((function(e){return m[e]}))).isRequired}),exports.Alert=y,exports.AlertBackgroundColors=v,exports.AlertBorderColors=g,exports.AlertRoles=f,exports.AlertVariants=m;
var a=function(){return(a=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var l in r=arguments[t])Object.prototype.hasOwnProperty.call(r,l)&&(e[l]=r[l]);return e}).apply(this,arguments)},c=function(r){var o=r.display,l=r.color,i=r.size,n=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 l=0;for(o=Object.getOwnPropertySymbols(e);l<o.length;l++)r.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(e,o[l])&&(t[o[l]]=e[o[l]])}return t}(r,["display","color","size"]);return e.createElement(t.Box,a({},t.safelySpreadBoxProps(n),{lineHeight:"lineHeight0",display:o,color:l,size:i}))};c.defaultProps={as:"span",display:"block",color:"currentColor",size:"sizeIcon30"},c.displayName="IconWrapper";var s=function(r){var t=r.as,o=r.display,l=r.size,n=r.color,a=r.title,s=r.decorative;if(!s&&null==a)throw new Error("[CloseIcon]: Missing a title for non-decorative icon.");return e.createElement(c,{as:t,display:o,size:l,color:n},e.createElement(i.UID,null,(function(r){return e.createElement("svg",{role:"img","aria-hidden":s,width:"100%",height:"100%",viewBox:"0 0 20 20","aria-labelledby":r},a?e.createElement("title",{id:r},a):null,e.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M15.16 13.514L11.645 10l3.515-3.514a1.165 1.165 0 00-1.646-1.646L10 8.355 6.486 4.84A1.165 1.165 0 004.84 6.486L8.355 10 4.84 13.514a1.165 1.165 0 001.646 1.646L10 11.645l3.514 3.515a1.165 1.165 0 001.646-1.646z"}))})))};s.displayName="CloseIcon";var d=function(r){var t=r.as,o=r.display,l=r.size,n=r.color,a=r.title,s=r.decorative;if(!s&&null==a)throw new Error("[ErrorIcon]: Missing a title for non-decorative icon.");return e.createElement(c,{as:t,display:o,size:l,color:n},e.createElement(i.UID,null,(function(r){return e.createElement("svg",{role:"img","aria-hidden":s,width:"100%",height:"100%",viewBox:"0 0 20 20","aria-labelledby":r},a?e.createElement("title",{id:r},a):null,e.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.247 2.517l6.236 6.236a1.764 1.764 0 010 2.494l-6.236 6.236a1.764 1.764 0 01-2.494 0l-6.236-6.236a1.764 1.764 0 010-2.494l6.236-6.236a1.764 1.764 0 012.494 0zM10 12a1 1 0 100 2 1 1 0 000-2zm.01-5h-.02c-.604 0-1.073.592-.978 1.244l.428 2.238c.04.296.278.518.557.518h.006c.279 0 .516-.222.557-.518l.428-2.238c.095-.652-.367-1.237-.978-1.244z"}))})))};d.displayName="ErrorIcon";var p=function(r){var t=r.as,o=r.display,l=r.size,n=r.color,a=r.title,s=r.decorative;if(!s&&null==a)throw new Error("[InformationIcon]: Missing a title for non-decorative icon.");return e.createElement(c,{as:t,display:o,size:l,color:n},e.createElement(i.UID,null,(function(r){return e.createElement("svg",{role:"img","aria-hidden":s,width:"100%",height:"100%",viewBox:"0 0 20 20","aria-labelledby":r},a?e.createElement("title",{id:r},a):null,e.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M10 2a8 8 0 110 16 8 8 0 010-16zm0 7c-.26.01-.528.08-.707.24-.178.158-.292.355-.292.575v3.37c0 .21.11.428.292.577.173.14.457.247.707.237.26-.008.528-.078.707-.237.178-.16.292-.355.292-.577v-3.37a.766.766 0 00-.292-.575A1.14 1.14 0 0010 9zm0-3l-.266.036c-.17.047-.318.131-.441.253l-.156.198A.958.958 0 009 6.98v.04a.728.728 0 00.086.378c.04.121.108.227.206.315.09.094.197.163.321.202.12.06.248.09.386.084l.266-.035c.17-.047.318-.131.441-.253l.156-.198A.958.958 0 0011 7.02v-.04a.728.728 0 00-.086-.378.721.721 0 00-.206-.315.757.757 0 00-.321-.202.767.767 0 00-.386-.084z"}))})))};p.displayName="InformationIcon";var u=function(r){var t=r.as,o=r.display,l=r.size,n=r.color,a=r.title,s=r.decorative;if(!s&&null==a)throw new Error("[WarningIcon]: Missing a title for non-decorative icon.");return e.createElement(c,{as:t,display:o,size:l,color:n},e.createElement(i.UID,null,(function(r){return e.createElement("svg",{role:"img","aria-hidden":s,width:"100%",height:"100%",viewBox:"0 0 20 20","aria-labelledby":r},a?e.createElement("title",{id:r},a):null,e.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8.684 3.744c.582-.992 2.05-.992 2.632 0l6.482 11.048c.577.984-.152 2.208-1.316 2.208H3.518c-1.164 0-1.893-1.224-1.316-2.208zM10 13a1 1 0 100 2 1 1 0 000-2zm.01-5h-.02l-.112.007c-.549.067-.955.626-.866 1.237l.428 2.238.02.095c.074.247.29.423.543.423l.091-.008a.59.59 0 00.466-.51l.428-2.238.011-.121c.025-.602-.416-1.116-.989-1.123z"}))})))};u.displayName="WarningIcon";var f={ERROR:"alert",NEUTRAL:"status",WARNING:"alert"},m={ERROR:"error",NEUTRAL:"neutral",WARNING:"warning"},v={ERROR:"colorBackgroundErrorLightest",NEUTRAL:"colorBackgroundNeutralLightest",WARNING:"colorBackgroundWarningLightest"},g={ERROR:"colorBorderErrorLight",NEUTRAL:"colorBorderNeutralLight",WARNING:"colorBorderWarningLight"},y=function(r){var i=r.children,a=r.onDismiss,c=r.variant,y=r.role,E=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 l=0;for(o=Object.getOwnPropertySymbols(e);l<o.length;l++)r.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(e,o[l])&&(t[o[l]]=e[o[l]])}return t}(r,["children","onDismiss","variant","role"]);return e.createElement(t.Box,n({},t.safelySpreadBoxProps(E),{backgroundColor:v[c.toUpperCase()],borderColor:g[c.toUpperCase()],borderBottomWidth:"borderWidth20",borderBottomStyle:"solid",paddingLeft:"space70",paddingRight:"space70",paddingTop:"space40",paddingBottom:"space40",role:null!=y?y:f[c.toUpperCase()]}),e.createElement(o.MediaObject,{as:"div"},e.createElement(o.MediaFigure,{as:"div",spacing:"space40"},function(r){switch(r){case m.ERROR:return e.createElement(d,{color:"colorTextError",decorative:!1,title:"error: ",size:"sizeIcon30"});case m.WARNING:return e.createElement(u,{color:"colorTextWarning",decorative:!1,title:"warning: ",size:"sizeIcon30"});case m.NEUTRAL:default:return e.createElement(p,{color:"colorTextIcon",decorative:!1,title:"information: ",size:"sizeIcon30"})}}(c)),e.createElement(o.MediaBody,{as:"div"},i),a&&"function"==typeof a&&e.createElement(o.MediaFigure,{align:"end",spacing:"space70"},e.createElement(l.Button,{onClick:a,variant:"link",size:"reset"},e.createElement(s,{color:"colorTextIcon",decorative:!1,title:"dismiss this alert",size:"sizeIcon30"})))))};y.displayName="Alert","development"===process.env.NODE_ENV&&(y.propTypes={children:r.node.isRequired,onDismiss:r.func,role:r.string,variant:r.oneOf(Object.keys(m).map((function(e){return m[e]}))).isRequired}),exports.Alert=y,exports.AlertBackgroundColors=v,exports.AlertBorderColors=g,exports.AlertRoles=f,exports.AlertVariants=m;
{
"name": "@twilio-paste/alert",
"version": "1.0.15",
"version": "1.0.16",
"category": "feedback",

@@ -33,7 +33,7 @@ "status": "production",

"@twilio-paste/box": "^2.10.2",
"@twilio-paste/button": "^2.3.3",
"@twilio-paste/button": "^2.3.4",
"@twilio-paste/design-tokens": "^6.3.0",
"@twilio-paste/icons": "^3.2.2",
"@twilio-paste/icons": "^3.2.3",
"@twilio-paste/media-object": "^1.2.55",
"@twilio-paste/spinner": "^2.0.10",
"@twilio-paste/spinner": "^2.0.11",
"@twilio-paste/style-props": "^1.6.2",

@@ -51,7 +51,7 @@ "@twilio-paste/styling-library": "^0.1.2",

"@twilio-paste/box": "^2.10.2",
"@twilio-paste/button": "^2.3.4",
"@twilio-paste/button": "^2.3.5",
"@twilio-paste/design-tokens": "^6.3.0",
"@twilio-paste/icons": "^3.2.3",
"@twilio-paste/icons": "^3.3.0",
"@twilio-paste/media-object": "^1.2.55",
"@twilio-paste/spinner": "^2.0.11",
"@twilio-paste/spinner": "^2.0.12",
"@twilio-paste/style-props": "^1.6.2",

@@ -62,3 +62,3 @@ "@twilio-paste/styling-library": "^0.1.2",

},
"gitHead": "8d8615eb5839e674dc4f0b2ea67020f22f0b1f1e"
"gitHead": "95317a42fb2afa1e0f35a00f2f11c83fa229d658"
}
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