limbo-component 3.4.1 → 3.4.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.
- package/dist/limbo.cjs.js +1 -1
- package/dist/limbo.cjs.map +1 -1
- package/dist/limbo.es.js +1 -1
- package/dist/limbo.es.map +1 -1
- package/dist/limbo.min.js +1 -1
- package/dist/limbo.umd.js +1 -1
- package/dist/limbo.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/limbo.es.js
CHANGED
|
@@ -133,7 +133,7 @@ return c(u,{children:[
|
|
|
133
133
|
return c("div",{className:"limbo-image-card lb:animate-pulse",role:"status","aria-label":"Cargando imágen...",children:[
|
|
134
134
|
/* @__PURE__ */s("div",{className:"lb:w-full lb:aspect-square lb:bg-neutral-gray-200 lb:rounded-md lb:flex lb:items-center lb:justify-center",children:/* @__PURE__ */s("span",{className:"icon icon-spinner"})}),
|
|
135
135
|
/* @__PURE__ */s("div",{className:"limbo-image-card-name lb:opacity-100 lb:position-relative lb:bottom-0 lb:p-2",children:/* @__PURE__ */s("div",{className:"lb:h-4 lb:bg-neutral-gray-200 lb:rounded lb:w-3/4"})}),
|
|
136
|
-
/* @__PURE__ */s("span",{className:"lb:sr-only",children:"Cargando imágen..."})]})}const xe=[{value:"",label:"Todos los tipos"},{value:"image",label:"Imágenes"},{value:"video",label:"Videos"},{value:"document",label:"Documentos"},{value:"audio",label:"Audio"}];function ke({onSelect:e,onCrop:l,onDelete:a,deletingId:o,images:u,loading:d,error:b,filters:m={name:"",dateFrom:"",dateTo:"",uploadedBy:"",assetType:"",folder:""},debouncedFilters:h=null,onFiltersChange:p,filterConfig:f={showNameFilter:!0,showUploadedByFilter:!1,showDateFilter:!0,showTypeFilter:!1},loadingConfig:g={showPlaceholders:!0,placeholderCount:10,showSpinner:!0},allowedActions:y={select:!0,download:!0,copy:!0,delete:!0,crop:!0,variants:!0},allowedCategories:v=null,folderConfig:w=null,onFolderChange:x=null}){const{isSearching:k,searchPending:C}=function(e,l,a){const[i,o]=t(!1),s=r(null);return n(()=>(Object.keys(e).some(t=>e[t]!==l[t])?s.current=setTimeout(()=>{o(!0)},150):(s.current&&clearTimeout(s.current),o(!1)),()=>{s.current&&clearTimeout(s.current)}),[e,l]),{isSearching:i||a,searchPending:i}}(m,h||m,d),N=!1!==f.showNameFilter,S=!0===f.showUploadedByFilter,E=!1!==f.showDateFilter,$=!
|
|
136
|
+
/* @__PURE__ */s("span",{className:"lb:sr-only",children:"Cargando imágen..."})]})}const xe=[{value:"",label:"Todos los tipos"},{value:"image",label:"Imágenes"},{value:"video",label:"Videos"},{value:"document",label:"Documentos"},{value:"audio",label:"Audio"}];function ke({onSelect:e,onCrop:l,onDelete:a,deletingId:o,images:u,loading:d,error:b,filters:m={name:"",dateFrom:"",dateTo:"",uploadedBy:"",assetType:"",folder:""},debouncedFilters:h=null,onFiltersChange:p,filterConfig:f={showNameFilter:!0,showUploadedByFilter:!1,showDateFilter:!0,showTypeFilter:!1},loadingConfig:g={showPlaceholders:!0,placeholderCount:10,showSpinner:!0},allowedActions:y={select:!0,download:!0,copy:!0,delete:!0,crop:!0,variants:!0},allowedCategories:v=null,folderConfig:w=null,onFolderChange:x=null}){const{isSearching:k,searchPending:C}=function(e,l,a){const[i,o]=t(!1),s=r(null);return n(()=>(Object.keys(e).some(t=>e[t]!==l[t])?s.current=setTimeout(()=>{o(!0)},150):(s.current&&clearTimeout(s.current),o(!1)),()=>{s.current&&clearTimeout(s.current)}),[e,l]),{isSearching:i||a,searchPending:i}}(m,h||m,d),N=!1!==f.showNameFilter,S=!0===f.showUploadedByFilter,E=!1!==f.showDateFilter,$=!1!==f.showTypeFilter,_=!0===w?.showFolderFilter,z=w?.include?.length>0?w.include:null,T=w?.exclude?.length>0?w.exclude:null,L=!1!==w?.showFolderInfo,I=!1!==w?.allowMoveFolder&&!!x,A=!0===w?.allowCreateFolder,M=v?xe.filter(e=>""===e.value||v.includes(e.value)):xe,D=r(null),O=window.limboCore?.accessibilityManager;n(()=>{if(D.current&&window.limboCore?.keyboardManager){const e="gallery-grid";D.current.setAttribute("data-grid-id",e),window.limboCore.keyboardManager.setupGridNavigation(D.current,{itemSelector:".limbo-image-card",gridId:e,columns:"auto"})}},[u]),n(()=>{if(!d&&u.length>0){const e=u.slice(0,12).map(e=>e.url||e.path).filter(Boolean);e.length>0&&P(e,4)}},[d,u]);const R=i(()=>{if(!m.assetType)return"archivos";return{image:"imágenes",video:"videos",document:"documentos",audio:"archivos de audio"}[m.assetType]||"archivos"},[m.assetType]);n(()=>{d?O?.announceLoading(!0,"galería"):d||b?b&&O?.announceError(b,"galería"):(O?.announceLoading(!1,"galería"),u.length>0&&O?.announce(`Se encontraron ${u.length} ${R} en la galería`))},[d,b,u.length,O,R]),n(()=>{C&&O?.announce("Buscando...","polite")},[C,O]);const F=e=>{const{name:t,value:n}=e.target;p&&p({...m,[t]:n})},j=m.name||m.dateFrom||m.dateTo||m.uploadedBy||m.assetType||m.folder,U=k&&u.length>0&&!d;/* @__PURE__ */
|
|
137
137
|
return c("div",{className:"lb:w-full lb:max-w-full lb:py-2 lb:overflow-x-hidden lb:box-border",children:[
|
|
138
138
|
/* @__PURE__ */s("div",{className:"lb:px-2 lb:mb-3 lb:mx-2 lb:max-w-full lb:overflow-x-hidden lb:box-border",children:/* @__PURE__ */c("form",{className:"limbo-filters lb:flex lb:items-stretch lb:content-stretch lb:flex-row",onSubmit:e=>e.preventDefault(),role:"search","aria-label":"Filtrar archivos",children:[N&&/* @__PURE__ */c("div",{className:"limbo-filter-group limbo-filter-group--name",children:[
|
|
139
139
|
/* @__PURE__ */c("label",{htmlFor:"name",className:"limbo-filter-label",children:["Nombre",C&&/* @__PURE__ */s("span",{className:"limbo-filter-searching","aria-hidden":"true",children:/* @__PURE__ */s("span",{className:"icon icon-spinner lb:animate-spin lb:w-3 lb:h-3"})})]}),
|