@para-ui/core 2.1.36 → 2.1.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -76,4 +76,4 @@ object-assign
76
76
  *
77
77
  * This source code is licensed under the MIT license found in the
78
78
  * LICENSE file in the root directory of this source tree.
79
- */n(7418);var r=n(8156),i=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),t.Fragment=o("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var r,o={},u=null,s=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(s=t.ref),t)l.call(t,r)&&!c.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:u,ref:s,props:o,_owner:a.current}}t.jsx=u,t.jsxs=u},5893:function(e,t,n){"use strict";e.exports=n(5251)},9271:function(e,t,n){var r=n(3379),i=n(2565);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},2113:function(e,t,n){var r=n(3379),i=n(7381);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},3936:function(e,t,n){var r=n(3379),i=n(9916);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},9663:function(e,t,n){var r=n(3379),i=n(4928);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},3492:function(e,t,n){var r=n(3379),i=n(5714);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},6202:function(e,t,n){var r=n(3379),i=n(3637);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},2310:function(e,t,n){var r=n(3379),i=n(9929);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},3379:function(e,t,n){"use strict";var r,i=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function l(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function c(e,t){for(var n={},r=[],i=0;i<e.length;i++){var o=e[i],c=t.base?o[0]+t.base:o[0],u=n[c]||0,s="".concat(c," ").concat(u);n[c]=u+1;var f=l(s),d={css:o[1],media:o[2],sourceMap:o[3]};-1!==f?(a[f].references++,a[f].updater(d)):a.push({identifier:s,updater:x(d,t),references:1}),r.push(s)}return r}function u(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var i=n.nc;i&&(r.nonce=i)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var a=o(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var s,f=(s=[],function(e,t){return s[e]=t,s.filter(Boolean).join("\n")});function d(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=f(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function p(e,t,n){var r=n.css,i=n.media,o=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var h=null,v=0;function x(e,t){var n,r,i;if(t.singleton){var o=v++;n=h||(h=u(t)),r=d.bind(null,n,o,!1),i=d.bind(null,n,o,!0)}else n=u(t),r=p.bind(null,n,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=i());var n=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=l(n[r]);a[i].references--}for(var o=c(e,t),u=0;u<n.length;u++){var s=l(n[u]);0===a[s].references&&(a[s].updater(),a.splice(s,1))}n=o}}}},7839:function(e,t,n){"use strict";var r=n(5893),i=n(8156),o=n(7371),a=(n(9271),function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)});t.default=function(e){var t=e.children,n=e.arrow,l=void 0!==n&&n,c=e.placement,u=void 0===c?"bottom-start":c,s=e.tips,f=void 0===s?"":s,d=e.className,p=void 0===d?"":d,h=e.beyondText,v=void 0===h||h,x=e.interactive,m=void 0===x||x,b=e.style,y=(0,i.useRef)(),g=(0,i.useState)(""),w=g[0],j=g[1];(0,i.useEffect)((function(){j(f)}),[f]);var O;return(0,r.jsx)("div",a({ref:y,className:(O="paraui-auto-tips",p&&(O+=" "+p),O),onMouseOver:function(){var e="";y.current&&y.current.scrollWidth>y.current.offsetWidth&&(e=f||(v?y.current.innerText:t)),j(e)},style:b},{children:(0,r.jsx)(o.default,a({arrow:l,title:w,placement:u,interactive:m,boundariesElement:"viewport",className:"paraui-auto-tips-tooltip"},{children:(0,r.jsx)("div",a({className:"auto-tips-content"},{children:t}))}))}))}},9735:function(e,t,n){"use strict";var r=n(5893),i=n(8156),o=n.n(i),a=n(5395),l=n.n(a),c=function(){return c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},c.apply(this,arguments)};t.default=function(e){var t,n=e.Com,i=e.comProps,a=e.comName,u=o().useContext(l()).componentsProps;return(0,r.jsx)(n,c({},(t=u&&u[a],c(c({},t),i))))}},3566:function(e,t,n){"use strict";var r=n(5893),i=n(7371),o=n(5670),a=n.n(o),l=n(6010),c=(n(2113),function(){return c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},c.apply(this,arguments)}),u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};t.default=function(e){var t=e.title,n=void 0===t?"":t,o=e.children,s=e.arrow,f=void 0===s||s,d=e.interactive,p=void 0===d||d,h=e.className,v=(e.placement,u(e,["title","children","arrow","interactive","className","placement"]));return(0,r.jsx)(i.default,c({title:n,arrow:f,interactive:p},v,{children:(0,r.jsx)("span",c({className:(0,l.Z)("paraui-help",h)},{children:o||(0,r.jsx)(a(),{})}))}))}},4254:function(e,t,n){"use strict";var r=n(5893),i=(n(3936),function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)});t.default=function(e){var t,n=e.className,o=e.style,a=e.error,l=void 0!==a&&a,c=e.helperText;return(0,r.jsx)("p",i({className:(t="paraui-helper-text",n&&(t+=" "+n),l&&(t+=" paraui-helper-text-error"),t),style:o},{children:c}))}},8767:function(e,t,n){"use strict";var r=n(5893),i=n(3566),o=(n(9663),function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)});t.default=function(e){var t=e.className,n=e.style,a=e.label,l=e.labelSign,c=e.required,u=void 0!==c&&c,s=e.tooltip,f=e.tooltipType,d=void 0===f?"icon":f,p=e.placement,h=e.arrow,v=e.tooltipIcon,x=function(){var e="paraui-label";return d&&(e+=" paraui-label-"+d),s&&(e+=" paraui-label-tooltip"),t&&(e+=" "+t),e};return(0,r.jsxs)(r.Fragment,{children:["icon"===d&&(0,r.jsxs)("label",o({className:x(),style:n},{children:[(0,r.jsx)(r.Fragment,{children:a}),u&&(0,r.jsx)("span",o({className:"paraui-label-required"},{children:"*"})),l&&(0,r.jsx)("span",{children:l}),s&&(0,r.jsx)(i.default,o({title:s,placement:p,arrow:h},{children:v}))]})),"line"===d&&(0,r.jsx)(i.default,o({title:s||"",placement:p,arrow:h},{children:(0,r.jsxs)("label",o({className:x(),style:n},{children:[(0,r.jsx)(r.Fragment,{children:a}),u&&(0,r.jsx)("span",o({className:"paraui-label-required"},{children:"*"})),l&&(0,r.jsx)("span",{children:l})]}))}))]})}},7502:function(e,t,n){"use strict";var r=n(5893),i=n(8156),o=n(1217),a=n.n(o),l=(n(3492),function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},l.apply(this,arguments)});t.default=function(e){var t=e.className,n=e.style,o=e.opacity,c=void 0===o?.7:o,u=(0,i.useRef)(null);(0,i.useEffect)((function(){u&&u.current&&u.current.parentNode&&(u.current.parentNode.style.position||(u.current.parentNode.style.position="relative"))}),[]);var s;return(0,r.jsxs)("div",l({className:(s="paraui-loading",t&&(s+=" "+t),s),style:n,ref:u},{children:[(0,r.jsx)("div",l({className:"paraui-loading-box"},{children:(0,r.jsx)(a(),{})})),(0,r.jsx)("div",{className:"paraui-loading-mask",style:{opacity:c}})]}))}},7371:function(e,t,n){"use strict";var r=n(5893),i=n(670),o=n(6010),a=(n(2310),function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)}),l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};t.default=function(e){var t,n=e.placement,c=void 0===n?"top-start":n,u=e.className,s=e.arrow,f=void 0===s||s,d=e.PopperProps,p=e.boundariesElement,h=void 0===p?"scrollParent":p,v=l(e,["placement","className","arrow","PopperProps","boundariesElement"]),x=a(a({},e.classes),{popper:(0,o.Z)("paraui-tooltip",u,null===(t=e.classes)||void 0===t?void 0:t.popper,{"paraui-tooltip-left-right":(null==c?void 0:c.includes("left"))||(null==c?void 0:c.includes("right")),"paraui-tooltip-top-bottom":(null==c?void 0:c.includes("top"))||(null==c?void 0:c.includes("bottom"))})});return(0,r.jsx)(i.Tooltip,a({},v,{enterTouchDelay:0,arrow:f,placement:c,classes:x,PopperProps:a(a({},d),{modifiers:{preventOverflow:{boundariesElement:h}}})}))}},670:function(e){"use strict";e.exports=n},5395:function(e){"use strict";e.exports=t},8543:function(e){"use strict";e.exports=r},8156:function(t){"use strict";t.exports=e}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,exports:{}};return i[e](n,n.exports,a),n.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return function(){"use strict";a.r(l),a.d(l,{TextField:function(){return w},default:function(){return j}});var e=a(5893),t=a(9735),n=a(8156),r=a(7371),i=a(7839),o=a(7502),c=a(8767),u=a(4254),s=a(987),f=a.n(s),d=a(8926),p=a.n(d),h=a(3730),v=a.n(h),x=a(8543),m=(a(6202),function(){return m=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},m.apply(this,arguments)}),b=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},y=function(e){return"number"==typeof e&&!isNaN(e)},g=function(t){var a=t.className,l=t.style,s=t.size,d=void 0===s?"large":s,h=t.labelMode,g=void 0===h?"outside":h,w=t.placeholder,j=void 0===w?"":w,O=t.label,S=void 0===O?"":O,N=t.labelTooltip,C=t.disabled,_=void 0!==C&&C,P=t.multiline,k=void 0!==P&&P,E=t.required,M=void 0!==E&&E,T=t.labelSign,R=t.rows,L=void 0===R?2:R,I=t.error,z=void 0!==I&&I,F=t.helperText,U=void 0===F?"":F,A=t.addonBefore,B=void 0===A?"":A,q=t.addonAfter,H=void 0===q?"":q,D=(t.defaultValue,t.value),J=t.autoFocus,Y=void 0!==J&&J,W=t.type,K=void 0===W?"text":W,$=t.onClickIcon,Q=t.rightIcon,V=t.showRightIcon,G=void 0===V||V,Z=t.allowClear,X=void 0!==Z&&Z,ee=t.limitLength,te=t.fetchSuggestions,ne=t.selectPopoverClass,re=t.renderSelectItem,ie=t.showSelectName,oe=void 0===ie?"value":ie,ae=t.resize,le=void 0===ae||ae,ce=t.onBlur,ue=t.onFocus,se=t.onChange,fe=t.onKeydown,de=t.onKeyUp,pe=t.onEnter,he=t.onClickAddonBefore,ve=t.onClickAddonAfter,xe=t.onSelect,me=t.onClear,be=b(t,["className","style","size","labelMode","placeholder","label","labelTooltip","disabled","multiline","required","labelSign","rows","error","helperText","addonBefore","addonAfter","defaultValue","value","autoFocus","type","onClickIcon","rightIcon","showRightIcon","allowClear","limitLength","fetchSuggestions","selectPopoverClass","renderSelectItem","showSelectName","resize","onBlur","onFocus","onChange","onKeydown","onKeyUp","onEnter","onClickAddonBefore","onClickAddonAfter","onSelect","onClear"]),ye=(0,n.useState)("text-field-select-content-"+(0,x.UUID)())[0],ge=(0,n.useState)(!0),we=ge[0],je=ge[1],Oe=(0,n.useState)(""),Se=Oe[0],Ne=Oe[1],Ce=(0,n.useState)(!1),_e=Ce[0],Pe=Ce[1],ke=(0,n.useState)("text"),Ee=ke[0],Me=ke[1],Te=(0,n.useState)(!1),Re=Te[0],Le=Te[1],Ie=(0,n.useState)(!1),ze=Ie[0],Fe=Ie[1],Ue=(0,n.useState)([]),Ae=Ue[0],Be=Ue[1],qe=(0,n.useRef)(null),He=(0,n.useRef)(null);(0,n.useEffect)((function(){void 0!==t.defaultValue&&Ne(t.defaultValue)}),[]),(0,n.useEffect)((function(){K!==Ee&&Me(K)}),[K]),(0,n.useEffect)((function(){void 0!==D&&Ne(D)}),[D]),(0,n.useEffect)((function(){je(""===Se||void 0===Se)}),[Se]),(0,n.useEffect)((function(){te&&Le(_e)}),[_e,te]),(0,n.useEffect)((function(){return Re?window.addEventListener("keydown",$e):window.removeEventListener("keydown",$e),function(){window.removeEventListener("keydown",$e)}}),[Re]),(0,n.useEffect)((function(){if(!_e&&Se){var e=Je(Se);if(e!==Se){var n={};n.target=qe.current,n.target.value=e,void 0===t.value&&Ne(e),t.onChange&&t.onChange(n)}}}),[Se,_e]);var De,Je=function(e){var n=e;return y(t.limitLength)&&e.toString().length>Number(t.limitLength)&&(n=n.toString().substr(0,t.limitLength)),n},Ye=function(){_||(je(!1),(qe&&qe.current).focus())},We=function(e){var t=e.selectDom,n=e.keyCode,r=e.currentDom,i="nextSibling",o=".text-field-select-content-item";38===n&&(i="previousSibling",o=".text-field-select-content-item:last-child"),r?(r=r[i])||(r=t.querySelector(o)):r=t.querySelector(".text-field-select-content-item"),r&&(r.classList.add("text-field-select-content-item-keydown"),Ke(r,t))},Ke=function(e,t){var n=t.clientHeight,r=e.offsetTop+e.clientHeight-n;t.scrollTop=r>0?r:0},$e=function(e){var t=document.querySelector("."+ye),n=null,r=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&r){var i=r.dataset.val;it(JSON.parse(i))(e),(qe&&qe.current).blur()}r&&(n=r,r.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&We({selectDom:t,keyCode:e.keyCode,currentDom:n}),38===e.keyCode&&We({selectDom:t,keyCode:e.keyCode,currentDom:n})},Qe=function(e){Pe(!1),""===e.target.value&&je(!0),ce&&ce(e)},Ve=function(e){te&&(Fe(!0),te(e,(function(e){Be(e||[]),Fe(!1)})))},Ge=function(e){Pe(!0),ue&&ue(e),Ve(e.target.value)},Ze=function(e){var n=e.target.value;n&&je(!1),void 0===t.value&&Ne(n),se&&se(e),Ve(e.target.value)},Xe=function(e){13===e.keyCode&&pe&&pe(e),fe&&fe(e)},et=function(e){de&&de(e)},tt=function(e){"password"===K&&("text"===Ee&&Me("password"),"password"===Ee&&Me("text")),$&&$(e)},nt=function(){return void 0===t.value?Se:D},rt=function(){Le(!1)},it=function(e){return function(t){xe&&xe(e)}},ot=(0,n.useMemo)((function(){return(0,e.jsx)(e.Fragment,{children:y(ee)&&(0,e.jsx)("span",m({className:"length-limit"},{children:(Se?Se.toString().length:0)+"/"+ee}))})}),[ee,Se]),at=(0,n.useMemo)((function(){var t=Q||("password"===K?"password"===Ee?(0,e.jsx)(p(),{}):(0,e.jsx)(f(),{}):null);return(0,e.jsx)(e.Fragment,{children:G&&t&&(0,e.jsx)("span",m({className:"password"===K?"right-icon right-icon-password":"right-icon",onClick:tt},{children:t}))})}),[G,Q,K,Ee,$]),lt=function(){var e=qe.current;e.value="",void 0===t.value&&Ne(""),se&&se({target:e}),Ve(""),me&&me()},ct=function(){if(nt()&&!_&&X)return(0,e.jsx)("span",m({className:"clean-up-icon",onClick:lt},{children:(0,e.jsx)(v(),{})}))},ut=(0,n.useMemo)((function(){return(0,e.jsxs)("div",m({className:"text-field-content-within",ref:He},{children:[(0,e.jsxs)("div",m({className:"text-field-content-within-input"},{children:[k?(0,e.jsx)("textarea",m({ref:qe,rows:L,value:nt(),onBlur:Qe,onFocus:Ge,onChange:Ze,onKeyDown:Xe,onKeyUp:et,disabled:_},be)):(0,e.jsx)("input",m({ref:qe,type:Ee,value:nt(),onBlur:Qe,onFocus:Ge,onChange:Ze,onKeyDown:Xe,onKeyUp:et,disabled:_},be)),we&&!_e&&(0,e.jsx)("span",m({className:"text-field-label-placeholder",onClick:Ye},{children:"outside"===g?j:(0,e.jsxs)(e.Fragment,{children:[S||j,M&&(0,e.jsx)("span",m({className:"text-field-required"},{children:"*"})),T&&(0,e.jsx)("span",{children:T})]})}))]})),ct(),ot,at]}))}),[we,_e,Y,Ee,Se,ot,at,g,j,S,_,k,L,be,se,te,$,X,me]),st=(0,n.useMemo)((function(){var t,n=function(e){return"object"==typeof e&&null!==e?e[oe]:e};return(0,e.jsxs)("div",m({className:(t="text-field-select-content",ze&&(t+=" text-field-select-content-loading"),ye&&(t+=" "+ye),t),style:{width:(He&&He.current?He.current.offsetWidth:0)+"px"}},{children:[Ae&&Ae.map((function(t,r){return(0,e.jsx)("div",m({className:"text-field-select-content-item",onMouseDown:it(t),"data-val":JSON.stringify(t)},{children:re?re(t):(0,e.jsx)(i.default,{children:n(t)})}),r)})),ze&&(0,e.jsx)(o.default,{})]}))}),[He,Re,Ae,re,oe,xe,ze,ye]),ft=(0,n.useMemo)((function(){return(0,e.jsx)(r.default,m({open:Re,title:st,onClose:rt,arrow:!1,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,placement:"bottom-start",boundariesElement:window,classes:{popper:(t="paraui-text-field-select paraui-scrollbar-small",d&&(t+=" paraui-text-field-select-"+d),ne&&(t+=" "+ne),Ae.length>0&&(t+=" paraui-text-field-select-data"),t)}},{children:ut}));var t}),[we,_e,Y,Ee,Se,ot,at,g,j,S,_,k,L,be,se,te,xe,He,Re,ne,d,$,Ae,X,me]),dt=(0,n.useMemo)((function(){var t,n=Boolean(M||T||S);if("outside"===g&&n){return(0,e.jsx)(c.default,m({label:S,required:M,labelSign:T},N,{className:(t="text-field-label",N&&N.className&&(t+=" "+N.className),t)}))}return null}),[g,S,T,M,N]);return(0,e.jsxs)("div",m({className:(De="paraui-text-field",De+=" text-field",d&&!k&&(De+=" text-field-"+d),a&&(De+=" "+a),z&&(De+=" text-field-error"),_e&&(De+=" text-field-focus"),_&&(De+=" text-field-disabled"),k&&(De+=" text-field-multiline"),y(t.limitLength)&&(De+=" text-field-limit-length"),y(t.limitLength)&&Se&&Se.toString().length>Number(t.limitLength)&&(De+=" text-field-limit"),le&&(De+=" text-field-resize"),nt()&&(De+=" text-field-value"),X&&(De+=" text-field-allow-clear"),De),style:l},{children:[dt,(0,e.jsxs)("div",m({className:"text-field-content"},{children:[B&&(0,e.jsx)("div",m({className:"text-field-content-before",onClick:function(e){he&&he(e)}},{children:B})),te?ft:ut,H&&(0,e.jsx)("div",m({className:"text-field-content-after",onClick:function(e){ve&&ve(e)}},{children:H}))]})),(0,e.jsx)(u.default,{className:"text-field-error-text",error:z,helperText:U})]}))},w=function(n){return(0,e.jsx)(t.default,{Com:g,comProps:n,comName:"TextField"})},j=w}(),l}()}));
79
+ */n(7418);var r=n(8156),i=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),t.Fragment=o("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var r,o={},u=null,s=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(s=t.ref),t)l.call(t,r)&&!c.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:u,ref:s,props:o,_owner:a.current}}t.jsx=u,t.jsxs=u},5893:function(e,t,n){"use strict";e.exports=n(5251)},9271:function(e,t,n){var r=n(3379),i=n(2565);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},2113:function(e,t,n){var r=n(3379),i=n(7381);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},3936:function(e,t,n){var r=n(3379),i=n(9916);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},9663:function(e,t,n){var r=n(3379),i=n(4928);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},3492:function(e,t,n){var r=n(3379),i=n(5714);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},6202:function(e,t,n){var r=n(3379),i=n(3637);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},2310:function(e,t,n){var r=n(3379),i=n(9929);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},3379:function(e,t,n){"use strict";var r,i=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function l(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function c(e,t){for(var n={},r=[],i=0;i<e.length;i++){var o=e[i],c=t.base?o[0]+t.base:o[0],u=n[c]||0,s="".concat(c," ").concat(u);n[c]=u+1;var f=l(s),d={css:o[1],media:o[2],sourceMap:o[3]};-1!==f?(a[f].references++,a[f].updater(d)):a.push({identifier:s,updater:x(d,t),references:1}),r.push(s)}return r}function u(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var i=n.nc;i&&(r.nonce=i)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var a=o(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var s,f=(s=[],function(e,t){return s[e]=t,s.filter(Boolean).join("\n")});function d(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=f(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function p(e,t,n){var r=n.css,i=n.media,o=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var h=null,v=0;function x(e,t){var n,r,i;if(t.singleton){var o=v++;n=h||(h=u(t)),r=d.bind(null,n,o,!1),i=d.bind(null,n,o,!0)}else n=u(t),r=p.bind(null,n,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=i());var n=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=l(n[r]);a[i].references--}for(var o=c(e,t),u=0;u<n.length;u++){var s=l(n[u]);0===a[s].references&&(a[s].updater(),a.splice(s,1))}n=o}}}},7839:function(e,t,n){"use strict";var r=n(5893),i=n(8156),o=n(7371),a=(n(9271),function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)});t.default=function(e){var t=e.children,n=e.arrow,l=void 0!==n&&n,c=e.placement,u=void 0===c?"bottom-start":c,s=e.tips,f=void 0===s?"":s,d=e.className,p=void 0===d?"":d,h=e.beyondText,v=void 0===h||h,x=e.interactive,m=void 0===x||x,b=e.style,y=(0,i.useRef)(),g=(0,i.useState)(""),w=g[0],j=g[1];(0,i.useEffect)((function(){j(f)}),[f]);var O;return(0,r.jsx)("div",a({ref:y,className:(O="paraui-auto-tips",p&&(O+=" "+p),O),onMouseOver:function(){var e="";y.current&&y.current.scrollWidth>y.current.offsetWidth&&(e=f||(v?y.current.innerText:t)),j(e)},style:b},{children:(0,r.jsx)(o.default,a({arrow:l,title:w,placement:u,interactive:m,boundariesElement:"viewport",className:"paraui-auto-tips-tooltip"},{children:(0,r.jsx)("div",a({className:"auto-tips-content"},{children:t}))}))}))}},9735:function(e,t,n){"use strict";var r=n(5893),i=n(8156),o=n.n(i),a=n(5395),l=n.n(a),c=function(){return c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},c.apply(this,arguments)};t.default=function(e){var t,n=e.Com,i=e.comProps,a=e.comName,u=o().useContext(l()).componentsProps;return(0,r.jsx)(n,c({},(t=u&&u[a],c(c({},t),i))))}},3566:function(e,t,n){"use strict";var r=n(5893),i=n(7371),o=n(5670),a=n.n(o),l=n(6010),c=(n(2113),function(){return c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},c.apply(this,arguments)}),u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};t.default=function(e){var t=e.title,n=void 0===t?"":t,o=e.children,s=e.arrow,f=void 0===s||s,d=e.interactive,p=void 0===d||d,h=e.className,v=(e.placement,u(e,["title","children","arrow","interactive","className","placement"]));return(0,r.jsx)(i.default,c({title:n,arrow:f,interactive:p},v,{children:(0,r.jsx)("span",c({className:(0,l.Z)("paraui-help",h)},{children:o||(0,r.jsx)(a(),{})}))}))}},4254:function(e,t,n){"use strict";var r=n(5893),i=(n(3936),function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)});t.default=function(e){var t,n=e.className,o=e.style,a=e.error,l=void 0!==a&&a,c=e.helperText;return(0,r.jsx)("p",i({className:(t="paraui-helper-text",n&&(t+=" "+n),l&&(t+=" paraui-helper-text-error"),t),style:o},{children:c}))}},8767:function(e,t,n){"use strict";var r=n(5893),i=n(3566),o=(n(9663),function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)});t.default=function(e){var t=e.className,n=e.style,a=e.label,l=e.labelSign,c=e.required,u=void 0!==c&&c,s=e.tooltip,f=e.tooltipType,d=void 0===f?"icon":f,p=e.placement,h=e.arrow,v=e.tooltipIcon,x=function(){var e="paraui-label";return d&&(e+=" paraui-label-"+d),s&&(e+=" paraui-label-tooltip"),t&&(e+=" "+t),e};return(0,r.jsxs)(r.Fragment,{children:["icon"===d&&(0,r.jsxs)("label",o({className:x(),style:n},{children:[(0,r.jsx)(r.Fragment,{children:a}),u&&(0,r.jsx)("span",o({className:"paraui-label-required"},{children:"*"})),l&&(0,r.jsx)("span",{children:l}),s&&(0,r.jsx)(i.default,o({title:s,placement:p,arrow:h},{children:v}))]})),"line"===d&&(0,r.jsx)(i.default,o({title:s||"",placement:p,arrow:h},{children:(0,r.jsxs)("label",o({className:x(),style:n},{children:[(0,r.jsx)(r.Fragment,{children:a}),u&&(0,r.jsx)("span",o({className:"paraui-label-required"},{children:"*"})),l&&(0,r.jsx)("span",{children:l})]}))}))]})}},7502:function(e,t,n){"use strict";var r=n(5893),i=n(8156),o=n(1217),a=n.n(o),l=(n(3492),function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},l.apply(this,arguments)});t.default=function(e){var t=e.className,n=e.style,o=e.opacity,c=void 0===o?.7:o,u=(0,i.useRef)(null);(0,i.useEffect)((function(){u&&u.current&&u.current.parentNode&&(u.current.parentNode.style.position||(u.current.parentNode.style.position="relative"))}),[]);var s;return(0,r.jsxs)("div",l({className:(s="paraui-loading",t&&(s+=" "+t),s),style:n,ref:u},{children:[(0,r.jsx)("div",l({className:"paraui-loading-box"},{children:(0,r.jsx)(a(),{})})),(0,r.jsx)("div",{className:"paraui-loading-mask",style:{opacity:c}})]}))}},7371:function(e,t,n){"use strict";var r=n(5893),i=n(670),o=n(6010),a=(n(2310),function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)}),l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};t.default=function(e){var t,n=e.placement,c=void 0===n?"top-start":n,u=e.className,s=e.arrow,f=void 0===s||s,d=e.PopperProps,p=e.boundariesElement,h=void 0===p?"scrollParent":p,v=l(e,["placement","className","arrow","PopperProps","boundariesElement"]),x=a(a({},e.classes),{popper:(0,o.Z)("paraui-tooltip",u,null===(t=e.classes)||void 0===t?void 0:t.popper,{"paraui-tooltip-left-right":(null==c?void 0:c.includes("left"))||(null==c?void 0:c.includes("right")),"paraui-tooltip-top-bottom":(null==c?void 0:c.includes("top"))||(null==c?void 0:c.includes("bottom"))})});return(0,r.jsx)(i.Tooltip,a({},v,{enterTouchDelay:0,arrow:f,placement:c,classes:x,PopperProps:a(a({},d),{modifiers:{preventOverflow:{boundariesElement:h}}})}))}},670:function(e){"use strict";e.exports=n},5395:function(e){"use strict";e.exports=t},8543:function(e){"use strict";e.exports=r},8156:function(t){"use strict";t.exports=e}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,exports:{}};return i[e](n,n.exports,a),n.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return function(){"use strict";a.r(l),a.d(l,{TextField:function(){return w},default:function(){return j}});var e=a(5893),t=a(9735),n=a(8156),r=a(7371),i=a(7839),o=a(7502),c=a(8767),u=a(4254),s=a(987),f=a.n(s),d=a(8926),p=a.n(d),h=a(3730),v=a.n(h),x=a(8543),m=(a(6202),function(){return m=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},m.apply(this,arguments)}),b=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},y=function(e){return"number"==typeof e&&!isNaN(e)},g=function(t){var a=t.className,l=t.style,s=t.size,d=void 0===s?"large":s,h=t.labelMode,g=void 0===h?"outside":h,w=t.placeholder,j=void 0===w?"":w,O=t.label,S=void 0===O?"":O,N=t.labelTooltip,C=t.disabled,_=void 0!==C&&C,P=t.multiline,k=void 0!==P&&P,E=t.required,M=void 0!==E&&E,T=t.labelSign,R=t.rows,L=void 0===R?2:R,I=t.error,z=void 0!==I&&I,F=t.helperText,U=void 0===F?"":F,A=t.addonBefore,B=void 0===A?"":A,q=t.addonAfter,H=void 0===q?"":q,D=(t.defaultValue,t.value),J=t.autoFocus,Y=void 0!==J&&J,W=t.type,K=void 0===W?"text":W,$=t.onClickIcon,Q=t.rightIcon,V=t.showRightIcon,G=void 0===V||V,Z=t.allowClear,X=void 0!==Z&&Z,ee=t.limitLength,te=t.fetchSuggestions,ne=t.selectPopoverClass,re=t.renderSelectItem,ie=t.showSelectName,oe=void 0===ie?"value":ie,ae=t.resize,le=void 0===ae||ae,ce=t.onBlur,ue=t.onFocus,se=t.onChange,fe=t.onKeydown,de=t.onKeyUp,pe=t.onEnter,he=t.onClickAddonBefore,ve=t.onClickAddonAfter,xe=t.onSelect,me=t.onClear,be=b(t,["className","style","size","labelMode","placeholder","label","labelTooltip","disabled","multiline","required","labelSign","rows","error","helperText","addonBefore","addonAfter","defaultValue","value","autoFocus","type","onClickIcon","rightIcon","showRightIcon","allowClear","limitLength","fetchSuggestions","selectPopoverClass","renderSelectItem","showSelectName","resize","onBlur","onFocus","onChange","onKeydown","onKeyUp","onEnter","onClickAddonBefore","onClickAddonAfter","onSelect","onClear"]),ye=(0,n.useState)("text-field-select-content-"+(0,x.UUID)())[0],ge=(0,n.useState)(!0),we=ge[0],je=ge[1],Oe=(0,n.useState)(""),Se=Oe[0],Ne=Oe[1],Ce=(0,n.useState)(!1),_e=Ce[0],Pe=Ce[1],ke=(0,n.useState)("text"),Ee=ke[0],Me=ke[1],Te=(0,n.useState)(!1),Re=Te[0],Le=Te[1],Ie=(0,n.useState)(!1),ze=Ie[0],Fe=Ie[1],Ue=(0,n.useState)([]),Ae=Ue[0],Be=Ue[1],qe=(0,n.useRef)(null),He=(0,n.useRef)(null);(0,n.useEffect)((function(){void 0!==t.defaultValue&&Ne(t.defaultValue)}),[]),(0,n.useEffect)((function(){K!==Ee&&Me(K)}),[K]),(0,n.useEffect)((function(){void 0!==D&&Ne(D)}),[D]),(0,n.useEffect)((function(){je(""===Se||void 0===Se)}),[Se]),(0,n.useEffect)((function(){te&&Le(_e)}),[_e,te]),(0,n.useEffect)((function(){return Re?window.addEventListener("keydown",$e):window.removeEventListener("keydown",$e),function(){window.removeEventListener("keydown",$e)}}),[Re]),(0,n.useEffect)((function(){if(!_e&&Se){var e=Je(Se);if(e!==Se){var n={};n.target=qe.current,n.target.value=e,void 0===t.value&&Ne(e),t.onChange&&t.onChange(n)}}}),[Se,_e]);var De,Je=function(e){var n=e;return y(t.limitLength)&&e.toString().length>Number(t.limitLength)&&(n=n.toString().substr(0,t.limitLength)),n},Ye=function(){_||(je(!1),(qe&&qe.current).focus())},We=function(e){var t=e.selectDom,n=e.keyCode,r=e.currentDom,i="nextSibling",o=".text-field-select-content-item";38===n&&(i="previousSibling",o=".text-field-select-content-item:last-child"),r?(r=r[i])||(r=t.querySelector(o)):r=t.querySelector(".text-field-select-content-item"),r&&(r.classList.add("text-field-select-content-item-keydown"),Ke(r,t))},Ke=function(e,t){var n=t.clientHeight,r=e.offsetTop+e.clientHeight-n;t.scrollTop=r>0?r:0},$e=function(e){var t=document.querySelector("."+ye),n=null,r=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&r){var i=r.dataset.val;it(JSON.parse(i))(e),(qe&&qe.current).blur()}r&&(n=r,r.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&We({selectDom:t,keyCode:e.keyCode,currentDom:n}),38===e.keyCode&&We({selectDom:t,keyCode:e.keyCode,currentDom:n})},Qe=function(e){Pe(!1),""===e.target.value&&je(!0),ce&&ce(e)},Ve=function(e){te&&(Fe(!0),te(e,(function(e){Be(e||[]),Fe(!1)})))},Ge=function(e){Pe(!0),ue&&ue(e),Ve(e.target.value)},Ze=function(e){var n=e.target.value;n&&je(!1),void 0===t.value&&Ne(n),se&&se(e),Ve(e.target.value)},Xe=function(e){13===e.keyCode&&pe&&pe(e),fe&&fe(e)},et=function(e){de&&de(e)},tt=function(e){"password"===K&&("text"===Ee&&Me("password"),"password"===Ee&&Me("text")),$&&$(e)},nt=function(){return void 0===t.value?Se:D},rt=function(){Le(!1)},it=function(e){return function(t){xe&&xe(e)}},ot=(0,n.useMemo)((function(){return(0,e.jsx)(e.Fragment,{children:y(ee)&&(0,e.jsx)("span",m({className:"length-limit"},{children:(Se?Se.toString().length:0)+"/"+ee}))})}),[ee,Se]),at=(0,n.useMemo)((function(){var t=Q||("password"===K?"password"===Ee?(0,e.jsx)(p(),{}):(0,e.jsx)(f(),{}):null);return(0,e.jsx)(e.Fragment,{children:G&&t&&(0,e.jsx)("span",m({className:"password"===K?"right-icon right-icon-password":"right-icon",onClick:tt},{children:t}))})}),[G,Q,K,Ee,$]),lt=function(){var e=qe.current;e.value="",void 0===t.value&&Ne(""),se&&se({target:e}),Ve(""),me&&me()},ct=function(){if(nt()&&!_&&X)return(0,e.jsx)("span",m({className:"clean-up-icon",onClick:lt},{children:(0,e.jsx)(v(),{})}))},ut=(0,n.useMemo)((function(){return(0,e.jsxs)("div",m({className:"text-field-content-within",ref:He},{children:[(0,e.jsxs)("div",m({className:"text-field-content-within-input"},{children:[k?(0,e.jsx)("textarea",m({ref:qe,rows:L,value:nt(),onBlur:Qe,onFocus:Ge,onChange:Ze,onKeyDown:Xe,onKeyUp:et,disabled:_},be)):(0,e.jsx)("input",m({ref:qe,type:Ee,value:nt(),onBlur:Qe,onFocus:Ge,onChange:Ze,onKeyDown:Xe,onKeyUp:et,disabled:_},be)),we&&!_e&&(0,e.jsx)("span",m({className:"text-field-label-placeholder",onClick:Ye},{children:"outside"===g?j:(0,e.jsxs)(e.Fragment,{children:[S||j,M&&(0,e.jsx)("span",m({className:"text-field-required"},{children:"*"})),T&&(0,e.jsx)("span",{children:T})]})}))]})),ct(),ot,at]}))}),[we,_e,Y,Ee,Se,ot,at,g,j,S,_,k,L,be,se,te,$,X,me]),st=(0,n.useMemo)((function(){var t,n=function(e){return"object"==typeof e&&null!==e?e[oe]:e};return(0,e.jsxs)("div",m({className:(t="text-field-select-content",ze&&(t+=" text-field-select-content-loading"),ye&&(t+=" "+ye),t),style:{width:(He&&He.current?He.current.offsetWidth:0)+"px"}},{children:[Ae&&Ae.map((function(t,r){return(0,e.jsx)("div",m({className:"text-field-select-content-item",onMouseDown:it(t),"data-val":JSON.stringify(t)},{children:re?re(t):(0,e.jsx)(i.default,{children:n(t)})}),r)})),ze&&(0,e.jsx)(o.default,{})]}))}),[He,Re,Ae,re,oe,xe,ze,ye]),ft=(0,n.useMemo)((function(){return(0,e.jsx)(r.default,m({open:Re,title:st,onClose:rt,arrow:!1,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,placement:"bottom-start",classes:{popper:(t="paraui-text-field-select paraui-scrollbar-small",d&&(t+=" paraui-text-field-select-"+d),ne&&(t+=" "+ne),Ae.length>0&&(t+=" paraui-text-field-select-data"),t)}},{children:ut}));var t}),[we,_e,Y,Ee,Se,ot,at,g,j,S,_,k,L,be,se,te,xe,He,Re,ne,d,$,Ae,X,me]),dt=(0,n.useMemo)((function(){var t,n=Boolean(M||T||S);if("outside"===g&&n){return(0,e.jsx)(c.default,m({label:S,required:M,labelSign:T},N,{className:(t="text-field-label",N&&N.className&&(t+=" "+N.className),t)}))}return null}),[g,S,T,M,N]);return(0,e.jsxs)("div",m({className:(De="paraui-text-field",De+=" text-field",d&&!k&&(De+=" text-field-"+d),a&&(De+=" "+a),z&&(De+=" text-field-error"),_e&&(De+=" text-field-focus"),_&&(De+=" text-field-disabled"),k&&(De+=" text-field-multiline"),y(t.limitLength)&&(De+=" text-field-limit-length"),y(t.limitLength)&&Se&&Se.toString().length>Number(t.limitLength)&&(De+=" text-field-limit"),le&&(De+=" text-field-resize"),nt()&&(De+=" text-field-value"),X&&(De+=" text-field-allow-clear"),De),style:l},{children:[dt,(0,e.jsxs)("div",m({className:"text-field-content"},{children:[B&&(0,e.jsx)("div",m({className:"text-field-content-before",onClick:function(e){he&&he(e)}},{children:B})),te?ft:ut,H&&(0,e.jsx)("div",m({className:"text-field-content-after",onClick:function(e){ve&&ve(e)}},{children:H}))]})),(0,e.jsx)(u.default,{className:"text-field-error-text",error:z,helperText:U})]}))},w=function(n){return(0,e.jsx)(t.default,{Com:g,comProps:n,comName:"TextField"})},j=w}(),l}()}));