UNPKG

@public-ui/components

Version:

Contains all web components that belong to KoliBri - The accessible HTML-Standard.

26 lines (25 loc) 1.3 kB
import type { Events } from '../enums'; import type { EventValueOrEventCallback } from '../types/callbacks'; import type { Generic } from 'adopted-style-sheets'; import type { KoliBriSortDirection, KoliBriTableDataType } from '../types'; export type SortEventPayload = { key: string; currentSortDirection: KoliBriSortDirection; }; export type SelectionChangeEventPayload = string[] | string; export type StatefulSelectionChangeEventPayload = KoliBriTableDataType[] | KoliBriTableDataType | null; export type TableCallbacksPropType = { [Events.onSort]?: EventValueOrEventCallback<MouseEvent, SortEventPayload>; [Events.onSelectionChange]?: EventValueOrEventCallback<Event, SelectionChangeEventPayload>; }; export type TableStatefulCallbacksPropType = { [Events.onSelectionChange]?: EventValueOrEventCallback<Event, StatefulSelectionChangeEventPayload>; }; export type PropTableCallbacks = { on: TableCallbacksPropType; }; export type StatefulPropTableCallbacks = { on: TableStatefulCallbacksPropType; }; export declare const validateTableCallbacks: (component: Generic.Element.Component, value?: TableCallbacksPropType) => void; export declare const validateTableStatefulCallbacks: (component: Generic.Element.Component, value?: TableStatefulCallbacksPropType) => void;