/** * TyCalendar Web Component — orchestrates ty-calendar-navigation + * ty-calendar-month: owns selection state, distributes properties to the * children, and participates in forms via ElementInternals. */ import './calendar-month.js'; import './calendar-navigation.js'; import type { DayContentFn, CalendarSize } from './calendar-month.js'; import { type DayContext } from '../utils/calendar-utils.js'; /** * Calendar change event detail (day selection) */ export interface CalendarChangeDetail { year: number; month: number; day: number; action: 'select'; source: 'day-click'; dayContext: DayContext; } /** * Calendar navigate event detail (month/year change) */ export interface CalendarNavigateDetail { month: number; year: number; action: 'navigate'; source: 'navigation'; } /** * TyCalendar Web Component */ export declare class TyCalendar extends HTMLElement { private _state; private _hideNavigation; private _stateless; private _size; private _width?; private _dayContentFn?; private _customCSS?; private _min?; private _max?; private _flavor; private _navigation?; private _monthDisplay?; private _internals?; private _initialValue; private _localeObserver?; static formAssociated: boolean; static get observedAttributes(): string[]; constructor(); connectedCallback(): void; disconnectedCallback(): void; attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void; get min(): string | undefined; set min(value: string | undefined); get max(): string | undefined; set max(value: string | undefined); get flavor(): string; set flavor(value: string); get year(): number | undefined; set year(value: number | undefined); get month(): number | undefined; set month(value: number | undefined); get day(): number | undefined; set day(value: number | undefined); get locale(): string; set locale(value: string); get hideNavigation(): boolean; set hideNavigation(value: boolean); get stateless(): boolean; set stateless(value: boolean); get size(): CalendarSize; set size(value: CalendarSize); get width(): string | undefined; set width(value: string | undefined); get dayContentFn(): DayContentFn | undefined; set dayContentFn(fn: DayContentFn | undefined); get customCSS(): CSSStyleSheet | undefined; set customCSS(sheet: CSSStyleSheet | undefined); get value(): string; set value(isoDate: string); /** * Initialize state from HTML attributes on first load */ private initializeFromAttributes; formResetCallback(): void; private syncStateFromAttributes; private syncChildComponents; private updateFormValue; /** * Selection outside [min, max] => rangeUnderflow/rangeOverflow. * UI can't produce this (days are disabled), but programmatic values can. */ private updateValidity; private handleNavigationChange; private handleDayClick; /** * Force re-render of the calendar * Useful after updating dayContentFn or other dynamic properties */ refresh(): void; private createNavigation; private createMonthDisplay; private render; }