import type { CSSProperties, VNodeChild } from "vue"; import type { XyResponsiveBreakpoint } from "../core"; import type { XySemanticClassNames, XySemanticStyles } from "../core"; export type XyListItemLayout = "horizontal" | "vertical"; export type XyListSize = "default" | "large" | "lg" | "md" | "small" | "sm"; export type XyListResolvedSize = "lg" | "md" | "sm"; export interface XyListGrid extends Partial> { column?: number; gutter?: number; } export interface XyListLocale { emptyText?: VNodeChild | string; } export type XyListPaginationAlign = "center" | "end" | "start"; export type XyListPaginationPosition = "both" | "bottom" | "top"; export interface XyListPagination { align?: XyListPaginationAlign; current?: number; defaultCurrent?: number; defaultPageSize?: number; pageSize?: number; position?: XyListPaginationPosition; showSizeChanger?: boolean; showTotal?: boolean | ((total: number, range: [number, number]) => string); } export type XyListRowKey = string | ((item: unknown, index: number) => string | number); export type XyListSemanticDom = "content" | "empty" | "footer" | "header" | "items" | "loadMore" | "pagination" | "root"; export interface XyListSemanticProps { bordered: boolean; grid: boolean; itemLayout: XyListItemLayout; loading: boolean; pagination: boolean; size: XyListResolvedSize; split: boolean; } export type XyListClassNames = XySemanticClassNames; export type XyListStyles = XySemanticStyles; export interface XyListProps { bordered?: boolean; classNames?: XyListClassNames; dataSource?: unknown[]; footer?: VNodeChild | string; grid?: XyListGrid; header?: VNodeChild | string; itemLayout?: XyListItemLayout; loading?: boolean; loadMore?: VNodeChild | string; locale?: XyListLocale; pagination?: boolean | XyListPagination; rowKey?: XyListRowKey; size?: XyListSize; split?: boolean; styles?: XyListStyles; } export interface XyListSlots { default?: (...args: any[]) => VNodeChild; empty?: () => VNodeChild; footer?: () => VNodeChild; header?: () => VNodeChild; loadMore?: () => VNodeChild; } export type XyListItemSemanticDom = "actions" | "extra" | "main" | "root"; export interface XyListItemSemanticProps { hasActions: boolean; hasExtra: boolean; itemLayout: XyListItemLayout; } export type XyListItemClassNames = XySemanticClassNames; export type XyListItemStyles = XySemanticStyles; export interface XyListItemProps { actions?: VNodeChild[]; classNames?: XyListItemClassNames; extra?: VNodeChild | string; styles?: XyListItemStyles; } export interface XyListItemSlots { actions?: () => VNodeChild; default?: () => VNodeChild; extra?: () => VNodeChild; } export type XyListItemMetaSemanticDom = "avatar" | "content" | "description" | "root" | "title"; export interface XyListItemMetaSemanticProps { hasAvatar: boolean; hasDescription: boolean; hasTitle: boolean; } export type XyListItemMetaClassNames = XySemanticClassNames; export type XyListItemMetaStyles = XySemanticStyles; export interface XyListItemMetaProps { avatar?: VNodeChild | string; classNames?: XyListItemMetaClassNames; description?: VNodeChild | string; styles?: XyListItemMetaStyles; title?: VNodeChild | string; } export interface XyListItemMetaSlots { avatar?: () => VNodeChild; default?: () => VNodeChild; description?: () => VNodeChild; title?: () => VNodeChild; } export type XyListItemMetaStyle = CSSProperties;