@producteca/producteca-ui-kit 1.13.1 → 1.13.2
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.
|
@@ -17757,13 +17757,13 @@ const ql = (t) => {
|
|
|
17757
17757
|
/* @__PURE__ */ D(
|
|
17758
17758
|
"input",
|
|
17759
17759
|
{
|
|
17760
|
-
...w,
|
|
17761
|
-
...O,
|
|
17762
17760
|
"data-testid": "text-input",
|
|
17763
17761
|
value: A,
|
|
17764
17762
|
type: f,
|
|
17765
17763
|
onChange: N,
|
|
17766
|
-
onBlur: M
|
|
17764
|
+
onBlur: M,
|
|
17765
|
+
...O,
|
|
17766
|
+
...w
|
|
17767
17767
|
}
|
|
17768
17768
|
),
|
|
17769
17769
|
!!z && !C && /* @__PURE__ */ D("div", { className: `${An["right-icon"]}`, onClick: j, children: z }),
|
|
@@ -425,4 +425,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
425
425
|
options={[{ label: 'text', value: 1 }]}
|
|
426
426
|
/>
|
|
427
427
|
\`\`\`
|
|
428
|
-
`,exampleOption:"Ejemplo de búsqueda",searchPlaceholder:"Escribí para buscar...",searchLabel:"Buscar opción",noResults:"No se encontraron resultados",writeToSearch:"Escribí para buscar"},alert:{message:"Mensaje de éxito, este contenedor se ajusta al contenido, con un ancho máx de 1140 px",infoMessage:"Mensaje de información, este componente se ajusta al ancho del contenedor full width.",dontShowAgain:"No volver a mostrar este mensaje.",customAlert:"Alerta con ícono personalizado"}},error:{required:"Este campo es obligatorio",notValid:"El valor ingresado es inválido"},copyButton:{copy:"Copiar",copied:"Copiado",textToCopy:"Este texto se copiará automáticamente",textCopied:"Este es el texto que se copiará",copyKey:"Copiar clave",copiedKey:"Clave copiada",custom:"Funcion Custom",running:"Corriendo...",alert:"Función personalizada ejecutada!"}}}};It.use(kx).init({resources:Qx,lng:"es",interpolation:{escapeValue:!1},debug:!0});const Lt=It.t,it={"select-field-container":"selectField-module_select-field-container_APE6N","select-field--is-required":"selectField-module_select-field--is-required_y--bt","select-field--with-modifier":"selectField-module_select-field--with-modifier_pDNoZ","select-field-body":"selectField-module_select-field-body_aQDAd",lg:"selectField-module_lg_adYzi",body:"selectField-module_body_KiYeH","searcher-body":"selectField-module_searcher-body_8Hpy2",md:"selectField-module_md_sCCe1","select-field__is-clearable":"selectField-module_select-field__is-clearable_mh6Ez","select-field__search-icon":"selectField-module_select-field__search-icon_n4mx6","select-field__is-multiple":"selectField-module_select-field__is-multiple_k-2l1","select-field--is-clearable":"selectField-module_select-field--is-clearable_2x0t6","select-field--is-searchable":"selectField-module_select-field--is-searchable_egRZ3","select-field--on-error":"selectField-module_select-field--on-error_toqKR","select-field__input-multiple":"selectField-module_select-field__input-multiple_6tpdQ","option-with-tooltip":"selectField-module_option-with-tooltip_etqky"},Kx=Rn(F.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel"),qx=Rn(F.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),e4=Rn(F.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle"),ng=Rn(F.jsx("path",{d:"M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"ClearRounded"),t4=Rn(F.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),n4=Rn(F.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),r4=Rn(F.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),rg=Rn(F.jsx("path",{d:"M15.5 14h-.79l-.28-.27c1.2-1.4 1.82-3.31 1.48-5.34-.47-2.78-2.79-5-5.59-5.34-4.23-.52-7.79 3.04-7.27 7.27.34 2.8 2.56 5.12 5.34 5.59 2.03.34 3.94-.28 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0s.41-1.08 0-1.49zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"SearchRounded"),i4=Rn(F.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility"),o4=Rn(F.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff");function fo({input:t,onChange:e,onBlur:n,transformValue:a=i=>i}){return{handleChange:l=>{if(t){const f=a(l,l);t.onChange(f)}else e&&e(l)},handleBlur:()=>{t&&t.onBlur(),n==null||n()}}}const za=t=>{const[e,n]=te.useState(!1),[a,i]=te.useState({top:0,left:0}),s=te.useRef(null),l=t.isDisabled&&!!t.data.tooltipMessage,f=te.useCallback(()=>{if(s.current&&e){const c=s.current.getBoundingClientRect();i({top:c.top,left:c.right+5})}},[e]);return te.useEffect(()=>{if(s.current){const c=s.current.scrollWidth>s.current.offsetWidth;n(l||c)}},[t.label,l]),te.useEffect(()=>{if(e)return f(),window.addEventListener("scroll",f,!0),()=>window.removeEventListener("scroll",f,!0)},[e,f]),F.jsx("div",{className:it[e?"option-with-tooltip":""],"data-tooltip":l?t.data.tooltipMessage:t.label,style:e?{"--tooltip-top":`${a.top}px`,"--tooltip-left":`${a.left}px`}:void 0,children:F.jsx(Va.Option,{...t,children:F.jsxs("div",{className:Rt(it[t.isDisabled?"disabled":""],it[t.isMulti?"select-field__input-multiple":""]),children:[t.isMulti&&F.jsx("input",{type:"checkbox",checked:t.isSelected,onChange:We.identity}),F.jsx("label",{ref:s,children:t.label})]})})})},a4=t=>F.jsx(Va.MultiValue,{...t,children:F.jsx("span",{children:t.data.label})}),sl=t=>F.jsx(Va.SingleValue,{...t,children:F.jsx("span",{children:t.data.label})}),ig=()=>F.jsx("div",{className:it["select-field__search-icon"],children:F.jsx(Xn,{children:F.jsx(rg,{})})}),s4=({optionSelected:t=null})=>{const e=t&&We.isArray(t)&&t.length>0,n=t&&We.isArray(t)&&t.length===1?Lt("selected"):Lt("selectedPlural");return e?F.jsx("div",{className:it["select-field__is-multiple"],children:F.jsxs("span",{children:[t.length," ",n]})}):null},u4=()=>F.jsx("div",{className:it["select-field--is-required"],children:Lt("selectRequiredText")}),ul=({optionSelected:t,isClearable:e,handleChange:n})=>{const a=t&&We.isArray(t)&&t.length>0,i=!We.isArray(t)&&t&&"value"in t&&t.value;return e&&(a||i)?F.jsx("a",{className:it["select-field__is-clearable"],onClick:()=>n(null),children:F.jsx(Xn,{children:F.jsx(ng,{})})}):null},l4=t=>{const{name:e,label:n,placeholder:a=Lt("selectPlaceholder"),noOptionsMessage:i=Lt("noFoundOptions"),options:s,size:l="md",hideSelectedOptions:f=!0,isMultiple:c=!1,isSearchable:p=!0,isClearable:g=!0,required:m,disabled:v,rightModifier:E,isOptionDisabled:w,onChange:h,defaultValue:S,input:T,onBlur:V}=t,_=(T==null?void 0:T.value)??t.value,P=We.filter(s,({value:U})=>We.includes(_,U)),[A,G]=te.useState(P||null),[M,z]=te.useState(!1),{handleChange:j,handleBlur:C}=fo({input:T,onChange:U=>{const Q=c?We.map(U,K=>K.value):U==null?void 0:U.value;if(!T){const K={target:{name:e,value:Q}};h==null||h(K)}return Q},onBlur:V,transformValue:U=>c?We.map(U,K=>K.value):U==null?void 0:U.value}),W=U=>{j(U),G(U),z(!0)};te.useEffect(()=>{if(S&&s.length>0){const U=We.isArray(S)?S:[S],Q=We.filter(s,({value:K})=>We.includes(U,K));G(c?Q:Q[0]||null)}},[S,s]);const ee=()=>!m||!M||!We.isEmpty(A),ne=c?{Option:za,MultiValue:a4}:{Option:za,SingleValue:sl};return F.jsxs("div",{className:it["select-field-container"],"data-testid":"select-field-container",children:[n&&F.jsx("label",{htmlFor:e,children:n}),F.jsxs("div",{className:Rt(it[l],it["select-field-body"],it[ee()?"":"select-field--on-error"],it[p&&!c?"select-field--is-searchable":""],it[g?"select-field--is-clearable":""],it[E?"select-field--with-modifier":""]),children:[F.jsxs("div",{className:it.body,children:[c&&F.jsx(s4,{optionSelected:A}),p&&!c&&F.jsx(ig,{}),F.jsx(kp,{...t,name:e,classNamePrefix:"select-field",placeholder:a,isDisabled:v,isMulti:c,closeMenuOnSelect:!c,hideSelectedOptions:f&&!c,isClearable:g,isOptionDisabled:w,isSearchable:p&&!c,noOptionsMessage:()=>i,onChange:W,onBlur:C,value:A,options:s,components:ne,menuPortalTarget:document.body}),F.jsx(ul,{optionSelected:A,isClearable:g,handleChange:W})]}),!!E&&E]}),!ee()&&F.jsx(u4,{})]})},og=t=>{const{value:e,isValid:n,required:a,meta:{touched:i,error:s}={}}=t,l=n&&!n(e)||i&&s;return!!(a&&!e)||!!l},ag=t=>{const{meta:{touched:e,warning:n}={}}=t;return!!e&&!!n},c4=t=>ag(t)?"warning":og(t)?"error":null,bn={"form-field":"textInput-module_form-field_6ylpa","input-container":"textInput-module_input-container_YAHtg","with-right-icon":"textInput-module_with-right-icon_K2CQ7","with-left-icon":"textInput-module_with-left-icon_WkTxr",disabled:"textInput-module_disabled_zmiie","text-input":"textInput-module_text-input_9gGzW","right-icon":"textInput-module_right-icon_9Bh6D","left-icon":"textInput-module_left-icon_40v5M",lg:"textInput-module_lg_rvzUN",md:"textInput-module_md_WTZlG",sm:"textInput-module_sm_3H7Tl",warning:"textInput-module_warning_2SO4B",message:"textInput-module_message_I-u8R",error:"textInput-module_error_0fsa1",title:"textInput-module_title_Y61Pu"},f4=({validationProps:t})=>{const{meta:e}=t,{error:n,warning:a}=e||{};return F.jsxs("div",{className:bn.message,children:[og(t)&&(n==null?void 0:n.locale),ag(t)&&(a==null?void 0:a.locale)]})},po=t=>{const{isValid:e,onChange:n,meta:a,value:i="",noErrors:s=!1,size:l="md",type:f="text",isClearable:c,max:p,min:g,leftIcon:m,rightIcon:v,input:E,...w}=t,h=(E==null?void 0:E.value)??i,[S,T]=te.useState(""),V={meta:a,value:h,isValid:e,required:t.required},_=c4(V),P=f==="number"?{max:p,min:g}:{};te.useEffect(()=>{T(h)},[h]);const{handleChange:A,handleBlur:G}=fo({input:E,onChange:n,transformValue:W=>{const ee=W.target.value;return T(ee),ee}}),M=W=>{A(W)},z=c&&!v&&S?F.jsx(Xn,{"data-testid":"clear-icon",children:F.jsx(ng,{})}):v,j=c&&!v?()=>M({target:{name:t.name,value:""}}):We.identity,C=l=="sm";return F.jsxs("div",{"data-testid":"text-input-container",className:Rt(bn[l],bn["text-input"],_?bn[_]:"",m&&!C?bn["with-left-icon"]:"",z&&!C?bn["with-right-icon"]:""),children:[!!m&&!C&&F.jsx("div",{className:`${bn["left-icon"]}`,children:m}),F.jsx("input",{...w,...P,"data-testid":"text-input",value:S,type:f,onChange:M,onBlur:G}),!!z&&!C&&F.jsx("div",{className:`${bn["right-icon"]}`,onClick:j,children:z}),!s&&F.jsx(f4,{validationProps:V})]})},d4=t=>{const[e,n]=te.useState(!1),a=e?"text":"password";return F.jsx(po,{...t,type:a,"data-testid":"password-input",rightIcon:F.jsx(p4,{showPassword:e,setShowPassword:n})})},p4=({showPassword:t,setShowPassword:e})=>F.jsx("div",{"data-testid":"visibility-toggle",onClick:()=>e(!t),children:t?F.jsx(i4,{}):F.jsx(o4,{})}),g4=t=>t?{password:d4,text:po,number:po}[t]:po,h4=({label:t,rightAdornment:e,children:n,...a})=>{const i=g4(a.type);return F.jsxs("div",{className:bn["form-field"],children:[t&&F.jsx("label",{htmlFor:a.name,children:t}),F.jsxs("div",{className:`${bn["input-container"]}`,children:[F.jsx(i,{...a,children:n}),!!e&&F.jsx("div",{className:`${bn["right-modifier"]}`,children:e})]})]})},go={"checkbox-input-container":"checkboxInput-module_checkbox-input-container_prYRe",title:"checkboxInput-module_title_cvp-g","checkbox-input-items":"checkboxInput-module_checkbox-input-items_AMkaS",disabled:"checkboxInput-module_disabled_3EFy5",lg:"checkboxInput-module_lg_VoVop",md:"checkboxInput-module_md_Nh-Gg",sm:"checkboxInput-module_sm_965vX"},ll=({title:t,name:e,type:n="checkbox",items:a,onChange:i,size:s="lg",input:l,...f})=>{const{handleChange:c,handleBlur:p}=fo({input:l,onChange:i,transformValue:g=>{const{checked:m,name:v}=g.target;if(l){const E={...l.value};return E[v]=m,E}return g}});return F.jsxs("div",{className:go["checkbox-input-container"],children:[t&&F.jsxs("label",{className:go.title,children:[" ",t," "]}),F.jsx("div",{className:`${go["checkbox-input-items"]} ${go[s]}`,children:We.map(a,({id:g,name:m,label:v,disabled:E,checked:w,value:h,...S})=>{const T=g||m||e;return F.jsxs("label",{htmlFor:T,className:`${E?go.disabled:""}`,children:[F.jsx("input",{...f,...S,id:T,type:n,name:m||e,checked:l&&m?We.get(l.value,m):w,disabled:E,onChange:c,onBlur:p}),F.jsxs("span",{children:[" ",v," "]})]},T)})})]})},sg=({name:t,checked:e,onChange:n,label:a,title:i,disabled:s=!1,size:l="lg",input:f,type:c="checkbox",...p})=>{const g={id:`${t}-single`,label:a,checked:e,disabled:s};return F.jsx(ll,{...p,name:t,items:[g],onChange:n,title:i,type:c,size:l,input:f})},m4={loader:"spinner-module_loader_UIupC"},ug=({size:t="lg"})=>F.jsx(bd,{size:b4(t),className:m4.loader}),b4=t=>({sm:18,lg:60})[t],v4=()=>F.jsx("div",{className:it["select-field__search-icon"],children:F.jsx(Xn,{children:F.jsx(rg,{})})}),y4=t=>{const{name:e,label:n,placeholder:a=Lt("selectPlaceholder"),noOptionsMessage:i=Lt("noFoundOptions"),options:s,size:l="md",isSearchable:f=!0,isClearable:c=!0,required:p,disabled:g,rightModifier:m,isOptionDisabled:v,onChange:E,onInputChange:w,input:h,isLoading:S=!1,...T}=t,[V,_]=te.useState(null);te.useEffect(()=>{A(!We.isEmpty(s)||S)},[s,S]);const[P,A]=te.useState(!1),G=j=>{const C={target:{name:e,value:j}};w==null||w(C),A(!We.isEmpty(s)||S)},M=j=>{const C={target:{name:e,value:j==null?void 0:j.value}};_(j),h?h.onChange(j==null?void 0:j.value):E==null||E(C)},z=()=>{h&&h.onBlur(),A(!1)};return F.jsxs("div",{className:it["select-field-container"],children:[n&&F.jsx("label",{htmlFor:e,children:n}),F.jsxs("div",{className:Rt(it[l],it["select-field-body"],it[f?"select-field--is-searchable":""],it[c?"select-field--is-clearable":""],it[m?"select-field--with-modifier":""]),children:[F.jsxs("div",{className:it["searcher-body"],children:[f&&F.jsx(v4,{}),F.jsx(kp,{...T,name:e,placeholder:a,classNamePrefix:"select-field",isDisabled:g,isClearable:c,isOptionDisabled:v,isSearchable:f,noOptionsMessage:()=>S?F.jsx(ug,{size:"sm"}):i,onInputChange:G,onChange:M,onBlur:z,value:V,options:s,components:{Option:za,SingleValue:sl},menuPortalTarget:document.body,menuIsOpen:P,onMenuOpen:()=>A(!We.isEmpty(s)||S),onMenuClose:()=>A(!1)}),F.jsx(ul,{isClearable:c,handleChange:()=>{_(null),h&&h.onChange(null)}})]}),!!m&&m]})]})},Jn={"switch-input-container":"switchInput-module_switch-input-container_t9Kpp",title:"switchInput-module_title_lBK2p","switch-input-items":"switchInput-module_switch-input-items_P3RMy","switch-wrapper":"switchInput-module_switch-wrapper_cZvDV","switch-input":"switchInput-module_switch-input_e9PWi","switch-slider":"switchInput-module_switch-slider_ICfGn","switch-label":"switchInput-module_switch-label_Nj-Hh",disabled:"switchInput-module_disabled_yz9dR",lg:"switchInput-module_lg_WMIDO",md:"switchInput-module_md_683sQ",sm:"switchInput-module_sm_sh92j"},cl=({title:t,name:e,items:n,onChange:a,size:i="sm",input:s,...l})=>{const{handleChange:f,handleBlur:c}=fo({input:s,onChange:a,transformValue:p=>{const{checked:g,name:m}=p.target;if(s){const v={...s.value};return v[m]=g,v}return p}});return F.jsxs("div",{className:Jn["switch-input-container"],"data-testid":"switch-input-container",children:[t&&F.jsxs("label",{className:Jn.title,"data-testid":"switch-title",children:[" ",t," "]}),F.jsx("div",{className:`${Jn["switch-input-items"]} ${Jn[i]}`,"data-testid":"switch-input-items",children:We.map(n,({id:p,name:g,label:m,disabled:v,checked:E,value:w,...h})=>{const S=p||g||e;return F.jsxs("label",{htmlFor:S,className:`${v?Jn.disabled:""}`,"data-testid":`switch-label-${S}`,children:[F.jsxs("div",{className:Jn["switch-wrapper"],children:[F.jsx("input",{...l,...h,id:S,type:"checkbox",name:g||e,checked:s&&g?We.get(s.value,g):E,disabled:v,onChange:f,onBlur:c,className:Jn["switch-input"],"data-testid":`switch-input-${S}`}),F.jsx("span",{className:Jn["switch-slider"]})]}),F.jsxs("span",{className:Jn["switch-label"],children:[" ",m," "]})]},S)})})]})},lg=({name:t,checked:e,onChange:n,label:a,title:i,disabled:s=!1,size:l="sm",input:f,...c})=>{const p={id:`${t}-single`,label:a,checked:e,disabled:s};return F.jsx(cl,{...c,name:t,items:[p],onChange:n,title:i,size:l,input:f})},cg={"empty-state-container":"emptyState-module_empty-state-container_azCks","link-container":"emptyState-module_link-container_kXroF"},C4=F.jsx(Nc,{}),I4=({onActionClick:t,icon:e=C4,actionText:n=Lt("reloadPage"),text:a=Lt("noResultsFound")})=>F.jsxs("div",{className:cg["empty-state-container"],children:[e,F.jsxs("div",{className:cg["link-container"],children:[F.jsx("span",{children:a}),t&&F.jsx("a",{onClick:t,children:n})]})]}),fg={"save-bar":"actionBar-module_save-bar_LOIUx","without-border":"actionBar-module_without-border_dsMIY"},x4=({withoutBorder:t=!1,saveProps:e,cancelProps:n,previousProps:a})=>{const{onCancel:i,label:s=Lt("cancel")}=n||{},{onPrevious:l,label:f=Lt("previous"),...c}=a||{},{onSave:p,label:g=Lt("save"),...m}=e||{};return F.jsxs("div",{className:Rt(fg["save-bar"],t?fg["without-border"]:""),children:[!!i&&F.jsx("a",{onClick:i,children:s}),!!l&&F.jsx(Fo,{outline:!0,label:f,onClick:l,...c}),!!p&&F.jsx(Fo,{label:g,onClick:p,...m})]})},E4=({onClick:t,copyText:e=Lt("copyButton.copy"),copiedText:n=Lt("copyButton.copied"),textToCopy:a,resetTime:i=2e3,...s})=>{const[l,f]=te.useState(!1),[c,p]=te.useState(!1);te.useEffect(()=>{if(l){p(!0);const m=setTimeout(()=>{p(!1)},i/2);return()=>clearTimeout(m)}},[l]);const g=()=>{a&&(f(!0),navigator.clipboard.writeText(a).then(()=>{setTimeout(()=>f(!1),i)}).catch(()=>{f(!1)}))};return F.jsx("div",{onClick:()=>t?t():g(),children:F.jsx(Fo,{className:`copy-btn ${l?"copied":""} ${c?"animating":""}`,outline:!0,label:l?n:e,leftAdornment:F.jsx(S4,{copied:l}),...s})})},S4=({copied:t})=>F.jsxs("div",{className:"copy-btn-icons",children:[F.jsx("div",{className:`copy-icon ${t?"hidden":""}`,children:F.jsx(t4,{})}),F.jsx("div",{className:`check-icon ${t?"":"hidden"}`,children:F.jsx(qx,{})})]}),dg=({children:t})=>{const e=te.useRef(null),[n,a]=te.useState(!1);return te.useEffect(()=>{const i=()=>{e.current&&a(e.current.scrollWidth>e.current.offsetWidth)};return i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[t]),F.jsx(F.Fragment,{children:t(e,n)})},pg=({children:t,content:e,placement:n="top",arrow:a=!1,maxWidth:i="600px"})=>{const s=te.cloneElement(t,{style:{...t.props.style||{},cursor:"pointer"}});return F.jsx(kd,{title:e,placement:n,arrow:a,slots:{transition:Ld},slotProps:{popper:{sx:{[`&.${Me.popper} .${Me.tooltip}`]:{fontFamily:"Poppins, Open Sans, Helvetica, Arial, sans-serif",background:"rgba(102, 102, 102, 1)",padding:"9px 9px 8px 12px",fontSize:"12px",color:"white !important",borderRadius:"4px",maxWidth:i},[`&.${Me.popper} .${Me.arrow}`]:{color:"rgba(102, 102, 102, 1)"},[`&.${Me.popper}[data-popper-placement*="top"] .${Me.tooltip}`]:{marginBottom:"8px"},[`&.${Me.popper}[data-popper-placement*="bottom"] .${Me.tooltip}`]:{marginTop:"8px"},[`&.${Me.popper}[data-popper-placement*="left"] .${Me.tooltip}`]:{marginRight:"8px"},[`&.${Me.popper}[data-popper-placement*="right"] .${Me.tooltip}`]:{marginLeft:"8px"}}}},children:s})},A4=({content:t,children:e,...n})=>F.jsx(dg,{children:(a,i)=>{const s=te.cloneElement(e,{ref:a});return i&&t?F.jsx(pg,{content:t,...n,children:s}):s}}),gg={progressbar:"progressbar-module_progressbar_8ygYR",lg:"progressbar-module_lg_5JGr-",sm:"progressbar-module_sm_LPtUo"},w4=({size:t="lg",progress:e=0,variant:n="determinate"})=>{const[a,i]=te.useState(e);return te.useEffect(()=>{if(n==="buffer"){const s=setInterval(()=>{i(l=>{const f=Math.min(100,l+Math.sqrt(100-l)*.5);return Math.round(f)})},100);return()=>{clearInterval(s)}}else i(e)},[n,e]),F.jsx(Vd,{variant:n=="buffer"?"determinate":n,value:a,className:Rt(gg.progressbar,gg[t]),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":a})},pi={alert:"alert-module_alert_j7ZRS","full-width":"alert-module_full-width_eKIHw",icon:"alert-module_icon_vbZHd",message:"alert-module_message_klR2U",link:"alert-module_link_IrBj3",success:"alert-module_success_AVBKS",error:"alert-module_error_cxg96",warning:"alert-module_warning_zkMaJ",info:"alert-module_info_PBo1l"},T4=({message:t,variant:e="success",className:n,icon:a,fullWidth:i=!1,link:s,...l})=>{const f={success:F.jsx(Xn,{color:mn("success","500"),children:F.jsx(e4,{})}),error:F.jsx(Xn,{color:mn("error","700"),children:F.jsx(Kx,{})}),warning:F.jsx(Xn,{color:mn("secondary","500"),children:F.jsx(n4,{})}),info:F.jsx(Xn,{color:mn("primary","500"),children:F.jsx(r4,{})})};return F.jsxs("div",{className:Rt(pi.alert,pi[e],{[pi["full-width"]]:i},n),...l,children:[F.jsx("div",{className:pi.icon,children:a||f[e]}),F.jsxs("div",{className:pi.message,children:[We.isString(t)?F.jsx("span",{dangerouslySetInnerHTML:{__html:t}}):F.jsxs("span",{children:[" ",t]}),s&&F.jsxs(F.Fragment,{children:[" ",F.jsx("a",{href:s==null?void 0:s.href,className:pi.link,onClick:s==null?void 0:s.onClick,children:s.text})]})]})]})};he.ActionBar=x4,he.Alert=T4,he.Button=Fo,he.Categories=Z1,he.Checkbox=sg,he.CheckboxGroup=ll,he.CheckboxInput=sg,he.CheckboxInputGroup=ll,he.ClearComponent=ul,he.ColorOptions=H1,he.ColorValues=Fc,he.Colors=_i,he.CopyButton=E4,he.CustomIcon=Xn,he.EmptyState=I4,he.FileIcon=Y1,he.FormField=h4,he.MailIcon=z1,he.Option=za,he.OverflowChecker=dg,he.PriceCloseIcon=j1,he.PriceDownIcon=J1,he.Progressbar=w4,he.SearchComponent=ig,he.SearchPublication=Nc,he.Searcher=y4,he.SelectField=l4,he.Shades=X1,he.SingleValue=sl,he.Spinner=ug,he.Switch=lg,he.SwitchGroup=cl,he.SwitchInput=lg,he.SwitchInputGroup=cl,he.TextInput=po,he.WithOverflowTooltip=A4,he.WithTooltip=pg,he.allColors=Ds,he.getColor=mn,he.isValidColor=Zr,he.useReduxFormField=fo,Object.defineProperty(he,Symbol.toStringTag,{value:"Module"})});
|
|
428
|
+
`,exampleOption:"Ejemplo de búsqueda",searchPlaceholder:"Escribí para buscar...",searchLabel:"Buscar opción",noResults:"No se encontraron resultados",writeToSearch:"Escribí para buscar"},alert:{message:"Mensaje de éxito, este contenedor se ajusta al contenido, con un ancho máx de 1140 px",infoMessage:"Mensaje de información, este componente se ajusta al ancho del contenedor full width.",dontShowAgain:"No volver a mostrar este mensaje.",customAlert:"Alerta con ícono personalizado"}},error:{required:"Este campo es obligatorio",notValid:"El valor ingresado es inválido"},copyButton:{copy:"Copiar",copied:"Copiado",textToCopy:"Este texto se copiará automáticamente",textCopied:"Este es el texto que se copiará",copyKey:"Copiar clave",copiedKey:"Clave copiada",custom:"Funcion Custom",running:"Corriendo...",alert:"Función personalizada ejecutada!"}}}};It.use(kx).init({resources:Qx,lng:"es",interpolation:{escapeValue:!1},debug:!0});const Lt=It.t,it={"select-field-container":"selectField-module_select-field-container_APE6N","select-field--is-required":"selectField-module_select-field--is-required_y--bt","select-field--with-modifier":"selectField-module_select-field--with-modifier_pDNoZ","select-field-body":"selectField-module_select-field-body_aQDAd",lg:"selectField-module_lg_adYzi",body:"selectField-module_body_KiYeH","searcher-body":"selectField-module_searcher-body_8Hpy2",md:"selectField-module_md_sCCe1","select-field__is-clearable":"selectField-module_select-field__is-clearable_mh6Ez","select-field__search-icon":"selectField-module_select-field__search-icon_n4mx6","select-field__is-multiple":"selectField-module_select-field__is-multiple_k-2l1","select-field--is-clearable":"selectField-module_select-field--is-clearable_2x0t6","select-field--is-searchable":"selectField-module_select-field--is-searchable_egRZ3","select-field--on-error":"selectField-module_select-field--on-error_toqKR","select-field__input-multiple":"selectField-module_select-field__input-multiple_6tpdQ","option-with-tooltip":"selectField-module_option-with-tooltip_etqky"},Kx=Rn(F.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel"),qx=Rn(F.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),e4=Rn(F.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle"),ng=Rn(F.jsx("path",{d:"M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"ClearRounded"),t4=Rn(F.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),n4=Rn(F.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),r4=Rn(F.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),rg=Rn(F.jsx("path",{d:"M15.5 14h-.79l-.28-.27c1.2-1.4 1.82-3.31 1.48-5.34-.47-2.78-2.79-5-5.59-5.34-4.23-.52-7.79 3.04-7.27 7.27.34 2.8 2.56 5.12 5.34 5.59 2.03.34 3.94-.28 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0s.41-1.08 0-1.49zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"SearchRounded"),i4=Rn(F.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility"),o4=Rn(F.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff");function fo({input:t,onChange:e,onBlur:n,transformValue:a=i=>i}){return{handleChange:l=>{if(t){const f=a(l,l);t.onChange(f)}else e&&e(l)},handleBlur:()=>{t&&t.onBlur(),n==null||n()}}}const za=t=>{const[e,n]=te.useState(!1),[a,i]=te.useState({top:0,left:0}),s=te.useRef(null),l=t.isDisabled&&!!t.data.tooltipMessage,f=te.useCallback(()=>{if(s.current&&e){const c=s.current.getBoundingClientRect();i({top:c.top,left:c.right+5})}},[e]);return te.useEffect(()=>{if(s.current){const c=s.current.scrollWidth>s.current.offsetWidth;n(l||c)}},[t.label,l]),te.useEffect(()=>{if(e)return f(),window.addEventListener("scroll",f,!0),()=>window.removeEventListener("scroll",f,!0)},[e,f]),F.jsx("div",{className:it[e?"option-with-tooltip":""],"data-tooltip":l?t.data.tooltipMessage:t.label,style:e?{"--tooltip-top":`${a.top}px`,"--tooltip-left":`${a.left}px`}:void 0,children:F.jsx(Va.Option,{...t,children:F.jsxs("div",{className:Rt(it[t.isDisabled?"disabled":""],it[t.isMulti?"select-field__input-multiple":""]),children:[t.isMulti&&F.jsx("input",{type:"checkbox",checked:t.isSelected,onChange:We.identity}),F.jsx("label",{ref:s,children:t.label})]})})})},a4=t=>F.jsx(Va.MultiValue,{...t,children:F.jsx("span",{children:t.data.label})}),sl=t=>F.jsx(Va.SingleValue,{...t,children:F.jsx("span",{children:t.data.label})}),ig=()=>F.jsx("div",{className:it["select-field__search-icon"],children:F.jsx(Xn,{children:F.jsx(rg,{})})}),s4=({optionSelected:t=null})=>{const e=t&&We.isArray(t)&&t.length>0,n=t&&We.isArray(t)&&t.length===1?Lt("selected"):Lt("selectedPlural");return e?F.jsx("div",{className:it["select-field__is-multiple"],children:F.jsxs("span",{children:[t.length," ",n]})}):null},u4=()=>F.jsx("div",{className:it["select-field--is-required"],children:Lt("selectRequiredText")}),ul=({optionSelected:t,isClearable:e,handleChange:n})=>{const a=t&&We.isArray(t)&&t.length>0,i=!We.isArray(t)&&t&&"value"in t&&t.value;return e&&(a||i)?F.jsx("a",{className:it["select-field__is-clearable"],onClick:()=>n(null),children:F.jsx(Xn,{children:F.jsx(ng,{})})}):null},l4=t=>{const{name:e,label:n,placeholder:a=Lt("selectPlaceholder"),noOptionsMessage:i=Lt("noFoundOptions"),options:s,size:l="md",hideSelectedOptions:f=!0,isMultiple:c=!1,isSearchable:p=!0,isClearable:g=!0,required:m,disabled:v,rightModifier:E,isOptionDisabled:w,onChange:h,defaultValue:S,input:T,onBlur:V}=t,_=(T==null?void 0:T.value)??t.value,P=We.filter(s,({value:U})=>We.includes(_,U)),[A,G]=te.useState(P||null),[M,z]=te.useState(!1),{handleChange:j,handleBlur:C}=fo({input:T,onChange:U=>{const Q=c?We.map(U,K=>K.value):U==null?void 0:U.value;if(!T){const K={target:{name:e,value:Q}};h==null||h(K)}return Q},onBlur:V,transformValue:U=>c?We.map(U,K=>K.value):U==null?void 0:U.value}),W=U=>{j(U),G(U),z(!0)};te.useEffect(()=>{if(S&&s.length>0){const U=We.isArray(S)?S:[S],Q=We.filter(s,({value:K})=>We.includes(U,K));G(c?Q:Q[0]||null)}},[S,s]);const ee=()=>!m||!M||!We.isEmpty(A),ne=c?{Option:za,MultiValue:a4}:{Option:za,SingleValue:sl};return F.jsxs("div",{className:it["select-field-container"],"data-testid":"select-field-container",children:[n&&F.jsx("label",{htmlFor:e,children:n}),F.jsxs("div",{className:Rt(it[l],it["select-field-body"],it[ee()?"":"select-field--on-error"],it[p&&!c?"select-field--is-searchable":""],it[g?"select-field--is-clearable":""],it[E?"select-field--with-modifier":""]),children:[F.jsxs("div",{className:it.body,children:[c&&F.jsx(s4,{optionSelected:A}),p&&!c&&F.jsx(ig,{}),F.jsx(kp,{...t,name:e,classNamePrefix:"select-field",placeholder:a,isDisabled:v,isMulti:c,closeMenuOnSelect:!c,hideSelectedOptions:f&&!c,isClearable:g,isOptionDisabled:w,isSearchable:p&&!c,noOptionsMessage:()=>i,onChange:W,onBlur:C,value:A,options:s,components:ne,menuPortalTarget:document.body}),F.jsx(ul,{optionSelected:A,isClearable:g,handleChange:W})]}),!!E&&E]}),!ee()&&F.jsx(u4,{})]})},og=t=>{const{value:e,isValid:n,required:a,meta:{touched:i,error:s}={}}=t,l=n&&!n(e)||i&&s;return!!(a&&!e)||!!l},ag=t=>{const{meta:{touched:e,warning:n}={}}=t;return!!e&&!!n},c4=t=>ag(t)?"warning":og(t)?"error":null,bn={"form-field":"textInput-module_form-field_6ylpa","input-container":"textInput-module_input-container_YAHtg","with-right-icon":"textInput-module_with-right-icon_K2CQ7","with-left-icon":"textInput-module_with-left-icon_WkTxr",disabled:"textInput-module_disabled_zmiie","text-input":"textInput-module_text-input_9gGzW","right-icon":"textInput-module_right-icon_9Bh6D","left-icon":"textInput-module_left-icon_40v5M",lg:"textInput-module_lg_rvzUN",md:"textInput-module_md_WTZlG",sm:"textInput-module_sm_3H7Tl",warning:"textInput-module_warning_2SO4B",message:"textInput-module_message_I-u8R",error:"textInput-module_error_0fsa1",title:"textInput-module_title_Y61Pu"},f4=({validationProps:t})=>{const{meta:e}=t,{error:n,warning:a}=e||{};return F.jsxs("div",{className:bn.message,children:[og(t)&&(n==null?void 0:n.locale),ag(t)&&(a==null?void 0:a.locale)]})},po=t=>{const{isValid:e,onChange:n,meta:a,value:i="",noErrors:s=!1,size:l="md",type:f="text",isClearable:c,max:p,min:g,leftIcon:m,rightIcon:v,input:E,...w}=t,h=(E==null?void 0:E.value)??i,[S,T]=te.useState(""),V={meta:a,value:h,isValid:e,required:t.required},_=c4(V),P=f==="number"?{max:p,min:g}:{};te.useEffect(()=>{T(h)},[h]);const{handleChange:A,handleBlur:G}=fo({input:E,onChange:n,transformValue:W=>{const ee=W.target.value;return T(ee),ee}}),M=W=>{A(W)},z=c&&!v&&S?F.jsx(Xn,{"data-testid":"clear-icon",children:F.jsx(ng,{})}):v,j=c&&!v?()=>M({target:{name:t.name,value:""}}):We.identity,C=l=="sm";return F.jsxs("div",{"data-testid":"text-input-container",className:Rt(bn[l],bn["text-input"],_?bn[_]:"",m&&!C?bn["with-left-icon"]:"",z&&!C?bn["with-right-icon"]:""),children:[!!m&&!C&&F.jsx("div",{className:`${bn["left-icon"]}`,children:m}),F.jsx("input",{"data-testid":"text-input",value:S,type:f,onChange:M,onBlur:G,...P,...w}),!!z&&!C&&F.jsx("div",{className:`${bn["right-icon"]}`,onClick:j,children:z}),!s&&F.jsx(f4,{validationProps:V})]})},d4=t=>{const[e,n]=te.useState(!1),a=e?"text":"password";return F.jsx(po,{...t,type:a,"data-testid":"password-input",rightIcon:F.jsx(p4,{showPassword:e,setShowPassword:n})})},p4=({showPassword:t,setShowPassword:e})=>F.jsx("div",{"data-testid":"visibility-toggle",onClick:()=>e(!t),children:t?F.jsx(i4,{}):F.jsx(o4,{})}),g4=t=>t?{password:d4,text:po,number:po}[t]:po,h4=({label:t,rightAdornment:e,children:n,...a})=>{const i=g4(a.type);return F.jsxs("div",{className:bn["form-field"],children:[t&&F.jsx("label",{htmlFor:a.name,children:t}),F.jsxs("div",{className:`${bn["input-container"]}`,children:[F.jsx(i,{...a,children:n}),!!e&&F.jsx("div",{className:`${bn["right-modifier"]}`,children:e})]})]})},go={"checkbox-input-container":"checkboxInput-module_checkbox-input-container_prYRe",title:"checkboxInput-module_title_cvp-g","checkbox-input-items":"checkboxInput-module_checkbox-input-items_AMkaS",disabled:"checkboxInput-module_disabled_3EFy5",lg:"checkboxInput-module_lg_VoVop",md:"checkboxInput-module_md_Nh-Gg",sm:"checkboxInput-module_sm_965vX"},ll=({title:t,name:e,type:n="checkbox",items:a,onChange:i,size:s="lg",input:l,...f})=>{const{handleChange:c,handleBlur:p}=fo({input:l,onChange:i,transformValue:g=>{const{checked:m,name:v}=g.target;if(l){const E={...l.value};return E[v]=m,E}return g}});return F.jsxs("div",{className:go["checkbox-input-container"],children:[t&&F.jsxs("label",{className:go.title,children:[" ",t," "]}),F.jsx("div",{className:`${go["checkbox-input-items"]} ${go[s]}`,children:We.map(a,({id:g,name:m,label:v,disabled:E,checked:w,value:h,...S})=>{const T=g||m||e;return F.jsxs("label",{htmlFor:T,className:`${E?go.disabled:""}`,children:[F.jsx("input",{...f,...S,id:T,type:n,name:m||e,checked:l&&m?We.get(l.value,m):w,disabled:E,onChange:c,onBlur:p}),F.jsxs("span",{children:[" ",v," "]})]},T)})})]})},sg=({name:t,checked:e,onChange:n,label:a,title:i,disabled:s=!1,size:l="lg",input:f,type:c="checkbox",...p})=>{const g={id:`${t}-single`,label:a,checked:e,disabled:s};return F.jsx(ll,{...p,name:t,items:[g],onChange:n,title:i,type:c,size:l,input:f})},m4={loader:"spinner-module_loader_UIupC"},ug=({size:t="lg"})=>F.jsx(bd,{size:b4(t),className:m4.loader}),b4=t=>({sm:18,lg:60})[t],v4=()=>F.jsx("div",{className:it["select-field__search-icon"],children:F.jsx(Xn,{children:F.jsx(rg,{})})}),y4=t=>{const{name:e,label:n,placeholder:a=Lt("selectPlaceholder"),noOptionsMessage:i=Lt("noFoundOptions"),options:s,size:l="md",isSearchable:f=!0,isClearable:c=!0,required:p,disabled:g,rightModifier:m,isOptionDisabled:v,onChange:E,onInputChange:w,input:h,isLoading:S=!1,...T}=t,[V,_]=te.useState(null);te.useEffect(()=>{A(!We.isEmpty(s)||S)},[s,S]);const[P,A]=te.useState(!1),G=j=>{const C={target:{name:e,value:j}};w==null||w(C),A(!We.isEmpty(s)||S)},M=j=>{const C={target:{name:e,value:j==null?void 0:j.value}};_(j),h?h.onChange(j==null?void 0:j.value):E==null||E(C)},z=()=>{h&&h.onBlur(),A(!1)};return F.jsxs("div",{className:it["select-field-container"],children:[n&&F.jsx("label",{htmlFor:e,children:n}),F.jsxs("div",{className:Rt(it[l],it["select-field-body"],it[f?"select-field--is-searchable":""],it[c?"select-field--is-clearable":""],it[m?"select-field--with-modifier":""]),children:[F.jsxs("div",{className:it["searcher-body"],children:[f&&F.jsx(v4,{}),F.jsx(kp,{...T,name:e,placeholder:a,classNamePrefix:"select-field",isDisabled:g,isClearable:c,isOptionDisabled:v,isSearchable:f,noOptionsMessage:()=>S?F.jsx(ug,{size:"sm"}):i,onInputChange:G,onChange:M,onBlur:z,value:V,options:s,components:{Option:za,SingleValue:sl},menuPortalTarget:document.body,menuIsOpen:P,onMenuOpen:()=>A(!We.isEmpty(s)||S),onMenuClose:()=>A(!1)}),F.jsx(ul,{isClearable:c,handleChange:()=>{_(null),h&&h.onChange(null)}})]}),!!m&&m]})]})},Jn={"switch-input-container":"switchInput-module_switch-input-container_t9Kpp",title:"switchInput-module_title_lBK2p","switch-input-items":"switchInput-module_switch-input-items_P3RMy","switch-wrapper":"switchInput-module_switch-wrapper_cZvDV","switch-input":"switchInput-module_switch-input_e9PWi","switch-slider":"switchInput-module_switch-slider_ICfGn","switch-label":"switchInput-module_switch-label_Nj-Hh",disabled:"switchInput-module_disabled_yz9dR",lg:"switchInput-module_lg_WMIDO",md:"switchInput-module_md_683sQ",sm:"switchInput-module_sm_sh92j"},cl=({title:t,name:e,items:n,onChange:a,size:i="sm",input:s,...l})=>{const{handleChange:f,handleBlur:c}=fo({input:s,onChange:a,transformValue:p=>{const{checked:g,name:m}=p.target;if(s){const v={...s.value};return v[m]=g,v}return p}});return F.jsxs("div",{className:Jn["switch-input-container"],"data-testid":"switch-input-container",children:[t&&F.jsxs("label",{className:Jn.title,"data-testid":"switch-title",children:[" ",t," "]}),F.jsx("div",{className:`${Jn["switch-input-items"]} ${Jn[i]}`,"data-testid":"switch-input-items",children:We.map(n,({id:p,name:g,label:m,disabled:v,checked:E,value:w,...h})=>{const S=p||g||e;return F.jsxs("label",{htmlFor:S,className:`${v?Jn.disabled:""}`,"data-testid":`switch-label-${S}`,children:[F.jsxs("div",{className:Jn["switch-wrapper"],children:[F.jsx("input",{...l,...h,id:S,type:"checkbox",name:g||e,checked:s&&g?We.get(s.value,g):E,disabled:v,onChange:f,onBlur:c,className:Jn["switch-input"],"data-testid":`switch-input-${S}`}),F.jsx("span",{className:Jn["switch-slider"]})]}),F.jsxs("span",{className:Jn["switch-label"],children:[" ",m," "]})]},S)})})]})},lg=({name:t,checked:e,onChange:n,label:a,title:i,disabled:s=!1,size:l="sm",input:f,...c})=>{const p={id:`${t}-single`,label:a,checked:e,disabled:s};return F.jsx(cl,{...c,name:t,items:[p],onChange:n,title:i,size:l,input:f})},cg={"empty-state-container":"emptyState-module_empty-state-container_azCks","link-container":"emptyState-module_link-container_kXroF"},C4=F.jsx(Nc,{}),I4=({onActionClick:t,icon:e=C4,actionText:n=Lt("reloadPage"),text:a=Lt("noResultsFound")})=>F.jsxs("div",{className:cg["empty-state-container"],children:[e,F.jsxs("div",{className:cg["link-container"],children:[F.jsx("span",{children:a}),t&&F.jsx("a",{onClick:t,children:n})]})]}),fg={"save-bar":"actionBar-module_save-bar_LOIUx","without-border":"actionBar-module_without-border_dsMIY"},x4=({withoutBorder:t=!1,saveProps:e,cancelProps:n,previousProps:a})=>{const{onCancel:i,label:s=Lt("cancel")}=n||{},{onPrevious:l,label:f=Lt("previous"),...c}=a||{},{onSave:p,label:g=Lt("save"),...m}=e||{};return F.jsxs("div",{className:Rt(fg["save-bar"],t?fg["without-border"]:""),children:[!!i&&F.jsx("a",{onClick:i,children:s}),!!l&&F.jsx(Fo,{outline:!0,label:f,onClick:l,...c}),!!p&&F.jsx(Fo,{label:g,onClick:p,...m})]})},E4=({onClick:t,copyText:e=Lt("copyButton.copy"),copiedText:n=Lt("copyButton.copied"),textToCopy:a,resetTime:i=2e3,...s})=>{const[l,f]=te.useState(!1),[c,p]=te.useState(!1);te.useEffect(()=>{if(l){p(!0);const m=setTimeout(()=>{p(!1)},i/2);return()=>clearTimeout(m)}},[l]);const g=()=>{a&&(f(!0),navigator.clipboard.writeText(a).then(()=>{setTimeout(()=>f(!1),i)}).catch(()=>{f(!1)}))};return F.jsx("div",{onClick:()=>t?t():g(),children:F.jsx(Fo,{className:`copy-btn ${l?"copied":""} ${c?"animating":""}`,outline:!0,label:l?n:e,leftAdornment:F.jsx(S4,{copied:l}),...s})})},S4=({copied:t})=>F.jsxs("div",{className:"copy-btn-icons",children:[F.jsx("div",{className:`copy-icon ${t?"hidden":""}`,children:F.jsx(t4,{})}),F.jsx("div",{className:`check-icon ${t?"":"hidden"}`,children:F.jsx(qx,{})})]}),dg=({children:t})=>{const e=te.useRef(null),[n,a]=te.useState(!1);return te.useEffect(()=>{const i=()=>{e.current&&a(e.current.scrollWidth>e.current.offsetWidth)};return i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[t]),F.jsx(F.Fragment,{children:t(e,n)})},pg=({children:t,content:e,placement:n="top",arrow:a=!1,maxWidth:i="600px"})=>{const s=te.cloneElement(t,{style:{...t.props.style||{},cursor:"pointer"}});return F.jsx(kd,{title:e,placement:n,arrow:a,slots:{transition:Ld},slotProps:{popper:{sx:{[`&.${Me.popper} .${Me.tooltip}`]:{fontFamily:"Poppins, Open Sans, Helvetica, Arial, sans-serif",background:"rgba(102, 102, 102, 1)",padding:"9px 9px 8px 12px",fontSize:"12px",color:"white !important",borderRadius:"4px",maxWidth:i},[`&.${Me.popper} .${Me.arrow}`]:{color:"rgba(102, 102, 102, 1)"},[`&.${Me.popper}[data-popper-placement*="top"] .${Me.tooltip}`]:{marginBottom:"8px"},[`&.${Me.popper}[data-popper-placement*="bottom"] .${Me.tooltip}`]:{marginTop:"8px"},[`&.${Me.popper}[data-popper-placement*="left"] .${Me.tooltip}`]:{marginRight:"8px"},[`&.${Me.popper}[data-popper-placement*="right"] .${Me.tooltip}`]:{marginLeft:"8px"}}}},children:s})},A4=({content:t,children:e,...n})=>F.jsx(dg,{children:(a,i)=>{const s=te.cloneElement(e,{ref:a});return i&&t?F.jsx(pg,{content:t,...n,children:s}):s}}),gg={progressbar:"progressbar-module_progressbar_8ygYR",lg:"progressbar-module_lg_5JGr-",sm:"progressbar-module_sm_LPtUo"},w4=({size:t="lg",progress:e=0,variant:n="determinate"})=>{const[a,i]=te.useState(e);return te.useEffect(()=>{if(n==="buffer"){const s=setInterval(()=>{i(l=>{const f=Math.min(100,l+Math.sqrt(100-l)*.5);return Math.round(f)})},100);return()=>{clearInterval(s)}}else i(e)},[n,e]),F.jsx(Vd,{variant:n=="buffer"?"determinate":n,value:a,className:Rt(gg.progressbar,gg[t]),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":a})},pi={alert:"alert-module_alert_j7ZRS","full-width":"alert-module_full-width_eKIHw",icon:"alert-module_icon_vbZHd",message:"alert-module_message_klR2U",link:"alert-module_link_IrBj3",success:"alert-module_success_AVBKS",error:"alert-module_error_cxg96",warning:"alert-module_warning_zkMaJ",info:"alert-module_info_PBo1l"},T4=({message:t,variant:e="success",className:n,icon:a,fullWidth:i=!1,link:s,...l})=>{const f={success:F.jsx(Xn,{color:mn("success","500"),children:F.jsx(e4,{})}),error:F.jsx(Xn,{color:mn("error","700"),children:F.jsx(Kx,{})}),warning:F.jsx(Xn,{color:mn("secondary","500"),children:F.jsx(n4,{})}),info:F.jsx(Xn,{color:mn("primary","500"),children:F.jsx(r4,{})})};return F.jsxs("div",{className:Rt(pi.alert,pi[e],{[pi["full-width"]]:i},n),...l,children:[F.jsx("div",{className:pi.icon,children:a||f[e]}),F.jsxs("div",{className:pi.message,children:[We.isString(t)?F.jsx("span",{dangerouslySetInnerHTML:{__html:t}}):F.jsxs("span",{children:[" ",t]}),s&&F.jsxs(F.Fragment,{children:[" ",F.jsx("a",{href:s==null?void 0:s.href,className:pi.link,onClick:s==null?void 0:s.onClick,children:s.text})]})]})]})};he.ActionBar=x4,he.Alert=T4,he.Button=Fo,he.Categories=Z1,he.Checkbox=sg,he.CheckboxGroup=ll,he.CheckboxInput=sg,he.CheckboxInputGroup=ll,he.ClearComponent=ul,he.ColorOptions=H1,he.ColorValues=Fc,he.Colors=_i,he.CopyButton=E4,he.CustomIcon=Xn,he.EmptyState=I4,he.FileIcon=Y1,he.FormField=h4,he.MailIcon=z1,he.Option=za,he.OverflowChecker=dg,he.PriceCloseIcon=j1,he.PriceDownIcon=J1,he.Progressbar=w4,he.SearchComponent=ig,he.SearchPublication=Nc,he.Searcher=y4,he.SelectField=l4,he.Shades=X1,he.SingleValue=sl,he.Spinner=ug,he.Switch=lg,he.SwitchGroup=cl,he.SwitchInput=lg,he.SwitchInputGroup=cl,he.TextInput=po,he.WithOverflowTooltip=A4,he.WithTooltip=pg,he.allColors=Ds,he.getColor=mn,he.isValidColor=Zr,he.useReduxFormField=fo,Object.defineProperty(he,Symbol.toStringTag,{value:"Module"})});
|