UNPKG

@sandlada/mdc

Version:

@sandlada/mdc is an open source component library that follows the Material Design 3 design specifications.

80 lines 3.06 kB
/** * @license * Copyright 2026 Kai-Orion & Sandlada * SPDX-License-Identifier: MIT */ import { LitElement, type PropertyValues, type TemplateResult } from 'lit'; import { createValidator, getValidityAnchor } from '../../utils/behaviors/constraint-validation'; import { CheckboxValidator } from '../../utils/behaviors/validators/checkbox-validator'; import { getFormState, getFormValue } from '../../utils/form/form-associated'; import type { ICheckbox } from './checkbox.interface'; declare global { interface HTMLElementTagNameMap { "mdc-checkbox": MDCCheckbox; } } declare const MDCCheckbox_base: Omit<typeof LitElement, "prototype"> & (new () => LitElement & object & import("../../utils/behaviors/constraint-validation").ConstraintValidation & import("../../utils/form/form-associated").FormAssociated & import("../../utils/behaviors/element-internals").WithElementInternals & import("../ripple/ripple-options.mixin").IMixinRippleOptions & import("../ripple/ripple-options.mixin").IMixinRippleAttributes & import("../focus-ring/focus-ring-options.mixin").IMixinFocusRingOption); /** * * * * @version "Material Design 3" * * @link * https://m3.material.io/components/checkbox/overview */ export declare class MDCCheckbox extends MDCCheckbox_base implements ICheckbox { static styles: import("lit").CSSResult; static shadowRootOptions: ShadowRootInit; disabled: boolean; name: string; checked: boolean; indeterminate: boolean; tristate: boolean; required: boolean; value: string; private prevChecked; private prevDisabled; private prevIndeterminate; private readonly inputElement; get focusRingControl(): HTMLElement | null; get rippleControl(): HTMLElement | null; focusRingShapeInherit: boolean; focus(): void; blur(): void; constructor(); connectedCallback(): void; protected update(changedProperties: PropertyValues<this>): void; protected getRenderClasses(): { container: boolean; disabled: boolean; selected: boolean; unselected: boolean; checked: boolean; indeterminate: boolean; 'prev-unselected': boolean; 'prev-checked': boolean; 'prev-indeterminate': boolean; 'prev-disabled': boolean; }; protected render(): TemplateResult; private renderInput; private readonly handleHostClick; private readonly handleInputClick; private readonly handleInput; private readonly handleChange; /** * Flutter's `tristate` cycle: unchecked → checked → indeterminate → * unchecked. See `ToggleableStateMixin._handleValueChanged` in * packages/flutter/lib/src/material/checkbox.dart. */ private cycleTristate; [getFormValue](): string | null; [getFormState](): string; formResetCallback(): void; formStateRestoreCallback(state: string): void; [createValidator](): CheckboxValidator; [getValidityAnchor](): HTMLInputElement | null; } export {}; //# sourceMappingURL=checkbox.d.ts.map