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

@twilio-paste/form

Package Overview
Dependencies
Maintainers
5
Versions
142
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twilio-paste/form - npm Package Compare versions

Comparing version 1.5.21 to 1.5.22

8

CHANGELOG.md

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

## [1.5.22](https://github.com/twilio-labs/paste/compare/@twilio-paste/form@1.5.21...@twilio-paste/form@1.5.22) (2020-07-14)
**Note:** Version bump only for package @twilio-paste/form
## [1.5.21](https://github.com/twilio-labs/paste/compare/@twilio-paste/form@1.5.20...@twilio-paste/form@1.5.21) (2020-07-14)

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

4

dist/index.es.js

@@ -15,3 +15,3 @@ import e,{createElement as r,forwardRef as o,Children as i,isValidElement as n,cloneElement as t,Fragment as a}from"react";import l,{string as d,oneOf as s,bool as c,func as p,node as u,oneOfType as h}from"prop-types";import{styled as b,css as f,system as g,compose as m,display as y,size as v}from"@twilio-paste/styling-library";import{Box as x,safelySpreadBoxProps as k}from"@twilio-paste/box";import{Flex as w}from"@twilio-paste/flex";import{Text as E,safelySpreadTextProps as R}from"@twilio-paste/text";import{ScreenReaderOnly as T}from"@twilio-paste/screen-reader-only";import{UID as S,useUID as C}from"react-uid";

