/** * TyCalendarMonth Web Component * PORTED FROM: cljs/ty/components/calendar_month.cljs * * A stateless, property-driven calendar month renderer with customizable * day content and styling. * * Features: * - 42-day grid (6 weeks × 7 days) with Monday-first ordering * - Localized weekday headers * - Custom day content rendering via dayContentFn * - Custom day classes via dayClassesFn * - Custom CSS injection via customCSS * - Responsive width system (width, minWidth, maxWidth) * - Rich day-click events with full context * * @example * ```html * * * * * * * * ``` */ import { type DayContext } from '../utils/calendar-utils.js'; /** * Calendar size variants */ export type CalendarSize = 'sm' | 'md' | 'lg'; /** * Custom day content render function * Must return a DOM element or string */ export type DayContentFn = (dayContext: DayContext) => HTMLElement | string; /** * Day click event detail */ export interface DayClickDetail { dayContext: DayContext; value: number; year: number; month: number; day: number; isHoliday?: boolean; isToday?: boolean; isWeekend: boolean; isOtherMonth: boolean; } /** * TyCalendarMonth Web Component */ export declare class TyCalendarMonth extends HTMLElement { private _displayYear; private _displayMonth; private _locale; private _size; private _width?; private _minWidth?; private _maxWidth?; private _dayContentFn?; private _customCSS?; private _value?; private _localeObserver?; /** * Observed attributes (minimal - mainly for debugging) * Properties are the primary API */ static get observedAttributes(): string[]; constructor(); connectedCallback(): void; disconnectedCallback(): void; attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void; get displayYear(): number; set displayYear(value: number); get displayMonth(): number; set displayMonth(value: number); get locale(): string; set locale(value: string); get size(): CalendarSize; set size(value: CalendarSize); get width(): string | undefined; set width(value: string | undefined); get minWidth(): string | undefined; set minWidth(value: string | undefined); get maxWidth(): string | undefined; set maxWidth(value: string | undefined); get dayContentFn(): DayContentFn | undefined; set dayContentFn(fn: DayContentFn | undefined); get customCSS(): CSSStyleSheet | undefined; set customCSS(sheet: CSSStyleSheet | undefined); get value(): number | undefined; set value(timestamp: number | null | undefined); /** * Apply width-related properties as CSS custom properties */ private applyWidthProperties; /** * Apply custom CSS to shadow root */ private applyCustomCSS; /** * Force re-render of the calendar month * Useful when external data changes (e.g., async event loading) */ refresh(): void; /** * Dispatch day-click custom event with day context */ private dispatchDayClick; /** * Render a single day cell */ private renderDayCell; /** * Main render function - property-based approach */ private render; } //# sourceMappingURL=calendar-month.d.ts.map