govbr-ds-angular
Version:
Implementação em Angular do Design System GovBR.
82 lines (81 loc) • 2.84 kB
TypeScript
import { EventEmitter } from '@angular/core';
import { SizeOptions } from '../../types/size.type';
import * as i0 from "@angular/core";
/**
* Componente SwitchComponent é responsável por exibir um interruptor com várias opções de configuração.
* @example
* <app-switch [label]="'Ativar'" [id]="'switch1'" [(ngModel)]="isActive"></app-switch>
*
* @public
* {@link https://www.gov.br/ds/components/switch?tab=desenvolvedor|Documentação oficial}
*/
export declare class SwitchComponent {
/**
* Rótulo do interruptor.
* @type {string}
* @required
*/
label: string;
/**
* ID do interruptor.
* @type {string}
* @required
*/
id: string;
/**
* Dica de uso quando o interruptor está ativo.
* @type {string}
*/
hintActive: string;
/**
* Dica de uso quando o interruptor está inativo.
* @type {string}
*/
hintInactive: string;
/**
* Tamanho do interruptor.
* @type {SizeOptions}
* @default 'medium'
*/
size: SizeOptions;
/**
* Indica se o interruptor deve exibir um ícone.
* @default false
*/
icon: boolean;
/**
* Indica se o interruptor está desabilitado.
* @default false
* @type {boolean}
*/
disabled: boolean;
/**
* Indica se o interruptor está marcado.
* @default false
* @type {boolean}
*/
checked: boolean;
/**
* Posição do interruptor.
* @type {'left' | 'right' | 'top'}
* @default 'left'
*/
position: 'left' | 'right' | 'top';
private _value;
/** Obtém o valor do interruptor. */
get value(): boolean;
/** Define o valor do interruptor. */
set value(val: boolean);
/** Evento emitido quando o valor do interruptor muda. */
valueChange: EventEmitter<boolean>;
/**
* Alterna o valor do interruptor.
* @internal
*/
toggle(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<SwitchComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SwitchComponent, "app-switch", never, { "label": { "alias": "label"; "required": true; }; "id": { "alias": "id"; "required": true; }; "hintActive": { "alias": "hintActive"; "required": false; }; "hintInactive": { "alias": "hintInactive"; "required": false; }; "size": { "alias": "size"; "required": false; }; "icon": { "alias": "showIcon"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "position": { "alias": "position"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
static ngAcceptInputType_icon: unknown;
static ngAcceptInputType_disabled: unknown;
static ngAcceptInputType_checked: unknown;
}