dap-design-system
Version:
Official design system for the DÁP (dap.gov.hu)
78 lines (77 loc) • 3.42 kB
TypeScript
import { PropertyValueMap, TemplateResult } from 'lit';
import { FileItemTemplate } from '../../common/types';
import { DdsElement } from '../../internal/dds-hu-element';
import { default as DapDSFormLabel } from '../form/form-label/form-label.component';
import { default as DapDSIcon } from '../icon/icon.component';
import { default as DapDSFileInputListItem } from './file-input-list-item.component';
declare const DapDSFileInputList_base: typeof DdsElement & {
new (...args: any[]): import('../../internal/mixin/sizedMixin').SizedElementInterface;
prototype: import('../../internal/mixin/sizedMixin').SizedElementInterface;
};
/**
* `dap-ds-file-input-list`
* @summary A file input list is a container for file input items.
* @element dap-ds-file-input-list
* @title - File input list
* @group file-input
*
* @slot delete-button - The delete button.
*
* @event {{ file: FileListElement }} dds-file-click - Dispatched when a file is clicked.
*
* @csspart base - The main file input list container.
*
* @cssproperty --dds-file-list-display - Controls the display property (default: flex)
* @cssproperty --dds-file-list-flex-direction - Controls the flex-direction property (default: column)
* @cssproperty --dds-file-list-padding - Controls the padding property (default: 0)
* @cssproperty --dds-file-list-list-style - Controls the list-style-type property (default: none)
* @cssproperty --dds-file-list-gap - Controls the row-gap property (default: var(--dds-spacing-200))
*/
export default class DapDSFileInputList extends DapDSFileInputList_base {
static tagName: string;
static dependencies: {
'dap-ds-file-input-list-item': typeof DapDSFileInputListItem;
'dap-ds-icon': typeof DapDSIcon;
'dap-ds-form-label': typeof DapDSFormLabel;
};
/** The aria label for the file input list. */
/** The id of the file input element to bind to. */
for: string;
/** Disables the file input list. */
disabled: boolean;
/** The label for the file input list. */
label?: string;
/** Whether to show the delete button in the file input list item. */
showDeleteButton: string;
/** Whether to show the file link in the file input list item. */
showFileLink: string;
/** File item template function
* @type {(fileItemTemplate: FileItemTemplate) => TemplateResult}
*/
fileItemTemplate?: (fileItemTemplate: FileItemTemplate) => TemplateResult;
/** The label of the file link. */
fileLinkLabel: string;
/** Whether to emit a custom event with the file data when the file is clicked. */
emitLinkEvent: boolean;
/** Whether to show the file size in the file input list item */
showFileSize: string;
/** Whether to show thumbnail preview for supported file types
* @ignore
*/
showThumbnail: string;
/** Size of the thumbnail preview
* @ignore
*/
thumbnailSize: 'xxs' | 'xs' | 'sm' | 'md' | 'lg';
private _files;
static readonly styles: import('lit').CSSResult;
private fileInputElement;
get files(): NodeListOf<DapDSFileInputListItem>;
getFileByName(name: string): Element | null;
private handleFileClick;
private _handleFilesAccepted;
protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
removeFile(event: CustomEvent): void;
render(): TemplateResult<1>;
}
export {};