ui-mathilde-web 0.9.3 → 0.9.5

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.
@@ -495,7 +495,7 @@ You may have forgotten to import it.`);var r=e.__emotion_real===e,s=r&&e.__emoti
495
495
  `,children:[g.jsxs("div",{className:"flex items-center gap-2 py-1",children:[g.jsxs("div",{className:"flex min-w-[48px] items-center gap-1",children:[l&&g.jsx("button",{onClick:()=>r(i.id),className:"rounded-full p-1 transition-transform duration-200 hover:bg-gray-100",children:c?g.jsx(Bl,{className:"text-sm text-gray-500"}):g.jsx(mo,{className:"text-sm text-gray-500"})}),!l&&g.jsx("div",{className:"w-[28px]"})," ",i.icon&&g.jsx(i.icon,{className:`text-lg ${i.isActive?"text-blue-700 dark:text-blue-500":"text-gray-600"}`})]}),g.jsx("a",{href:i.href,className:`
496
496
  flex-grow transition-colors duration-200
497
497
  ${i.isActive?"font-medium text-blue-700 dark:text-blue-500":"text-gray-700 hover:text-blue-600 dark:text-gray-300"}
498
- `,children:i.title})]}),l&&c&&s(i.subItems||[],o+1)]},i.id)})});return g.jsx("nav",{id:"TableOfContents",children:s(t)})},Bb={"image/*":"Imágenes (JPG, PNG, GIF, etc.)","application/pdf":"Documentos PDF","application/msword":"Documentos Word (.doc)","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"Documentos Word (.docx)","application/vnd.ms-excel":"Hojas de cálculo Excel (.xls)","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"Hojas de cálculo Excel (.xlsx)","application/vnd.ms-powerpoint":"Presentaciones PowerPoint (.ppt)","application/vnd.openxmlformats-officedocument.presentationml.presentation":"Presentaciones PowerPoint (.pptx)","text/csv":"Archivos CSV","application/json":"Archivos JSON","application/xml":"Archivos XML"},nP=({onChange:t,accept:e="application/pdf",maxSize:n=10,multiple:r=!1,helperText:s=""})=>{const[a,o]=_.useState(!1),i=Array.isArray(e)?e.join(","):e,l=()=>Array.isArray(e)?e.map(m=>Bb[m]||m).join(", "):Bb[e]||e,c=_.useCallback(m=>{m.preventDefault(),m.stopPropagation(),o(!0)},[]),d=_.useCallback(m=>{m.preventDefault(),m.stopPropagation(),o(!1)},[]),u=_.useCallback(m=>{m.preventDefault(),m.stopPropagation(),o(!1);const p=Array.from(m.dataTransfer.files);p.length>0&&h(p)},[e,n,r,t]),f=_.useCallback(m=>{const p=Array.from(m.target.files||[]);p.length>0&&h(p)},[e,n,r,t]),h=_.useCallback(m=>{if(!r&&m.length>1){alert("Solo se permite un archivo");return}const p=m.filter(v=>Array.isArray(e)?e.some(x=>x==="image/*"?v.type.startsWith("image/"):v.type===x):e==="image/*"?v.type.startsWith("image/"):v.type===e);if(p.length===0){alert(`Tipo de archivo no permitido. Tipos permitidos: ${l()}`);return}const b=p.filter(v=>v.size<=n*1024*1024);b.length!==p.length&&alert(`Algunos archivos exceden el tamaño máximo de ${n}MB`),b.length>0&&(t==null||t(b))},[e,n,r,t]);return g.jsx("div",{className:"flex w-full items-center justify-center",children:g.jsxs(Cc,{htmlFor:"dropzone-file",className:`flex w-full cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-dashed ${a?"border-blue-500 bg-blue-50":"border-gray-300 bg-gray-50"} hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-700 dark:hover:border-gray-500 dark:hover:bg-gray-600`,onDragOver:c,onDragLeave:d,onDrop:u,children:[g.jsx("div",{className:"flex w-full items-center justify-center py-6 px-10",children:g.jsx("div",{className:"flex flex-col",children:g.jsxs("p",{className:"mb-2 text-center text-sm font-light text-gray-400 dark:text-gray-400",children:[g.jsx("span",{className:"text-gray-500",children:"Arrastra aquí tu archivo "}),g.jsx("br",{}),g.jsxs("span",{className:" text-gray-500",children:["o ",g.jsx("span",{className:"underline",children:"búscalo en el dispositivo"})]}),s]})})}),g.jsx(og,{id:"dropzone-file",className:"hidden",onChange:f,accept:i,multiple:r})]})})},rP=t=>{const e=Math.floor(Math.log(t)/Math.log(1024)),n=["Bytes","KB","MB","GB","TB"];return`${(t/Math.pow(1024,e)).toFixed(2)} ${n[e]}`},sP=({files:t,onDelete:e,isMultiple:n=!0})=>{const r=n?t:t.slice(0,1);return g.jsx("div",{className:"mt-4",children:g.jsx("ul",{className:"list-none",children:r.map((s,a)=>g.jsxs("div",{className:"mb-5 flex w-full items-center justify-between rounded-lg border-2 border-dashed border-[#191960] bg-[#F4F4F4CC] p-4 hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-700 dark:hover:border-gray-500 dark:hover:bg-gray-600",children:[g.jsxs("div",{className:"flex items-center",children:[g.jsx(xr,{classIm:"mr-2",src:"https://ftp.mathilde-ads.com/151-1dcc25481e8c72ed21c720c94adfdec6.svg",alt:"icon dropzone",width:40}),g.jsx("li",{className:"text-base font-semibold text-gray-700",children:s.name})]}),g.jsxs("div",{className:"mx-4 flex flex-1 items-center",onClick:()=>e(s),children:[g.jsx("span",{className:"flex text-sm",children:rP(s.size)}),g.jsx(xr,{classIm:"ml-auto cursor-pointer",src:"https://ftp.mathilde-ads.com/382-d1647780b1ee3f437104400b2f8d6555.svg",alt:"icon dropzone",width:20})]})]},a))})})},aP=({description:t=""})=>g.jsxs("div",{className:"flex flex-col items-center justify-center",children:[g.jsx("img",{src:"https://ftp.mathilde-ads.com/151-82821df9d4f7bd2662418d3147880fba.svg",alt:t.replace(/<[^>]*>/g,"")}),t&&g.jsx("p",{className:"text-center",dangerouslySetInnerHTML:{__html:t}})]}),zb={mth_tabs_tab_item:"tabs-module__mth_tabs_tab_item__dk-Z7",mth_tabs_tab_item_active:"tabs-module__mth_tabs_tab_item_active__p3kAi"};function oP({tabs:t,classes:e="",classesUl:n="",tabItemClasses:r="",activeTabStyles:s,inactiveTabStyles:a,contentClasses:o="",defaultActiveTab:i,onTabChange:l}){var m,p;const[c,d]=_.useState(i||((m=t[0])==null?void 0:m.id)||""),u=b=>{d(b),l==null||l(b)},f=b=>{const v=b.target.value;d(v),l==null||l(v)},h=(p=t.find(b=>b.id===c))==null?void 0:p.content;return g.jsxs("div",{className:`${e} tabs-container`,children:[g.jsxs("div",{className:"mb-4 sm:hidden",children:[g.jsx("label",{htmlFor:"tabs-select",className:"sr-only",children:"Selecciona una pestaña"}),g.jsx("select",{id:"tabs-select",value:c,onChange:f,className:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",children:t.map(b=>g.jsx("option",{value:b.id,children:b.title},b.id))})]}),g.jsx("ul",{className:`${n} text-sm font-medium text-center text-gray-500 rounded-lg shadow-sm sm:flex dark:divide-gray-700 dark:text-gray-400`,children:t.map(b=>{const v=c===b.id,x=()=>v&&s?s:!v&&a?a:{},k=()=>v?s?"":zb.mth_tabs_tab_item_active:a?"":zb.mth_tabs_tab_item;return g.jsx("li",{className:"w-full focus-within:z-10",children:g.jsxs("button",{onClick:()=>u(b.id),className:`${r} ${k()} uppercase`,style:x(),"aria-current":v?"page":void 0,children:[b.icon&&g.jsx("span",{className:"mr-2",children:b.icon}),b.title]})},b.id)})}),g.jsx("div",{className:`mt-0 ${o}`,children:h})]})}var Hb={},Ua={},Hd={exports:{}},Wi={exports:{}},Oe={};/** @license React v16.13.1
498
+ `,children:i.title})]}),l&&c&&s(i.subItems||[],o+1)]},i.id)})});return g.jsx("nav",{id:"TableOfContents",children:s(t)})},Bb={"image/*":"Imágenes (JPG, PNG, GIF, etc.)","application/pdf":"Documentos PDF","application/msword":"Documentos Word (.doc)","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"Documentos Word (.docx)","application/vnd.ms-excel":"Hojas de cálculo Excel (.xls)","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"Hojas de cálculo Excel (.xlsx)","application/vnd.ms-powerpoint":"Presentaciones PowerPoint (.ppt)","application/vnd.openxmlformats-officedocument.presentationml.presentation":"Presentaciones PowerPoint (.pptx)","text/csv":"Archivos CSV","application/json":"Archivos JSON","application/xml":"Archivos XML"},nP=({onChange:t,accept:e="application/pdf",maxSize:n=10,multiple:r=!1,helperText:s=""})=>{const[a,o]=_.useState(!1),i=Array.isArray(e)?e.join(","):e,l=()=>Array.isArray(e)?e.map(m=>Bb[m]||m).join(", "):Bb[e]||e,c=_.useCallback(m=>{m.preventDefault(),m.stopPropagation(),o(!0)},[]),d=_.useCallback(m=>{m.preventDefault(),m.stopPropagation(),o(!1)},[]),u=_.useCallback(m=>{m.preventDefault(),m.stopPropagation(),o(!1);const p=Array.from(m.dataTransfer.files);p.length>0&&h(p)},[e,n,r,t]),f=_.useCallback(m=>{const p=Array.from(m.target.files||[]);p.length>0&&h(p)},[e,n,r,t]),h=_.useCallback(m=>{if(!r&&m.length>1){alert("Solo se permite un archivo");return}const p=m.filter(v=>Array.isArray(e)?e.some(x=>x==="image/*"?v.type.startsWith("image/"):v.type===x):e==="image/*"?v.type.startsWith("image/"):v.type===e);if(p.length===0){alert(`Tipo de archivo no permitido. Tipos permitidos: ${l()}`);return}const b=p.filter(v=>v.size<=n*1024*1024);b.length!==p.length&&alert(`Algunos archivos exceden el tamaño máximo de ${n}MB`),b.length>0&&(t==null||t(b))},[e,n,r,t]);return g.jsx("div",{className:"flex w-full items-center justify-center",children:g.jsxs(Cc,{htmlFor:"dropzone-file",className:`flex w-full cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-dashed ${a?"border-blue-500 bg-blue-50":"border-[#C4C4C4] bg-gray-50"} hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-700 dark:hover:border-gray-500 dark:hover:bg-gray-600`,onDragOver:c,onDragLeave:d,onDrop:u,children:[g.jsx("div",{className:"flex w-full items-center justify-center py-6 px-10",children:g.jsx("div",{className:"flex flex-col",children:g.jsxs("p",{className:"mb-2 text-center text-sm font-light text-gray-400 dark:text-gray-400",children:[g.jsx("span",{className:"text-gray-500",children:"Arrastra aquí tu archivo "}),g.jsx("br",{}),g.jsxs("span",{className:" text-gray-500",children:["o ",g.jsx("span",{className:"underline",children:"búscalo en el dispositivo"})]}),s]})})}),g.jsx(og,{id:"dropzone-file",className:"hidden",onChange:f,accept:i,multiple:r})]})})},rP=t=>{const e=Math.floor(Math.log(t)/Math.log(1024)),n=["Bytes","KB","MB","GB","TB"];return`${(t/Math.pow(1024,e)).toFixed(2)} ${n[e]}`},sP=({files:t,onDelete:e,isMultiple:n=!0})=>{const r=n?t:t.slice(-1);return g.jsx("div",{className:"mt-4",children:g.jsx("ul",{className:"list-none",children:r.map((s,a)=>g.jsxs("div",{className:"mb-5 flex w-full items-center justify-between rounded-lg border-2 border-dashed border-[#191960] bg-[#F4F4F4CC] p-4 hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-700 dark:hover:border-gray-500 dark:hover:bg-gray-600",children:[g.jsxs("div",{className:"flex items-center",children:[g.jsx(xr,{classIm:"mr-2",src:"https://ftp.mathilde-ads.com/151-1dcc25481e8c72ed21c720c94adfdec6.svg",alt:"icon dropzone",width:40}),g.jsx("li",{className:"text-base text-gray-700",children:s.name})]}),g.jsxs("div",{className:"mx-4 flex flex-1 justify-between",children:[g.jsxs("p",{className:"ml-auto text-sm font-semibold",children:[rP(s.size),"  "]}),g.jsx("div",{onClick:()=>e(s),children:g.jsx(xr,{classIm:"ml-auto cursor-pointer",src:"https://ftp.mathilde-ads.com/382-d1647780b1ee3f437104400b2f8d6555.svg",alt:"icon dropzone",width:20})})]})]},a))})})},aP=({description:t=""})=>g.jsxs("div",{className:"flex flex-col items-center justify-center",children:[g.jsx("img",{src:"https://ftp.mathilde-ads.com/151-82821df9d4f7bd2662418d3147880fba.svg",alt:t.replace(/<[^>]*>/g,"")}),t&&g.jsx("p",{className:"text-center",dangerouslySetInnerHTML:{__html:t}})]}),zb={mth_tabs_tab_item:"tabs-module__mth_tabs_tab_item__dk-Z7",mth_tabs_tab_item_active:"tabs-module__mth_tabs_tab_item_active__p3kAi"};function oP({tabs:t,classes:e="",classesUl:n="",tabItemClasses:r="",activeTabStyles:s,inactiveTabStyles:a,contentClasses:o="",defaultActiveTab:i,onTabChange:l}){var m,p;const[c,d]=_.useState(i||((m=t[0])==null?void 0:m.id)||""),u=b=>{d(b),l==null||l(b)},f=b=>{const v=b.target.value;d(v),l==null||l(v)},h=(p=t.find(b=>b.id===c))==null?void 0:p.content;return g.jsxs("div",{className:`${e} tabs-container`,children:[g.jsxs("div",{className:"mb-4 sm:hidden",children:[g.jsx("label",{htmlFor:"tabs-select",className:"sr-only",children:"Selecciona una pestaña"}),g.jsx("select",{id:"tabs-select",value:c,onChange:f,className:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",children:t.map(b=>g.jsx("option",{value:b.id,children:b.title},b.id))})]}),g.jsx("ul",{className:`${n} text-sm font-medium text-center text-gray-500 rounded-lg shadow-sm sm:flex dark:divide-gray-700 dark:text-gray-400`,children:t.map(b=>{const v=c===b.id,x=()=>v&&s?s:!v&&a?a:{},k=()=>v?s?"":zb.mth_tabs_tab_item_active:a?"":zb.mth_tabs_tab_item;return g.jsx("li",{className:"w-full focus-within:z-10",children:g.jsxs("button",{onClick:()=>u(b.id),className:`${r} ${k()} uppercase`,style:x(),"aria-current":v?"page":void 0,children:[b.icon&&g.jsx("span",{className:"mr-2",children:b.icon}),b.title]})},b.id)})}),g.jsx("div",{className:`mt-0 ${o}`,children:h})]})}var Hb={},Ua={},Hd={exports:{}},Wi={exports:{}},Oe={};/** @license React v16.13.1
499
499
  * react-is.production.min.js
500
500
  *
501
501
  * Copyright (c) Facebook, Inc. and its affiliates.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui-mathilde-web",
3
- "version": "0.9.3",
3
+ "version": "0.9.5",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"