"use strict";(self.webpackChunkreact_typescript_webpack=self.webpackChunkreact_typescript_webpack||[]).push([[105],{30105:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(39248),o=r(49587),i=r(17437),S=r(92479),W=r(2445);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}var D=["css"];function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function _(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach(function(e){u(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function u(e,t,r){return(t=function(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var z=function(e,t,r){return(0,i.AH)("display:flex;align-items:center;padding:",n.YK[6]," ",n.YK[12],";:focus-within{box-shadow:",n.r7.inputFocus,";border-radius:",n.Vq[5],";}",!r&&(0,i.AH)("border:1px solid ",n.nm.border.neutral,";border-radius:",n.Vq[5],";box-shadow:",n.r7.input,";background-color:",n.nm.basic.white,";;label:inputWrapper;")," ","large"===e&&(0,i.AH)("padding:",n.YK[10]," ",n.YK[16],";;label:inputWrapper;"),";",t&&(0,i.AH)("border-color:",n.nm.basic.critical,";background-color:",n.nm.surface.critical.neutral,";;label:inputWrapper;"),";;label:inputWrapper;")},F=function(e,t,r){return(0,i.AH)(o.I.body(),";height:22px;border:none;box-shadow:none;padding:0;background-color:transparent;",t&&(0,i.AH)("padding-",e,":",n.YK[10],";;label:input;"),";","large"===r&&(0,i.AH)("font-size:",n.J[24],";font-weight:",n.Wy.medium,";height:34px;",t&&(0,i.AH)("padding-",e,":",n.YK[12],";;label:input;"),";;label:input;"),";;label:input;")},I=function(e,t){return(0,i.AH)("color:",n.nm.text.neutral,";padding-right:",n.YK[8],";font-size:",n.J[16],";line-height:",n.K_[20],";","large"===t&&(0,i.AH)("padding-right:",n.YK[12],";font-size:",n.J[24],";line-height:",n.K_[32],";;label:inputLeftContent;")," ",e&&(0,i.AH)("border-right:1px solid ",n.nm.border.neutral,";;label:inputLeftContent;"),";;label:inputLeftContent;")},T=function(e,t){return(0,i.AH)("color:",n.nm.text.neutral,";padding-left:",n.YK[8],";font-size:",n.J[16],";line-height:",n.K_[20],";","large"===t&&(0,i.AH)("padding-left:",n.YK[12],";font-size:",n.J[24],";line-height:",n.K_[32],";;label:inputRightContent;")," ",e&&(0,i.AH)("border-left:1px solid ",n.nm.border.neutral,";;label:inputRightContent;"),";;label:inputRightContent;")};const c=function(e){var t=e.label,o=e.content,r=e.contentPosition,i=void 0===r?"left":r,n=e.showVerticalBar,l=void 0===n||n,a=e.size,u=void 0===a?"regular":a,c=e.type,p=void 0===c?"text":c,d=e.field,b=e.fieldState,f=e.disabled,s=e.readOnly,g=e.loading,h=e.placeholder,y=e.helpText,v=e.helpTextWithLabel,m=e.onChange,O=e.onKeyDown,w=e.isHidden,x=e.wrapperCss,C=e.removeBorder,j=void 0!==C&&C,A=e.selectOnClick,H=void 0!==A&&A,K=e.tabIndex,P=void 0===K?-1:K,Y=e.autoFocus,k=void 0!==Y&&Y;return(0,W.Y)(S.A,{label:t,field:d,fieldState:b,disabled:f,readOnly:s,loading:g,placeholder:h,helpText:y,isHidden:w,removeBorder:j,helpTextWithLabel:v,children:function(e){var t,r=e.css,n=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,D);return(0,W.FD)("div",{css:[z(u,!!b.error,j),x,";label:FormInputWithContent;"],children:["left"===i&&(0,W.Y)("div",{css:I(l,u),children:o}),(0,W.Y)("input",_(_(_({},d),n),{},{type:"text",tabIndex:P,value:null!==(t=d.value)&&void 0!==t?t:"",onChange:function(e){var t="number"===p?e.target.value.replace(/[^0-9.]/g,"").replace(/(\..*)\./g,"$1"):e.target.value;d.onChange(t),m&&m(t)},onKeyDown:function(e){return O&&O(e.key)},css:[r,F(i,l,u),";label:FormInputWithContent;"],autoComplete:"off",autoFocus:k,onClick:function(e){H?e.currentTarget.select():e.preventDefault()}})),"right"===i&&(0,W.Y)("div",{css:T(l,u),children:o})]})}})}}}]);