Documents
Description
Documents provides reusable document-list widgets for Enso UI, including a standalone list component and a card wrapper with refresh and badge controls.
The package is backend-driven and is typically embedded in edit pages where users need to upload, filter, preview, and remove files attached to another resource.
Installation
Install the package:
yarn add @enso-ui/documents
This package is also available through the full enso-ui workspace bundle.
Features
- exports
Documentsfor inline document lists with upload and filter controls - exports
DocumentsCardfor dashboard-style card integration with count badges - supports custom toolbar rendering through the
controlsslot - delegates file preview and deletion to the shared files package
Usage
<script>
import { Documents, DocumentsCard } from '@enso-ui/documents/bulma';
export default {
components: { Documents, DocumentsCard },
};
</script>
API
Documents
Inline document list widget.
Import: @enso-ui/documents/bulma
Props:
id: string | numberrequiredtype: stringrequiredquery: stringdefault''compact: booleandefaultfalsedisableControls: booleandefaultfalsedisableUpload: booleandefaultfalsefileSizeLimit: numberdefault20971520
Events:
updateafter fetches, uploads, and deletions
Slots:
controlswith{ id, type, uploadLink, fetch, internalQuery }
DocumentsCard
Card wrapper around Documents.
Import: @enso-ui/documents/bulma
Props:
icon: string | array | objectcollapsed: booleandefaultfalseid: string | numberrequiredtype: stringrequiredtitle: stringdefault''
Events:
- No public emits.
Companion Backend Package
The backend companion provides the core.documents.* routes and payloads used to list, upload, and destroy document records.
Depends On
Contributions
are welcome. Pull requests are great, but issues are good too.
Thank you to all the people who already contributed to Enso!