and limitations under the License.
***************************************************************************** */var B=function(){return(B=Object.assign||function(e){for(var r,o=1,i=arguments.length;o<i;o++)for(var n in r=arguments[o])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e}).apply(this,arguments)};function z(e,r){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(o[i[n]]=e[i[n]])}return o}var N=b(E)(f({display:"block",width:"4px",height:"4px",marginRight:"space20",backgroundColor:"colorBackgroundRequired",borderRadius:"50%",cursor:"pointer"})),O=function(e){var o=e.as,i=e.marginBottom,n=e.required,t=e.disabled,a=e.children,l=z(e,["as","marginBottom","required","disabled","children"]);return r(x,B({},k(l),{as:o,borderBottomWidth:"borderWidth0",display:"block",marginBottom:i||"space10",paddingLeft:"space0",paddingRight:"space0",textTransform:"none"}),r(w,{as:"span",vAlignContent:"center"},n?r(N,{as:"span",lineHeight:"lineHeight30"},r(T,null,"Required: ")):null,r(E,{as:"span",fontSize:"fontSize30",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight30",color:t?"colorTextWeak":"colorText",cursor:t?"not-allowed":"pointer"},a)))};O.displayName="FormLabel",O.defaultProps={as:"label"},"development"===process.env.NODE_ENV&&(O.propTypes={htmlFor:d,as:s(["label","legend"]),disabled:c,required:c,marginBottom:s(["space0"])});var _=function(e){var o=e.disabled,i=e.hasError,n=e.readOnly,t=e.children,a=e.type,l="shadowBorder",d="shadowBorderPrimaryDark";return o?(l="shadowBorderLight",d="shadowBorderLight"):n?d="shadowBorder":i?(l="shadowBorderError",d="shadowBorderErrorDark"):"hidden"===a&&(l=null),r(x,{display:"flex",width:"100%",backgroundColor:n||o?"colorBackground":"colorBackgroundBody",boxShadow:l,borderRadius:"borderRadius20",transition:"box-shadow 100ms ease-in",cursor:o?"not-allowed":"text",_hover:{boxShadow:d},_focusWithin:{boxShadow:"shadowFocus"},_active:{boxShadow:o?"shadowBorderLight":"shadowBorderPrimaryDarker"}},t)};_.displayName="FieldWrapper","development"===process.env.NODE_ENV&&(_.propTypes={disabled:c,hasError:c,readOnly:c});var A=function(e){var o=e.children;return null==o?null:r(x,{display:"flex",alignItems:"flex-start",backgroundColor:"colorBackground",padding:"space30",borderRightWidth:"borderWidth10",borderRightColor:"colorBorderLight",borderRightStyle:"solid",borderTopLeftRadius:"borderRadius20",borderBottomLeftRadius:"borderRadius20"},o)};A.displayName="Prefix";var q=function(e){var o=e.children;return null==o?null:r(x,{display:"flex",alignItems:"flex-start",backgroundColor:"colorBackground",padding:"space30",borderLeftWidth:"borderWidth10",borderLeftColor:"colorBorderLight",borderLeftStyle:"solid",borderTopRightRadius:"borderRadius20",borderBottomRightRadius:"borderRadius20"},o)};q.displayName="Suffix";var D=["className","style","size","height","width"],W=function(e){return Object.keys(e).reduce((function(r,o){return D.includes(o)||(r[o]=e[o]),r}),{})},L=b.input(f({appearance:"none",border:"none",background:"transparent",outline:"none",resize:"none",display:"block",width:"100%",fontFamily:"inherit",fontSize:"fontSize30",lineHeight:"lineHeight30",fontWeight:"fontWeightNormal",color:"colorText",paddingTop:"space30",paddingRight:"space40",paddingBottom:"space30",paddingLeft:"space40",borderRadius:"borderRadius20",boxShadow:"none","&::placeholder":{color:"colorTextWeak",fontStyle:"italic"},"&:disabled":{cursor:"not-allowed",color:"colorTextWeak"}})),H=o((function(e,o){var i=e.id,n=e.type,t=e.name,a=e.value,l=e.placeholder,d=e.disabled,s=e.readOnly,c=e.required,p=e.hasError,u=e.insertBefore,h=e.insertAfter,b=z(e,["id","type","name","value","placeholder","disabled","readOnly","required","hasError","insertBefore","insertAfter"]),f={type:n};return"number"===n&&(f.type="text",f.inputmode="numeric",f.pattern="[0-9]*"),r(_,{type:n,readOnly:s,disabled:d,hasError:p},u&&r(A,null,u),r(L,B({"aria-invalid":p,"aria-readonly":s},W(b),f,{ref:o,id:i,name:t,value:a,placeholder:l,disabled:d,readOnly:s,required:c})),h&&r(q,null,h))}));H.displayName="FormInput","development"===process.env.NODE_ENV&&(H.propTypes={id:d.isRequired,type:s(["text","email","hidden","number","password","search","tel"]).isRequired,name:d,value:d.isRequired,placeholder:d,disabled:c,readOnly:c,required:c,hasError:c,onChange:p,onFocus:p,onBlur:p});var F=g({iconColor:{property:"color",scale:"textColors"}}),P=b.span(m(y,F,v));P.defaultProps={display:"inline-flex",iconColor:"currentColor",size:"sizeIcon30"},P.displayName="IconWrapper";var I=function(e){var o=e.as,i=e.display,n=e.size,t=e.iconColor,a=e.title,l=e.decorative;if(!l&&null==a)throw new Error("[ErrorIcon]: Missing a title for non-decorative icon.");return r(P,{as:o,display:i,size:n,iconColor:t},r(S,null,(function(e){return r("svg",{role:"img","aria-hidden":l,"aria-labelledby":e,width:"100%",height:"100%",viewBox:"0 0 24 24"},a?r("title",{id:e},a):null,r("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.247 4.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 0zM12 14a1 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"}))})))};I.displayName="ErrorIcon";var V={ERROR:"error"},j=function(e){var o=e.marginTop,i=e.children,n=e.variant,t=z(e,["marginTop","children","variant"]),a=null;switch(n){case V.ERROR:a=r(I,{iconColor:"colorTextError",decorative:!0})}return r(w,{vAlignContent:"center",marginTop:o||"space20"},a,r(E,B({},R(t),{as:"div",fontSize:"fontSize30",lineHeight:"lineHeight30",color:"error"===n?"colorTextError":"colorTextWeak",marginLeft:a?"space20":void 0}),i))};j.displayName="FormHelpText","development"===process.env.NODE_ENV&&(j.propTypes={marginTop:s(["space0"])});var M="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Y(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function X(e,r){return e(r={exports:{}},r.exports),r.exports}var G=X((function(e,r){
***************************************************************************** */var B=function(){return(B=Object.assign||function(e){for(var r,o=1,i=arguments.length;o<i;o++)for(var n in r=arguments[o])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e}).apply(this,arguments)};function z(e,r){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(o[i[n]]=e[i[n]])}return o}var N=b(E)(f({display:"block",width:"4px",height:"4px",marginRight:"space20",backgroundColor:"colorBackgroundRequired",borderRadius:"50%",cursor:"pointer"})),O=function(e){var o=e.as,i=e.marginBottom,n=e.required,t=e.disabled,a=e.children,l=z(e,["as","marginBottom","required","disabled","children"]);return r(x,B({},k(l),{as:o,borderBottomWidth:"borderWidth0",display:"block",marginBottom:i||"space10",paddingLeft:"space0",paddingRight:"space0",textTransform:"none"}),r(w,{as:"span",vAlignContent:"center"},n?r(N,{as:"span",lineHeight:"lineHeight30"},r(T,null,"Required: ")):null,r(E,{as:"span",fontSize:"fontSize30",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight30",color:t?"colorTextWeak":"colorText",cursor:t?"not-allowed":"pointer"},a)))};O.displayName="FormLabel",O.defaultProps={as:"label"},"development"===process.env.NODE_ENV&&(O.propTypes={htmlFor:d,as:s(["label","legend"]),disabled:c,required:c,marginBottom:s(["space0"])});var _=function(e){var o=e.disabled,i=e.hasError,n=e.readOnly,t=e.children,a=e.type,l="shadowBorder",d="shadowBorderPrimaryDark";return o?(l="shadowBorderLight",d="shadowBorderLight"):n?d="shadowBorder":i?(l="shadowBorderError",d="shadowBorderErrorDark"):"hidden"===a&&(l=null),r(x,{display:"flex",width:"100%",backgroundColor:n||o?"colorBackground":"colorBackgroundBody",boxShadow:l,borderRadius:"borderRadius20",transition:"box-shadow 100ms ease-in",cursor:o?"not-allowed":"text",_hover:{boxShadow:d},_focusWithin:{boxShadow:"shadowFocus"},_active:{boxShadow:o?"shadowBorderLight":"shadowBorderPrimaryDarker"}},t)};_.displayName="FieldWrapper","development"===process.env.NODE_ENV&&(_.propTypes={disabled:c,hasError:c,readOnly:c});var A=function(e){var o=e.children;return null==o?null:r(x,{display:"flex",alignItems:"flex-start",backgroundColor:"colorBackground",padding:"space30",borderRightWidth:"borderWidth10",borderRightColor:"colorBorderLighter",borderRightStyle:"solid",borderTopLeftRadius:"borderRadius20",borderBottomLeftRadius:"borderRadius20"},o)};A.displayName="Prefix";var q=function(e){var o=e.children;return null==o?null:r(x,{display:"flex",alignItems:"flex-start",backgroundColor:"colorBackground",padding:"space30",borderLeftWidth:"borderWidth10",borderLeftColor:"colorBorderLighter",borderLeftStyle:"solid",borderTopRightRadius:"borderRadius20",borderBottomRightRadius:"borderRadius20"},o)};q.displayName="Suffix";var D=["className","style","size","height","width"],W=function(e){return Object.keys(e).reduce((function(r,o){return D.includes(o)||(r[o]=e[o]),r}),{})},L=b.input(f({appearance:"none",border:"none",background:"transparent",outline:"none",resize:"none",display:"block",width:"100%",fontFamily:"inherit",fontSize:"fontSize30",lineHeight:"lineHeight30",fontWeight:"fontWeightNormal",color:"colorText",paddingTop:"space30",paddingRight:"space40",paddingBottom:"space30",paddingLeft:"space40",borderRadius:"borderRadius20",boxShadow:"none","&::placeholder":{color:"colorTextWeak",fontStyle:"italic"},"&:disabled":{cursor:"not-allowed",color:"colorTextWeak"}})),H=o((function(e,o){var i=e.id,n=e.type,t=e.name,a=e.value,l=e.placeholder,d=e.disabled,s=e.readOnly,c=e.required,p=e.hasError,u=e.insertBefore,h=e.insertAfter,b=z(e,["id","type","name","value","placeholder","disabled","readOnly","required","hasError","insertBefore","insertAfter"]),f={type:n};return"number"===n&&(f.type="text",f.inputmode="numeric",f.pattern="[0-9]*"),r(_,{type:n,readOnly:s,disabled:d,hasError:p},u&&r(A,null,u),r(L,B({"aria-invalid":p,"aria-readonly":s},W(b),f,{ref:o,id:i,name:t,value:a,placeholder:l,disabled:d,readOnly:s,required:c})),h&&r(q,null,h))}));H.displayName="FormInput","development"===process.env.NODE_ENV&&(H.propTypes={id:d.isRequired,type:s(["text","email","hidden","number","password","search","tel"]).isRequired,name:d,value:d.isRequired,placeholder:d,disabled:c,readOnly:c,required:c,hasError:c,onChange:p,onFocus:p,onBlur:p});var F=g({iconColor:{property:"color",scale:"textColors"}}),P=b.span(m(y,F,v));P.defaultProps={display:"inline-flex",iconColor:"currentColor",size:"sizeIcon30"},P.displayName="IconWrapper";var I=function(e){var o=e.as,i=e.display,n=e.size,t=e.iconColor,a=e.title,l=e.decorative;if(!l&&null==a)throw new Error("[ErrorIcon]: Missing a title for non-decorative icon.");return r(P,{as:o,display:i,size:n,iconColor:t},r(S,null,(function(e){return r("svg",{role:"img","aria-hidden":l,"aria-labelledby":e,width:"100%",height:"100%",viewBox:"0 0 24 24"},a?r("title",{id:e},a):null,r("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.247 4.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 0zM12 14a1 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"}))})))};I.displayName="ErrorIcon";var V={ERROR:"error"},j=function(e){var o=e.marginTop,i=e.children,n=e.variant,t=z(e,["marginTop","children","variant"]),a=null;switch(n){case V.ERROR:a=r(I,{iconColor:"colorTextError",decorative:!0})}return r(w,{vAlignContent:"center",marginTop:o||"space20"},a,r(E,B({},R(t),{as:"div",fontSize:"fontSize30",lineHeight:"lineHeight30",color:"error"===n?"colorTextError":"colorTextWeak",marginLeft:a?"space20":void 0}),i))};j.displayName="FormHelpText","development"===process.env.NODE_ENV&&(j.propTypes={marginTop:s(["space0"])});var M="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Y(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function X(e,r){return e(r={exports:{}},r.exports),r.exports}var G=X((function(e,r){
/*!

@@ -22,2 +22,2 @@ autosize 4.0.2

*/
!function(e,r){var o,i,n="function"==typeof Map?new Map:(o=[],i=[],{has:function(e){return o.indexOf(e)>-1},get:function(e){return i[o.indexOf(e)]},set:function(e,r){-1===o.indexOf(e)&&(o.push(e),i.push(r))},delete:function(e){var r=o.indexOf(e);r>-1&&(o.splice(r,1),i.splice(r,1))}}),t=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){t=function(e){var r=document.createEvent("Event");return r.initEvent(e,!0,!1),r}}function a(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!n.has(e)){var r,o=null,i=null,a=null,l=function(){e.clientWidth!==i&&p()},d=function(r){window.removeEventListener("resize",l,!1),e.removeEventListener("input",p,!1),e.removeEventListener("keyup",p,!1),e.removeEventListener("autosize:destroy",d,!1),e.removeEventListener("autosize:update",p,!1),Object.keys(r).forEach((function(o){e.style[o]=r[o]})),n.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",d,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",p,!1),window.addEventListener("resize",l,!1),e.addEventListener("input",p,!1),e.addEventListener("autosize:update",p,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",n.set(e,{destroy:d,update:p}),"vertical"===(r=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===r.resize&&(e.style.resize="horizontal"),o="content-box"===r.boxSizing?-(parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)):parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),isNaN(o)&&(o=0),p()}function s(r){var o=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=o,e.style.overflowY=r}function c(){if(0!==e.scrollHeight){var r=function(e){for(var r=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&r.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return r}(e),n=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+o+"px",i=e.clientWidth,r.forEach((function(e){e.node.scrollTop=e.scrollTop})),n&&(document.documentElement.scrollTop=n)}}function p(){c();var r=Math.round(parseFloat(e.style.height)),o=window.getComputedStyle(e,null),i="content-box"===o.boxSizing?Math.round(parseFloat(o.height)):e.offsetHeight;if(i<r?"hidden"===o.overflowY&&(s("scroll"),c(),i="content-box"===o.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==o.overflowY&&(s("hidden"),c(),i="content-box"===o.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),a!==i){a=i;var n=t("autosize:resized");try{e.dispatchEvent(n)}catch(e){}}}}function l(e){var r=n.get(e);r&&r.destroy()}function d(e){var r=n.get(e);r&&r.update()}var s=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((s=function(e){return e}).destroy=function(e){return e},s.update=function(e){return e}):((s=function(e,r){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return a(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e},s.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],d),e}),r.default=s,e.exports=r.default}(e,r)})),U=function(e,r,o){return((o=window.getComputedStyle)?o(e):e.currentStyle)[r.replace(/-(\w)/gi,(function(e,r){return r.toUpperCase()}))]};var J=function(e){var r=U(e,"line-height"),o=parseFloat(r,10);if(r===o+""){var i=e.style.lineHeight;e.style.lineHeight=r+"em",r=U(e,"line-height"),o=parseFloat(r,10),i?e.style.lineHeight=i:delete e.style.lineHeight}if(-1!==r.indexOf("pt")?(o*=4,o/=3):-1!==r.indexOf("mm")?(o*=96,o/=25.4):-1!==r.indexOf("cm")?(o*=96,o/=2.54):-1!==r.indexOf("in")?o*=96:-1!==r.indexOf("pc")&&(o*=16),o=Math.round(o),"normal"===r){var n=e.nodeName,t=document.createElement(n);t.innerHTML="&nbsp;","TEXTAREA"===n.toUpperCase()&&t.setAttribute("rows","1");var a=U(e,"font-size");t.style.fontSize=a,t.style.padding="0px",t.style.border="0px";var l=document.body;l.appendChild(t),o=t.offsetHeight,l.removeChild(t)}return o},K=X((function(r,o){var i,n=M&&M.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)r.hasOwnProperty(o)&&(e[o]=r[o])},function(e,r){function o(){this.constructor=e}i(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}),t=M&&M.__assign||Object.assign||function(e){for(var r,o=1,i=arguments.length;o<i;o++)for(var n in r=arguments[o])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},a=M&&M.__rest||function(e,r){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)r.indexOf(i[n])<0&&(o[i[n]]=e[i[n]])}return o};o.__esModule=!0;var d=J,s=function(r){function o(){var o=null!==r&&r.apply(this,arguments)||this;return o.state={lineHeight:null},o.textarea=o.props.innerRef||e.createRef(),o.onResize=function(e){o.props.onResize&&o.props.onResize(e)},o.updateLineHeight=function(){o.textarea.current&&o.setState({lineHeight:d(o.textarea.current)})},o.onChange=function(e){var r=o.props.onChange;o.currentValue=e.currentTarget.value,r&&r(e)},o}return n(o,r),o.prototype.componentDidMount=function(){var e=this,r=this.props,o=r.maxRows,i=r.async;"number"==typeof o&&this.updateLineHeight(),"number"==typeof o||i?setTimeout((function(){return e.textarea.current&&G(e.textarea.current)})):this.textarea.current&&G(this.textarea.current),this.textarea.current&&this.textarea.current.addEventListener("autosize:resized",this.onResize)},o.prototype.componentWillUnmount=function(){this.textarea.current&&(this.textarea.current.removeEventListener("autosize:resized",this.onResize),G.destroy(this.textarea.current))},o.prototype.render=function(){var r=this.props,o=(r.onResize,r.maxRows),i=(r.onChange,r.style),n=(r.innerRef,r.children),l=a(r,["onResize","maxRows","onChange","style","innerRef","children"]),d=this.state.lineHeight,s=o&&d?d*o:null;return e.createElement("textarea",t({},l,{onChange:this.onChange,style:s?t({},i,{maxHeight:s}):i,ref:this.textarea}),n)},o.prototype.componentDidUpdate=function(){this.textarea.current&&G.update(this.textarea.current)},o.defaultProps={rows:1,async:!1},o.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.object,async:l.bool},o}(e.Component);o.TextareaAutosize=e.forwardRef((function(r,o){return e.createElement(s,t({},r,{innerRef:o}))}))}));Y(K);K.TextareaAutosize;var Q=b(Y(X((function(e,r){r.__esModule=!0,r.default=K.TextareaAutosize}))))((function(){return f({appearance:"none",border:"none",background:"transparent",outline:"none",display:"block",width:"100%",maxHeight:"size30",fontFamily:"inherit",fontSize:"fontSize30",lineHeight:"lineHeight30",fontWeight:"fontWeightNormal",color:"colorText",paddingTop:"space30",paddingRight:"space40",paddingBottom:"space30",paddingLeft:"space40",borderRadius:"borderRadius20",resize:"vertical",boxShadow:"none","&::placeholder":{color:"colorTextWeak",fontStyle:"italic"},"&:disabled":{cursor:"not-allowed",color:"colorTextWeak"}})})),Z=o((function(e,o){var i=e.id,n=e.name,t=e.placeholder,a=e.children,l=e.readOnly,d=e.disabled,s=e.hasError,c=e.insertBefore,p=e.insertAfter,u=z(e,["id","name","placeholder","children","readOnly","disabled","hasError","insertBefore","insertAfter"]);return r(_,{readOnly:l,disabled:d,hasError:s},c&&r(A,null,c),r(Q,B({"aria-invalid":s,"aria-readonly":l},W(u),{async:!0,ref:o,id:i,name:n,rows:3,placeholder:t,disabled:d,readOnly:l,spellCheck:!0}),a),p&&r(q,null,p))}));Z.displayName="FormTextArea","development"===process.env.NODE_ENV&&(Z.propTypes={id:d.isRequired,name:d,placeholder:d,disabled:c,readOnly:c,required:c,hasError:c,onChange:p.isRequired,onFocus:p,onBlur:p});var $=b(x)((function(e){var r,o=e._activeSibling,i=e._boxChild,n=e._checkedAndActiveSibling,t=e._checkedAndDisabledSibling,a=e._checkedAndFocusSibling,l=e._checkedAndHoverSibling,d=e._checkedAndInvalidSibling,s=e._checkedAndInvalidAndHoverSibling,c=e._checkedSibling,p=e._checkedSiblingAndBoxChild,u=e._disabledSibling,h=e._focusSibling,b=e._hoverSibling,g=e._invalidSibling,m=e._invalidAndHoverSibling,y=e.type,v=void 0===y?"checkbox":y,x="input[type="+v+"]:checked + label &, input[type="+v+"][aria-checked=mixed] + label &",k="input[type="+v+"]:checked:active + label &, input[type="+v+"][aria-checked=mixed]:active + label &",w="input[type="+v+"]:checked + label & > *, input[type="+v+"][aria-checked=mixed] + label & > *",E="input[type="+v+"]:checked:disabled + label &, input[type="+v+"][aria-checked=mixed]:disabled + label &",R="input[type="+v+"]:checked:focus + label &, input[type="+v+"][aria-checked=mixed]:focus + label &",T="input[type="+v+"]:checked:hover:not(:disabled) + label &, input[type="+v+"][aria-checked=mixed]:hover:not(:disabled) + label &",S="input[type="+v+"][aria-invalid=true]:checked + label &",C="input[type="+v+"][aria-invalid=true]:checked:hover:not(:disabled) + label &",B="input[type="+v+"] + label & > *",z="input[type="+v+"]:disabled + label &",N="input[type="+v+"]:focus + label &",O="input[type="+v+"]:hover:not(:disabled):not(:checked) + label &",_="input[type="+v+"][aria-invalid=true] + label &",A="input[type="+v+"][aria-invalid=true]:hover:not(:disabled) + label &";return f(((r={})["input[type="+v+"]:active + label &"]=o,r[x]=c,r[k]=n,r[w]=p,r[E]=t,r[R]=a,r[T]=l,r[S]=d,r[C]=s,r[B]=i,r[z]=u,r[N]=h,r[O]=b,r[_]=g,r[A]=m,r))}));$.displayName="SiblingBox",$.defaultProps={alignItems:"center","aria-hidden":"true",display:"inline-flex",flexShrink:0,justifyContent:"center",transition:"all 120ms"},"development"===process.env.NODE_ENV&&($.propTypes={type:s(["checkbox","radio"])});var ee=function(e){var o=e.children,i=e.disabled,n=z(e,["children","disabled"]);return r($,B({as:"span",display:"flex",backgroundColor:"colorBackgroundBody",borderColor:"colorBorder",borderStyle:"solid",borderWidth:"borderWidth10",height:"sizeSquare50",margin:"space20",width:"sizeSquare50",_hoverSibling:{borderColor:"colorBorderPrimaryDark"},_focusSibling:{borderColor:"colorBorderPrimaryDark",boxShadow:"shadowFocus"},_activeSibling:i?void 0:{borderColor:"colorBorderPrimaryDarker",backgroundColor:"colorBackgroundPrimaryDarker"},_checkedSibling:{borderColor:"colorBorderPrimary",backgroundColor:"colorBackgroundPrimary"},_disabledSibling:{borderColor:"colorBorderLight"},_invalidSibling:{borderColor:"colorBorderError"},_invalidAndHoverSibling:{borderColor:"colorBorderErrorDark"},_checkedAndHoverSibling:{borderColor:"colorBorderPrimaryDarker",backgroundColor:"colorBackgroundPrimaryDark"},_checkedAndFocusSibling:{borderColor:"colorBorderPrimaryDarker",backgroundColor:"colorBackgroundPrimaryDark"},_checkedAndActiveSibling:i?void 0:{borderColor:"colorBorderPrimaryDarker",backgroundColor:"colorBackgroundPrimaryDarker"},_checkedAndDisabledSibling:{borderColor:"colorBorderLight",backgroundColor:"colorBackgroundDark"},_checkedAndInvalidSibling:{borderColor:"colorBorderError",backgroundColor:"colorBackgroundError"},_checkedAndInvalidAndHoverSibling:{borderColor:"colorBorderErrorDark",backgroundColor:"colorBackgroundErrorDark"}},n),o)};ee.displayName="BaseRadioCheckboxControl","development"===process.env.NODE_ENV&&(ee.propTypes={children:u.isRequired,disabled:c});var re=function(e){var o=e.children,i=z(e,["children"]);return r(O,B({},i,{marginBottom:"space0"}),r(x,{as:"span",display:"flex"},o))};re.displayName="BaseRadioCheckboxLabel","development"===process.env.NODE_ENV&&(re.propTypes={children:u.isRequired});var oe=function(e){var o=e.children,i=z(e,["children"]);return r(E,B({as:"span",color:"currentColor",marginLeft:"space20",fontWeight:"fontWeightNormal"},i),o)};oe.displayName="BaseRadioCheckboxLabelText","development"===process.env.NODE_ENV&&(oe.propTypes={children:u.isRequired});var ie=function(e){var o=e.children,i=e.helpTextId;return r(x,{as:"span",display:"block",marginLeft:"space80"},r(j,{id:i,marginTop:"space0"},o))};ie.displayName="BaseRadioCheckboxHelpText","development"===process.env.NODE_ENV&&(ie.propTypes={children:u.isRequired,helpTextId:d.isRequired});var ne=b.input(f({border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",textTransform:"none",whiteSpace:"nowrap",width:"1px"})),te=o((function(e,o){var i=e.id,n=e.disabled,t=e.checked,a=e.hasError,l=e.children,d=e.helpText,s=z(e,["id","disabled","checked","hasError","children","helpText"]),c=C();return r(x,{alignItems:"flex-start",display:"inline-flex",flexDirection:"column",verticalAlign:"top"},r(ne,B({},s,{"aria-describedby":c,"aria-invalid":a,checked:t,disabled:n,id:i,ref:o,type:"radio"})),r(re,{disabled:n,htmlFor:i},r(ee,{borderRadius:"borderRadiusCircle",disabled:n,type:"radio"},r(x,{as:"span",backgroundColor:n&&t?"colorBackgroundDarkest":"colorBackgroundBody",borderRadius:"borderRadiusCircle",height:"sizeSquare25",width:"sizeSquare25"})),r(oe,null,l)),d&&r(ie,{helpTextId:c},d))}));te.displayName="Radio","development"===process.env.NODE_ENV&&(te.propTypes={children:u.isRequired,hasError:c,helpText:h([d,u]),id:d.isRequired,value:d.isRequired});var ae=function(e){var o=e.children,n=e.disabled,t=e.errorText,a=e.helpText,l=e.legend,d=e.orientation,s=e.required,c=(e.value,z(e,["children","disabled","errorText","helpText","legend","orientation","required","value"]));return r(x,B({},k(c),{as:"fieldset",margin:"space0",padding:"space0",borderWidth:"borderWidth0"}),r(O,{as:"legend",htmlFor:void 0,required:s,marginBottom:"space0",disabled:n},l),a&&r(j,{marginTop:"space0"},a),r(x,{marginLeft:"space20",marginRight:"space20",marginTop:"space30"},i.map(o,(function(e){return r(x,{display:"horizontal"===d?"inline-block":"block",marginBottom:"space30",marginRight:"horizontal"===d?"space70":null},e)})),t&&r(j,{marginTop:"space0",variant:"error"},t)))};ae.displayName="InlineControlGroup",ae.defaultProps={orientation:"vertical"},"development"===process.env.NODE_ENV&&(ae.propTypes={children:u.isRequired,disabled:c,errorText:h([d,u]),helpText:h([d,u]),legend:h([d,u]).isRequired,name:d.isRequired,orientation:s(["vertical","horizontal"]),required:c,value:d});var le=function(e){var o=e.onChange,a=e.children,l=e.errorText,d=e.name,s=e.value,c=e.disabled,p=z(e,["onChange","children","errorText","name","value","disabled"]);return r(ae,B({},p,{disabled:c,errorText:l,name:d}),i.map(a,(function(e){return n(e)?t(e,{checked:e.props.value===s,disabled:c,hasError:null!=l,name:d,onChange:function(e){null!=o&&o(e.target.value)}}):e})))};le.displayName="RadioGroup","development"===process.env.NODE_ENV&&(le.propTypes={name:d,onChange:p.isRequired});var de=b.input({border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",textTransform:"none",whiteSpace:"nowrap",width:"1px"}),se=o((function(e,o){var i=e.id,n=e.checked,t=e.children,a=e.helpText,l=e.disabled,d=e.hasError,s=e.indeterminate,c=e.isSelectAllChild,p=e.isSelectAll,u=z(e,["id","checked","children","helpText","disabled","hasError","indeterminate","isSelectAllChild","isSelectAll"]),h=C(),b=null;p&&(b="colorBackground"),(p&&n||p&&s)&&(b="colorBackgroundPrimaryLightest");var f=p?"space20":null;return c&&(f="space30"),r(x,{backgroundColor:b,borderRadius:p?"borderRadius10":null,display:"inline-flex",flexDirection:"column",padding:p?"space30":null,paddingBottom:p?"space20":null,paddingLeft:f,paddingRight:c?"space30":null,paddingTop:p?"space20":null},r(de,B({},u,{"aria-describedby":h,"aria-checked":s?"mixed":n,"aria-invalid":d,checked:n,disabled:l,id:i,ref:o,type:"checkbox"})),r(re,{disabled:l,htmlFor:i},r(ee,{alignItems:"center",borderRadius:"borderRadius10",disabled:l,display:"flex",position:"relative",type:"checkbox"},r(x,{alignItems:"center",as:"span",display:"flex",height:s?void 0:"sizeSquare25",position:"absolute",top:s?void 0:"3px",transform:s?void 0:"rotate(-45deg)",width:"sizeSquare30",_before:s?void 0:{borderColor:l&&n?"colorBorderDark":"colorBorderInverse",borderRadius:"borderRadius10",borderStyle:"solid",borderWidth:"borderWidth10",bottom:"0",content:'""',display:"block",height:"sizeSquare25",position:"absolute",width:"size0"},_after:{borderColor:l&&n?"colorBorderDark":"colorBorderInverse",borderRadius:"borderRadius10",borderStyle:"solid",borderWidth:"borderWidth10",bottom:"0",content:'""',display:"block",height:"size0",position:s?void 0:"absolute",width:"sizeSquare30"}})),r(oe,{fontWeight:p?null:"fontWeightNormal"},t)),a&&r(ie,{helpTextId:h},a))}));se.displayName="Checkbox","development"===process.env.NODE_ENV&&(se.propTypes={children:u.isRequired,hasError:c,helpText:h([d,u]),id:d.isRequired,indeterminate:c,isSelectAll:c,isSelectAllChild:c,value:d.isRequired});var ce=function(e){var o=e.children,a=e.disabled,l=e.errorText,d=e.isSelectAll,s=e.name,c=e.orientation,p=void 0===c?"vertical":c,u=z(e,["children","disabled","errorText","isSelectAll","name","orientation"]);return r(ae,B({},u,{errorText:l,name:s,disabled:a,orientation:p}),i.map(o,(function(e,r){return n(e)?t(e,{disabled:a,hasError:!!l||void 0,isSelectAll:d&&0===r,isSelectAllChild:d&&"vertical"===p&&0!==r,name:s}):e})))};ce.displayName="CheckboxGroup","development"===process.env.NODE_ENV&&(ce.propTypes={isSelectAll:c,name:d});var pe=function(e){var o=e.children,i=e.errorText,n=z(e,["children","errorText"]);return r(a,null,r(x,{backgroundColor:"colorBackground",borderRadius:"borderRadius20",padding:"space50"},r(se,B({},n,{hasError:null!=i}),o)),i&&r(x,{marginTop:"space30",marginLeft:"space50"},r(j,{variant:"error"},i)))};pe.displayName="CheckboxDisclaimer","development"===process.env.NODE_ENV&&(pe.propTypes={children:u.isRequired,errorText:h([d,u])});var ue=function(e){var o=e.as,i=e.display,n=e.size,t=e.iconColor,a=e.title,l=e.decorative;if(!l&&null==a)throw new Error("[ChevronDownIcon]: Missing a title for non-decorative icon.");return r(P,{as:o,display:i,size:n,iconColor:t},r(S,null,(function(e){return r("svg",{role:"img","aria-hidden":l,"aria-labelledby":e,width:"100%",height:"100%",viewBox:"0 0 24 24"},a?r("title",{id:e},a):null,r("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.128 10.166a.5.5 0 01.798.596l-.054.072-4.5 5a.5.5 0 01-.672.066l-.072-.066-4.5-5a.5.5 0 01.678-.73l.066.062L12 14.752l4.128-4.586z"}))})))};ue.displayName="ChevronDownIcon";var he={className:void 0,size:void 0,style:void 0,height:void 0,width:void 0},be=function(e){var o=e.children;return r(x,{alignItems:"center",display:"inline-flex",position:"absolute",pointerEvents:"none",right:"space30",top:"50%",transform:"translateY(-50%)",zIndex:"zIndex10"},o)},fe=b.select(f({appearance:"none",border:"none",background:"transparent",outline:"none",resize:"none",display:"block",width:"100%",fontFamily:"inherit",fontSize:"fontSize30",lineHeight:"lineHeight30",fontWeight:"fontWeightNormal",color:"colorText",paddingTop:"space30",paddingRight:"space100",paddingBottom:"space30",paddingLeft:"space40",borderRadius:"borderRadius20",boxShadow:"none",cursor:"pointer","&:disabled":{cursor:"not-allowed",color:"colorTextWeak"}})),ge=o((function(e,o){var i=e.disabled,n=e.hasError,t=e.insertBefore,a=e.insertAfter,l=e.children,d=e.size,s=e.multiple,c=z(e,["disabled","hasError","insertBefore","insertAfter","children","size","multiple"]);return r(_,{disabled:i,hasError:n},t&&r(A,null,t),r(x,{display:"flex",width:"100%",position:"relative"},r(fe,B({"aria-invalid":n,ref:o,multiple:s,disabled:i},c,he,{size:s?d:0,"data-not-selectize":"true"}),l),!s&&r(be,null,r(ue,{size:"sizeIcon30",decorative:!0,"aria-hidden":"true"}))),a&&r(q,null,a))}));ge.displayName="Select","development"===process.env.NODE_ENV&&(ge.propTypes={id:d.isRequired,hasError:c,onChange:p.isRequired});var me=B(B({},he),{selected:void 0}),ye=b.option(f({background:"transparent",color:"colorText",fontFamily:"fontFamilyText",lineHeight:"lineHeight50",paddingTop:"space30",paddingBottom:"space30",paddingLeft:"space20"})),ve=o((function(e,o){var i=e.children,n=z(e,["children"]);return n.selected&&console.warn('"selected" is a blocked prop on this component, please use "value" on the select element.'),r(ye,B({ref:o},n,me),i)}));ve.displayName="Option","development"===process.env.NODE_ENV&&(ve.propTypes={value:d.isRequired,children:u.isRequired});var xe=b.optgroup(f({background:"transparent",color:"colorText",fontFamily:"fontFamilyText",fontWeight:"fontWeightMedium",fontStyle:"normal",margin:"space20"})),ke=o((function(e,o){var i=e.label,n=e.children,t=z(e,["label","children"]);return r(xe,B({ref:o,label:i},t,he),n)}));ke.displayName="OptionGroup","development"===process.env.NODE_ENV&&(ke.propTypes={label:d.isRequired,children:u.isRequired});var we=function(e){var o=e.children,i=e.disabled,n=e.hasError,t=e.insertAfter,a=e.insertBefore,l=e.type,d=z(e,["children","disabled","hasError","insertAfter","insertBefore","type"]);return r(_,B({disabled:i,hasError:n,type:l},d,he),a&&r(A,null,a),o,t&&r(q,null,t))};we.displayName="FormControlWrapper","development"===process.env.NODE_ENV&&(we.propTypes={children:u.isRequired,disabled:c,hasError:c,insertAfter:u,insertBefore:u,type:s(["text","email","hidden","number","password","search","tel"])});export{se as Checkbox,pe as CheckboxDisclaimer,ce as CheckboxGroup,we as FormControlWrapper,j as FormHelpText,V as FormHelpTextVariants,H as FormInput,O as FormLabel,Z as FormTextArea,L as InputElement,ve as Option,ke as OptionGroup,te as Radio,le as RadioGroup,ge as Select,be as SelectIconWrapper};
!function(e,r){var o,i,n="function"==typeof Map?new Map:(o=[],i=[],{has:function(e){return o.indexOf(e)>-1},get:function(e){return i[o.indexOf(e)]},set:function(e,r){-1===o.indexOf(e)&&(o.push(e),i.push(r))},delete:function(e){var r=o.indexOf(e);r>-1&&(o.splice(r,1),i.splice(r,1))}}),t=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){t=function(e){var r=document.createEvent("Event");return r.initEvent(e,!0,!1),r}}function a(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!n.has(e)){var r,o=null,i=null,a=null,l=function(){e.clientWidth!==i&&p()},d=function(r){window.removeEventListener("resize",l,!1),e.removeEventListener("input",p,!1),e.removeEventListener("keyup",p,!1),e.removeEventListener("autosize:destroy",d,!1),e.removeEventListener("autosize:update",p,!1),Object.keys(r).forEach((function(o){e.style[o]=r[o]})),n.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",d,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",p,!1),window.addEventListener("resize",l,!1),e.addEventListener("input",p,!1),e.addEventListener("autosize:update",p,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",n.set(e,{destroy:d,update:p}),"vertical"===(r=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===r.resize&&(e.style.resize="horizontal"),o="content-box"===r.boxSizing?-(parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)):parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),isNaN(o)&&(o=0),p()}function s(r){var o=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=o,e.style.overflowY=r}function c(){if(0!==e.scrollHeight){var r=function(e){for(var r=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&r.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return r}(e),n=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+o+"px",i=e.clientWidth,r.forEach((function(e){e.node.scrollTop=e.scrollTop})),n&&(document.documentElement.scrollTop=n)}}function p(){c();var r=Math.round(parseFloat(e.style.height)),o=window.getComputedStyle(e,null),i="content-box"===o.boxSizing?Math.round(parseFloat(o.height)):e.offsetHeight;if(i<r?"hidden"===o.overflowY&&(s("scroll"),c(),i="content-box"===o.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==o.overflowY&&(s("hidden"),c(),i="content-box"===o.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),a!==i){a=i;var n=t("autosize:resized");try{e.dispatchEvent(n)}catch(e){}}}}function l(e){var r=n.get(e);r&&r.destroy()}function d(e){var r=n.get(e);r&&r.update()}var s=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((s=function(e){return e}).destroy=function(e){return e},s.update=function(e){return e}):((s=function(e,r){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return a(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e},s.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],d),e}),r.default=s,e.exports=r.default}(e,r)})),U=function(e,r,o){return((o=window.getComputedStyle)?o(e):e.currentStyle)[r.replace(/-(\w)/gi,(function(e,r){return r.toUpperCase()}))]};var J=function(e){var r=U(e,"line-height"),o=parseFloat(r,10);if(r===o+""){var i=e.style.lineHeight;e.style.lineHeight=r+"em",r=U(e,"line-height"),o=parseFloat(r,10),i?e.style.lineHeight=i:delete e.style.lineHeight}if(-1!==r.indexOf("pt")?(o*=4,o/=3):-1!==r.indexOf("mm")?(o*=96,o/=25.4):-1!==r.indexOf("cm")?(o*=96,o/=2.54):-1!==r.indexOf("in")?o*=96:-1!==r.indexOf("pc")&&(o*=16),o=Math.round(o),"normal"===r){var n=e.nodeName,t=document.createElement(n);t.innerHTML="&nbsp;","TEXTAREA"===n.toUpperCase()&&t.setAttribute("rows","1");var a=U(e,"font-size");t.style.fontSize=a,t.style.padding="0px",t.style.border="0px";var l=document.body;l.appendChild(t),o=t.offsetHeight,l.removeChild(t)}return o},K=X((function(r,o){var i,n=M&&M.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)r.hasOwnProperty(o)&&(e[o]=r[o])},function(e,r){function o(){this.constructor=e}i(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}),t=M&&M.__assign||Object.assign||function(e){for(var r,o=1,i=arguments.length;o<i;o++)for(var n in r=arguments[o])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},a=M&&M.__rest||function(e,r){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)r.indexOf(i[n])<0&&(o[i[n]]=e[i[n]])}return o};o.__esModule=!0;var d=J,s=function(r){function o(){var o=null!==r&&r.apply(this,arguments)||this;return o.state={lineHeight:null},o.textarea=o.props.innerRef||e.createRef(),o.onResize=function(e){o.props.onResize&&o.props.onResize(e)},o.updateLineHeight=function(){o.textarea.current&&o.setState({lineHeight:d(o.textarea.current)})},o.onChange=function(e){var r=o.props.onChange;o.currentValue=e.currentTarget.value,r&&r(e)},o}return n(o,r),o.prototype.componentDidMount=function(){var e=this,r=this.props,o=r.maxRows,i=r.async;"number"==typeof o&&this.updateLineHeight(),"number"==typeof o||i?setTimeout((function(){return e.textarea.current&&G(e.textarea.current)})):this.textarea.current&&G(this.textarea.current),this.textarea.current&&this.textarea.current.addEventListener("autosize:resized",this.onResize)},o.prototype.componentWillUnmount=function(){this.textarea.current&&(this.textarea.current.removeEventListener("autosize:resized",this.onResize),G.destroy(this.textarea.current))},o.prototype.render=function(){var r=this.props,o=(r.onResize,r.maxRows),i=(r.onChange,r.style),n=(r.innerRef,r.children),l=a(r,["onResize","maxRows","onChange","style","innerRef","children"]),d=this.state.lineHeight,s=o&&d?d*o:null;return e.createElement("textarea",t({},l,{onChange:this.onChange,style:s?t({},i,{maxHeight:s}):i,ref:this.textarea}),n)},o.prototype.componentDidUpdate=function(){this.textarea.current&&G.update(this.textarea.current)},o.defaultProps={rows:1,async:!1},o.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.object,async:l.bool},o}(e.Component);o.TextareaAutosize=e.forwardRef((function(r,o){return e.createElement(s,t({},r,{innerRef:o}))}))}));Y(K);K.TextareaAutosize;var Q=b(Y(X((function(e,r){r.__esModule=!0,r.default=K.TextareaAutosize}))))((function(){return f({appearance:"none",border:"none",background:"transparent",outline:"none",display:"block",width:"100%",maxHeight:"size30",fontFamily:"inherit",fontSize:"fontSize30",lineHeight:"lineHeight30",fontWeight:"fontWeightNormal",color:"colorText",paddingTop:"space30",paddingRight:"space40",paddingBottom:"space30",paddingLeft:"space40",borderRadius:"borderRadius20",resize:"vertical",boxShadow:"none","&::placeholder":{color:"colorTextWeak",fontStyle:"italic"},"&:disabled":{cursor:"not-allowed",color:"colorTextWeak"}})})),Z=o((function(e,o){var i=e.id,n=e.name,t=e.placeholder,a=e.children,l=e.readOnly,d=e.disabled,s=e.hasError,c=e.insertBefore,p=e.insertAfter,u=z(e,["id","name","placeholder","children","readOnly","disabled","hasError","insertBefore","insertAfter"]);return r(_,{readOnly:l,disabled:d,hasError:s},c&&r(A,null,c),r(Q,B({"aria-invalid":s,"aria-readonly":l},W(u),{async:!0,ref:o,id:i,name:n,rows:3,placeholder:t,disabled:d,readOnly:l,spellCheck:!0}),a),p&&r(q,null,p))}));Z.displayName="FormTextArea","development"===process.env.NODE_ENV&&(Z.propTypes={id:d.isRequired,name:d,placeholder:d,disabled:c,readOnly:c,required:c,hasError:c,onChange:p.isRequired,onFocus:p,onBlur:p});var $=b(x)((function(e){var r,o=e._activeSibling,i=e._boxChild,n=e._checkedAndActiveSibling,t=e._checkedAndDisabledSibling,a=e._checkedAndFocusSibling,l=e._checkedAndHoverSibling,d=e._checkedAndInvalidSibling,s=e._checkedAndInvalidAndHoverSibling,c=e._checkedSibling,p=e._checkedSiblingAndBoxChild,u=e._disabledSibling,h=e._focusSibling,b=e._hoverSibling,g=e._invalidSibling,m=e._invalidAndHoverSibling,y=e.type,v=void 0===y?"checkbox":y,x="input[type="+v+"]:checked + label &, input[type="+v+"][aria-checked=mixed] + label &",k="input[type="+v+"]:checked:active + label &, input[type="+v+"][aria-checked=mixed]:active + label &",w="input[type="+v+"]:checked + label & > *, input[type="+v+"][aria-checked=mixed] + label & > *",E="input[type="+v+"]:checked:disabled + label &, input[type="+v+"][aria-checked=mixed]:disabled + label &",R="input[type="+v+"]:checked:focus + label &, input[type="+v+"][aria-checked=mixed]:focus + label &",T="input[type="+v+"]:checked:hover:not(:disabled) + label &, input[type="+v+"][aria-checked=mixed]:hover:not(:disabled) + label &",S="input[type="+v+"][aria-invalid=true]:checked + label &",C="input[type="+v+"][aria-invalid=true]:checked:hover:not(:disabled) + label &",B="input[type="+v+"] + label & > *",z="input[type="+v+"]:disabled + label &",N="input[type="+v+"]:focus + label &",O="input[type="+v+"]:hover:not(:disabled):not(:checked) + label &",_="input[type="+v+"][aria-invalid=true] + label &",A="input[type="+v+"][aria-invalid=true]:hover:not(:disabled) + label &";return f(((r={})["input[type="+v+"]:active + label &"]=o,r[x]=c,r[k]=n,r[w]=p,r[E]=t,r[R]=a,r[T]=l,r[S]=d,r[C]=s,r[B]=i,r[z]=u,r[N]=h,r[O]=b,r[_]=g,r[A]=m,r))}));$.displayName="SiblingBox",$.defaultProps={alignItems:"center","aria-hidden":"true",display:"inline-flex",flexShrink:0,justifyContent:"center",transition:"all 120ms"},"development"===process.env.NODE_ENV&&($.propTypes={type:s(["checkbox","radio"])});var ee=function(e){var o=e.children,i=e.disabled,n=z(e,["children","disabled"]);return r($,B({as:"span",display:"flex",backgroundColor:"colorBackgroundBody",borderColor:"colorBorder",borderStyle:"solid",borderWidth:"borderWidth10",height:"sizeSquare50",margin:"space20",width:"sizeSquare50",_hoverSibling:{borderColor:"colorBorderPrimaryDark"},_focusSibling:{borderColor:"colorBorderPrimaryDark",boxShadow:"shadowFocus"},_activeSibling:i?void 0:{borderColor:"colorBorderPrimaryDarker",backgroundColor:"colorBackgroundPrimaryDarker"},_checkedSibling:{borderColor:"colorBorderPrimary",backgroundColor:"colorBackgroundPrimary"},_disabledSibling:{borderColor:"colorBorderLighter"},_invalidSibling:{borderColor:"colorBorderError"},_invalidAndHoverSibling:{borderColor:"colorBorderErrorDark"},_checkedAndHoverSibling:{borderColor:"colorBorderPrimaryDarker",backgroundColor:"colorBackgroundPrimaryDark"},_checkedAndFocusSibling:{borderColor:"colorBorderPrimaryDarker",backgroundColor:"colorBackgroundPrimaryDark"},_checkedAndActiveSibling:i?void 0:{borderColor:"colorBorderPrimaryDarker",backgroundColor:"colorBackgroundPrimaryDarker"},_checkedAndDisabledSibling:{borderColor:"colorBorderLighter",backgroundColor:"colorBackgroundDark"},_checkedAndInvalidSibling:{borderColor:"colorBorderError",backgroundColor:"colorBackgroundError"},_checkedAndInvalidAndHoverSibling:{borderColor:"colorBorderErrorDark",backgroundColor:"colorBackgroundErrorDark"}},n),o)};ee.displayName="BaseRadioCheckboxControl","development"===process.env.NODE_ENV&&(ee.propTypes={children:u.isRequired,disabled:c});var re=function(e){var o=e.children,i=z(e,["children"]);return r(O,B({},i,{marginBottom:"space0"}),r(x,{as:"span",display:"flex"},o))};re.displayName="BaseRadioCheckboxLabel","development"===process.env.NODE_ENV&&(re.propTypes={children:u.isRequired});var oe=function(e){var o=e.children,i=z(e,["children"]);return r(E,B({as:"span",color:"currentColor",marginLeft:"space20",fontWeight:"fontWeightNormal"},i),o)};oe.displayName="BaseRadioCheckboxLabelText","development"===process.env.NODE_ENV&&(oe.propTypes={children:u.isRequired});var ie=function(e){var o=e.children,i=e.helpTextId;return r(x,{as:"span",display:"block",marginLeft:"space80"},r(j,{id:i,marginTop:"space0"},o))};ie.displayName="BaseRadioCheckboxHelpText","development"===process.env.NODE_ENV&&(ie.propTypes={children:u.isRequired,helpTextId:d.isRequired});var ne=b.input(f({border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",textTransform:"none",whiteSpace:"nowrap",width:"1px"})),te=o((function(e,o){var i=e.id,n=e.disabled,t=e.checked,a=e.hasError,l=e.children,d=e.helpText,s=z(e,["id","disabled","checked","hasError","children","helpText"]),c=C();return r(x,{alignItems:"flex-start",display:"inline-flex",flexDirection:"column",verticalAlign:"top"},r(ne,B({},s,{"aria-describedby":c,"aria-invalid":a,checked:t,disabled:n,id:i,ref:o,type:"radio"})),r(re,{disabled:n,htmlFor:i},r(ee,{borderRadius:"borderRadiusCircle",disabled:n,type:"radio"},r(x,{as:"span",backgroundColor:n&&t?"colorBackgroundDarkest":"colorBackgroundBody",borderRadius:"borderRadiusCircle",height:"sizeSquare25",width:"sizeSquare25"})),r(oe,null,l)),d&&r(ie,{helpTextId:c},d))}));te.displayName="Radio","development"===process.env.NODE_ENV&&(te.propTypes={children:u.isRequired,hasError:c,helpText:h([d,u]),id:d.isRequired,value:d.isRequired});var ae=function(e){var o=e.children,n=e.disabled,t=e.errorText,a=e.helpText,l=e.legend,d=e.orientation,s=e.required,c=(e.value,z(e,["children","disabled","errorText","helpText","legend","orientation","required","value"]));return r(x,B({},k(c),{as:"fieldset",margin:"space0",padding:"space0",borderWidth:"borderWidth0"}),r(O,{as:"legend",htmlFor:void 0,required:s,marginBottom:"space0",disabled:n},l),a&&r(j,{marginTop:"space0"},a),r(x,{marginLeft:"space20",marginRight:"space20",marginTop:"space30"},i.map(o,(function(e){return r(x,{display:"horizontal"===d?"inline-block":"block",marginBottom:"space30",marginRight:"horizontal"===d?"space70":null},e)})),t&&r(j,{marginTop:"space0",variant:"error"},t)))};ae.displayName="InlineControlGroup",ae.defaultProps={orientation:"vertical"},"development"===process.env.NODE_ENV&&(ae.propTypes={children:u.isRequired,disabled:c,errorText:h([d,u]),helpText:h([d,u]),legend:h([d,u]).isRequired,name:d.isRequired,orientation:s(["vertical","horizontal"]),required:c,value:d});var le=function(e){var o=e.onChange,a=e.children,l=e.errorText,d=e.name,s=e.value,c=e.disabled,p=z(e,["onChange","children","errorText","name","value","disabled"]);return r(ae,B({},p,{disabled:c,errorText:l,name:d}),i.map(a,(function(e){return n(e)?t(e,{checked:e.props.value===s,disabled:c,hasError:null!=l,name:d,onChange:function(e){null!=o&&o(e.target.value)}}):e})))};le.displayName="RadioGroup","development"===process.env.NODE_ENV&&(le.propTypes={name:d,onChange:p.isRequired});var de=b.input({border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",textTransform:"none",whiteSpace:"nowrap",width:"1px"}),se=o((function(e,o){var i=e.id,n=e.checked,t=e.children,a=e.helpText,l=e.disabled,d=e.hasError,s=e.indeterminate,c=e.isSelectAllChild,p=e.isSelectAll,u=z(e,["id","checked","children","helpText","disabled","hasError","indeterminate","isSelectAllChild","isSelectAll"]),h=C(),b=null;p&&(b="colorBackground"),(p&&n||p&&s)&&(b="colorBackgroundPrimaryLightest");var f=p?"space20":null;return c&&(f="space30"),r(x,{backgroundColor:b,borderRadius:p?"borderRadius10":null,display:"inline-flex",flexDirection:"column",padding:p?"space30":null,paddingBottom:p?"space20":null,paddingLeft:f,paddingRight:c?"space30":null,paddingTop:p?"space20":null},r(de,B({},u,{"aria-describedby":h,"aria-checked":s?"mixed":n,"aria-invalid":d,checked:n,disabled:l,id:i,ref:o,type:"checkbox"})),r(re,{disabled:l,htmlFor:i},r(ee,{alignItems:"center",borderRadius:"borderRadius10",disabled:l,display:"flex",position:"relative",type:"checkbox"},r(x,{alignItems:"center",as:"span",display:"flex",height:s?void 0:"sizeSquare25",position:"absolute",top:s?void 0:"3px",transform:s?void 0:"rotate(-45deg)",width:"sizeSquare30",_before:s?void 0:{borderColor:l&&n?"colorBorderDark":"colorBorderInverse",borderRadius:"borderRadius10",borderStyle:"solid",borderWidth:"borderWidth10",bottom:"0",content:'""',display:"block",height:"sizeSquare25",position:"absolute",width:"size0"},_after:{borderColor:l&&n?"colorBorderDark":"colorBorderInverse",borderRadius:"borderRadius10",borderStyle:"solid",borderWidth:"borderWidth10",bottom:"0",content:'""',display:"block",height:"size0",position:s?void 0:"absolute",width:"sizeSquare30"}})),r(oe,{fontWeight:p?null:"fontWeightNormal"},t)),a&&r(ie,{helpTextId:h},a))}));se.displayName="Checkbox","development"===process.env.NODE_ENV&&(se.propTypes={children:u.isRequired,hasError:c,helpText:h([d,u]),id:d.isRequired,indeterminate:c,isSelectAll:c,isSelectAllChild:c,value:d.isRequired});var ce=function(e){var o=e.children,a=e.disabled,l=e.errorText,d=e.isSelectAll,s=e.name,c=e.orientation,p=void 0===c?"vertical":c,u=z(e,["children","disabled","errorText","isSelectAll","name","orientation"]);return r(ae,B({},u,{errorText:l,name:s,disabled:a,orientation:p}),i.map(o,(function(e,r){return n(e)?t(e,{disabled:a,hasError:!!l||void 0,isSelectAll:d&&0===r,isSelectAllChild:d&&"vertical"===p&&0!==r,name:s}):e})))};ce.displayName="CheckboxGroup","development"===process.env.NODE_ENV&&(ce.propTypes={isSelectAll:c,name:d});var pe=function(e){var o=e.children,i=e.errorText,n=z(e,["children","errorText"]);return r(a,null,r(x,{backgroundColor:"colorBackground",borderRadius:"borderRadius20",padding:"space50"},r(se,B({},n,{hasError:null!=i}),o)),i&&r(x,{marginTop:"space30",marginLeft:"space50"},r(j,{variant:"error"},i)))};pe.displayName="CheckboxDisclaimer","development"===process.env.NODE_ENV&&(pe.propTypes={children:u.isRequired,errorText:h([d,u])});var ue=function(e){var o=e.as,i=e.display,n=e.size,t=e.iconColor,a=e.title,l=e.decorative;if(!l&&null==a)throw new Error("[ChevronDownIcon]: Missing a title for non-decorative icon.");return r(P,{as:o,display:i,size:n,iconColor:t},r(S,null,(function(e){return r("svg",{role:"img","aria-hidden":l,"aria-labelledby":e,width:"100%",height:"100%",viewBox:"0 0 24 24"},a?r("title",{id:e},a):null,r("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.128 10.166a.5.5 0 01.798.596l-.054.072-4.5 5a.5.5 0 01-.672.066l-.072-.066-4.5-5a.5.5 0 01.678-.73l.066.062L12 14.752l4.128-4.586z"}))})))};ue.displayName="ChevronDownIcon";var he={className:void 0,size:void 0,style:void 0,height:void 0,width:void 0},be=function(e){var o=e.children;return r(x,{alignItems:"center",display:"inline-flex",position:"absolute",pointerEvents:"none",right:"space30",top:"50%",transform:"translateY(-50%)",zIndex:"zIndex10"},o)},fe=b.select(f({appearance:"none",border:"none",background:"transparent",outline:"none",resize:"none",display:"block",width:"100%",fontFamily:"inherit",fontSize:"fontSize30",lineHeight:"lineHeight30",fontWeight:"fontWeightNormal",color:"colorText",paddingTop:"space30",paddingRight:"space100",paddingBottom:"space30",paddingLeft:"space40",borderRadius:"borderRadius20",boxShadow:"none",cursor:"pointer","&:disabled":{cursor:"not-allowed",color:"colorTextWeak"}})),ge=o((function(e,o){var i=e.disabled,n=e.hasError,t=e.insertBefore,a=e.insertAfter,l=e.children,d=e.size,s=e.multiple,c=z(e,["disabled","hasError","insertBefore","insertAfter","children","size","multiple"]);return r(_,{disabled:i,hasError:n},t&&r(A,null,t),r(x,{display:"flex",width:"100%",position:"relative"},r(fe,B({"aria-invalid":n,ref:o,multiple:s,disabled:i},c,he,{size:s?d:0,"data-not-selectize":"true"}),l),!s&&r(be,null,r(ue,{size:"sizeIcon30",decorative:!0,"aria-hidden":"true"}))),a&&r(q,null,a))}));ge.displayName="Select","development"===process.env.NODE_ENV&&(ge.propTypes={id:d.isRequired,hasError:c,onChange:p.isRequired});var me=B(B({},he),{selected:void 0}),ye=b.option(f({background:"transparent",color:"colorText",fontFamily:"fontFamilyText",lineHeight:"lineHeight50",paddingTop:"space30",paddingBottom:"space30",paddingLeft:"space20"})),ve=o((function(e,o){var i=e.children,n=z(e,["children"]);return n.selected&&console.warn('"selected" is a blocked prop on this component, please use "value" on the select element.'),r(ye,B({ref:o},n,me),i)}));ve.displayName="Option","development"===process.env.NODE_ENV&&(ve.propTypes={value:d.isRequired,children:u.isRequired});var xe=b.optgroup(f({background:"transparent",color:"colorText",fontFamily:"fontFamilyText",fontWeight:"fontWeightMedium",fontStyle:"normal",margin:"space20"})),ke=o((function(e,o){var i=e.label,n=e.children,t=z(e,["label","children"]);return r(xe,B({ref:o,label:i},t,he),n)}));ke.displayName="OptionGroup","development"===process.env.NODE_ENV&&(ke.propTypes={label:d.isRequired,children:u.isRequired});var we=function(e){var o=e.children,i=e.disabled,n=e.hasError,t=e.insertAfter,a=e.insertBefore,l=e.type,d=z(e,["children","disabled","hasError","insertAfter","insertBefore","type"]);return r(_,B({disabled:i,hasError:n,type:l},d,he),a&&r(A,null,a),o,t&&r(q,null,t))};we.displayName="FormControlWrapper","development"===process.env.NODE_ENV&&(we.propTypes={children:u.isRequired,disabled:c,hasError:c,insertAfter:u,insertBefore:u,type:s(["text","email","hidden","number","password","search","tel"])});export{se as Checkbox,pe as CheckboxDisclaimer,ce as CheckboxGroup,we as FormControlWrapper,j as FormHelpText,V as FormHelpTextVariants,H as FormInput,O as FormLabel,Z as FormTextArea,L as InputElement,ve as Option,ke as OptionGroup,te as Radio,le as RadioGroup,ge as Select,be as SelectIconWrapper};

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

"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var r=require("react"),o=e(r),t=require("prop-types"),n=e(t),i=require("@twilio-paste/styling-library"),a=require("@twilio-paste/box"),l=require("@twilio-paste/flex"),d=require("@twilio-paste/text"),s=require("@twilio-paste/screen-reader-only"),c=require("react-uid"),p=function(){return(p=Object.assign||function(e){for(var r,o=1,t=arguments.length;o<t;o++)for(var n in r=arguments[o])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e}).apply(this,arguments)};function u(e,r){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(o[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)r.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(o[t[n]]=e[t[n]])}return o}var h=i.styled(d.Text)(i.css({display:"block",width:"4px",height:"4px",marginRight:"space20",backgroundColor:"colorBackgroundRequired",borderRadius:"50%",cursor:"pointer"})),f=function(e){var o=e.as,t=e.marginBottom,n=e.required,i=e.disabled,c=e.children,f=u(e,["as","marginBottom","required","disabled","children"]);return r.createElement(a.Box,p({},a.safelySpreadBoxProps(f),{as:o,borderBottomWidth:"borderWidth0",display:"block",marginBottom:t||"space10",paddingLeft:"space0",paddingRight:"space0",textTransform:"none"}),r.createElement(l.Flex,{as:"span",vAlignContent:"center"},n?r.createElement(h,{as:"span",lineHeight:"lineHeight30"},r.createElement(s.ScreenReaderOnly,null,"Required: ")):null,r.createElement(d.Text,{as:"span",fontSize:"fontSize30",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight30",color:i?"colorTextWeak":"colorText",cursor:i?"not-allowed":"pointer"},c)))};f.displayName="FormLabel",f.defaultProps={as:"label"},"development"===process.env.NODE_ENV&&(f.propTypes={htmlFor:t.string,as:t.oneOf(["label","legend"]),disabled:t.bool,required:t.bool,marginBottom:t.oneOf(["space0"])});var b=function(e){var o=e.disabled,t=e.hasError,n=e.readOnly,i=e.children,l=e.type,d="shadowBorder",s="shadowBorderPrimaryDark";return o?(d="shadowBorderLight",s="shadowBorderLight"):n?s="shadowBorder":t?(d="shadowBorderError",s="shadowBorderErrorDark"):"hidden"===l&&(d=null),r.createElement(a.Box,{display:"flex",width:"100%",backgroundColor:n||o?"colorBackground":"colorBackgroundBody",boxShadow:d,borderRadius:"borderRadius20",transition:"box-shadow 100ms ease-in",cursor:o?"not-allowed":"text",_hover:{boxShadow:s},_focusWithin:{boxShadow:"shadowFocus"},_active:{boxShadow:o?"shadowBorderLight":"shadowBorderPrimaryDarker"}},i)};b.displayName="FieldWrapper","development"===process.env.NODE_ENV&&(b.propTypes={disabled:t.bool,hasError:t.bool,readOnly:t.bool});var m=function(e){var o=e.children;return null==o?null:r.createElement(a.Box,{display:"flex",alignItems:"flex-start",backgroundColor:"colorBackground",padding:"space30",borderRightWidth:"borderWidth10",borderRightColor:"colorBorderLight",borderRightStyle:"solid",borderTopLeftRadius:"borderRadius20",borderBottomLeftRadius:"borderRadius20"},o)};m.displayName="Prefix";var g=function(e){var o=e.children;return null==o?null:r.createElement(a.Box,{display:"flex",alignItems:"flex-start",backgroundColor:"colorBackground",padding:"space30",borderLeftWidth:"borderWidth10",borderLeftColor:"colorBorderLight",borderLeftStyle:"solid",borderTopRightRadius:"borderRadius20",borderBottomRightRadius:"borderRadius20"},o)};g.displayName="Suffix";var y=["className","style","size","height","width"],v=function(e){return Object.keys(e).reduce((function(r,o){return y.includes(o)||(r[o]=e[o]),r}),{})},x=i.styled.input(i.css({appearance:"none",border:"none",background:"transparent",outline:"none",resize:"none",display:"block",width:"100%",fontFamily:"inherit",fontSize:"fontSize30",lineHeight:"lineHeight30",fontWeight:"fontWeightNormal",color:"colorText",paddingTop:"space30",paddingRight:"space40",paddingBottom:"space30",paddingLeft:"space40",borderRadius:"borderRadius20",boxShadow:"none","&::placeholder":{color:"colorTextWeak",fontStyle:"italic"},"&:disabled":{cursor:"not-allowed",color:"colorTextWeak"}})),E=r.forwardRef((function(e,o){var t=e.id,n=e.type,i=e.name,a=e.value,l=e.placeholder,d=e.disabled,s=e.readOnly,c=e.required,h=e.hasError,f=e.insertBefore,y=e.insertAfter,E=u(e,["id","type","name","value","placeholder","disabled","readOnly","required","hasError","insertBefore","insertAfter"]),k={type:n};return"number"===n&&(k.type="text",k.inputmode="numeric",k.pattern="[0-9]*"),r.createElement(b,{type:n,readOnly:s,disabled:d,hasError:h},f&&r.createElement(m,null,f),r.createElement(x,p({"aria-invalid":h,"aria-readonly":s},v(E),k,{ref:o,id:t,name:i,value:a,placeholder:l,disabled:d,readOnly:s,required:c})),y&&r.createElement(g,null,y))}));E.displayName="FormInput","development"===process.env.NODE_ENV&&(E.propTypes={id:t.string.isRequired,type:t.oneOf(["text","email","hidden","number","password","search","tel"]).isRequired,name:t.string,value:t.string.isRequired,placeholder:t.string,disabled:t.bool,readOnly:t.bool,required:t.bool,hasError:t.bool,onChange:t.func,onFocus:t.func,onBlur:t.func});var k=i.system({iconColor:{property:"color",scale:"textColors"}}),w=i.styled.span(i.compose(i.display,k,i.size));w.defaultProps={display:"inline-flex",iconColor:"currentColor",size:"sizeIcon30"},w.displayName="IconWrapper";var T=function(e){var o=e.as,t=e.display,n=e.size,i=e.iconColor,a=e.title,l=e.decorative;if(!l&&null==a)throw new Error("[ErrorIcon]: Missing a title for non-decorative icon.");return r.createElement(w,{as:o,display:t,size:n,iconColor:i},r.createElement(c.UID,null,(function(e){return r.createElement("svg",{role:"img","aria-hidden":l,"aria-labelledby":e,width:"100%",height:"100%",viewBox:"0 0 24 24"},a?r.createElement("title",{id:e},a):null,r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.247 4.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 0zM12 14a1 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"}))})))};T.displayName="ErrorIcon";var R={ERROR:"error"},B=function(e){var o=e.marginTop,t=e.children,n=e.variant,i=u(e,["marginTop","children","variant"]),a=null;switch(n){case R.ERROR:a=r.createElement(T,{iconColor:"colorTextError",decorative:!0})}return r.createElement(l.Flex,{vAlignContent:"center",marginTop:o||"space20"},a,r.createElement(d.Text,p({},d.safelySpreadTextProps(i),{as:"div",fontSize:"fontSize30",lineHeight:"lineHeight30",color:"error"===n?"colorTextError":"colorTextWeak",marginLeft:a?"space20":void 0}),t))};B.displayName="FormHelpText","development"===process.env.NODE_ENV&&(B.propTypes={marginTop:t.oneOf(["space0"])});var S="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function C(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function O(e,r){return e(r={exports:{}},r.exports),r.exports}var z=O((function(e,r){
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var r=require("react"),o=e(r),t=require("prop-types"),n=e(t),i=require("@twilio-paste/styling-library"),a=require("@twilio-paste/box"),l=require("@twilio-paste/flex"),d=require("@twilio-paste/text"),s=require("@twilio-paste/screen-reader-only"),c=require("react-uid"),p=function(){return(p=Object.assign||function(e){for(var r,o=1,t=arguments.length;o<t;o++)for(var n in r=arguments[o])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e}).apply(this,arguments)};function u(e,r){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(o[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)r.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(o[t[n]]=e[t[n]])}return o}var h=i.styled(d.Text)(i.css({display:"block",width:"4px",height:"4px",marginRight:"space20",backgroundColor:"colorBackgroundRequired",borderRadius:"50%",cursor:"pointer"})),f=function(e){var o=e.as,t=e.marginBottom,n=e.required,i=e.disabled,c=e.children,f=u(e,["as","marginBottom","required","disabled","children"]);return r.createElement(a.Box,p({},a.safelySpreadBoxProps(f),{as:o,borderBottomWidth:"borderWidth0",display:"block",marginBottom:t||"space10",paddingLeft:"space0",paddingRight:"space0",textTransform:"none"}),r.createElement(l.Flex,{as:"span",vAlignContent:"center"},n?r.createElement(h,{as:"span",lineHeight:"lineHeight30"},r.createElement(s.ScreenReaderOnly,null,"Required: ")):null,r.createElement(d.Text,{as:"span",fontSize:"fontSize30",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight30",color:i?"colorTextWeak":"colorText",cursor:i?"not-allowed":"pointer"},c)))};f.displayName="FormLabel",f.defaultProps={as:"label"},"development"===process.env.NODE_ENV&&(f.propTypes={htmlFor:t.string,as:t.oneOf(["label","legend"]),disabled:t.bool,required:t.bool,marginBottom:t.oneOf(["space0"])});var b=function(e){var o=e.disabled,t=e.hasError,n=e.readOnly,i=e.children,l=e.type,d="shadowBorder",s="shadowBorderPrimaryDark";return o?(d="shadowBorderLight",s="shadowBorderLight"):n?s="shadowBorder":t?(d="shadowBorderError",s="shadowBorderErrorDark"):"hidden"===l&&(d=null),r.createElement(a.Box,{display:"flex",width:"100%",backgroundColor:n||o?"colorBackground":"colorBackgroundBody",boxShadow:d,borderRadius:"borderRadius20",transition:"box-shadow 100ms ease-in",cursor:o?"not-allowed":"text",_hover:{boxShadow:s},_focusWithin:{boxShadow:"shadowFocus"},_active:{boxShadow:o?"shadowBorderLight":"shadowBorderPrimaryDarker"}},i)};b.displayName="FieldWrapper","development"===process.env.NODE_ENV&&(b.propTypes={disabled:t.bool,hasError:t.bool,readOnly:t.bool});var m=function(e){var o=e.children;return null==o?null:r.createElement(a.Box,{display:"flex",alignItems:"flex-start",backgroundColor:"colorBackground",padding:"space30",borderRightWidth:"borderWidth10",borderRightColor:"colorBorderLighter",borderRightStyle:"solid",borderTopLeftRadius:"borderRadius20",borderBottomLeftRadius:"borderRadius20"},o)};m.displayName="Prefix";var g=function(e){var o=e.children;return null==o?null:r.createElement(a.Box,{display:"flex",alignItems:"flex-start",backgroundColor:"colorBackground",padding:"space30",borderLeftWidth:"borderWidth10",borderLeftColor:"colorBorderLighter",borderLeftStyle:"solid",borderTopRightRadius:"borderRadius20",borderBottomRightRadius:"borderRadius20"},o)};g.displayName="Suffix";var y=["className","style","size","height","width"],v=function(e){return Object.keys(e).reduce((function(r,o){return y.includes(o)||(r[o]=e[o]),r}),{})},x=i.styled.input(i.css({appearance:"none",border:"none",background:"transparent",outline:"none",resize:"none",display:"block",width:"100%",fontFamily:"inherit",fontSize:"fontSize30",lineHeight:"lineHeight30",fontWeight:"fontWeightNormal",color:"colorText",paddingTop:"space30",paddingRight:"space40",paddingBottom:"space30",paddingLeft:"space40",borderRadius:"borderRadius20",boxShadow:"none","&::placeholder":{color:"colorTextWeak",fontStyle:"italic"},"&:disabled":{cursor:"not-allowed",color:"colorTextWeak"}})),E=r.forwardRef((function(e,o){var t=e.id,n=e.type,i=e.name,a=e.value,l=e.placeholder,d=e.disabled,s=e.readOnly,c=e.required,h=e.hasError,f=e.insertBefore,y=e.insertAfter,E=u(e,["id","type","name","value","placeholder","disabled","readOnly","required","hasError","insertBefore","insertAfter"]),k={type:n};return"number"===n&&(k.type="text",k.inputmode="numeric",k.pattern="[0-9]*"),r.createElement(b,{type:n,readOnly:s,disabled:d,hasError:h},f&&r.createElement(m,null,f),r.createElement(x,p({"aria-invalid":h,"aria-readonly":s},v(E),k,{ref:o,id:t,name:i,value:a,placeholder:l,disabled:d,readOnly:s,required:c})),y&&r.createElement(g,null,y))}));E.displayName="FormInput","development"===process.env.NODE_ENV&&(E.propTypes={id:t.string.isRequired,type:t.oneOf(["text","email","hidden","number","password","search","tel"]).isRequired,name:t.string,value:t.string.isRequired,placeholder:t.string,disabled:t.bool,readOnly:t.bool,required:t.bool,hasError:t.bool,onChange:t.func,onFocus:t.func,onBlur:t.func});var k=i.system({iconColor:{property:"color",scale:"textColors"}}),w=i.styled.span(i.compose(i.display,k,i.size));w.defaultProps={display:"inline-flex",iconColor:"currentColor",size:"sizeIcon30"},w.displayName="IconWrapper";var T=function(e){var o=e.as,t=e.display,n=e.size,i=e.iconColor,a=e.title,l=e.decorative;if(!l&&null==a)throw new Error("[ErrorIcon]: Missing a title for non-decorative icon.");return r.createElement(w,{as:o,display:t,size:n,iconColor:i},r.createElement(c.UID,null,(function(e){return r.createElement("svg",{role:"img","aria-hidden":l,"aria-labelledby":e,width:"100%",height:"100%",viewBox:"0 0 24 24"},a?r.createElement("title",{id:e},a):null,r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.247 4.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 0zM12 14a1 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"}))})))};T.displayName="ErrorIcon";var R={ERROR:"error"},B=function(e){var o=e.marginTop,t=e.children,n=e.variant,i=u(e,["marginTop","children","variant"]),a=null;switch(n){case R.ERROR:a=r.createElement(T,{iconColor:"colorTextError",decorative:!0})}return r.createElement(l.Flex,{vAlignContent:"center",marginTop:o||"space20"},a,r.createElement(d.Text,p({},d.safelySpreadTextProps(i),{as:"div",fontSize:"fontSize30",lineHeight:"lineHeight30",color:"error"===n?"colorTextError":"colorTextWeak",marginLeft:a?"space20":void 0}),t))};B.displayName="FormHelpText","development"===process.env.NODE_ENV&&(B.propTypes={marginTop:t.oneOf(["space0"])});var S="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function C(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function O(e,r){return e(r={exports:{}},r.exports),r.exports}var z=O((function(e,r){
/*!

@@ -7,2 +7,2 @@ autosize 4.0.2

*/
!function(e,r){var o,t,n="function"==typeof Map?new Map:(o=[],t=[],{has:function(e){return o.indexOf(e)>-1},get:function(e){return t[o.indexOf(e)]},set:function(e,r){-1===o.indexOf(e)&&(o.push(e),t.push(r))},delete:function(e){var r=o.indexOf(e);r>-1&&(o.splice(r,1),t.splice(r,1))}}),i=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){i=function(e){var r=document.createEvent("Event");return r.initEvent(e,!0,!1),r}}function a(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!n.has(e)){var r,o=null,t=null,a=null,l=function(){e.clientWidth!==t&&p()},d=function(r){window.removeEventListener("resize",l,!1),e.removeEventListener("input",p,!1),e.removeEventListener("keyup",p,!1),e.removeEventListener("autosize:destroy",d,!1),e.removeEventListener("autosize:update",p,!1),Object.keys(r).forEach((function(o){e.style[o]=r[o]})),n.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",d,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",p,!1),window.addEventListener("resize",l,!1),e.addEventListener("input",p,!1),e.addEventListener("autosize:update",p,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",n.set(e,{destroy:d,update:p}),"vertical"===(r=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===r.resize&&(e.style.resize="horizontal"),o="content-box"===r.boxSizing?-(parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)):parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),isNaN(o)&&(o=0),p()}function s(r){var o=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=o,e.style.overflowY=r}function c(){if(0!==e.scrollHeight){var r=function(e){for(var r=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&r.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return r}(e),n=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+o+"px",t=e.clientWidth,r.forEach((function(e){e.node.scrollTop=e.scrollTop})),n&&(document.documentElement.scrollTop=n)}}function p(){c();var r=Math.round(parseFloat(e.style.height)),o=window.getComputedStyle(e,null),t="content-box"===o.boxSizing?Math.round(parseFloat(o.height)):e.offsetHeight;if(t<r?"hidden"===o.overflowY&&(s("scroll"),c(),t="content-box"===o.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==o.overflowY&&(s("hidden"),c(),t="content-box"===o.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),a!==t){a=t;var n=i("autosize:resized");try{e.dispatchEvent(n)}catch(e){}}}}function l(e){var r=n.get(e);r&&r.destroy()}function d(e){var r=n.get(e);r&&r.update()}var s=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((s=function(e){return e}).destroy=function(e){return e},s.update=function(e){return e}):((s=function(e,r){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return a(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e},s.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],d),e}),r.default=s,e.exports=r.default}(e,r)})),N=function(e,r,o){return((o=window.getComputedStyle)?o(e):e.currentStyle)[r.replace(/-(\w)/gi,(function(e,r){return r.toUpperCase()}))]};var _=function(e){var r=N(e,"line-height"),o=parseFloat(r,10);if(r===o+""){var t=e.style.lineHeight;e.style.lineHeight=r+"em",r=N(e,"line-height"),o=parseFloat(r,10),t?e.style.lineHeight=t:delete e.style.lineHeight}if(-1!==r.indexOf("pt")?(o*=4,o/=3):-1!==r.indexOf("mm")?(o*=96,o/=25.4):-1!==r.indexOf("cm")?(o*=96,o/=2.54):-1!==r.indexOf("in")?o*=96:-1!==r.indexOf("pc")&&(o*=16),o=Math.round(o),"normal"===r){var n=e.nodeName,i=document.createElement(n);i.innerHTML="&nbsp;","TEXTAREA"===n.toUpperCase()&&i.setAttribute("rows","1");var a=N(e,"font-size");i.style.fontSize=a,i.style.padding="0px",i.style.border="0px";var l=document.body;l.appendChild(i),o=i.offsetHeight,l.removeChild(i)}return o},q=O((function(e,r){var t,i=S&&S.__extends||(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)r.hasOwnProperty(o)&&(e[o]=r[o])},function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}),a=S&&S.__assign||Object.assign||function(e){for(var r,o=1,t=arguments.length;o<t;o++)for(var n in r=arguments[o])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},l=S&&S.__rest||function(e,r){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(o[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)r.indexOf(t[n])<0&&(o[t[n]]=e[t[n]])}return o};r.__esModule=!0;var d=_,s=function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.state={lineHeight:null},r.textarea=r.props.innerRef||o.createRef(),r.onResize=function(e){r.props.onResize&&r.props.onResize(e)},r.updateLineHeight=function(){r.textarea.current&&r.setState({lineHeight:d(r.textarea.current)})},r.onChange=function(e){var o=r.props.onChange;r.currentValue=e.currentTarget.value,o&&o(e)},r}return i(r,e),r.prototype.componentDidMount=function(){var e=this,r=this.props,o=r.maxRows,t=r.async;"number"==typeof o&&this.updateLineHeight(),"number"==typeof o||t?setTimeout((function(){return e.textarea.current&&z(e.textarea.current)})):this.textarea.current&&z(this.textarea.current),this.textarea.current&&this.textarea.current.addEventListener("autosize:resized",this.onResize)},r.prototype.componentWillUnmount=function(){this.textarea.current&&(this.textarea.current.removeEventListener("autosize:resized",this.onResize),z.destroy(this.textarea.current))},r.prototype.render=function(){var e=this.props,r=(e.onResize,e.maxRows),t=(e.onChange,e.style),n=(e.innerRef,e.children),i=l(e,["onResize","maxRows","onChange","style","innerRef","children"]),d=this.state.lineHeight,s=r&&d?d*r:null;return o.createElement("textarea",a({},i,{onChange:this.onChange,style:s?a({},t,{maxHeight:s}):t,ref:this.textarea}),n)},r.prototype.componentDidUpdate=function(){this.textarea.current&&z.update(this.textarea.current)},r.defaultProps={rows:1,async:!1},r.propTypes={rows:n.number,maxRows:n.number,onResize:n.func,innerRef:n.object,async:n.bool},r}(o.Component);r.TextareaAutosize=o.forwardRef((function(e,r){return o.createElement(s,a({},e,{innerRef:r}))}))}));C(q);q.TextareaAutosize;var A=C(O((function(e,r){r.__esModule=!0,r.default=q.TextareaAutosize}))),D=i.styled(A)((function(){return i.css({appearance:"none",border:"none",background:"transparent",outline:"none",display:"block",width:"100%",maxHeight:"size30",fontFamily:"inherit",fontSize:"fontSize30",lineHeight:"lineHeight30",fontWeight:"fontWeightNormal",color:"colorText",paddingTop:"space30",paddingRight:"space40",paddingBottom:"space30",paddingLeft:"space40",borderRadius:"borderRadius20",resize:"vertical",boxShadow:"none","&::placeholder":{color:"colorTextWeak",fontStyle:"italic"},"&:disabled":{cursor:"not-allowed",color:"colorTextWeak"}})})),W=r.forwardRef((function(e,o){var t=e.id,n=e.name,i=e.placeholder,a=e.children,l=e.readOnly,d=e.disabled,s=e.hasError,c=e.insertBefore,h=e.insertAfter,f=u(e,["id","name","placeholder","children","readOnly","disabled","hasError","insertBefore","insertAfter"]);return r.createElement(b,{readOnly:l,disabled:d,hasError:s},c&&r.createElement(m,null,c),r.createElement(D,p({"aria-invalid":s,"aria-readonly":l},v(f),{async:!0,ref:o,id:t,name:n,rows:3,placeholder:i,disabled:d,readOnly:l,spellCheck:!0}),a),h&&r.createElement(g,null,h))}));W.displayName="FormTextArea","development"===process.env.NODE_ENV&&(W.propTypes={id:t.string.isRequired,name:t.string,placeholder:t.string,disabled:t.bool,readOnly:t.bool,required:t.bool,hasError:t.bool,onChange:t.func.isRequired,onFocus:t.func,onBlur:t.func});var L=i.styled(a.Box)((function(e){var r,o=e._activeSibling,t=e._boxChild,n=e._checkedAndActiveSibling,a=e._checkedAndDisabledSibling,l=e._checkedAndFocusSibling,d=e._checkedAndHoverSibling,s=e._checkedAndInvalidSibling,c=e._checkedAndInvalidAndHoverSibling,p=e._checkedSibling,u=e._checkedSiblingAndBoxChild,h=e._disabledSibling,f=e._focusSibling,b=e._hoverSibling,m=e._invalidSibling,g=e._invalidAndHoverSibling,y=e.type,v=void 0===y?"checkbox":y,x="input[type="+v+"]:active + label &",E="input[type="+v+"]:checked + label &, input[type="+v+"][aria-checked=mixed] + label &",k="input[type="+v+"]:checked:active + label &, input[type="+v+"][aria-checked=mixed]:active + label &",w="input[type="+v+"]:checked + label & > *, input[type="+v+"][aria-checked=mixed] + label & > *",T="input[type="+v+"]:checked:disabled + label &, input[type="+v+"][aria-checked=mixed]:disabled + label &",R="input[type="+v+"]:checked:focus + label &, input[type="+v+"][aria-checked=mixed]:focus + label &",B="input[type="+v+"]:checked:hover:not(:disabled) + label &, input[type="+v+"][aria-checked=mixed]:hover:not(:disabled) + label &",S="input[type="+v+"][aria-invalid=true]:checked + label &",C="input[type="+v+"][aria-invalid=true]:checked:hover:not(:disabled) + label &",O="input[type="+v+"] + label & > *",z="input[type="+v+"]:disabled + label &",N="input[type="+v+"]:focus + label &",_="input[type="+v+"]:hover:not(:disabled):not(:checked) + label &",q="input[type="+v+"][aria-invalid=true] + label &",A="input[type="+v+"][aria-invalid=true]:hover:not(:disabled) + label &";return i.css(((r={})[x]=o,r[E]=p,r[k]=n,r[w]=u,r[T]=a,r[R]=l,r[B]=d,r[S]=s,r[C]=c,r[O]=t,r[z]=h,r[N]=f,r[_]=b,r[q]=m,r[A]=g,r))}));L.displayName="SiblingBox",L.defaultProps={alignItems:"center","aria-hidden":"true",display:"inline-flex",flexShrink:0,justifyContent:"center",transition:"all 120ms"},"development"===process.env.NODE_ENV&&(L.propTypes={type:t.oneOf(["checkbox","radio"])});var F=function(e){var o=e.children,t=e.disabled,n=u(e,["children","disabled"]);return r.createElement(L,p({as:"span",display:"flex",backgroundColor:"colorBackgroundBody",borderColor:"colorBorder",borderStyle:"solid",borderWidth:"borderWidth10",height:"sizeSquare50",margin:"space20",width:"sizeSquare50",_hoverSibling:{borderColor:"colorBorderPrimaryDark"},_focusSibling:{borderColor:"colorBorderPrimaryDark",boxShadow:"shadowFocus"},_activeSibling:t?void 0:{borderColor:"colorBorderPrimaryDarker",backgroundColor:"colorBackgroundPrimaryDarker"},_checkedSibling:{borderColor:"colorBorderPrimary",backgroundColor:"colorBackgroundPrimary"},_disabledSibling:{borderColor:"colorBorderLight"},_invalidSibling:{borderColor:"colorBorderError"},_invalidAndHoverSibling:{borderColor:"colorBorderErrorDark"},_checkedAndHoverSibling:{borderColor:"colorBorderPrimaryDarker",backgroundColor:"colorBackgroundPrimaryDark"},_checkedAndFocusSibling:{borderColor:"colorBorderPrimaryDarker",backgroundColor:"colorBackgroundPrimaryDark"},_checkedAndActiveSibling:t?void 0:{borderColor:"colorBorderPrimaryDarker",backgroundColor:"colorBackgroundPrimaryDarker"},_checkedAndDisabledSibling:{borderColor:"colorBorderLight",backgroundColor:"colorBackgroundDark"},_checkedAndInvalidSibling:{borderColor:"colorBorderError",backgroundColor:"colorBackgroundError"},_checkedAndInvalidAndHoverSibling:{borderColor:"colorBorderErrorDark",backgroundColor:"colorBackgroundErrorDark"}},n),o)};F.displayName="BaseRadioCheckboxControl","development"===process.env.NODE_ENV&&(F.propTypes={children:t.node.isRequired,disabled:t.bool});var H=function(e){var o=e.children,t=u(e,["children"]);return r.createElement(f,p({},t,{marginBottom:"space0"}),r.createElement(a.Box,{as:"span",display:"flex"},o))};H.displayName="BaseRadioCheckboxLabel","development"===process.env.NODE_ENV&&(H.propTypes={children:t.node.isRequired});var I=function(e){var o=e.children,t=u(e,["children"]);return r.createElement(d.Text,p({as:"span",color:"currentColor",marginLeft:"space20",fontWeight:"fontWeightNormal"},t),o)};I.displayName="BaseRadioCheckboxLabelText","development"===process.env.NODE_ENV&&(I.propTypes={children:t.node.isRequired});var P=function(e){var o=e.children,t=e.helpTextId;return r.createElement(a.Box,{as:"span",display:"block",marginLeft:"space80"},r.createElement(B,{id:t,marginTop:"space0"},o))};P.displayName="BaseRadioCheckboxHelpText","development"===process.env.NODE_ENV&&(P.propTypes={children:t.node.isRequired,helpTextId:t.string.isRequired});var V=i.styled.input(i.css({border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",textTransform:"none",whiteSpace:"nowrap",width:"1px"})),j=r.forwardRef((function(e,o){var t=e.id,n=e.disabled,i=e.checked,l=e.hasError,d=e.children,s=e.helpText,h=u(e,["id","disabled","checked","hasError","children","helpText"]),f=c.useUID();return r.createElement(a.Box,{alignItems:"flex-start",display:"inline-flex",flexDirection:"column",verticalAlign:"top"},r.createElement(V,p({},h,{"aria-describedby":f,"aria-invalid":l,checked:i,disabled:n,id:t,ref:o,type:"radio"})),r.createElement(H,{disabled:n,htmlFor:t},r.createElement(F,{borderRadius:"borderRadiusCircle",disabled:n,type:"radio"},r.createElement(a.Box,{as:"span",backgroundColor:n&&i?"colorBackgroundDarkest":"colorBackgroundBody",borderRadius:"borderRadiusCircle",height:"sizeSquare25",width:"sizeSquare25"})),r.createElement(I,null,d)),s&&r.createElement(P,{helpTextId:f},s))}));j.displayName="Radio","development"===process.env.NODE_ENV&&(j.propTypes={children:t.node.isRequired,hasError:t.bool,helpText:t.oneOfType([t.string,t.node]),id:t.string.isRequired,value:t.string.isRequired});var M=function(e){var o=e.children,t=e.disabled,n=e.errorText,i=e.helpText,l=e.legend,d=e.orientation,s=e.required,c=(e.value,u(e,["children","disabled","errorText","helpText","legend","orientation","required","value"]));return r.createElement(a.Box,p({},a.safelySpreadBoxProps(c),{as:"fieldset",margin:"space0",padding:"space0",borderWidth:"borderWidth0"}),r.createElement(f,{as:"legend",htmlFor:void 0,required:s,marginBottom:"space0",disabled:t},l),i&&r.createElement(B,{marginTop:"space0"},i),r.createElement(a.Box,{marginLeft:"space20",marginRight:"space20",marginTop:"space30"},r.Children.map(o,(function(e){return r.createElement(a.Box,{display:"horizontal"===d?"inline-block":"block",marginBottom:"space30",marginRight:"horizontal"===d?"space70":null},e)})),n&&r.createElement(B,{marginTop:"space0",variant:"error"},n)))};M.displayName="InlineControlGroup",M.defaultProps={orientation:"vertical"},"development"===process.env.NODE_ENV&&(M.propTypes={children:t.node.isRequired,disabled:t.bool,errorText:t.oneOfType([t.string,t.node]),helpText:t.oneOfType([t.string,t.node]),legend:t.oneOfType([t.string,t.node]).isRequired,name:t.string.isRequired,orientation:t.oneOf(["vertical","horizontal"]),required:t.bool,value:t.string});var U=function(e){var o=e.onChange,t=e.children,n=e.errorText,i=e.name,a=e.value,l=e.disabled,d=u(e,["onChange","children","errorText","name","value","disabled"]);return r.createElement(M,p({},d,{disabled:l,errorText:n,name:i}),r.Children.map(t,(function(e){return r.isValidElement(e)?r.cloneElement(e,{checked:e.props.value===a,disabled:l,hasError:null!=n,name:i,onChange:function(e){null!=o&&o(e.target.value)}}):e})))};U.displayName="RadioGroup","development"===process.env.NODE_ENV&&(U.propTypes={name:t.string,onChange:t.func.isRequired});var G=i.styled.input({border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",textTransform:"none",whiteSpace:"nowrap",width:"1px"}),Y=r.forwardRef((function(e,o){var t=e.id,n=e.checked,i=e.children,l=e.helpText,d=e.disabled,s=e.hasError,h=e.indeterminate,f=e.isSelectAllChild,b=e.isSelectAll,m=u(e,["id","checked","children","helpText","disabled","hasError","indeterminate","isSelectAllChild","isSelectAll"]),g=c.useUID(),y=null;b&&(y="colorBackground"),(b&&n||b&&h)&&(y="colorBackgroundPrimaryLightest");var v=b?"space20":null;return f&&(v="space30"),r.createElement(a.Box,{backgroundColor:y,borderRadius:b?"borderRadius10":null,display:"inline-flex",flexDirection:"column",padding:b?"space30":null,paddingBottom:b?"space20":null,paddingLeft:v,paddingRight:f?"space30":null,paddingTop:b?"space20":null},r.createElement(G,p({},m,{"aria-describedby":g,"aria-checked":h?"mixed":n,"aria-invalid":s,checked:n,disabled:d,id:t,ref:o,type:"checkbox"})),r.createElement(H,{disabled:d,htmlFor:t},r.createElement(F,{alignItems:"center",borderRadius:"borderRadius10",disabled:d,display:"flex",position:"relative",type:"checkbox"},r.createElement(a.Box,{alignItems:"center",as:"span",display:"flex",height:h?void 0:"sizeSquare25",position:"absolute",top:h?void 0:"3px",transform:h?void 0:"rotate(-45deg)",width:"sizeSquare30",_before:h?void 0:{borderColor:d&&n?"colorBorderDark":"colorBorderInverse",borderRadius:"borderRadius10",borderStyle:"solid",borderWidth:"borderWidth10",bottom:"0",content:'""',display:"block",height:"sizeSquare25",position:"absolute",width:"size0"},_after:{borderColor:d&&n?"colorBorderDark":"colorBorderInverse",borderRadius:"borderRadius10",borderStyle:"solid",borderWidth:"borderWidth10",bottom:"0",content:'""',display:"block",height:"size0",position:h?void 0:"absolute",width:"sizeSquare30"}})),r.createElement(I,{fontWeight:b?null:"fontWeightNormal"},i)),l&&r.createElement(P,{helpTextId:g},l))}));Y.displayName="Checkbox","development"===process.env.NODE_ENV&&(Y.propTypes={children:t.node.isRequired,hasError:t.bool,helpText:t.oneOfType([t.string,t.node]),id:t.string.isRequired,indeterminate:t.bool,isSelectAll:t.bool,isSelectAllChild:t.bool,value:t.string.isRequired});var X=function(e){var o=e.children,t=e.disabled,n=e.errorText,i=e.isSelectAll,a=e.name,l=e.orientation,d=void 0===l?"vertical":l,s=u(e,["children","disabled","errorText","isSelectAll","name","orientation"]);return r.createElement(M,p({},s,{errorText:n,name:a,disabled:t,orientation:d}),r.Children.map(o,(function(e,o){return r.isValidElement(e)?r.cloneElement(e,{disabled:t,hasError:!!n||void 0,isSelectAll:i&&0===o,isSelectAllChild:i&&"vertical"===d&&0!==o,name:a}):e})))};X.displayName="CheckboxGroup","development"===process.env.NODE_ENV&&(X.propTypes={isSelectAll:t.bool,name:t.string});var J=function(e){var o=e.children,t=e.errorText,n=u(e,["children","errorText"]);return r.createElement(r.Fragment,null,r.createElement(a.Box,{backgroundColor:"colorBackground",borderRadius:"borderRadius20",padding:"space50"},r.createElement(Y,p({},n,{hasError:null!=t}),o)),t&&r.createElement(a.Box,{marginTop:"space30",marginLeft:"space50"},r.createElement(B,{variant:"error"},t)))};J.displayName="CheckboxDisclaimer","development"===process.env.NODE_ENV&&(J.propTypes={children:t.node.isRequired,errorText:t.oneOfType([t.string,t.node])});var K=function(e){var o=e.as,t=e.display,n=e.size,i=e.iconColor,a=e.title,l=e.decorative;if(!l&&null==a)throw new Error("[ChevronDownIcon]: Missing a title for non-decorative icon.");return r.createElement(w,{as:o,display:t,size:n,iconColor:i},r.createElement(c.UID,null,(function(e){return r.createElement("svg",{role:"img","aria-hidden":l,"aria-labelledby":e,width:"100%",height:"100%",viewBox:"0 0 24 24"},a?r.createElement("title",{id:e},a):null,r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.128 10.166a.5.5 0 01.798.596l-.054.072-4.5 5a.5.5 0 01-.672.066l-.072-.066-4.5-5a.5.5 0 01.678-.73l.066.062L12 14.752l4.128-4.586z"}))})))};K.displayName="ChevronDownIcon";var Q={className:void 0,size:void 0,style:void 0,height:void 0,width:void 0},Z=function(e){var o=e.children;return r.createElement(a.Box,{alignItems:"center",display:"inline-flex",position:"absolute",pointerEvents:"none",right:"space30",top:"50%",transform:"translateY(-50%)",zIndex:"zIndex10"},o)},$=i.styled.select(i.css({appearance:"none",border:"none",background:"transparent",outline:"none",resize:"none",display:"block",width:"100%",fontFamily:"inherit",fontSize:"fontSize30",lineHeight:"lineHeight30",fontWeight:"fontWeightNormal",color:"colorText",paddingTop:"space30",paddingRight:"space100",paddingBottom:"space30",paddingLeft:"space40",borderRadius:"borderRadius20",boxShadow:"none",cursor:"pointer","&:disabled":{cursor:"not-allowed",color:"colorTextWeak"}})),ee=r.forwardRef((function(e,o){var t=e.disabled,n=e.hasError,i=e.insertBefore,l=e.insertAfter,d=e.children,s=e.size,c=e.multiple,h=u(e,["disabled","hasError","insertBefore","insertAfter","children","size","multiple"]);return r.createElement(b,{disabled:t,hasError:n},i&&r.createElement(m,null,i),r.createElement(a.Box,{display:"flex",width:"100%",position:"relative"},r.createElement($,p({"aria-invalid":n,ref:o,multiple:c,disabled:t},h,Q,{size:c?s:0,"data-not-selectize":"true"}),d),!c&&r.createElement(Z,null,r.createElement(K,{size:"sizeIcon30",decorative:!0,"aria-hidden":"true"}))),l&&r.createElement(g,null,l))}));ee.displayName="Select","development"===process.env.NODE_ENV&&(ee.propTypes={id:t.string.isRequired,hasError:t.bool,onChange:t.func.isRequired});var re=p(p({},Q),{selected:void 0}),oe=i.styled.option(i.css({background:"transparent",color:"colorText",fontFamily:"fontFamilyText",lineHeight:"lineHeight50",paddingTop:"space30",paddingBottom:"space30",paddingLeft:"space20"})),te=r.forwardRef((function(e,o){var t=e.children,n=u(e,["children"]);return n.selected&&console.warn('"selected" is a blocked prop on this component, please use "value" on the select element.'),r.createElement(oe,p({ref:o},n,re),t)}));te.displayName="Option","development"===process.env.NODE_ENV&&(te.propTypes={value:t.string.isRequired,children:t.node.isRequired});var ne=i.styled.optgroup(i.css({background:"transparent",color:"colorText",fontFamily:"fontFamilyText",fontWeight:"fontWeightMedium",fontStyle:"normal",margin:"space20"})),ie=r.forwardRef((function(e,o){var t=e.label,n=e.children,i=u(e,["label","children"]);return r.createElement(ne,p({ref:o,label:t},i,Q),n)}));ie.displayName="OptionGroup","development"===process.env.NODE_ENV&&(ie.propTypes={label:t.string.isRequired,children:t.node.isRequired});var ae=function(e){var o=e.children,t=e.disabled,n=e.hasError,i=e.insertAfter,a=e.insertBefore,l=e.type,d=u(e,["children","disabled","hasError","insertAfter","insertBefore","type"]);return r.createElement(b,p({disabled:t,hasError:n,type:l},d,Q),a&&r.createElement(m,null,a),o,i&&r.createElement(g,null,i))};ae.displayName="FormControlWrapper","development"===process.env.NODE_ENV&&(ae.propTypes={children:t.node.isRequired,disabled:t.bool,hasError:t.bool,insertAfter:t.node,insertBefore:t.node,type:t.oneOf(["text","email","hidden","number","password","search","tel"])}),exports.Checkbox=Y,exports.CheckboxDisclaimer=J,exports.CheckboxGroup=X,exports.FormControlWrapper=ae,exports.FormHelpText=B,exports.FormHelpTextVariants=R,exports.FormInput=E,exports.FormLabel=f,exports.FormTextArea=W,exports.InputElement=x,exports.Option=te,exports.OptionGroup=ie,exports.Radio=j,exports.RadioGroup=U,exports.Select=ee,exports.SelectIconWrapper=Z;
!function(e,r){var o,t,n="function"==typeof Map?new Map:(o=[],t=[],{has:function(e){return o.indexOf(e)>-1},get:function(e){return t[o.indexOf(e)]},set:function(e,r){-1===o.indexOf(e)&&(o.push(e),t.push(r))},delete:function(e){var r=o.indexOf(e);r>-1&&(o.splice(r,1),t.splice(r,1))}}),i=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){i=function(e){var r=document.createEvent("Event");return r.initEvent(e,!0,!1),r}}function a(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!n.has(e)){var r,o=null,t=null,a=null,l=function(){e.clientWidth!==t&&p()},d=function(r){window.removeEventListener("resize",l,!1),e.removeEventListener("input",p,!1),e.removeEventListener("keyup",p,!1),e.removeEventListener("autosize:destroy",d,!1),e.removeEventListener("autosize:update",p,!1),Object.keys(r).forEach((function(o){e.style[o]=r[o]})),n.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",d,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",p,!1),window.addEventListener("resize",l,!1),e.addEventListener("input",p,!1),e.addEventListener("autosize:update",p,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",n.set(e,{destroy:d,update:p}),"vertical"===(r=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===r.resize&&(e.style.resize="horizontal"),o="content-box"===r.boxSizing?-(parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)):parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),isNaN(o)&&(o=0),p()}function s(r){var o=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=o,e.style.overflowY=r}function c(){if(0!==e.scrollHeight){var r=function(e){for(var r=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&r.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return r}(e),n=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+o+"px",t=e.clientWidth,r.forEach((function(e){e.node.scrollTop=e.scrollTop})),n&&(document.documentElement.scrollTop=n)}}function p(){c();var r=Math.round(parseFloat(e.style.height)),o=window.getComputedStyle(e,null),t="content-box"===o.boxSizing?Math.round(parseFloat(o.height)):e.offsetHeight;if(t<r?"hidden"===o.overflowY&&(s("scroll"),c(),t="content-box"===o.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==o.overflowY&&(s("hidden"),c(),t="content-box"===o.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),a!==t){a=t;var n=i("autosize:resized");try{e.dispatchEvent(n)}catch(e){}}}}function l(e){var r=n.get(e);r&&r.destroy()}function d(e){var r=n.get(e);r&&r.update()}var s=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((s=function(e){return e}).destroy=function(e){return e},s.update=function(e){return e}):((s=function(e,r){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return a(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e},s.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],d),e}),r.default=s,e.exports=r.default}(e,r)})),N=function(e,r,o){return((o=window.getComputedStyle)?o(e):e.currentStyle)[r.replace(/-(\w)/gi,(function(e,r){return r.toUpperCase()}))]};var _=function(e){var r=N(e,"line-height"),o=parseFloat(r,10);if(r===o+""){var t=e.style.lineHeight;e.style.lineHeight=r+"em",r=N(e,"line-height"),o=parseFloat(r,10),t?e.style.lineHeight=t:delete e.style.lineHeight}if(-1!==r.indexOf("pt")?(o*=4,o/=3):-1!==r.indexOf("mm")?(o*=96,o/=25.4):-1!==r.indexOf("cm")?(o*=96,o/=2.54):-1!==r.indexOf("in")?o*=96:-1!==r.indexOf("pc")&&(o*=16),o=Math.round(o),"normal"===r){var n=e.nodeName,i=document.createElement(n);i.innerHTML="&nbsp;","TEXTAREA"===n.toUpperCase()&&i.setAttribute("rows","1");var a=N(e,"font-size");i.style.fontSize=a,i.style.padding="0px",i.style.border="0px";var l=document.body;l.appendChild(i),o=i.offsetHeight,l.removeChild(i)}return o},q=O((function(e,r){var t,i=S&&S.__extends||(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)r.hasOwnProperty(o)&&(e[o]=r[o])},function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}),a=S&&S.__assign||Object.assign||function(e){for(var r,o=1,t=arguments.length;o<t;o++)for(var n in r=arguments[o])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},l=S&&S.__rest||function(e,r){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(o[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)r.indexOf(t[n])<0&&(o[t[n]]=e[t[n]])}return o};r.__esModule=!0;var d=_,s=function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.state={lineHeight:null},r.textarea=r.props.innerRef||o.createRef(),r.onResize=function(e){r.props.onResize&&r.props.onResize(e)},r.updateLineHeight=function(){r.textarea.current&&r.setState({lineHeight:d(r.textarea.current)})},r.onChange=function(e){var o=r.props.onChange;r.currentValue=e.currentTarget.value,o&&o(e)},r}return i(r,e),r.prototype.componentDidMount=function(){var e=this,r=this.props,o=r.maxRows,t=r.async;"number"==typeof o&&this.updateLineHeight(),"number"==typeof o||t?setTimeout((function(){return e.textarea.current&&z(e.textarea.current)})):this.textarea.current&&z(this.textarea.current),this.textarea.current&&this.textarea.current.addEventListener("autosize:resized",this.onResize)},r.prototype.componentWillUnmount=function(){this.textarea.current&&(this.textarea.current.removeEventListener("autosize:resized",this.onResize),z.destroy(this.textarea.current))},r.prototype.render=function(){var e=this.props,r=(e.onResize,e.maxRows),t=(e.onChange,e.style),n=(e.innerRef,e.children),i=l(e,["onResize","maxRows","onChange","style","innerRef","children"]),d=this.state.lineHeight,s=r&&d?d*r:null;return o.createElement("textarea",a({},i,{onChange:this.onChange,style:s?a({},t,{maxHeight:s}):t,ref:this.textarea}),n)},r.prototype.componentDidUpdate=function(){this.textarea.current&&z.update(this.textarea.current)},r.defaultProps={rows:1,async:!1},r.propTypes={rows:n.number,maxRows:n.number,onResize:n.func,innerRef:n.object,async:n.bool},r}(o.Component);r.TextareaAutosize=o.forwardRef((function(e,r){return o.createElement(s,a({},e,{innerRef:r}))}))}));C(q);q.TextareaAutosize;var A=C(O((function(e,r){r.__esModule=!0,r.default=q.TextareaAutosize}))),D=i.styled(A)((function(){return i.css({appearance:"none",border:"none",background:"transparent",outline:"none",display:"block",width:"100%",maxHeight:"size30",fontFamily:"inherit",fontSize:"fontSize30",lineHeight:"lineHeight30",fontWeight:"fontWeightNormal",color:"colorText",paddingTop:"space30",paddingRight:"space40",paddingBottom:"space30",paddingLeft:"space40",borderRadius:"borderRadius20",resize:"vertical",boxShadow:"none","&::placeholder":{color:"colorTextWeak",fontStyle:"italic"},"&:disabled":{cursor:"not-allowed",color:"colorTextWeak"}})})),W=r.forwardRef((function(e,o){var t=e.id,n=e.name,i=e.placeholder,a=e.children,l=e.readOnly,d=e.disabled,s=e.hasError,c=e.insertBefore,h=e.insertAfter,f=u(e,["id","name","placeholder","children","readOnly","disabled","hasError","insertBefore","insertAfter"]);return r.createElement(b,{readOnly:l,disabled:d,hasError:s},c&&r.createElement(m,null,c),r.createElement(D,p({"aria-invalid":s,"aria-readonly":l},v(f),{async:!0,ref:o,id:t,name:n,rows:3,placeholder:i,disabled:d,readOnly:l,spellCheck:!0}),a),h&&r.createElement(g,null,h))}));W.displayName="FormTextArea","development"===process.env.NODE_ENV&&(W.propTypes={id:t.string.isRequired,name:t.string,placeholder:t.string,disabled:t.bool,readOnly:t.bool,required:t.bool,hasError:t.bool,onChange:t.func.isRequired,onFocus:t.func,onBlur:t.func});var L=i.styled(a.Box)((function(e){var r,o=e._activeSibling,t=e._boxChild,n=e._checkedAndActiveSibling,a=e._checkedAndDisabledSibling,l=e._checkedAndFocusSibling,d=e._checkedAndHoverSibling,s=e._checkedAndInvalidSibling,c=e._checkedAndInvalidAndHoverSibling,p=e._checkedSibling,u=e._checkedSiblingAndBoxChild,h=e._disabledSibling,f=e._focusSibling,b=e._hoverSibling,m=e._invalidSibling,g=e._invalidAndHoverSibling,y=e.type,v=void 0===y?"checkbox":y,x="input[type="+v+"]:active + label &",E="input[type="+v+"]:checked + label &, input[type="+v+"][aria-checked=mixed] + label &",k="input[type="+v+"]:checked:active + label &, input[type="+v+"][aria-checked=mixed]:active + label &",w="input[type="+v+"]:checked + label & > *, input[type="+v+"][aria-checked=mixed] + label & > *",T="input[type="+v+"]:checked:disabled + label &, input[type="+v+"][aria-checked=mixed]:disabled + label &",R="input[type="+v+"]:checked:focus + label &, input[type="+v+"][aria-checked=mixed]:focus + label &",B="input[type="+v+"]:checked:hover:not(:disabled) + label &, input[type="+v+"][aria-checked=mixed]:hover:not(:disabled) + label &",S="input[type="+v+"][aria-invalid=true]:checked + label &",C="input[type="+v+"][aria-invalid=true]:checked:hover:not(:disabled) + label &",O="input[type="+v+"] + label & > *",z="input[type="+v+"]:disabled + label &",N="input[type="+v+"]:focus + label &",_="input[type="+v+"]:hover:not(:disabled):not(:checked) + label &",q="input[type="+v+"][aria-invalid=true] + label &",A="input[type="+v+"][aria-invalid=true]:hover:not(:disabled) + label &";return i.css(((r={})[x]=o,r[E]=p,r[k]=n,r[w]=u,r[T]=a,r[R]=l,r[B]=d,r[S]=s,r[C]=c,r[O]=t,r[z]=h,r[N]=f,r[_]=b,r[q]=m,r[A]=g,r))}));L.displayName="SiblingBox",L.defaultProps={alignItems:"center","aria-hidden":"true",display:"inline-flex",flexShrink:0,justifyContent:"center",transition:"all 120ms"},"development"===process.env.NODE_ENV&&(L.propTypes={type:t.oneOf(["checkbox","radio"])});var F=function(e){var o=e.children,t=e.disabled,n=u(e,["children","disabled"]);return r.createElement(L,p({as:"span",display:"flex",backgroundColor:"colorBackgroundBody",borderColor:"colorBorder",borderStyle:"solid",borderWidth:"borderWidth10",height:"sizeSquare50",margin:"space20",width:"sizeSquare50",_hoverSibling:{borderColor:"colorBorderPrimaryDark"},_focusSibling:{borderColor:"colorBorderPrimaryDark",boxShadow:"shadowFocus"},_activeSibling:t?void 0:{borderColor:"colorBorderPrimaryDarker",backgroundColor:"colorBackgroundPrimaryDarker"},_checkedSibling:{borderColor:"colorBorderPrimary",backgroundColor:"colorBackgroundPrimary"},_disabledSibling:{borderColor:"colorBorderLighter"},_invalidSibling:{borderColor:"colorBorderError"},_invalidAndHoverSibling:{borderColor:"colorBorderErrorDark"},_checkedAndHoverSibling:{borderColor:"colorBorderPrimaryDarker",backgroundColor:"colorBackgroundPrimaryDark"},_checkedAndFocusSibling:{borderColor:"colorBorderPrimaryDarker",backgroundColor:"colorBackgroundPrimaryDark"},_checkedAndActiveSibling:t?void 0:{borderColor:"colorBorderPrimaryDarker",backgroundColor:"colorBackgroundPrimaryDarker"},_checkedAndDisabledSibling:{borderColor:"colorBorderLighter",backgroundColor:"colorBackgroundDark"},_checkedAndInvalidSibling:{borderColor:"colorBorderError",backgroundColor:"colorBackgroundError"},_checkedAndInvalidAndHoverSibling:{borderColor:"colorBorderErrorDark",backgroundColor:"colorBackgroundErrorDark"}},n),o)};F.displayName="BaseRadioCheckboxControl","development"===process.env.NODE_ENV&&(F.propTypes={children:t.node.isRequired,disabled:t.bool});var H=function(e){var o=e.children,t=u(e,["children"]);return r.createElement(f,p({},t,{marginBottom:"space0"}),r.createElement(a.Box,{as:"span",display:"flex"},o))};H.displayName="BaseRadioCheckboxLabel","development"===process.env.NODE_ENV&&(H.propTypes={children:t.node.isRequired});var I=function(e){var o=e.children,t=u(e,["children"]);return r.createElement(d.Text,p({as:"span",color:"currentColor",marginLeft:"space20",fontWeight:"fontWeightNormal"},t),o)};I.displayName="BaseRadioCheckboxLabelText","development"===process.env.NODE_ENV&&(I.propTypes={children:t.node.isRequired});var P=function(e){var o=e.children,t=e.helpTextId;return r.createElement(a.Box,{as:"span",display:"block",marginLeft:"space80"},r.createElement(B,{id:t,marginTop:"space0"},o))};P.displayName="BaseRadioCheckboxHelpText","development"===process.env.NODE_ENV&&(P.propTypes={children:t.node.isRequired,helpTextId:t.string.isRequired});var V=i.styled.input(i.css({border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",textTransform:"none",whiteSpace:"nowrap",width:"1px"})),j=r.forwardRef((function(e,o){var t=e.id,n=e.disabled,i=e.checked,l=e.hasError,d=e.children,s=e.helpText,h=u(e,["id","disabled","checked","hasError","children","helpText"]),f=c.useUID();return r.createElement(a.Box,{alignItems:"flex-start",display:"inline-flex",flexDirection:"column",verticalAlign:"top"},r.createElement(V,p({},h,{"aria-describedby":f,"aria-invalid":l,checked:i,disabled:n,id:t,ref:o,type:"radio"})),r.createElement(H,{disabled:n,htmlFor:t},r.createElement(F,{borderRadius:"borderRadiusCircle",disabled:n,type:"radio"},r.createElement(a.Box,{as:"span",backgroundColor:n&&i?"colorBackgroundDarkest":"colorBackgroundBody",borderRadius:"borderRadiusCircle",height:"sizeSquare25",width:"sizeSquare25"})),r.createElement(I,null,d)),s&&r.createElement(P,{helpTextId:f},s))}));j.displayName="Radio","development"===process.env.NODE_ENV&&(j.propTypes={children:t.node.isRequired,hasError:t.bool,helpText:t.oneOfType([t.string,t.node]),id:t.string.isRequired,value:t.string.isRequired});var M=function(e){var o=e.children,t=e.disabled,n=e.errorText,i=e.helpText,l=e.legend,d=e.orientation,s=e.required,c=(e.value,u(e,["children","disabled","errorText","helpText","legend","orientation","required","value"]));return r.createElement(a.Box,p({},a.safelySpreadBoxProps(c),{as:"fieldset",margin:"space0",padding:"space0",borderWidth:"borderWidth0"}),r.createElement(f,{as:"legend",htmlFor:void 0,required:s,marginBottom:"space0",disabled:t},l),i&&r.createElement(B,{marginTop:"space0"},i),r.createElement(a.Box,{marginLeft:"space20",marginRight:"space20",marginTop:"space30"},r.Children.map(o,(function(e){return r.createElement(a.Box,{display:"horizontal"===d?"inline-block":"block",marginBottom:"space30",marginRight:"horizontal"===d?"space70":null},e)})),n&&r.createElement(B,{marginTop:"space0",variant:"error"},n)))};M.displayName="InlineControlGroup",M.defaultProps={orientation:"vertical"},"development"===process.env.NODE_ENV&&(M.propTypes={children:t.node.isRequired,disabled:t.bool,errorText:t.oneOfType([t.string,t.node]),helpText:t.oneOfType([t.string,t.node]),legend:t.oneOfType([t.string,t.node]).isRequired,name:t.string.isRequired,orientation:t.oneOf(["vertical","horizontal"]),required:t.bool,value:t.string});var U=function(e){var o=e.onChange,t=e.children,n=e.errorText,i=e.name,a=e.value,l=e.disabled,d=u(e,["onChange","children","errorText","name","value","disabled"]);return r.createElement(M,p({},d,{disabled:l,errorText:n,name:i}),r.Children.map(t,(function(e){return r.isValidElement(e)?r.cloneElement(e,{checked:e.props.value===a,disabled:l,hasError:null!=n,name:i,onChange:function(e){null!=o&&o(e.target.value)}}):e})))};U.displayName="RadioGroup","development"===process.env.NODE_ENV&&(U.propTypes={name:t.string,onChange:t.func.isRequired});var G=i.styled.input({border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",textTransform:"none",whiteSpace:"nowrap",width:"1px"}),Y=r.forwardRef((function(e,o){var t=e.id,n=e.checked,i=e.children,l=e.helpText,d=e.disabled,s=e.hasError,h=e.indeterminate,f=e.isSelectAllChild,b=e.isSelectAll,m=u(e,["id","checked","children","helpText","disabled","hasError","indeterminate","isSelectAllChild","isSelectAll"]),g=c.useUID(),y=null;b&&(y="colorBackground"),(b&&n||b&&h)&&(y="colorBackgroundPrimaryLightest");var v=b?"space20":null;return f&&(v="space30"),r.createElement(a.Box,{backgroundColor:y,borderRadius:b?"borderRadius10":null,display:"inline-flex",flexDirection:"column",padding:b?"space30":null,paddingBottom:b?"space20":null,paddingLeft:v,paddingRight:f?"space30":null,paddingTop:b?"space20":null},r.createElement(G,p({},m,{"aria-describedby":g,"aria-checked":h?"mixed":n,"aria-invalid":s,checked:n,disabled:d,id:t,ref:o,type:"checkbox"})),r.createElement(H,{disabled:d,htmlFor:t},r.createElement(F,{alignItems:"center",borderRadius:"borderRadius10",disabled:d,display:"flex",position:"relative",type:"checkbox"},r.createElement(a.Box,{alignItems:"center",as:"span",display:"flex",height:h?void 0:"sizeSquare25",position:"absolute",top:h?void 0:"3px",transform:h?void 0:"rotate(-45deg)",width:"sizeSquare30",_before:h?void 0:{borderColor:d&&n?"colorBorderDark":"colorBorderInverse",borderRadius:"borderRadius10",borderStyle:"solid",borderWidth:"borderWidth10",bottom:"0",content:'""',display:"block",height:"sizeSquare25",position:"absolute",width:"size0"},_after:{borderColor:d&&n?"colorBorderDark":"colorBorderInverse",borderRadius:"borderRadius10",borderStyle:"solid",borderWidth:"borderWidth10",bottom:"0",content:'""',display:"block",height:"size0",position:h?void 0:"absolute",width:"sizeSquare30"}})),r.createElement(I,{fontWeight:b?null:"fontWeightNormal"},i)),l&&r.createElement(P,{helpTextId:g},l))}));Y.displayName="Checkbox","development"===process.env.NODE_ENV&&(Y.propTypes={children:t.node.isRequired,hasError:t.bool,helpText:t.oneOfType([t.string,t.node]),id:t.string.isRequired,indeterminate:t.bool,isSelectAll:t.bool,isSelectAllChild:t.bool,value:t.string.isRequired});var X=function(e){var o=e.children,t=e.disabled,n=e.errorText,i=e.isSelectAll,a=e.name,l=e.orientation,d=void 0===l?"vertical":l,s=u(e,["children","disabled","errorText","isSelectAll","name","orientation"]);return r.createElement(M,p({},s,{errorText:n,name:a,disabled:t,orientation:d}),r.Children.map(o,(function(e,o){return r.isValidElement(e)?r.cloneElement(e,{disabled:t,hasError:!!n||void 0,isSelectAll:i&&0===o,isSelectAllChild:i&&"vertical"===d&&0!==o,name:a}):e})))};X.displayName="CheckboxGroup","development"===process.env.NODE_ENV&&(X.propTypes={isSelectAll:t.bool,name:t.string});var J=function(e){var o=e.children,t=e.errorText,n=u(e,["children","errorText"]);return r.createElement(r.Fragment,null,r.createElement(a.Box,{backgroundColor:"colorBackground",borderRadius:"borderRadius20",padding:"space50"},r.createElement(Y,p({},n,{hasError:null!=t}),o)),t&&r.createElement(a.Box,{marginTop:"space30",marginLeft:"space50"},r.createElement(B,{variant:"error"},t)))};J.displayName="CheckboxDisclaimer","development"===process.env.NODE_ENV&&(J.propTypes={children:t.node.isRequired,errorText:t.oneOfType([t.string,t.node])});var K=function(e){var o=e.as,t=e.display,n=e.size,i=e.iconColor,a=e.title,l=e.decorative;if(!l&&null==a)throw new Error("[ChevronDownIcon]: Missing a title for non-decorative icon.");return r.createElement(w,{as:o,display:t,size:n,iconColor:i},r.createElement(c.UID,null,(function(e){return r.createElement("svg",{role:"img","aria-hidden":l,"aria-labelledby":e,width:"100%",height:"100%",viewBox:"0 0 24 24"},a?r.createElement("title",{id:e},a):null,r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.128 10.166a.5.5 0 01.798.596l-.054.072-4.5 5a.5.5 0 01-.672.066l-.072-.066-4.5-5a.5.5 0 01.678-.73l.066.062L12 14.752l4.128-4.586z"}))})))};K.displayName="ChevronDownIcon";var Q={className:void 0,size:void 0,style:void 0,height:void 0,width:void 0},Z=function(e){var o=e.children;return r.createElement(a.Box,{alignItems:"center",display:"inline-flex",position:"absolute",pointerEvents:"none",right:"space30",top:"50%",transform:"translateY(-50%)",zIndex:"zIndex10"},o)},$=i.styled.select(i.css({appearance:"none",border:"none",background:"transparent",outline:"none",resize:"none",display:"block",width:"100%",fontFamily:"inherit",fontSize:"fontSize30",lineHeight:"lineHeight30",fontWeight:"fontWeightNormal",color:"colorText",paddingTop:"space30",paddingRight:"space100",paddingBottom:"space30",paddingLeft:"space40",borderRadius:"borderRadius20",boxShadow:"none",cursor:"pointer","&:disabled":{cursor:"not-allowed",color:"colorTextWeak"}})),ee=r.forwardRef((function(e,o){var t=e.disabled,n=e.hasError,i=e.insertBefore,l=e.insertAfter,d=e.children,s=e.size,c=e.multiple,h=u(e,["disabled","hasError","insertBefore","insertAfter","children","size","multiple"]);return r.createElement(b,{disabled:t,hasError:n},i&&r.createElement(m,null,i),r.createElement(a.Box,{display:"flex",width:"100%",position:"relative"},r.createElement($,p({"aria-invalid":n,ref:o,multiple:c,disabled:t},h,Q,{size:c?s:0,"data-not-selectize":"true"}),d),!c&&r.createElement(Z,null,r.createElement(K,{size:"sizeIcon30",decorative:!0,"aria-hidden":"true"}))),l&&r.createElement(g,null,l))}));ee.displayName="Select","development"===process.env.NODE_ENV&&(ee.propTypes={id:t.string.isRequired,hasError:t.bool,onChange:t.func.isRequired});var re=p(p({},Q),{selected:void 0}),oe=i.styled.option(i.css({background:"transparent",color:"colorText",fontFamily:"fontFamilyText",lineHeight:"lineHeight50",paddingTop:"space30",paddingBottom:"space30",paddingLeft:"space20"})),te=r.forwardRef((function(e,o){var t=e.children,n=u(e,["children"]);return n.selected&&console.warn('"selected" is a blocked prop on this component, please use "value" on the select element.'),r.createElement(oe,p({ref:o},n,re),t)}));te.displayName="Option","development"===process.env.NODE_ENV&&(te.propTypes={value:t.string.isRequired,children:t.node.isRequired});var ne=i.styled.optgroup(i.css({background:"transparent",color:"colorText",fontFamily:"fontFamilyText",fontWeight:"fontWeightMedium",fontStyle:"normal",margin:"space20"})),ie=r.forwardRef((function(e,o){var t=e.label,n=e.children,i=u(e,["label","children"]);return r.createElement(ne,p({ref:o,label:t},i,Q),n)}));ie.displayName="OptionGroup","development"===process.env.NODE_ENV&&(ie.propTypes={label:t.string.isRequired,children:t.node.isRequired});var ae=function(e){var o=e.children,t=e.disabled,n=e.hasError,i=e.insertAfter,a=e.insertBefore,l=e.type,d=u(e,["children","disabled","hasError","insertAfter","insertBefore","type"]);return r.createElement(b,p({disabled:t,hasError:n,type:l},d,Q),a&&r.createElement(m,null,a),o,i&&r.createElement(g,null,i))};ae.displayName="FormControlWrapper","development"===process.env.NODE_ENV&&(ae.propTypes={children:t.node.isRequired,disabled:t.bool,hasError:t.bool,insertAfter:t.node,insertBefore:t.node,type:t.oneOf(["text","email","hidden","number","password","search","tel"])}),exports.Checkbox=Y,exports.CheckboxDisclaimer=J,exports.CheckboxGroup=X,exports.FormControlWrapper=ae,exports.FormHelpText=B,exports.FormHelpTextVariants=R,exports.FormInput=E,exports.FormLabel=f,exports.FormTextArea=W,exports.InputElement=x,exports.Option=te,exports.OptionGroup=ie,exports.Radio=j,exports.RadioGroup=U,exports.Select=ee,exports.SelectIconWrapper=Z;
{
"name": "@twilio-paste/form",
"version": "1.5.21",
"version": "1.5.22",
"category": "user input",

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

"peerDependencies": {
"@twilio-paste/box": "^2.6.1",
"@twilio-paste/design-tokens": "^5.3.1",
"@twilio-paste/flex": "^0.3.36",
"@twilio-paste/icons": "^2.4.0",
"@twilio-paste/box": "^2.6.2",
"@twilio-paste/design-tokens": "^5.3.2",
"@twilio-paste/flex": "^0.3.37",
"@twilio-paste/icons": "^2.4.1",
"@twilio-paste/screen-reader-only": "^1.1.11",
"@twilio-paste/style-props": "^1.2.7",
"@twilio-paste/style-props": "^1.2.8",
"@twilio-paste/styling-library": "^0.1.1",
"@twilio-paste/text": "^2.2.1",
"@twilio-paste/theme": "^3.2.7",
"@twilio-paste/types": "^3.0.11",
"@twilio-paste/text": "^2.2.2",
"@twilio-paste/theme": "^3.2.8",
"@twilio-paste/types": "^3.0.12",
"prop-types": "^15.7.2",

@@ -51,14 +51,14 @@ "react": "^16.8.6",

"devDependencies": {
"@twilio-paste/box": "^2.6.2",
"@twilio-paste/design-tokens": "^5.3.2",
"@twilio-paste/flex": "^0.3.37",
"@twilio-paste/icons": "^2.4.1",
"@twilio-paste/box": "^2.6.3",
"@twilio-paste/design-tokens": "^5.4.0",
"@twilio-paste/flex": "^0.3.38",
"@twilio-paste/icons": "^2.4.2",
"@twilio-paste/screen-reader-only": "^1.1.11",
"@twilio-paste/style-props": "^1.2.8",
"@twilio-paste/style-props": "^1.2.9",
"@twilio-paste/styling-library": "^0.1.1",
"@twilio-paste/text": "^2.2.2",
"@twilio-paste/theme": "^3.2.8",
"@twilio-paste/types": "^3.0.12"
"@twilio-paste/text": "^2.2.3",
"@twilio-paste/theme": "^3.2.9",
"@twilio-paste/types": "^3.0.13"
},
"gitHead": "58f1b343222a2f6f59c2c9a00ee41de74410b71c"
"gitHead": "36be3707496710858e07844707336b84ff66736d"
}
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