vira
Version:
A simple and highly versatile design system using element-vir.
31 lines (30 loc) • 1.08 kB
TypeScript
import { type PopUpManager, type ShowPopUpResult } from '../../util/pop-up-manager.js';
import { type MenuItem } from './pop-up-menu-item.js';
/**
* Verifies that all items have unique ids.
*
* @category Internal
*/
export declare function assertUniqueIdProps(items: ReadonlyArray<Readonly<{
id: PropertyKey;
}>>): void;
/**
* Creates a new array of selections based on the current selection and new selection id. This
* behaves differently when multi select is enabled, hence this function.
*
* @category Internal
*/
export declare function updateSelectedItems(
/** The item that should be newly toggled. */
newItem: Readonly<MenuItem>, currentSelection?: ReadonlyArray<PropertyKey>, isMultiSelect?: boolean): PropertyKey[];
/**
* Handles toggling pop up state for `ViraDropdown`.
*
* @category Internal
*/
export declare function triggerPopUpState({ open, callback, popUpManager, host, }: {
open: boolean;
popUpManager: PopUpManager;
host: HTMLElement;
callback?: ((showPopUpResult: ShowPopUpResult | undefined) => void) | undefined;
}): void;