UNPKG

@doku-dev/doku-fragment

Version:

A new Angular UI library that moving away from Bootstrap and built from scratch.

46 lines (45 loc) 1.68 kB
import { InjectionToken } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import * as i0 from "@angular/core"; export declare const DOKU_PILL_GROUP: InjectionToken<DokuPillGroup>; export declare class DokuPillGroup implements ControlValueAccessor { private _modelValue; protected get class(): { 'd-pill-group-attached': boolean; }; /** * Whether applying the default styles of the pill group. */ isAttached: boolean; /** * Whether multiple button toggles can be selected. * * @param value boolean | truthy and falsy string */ set multiple(value: boolean | string); get multiple(): boolean | string; private _multiple; /** * Value of toggle group. * Returns array in multiple-selection mode or single value in single-selection mode. */ get value(): string | string[] | undefined; set value(newValue: string | string[] | undefined); /** * * @param itemValue * @returns */ isChecked(itemValue: string): boolean; /** * Syncs a pill button checked state with the model value. */ syncValue(itemValue: string): void; _onChange?: (value: unknown) => void; _onTouched?: () => void; writeValue(value: string | string[]): void; registerOnChange(fn: (value: unknown) => void): void; registerOnTouched(fn: () => void): void; static ɵfac: i0.ɵɵFactoryDeclaration<DokuPillGroup, never>; static ɵcmp: i0.ɵɵComponentDeclaration<DokuPillGroup, "doku-pill-group", ["dokuPillGroup"], { "isAttached": "isAttached"; "multiple": "multiple"; "value": "value"; }, {}, never, ["*"], true>; }