@twilio-paste/form
Advanced tools
Comparing version 2.2.7 to 2.2.8
@@ -6,2 +6,10 @@ # Change Log | ||
## [2.2.8](https://github.com/twilio-labs/paste/compare/@twilio-paste/form@2.2.7...@twilio-paste/form@2.2.8) (2020-09-08) | ||
**Note:** Version bump only for package @twilio-paste/form | ||
## [2.2.7](https://github.com/twilio-labs/paste/compare/@twilio-paste/form@2.2.6...@twilio-paste/form@2.2.7) (2020-09-03) | ||
@@ -8,0 +16,0 @@ |
@@ -1,2 +0,2 @@ | ||
import e,{createElement as r,forwardRef as o,createContext as i,useContext as n,Children as t,useMemo as a,isValidElement as l,cloneElement as d,Fragment as s}from"react";import c,{oneOf as p,bool as u,string as h,node as v,func as b,oneOfType as f}from"prop-types";import{styled as g,css as y,system as m,compose as x,display as k,size as E}from"@twilio-paste/styling-library";import{Box as w,safelySpreadBoxProps as T}from"@twilio-paste/box";import{Flex as R}from"@twilio-paste/flex";import{Text as B,safelySpreadTextProps as S}from"@twilio-paste/text";import{ScreenReaderOnly as N}from"@twilio-paste/screen-reader-only";import{UID as C,useUID as z}from"react-uid"; | ||
import e,{createElement as r,forwardRef as o,createContext as n,useContext as i,Children as t,useMemo as a,isValidElement as l,cloneElement as d,Fragment as s}from"react";import c,{oneOf as p,bool as u,string as h,node as v,func as f,oneOfType as b}from"prop-types";import{styled as g,css as y}from"@twilio-paste/styling-library";import{Box as m,safelySpreadBoxProps as x}from"@twilio-paste/box";import{Flex as k}from"@twilio-paste/flex";import{Text as E,safelySpreadTextProps as w}from"@twilio-paste/text";import{ScreenReaderOnly as T}from"@twilio-paste/screen-reader-only";import{UID as R,useUID as B}from"react-uid"; | ||
/*! ***************************************************************************** | ||
@@ -15,3 +15,17 @@ Copyright (c) Microsoft Corporation. All rights reserved. | ||
and limitations under the License. | ||
***************************************************************************** */var O=function(){return(O=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 _(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 W=g(B)(y({backgroundColor:"colorBackgroundRequired",borderRadius:"50%",cursor:"pointer",display:"block",height:"4px",marginRight:"space20",width:"4px"})),I=function(e){var o=e.as,i=e.marginBottom,n=e.required,t=e.disabled,a=e.children,l=e.variant,d=_(e,["as","marginBottom","required","disabled","children","variant"]),s="colorText";return t&&"inverse"===l?s="colorTextInverseWeak":t?s="colorTextWeak":"inverse"===l&&(s="colorTextInverse"),r(w,O({},T(d),{as:o,borderBottomWidth:"borderWidth0",display:"block",marginBottom:i||"space20",paddingLeft:"space0",paddingRight:"space0",textTransform:"none"}),r(R,{as:"span",vAlignContent:"center"},n?r(W,{as:"span",lineHeight:"lineHeight30"},r(N,null,"Required: ")):null,r(B,{as:"span",fontSize:"fontSize30",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight30",color:s,cursor:t?"not-allowed":"pointer"},a)))};I.displayName="FormLabel",I.defaultProps={as:"label"},"development"===process.env.NODE_ENV&&(I.propTypes={as:p(["label","legend"]),disabled:u,htmlFor:h,marginBottom:p(["space0"]),required:u,variant:p(["default","inverse"])});var A={disabled:u,hasError:u,readOnly:u,type:p(["text","email","hidden","number","password","search","tel"]),variant:p(["default","inverse"])},D=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(w,{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)};D.displayName="DefaultFieldWrapper","development"===process.env.NODE_ENV&&(D.propTypes=A);var q=function(e){var o=e.disabled,i=e.hasError,n=e.readOnly,t=e.children,a=e.type,l="shadowBorderInverse",d="shadowBorderInverseLightest";return o?(l="shadowBorderInverseDarker",d="shadowBorderInverseDarker"):n?d="shadowBorderInverse":i?l="shadowBorderErrorLight":"hidden"===a&&(l=null),r(w,{display:"flex",width:"100%",backgroundColor:n||o?"colorBackgroundInverseLight":"colorBackgroundInverse",boxShadow:l,borderRadius:"borderRadius20",color:"colorTextInverse",transition:"box-shadow 100ms ease-in",cursor:o?"not-allowed":"text",_hover:{boxShadow:d},_focusWithin:{backgroundColor:"colorBackgroundInverse",boxShadow:"shadowFocusInverse"},_active:{boxShadow:d}},t)};q.displayName="InverseFieldWrapper","development"===process.env.NODE_ENV&&(q.propTypes=A);var L=function(e){var o=e.children,i=e.disabled,n=e.hasError,t=e.readOnly,a=e.type,l=e.variant,d=void 0===l?"default":l,s=function(e){switch(e){case"inverse":return q;default:return D}}(d);return r(s,{disabled:i,hasError:n,readOnly:t,type:a,variant:d},o)};L.displayName="FieldWrapper","development"===process.env.NODE_ENV&&(L.propTypes=A);var H=function(e){var o=e.children,i=e.disabled,n=e.variant,t="colorBackground",a="colorBorderLighter";return i&&"inverse"===n?(t="none",a="colorBorderInverseDarker"):"inverse"===n&&(t="colorBackgroundInverseLight",a="colorBorderInverse"),null==o?null:r(w,{alignItems:"flex-start",backgroundColor:t,borderBottomLeftRadius:"borderRadius20",borderRightColor:a,borderRightStyle:"solid",borderRightWidth:"borderWidth10",borderTopLeftRadius:"borderRadius20",display:"flex",lineHeight:"lineHeight20",padding:"space30"},o)};H.displayName="Prefix","development"===process.env.NODE_ENV&&(H.propTypes={children:v.isRequired,variant:p(["default","inverse"])});var F=function(e){var o=e.children,i=e.disabled,n=e.variant,t="colorBackground",a="colorBorderLighter";return i&&"inverse"===n?(t="none",a="colorBorderInverseDarker"):"inverse"===n&&(t="colorBackgroundInverseLight",a="colorBorderInverse"),null==o?null:r(w,{alignItems:"flex-start",backgroundColor:t,borderBottomRightRadius:"borderRadius20",borderLeftColor:a,borderLeftStyle:"solid",borderLeftWidth:"borderWidth10",borderTopRightRadius:"borderRadius20",display:"flex",lineHeight:"lineHeight20",padding:"space30"},o)};F.displayName="Suffix","development"===process.env.NODE_ENV&&(F.propTypes={children:v.isRequired,variant:p(["default","inverse"])});var P={className:void 0,size:void 0,style:void 0,height:void 0,width:void 0},V=function(e){var o=e.children,i=e.disabled,n=e.hasError,t=e.insertAfter,a=e.insertBefore,l=e.readOnly,d=e.type,s=e.variant,c=_(e,["children","disabled","hasError","insertAfter","insertBefore","readOnly","type","variant"]);return r(L,O({disabled:i,hasError:n,readOnly:l,type:d,variant:s},c,P),a&&r(H,{disabled:i,variant:s},a),o,t&&r(F,{disabled:i,variant:s},t))};V.displayName="FormControlWrapper","development"===process.env.NODE_ENV&&(V.propTypes={children:v.isRequired,disabled:u,hasError:u,insertAfter:v,insertBefore:v,readOnly:u,type:p(["text","email","hidden","number","password","search","tel"]),variant:p(["default","inverse"])});var j=["className","style","size","height","width"],M=function(e){return Object.keys(e).reduce((function(r,o){return j.includes(o)||(r[o]=e[o]),r}),{})},Y=g.input((function(e){return y({appearance:"none",background:"transparent",border:"none",borderRadius:"borderRadius20",boxShadow:"none",color:"inherit",display:"block",fontFamily:"inherit",fontSize:"fontSize30",fontWeight:"fontWeightNormal",lineHeight:"lineHeight20",outline:"none",paddingBottom:"space30",paddingLeft:"space40",paddingRight:"space40",paddingTop:"space30",resize:"none",width:"100%","&::placeholder":{color:"inverse"===e.variant?"colorTextInverseWeak":"colorTextWeak",fontStyle:"italic"},"&:focus::placeholder":{color:"inverse"===e.variant?"colorTextInverseWeak":"colorTextWeak"},"&:disabled":{color:"inverse"===e.variant?"colorTextInverseWeaker":"colorTextWeaker",cursor:"not-allowed"}})})),X=o((function(e,o){var i=e.disabled,n=e.hasError,t=e.id,a=e.insertAfter,l=e.insertBefore,d=e.name,s=e.placeholder,c=e.readOnly,p=e.required,u=e.type,h=e.value,v=e.variant,b=_(e,["disabled","hasError","id","insertAfter","insertBefore","name","placeholder","readOnly","required","type","value","variant"]),f={type:u};return"number"===u&&(f.type="text",f.inputmode="numeric",f.pattern="[0-9]*"),r(V,{disabled:i,hasError:n,insertAfter:a,insertBefore:l,readOnly:c,type:u,variant:v},r(Y,O({"aria-invalid":n,"aria-readonly":c},M(b),f,{disabled:i,id:t,name:d,placeholder:s,readOnly:c,ref:o,required:p,value:h,variant:v})))}));X.displayName="FormInput","development"===process.env.NODE_ENV&&(X.propTypes={disabled:u,hasError:u,id:h.isRequired,name:h,onBlur:b,onChange:b,onFocus:b,placeholder:h,readOnly:u,required:u,type:p(["text","email","hidden","number","password","search","tel"]).isRequired,value:h.isRequired});var U=m({color:{property:"color",scale:"textColors"}}),G=g.span(x(k,U,E));G.defaultProps={display:"block",color:"currentColor",size:"sizeIcon30"},G.displayName="IconWrapper";var J=function(e){var o=e.as,i=e.display,n=e.size,t=e.color,a=e.title,l=e.decorative;if(!l&&null==a)throw new Error("[ErrorIcon]: Missing a title for non-decorative icon.");return r(G,{as:o,display:i,size:n,color:t},r(C,null,(function(e){return r("svg",{role:"img","aria-hidden":l,width:"100%",height:"100%",viewBox:"0 0 20 20","aria-labelledby":e},a?r("title",{id:e},a):null,r("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.247 2.517l6.236 6.236a1.764 1.764 0 010 2.494l-6.236 6.236a1.764 1.764 0 01-2.494 0l-6.236-6.236a1.764 1.764 0 010-2.494l6.236-6.236a1.764 1.764 0 012.494 0zM10 12a1 1 0 100 2 1 1 0 000-2zm.01-5h-.02c-.604 0-1.073.592-.978 1.244l.428 2.238c.04.296.278.518.557.518h.006c.279 0 .516-.222.557-.518l.428-2.238c.095-.652-.367-1.237-.978-1.244z"}))})))};J.displayName="ErrorIcon";var K={DEFAULT:"default",ERROR:"error",ERROR_INVERSE:"error_inverse",INVERSE:"inverse"},Q=function(e){var o=e.marginTop,i=e.children,n=e.variant,t=_(e,["marginTop","children","variant"]),a=null;switch(n){case K.ERROR:a=r(J,{color:"colorTextError",decorative:!0,size:"sizeIcon20"});break;case K.ERROR_INVERSE:a=r(J,{color:"colorTextErrorLight",decorative:!0,size:"sizeIcon20"})}var l="colorTextWeak";return"error"===n?l="colorTextError":"error_inverse"===n?l="colorTextErrorLight":"inverse"===n&&(l="colorTextInverseWeak"),r(R,{vAlignContent:"center",marginTop:o||"space30"},a,r(B,O({},S(t),{as:"div",color:l,fontSize:"fontSize30",lineHeight:"lineHeight30",marginLeft:a?"space20":void 0}),i))};Q.displayName="FormHelpText","development"===process.env.NODE_ENV&&(Q.propTypes={marginTop:p(["space0"])});var Z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function $(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ee(e,r){return e(r={exports:{}},r.exports),r.exports}var re=ee((function(e,r){ | ||
***************************************************************************** */var S=function(){return(S=Object.assign||function(e){for(var r,o=1,n=arguments.length;o<n;o++)for(var i in r=arguments[o])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e}).apply(this,arguments)};function O(e,r){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(o[n[i]]=e[n[i]])}return o}var N=g(E)(y({backgroundColor:"colorBackgroundRequired",borderRadius:"50%",cursor:"pointer",display:"block",height:"4px",marginRight:"space20",width:"4px"})),C=function(e){var o=e.as,n=e.marginBottom,i=e.required,t=e.disabled,a=e.children,l=e.variant,d=O(e,["as","marginBottom","required","disabled","children","variant"]),s="colorText";return t&&"inverse"===l?s="colorTextInverseWeak":t?s="colorTextWeak":"inverse"===l&&(s="colorTextInverse"),r(m,S({},x(d),{as:o,borderBottomWidth:"borderWidth0",display:"block",marginBottom:n||"space20",paddingLeft:"space0",paddingRight:"space0",textTransform:"none"}),r(k,{as:"span",vAlignContent:"center"},i?r(N,{as:"span",lineHeight:"lineHeight30"},r(T,null,"Required: ")):null,r(E,{as:"span",fontSize:"fontSize30",fontWeight:"fontWeightSemibold",lineHeight:"lineHeight30",color:s,cursor:t?"not-allowed":"pointer"},a)))};C.displayName="FormLabel",C.defaultProps={as:"label"},"development"===process.env.NODE_ENV&&(C.propTypes={as:p(["label","legend"]),disabled:u,htmlFor:h,marginBottom:p(["space0"]),required:u,variant:p(["default","inverse"])});var z={disabled:u,hasError:u,readOnly:u,type:p(["text","email","hidden","number","password","search","tel"]),variant:p(["default","inverse"])},_=function(e){var o=e.disabled,n=e.hasError,i=e.readOnly,t=e.children,a=e.type,l="shadowBorder",d="shadowBorderPrimaryDark";return o?(l="shadowBorderLight",d="shadowBorderLight"):i?d="shadowBorder":n?(l="shadowBorderError",d="shadowBorderErrorDark"):"hidden"===a&&(l=null),r(m,{display:"flex",width:"100%",backgroundColor:i||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="DefaultFieldWrapper","development"===process.env.NODE_ENV&&(_.propTypes=z);var I=function(e){var o=e.disabled,n=e.hasError,i=e.readOnly,t=e.children,a=e.type,l="shadowBorderInverse",d="shadowBorderInverseLightest";return o?(l="shadowBorderInverseDarker",d="shadowBorderInverseDarker"):i?d="shadowBorderInverse":n?l="shadowBorderErrorLight":"hidden"===a&&(l=null),r(m,{display:"flex",width:"100%",backgroundColor:i||o?"colorBackgroundInverseLight":"colorBackgroundInverse",boxShadow:l,borderRadius:"borderRadius20",color:"colorTextInverse",transition:"box-shadow 100ms ease-in",cursor:o?"not-allowed":"text",_hover:{boxShadow:d},_focusWithin:{backgroundColor:"colorBackgroundInverse",boxShadow:"shadowFocusInverse"},_active:{boxShadow:d}},t)};I.displayName="InverseFieldWrapper","development"===process.env.NODE_ENV&&(I.propTypes=z);var W=function(e){var o=e.children,n=e.disabled,i=e.hasError,t=e.readOnly,a=e.type,l=e.variant,d=void 0===l?"default":l,s=function(e){switch(e){case"inverse":return I;default:return _}}(d);return r(s,{disabled:n,hasError:i,readOnly:t,type:a,variant:d},o)};W.displayName="FieldWrapper","development"===process.env.NODE_ENV&&(W.propTypes=z);var A=function(e){var o=e.children,n=e.disabled,i=e.variant,t="colorBackground",a="colorBorderLighter";return n&&"inverse"===i?(t="none",a="colorBorderInverseDarker"):"inverse"===i&&(t="colorBackgroundInverseLight",a="colorBorderInverse"),null==o?null:r(m,{alignItems:"flex-start",backgroundColor:t,borderBottomLeftRadius:"borderRadius20",borderRightColor:a,borderRightStyle:"solid",borderRightWidth:"borderWidth10",borderTopLeftRadius:"borderRadius20",display:"flex",lineHeight:"lineHeight20",padding:"space30"},o)};A.displayName="Prefix","development"===process.env.NODE_ENV&&(A.propTypes={children:v.isRequired,variant:p(["default","inverse"])});var D=function(e){var o=e.children,n=e.disabled,i=e.variant,t="colorBackground",a="colorBorderLighter";return n&&"inverse"===i?(t="none",a="colorBorderInverseDarker"):"inverse"===i&&(t="colorBackgroundInverseLight",a="colorBorderInverse"),null==o?null:r(m,{alignItems:"flex-start",backgroundColor:t,borderBottomRightRadius:"borderRadius20",borderLeftColor:a,borderLeftStyle:"solid",borderLeftWidth:"borderWidth10",borderTopRightRadius:"borderRadius20",display:"flex",lineHeight:"lineHeight20",padding:"space30"},o)};D.displayName="Suffix","development"===process.env.NODE_ENV&&(D.propTypes={children:v.isRequired,variant:p(["default","inverse"])});var q={className:void 0,size:void 0,style:void 0,height:void 0,width:void 0},L=function(e){var o=e.children,n=e.disabled,i=e.hasError,t=e.insertAfter,a=e.insertBefore,l=e.readOnly,d=e.type,s=e.variant,c=O(e,["children","disabled","hasError","insertAfter","insertBefore","readOnly","type","variant"]);return r(W,S({disabled:n,hasError:i,readOnly:l,type:d,variant:s},c,q),a&&r(A,{disabled:n,variant:s},a),o,t&&r(D,{disabled:n,variant:s},t))};L.displayName="FormControlWrapper","development"===process.env.NODE_ENV&&(L.propTypes={children:v.isRequired,disabled:u,hasError:u,insertAfter:v,insertBefore:v,readOnly:u,type:p(["text","email","hidden","number","password","search","tel"]),variant:p(["default","inverse"])});var H=["className","style","size","height","width"],F=function(e){return Object.keys(e).reduce((function(r,o){return H.includes(o)||(r[o]=e[o]),r}),{})},P=g.input((function(e){return y({appearance:"none",background:"transparent",border:"none",borderRadius:"borderRadius20",boxShadow:"none",color:"inherit",display:"block",fontFamily:"inherit",fontSize:"fontSize30",fontWeight:"fontWeightNormal",lineHeight:"lineHeight20",outline:"none",paddingBottom:"space30",paddingLeft:"space40",paddingRight:"space40",paddingTop:"space30",resize:"none",width:"100%","&::placeholder":{color:"inverse"===e.variant?"colorTextInverseWeak":"colorTextWeak",fontStyle:"italic"},"&:focus::placeholder":{color:"inverse"===e.variant?"colorTextInverseWeak":"colorTextWeak"},"&:disabled":{color:"inverse"===e.variant?"colorTextInverseWeaker":"colorTextWeaker",cursor:"not-allowed"}})})),V=o((function(e,o){var n=e.disabled,i=e.hasError,t=e.id,a=e.insertAfter,l=e.insertBefore,d=e.name,s=e.placeholder,c=e.readOnly,p=e.required,u=e.type,h=e.value,v=e.variant,f=O(e,["disabled","hasError","id","insertAfter","insertBefore","name","placeholder","readOnly","required","type","value","variant"]),b={type:u};return"number"===u&&(b.type="text",b.inputmode="numeric",b.pattern="[0-9]*"),r(L,{disabled:n,hasError:i,insertAfter:a,insertBefore:l,readOnly:c,type:u,variant:v},r(P,S({"aria-invalid":i,"aria-readonly":c},F(f),b,{disabled:n,id:t,name:d,placeholder:s,readOnly:c,ref:o,required:p,value:h,variant:v})))}));V.displayName="FormInput","development"===process.env.NODE_ENV&&(V.propTypes={disabled:u,hasError:u,id:h.isRequired,name:h,onBlur:f,onChange:f,onFocus:f,placeholder:h,readOnly:u,required:u,type:p(["text","email","hidden","number","password","search","tel"]).isRequired,value:h.isRequired}) | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */;var j=function(){return(j=Object.assign||function(e){for(var r,o=1,n=arguments.length;o<n;o++)for(var i in r=arguments[o])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e}).apply(this,arguments)},M=function(e){var o=e.display,n=e.color,i=e.size,t=function(e,r){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(o[n[i]]=e[n[i]])}return o}(e,["display","color","size"]);return r(m,j({},x(t),{lineHeight:"lineHeight0",display:o,color:n,size:i}))};M.defaultProps={as:"span",display:"block",color:"currentColor",size:"sizeIcon30"},M.displayName="IconWrapper";var Y=function(e){var o=e.as,n=e.display,i=e.size,t=e.color,a=e.title,l=e.decorative;if(!l&&null==a)throw new Error("[ErrorIcon]: Missing a title for non-decorative icon.");return r(M,{as:o,display:n,size:i,color:t},r(R,null,(function(e){return r("svg",{role:"img","aria-hidden":l,width:"100%",height:"100%",viewBox:"0 0 20 20","aria-labelledby":e},a?r("title",{id:e},a):null,r("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.247 2.517l6.236 6.236a1.764 1.764 0 010 2.494l-6.236 6.236a1.764 1.764 0 01-2.494 0l-6.236-6.236a1.764 1.764 0 010-2.494l6.236-6.236a1.764 1.764 0 012.494 0zM10 12a1 1 0 100 2 1 1 0 000-2zm.01-5h-.02c-.604 0-1.073.592-.978 1.244l.428 2.238c.04.296.278.518.557.518h.006c.279 0 .516-.222.557-.518l.428-2.238c.095-.652-.367-1.237-.978-1.244z"}))})))};Y.displayName="ErrorIcon";var X={DEFAULT:"default",ERROR:"error",ERROR_INVERSE:"error_inverse",INVERSE:"inverse"},U=function(e){var o=e.marginTop,n=e.children,i=e.variant,t=O(e,["marginTop","children","variant"]),a=null;switch(i){case X.ERROR:a=r(Y,{color:"colorTextError",decorative:!0,size:"sizeIcon20"});break;case X.ERROR_INVERSE:a=r(Y,{color:"colorTextErrorLight",decorative:!0,size:"sizeIcon20"})}var l="colorTextWeak";return"error"===i?l="colorTextError":"error_inverse"===i?l="colorTextErrorLight":"inverse"===i&&(l="colorTextInverseWeak"),r(k,{vAlignContent:"center",marginTop:o||"space30"},a,r(E,S({},w(t),{as:"div",color:l,fontSize:"fontSize30",lineHeight:"lineHeight30",marginLeft:a?"space20":void 0}),n))};U.displayName="FormHelpText","development"===process.env.NODE_ENV&&(U.propTypes={marginTop:p(["space0"])});var G="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function J(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function K(e,r){return e(r={exports:{}},r.exports),r.exports}var Q=K((function(e,r){ | ||
/*! | ||
@@ -22,2 +36,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)})),oe=function(e,r,o){return((o=window.getComputedStyle)?o(e):e.currentStyle)[r.replace(/-(\w)/gi,(function(e,r){return r.toUpperCase()}))]};var ie=function(e){var r=oe(e,"line-height"),o=parseFloat(r,10);if(r===o+""){var i=e.style.lineHeight;e.style.lineHeight=r+"em",r=oe(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=" ","TEXTAREA"===n.toUpperCase()&&t.setAttribute("rows","1");var a=oe(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},ne=ee((function(r,o){var i,n=Z&&Z.__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=Z&&Z.__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=Z&&Z.__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 l=ie,d=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:l(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&&re(e.textarea.current)})):this.textarea.current&&re(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),re.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&&re.update(this.textarea.current)},o.defaultProps={rows:1,async:!1},o.propTypes={rows:c.number,maxRows:c.number,onResize:c.func,innerRef:c.object,async:c.bool},o}(e.Component);o.TextareaAutosize=e.forwardRef((function(r,o){return e.createElement(d,t({},r,{innerRef:o}))}))}));$(ne);ne.TextareaAutosize;var te=g($(ee((function(e,r){r.__esModule=!0,r.default=ne.TextareaAutosize}))))((function(e){return y({appearance:"none",background:"transparent",border:"none",borderRadius:"borderRadius20",boxShadow:"none",color:"inherit",display:"block",fontFamily:"inherit",fontSize:"fontSize30",fontWeight:"fontWeightNormal",lineHeight:"lineHeight20",maxHeight:"size30",outline:"none",paddingBottom:"space30",paddingLeft:"space40",paddingRight:"space40",paddingTop:"space30",resize:"vertical",width:"100%","&::placeholder":{color:"inverse"===e.variant?"colorTextInverseWeak":"colorTextWeak",fontStyle:"italic"},"&:focus::placeholder":{color:"inverse"===e.variant?"colorTextInverseWeak":"colorTextWeak"},"&:disabled":{color:"inverse"===e.variant?"colorTextInverseWeaker":"colorTextWeaker",cursor:"not-allowed"}})})),ae=o((function(e,o){var i=e.children,n=e.disabled,t=e.hasError,a=e.id,l=e.insertBefore,d=e.insertAfter,s=e.name,c=e.placeholder,p=e.readOnly,u=e.variant,h=_(e,["children","disabled","hasError","id","insertBefore","insertAfter","name","placeholder","readOnly","variant"]);return r(V,{disabled:n,hasError:t,insertAfter:d,insertBefore:l,readOnly:p,variant:u},r(te,O({"aria-invalid":t,"aria-readonly":p},M(h),{async:!0,disabled:n,id:a,name:s,placeholder:c,readOnly:p,ref:o,rows:3,spellCheck:!0,variant:u}),i))}));ae.displayName="FormTextArea","development"===process.env.NODE_ENV&&(ae.propTypes={disabled:u,hasError:u,id:h.isRequired,name:h,onBlur:b,onChange:b.isRequired,onFocus:b,placeholder:h,readOnly:u,required:u});var le=g(w)((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,v=e._hoverSibling,b=e._invalidSibling,f=e._invalidAndHoverSibling,g=e.type,m=void 0===g?"checkbox":g,x="input[type="+m+"]:checked + label &, input[type="+m+"][aria-checked=mixed] + label &",k="input[type="+m+"]:checked:active + label &, input[type="+m+"][aria-checked=mixed]:active + label &",E="input[type="+m+"]:checked + label & > *, input[type="+m+"][aria-checked=mixed] + label & > *",w="input[type="+m+"]:checked:disabled + label &, input[type="+m+"][aria-checked=mixed]:disabled + label &",T="input[type="+m+"]:checked:focus + label &, input[type="+m+"][aria-checked=mixed]:focus + label &",R="input[type="+m+"]:checked:hover:not(:disabled) + label &, input[type="+m+"][aria-checked=mixed]:hover:not(:disabled) + label &",B="input[type="+m+"][aria-invalid=true]:checked + label &",S="input[type="+m+"][aria-invalid=true]:checked:hover:not(:disabled) + label &",N="input[type="+m+"] + label & > *",C="input[type="+m+"]:disabled + label &",z="input[type="+m+"]:focus + label &",O="input[type="+m+"]:hover:not(:disabled):not(:checked) + label &",_="input[type="+m+"][aria-invalid=true] + label &",W="input[type="+m+"][aria-invalid=true]:hover:not(:disabled) + label &";return y(((r={})["input[type="+m+"]:active + label &"]=o,r[x]=c,r[k]=n,r[E]=p,r[w]=t,r[T]=a,r[R]=l,r[B]=d,r[S]=s,r[N]=i,r[C]=u,r[z]=h,r[O]=v,r[_]=b,r[W]=f,r))}));le.displayName="SiblingBox",le.defaultProps={alignItems:"center","aria-hidden":"true",display:"inline-flex",flexShrink:0,justifyContent:"center",transition:"all 120ms"},"development"===process.env.NODE_ENV&&(le.propTypes={type:p(["checkbox","radio"])});var de=function(e){var o=e.children,i=e.disabled,n=_(e,["children","disabled"]);return r(le,O({as:"span",display:"flex",backgroundColor:"colorBackgroundBody",borderColor:"colorBorder",borderStyle:"solid",borderWidth:"borderWidth10",height:"sizeSquare50",marginX:"space20",marginY:"space10",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)};de.displayName="BaseRadioCheckboxControl","development"===process.env.NODE_ENV&&(de.propTypes={children:v.isRequired,disabled:u});var se=function(e){var o=e.children,i=_(e,["children"]);return r(I,O({},i,{marginBottom:"space0"}),r(w,{as:"span",display:"flex"},o))};se.displayName="BaseRadioCheckboxLabel","development"===process.env.NODE_ENV&&(se.propTypes={children:v.isRequired});var ce=function(e){var o=e.children,i=_(e,["children"]);return r(B,O({as:"span",color:"currentColor",marginLeft:"space20",fontWeight:"fontWeightNormal"},i),o)};ce.displayName="BaseRadioCheckboxLabelText","development"===process.env.NODE_ENV&&(ce.propTypes={children:v.isRequired});var pe=function(e){var o=e.children,i=e.helpTextId;return r(w,{as:"span",display:"block",marginLeft:"space80"},r(Q,{id:i,marginTop:"space0"},o))};pe.displayName="BaseRadioCheckboxHelpText","development"===process.env.NODE_ENV&&(pe.propTypes={children:v.isRequired,helpTextId:h.isRequired});var ue=i({name:"",value:"",disabled:!1,hasError:!1,onChange:function(){}}),he=o((function(e,o){return r(w,O({as:"input",type:"radio",size:"size0",border:"none",overflow:"hidden",padding:"space0",margin:"space0",whiteSpace:"nowrap",textTransform:"none",position:"absolute",clip:"rect(0 0 0 0)",ref:o},e))})),ve=o((function(e,o){var i=e.id,t=e.name,a=e.value,l=e.checked,d=e.disabled,s=e.hasError,c=e.onChange,p=e.children,u=e.helpText,h=_(e,["id","name","value","checked","disabled","hasError","onChange","children","helpText"]),v=z(),b=n(ue),f={name:null!=t?t:b.name,checked:null!=l?l:b.value===a,disabled:null!=d?d:b.disabled,hasError:null!=s?s:b.hasError,onChange:null!=c?c:b.onChange};return r(w,{position:"relative",display:"inline-flex",alignItems:"flex-start",flexDirection:"column",verticalAlign:"top"},r(he,O({},h,f,{value:a,"aria-describedby":v,"aria-invalid":f.hasError,id:i,ref:o})),r(se,{disabled:f.disabled,htmlFor:i},r(de,{borderRadius:"borderRadiusCircle",disabled:f.disabled,type:"radio"},r(w,{as:"span",backgroundColor:f.disabled&&f.checked?"colorBackgroundDarkest":"colorBackgroundBody",borderRadius:"borderRadiusCircle",height:"sizeSquare25",width:"sizeSquare25"})),r(ce,null,p)),u&&r(pe,{helpTextId:v},u))}));ve.displayName="Radio","development"===process.env.NODE_ENV&&(ve.propTypes={id:h.isRequired,value:h.isRequired,name:h,checked:u,disabled:u,hasError:u,helpText:f([h,v]),onChange:b,children:v.isRequired});var be=function(e){var o=e.children,i=e.disabled,n=e.errorText,a=e.helpText,l=e.legend,d=e.orientation,s=e.required,c=(e.value,_(e,["children","disabled","errorText","helpText","legend","orientation","required","value"]));return r(w,O({},T(c),{as:"fieldset",margin:"space0",padding:"space0",borderWidth:"borderWidth0"}),r(I,{as:"legend",htmlFor:void 0,required:s,marginBottom:"space0",disabled:i},l),a&&r(Q,{marginTop:"space0"},a),r(w,{marginLeft:"space20",marginRight:"space20",marginTop:"space40"},t.map(o,(function(e){return r(w,{display:"horizontal"===d?"inline-block":"block",marginBottom:"space40",marginRight:"horizontal"===d?"space70":null},e)})),n&&r(Q,{marginTop:"space0",variant:"error"},n)))};be.displayName="InlineControlGroup",be.defaultProps={orientation:"vertical"},"development"===process.env.NODE_ENV&&(be.propTypes={children:v.isRequired,disabled:u,errorText:f([h,v]),helpText:f([h,v]),legend:f([h,v]).isRequired,name:h.isRequired,orientation:p(["vertical","horizontal"]),required:u,value:h});var fe=function(e){var o=e.name,i=e.value,n=e.onChange,t=e.disabled,l=void 0!==t&&t,d=e.errorText,s=e.children,c=_(e,["name","value","onChange","disabled","errorText","children"]),p=a((function(){return function(e){null!=n&&n(e.target.value)}}),[n]),u=a((function(){return{name:o,value:i||"",disabled:l,hasError:null!=d,onChange:p}}),[o,i,l,d,p]);return r(ue.Provider,{value:u},r(be,O({},c,{disabled:l,errorText:d,name:o}),s))};fe.displayName="RadioGroup","development"===process.env.NODE_ENV&&(fe.propTypes={name:h.isRequired,onChange:b.isRequired});var ge=g.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"}),ye=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=_(e,["id","checked","children","helpText","disabled","hasError","indeterminate","isSelectAllChild","isSelectAll"]),h=z(),v=null;p&&!l&&(v="colorBackground"),(p&&n||p&&s)&&(v="colorBackgroundPrimaryLightest");var b=p?"space20":null;return c&&(b="space30"),r(w,{backgroundColor:v,borderRadius:p?"borderRadius10":null,display:"inline-flex",flexDirection:"column",padding:p?"space30":null,paddingBottom:p?"space20":null,paddingLeft:b,paddingRight:c?"space30":null,paddingTop:p?"space20":null},r(ge,O({},u,{"aria-describedby":h,"aria-checked":s?"mixed":n,"aria-invalid":d,checked:n,disabled:l,id:i,ref:o,type:"checkbox"})),r(se,{disabled:l,htmlFor:i},r(de,{alignItems:"center",borderRadius:"borderRadius10",disabled:l,display:"flex",position:"relative",type:"checkbox"},r(w,{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":"colorBorderInverseLightest",borderRadius:"borderRadius10",borderStyle:"solid",borderWidth:"borderWidth10",bottom:"0",content:'""',display:"block",height:"sizeSquare25",position:"absolute",width:"size0"},_after:{borderColor:l&&(n||s)?"colorBorderDark":"colorBorderInverseLightest",borderRadius:"borderRadius10",borderStyle:"solid",borderWidth:"borderWidth10",bottom:"0",content:'""',display:"block",height:"size0",position:s?void 0:"absolute",width:"sizeSquare30"}})),r(ce,{fontWeight:p?null:"fontWeightNormal"},t)),a&&r(pe,{helpTextId:h},a))}));ye.displayName="Checkbox","development"===process.env.NODE_ENV&&(ye.propTypes={children:v.isRequired,hasError:u,helpText:f([h,v]),id:h.isRequired,indeterminate:u,isSelectAll:u,isSelectAllChild:u,value:h.isRequired});var me=function(e){var o=e.children,i=e.disabled,n=e.errorText,a=e.isSelectAll,s=e.name,c=e.orientation,p=void 0===c?"vertical":c,u=_(e,["children","disabled","errorText","isSelectAll","name","orientation"]);return r(be,O({},u,{errorText:n,name:s,disabled:i,orientation:p}),t.map(o,(function(e,r){return l(e)?d(e,{disabled:i,hasError:!!n||void 0,isSelectAll:a&&0===r,isSelectAllChild:a&&"vertical"===p&&0!==r,name:s}):e})))};me.displayName="CheckboxGroup","development"===process.env.NODE_ENV&&(me.propTypes={isSelectAll:u,name:h});var xe=function(e){var o=e.children,i=e.errorText,n=_(e,["children","errorText"]);return r(s,null,r(w,{backgroundColor:"colorBackground",borderRadius:"borderRadius20",padding:"space50"},r(ye,O({},n,{hasError:null!=i}),o)),i&&r(w,{marginTop:"space30",marginLeft:"space50"},r(Q,{variant:"error"},i)))};xe.displayName="CheckboxDisclaimer","development"===process.env.NODE_ENV&&(xe.propTypes={children:v.isRequired,errorText:f([h,v])});var ke=function(e){var o=e.as,i=e.display,n=e.size,t=e.color,a=e.title,l=e.decorative;if(!l&&null==a)throw new Error("[ChevronDownIcon]: Missing a title for non-decorative icon.");return r(G,{as:o,display:i,size:n,color:t},r(C,null,(function(e){return r("svg",{role:"img","aria-hidden":l,width:"100%",height:"100%",viewBox:"0 0 20 20","aria-labelledby":e},a?r("title",{id:e},a):null,r("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.293 8.293a1 1 0 011.32-.083l.094.083L10 10.585l2.293-2.292a1 1 0 011.32-.083l.094.083a1 1 0 01.083 1.32l-.083.094-3 3a1 1 0 01-1.32.083l-.094-.083-3-3a1 1 0 010-1.414z"}))})))};ke.displayName="ChevronDownIcon";var Ee=function(e){var o=e.children;return r(w,{alignItems:"center",display:"inline-flex",position:"absolute",pointerEvents:"none",right:"space30",top:"50%",transform:"translateY(-50%)",zIndex:"zIndex10"},o)},we=g.select((function(e){return y({appearance:"none",background:"transparent",border:"none",borderRadius:"borderRadius20",boxShadow:"none",color:"inherit",cursor:"pointer",display:"block",fontFamily:"inherit",fontSize:"fontSize30",fontWeight:"fontWeightNormal",lineHeight:"lineHeight20",outline:"none",paddingBottom:"space30",paddingLeft:"space40",paddingRight:"space100",paddingTop:"space30",resize:"none",width:"100%","&:disabled":{color:"inverse"===e.variant?"colorTextInverseWeaker":"colorTextWeaker",cursor:"not-allowed"}})})),Te=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=e.variant,p=_(e,["disabled","hasError","insertBefore","insertAfter","children","size","multiple","variant"]),u="colorTextIcon";return i?u="colorTextWeaker":"inverse"===c&&(u="colorTextInverseWeak"),r(V,{disabled:i,hasError:n,insertAfter:a,insertBefore:t,variant:c},r(w,{display:"flex",width:"100%",position:"relative"},r(we,O({"aria-invalid":n,"data-not-selectize":"true",disabled:i,ref:o},p,P,{multiple:s,size:s?d:0,variant:c}),l),!s&&r(Ee,null,r(ke,{"aria-hidden":"true",decorative:!0,color:u,size:"sizeIcon30"}))))}));Te.displayName="Select","development"===process.env.NODE_ENV&&(Te.propTypes={id:h.isRequired,hasError:u,onChange:b.isRequired});var Re=O(O({},P),{selected:void 0}),Be=g.option(y({background:"transparent",color:"inherit",fontFamily:"fontFamilyText",lineHeight:"lineHeight50",paddingTop:"space30",paddingBottom:"space30",paddingLeft:"space20"})),Se=o((function(e,o){var i=e.children,n=_(e,["children"]);return n.selected&&console.warn('"selected" is a blocked prop on this component, please use "value" on the select element.'),r(Be,O({ref:o},n,Re),i)}));Se.displayName="Option","development"===process.env.NODE_ENV&&(Se.propTypes={value:h.isRequired,children:v.isRequired});var Ne=g.optgroup(y({background:"transparent",color:"inherit",fontFamily:"fontFamilyText",fontWeight:"fontWeightMedium",fontStyle:"normal",margin:"space20"})),Ce=o((function(e,o){var i=e.label,n=e.children,t=_(e,["label","children"]);return r(Ne,O({ref:o,label:i},t,P),n)}));Ce.displayName="OptionGroup","development"===process.env.NODE_ENV&&(Ce.propTypes={label:h.isRequired,children:v.isRequired});export{ye as Checkbox,xe as CheckboxDisclaimer,me as CheckboxGroup,A as FieldWrapperPropTypes,V as FormControlWrapper,Q as FormHelpText,K as FormHelpTextVariants,X as FormInput,I as FormLabel,ae as FormTextArea,Y as InputElement,Se as Option,Ce as OptionGroup,ve as Radio,fe as RadioGroup,Te as Select,Ee as SelectIconWrapper}; | ||
!function(e,r){var o,n,i="function"==typeof Map?new Map:(o=[],n=[],{has:function(e){return o.indexOf(e)>-1},get:function(e){return n[o.indexOf(e)]},set:function(e,r){-1===o.indexOf(e)&&(o.push(e),n.push(r))},delete:function(e){var r=o.indexOf(e);r>-1&&(o.splice(r,1),n.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&&!i.has(e)){var r,o=null,n=null,a=null,l=function(){e.clientWidth!==n&&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]})),i.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",i.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),i=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+o+"px",n=e.clientWidth,r.forEach((function(e){e.node.scrollTop=e.scrollTop})),i&&(document.documentElement.scrollTop=i)}}function p(){c();var r=Math.round(parseFloat(e.style.height)),o=window.getComputedStyle(e,null),n="content-box"===o.boxSizing?Math.round(parseFloat(o.height)):e.offsetHeight;if(n<r?"hidden"===o.overflowY&&(s("scroll"),c(),n="content-box"===o.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==o.overflowY&&(s("hidden"),c(),n="content-box"===o.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),a!==n){a=n;var i=t("autosize:resized");try{e.dispatchEvent(i)}catch(e){}}}}function l(e){var r=i.get(e);r&&r.destroy()}function d(e){var r=i.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)})),Z=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=Z(e,"line-height"),o=parseFloat(r,10);if(r===o+""){var n=e.style.lineHeight;e.style.lineHeight=r+"em",r=Z(e,"line-height"),o=parseFloat(r,10),n?e.style.lineHeight=n: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 i=e.nodeName,t=document.createElement(i);t.innerHTML=" ","TEXTAREA"===i.toUpperCase()&&t.setAttribute("rows","1");var a=Z(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},ee=K((function(r,o){var n,i=G&&G.__extends||(n=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}n(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}),t=G&&G.__assign||Object.assign||function(e){for(var r,o=1,n=arguments.length;o<n;o++)for(var i in r=arguments[o])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e},a=G&&G.__rest||function(e,r){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&(o[n[i]]=e[n[i]])}return o};o.__esModule=!0;var l=$,d=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:l(o.textarea.current)})},o.onChange=function(e){var r=o.props.onChange;o.currentValue=e.currentTarget.value,r&&r(e)},o}return i(o,r),o.prototype.componentDidMount=function(){var e=this,r=this.props,o=r.maxRows,n=r.async;"number"==typeof o&&this.updateLineHeight(),"number"==typeof o||n?setTimeout((function(){return e.textarea.current&&Q(e.textarea.current)})):this.textarea.current&&Q(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),Q.destroy(this.textarea.current))},o.prototype.render=function(){var r=this.props,o=(r.onResize,r.maxRows),n=(r.onChange,r.style),i=(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({},n,{maxHeight:s}):n,ref:this.textarea}),i)},o.prototype.componentDidUpdate=function(){this.textarea.current&&Q.update(this.textarea.current)},o.defaultProps={rows:1,async:!1},o.propTypes={rows:c.number,maxRows:c.number,onResize:c.func,innerRef:c.object,async:c.bool},o}(e.Component);o.TextareaAutosize=e.forwardRef((function(r,o){return e.createElement(d,t({},r,{innerRef:o}))}))}));J(ee);ee.TextareaAutosize;var re=g(J(K((function(e,r){r.__esModule=!0,r.default=ee.TextareaAutosize}))))((function(e){return y({appearance:"none",background:"transparent",border:"none",borderRadius:"borderRadius20",boxShadow:"none",color:"inherit",display:"block",fontFamily:"inherit",fontSize:"fontSize30",fontWeight:"fontWeightNormal",lineHeight:"lineHeight20",maxHeight:"size30",outline:"none",paddingBottom:"space30",paddingLeft:"space40",paddingRight:"space40",paddingTop:"space30",resize:"vertical",width:"100%","&::placeholder":{color:"inverse"===e.variant?"colorTextInverseWeak":"colorTextWeak",fontStyle:"italic"},"&:focus::placeholder":{color:"inverse"===e.variant?"colorTextInverseWeak":"colorTextWeak"},"&:disabled":{color:"inverse"===e.variant?"colorTextInverseWeaker":"colorTextWeaker",cursor:"not-allowed"}})})),oe=o((function(e,o){var n=e.children,i=e.disabled,t=e.hasError,a=e.id,l=e.insertBefore,d=e.insertAfter,s=e.name,c=e.placeholder,p=e.readOnly,u=e.variant,h=O(e,["children","disabled","hasError","id","insertBefore","insertAfter","name","placeholder","readOnly","variant"]);return r(L,{disabled:i,hasError:t,insertAfter:d,insertBefore:l,readOnly:p,variant:u},r(re,S({"aria-invalid":t,"aria-readonly":p},F(h),{async:!0,disabled:i,id:a,name:s,placeholder:c,readOnly:p,ref:o,rows:3,spellCheck:!0,variant:u}),n))}));oe.displayName="FormTextArea","development"===process.env.NODE_ENV&&(oe.propTypes={disabled:u,hasError:u,id:h.isRequired,name:h,onBlur:f,onChange:f.isRequired,onFocus:f,placeholder:h,readOnly:u,required:u});var ne=g(m)((function(e){var r,o=e._activeSibling,n=e._boxChild,i=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,v=e._hoverSibling,f=e._invalidSibling,b=e._invalidAndHoverSibling,g=e.type,m=void 0===g?"checkbox":g,x="input[type="+m+"]:checked + label &, input[type="+m+"][aria-checked=mixed] + label &",k="input[type="+m+"]:checked:active + label &, input[type="+m+"][aria-checked=mixed]:active + label &",E="input[type="+m+"]:checked + label & > *, input[type="+m+"][aria-checked=mixed] + label & > *",w="input[type="+m+"]:checked:disabled + label &, input[type="+m+"][aria-checked=mixed]:disabled + label &",T="input[type="+m+"]:checked:focus + label &, input[type="+m+"][aria-checked=mixed]:focus + label &",R="input[type="+m+"]:checked:hover:not(:disabled) + label &, input[type="+m+"][aria-checked=mixed]:hover:not(:disabled) + label &",B="input[type="+m+"][aria-invalid=true]:checked + label &",S="input[type="+m+"][aria-invalid=true]:checked:hover:not(:disabled) + label &",O="input[type="+m+"] + label & > *",N="input[type="+m+"]:disabled + label &",C="input[type="+m+"]:focus + label &",z="input[type="+m+"]:hover:not(:disabled):not(:checked) + label &",_="input[type="+m+"][aria-invalid=true] + label &",I="input[type="+m+"][aria-invalid=true]:hover:not(:disabled) + label &";return y(((r={})["input[type="+m+"]:active + label &"]=o,r[x]=c,r[k]=i,r[E]=p,r[w]=t,r[T]=a,r[R]=l,r[B]=d,r[S]=s,r[O]=n,r[N]=u,r[C]=h,r[z]=v,r[_]=f,r[I]=b,r))}));ne.displayName="SiblingBox",ne.defaultProps={alignItems:"center","aria-hidden":"true",display:"inline-flex",flexShrink:0,justifyContent:"center",transition:"all 120ms"},"development"===process.env.NODE_ENV&&(ne.propTypes={type:p(["checkbox","radio"])});var ie=function(e){var o=e.children,n=e.disabled,i=O(e,["children","disabled"]);return r(ne,S({as:"span",display:"flex",backgroundColor:"colorBackgroundBody",borderColor:"colorBorder",borderStyle:"solid",borderWidth:"borderWidth10",height:"sizeSquare50",marginX:"space20",marginY:"space10",width:"sizeSquare50",_hoverSibling:{borderColor:"colorBorderPrimaryDark"},_focusSibling:{borderColor:"colorBorderPrimaryDark",boxShadow:"shadowFocus"},_activeSibling:n?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:n?void 0:{borderColor:"colorBorderPrimaryDarker",backgroundColor:"colorBackgroundPrimaryDarker"},_checkedAndDisabledSibling:{borderColor:"colorBorderLighter",backgroundColor:"colorBackgroundDark"},_checkedAndInvalidSibling:{borderColor:"colorBorderError",backgroundColor:"colorBackgroundError"},_checkedAndInvalidAndHoverSibling:{borderColor:"colorBorderErrorDark",backgroundColor:"colorBackgroundErrorDark"}},i),o)};ie.displayName="BaseRadioCheckboxControl","development"===process.env.NODE_ENV&&(ie.propTypes={children:v.isRequired,disabled:u});var te=function(e){var o=e.children,n=O(e,["children"]);return r(C,S({},n,{marginBottom:"space0"}),r(m,{as:"span",display:"flex"},o))};te.displayName="BaseRadioCheckboxLabel","development"===process.env.NODE_ENV&&(te.propTypes={children:v.isRequired});var ae=function(e){var o=e.children,n=O(e,["children"]);return r(E,S({as:"span",color:"currentColor",marginLeft:"space20",fontWeight:"fontWeightNormal"},n),o)};ae.displayName="BaseRadioCheckboxLabelText","development"===process.env.NODE_ENV&&(ae.propTypes={children:v.isRequired});var le=function(e){var o=e.children,n=e.helpTextId;return r(m,{as:"span",display:"block",marginLeft:"space80"},r(U,{id:n,marginTop:"space0"},o))};le.displayName="BaseRadioCheckboxHelpText","development"===process.env.NODE_ENV&&(le.propTypes={children:v.isRequired,helpTextId:h.isRequired});var de=n({name:"",value:"",disabled:!1,hasError:!1,onChange:function(){}}),se=o((function(e,o){return r(m,S({as:"input",type:"radio",size:"size0",border:"none",overflow:"hidden",padding:"space0",margin:"space0",whiteSpace:"nowrap",textTransform:"none",position:"absolute",clip:"rect(0 0 0 0)",ref:o},e))})),ce=o((function(e,o){var n=e.id,t=e.name,a=e.value,l=e.checked,d=e.disabled,s=e.hasError,c=e.onChange,p=e.children,u=e.helpText,h=O(e,["id","name","value","checked","disabled","hasError","onChange","children","helpText"]),v=B(),f=i(de),b={name:null!=t?t:f.name,checked:null!=l?l:f.value===a,disabled:null!=d?d:f.disabled,hasError:null!=s?s:f.hasError,onChange:null!=c?c:f.onChange};return r(m,{position:"relative",display:"inline-flex",alignItems:"flex-start",flexDirection:"column",verticalAlign:"top"},r(se,S({},h,b,{value:a,"aria-describedby":v,"aria-invalid":b.hasError,id:n,ref:o})),r(te,{disabled:b.disabled,htmlFor:n},r(ie,{borderRadius:"borderRadiusCircle",disabled:b.disabled,type:"radio"},r(m,{as:"span",backgroundColor:b.disabled&&b.checked?"colorBackgroundDarkest":"colorBackgroundBody",borderRadius:"borderRadiusCircle",height:"sizeSquare25",width:"sizeSquare25"})),r(ae,null,p)),u&&r(le,{helpTextId:v},u))}));ce.displayName="Radio","development"===process.env.NODE_ENV&&(ce.propTypes={id:h.isRequired,value:h.isRequired,name:h,checked:u,disabled:u,hasError:u,helpText:b([h,v]),onChange:f,children:v.isRequired});var pe=function(e){var o=e.children,n=e.disabled,i=e.errorText,a=e.helpText,l=e.legend,d=e.orientation,s=e.required,c=(e.value,O(e,["children","disabled","errorText","helpText","legend","orientation","required","value"]));return r(m,S({},x(c),{as:"fieldset",margin:"space0",padding:"space0",borderWidth:"borderWidth0"}),r(C,{as:"legend",htmlFor:void 0,required:s,marginBottom:"space0",disabled:n},l),a&&r(U,{marginTop:"space0"},a),r(m,{marginLeft:"space20",marginRight:"space20",marginTop:"space40"},t.map(o,(function(e){return r(m,{display:"horizontal"===d?"inline-block":"block",marginBottom:"space40",marginRight:"horizontal"===d?"space70":null},e)})),i&&r(U,{marginTop:"space0",variant:"error"},i)))};pe.displayName="InlineControlGroup",pe.defaultProps={orientation:"vertical"},"development"===process.env.NODE_ENV&&(pe.propTypes={children:v.isRequired,disabled:u,errorText:b([h,v]),helpText:b([h,v]),legend:b([h,v]).isRequired,name:h.isRequired,orientation:p(["vertical","horizontal"]),required:u,value:h});var ue=function(e){var o=e.name,n=e.value,i=e.onChange,t=e.disabled,l=void 0!==t&&t,d=e.errorText,s=e.children,c=O(e,["name","value","onChange","disabled","errorText","children"]),p=a((function(){return function(e){null!=i&&i(e.target.value)}}),[i]),u=a((function(){return{name:o,value:n||"",disabled:l,hasError:null!=d,onChange:p}}),[o,n,l,d,p]);return r(de.Provider,{value:u},r(pe,S({},c,{disabled:l,errorText:d,name:o}),s))};ue.displayName="RadioGroup","development"===process.env.NODE_ENV&&(ue.propTypes={name:h.isRequired,onChange:f.isRequired});var he=g.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"}),ve=o((function(e,o){var n=e.id,i=e.checked,t=e.children,a=e.helpText,l=e.disabled,d=e.hasError,s=e.indeterminate,c=e.isSelectAllChild,p=e.isSelectAll,u=O(e,["id","checked","children","helpText","disabled","hasError","indeterminate","isSelectAllChild","isSelectAll"]),h=B(),v=null;p&&!l&&(v="colorBackground"),(p&&i||p&&s)&&(v="colorBackgroundPrimaryLightest");var f=p?"space20":null;return c&&(f="space30"),r(m,{backgroundColor:v,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(he,S({},u,{"aria-describedby":h,"aria-checked":s?"mixed":i,"aria-invalid":d,checked:i,disabled:l,id:n,ref:o,type:"checkbox"})),r(te,{disabled:l,htmlFor:n},r(ie,{alignItems:"center",borderRadius:"borderRadius10",disabled:l,display:"flex",position:"relative",type:"checkbox"},r(m,{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&&i?"colorBorderDark":"colorBorderInverseLightest",borderRadius:"borderRadius10",borderStyle:"solid",borderWidth:"borderWidth10",bottom:"0",content:'""',display:"block",height:"sizeSquare25",position:"absolute",width:"size0"},_after:{borderColor:l&&(i||s)?"colorBorderDark":"colorBorderInverseLightest",borderRadius:"borderRadius10",borderStyle:"solid",borderWidth:"borderWidth10",bottom:"0",content:'""',display:"block",height:"size0",position:s?void 0:"absolute",width:"sizeSquare30"}})),r(ae,{fontWeight:p?null:"fontWeightNormal"},t)),a&&r(le,{helpTextId:h},a))}));ve.displayName="Checkbox","development"===process.env.NODE_ENV&&(ve.propTypes={children:v.isRequired,hasError:u,helpText:b([h,v]),id:h.isRequired,indeterminate:u,isSelectAll:u,isSelectAllChild:u,value:h.isRequired});var fe=function(e){var o=e.children,n=e.disabled,i=e.errorText,a=e.isSelectAll,s=e.name,c=e.orientation,p=void 0===c?"vertical":c,u=O(e,["children","disabled","errorText","isSelectAll","name","orientation"]);return r(pe,S({},u,{errorText:i,name:s,disabled:n,orientation:p}),t.map(o,(function(e,r){return l(e)?d(e,{disabled:n,hasError:!!i||void 0,isSelectAll:a&&0===r,isSelectAllChild:a&&"vertical"===p&&0!==r,name:s}):e})))};fe.displayName="CheckboxGroup","development"===process.env.NODE_ENV&&(fe.propTypes={isSelectAll:u,name:h});var be=function(e){var o=e.children,n=e.errorText,i=O(e,["children","errorText"]);return r(s,null,r(m,{backgroundColor:"colorBackground",borderRadius:"borderRadius20",padding:"space50"},r(ve,S({},i,{hasError:null!=n}),o)),n&&r(m,{marginTop:"space30",marginLeft:"space50"},r(U,{variant:"error"},n)))};be.displayName="CheckboxDisclaimer","development"===process.env.NODE_ENV&&(be.propTypes={children:v.isRequired,errorText:b([h,v])});var ge=function(e){var o=e.as,n=e.display,i=e.size,t=e.color,a=e.title,l=e.decorative;if(!l&&null==a)throw new Error("[ChevronDownIcon]: Missing a title for non-decorative icon.");return r(M,{as:o,display:n,size:i,color:t},r(R,null,(function(e){return r("svg",{role:"img","aria-hidden":l,width:"100%",height:"100%",viewBox:"0 0 20 20","aria-labelledby":e},a?r("title",{id:e},a):null,r("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.293 8.293a1 1 0 011.32-.083l.094.083L10 10.585l2.293-2.292a1 1 0 011.32-.083l.094.083a1 1 0 01.083 1.32l-.083.094-3 3a1 1 0 01-1.32.083l-.094-.083-3-3a1 1 0 010-1.414z"}))})))};ge.displayName="ChevronDownIcon";var ye=function(e){var o=e.children;return r(m,{alignItems:"center",display:"inline-flex",position:"absolute",pointerEvents:"none",right:"space30",top:"50%",transform:"translateY(-50%)",zIndex:"zIndex10"},o)},me=g.select((function(e){return y({appearance:"none",background:"transparent",border:"none",borderRadius:"borderRadius20",boxShadow:"none",color:"inherit",cursor:"pointer",display:"block",fontFamily:"inherit",fontSize:"fontSize30",fontWeight:"fontWeightNormal",lineHeight:"lineHeight20",outline:"none",paddingBottom:"space30",paddingLeft:"space40",paddingRight:"space100",paddingTop:"space30",resize:"none",width:"100%","&:disabled":{color:"inverse"===e.variant?"colorTextInverseWeaker":"colorTextWeaker",cursor:"not-allowed"}})})),xe=o((function(e,o){var n=e.disabled,i=e.hasError,t=e.insertBefore,a=e.insertAfter,l=e.children,d=e.size,s=e.multiple,c=e.variant,p=O(e,["disabled","hasError","insertBefore","insertAfter","children","size","multiple","variant"]),u="colorTextIcon";return n?u="colorTextWeaker":"inverse"===c&&(u="colorTextInverseWeak"),r(L,{disabled:n,hasError:i,insertAfter:a,insertBefore:t,variant:c},r(m,{display:"flex",width:"100%",position:"relative"},r(me,S({"aria-invalid":i,"data-not-selectize":"true",disabled:n,ref:o},p,q,{multiple:s,size:s?d:0,variant:c}),l),!s&&r(ye,null,r(ge,{"aria-hidden":"true",decorative:!0,color:u,size:"sizeIcon30"}))))}));xe.displayName="Select","development"===process.env.NODE_ENV&&(xe.propTypes={id:h.isRequired,hasError:u,onChange:f.isRequired});var ke=S(S({},q),{selected:void 0}),Ee=g.option(y({background:"transparent",color:"inherit",fontFamily:"fontFamilyText",lineHeight:"lineHeight50",paddingTop:"space30",paddingBottom:"space30",paddingLeft:"space20"})),we=o((function(e,o){var n=e.children,i=O(e,["children"]);return i.selected&&console.warn('"selected" is a blocked prop on this component, please use "value" on the select element.'),r(Ee,S({ref:o},i,ke),n)}));we.displayName="Option","development"===process.env.NODE_ENV&&(we.propTypes={value:h.isRequired,children:v.isRequired});var Te=g.optgroup(y({background:"transparent",color:"inherit",fontFamily:"fontFamilyText",fontWeight:"fontWeightMedium",fontStyle:"normal",margin:"space20"})),Re=o((function(e,o){var n=e.label,i=e.children,t=O(e,["label","children"]);return r(Te,S({ref:o,label:n},t,q),i)}));Re.displayName="OptionGroup","development"===process.env.NODE_ENV&&(Re.propTypes={label:h.isRequired,children:v.isRequired});export{ve as Checkbox,be as CheckboxDisclaimer,fe as CheckboxGroup,z as FieldWrapperPropTypes,L as FormControlWrapper,U as FormHelpText,X as FormHelpTextVariants,V as FormInput,C as FormLabel,oe as FormTextArea,P as InputElement,we as Option,Re as OptionGroup,ce as Radio,ue as RadioGroup,xe as Select,ye as SelectIconWrapper}; |
@@ -1,2 +0,16 @@ | ||
"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({backgroundColor:"colorBackgroundRequired",borderRadius:"50%",cursor:"pointer",display:"block",height:"4px",marginRight:"space20",width:"4px"})),f=function(e){var o=e.as,t=e.marginBottom,n=e.required,i=e.disabled,c=e.children,f=e.variant,v=u(e,["as","marginBottom","required","disabled","children","variant"]),b="colorText";return i&&"inverse"===f?b="colorTextInverseWeak":i?b="colorTextWeak":"inverse"===f&&(b="colorTextInverse"),r.createElement(a.Box,p({},a.safelySpreadBoxProps(v),{as:o,borderBottomWidth:"borderWidth0",display:"block",marginBottom:t||"space20",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:b,cursor:i?"not-allowed":"pointer"},c)))};f.displayName="FormLabel",f.defaultProps={as:"label"},"development"===process.env.NODE_ENV&&(f.propTypes={as:t.oneOf(["label","legend"]),disabled:t.bool,htmlFor:t.string,marginBottom:t.oneOf(["space0"]),required:t.bool,variant:t.oneOf(["default","inverse"])});var v={disabled:t.bool,hasError:t.bool,readOnly:t.bool,type:t.oneOf(["text","email","hidden","number","password","search","tel"]),variant:t.oneOf(["default","inverse"])},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="DefaultFieldWrapper","development"===process.env.NODE_ENV&&(b.propTypes=v);var m=function(e){var o=e.disabled,t=e.hasError,n=e.readOnly,i=e.children,l=e.type,d="shadowBorderInverse",s="shadowBorderInverseLightest";return o?(d="shadowBorderInverseDarker",s="shadowBorderInverseDarker"):n?s="shadowBorderInverse":t?d="shadowBorderErrorLight":"hidden"===l&&(d=null),r.createElement(a.Box,{display:"flex",width:"100%",backgroundColor:n||o?"colorBackgroundInverseLight":"colorBackgroundInverse",boxShadow:d,borderRadius:"borderRadius20",color:"colorTextInverse",transition:"box-shadow 100ms ease-in",cursor:o?"not-allowed":"text",_hover:{boxShadow:s},_focusWithin:{backgroundColor:"colorBackgroundInverse",boxShadow:"shadowFocusInverse"},_active:{boxShadow:s}},i)};m.displayName="InverseFieldWrapper","development"===process.env.NODE_ENV&&(m.propTypes=v);var g=function(e){var o=e.children,t=e.disabled,n=e.hasError,i=e.readOnly,a=e.type,l=e.variant,d=void 0===l?"default":l,s=function(e){switch(e){case"inverse":return m;default:return b}}(d);return r.createElement(s,{disabled:t,hasError:n,readOnly:i,type:a,variant:d},o)};g.displayName="FieldWrapper","development"===process.env.NODE_ENV&&(g.propTypes=v);var y=function(e){var o=e.children,t=e.disabled,n=e.variant,i="colorBackground",l="colorBorderLighter";return t&&"inverse"===n?(i="none",l="colorBorderInverseDarker"):"inverse"===n&&(i="colorBackgroundInverseLight",l="colorBorderInverse"),null==o?null:r.createElement(a.Box,{alignItems:"flex-start",backgroundColor:i,borderBottomLeftRadius:"borderRadius20",borderRightColor:l,borderRightStyle:"solid",borderRightWidth:"borderWidth10",borderTopLeftRadius:"borderRadius20",display:"flex",lineHeight:"lineHeight20",padding:"space30"},o)};y.displayName="Prefix","development"===process.env.NODE_ENV&&(y.propTypes={children:t.node.isRequired,variant:t.oneOf(["default","inverse"])});var x=function(e){var o=e.children,t=e.disabled,n=e.variant,i="colorBackground",l="colorBorderLighter";return t&&"inverse"===n?(i="none",l="colorBorderInverseDarker"):"inverse"===n&&(i="colorBackgroundInverseLight",l="colorBorderInverse"),null==o?null:r.createElement(a.Box,{alignItems:"flex-start",backgroundColor:i,borderBottomRightRadius:"borderRadius20",borderLeftColor:l,borderLeftStyle:"solid",borderLeftWidth:"borderWidth10",borderTopRightRadius:"borderRadius20",display:"flex",lineHeight:"lineHeight20",padding:"space30"},o)};x.displayName="Suffix","development"===process.env.NODE_ENV&&(x.propTypes={children:t.node.isRequired,variant:t.oneOf(["default","inverse"])});var E={className:void 0,size:void 0,style:void 0,height:void 0,width:void 0},k=function(e){var o=e.children,t=e.disabled,n=e.hasError,i=e.insertAfter,a=e.insertBefore,l=e.readOnly,d=e.type,s=e.variant,c=u(e,["children","disabled","hasError","insertAfter","insertBefore","readOnly","type","variant"]);return r.createElement(g,p({disabled:t,hasError:n,readOnly:l,type:d,variant:s},c,E),a&&r.createElement(y,{disabled:t,variant:s},a),o,i&&r.createElement(x,{disabled:t,variant:s},i))};k.displayName="FormControlWrapper","development"===process.env.NODE_ENV&&(k.propTypes={children:t.node.isRequired,disabled:t.bool,hasError:t.bool,insertAfter:t.node,insertBefore:t.node,readOnly:t.bool,type:t.oneOf(["text","email","hidden","number","password","search","tel"]),variant:t.oneOf(["default","inverse"])});var w=["className","style","size","height","width"],T=function(e){return Object.keys(e).reduce((function(r,o){return w.includes(o)||(r[o]=e[o]),r}),{})},R=i.styled.input((function(e){return i.css({appearance:"none",background:"transparent",border:"none",borderRadius:"borderRadius20",boxShadow:"none",color:"inherit",display:"block",fontFamily:"inherit",fontSize:"fontSize30",fontWeight:"fontWeightNormal",lineHeight:"lineHeight20",outline:"none",paddingBottom:"space30",paddingLeft:"space40",paddingRight:"space40",paddingTop:"space30",resize:"none",width:"100%","&::placeholder":{color:"inverse"===e.variant?"colorTextInverseWeak":"colorTextWeak",fontStyle:"italic"},"&:focus::placeholder":{color:"inverse"===e.variant?"colorTextInverseWeak":"colorTextWeak"},"&:disabled":{color:"inverse"===e.variant?"colorTextInverseWeaker":"colorTextWeaker",cursor:"not-allowed"}})})),B=r.forwardRef((function(e,o){var t=e.disabled,n=e.hasError,i=e.id,a=e.insertAfter,l=e.insertBefore,d=e.name,s=e.placeholder,c=e.readOnly,h=e.required,f=e.type,v=e.value,b=e.variant,m=u(e,["disabled","hasError","id","insertAfter","insertBefore","name","placeholder","readOnly","required","type","value","variant"]),g={type:f};return"number"===f&&(g.type="text",g.inputmode="numeric",g.pattern="[0-9]*"),r.createElement(k,{disabled:t,hasError:n,insertAfter:a,insertBefore:l,readOnly:c,type:f,variant:b},r.createElement(R,p({"aria-invalid":n,"aria-readonly":c},T(m),g,{disabled:t,id:i,name:d,placeholder:s,readOnly:c,ref:o,required:h,value:v,variant:b})))}));B.displayName="FormInput","development"===process.env.NODE_ENV&&(B.propTypes={disabled:t.bool,hasError:t.bool,id:t.string.isRequired,name:t.string,onBlur:t.func,onChange:t.func,onFocus:t.func,placeholder:t.string,readOnly:t.bool,required:t.bool,type:t.oneOf(["text","email","hidden","number","password","search","tel"]).isRequired,value:t.string.isRequired});var O=i.system({color:{property:"color",scale:"textColors"}}),S=i.styled.span(i.compose(i.display,O,i.size));S.defaultProps={display:"block",color:"currentColor",size:"sizeIcon30"},S.displayName="IconWrapper";var C=function(e){var o=e.as,t=e.display,n=e.size,i=e.color,a=e.title,l=e.decorative;if(!l&&null==a)throw new Error("[ErrorIcon]: Missing a title for non-decorative icon.");return r.createElement(S,{as:o,display:t,size:n,color:i},r.createElement(c.UID,null,(function(e){return r.createElement("svg",{role:"img","aria-hidden":l,width:"100%",height:"100%",viewBox:"0 0 20 20","aria-labelledby":e},a?r.createElement("title",{id:e},a):null,r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.247 2.517l6.236 6.236a1.764 1.764 0 010 2.494l-6.236 6.236a1.764 1.764 0 01-2.494 0l-6.236-6.236a1.764 1.764 0 010-2.494l6.236-6.236a1.764 1.764 0 012.494 0zM10 12a1 1 0 100 2 1 1 0 000-2zm.01-5h-.02c-.604 0-1.073.592-.978 1.244l.428 2.238c.04.296.278.518.557.518h.006c.279 0 .516-.222.557-.518l.428-2.238c.095-.652-.367-1.237-.978-1.244z"}))})))};C.displayName="ErrorIcon";var N={DEFAULT:"default",ERROR:"error",ERROR_INVERSE:"error_inverse",INVERSE:"inverse"},z=function(e){var o=e.marginTop,t=e.children,n=e.variant,i=u(e,["marginTop","children","variant"]),a=null;switch(n){case N.ERROR:a=r.createElement(C,{color:"colorTextError",decorative:!0,size:"sizeIcon20"});break;case N.ERROR_INVERSE:a=r.createElement(C,{color:"colorTextErrorLight",decorative:!0,size:"sizeIcon20"})}var s="colorTextWeak";return"error"===n?s="colorTextError":"error_inverse"===n?s="colorTextErrorLight":"inverse"===n&&(s="colorTextInverseWeak"),r.createElement(l.Flex,{vAlignContent:"center",marginTop:o||"space30"},a,r.createElement(d.Text,p({},d.safelySpreadTextProps(i),{as:"div",color:s,fontSize:"fontSize30",lineHeight:"lineHeight30",marginLeft:a?"space20":void 0}),t))};z.displayName="FormHelpText","development"===process.env.NODE_ENV&&(z.propTypes={marginTop:t.oneOf(["space0"])});var _="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function I(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function W(e,r){return e(r={exports:{}},r.exports),r.exports}var D=W((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({backgroundColor:"colorBackgroundRequired",borderRadius:"50%",cursor:"pointer",display:"block",height:"4px",marginRight:"space20",width:"4px"})),f=function(e){var o=e.as,t=e.marginBottom,n=e.required,i=e.disabled,c=e.children,f=e.variant,v=u(e,["as","marginBottom","required","disabled","children","variant"]),b="colorText";return i&&"inverse"===f?b="colorTextInverseWeak":i?b="colorTextWeak":"inverse"===f&&(b="colorTextInverse"),r.createElement(a.Box,p({},a.safelySpreadBoxProps(v),{as:o,borderBottomWidth:"borderWidth0",display:"block",marginBottom:t||"space20",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:b,cursor:i?"not-allowed":"pointer"},c)))};f.displayName="FormLabel",f.defaultProps={as:"label"},"development"===process.env.NODE_ENV&&(f.propTypes={as:t.oneOf(["label","legend"]),disabled:t.bool,htmlFor:t.string,marginBottom:t.oneOf(["space0"]),required:t.bool,variant:t.oneOf(["default","inverse"])});var v={disabled:t.bool,hasError:t.bool,readOnly:t.bool,type:t.oneOf(["text","email","hidden","number","password","search","tel"]),variant:t.oneOf(["default","inverse"])},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="DefaultFieldWrapper","development"===process.env.NODE_ENV&&(b.propTypes=v);var m=function(e){var o=e.disabled,t=e.hasError,n=e.readOnly,i=e.children,l=e.type,d="shadowBorderInverse",s="shadowBorderInverseLightest";return o?(d="shadowBorderInverseDarker",s="shadowBorderInverseDarker"):n?s="shadowBorderInverse":t?d="shadowBorderErrorLight":"hidden"===l&&(d=null),r.createElement(a.Box,{display:"flex",width:"100%",backgroundColor:n||o?"colorBackgroundInverseLight":"colorBackgroundInverse",boxShadow:d,borderRadius:"borderRadius20",color:"colorTextInverse",transition:"box-shadow 100ms ease-in",cursor:o?"not-allowed":"text",_hover:{boxShadow:s},_focusWithin:{backgroundColor:"colorBackgroundInverse",boxShadow:"shadowFocusInverse"},_active:{boxShadow:s}},i)};m.displayName="InverseFieldWrapper","development"===process.env.NODE_ENV&&(m.propTypes=v);var g=function(e){var o=e.children,t=e.disabled,n=e.hasError,i=e.readOnly,a=e.type,l=e.variant,d=void 0===l?"default":l,s=function(e){switch(e){case"inverse":return m;default:return b}}(d);return r.createElement(s,{disabled:t,hasError:n,readOnly:i,type:a,variant:d},o)};g.displayName="FieldWrapper","development"===process.env.NODE_ENV&&(g.propTypes=v);var y=function(e){var o=e.children,t=e.disabled,n=e.variant,i="colorBackground",l="colorBorderLighter";return t&&"inverse"===n?(i="none",l="colorBorderInverseDarker"):"inverse"===n&&(i="colorBackgroundInverseLight",l="colorBorderInverse"),null==o?null:r.createElement(a.Box,{alignItems:"flex-start",backgroundColor:i,borderBottomLeftRadius:"borderRadius20",borderRightColor:l,borderRightStyle:"solid",borderRightWidth:"borderWidth10",borderTopLeftRadius:"borderRadius20",display:"flex",lineHeight:"lineHeight20",padding:"space30"},o)};y.displayName="Prefix","development"===process.env.NODE_ENV&&(y.propTypes={children:t.node.isRequired,variant:t.oneOf(["default","inverse"])});var x=function(e){var o=e.children,t=e.disabled,n=e.variant,i="colorBackground",l="colorBorderLighter";return t&&"inverse"===n?(i="none",l="colorBorderInverseDarker"):"inverse"===n&&(i="colorBackgroundInverseLight",l="colorBorderInverse"),null==o?null:r.createElement(a.Box,{alignItems:"flex-start",backgroundColor:i,borderBottomRightRadius:"borderRadius20",borderLeftColor:l,borderLeftStyle:"solid",borderLeftWidth:"borderWidth10",borderTopRightRadius:"borderRadius20",display:"flex",lineHeight:"lineHeight20",padding:"space30"},o)};x.displayName="Suffix","development"===process.env.NODE_ENV&&(x.propTypes={children:t.node.isRequired,variant:t.oneOf(["default","inverse"])});var E={className:void 0,size:void 0,style:void 0,height:void 0,width:void 0},k=function(e){var o=e.children,t=e.disabled,n=e.hasError,i=e.insertAfter,a=e.insertBefore,l=e.readOnly,d=e.type,s=e.variant,c=u(e,["children","disabled","hasError","insertAfter","insertBefore","readOnly","type","variant"]);return r.createElement(g,p({disabled:t,hasError:n,readOnly:l,type:d,variant:s},c,E),a&&r.createElement(y,{disabled:t,variant:s},a),o,i&&r.createElement(x,{disabled:t,variant:s},i))};k.displayName="FormControlWrapper","development"===process.env.NODE_ENV&&(k.propTypes={children:t.node.isRequired,disabled:t.bool,hasError:t.bool,insertAfter:t.node,insertBefore:t.node,readOnly:t.bool,type:t.oneOf(["text","email","hidden","number","password","search","tel"]),variant:t.oneOf(["default","inverse"])});var w=["className","style","size","height","width"],T=function(e){return Object.keys(e).reduce((function(r,o){return w.includes(o)||(r[o]=e[o]),r}),{})},R=i.styled.input((function(e){return i.css({appearance:"none",background:"transparent",border:"none",borderRadius:"borderRadius20",boxShadow:"none",color:"inherit",display:"block",fontFamily:"inherit",fontSize:"fontSize30",fontWeight:"fontWeightNormal",lineHeight:"lineHeight20",outline:"none",paddingBottom:"space30",paddingLeft:"space40",paddingRight:"space40",paddingTop:"space30",resize:"none",width:"100%","&::placeholder":{color:"inverse"===e.variant?"colorTextInverseWeak":"colorTextWeak",fontStyle:"italic"},"&:focus::placeholder":{color:"inverse"===e.variant?"colorTextInverseWeak":"colorTextWeak"},"&:disabled":{color:"inverse"===e.variant?"colorTextInverseWeaker":"colorTextWeaker",cursor:"not-allowed"}})})),B=r.forwardRef((function(e,o){var t=e.disabled,n=e.hasError,i=e.id,a=e.insertAfter,l=e.insertBefore,d=e.name,s=e.placeholder,c=e.readOnly,h=e.required,f=e.type,v=e.value,b=e.variant,m=u(e,["disabled","hasError","id","insertAfter","insertBefore","name","placeholder","readOnly","required","type","value","variant"]),g={type:f};return"number"===f&&(g.type="text",g.inputmode="numeric",g.pattern="[0-9]*"),r.createElement(k,{disabled:t,hasError:n,insertAfter:a,insertBefore:l,readOnly:c,type:f,variant:b},r.createElement(R,p({"aria-invalid":n,"aria-readonly":c},T(m),g,{disabled:t,id:i,name:d,placeholder:s,readOnly:c,ref:o,required:h,value:v,variant:b})))}));B.displayName="FormInput","development"===process.env.NODE_ENV&&(B.propTypes={disabled:t.bool,hasError:t.bool,id:t.string.isRequired,name:t.string,onBlur:t.func,onChange:t.func,onFocus:t.func,placeholder:t.string,readOnly:t.bool,required:t.bool,type:t.oneOf(["text","email","hidden","number","password","search","tel"]).isRequired,value:t.string.isRequired}) | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */;var O=function(){return(O=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)},S=function(e){var o=e.display,t=e.color,n=e.size,i=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&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(o[t[n]]=e[t[n]])}return o}(e,["display","color","size"]);return r.createElement(a.Box,O({},a.safelySpreadBoxProps(i),{lineHeight:"lineHeight0",display:o,color:t,size:n}))};S.defaultProps={as:"span",display:"block",color:"currentColor",size:"sizeIcon30"},S.displayName="IconWrapper";var C=function(e){var o=e.as,t=e.display,n=e.size,i=e.color,a=e.title,l=e.decorative;if(!l&&null==a)throw new Error("[ErrorIcon]: Missing a title for non-decorative icon.");return r.createElement(S,{as:o,display:t,size:n,color:i},r.createElement(c.UID,null,(function(e){return r.createElement("svg",{role:"img","aria-hidden":l,width:"100%",height:"100%",viewBox:"0 0 20 20","aria-labelledby":e},a?r.createElement("title",{id:e},a):null,r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.247 2.517l6.236 6.236a1.764 1.764 0 010 2.494l-6.236 6.236a1.764 1.764 0 01-2.494 0l-6.236-6.236a1.764 1.764 0 010-2.494l6.236-6.236a1.764 1.764 0 012.494 0zM10 12a1 1 0 100 2 1 1 0 000-2zm.01-5h-.02c-.604 0-1.073.592-.978 1.244l.428 2.238c.04.296.278.518.557.518h.006c.279 0 .516-.222.557-.518l.428-2.238c.095-.652-.367-1.237-.978-1.244z"}))})))};C.displayName="ErrorIcon";var N={DEFAULT:"default",ERROR:"error",ERROR_INVERSE:"error_inverse",INVERSE:"inverse"},z=function(e){var o=e.marginTop,t=e.children,n=e.variant,i=u(e,["marginTop","children","variant"]),a=null;switch(n){case N.ERROR:a=r.createElement(C,{color:"colorTextError",decorative:!0,size:"sizeIcon20"});break;case N.ERROR_INVERSE:a=r.createElement(C,{color:"colorTextErrorLight",decorative:!0,size:"sizeIcon20"})}var s="colorTextWeak";return"error"===n?s="colorTextError":"error_inverse"===n?s="colorTextErrorLight":"inverse"===n&&(s="colorTextInverseWeak"),r.createElement(l.Flex,{vAlignContent:"center",marginTop:o||"space30"},a,r.createElement(d.Text,p({},d.safelySpreadTextProps(i),{as:"div",color:s,fontSize:"fontSize30",lineHeight:"lineHeight30",marginLeft:a?"space20":void 0}),t))};z.displayName="FormHelpText","development"===process.env.NODE_ENV&&(z.propTypes={marginTop:t.oneOf(["space0"])});var _="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function I(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function W(e,r){return e(r={exports:{}},r.exports),r.exports}var D=W((function(e,r){ | ||
/*! | ||
@@ -7,2 +21,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)})),q=function(e,r,o){return((o=window.getComputedStyle)?o(e):e.currentStyle)[r.replace(/-(\w)/gi,(function(e,r){return r.toUpperCase()}))]};var A=function(e){var r=q(e,"line-height"),o=parseFloat(r,10);if(r===o+""){var t=e.style.lineHeight;e.style.lineHeight=r+"em",r=q(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=" ","TEXTAREA"===n.toUpperCase()&&i.setAttribute("rows","1");var a=q(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},L=W((function(e,r){var t,i=_&&_.__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=_&&_.__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=_&&_.__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=A,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&&D(e.textarea.current)})):this.textarea.current&&D(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),D.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&&D.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}))}))}));I(L);L.TextareaAutosize;var F=I(W((function(e,r){r.__esModule=!0,r.default=L.TextareaAutosize}))),H=i.styled(F)((function(e){return i.css({appearance:"none",background:"transparent",border:"none",borderRadius:"borderRadius20",boxShadow:"none",color:"inherit",display:"block",fontFamily:"inherit",fontSize:"fontSize30",fontWeight:"fontWeightNormal",lineHeight:"lineHeight20",maxHeight:"size30",outline:"none",paddingBottom:"space30",paddingLeft:"space40",paddingRight:"space40",paddingTop:"space30",resize:"vertical",width:"100%","&::placeholder":{color:"inverse"===e.variant?"colorTextInverseWeak":"colorTextWeak",fontStyle:"italic"},"&:focus::placeholder":{color:"inverse"===e.variant?"colorTextInverseWeak":"colorTextWeak"},"&:disabled":{color:"inverse"===e.variant?"colorTextInverseWeaker":"colorTextWeaker",cursor:"not-allowed"}})})),P=r.forwardRef((function(e,o){var t=e.children,n=e.disabled,i=e.hasError,a=e.id,l=e.insertBefore,d=e.insertAfter,s=e.name,c=e.placeholder,h=e.readOnly,f=e.variant,v=u(e,["children","disabled","hasError","id","insertBefore","insertAfter","name","placeholder","readOnly","variant"]);return r.createElement(k,{disabled:n,hasError:i,insertAfter:d,insertBefore:l,readOnly:h,variant:f},r.createElement(H,p({"aria-invalid":i,"aria-readonly":h},T(v),{async:!0,disabled:n,id:a,name:s,placeholder:c,readOnly:h,ref:o,rows:3,spellCheck:!0,variant:f}),t))}));P.displayName="FormTextArea","development"===process.env.NODE_ENV&&(P.propTypes={disabled:t.bool,hasError:t.bool,id:t.string.isRequired,name:t.string,onBlur:t.func,onChange:t.func.isRequired,onFocus:t.func,placeholder:t.string,readOnly:t.bool,required:t.bool});var V=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,v=e._hoverSibling,b=e._invalidSibling,m=e._invalidAndHoverSibling,g=e.type,y=void 0===g?"checkbox":g,x="input[type="+y+"]:active + label &",E="input[type="+y+"]:checked + label &, input[type="+y+"][aria-checked=mixed] + label &",k="input[type="+y+"]:checked:active + label &, input[type="+y+"][aria-checked=mixed]:active + label &",w="input[type="+y+"]:checked + label & > *, input[type="+y+"][aria-checked=mixed] + label & > *",T="input[type="+y+"]:checked:disabled + label &, input[type="+y+"][aria-checked=mixed]:disabled + label &",R="input[type="+y+"]:checked:focus + label &, input[type="+y+"][aria-checked=mixed]:focus + label &",B="input[type="+y+"]:checked:hover:not(:disabled) + label &, input[type="+y+"][aria-checked=mixed]:hover:not(:disabled) + label &",O="input[type="+y+"][aria-invalid=true]:checked + label &",S="input[type="+y+"][aria-invalid=true]:checked:hover:not(:disabled) + label &",C="input[type="+y+"] + label & > *",N="input[type="+y+"]:disabled + label &",z="input[type="+y+"]:focus + label &",_="input[type="+y+"]:hover:not(:disabled):not(:checked) + label &",I="input[type="+y+"][aria-invalid=true] + label &",W="input[type="+y+"][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[O]=s,r[S]=c,r[C]=t,r[N]=h,r[z]=f,r[_]=v,r[I]=b,r[W]=m,r))}));V.displayName="SiblingBox",V.defaultProps={alignItems:"center","aria-hidden":"true",display:"inline-flex",flexShrink:0,justifyContent:"center",transition:"all 120ms"},"development"===process.env.NODE_ENV&&(V.propTypes={type:t.oneOf(["checkbox","radio"])});var M=function(e){var o=e.children,t=e.disabled,n=u(e,["children","disabled"]);return r.createElement(V,p({as:"span",display:"flex",backgroundColor:"colorBackgroundBody",borderColor:"colorBorder",borderStyle:"solid",borderWidth:"borderWidth10",height:"sizeSquare50",marginX:"space20",marginY:"space10",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)};M.displayName="BaseRadioCheckboxControl","development"===process.env.NODE_ENV&&(M.propTypes={children:t.node.isRequired,disabled:t.bool});var j=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))};j.displayName="BaseRadioCheckboxLabel","development"===process.env.NODE_ENV&&(j.propTypes={children:t.node.isRequired});var U=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)};U.displayName="BaseRadioCheckboxLabelText","development"===process.env.NODE_ENV&&(U.propTypes={children:t.node.isRequired});var G=function(e){var o=e.children,t=e.helpTextId;return r.createElement(a.Box,{as:"span",display:"block",marginLeft:"space80"},r.createElement(z,{id:t,marginTop:"space0"},o))};G.displayName="BaseRadioCheckboxHelpText","development"===process.env.NODE_ENV&&(G.propTypes={children:t.node.isRequired,helpTextId:t.string.isRequired});var Y=r.createContext({name:"",value:"",disabled:!1,hasError:!1,onChange:function(){}}),X=r.forwardRef((function(e,o){return r.createElement(a.Box,p({as:"input",type:"radio",size:"size0",border:"none",overflow:"hidden",padding:"space0",margin:"space0",whiteSpace:"nowrap",textTransform:"none",position:"absolute",clip:"rect(0 0 0 0)",ref:o},e))})),J=r.forwardRef((function(e,o){var t=e.id,n=e.name,i=e.value,l=e.checked,d=e.disabled,s=e.hasError,h=e.onChange,f=e.children,v=e.helpText,b=u(e,["id","name","value","checked","disabled","hasError","onChange","children","helpText"]),m=c.useUID(),g=r.useContext(Y),y={name:null!=n?n:g.name,checked:null!=l?l:g.value===i,disabled:null!=d?d:g.disabled,hasError:null!=s?s:g.hasError,onChange:null!=h?h:g.onChange};return r.createElement(a.Box,{position:"relative",display:"inline-flex",alignItems:"flex-start",flexDirection:"column",verticalAlign:"top"},r.createElement(X,p({},b,y,{value:i,"aria-describedby":m,"aria-invalid":y.hasError,id:t,ref:o})),r.createElement(j,{disabled:y.disabled,htmlFor:t},r.createElement(M,{borderRadius:"borderRadiusCircle",disabled:y.disabled,type:"radio"},r.createElement(a.Box,{as:"span",backgroundColor:y.disabled&&y.checked?"colorBackgroundDarkest":"colorBackgroundBody",borderRadius:"borderRadiusCircle",height:"sizeSquare25",width:"sizeSquare25"})),r.createElement(U,null,f)),v&&r.createElement(G,{helpTextId:m},v))}));J.displayName="Radio","development"===process.env.NODE_ENV&&(J.propTypes={id:t.string.isRequired,value:t.string.isRequired,name:t.string,checked:t.bool,disabled:t.bool,hasError:t.bool,helpText:t.oneOfType([t.string,t.node]),onChange:t.func,children:t.node.isRequired});var K=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(z,{marginTop:"space0"},i),r.createElement(a.Box,{marginLeft:"space20",marginRight:"space20",marginTop:"space40"},r.Children.map(o,(function(e){return r.createElement(a.Box,{display:"horizontal"===d?"inline-block":"block",marginBottom:"space40",marginRight:"horizontal"===d?"space70":null},e)})),n&&r.createElement(z,{marginTop:"space0",variant:"error"},n)))};K.displayName="InlineControlGroup",K.defaultProps={orientation:"vertical"},"development"===process.env.NODE_ENV&&(K.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 Q=function(e){var o=e.name,t=e.value,n=e.onChange,i=e.disabled,a=void 0!==i&&i,l=e.errorText,d=e.children,s=u(e,["name","value","onChange","disabled","errorText","children"]),c=r.useMemo((function(){return function(e){null!=n&&n(e.target.value)}}),[n]),h=r.useMemo((function(){return{name:o,value:t||"",disabled:a,hasError:null!=l,onChange:c}}),[o,t,a,l,c]);return r.createElement(Y.Provider,{value:h},r.createElement(K,p({},s,{disabled:a,errorText:l,name:o}),d))};Q.displayName="RadioGroup","development"===process.env.NODE_ENV&&(Q.propTypes={name:t.string.isRequired,onChange:t.func.isRequired});var Z=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"}),$=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,v=e.isSelectAll,b=u(e,["id","checked","children","helpText","disabled","hasError","indeterminate","isSelectAllChild","isSelectAll"]),m=c.useUID(),g=null;v&&!d&&(g="colorBackground"),(v&&n||v&&h)&&(g="colorBackgroundPrimaryLightest");var y=v?"space20":null;return f&&(y="space30"),r.createElement(a.Box,{backgroundColor:g,borderRadius:v?"borderRadius10":null,display:"inline-flex",flexDirection:"column",padding:v?"space30":null,paddingBottom:v?"space20":null,paddingLeft:y,paddingRight:f?"space30":null,paddingTop:v?"space20":null},r.createElement(Z,p({},b,{"aria-describedby":m,"aria-checked":h?"mixed":n,"aria-invalid":s,checked:n,disabled:d,id:t,ref:o,type:"checkbox"})),r.createElement(j,{disabled:d,htmlFor:t},r.createElement(M,{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":"colorBorderInverseLightest",borderRadius:"borderRadius10",borderStyle:"solid",borderWidth:"borderWidth10",bottom:"0",content:'""',display:"block",height:"sizeSquare25",position:"absolute",width:"size0"},_after:{borderColor:d&&(n||h)?"colorBorderDark":"colorBorderInverseLightest",borderRadius:"borderRadius10",borderStyle:"solid",borderWidth:"borderWidth10",bottom:"0",content:'""',display:"block",height:"size0",position:h?void 0:"absolute",width:"sizeSquare30"}})),r.createElement(U,{fontWeight:v?null:"fontWeightNormal"},i)),l&&r.createElement(G,{helpTextId:m},l))}));$.displayName="Checkbox","development"===process.env.NODE_ENV&&($.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 ee=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(K,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})))};ee.displayName="CheckboxGroup","development"===process.env.NODE_ENV&&(ee.propTypes={isSelectAll:t.bool,name:t.string});var re=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($,p({},n,{hasError:null!=t}),o)),t&&r.createElement(a.Box,{marginTop:"space30",marginLeft:"space50"},r.createElement(z,{variant:"error"},t)))};re.displayName="CheckboxDisclaimer","development"===process.env.NODE_ENV&&(re.propTypes={children:t.node.isRequired,errorText:t.oneOfType([t.string,t.node])});var oe=function(e){var o=e.as,t=e.display,n=e.size,i=e.color,a=e.title,l=e.decorative;if(!l&&null==a)throw new Error("[ChevronDownIcon]: Missing a title for non-decorative icon.");return r.createElement(S,{as:o,display:t,size:n,color:i},r.createElement(c.UID,null,(function(e){return r.createElement("svg",{role:"img","aria-hidden":l,width:"100%",height:"100%",viewBox:"0 0 20 20","aria-labelledby":e},a?r.createElement("title",{id:e},a):null,r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.293 8.293a1 1 0 011.32-.083l.094.083L10 10.585l2.293-2.292a1 1 0 011.32-.083l.094.083a1 1 0 01.083 1.32l-.083.094-3 3a1 1 0 01-1.32.083l-.094-.083-3-3a1 1 0 010-1.414z"}))})))};oe.displayName="ChevronDownIcon";var te=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)},ne=i.styled.select((function(e){return i.css({appearance:"none",background:"transparent",border:"none",borderRadius:"borderRadius20",boxShadow:"none",color:"inherit",cursor:"pointer",display:"block",fontFamily:"inherit",fontSize:"fontSize30",fontWeight:"fontWeightNormal",lineHeight:"lineHeight20",outline:"none",paddingBottom:"space30",paddingLeft:"space40",paddingRight:"space100",paddingTop:"space30",resize:"none",width:"100%","&:disabled":{color:"inverse"===e.variant?"colorTextInverseWeaker":"colorTextWeaker",cursor:"not-allowed"}})})),ie=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=e.variant,f=u(e,["disabled","hasError","insertBefore","insertAfter","children","size","multiple","variant"]),v="colorTextIcon";return t?v="colorTextWeaker":"inverse"===h&&(v="colorTextInverseWeak"),r.createElement(k,{disabled:t,hasError:n,insertAfter:l,insertBefore:i,variant:h},r.createElement(a.Box,{display:"flex",width:"100%",position:"relative"},r.createElement(ne,p({"aria-invalid":n,"data-not-selectize":"true",disabled:t,ref:o},f,E,{multiple:c,size:c?s:0,variant:h}),d),!c&&r.createElement(te,null,r.createElement(oe,{"aria-hidden":"true",decorative:!0,color:v,size:"sizeIcon30"}))))}));ie.displayName="Select","development"===process.env.NODE_ENV&&(ie.propTypes={id:t.string.isRequired,hasError:t.bool,onChange:t.func.isRequired});var ae=p(p({},E),{selected:void 0}),le=i.styled.option(i.css({background:"transparent",color:"inherit",fontFamily:"fontFamilyText",lineHeight:"lineHeight50",paddingTop:"space30",paddingBottom:"space30",paddingLeft:"space20"})),de=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(le,p({ref:o},n,ae),t)}));de.displayName="Option","development"===process.env.NODE_ENV&&(de.propTypes={value:t.string.isRequired,children:t.node.isRequired});var se=i.styled.optgroup(i.css({background:"transparent",color:"inherit",fontFamily:"fontFamilyText",fontWeight:"fontWeightMedium",fontStyle:"normal",margin:"space20"})),ce=r.forwardRef((function(e,o){var t=e.label,n=e.children,i=u(e,["label","children"]);return r.createElement(se,p({ref:o,label:t},i,E),n)}));ce.displayName="OptionGroup","development"===process.env.NODE_ENV&&(ce.propTypes={label:t.string.isRequired,children:t.node.isRequired}),exports.Checkbox=$,exports.CheckboxDisclaimer=re,exports.CheckboxGroup=ee,exports.FieldWrapperPropTypes=v,exports.FormControlWrapper=k,exports.FormHelpText=z,exports.FormHelpTextVariants=N,exports.FormInput=B,exports.FormLabel=f,exports.FormTextArea=P,exports.InputElement=R,exports.Option=de,exports.OptionGroup=ce,exports.Radio=J,exports.RadioGroup=Q,exports.Select=ie,exports.SelectIconWrapper=te; | ||
!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)})),q=function(e,r,o){return((o=window.getComputedStyle)?o(e):e.currentStyle)[r.replace(/-(\w)/gi,(function(e,r){return r.toUpperCase()}))]};var A=function(e){var r=q(e,"line-height"),o=parseFloat(r,10);if(r===o+""){var t=e.style.lineHeight;e.style.lineHeight=r+"em",r=q(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=" ","TEXTAREA"===n.toUpperCase()&&i.setAttribute("rows","1");var a=q(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},L=W((function(e,r){var t,i=_&&_.__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=_&&_.__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=_&&_.__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=A,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&&D(e.textarea.current)})):this.textarea.current&&D(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),D.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&&D.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}))}))}));I(L);L.TextareaAutosize;var H=I(W((function(e,r){r.__esModule=!0,r.default=L.TextareaAutosize}))),F=i.styled(H)((function(e){return i.css({appearance:"none",background:"transparent",border:"none",borderRadius:"borderRadius20",boxShadow:"none",color:"inherit",display:"block",fontFamily:"inherit",fontSize:"fontSize30",fontWeight:"fontWeightNormal",lineHeight:"lineHeight20",maxHeight:"size30",outline:"none",paddingBottom:"space30",paddingLeft:"space40",paddingRight:"space40",paddingTop:"space30",resize:"vertical",width:"100%","&::placeholder":{color:"inverse"===e.variant?"colorTextInverseWeak":"colorTextWeak",fontStyle:"italic"},"&:focus::placeholder":{color:"inverse"===e.variant?"colorTextInverseWeak":"colorTextWeak"},"&:disabled":{color:"inverse"===e.variant?"colorTextInverseWeaker":"colorTextWeaker",cursor:"not-allowed"}})})),P=r.forwardRef((function(e,o){var t=e.children,n=e.disabled,i=e.hasError,a=e.id,l=e.insertBefore,d=e.insertAfter,s=e.name,c=e.placeholder,h=e.readOnly,f=e.variant,v=u(e,["children","disabled","hasError","id","insertBefore","insertAfter","name","placeholder","readOnly","variant"]);return r.createElement(k,{disabled:n,hasError:i,insertAfter:d,insertBefore:l,readOnly:h,variant:f},r.createElement(F,p({"aria-invalid":i,"aria-readonly":h},T(v),{async:!0,disabled:n,id:a,name:s,placeholder:c,readOnly:h,ref:o,rows:3,spellCheck:!0,variant:f}),t))}));P.displayName="FormTextArea","development"===process.env.NODE_ENV&&(P.propTypes={disabled:t.bool,hasError:t.bool,id:t.string.isRequired,name:t.string,onBlur:t.func,onChange:t.func.isRequired,onFocus:t.func,placeholder:t.string,readOnly:t.bool,required:t.bool});var V=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,v=e._hoverSibling,b=e._invalidSibling,m=e._invalidAndHoverSibling,g=e.type,y=void 0===g?"checkbox":g,x="input[type="+y+"]:active + label &",E="input[type="+y+"]:checked + label &, input[type="+y+"][aria-checked=mixed] + label &",k="input[type="+y+"]:checked:active + label &, input[type="+y+"][aria-checked=mixed]:active + label &",w="input[type="+y+"]:checked + label & > *, input[type="+y+"][aria-checked=mixed] + label & > *",T="input[type="+y+"]:checked:disabled + label &, input[type="+y+"][aria-checked=mixed]:disabled + label &",R="input[type="+y+"]:checked:focus + label &, input[type="+y+"][aria-checked=mixed]:focus + label &",B="input[type="+y+"]:checked:hover:not(:disabled) + label &, input[type="+y+"][aria-checked=mixed]:hover:not(:disabled) + label &",O="input[type="+y+"][aria-invalid=true]:checked + label &",S="input[type="+y+"][aria-invalid=true]:checked:hover:not(:disabled) + label &",C="input[type="+y+"] + label & > *",N="input[type="+y+"]:disabled + label &",z="input[type="+y+"]:focus + label &",_="input[type="+y+"]:hover:not(:disabled):not(:checked) + label &",I="input[type="+y+"][aria-invalid=true] + label &",W="input[type="+y+"][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[O]=s,r[S]=c,r[C]=t,r[N]=h,r[z]=f,r[_]=v,r[I]=b,r[W]=m,r))}));V.displayName="SiblingBox",V.defaultProps={alignItems:"center","aria-hidden":"true",display:"inline-flex",flexShrink:0,justifyContent:"center",transition:"all 120ms"},"development"===process.env.NODE_ENV&&(V.propTypes={type:t.oneOf(["checkbox","radio"])});var j=function(e){var o=e.children,t=e.disabled,n=u(e,["children","disabled"]);return r.createElement(V,p({as:"span",display:"flex",backgroundColor:"colorBackgroundBody",borderColor:"colorBorder",borderStyle:"solid",borderWidth:"borderWidth10",height:"sizeSquare50",marginX:"space20",marginY:"space10",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)};j.displayName="BaseRadioCheckboxControl","development"===process.env.NODE_ENV&&(j.propTypes={children:t.node.isRequired,disabled:t.bool});var M=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))};M.displayName="BaseRadioCheckboxLabel","development"===process.env.NODE_ENV&&(M.propTypes={children:t.node.isRequired});var U=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)};U.displayName="BaseRadioCheckboxLabelText","development"===process.env.NODE_ENV&&(U.propTypes={children:t.node.isRequired});var G=function(e){var o=e.children,t=e.helpTextId;return r.createElement(a.Box,{as:"span",display:"block",marginLeft:"space80"},r.createElement(z,{id:t,marginTop:"space0"},o))};G.displayName="BaseRadioCheckboxHelpText","development"===process.env.NODE_ENV&&(G.propTypes={children:t.node.isRequired,helpTextId:t.string.isRequired});var Y=r.createContext({name:"",value:"",disabled:!1,hasError:!1,onChange:function(){}}),X=r.forwardRef((function(e,o){return r.createElement(a.Box,p({as:"input",type:"radio",size:"size0",border:"none",overflow:"hidden",padding:"space0",margin:"space0",whiteSpace:"nowrap",textTransform:"none",position:"absolute",clip:"rect(0 0 0 0)",ref:o},e))})),J=r.forwardRef((function(e,o){var t=e.id,n=e.name,i=e.value,l=e.checked,d=e.disabled,s=e.hasError,h=e.onChange,f=e.children,v=e.helpText,b=u(e,["id","name","value","checked","disabled","hasError","onChange","children","helpText"]),m=c.useUID(),g=r.useContext(Y),y={name:null!=n?n:g.name,checked:null!=l?l:g.value===i,disabled:null!=d?d:g.disabled,hasError:null!=s?s:g.hasError,onChange:null!=h?h:g.onChange};return r.createElement(a.Box,{position:"relative",display:"inline-flex",alignItems:"flex-start",flexDirection:"column",verticalAlign:"top"},r.createElement(X,p({},b,y,{value:i,"aria-describedby":m,"aria-invalid":y.hasError,id:t,ref:o})),r.createElement(M,{disabled:y.disabled,htmlFor:t},r.createElement(j,{borderRadius:"borderRadiusCircle",disabled:y.disabled,type:"radio"},r.createElement(a.Box,{as:"span",backgroundColor:y.disabled&&y.checked?"colorBackgroundDarkest":"colorBackgroundBody",borderRadius:"borderRadiusCircle",height:"sizeSquare25",width:"sizeSquare25"})),r.createElement(U,null,f)),v&&r.createElement(G,{helpTextId:m},v))}));J.displayName="Radio","development"===process.env.NODE_ENV&&(J.propTypes={id:t.string.isRequired,value:t.string.isRequired,name:t.string,checked:t.bool,disabled:t.bool,hasError:t.bool,helpText:t.oneOfType([t.string,t.node]),onChange:t.func,children:t.node.isRequired});var K=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(z,{marginTop:"space0"},i),r.createElement(a.Box,{marginLeft:"space20",marginRight:"space20",marginTop:"space40"},r.Children.map(o,(function(e){return r.createElement(a.Box,{display:"horizontal"===d?"inline-block":"block",marginBottom:"space40",marginRight:"horizontal"===d?"space70":null},e)})),n&&r.createElement(z,{marginTop:"space0",variant:"error"},n)))};K.displayName="InlineControlGroup",K.defaultProps={orientation:"vertical"},"development"===process.env.NODE_ENV&&(K.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 Q=function(e){var o=e.name,t=e.value,n=e.onChange,i=e.disabled,a=void 0!==i&&i,l=e.errorText,d=e.children,s=u(e,["name","value","onChange","disabled","errorText","children"]),c=r.useMemo((function(){return function(e){null!=n&&n(e.target.value)}}),[n]),h=r.useMemo((function(){return{name:o,value:t||"",disabled:a,hasError:null!=l,onChange:c}}),[o,t,a,l,c]);return r.createElement(Y.Provider,{value:h},r.createElement(K,p({},s,{disabled:a,errorText:l,name:o}),d))};Q.displayName="RadioGroup","development"===process.env.NODE_ENV&&(Q.propTypes={name:t.string.isRequired,onChange:t.func.isRequired});var Z=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"}),$=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,v=e.isSelectAll,b=u(e,["id","checked","children","helpText","disabled","hasError","indeterminate","isSelectAllChild","isSelectAll"]),m=c.useUID(),g=null;v&&!d&&(g="colorBackground"),(v&&n||v&&h)&&(g="colorBackgroundPrimaryLightest");var y=v?"space20":null;return f&&(y="space30"),r.createElement(a.Box,{backgroundColor:g,borderRadius:v?"borderRadius10":null,display:"inline-flex",flexDirection:"column",padding:v?"space30":null,paddingBottom:v?"space20":null,paddingLeft:y,paddingRight:f?"space30":null,paddingTop:v?"space20":null},r.createElement(Z,p({},b,{"aria-describedby":m,"aria-checked":h?"mixed":n,"aria-invalid":s,checked:n,disabled:d,id:t,ref:o,type:"checkbox"})),r.createElement(M,{disabled:d,htmlFor:t},r.createElement(j,{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":"colorBorderInverseLightest",borderRadius:"borderRadius10",borderStyle:"solid",borderWidth:"borderWidth10",bottom:"0",content:'""',display:"block",height:"sizeSquare25",position:"absolute",width:"size0"},_after:{borderColor:d&&(n||h)?"colorBorderDark":"colorBorderInverseLightest",borderRadius:"borderRadius10",borderStyle:"solid",borderWidth:"borderWidth10",bottom:"0",content:'""',display:"block",height:"size0",position:h?void 0:"absolute",width:"sizeSquare30"}})),r.createElement(U,{fontWeight:v?null:"fontWeightNormal"},i)),l&&r.createElement(G,{helpTextId:m},l))}));$.displayName="Checkbox","development"===process.env.NODE_ENV&&($.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 ee=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(K,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})))};ee.displayName="CheckboxGroup","development"===process.env.NODE_ENV&&(ee.propTypes={isSelectAll:t.bool,name:t.string});var re=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($,p({},n,{hasError:null!=t}),o)),t&&r.createElement(a.Box,{marginTop:"space30",marginLeft:"space50"},r.createElement(z,{variant:"error"},t)))};re.displayName="CheckboxDisclaimer","development"===process.env.NODE_ENV&&(re.propTypes={children:t.node.isRequired,errorText:t.oneOfType([t.string,t.node])});var oe=function(e){var o=e.as,t=e.display,n=e.size,i=e.color,a=e.title,l=e.decorative;if(!l&&null==a)throw new Error("[ChevronDownIcon]: Missing a title for non-decorative icon.");return r.createElement(S,{as:o,display:t,size:n,color:i},r.createElement(c.UID,null,(function(e){return r.createElement("svg",{role:"img","aria-hidden":l,width:"100%",height:"100%",viewBox:"0 0 20 20","aria-labelledby":e},a?r.createElement("title",{id:e},a):null,r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.293 8.293a1 1 0 011.32-.083l.094.083L10 10.585l2.293-2.292a1 1 0 011.32-.083l.094.083a1 1 0 01.083 1.32l-.083.094-3 3a1 1 0 01-1.32.083l-.094-.083-3-3a1 1 0 010-1.414z"}))})))};oe.displayName="ChevronDownIcon";var te=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)},ne=i.styled.select((function(e){return i.css({appearance:"none",background:"transparent",border:"none",borderRadius:"borderRadius20",boxShadow:"none",color:"inherit",cursor:"pointer",display:"block",fontFamily:"inherit",fontSize:"fontSize30",fontWeight:"fontWeightNormal",lineHeight:"lineHeight20",outline:"none",paddingBottom:"space30",paddingLeft:"space40",paddingRight:"space100",paddingTop:"space30",resize:"none",width:"100%","&:disabled":{color:"inverse"===e.variant?"colorTextInverseWeaker":"colorTextWeaker",cursor:"not-allowed"}})})),ie=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=e.variant,f=u(e,["disabled","hasError","insertBefore","insertAfter","children","size","multiple","variant"]),v="colorTextIcon";return t?v="colorTextWeaker":"inverse"===h&&(v="colorTextInverseWeak"),r.createElement(k,{disabled:t,hasError:n,insertAfter:l,insertBefore:i,variant:h},r.createElement(a.Box,{display:"flex",width:"100%",position:"relative"},r.createElement(ne,p({"aria-invalid":n,"data-not-selectize":"true",disabled:t,ref:o},f,E,{multiple:c,size:c?s:0,variant:h}),d),!c&&r.createElement(te,null,r.createElement(oe,{"aria-hidden":"true",decorative:!0,color:v,size:"sizeIcon30"}))))}));ie.displayName="Select","development"===process.env.NODE_ENV&&(ie.propTypes={id:t.string.isRequired,hasError:t.bool,onChange:t.func.isRequired});var ae=p(p({},E),{selected:void 0}),le=i.styled.option(i.css({background:"transparent",color:"inherit",fontFamily:"fontFamilyText",lineHeight:"lineHeight50",paddingTop:"space30",paddingBottom:"space30",paddingLeft:"space20"})),de=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(le,p({ref:o},n,ae),t)}));de.displayName="Option","development"===process.env.NODE_ENV&&(de.propTypes={value:t.string.isRequired,children:t.node.isRequired});var se=i.styled.optgroup(i.css({background:"transparent",color:"inherit",fontFamily:"fontFamilyText",fontWeight:"fontWeightMedium",fontStyle:"normal",margin:"space20"})),ce=r.forwardRef((function(e,o){var t=e.label,n=e.children,i=u(e,["label","children"]);return r.createElement(se,p({ref:o,label:t},i,E),n)}));ce.displayName="OptionGroup","development"===process.env.NODE_ENV&&(ce.propTypes={label:t.string.isRequired,children:t.node.isRequired}),exports.Checkbox=$,exports.CheckboxDisclaimer=re,exports.CheckboxGroup=ee,exports.FieldWrapperPropTypes=v,exports.FormControlWrapper=k,exports.FormHelpText=z,exports.FormHelpTextVariants=N,exports.FormInput=B,exports.FormLabel=f,exports.FormTextArea=P,exports.InputElement=R,exports.Option=de,exports.OptionGroup=ce,exports.Radio=J,exports.RadioGroup=Q,exports.Select=ie,exports.SelectIconWrapper=te; |
{ | ||
"name": "@twilio-paste/form", | ||
"version": "2.2.7", | ||
"version": "2.2.8", | ||
"category": "user input", | ||
@@ -34,10 +34,10 @@ "status": "beta", | ||
"peerDependencies": { | ||
"@twilio-paste/box": "^2.9.6", | ||
"@twilio-paste/box": "^2.10.0", | ||
"@twilio-paste/design-tokens": "^6.2.2", | ||
"@twilio-paste/flex": "^0.3.52", | ||
"@twilio-paste/icons": "^3.1.2", | ||
"@twilio-paste/flex": "^0.3.53", | ||
"@twilio-paste/icons": "^3.2.0", | ||
"@twilio-paste/screen-reader-only": "^1.1.12", | ||
"@twilio-paste/style-props": "^1.5.5", | ||
"@twilio-paste/style-props": "^1.6.0", | ||
"@twilio-paste/styling-library": "^0.1.2", | ||
"@twilio-paste/text": "^2.2.17", | ||
"@twilio-paste/text": "^2.3.0", | ||
"@twilio-paste/theme": "^3.2.18", | ||
@@ -51,14 +51,14 @@ "@twilio-paste/types": "^3.0.21", | ||
"devDependencies": { | ||
"@twilio-paste/box": "^2.10.0", | ||
"@twilio-paste/design-tokens": "^6.2.2", | ||
"@twilio-paste/flex": "^0.3.53", | ||
"@twilio-paste/icons": "^3.2.0", | ||
"@twilio-paste/box": "^2.10.1", | ||
"@twilio-paste/design-tokens": "^6.3.0", | ||
"@twilio-paste/flex": "^0.3.54", | ||
"@twilio-paste/icons": "^3.2.1", | ||
"@twilio-paste/screen-reader-only": "^1.1.12", | ||
"@twilio-paste/style-props": "^1.6.0", | ||
"@twilio-paste/style-props": "^1.6.1", | ||
"@twilio-paste/styling-library": "^0.1.2", | ||
"@twilio-paste/text": "^2.3.0", | ||
"@twilio-paste/theme": "^3.2.18", | ||
"@twilio-paste/types": "^3.0.21" | ||
"@twilio-paste/text": "^2.3.1", | ||
"@twilio-paste/theme": "^3.2.19", | ||
"@twilio-paste/types": "^3.0.22" | ||
}, | ||
"gitHead": "4cbf601cb682eed4942bd54e41172f745e7b941d" | ||
"gitHead": "ec8ff79a708549d56659faab74cc9e108fcf8d88" | ||
} |
125598
645