cemtrik-dependencies 1.0.102 → 1.0.103

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.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -45,7 +45,7 @@ Check the top-level render call using <`+j+">.")}return S}}function br(d,S){{if(
45
45
  input[type="number"] {
46
46
  -moz-appearance: textfield;
47
47
  }
48
- `}),f.jsxs("div",{"data-testid":`container-input-${b}`,className:v,children:[n!==""&&f.jsx("label",{htmlFor:t,className:k("block text-sm font-medium leading-6",p!==""?p:"text-gray-700"),"data-testid":`label-${b}`,children:n}),f.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[f.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:f.jsx(sr,{name:w,onChange:W=>o(W),id:w,options:E,value:s,isReadOnly:a,className:F,height:P<=640?"28px":"32px",classNameInput:k(C&&"ml-3.5"),style:{paddingRight:0,boxShadow:"none"},isDisabledFocus:!0})}),f.jsx("input",{id:b,name:r,type:I,autoComplete:h,placeholder:e,readOnly:a,"data-testid":`input-${b}`,onClick:l,onKeyDown:x,onChange:W=>o(W),value:i,className:k("block w-full rounded-md border-0 py-1.5 pl-24 shadow-sm placeholder-gray-300 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-1 focus:ring-inset text-sm sm:leading-6",z,g!==""&&g)}),c&&f.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:f.jsx(tr,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),m.length===0||!c?null:f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${b}`,children:m})]})]})},Ds=({setValuesDefault:e,status:n=!1,isReadOnly:t=!1,handleClick:r,text:o=""})=>{const[l,i]=u.useState(!1);u.useEffect(()=>{i(n),e("status",n)},[n,e]);const s=()=>{i(!l),e("status",!l),r&&r()};return f.jsxs("div",{className:"flex",children:[f.jsxs(Ci,{checked:l,onChange:s,className:k("group relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-success-1 focus:ring-offset-2 mt-1",l?"bg-success-1":"bg-gray-200"),"data-testid":"switch",disabled:t,children:[f.jsx("span",{className:"sr-only",children:"Use setting"}),f.jsx("span",{"aria-hidden":"true",className:k("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",l?"translate-x-full":"translate-x-0")})]}),o!==""?f.jsx("p",{className:"text-sm font-medium text-gray-500 ml-2 self-end",children:o}):f.jsx("p",{className:"text-sm font-medium text-gray-500 ml-2 self-end","data-testid":"text-switch",children:l?"Activo":"Inactivo"})]})};function Ls({label:e="",id:n,htmlFor:t="",classNameLabel:r="",className:o="",rows:l=4,name:i,placeholder:s="",helperText:a="",isReadOnly:c=!1,isError:m=!1,onChange:h,value:b,idInput:p,nameInput:v,placeholderInput:g="",isReadOnlyInput:x=!1,valueInput:E,infoTop:w=null,infoBottom:C=null,classNameInfoTop:F="h-4",classNameInfoBottom:I="h-2",isInputTitle:P=!1,hiddenBorder:z=!1}){const W=Me({"ring-red-300 focus:ring-red-300 text-red-900":m,"focus:ring-indigo-600 text-gray-700":!m});return f.jsxs(f.Fragment,{children:[e!==""&&f.jsx("label",{htmlFor:t,className:k("leading-6 block text-sm",r!==""&&r),children:e}),f.jsxs("div",{className:"relative overflow-x-hidden",children:[w!==null&&f.jsx("div",{className:"absolute top-2 left-3 w-full",children:w}),f.jsxs("div",{className:k("overflow-hidden rounded-md shadow-sm ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-indigo-600 placeholder:text-gray-400 bg-white",W),children:[w!==null&&f.jsx("div",{className:"py-2","aria-hidden":"true",children:f.jsx("div",{className:"py-px",children:f.jsx("div",{className:F})})}),P&&f.jsx("textarea",{name:v,id:p,className:"block w-full resize-none border-0 bg-transparent py-1.5 text-gray-400 placeholder:text-gray-400 focus:ring-0 text-sm",placeholder:g,value:E,onChange:h,rows:2,readOnly:x}),f.jsx("textarea",{placeholder:s,rows:l,name:i,id:n,className:k(P||z?"block w-full resize-none border-0 bg-transparent py-1.5 placeholder:text-gray-400 focus:ring-0":"block w-full rounded-md border-0 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset sm:leading-6",W,o!==""&&o),readOnly:c,onChange:h,value:b,"data-testid":`textarea-${n}`}),C!==null&&f.jsx("div",{className:"py-2","aria-hidden":"true",children:f.jsx("div",{className:"py-px",children:f.jsx("div",{className:I})})})]}),C!==null&&f.jsx("div",{className:"absolute bottom-2 left-3 w-full",children:C})]}),a.length>0&&m&&f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${n}`,children:a})]})}const _s=({className:e="",children:n,message:t=""})=>{const[r,o]=u.useState(!1),l=()=>{t!==""&&o(!0)},i=()=>{o(!1)};return f.jsx("div",{className:"relative",children:f.jsxs("div",{onMouseLeave:i.bind(null,r),"data-testid":"container-tooltip",children:[f.jsx("div",{className:`
48
+ `}),f.jsxs("div",{"data-testid":`container-input-${b}`,className:v,children:[n!==""&&f.jsx("label",{htmlFor:t,className:k("block text-sm font-medium leading-6",p!==""?p:"text-gray-700"),"data-testid":`label-${b}`,children:n}),f.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[f.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:f.jsx(sr,{name:w,onChange:W=>o(W),id:w,options:E,value:s,isReadOnly:a,className:F,height:P<=640?"28px":"32px",classNameInput:k(C&&"ml-3.5"),style:{paddingRight:0,boxShadow:"none"},isDisabledFocus:!0})}),f.jsx("input",{id:b,name:r,type:I,autoComplete:h,placeholder:e,readOnly:a,"data-testid":`input-${b}`,onClick:l,onKeyDown:x,onChange:W=>o(W),value:i,className:k("block w-full rounded-md border-0 py-1.5 pl-24 shadow-sm placeholder-gray-300 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-1 focus:ring-inset text-sm sm:leading-6",z,g!==""&&g)}),c&&f.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:f.jsx(tr,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),m.length===0||!c?null:f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${b}`,children:m})]})]})},Ds=({setValuesDefault:e,status:n=!1,isReadOnly:t=!1,handleClick:r,text:o="",updateStatus:l=!1})=>{const[i,s]=u.useState(!1);u.useEffect(()=>{s(n),e("status",n)},[n,e,l]);const a=()=>{s(!i),e("status",!i),r&&r()};return f.jsxs("div",{className:"flex",children:[f.jsxs(Ci,{checked:i,onChange:a,className:k("group relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-success-1 focus:ring-offset-2 mt-1",i?"bg-success-1":"bg-gray-200"),"data-testid":"switch",disabled:t,children:[f.jsx("span",{className:"sr-only",children:"Use setting"}),f.jsx("span",{"aria-hidden":"true",className:k("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",i?"translate-x-full":"translate-x-0")})]}),o!==""?f.jsx("p",{className:"text-sm font-medium text-gray-500 ml-2 self-end",children:o}):f.jsx("p",{className:"text-sm font-medium text-gray-500 ml-2 self-end","data-testid":"text-switch",children:i?"Activo":"Inactivo"})]})};function Ls({label:e="",id:n,htmlFor:t="",classNameLabel:r="",className:o="",rows:l=4,name:i,placeholder:s="",helperText:a="",isReadOnly:c=!1,isError:m=!1,onChange:h,value:b,idInput:p,nameInput:v,placeholderInput:g="",isReadOnlyInput:x=!1,valueInput:E,infoTop:w=null,infoBottom:C=null,classNameInfoTop:F="h-4",classNameInfoBottom:I="h-2",isInputTitle:P=!1,hiddenBorder:z=!1}){const W=Me({"ring-red-300 focus:ring-red-300 text-red-900":m,"focus:ring-indigo-600 text-gray-700":!m});return f.jsxs(f.Fragment,{children:[e!==""&&f.jsx("label",{htmlFor:t,className:k("leading-6 block text-sm",r!==""&&r),children:e}),f.jsxs("div",{className:"relative overflow-x-hidden",children:[w!==null&&f.jsx("div",{className:"absolute top-2 left-3 w-full",children:w}),f.jsxs("div",{className:k("overflow-hidden rounded-md shadow-sm ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-indigo-600 placeholder:text-gray-400 bg-white",W),children:[w!==null&&f.jsx("div",{className:"py-2","aria-hidden":"true",children:f.jsx("div",{className:"py-px",children:f.jsx("div",{className:F})})}),P&&f.jsx("textarea",{name:v,id:p,className:"block w-full resize-none border-0 bg-transparent py-1.5 text-gray-400 placeholder:text-gray-400 focus:ring-0 text-sm",placeholder:g,value:E,onChange:h,rows:2,readOnly:x}),f.jsx("textarea",{placeholder:s,rows:l,name:i,id:n,className:k(P||z?"block w-full resize-none border-0 bg-transparent py-1.5 placeholder:text-gray-400 focus:ring-0":"block w-full rounded-md border-0 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset sm:leading-6",W,o!==""&&o),readOnly:c,onChange:h,value:b,"data-testid":`textarea-${n}`}),C!==null&&f.jsx("div",{className:"py-2","aria-hidden":"true",children:f.jsx("div",{className:"py-px",children:f.jsx("div",{className:I})})})]}),C!==null&&f.jsx("div",{className:"absolute bottom-2 left-3 w-full",children:C})]}),a.length>0&&m&&f.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${n}`,children:a})]})}const _s=({className:e="",children:n,message:t=""})=>{const[r,o]=u.useState(!1),l=()=>{t!==""&&o(!0)},i=()=>{o(!1)};return f.jsx("div",{className:"relative",children:f.jsxs("div",{onMouseLeave:i.bind(null,r),"data-testid":"container-tooltip",children:[f.jsx("div",{className:`
49
49
  ${r?"":"text-opacity-90"}
50
50
  text-white group bg-orange-700 rounded-md inline-flex items-center text-base font-medium hover:text-opacity-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,onMouseEnter:l.bind(null,r),onMouseLeave:i.bind(null,r),"data-testid":"open-tooltip",children:n}),f.jsx(Re,{as:u.Fragment,enter:"transition ease-out duration-200",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-100 translate-y-0",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-1",show:r,children:f.jsx("div",{className:k("absolute z-20 px-4 mt-0 sm:px-0",e!==""&&e),children:f.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:l.bind(null,r),onMouseLeave:i.bind(null,r),"data-testid":"message",children:t})})})]})})},Rs=({children:e,data:n,className:t="",classNameTooltip:r="w-full",classNameMenu:o="",classNameMenuItems:l="",classNameContainerSearch:i="px-5",isSelectMultiple:s=!1,optionsSelect:a,propObject:c="name",propId:m="id",textNewItem:h="",defaultId:b=null,loading:p=!1,search:v=null,searchPlaceHolder:g="Buscar...",valueSearch:x=void 0,idsOptionSelect:E=null,isComponent:w,hiddenMenu:C=!1,id:F,onClick:I=()=>{},isRelative:P=!0,isMaxWidth:z=!1,isTag:W=!1,isClear:R=!1,clear:L=null,applyButton:H=null,applyButtonText:J="Aplicar",tagsParent:te=[],isReadOnly:ae,isDisabledApplyButton:T=!0,isOpenMenu:ne=void 0})=>{const[O,D]=u.useState(new Set),[M,q]=u.useState(new Map);u.useEffect(()=>{E!==null&&D(new Set(new Set(E)))},[E]),u.useEffect(()=>{if(te.length===0)return;const $=new Map;te.forEach(V=>$.set(V.id,V)),q($)},[te]),u.useEffect(()=>{R&&(D(new Set),q(new Map),L&&L())},[L,R]);const ue=$=>{let V=new Map(M),ie=new Set(O),A=null;if(b!==null&&($[m]===b&&(A=crypto.randomUUID()),A!==null&&($[m]=A),A!==null&&($[c]=$[c].replace(h,"").trim())),ie.has($[m])?ie.delete($[m]):ie.add($[m]),V.has($[m])?V.delete($[m]):V.set($[m],$),!s){const G=Array.from(ie),U=Array.from(V);G.shift(),U.shift(),ie=ie.size===2?new Set(G):ie,V=V.size===2?new Map(U):V}a($,Array.from(ie),A!==null),D(ie),q(V)},pe=$=>{I($===!0?-1:F)},ye=$=>{const V=new Set(O),ie=new Map(M);V.delete($[m]),ie.delete($[m]),a($,Array.from(V)),D(V),q(ie)},be=()=>{if(O.size===0)return;const $=new Set(O),V=new Map(M);$.clear(),V.clear(),a(null,Array.from($)),D($),q(V)};function Ae($){if(typeof $!="string")return $;const V=$.toLowerCase();return V.charAt(0).toUpperCase()+V.slice(1)}return f.jsxs(gt,{as:"div",className:k("inline-block text-left",P&&"relative",o!==""&&o),onClick:()=>pe(!0),"data-testid":`menu-${F}`,id:F,children:[f.jsx("style",{children:`
51
51
  .blue {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cemtrik-dependencies",
3
- "version": "1.0.102",
3
+ "version": "1.0.103",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "dev": "vite",