UNPKG

compote-ui

Version:

An opinionated UI component library for Svelte, built on top of [Ark UI](https://ark-ui.com) with additional components and features not available in the core Ark UI library.

16 lines (15 loc) 531 B
import type { ListCollection, TreeCollection } from '@ark-ui/svelte/collection'; export interface ListItem<T = number | string> { value: T; label: string; disabled?: boolean; group?: string; } export interface TreeItem { value: number | string; label: string; disabled?: boolean; children?: TreeItem[]; } export declare function createListCollection<T extends ListItem>(items: T[]): ListCollection<T>; export declare function createTreeCollection<T extends TreeItem>(items: T[]): TreeCollection<T>;