@sandlada/mdc
Version:
@sandlada/mdc is an open source component library that follows the Material Design 3 design specifications.
60 lines • 2.52 kB
TypeScript
/**
* @license
* Copyright 2025 Kai-Orion & Sandlada
* SPDX-License-Identifier: MIT
*/
import { type PropertyValues } from "lit";
import { createValidator, getValidityAnchor } from '../../utils/behaviors/constraint-validation';
import { CheckboxValidator } from '../../utils/behaviors/validators/checkbox-validator';
import { RadioValidator } from '../../utils/behaviors/validators/radio-validator';
import { SelectionController } from '../../utils/controller/selection-controller';
import { getFormState, getFormValue } from '../../utils/form/form-associated';
import { BaseButton } from './internal/base-button';
declare global {
interface HTMLElementTagNameMap {
'mdc-toggle-button': MDCTogglableButton;
}
}
declare const MDCTogglableButton_base: Omit<typeof BaseButton, "prototype"> & (new () => BaseButton & import("../../utils/behaviors/constraint-validation").ConstraintValidation & import("lit").LitElement & import("../../utils/form/form-associated").FormAssociated & import("../../utils/behaviors/element-internals").WithElementInternals);
/**
* `mdc-toggle-button variant="text"` is not supported by M3 Expressive.
*
* @version
* Material Design 3 - Expressive
*
* @link
* https://m3.material.io/components/buttons/overview
* https://www.figma.com/design/4GM7ohCF2Qtjzs7Fra6jlp/Material-3-Design-Kit--Community-?node-id=57994-2328&t=kLfic7eA8vKtkiiO-0
*/
export declare class MDCTogglableButton extends MDCTogglableButton_base {
static shadowRootOptions: ShadowRootInit;
disabled: boolean;
name: string;
type: 'radio' | 'checkbox';
value: 'on' | (string & {});
required: boolean;
variant: 'filled' | 'filled-tonal' | 'elevated' | 'outlined';
checked: boolean;
protected readonly selectionController: SelectionController;
constructor();
connectedCallback(): void;
protected willUpdate(changedProperties: PropertyValues<this>): void;
protected getRenderClasses(): {
container: boolean;
'has-icon': boolean;
'has-label': boolean;
'disable-morph': boolean;
disabled: boolean;
togglable: boolean;
selected: boolean;
unselected: boolean;
};
[getFormValue](): "on" | (string & {}) | null;
[getFormState](): string;
formResetCallback(): void;
formStateRestoreCallback(state: string): void;
[createValidator](): CheckboxValidator | RadioValidator;
[getValidityAnchor](): HTMLElement | null;
}
export {};
//# sourceMappingURL=toggle-button.d.ts.map