import { t as ModuleTheme } from "./module-theme-hGWXgqv4.cjs"; import { t as CalendarTime } from "./calendar-time-BhGHLeqY.cjs"; import { t as AnyCalendarValue } from "./public-value-51W5Yni3.cjs"; import { CSSProperties, ReactNode } from "react"; //#region src/core/view-navigation.d.ts /** * Pure gating for view navigation against the config `min`/`max` window. * Modules (toolbar prev/next, pickers) call these to disable controls instead * of letting a click silently bounce — same contract v2 had via * `checkYearNavigation`/`isYearFixed`, reduced to four small functions. */ type ViewNavUnit = "day" | "month" | "year"; //#endregion //#region src/modules/toolbar/CalendarToolbar.d.ts /** * Composable toolbar primitives (the v3 take on v2's `@dateforge/.../toolbar`): * small parts you arrange yourself rather than one monolithic navbar. Each part * pulls actions/state from the store, so any layout works — header, footer, * sidebar, a day-stepper, a two-month pair via `offset`. * * Conventions shared by every part: * - `col` places the part in a CSS-grid toolbar (same contract as modules). * - aria strings resolve module-prop → root `labels` → English default. * - navigation parts stay enabled under `readOnly` (browsing the view never * mutates the value — intentional break from v2); value-mutating parts * (Clear, Apply) are disabled instead. */ type WithClass = { className?: string; children?: ReactNode; }; type Bound = "from" | "to"; type CalendarToolbarProps = WithClass & { /** Number of equal grid columns, or a raw `grid-template-columns` string. */ cols?: number | string; /** Placement in the parent Calendar grid (same as other modules). */ col?: number | string; /** CSS justify-content for the toolbar row. */ justify?: CSSProperties["justifyContent"]; /** Accessible toolbar name (registry key `calendarNavigation`). */ label?: string; /** * Months ahead of the root view that this toolbar's parts display/label. * Pair with `` in multi-month layouts. */ offset?: number; /** * Span mode: every part inside displays and EDITS this range edge * (`"from"`/`"to"`) instead of the view — labels title the bound date, * prev/next/home/triggers commit via `setBoundDate` (the core owns * ordering/clamping). Pair with `` for a * split from/to layout. No effect on point selections. Per-part `bound` * overrides this (e.g. a from-label and to-label in one toolbar). */ bound?: Bound; /** * Per-module theme override: a built-in family name (`data-theme`) or a * `createTheme` token object (inline `--c-*` vars on the container). */ theme?: ModuleTheme; /** Per-module scheme override (`data-scheme` on the container). */ scheme?: "light" | "dark" | "auto"; }; /** Toolbar container. */ declare function CalendarToolbar({ cols, col, justify, label, offset, bound, theme, scheme, className, children }: CalendarToolbarProps): import("react/jsx-runtime").JSX.Element; /** Visual grouping of toolbar parts. */ declare function CalendarToolbarGroup({ grow, push, col, className, children }: WithClass & { grow?: boolean; /** * Pin the group to a toolbar edge (smart flex layout): `"end"` rides the * inline end ("actions right"), `"start"` the inline start — regardless of * what else shares the row. In `cols` grid mode the auto margin applies * WITHIN the group's own cell (prefer `col` placement there). */ push?: "start" | "end"; col?: number | string; }): import("react/jsx-runtime").JSX.Element; type StepProps = WithClass & { /** Navigate by whole days, months (default), or years. */ unit?: ViewNavUnit; /** * What a step moves. `"view"` (default) pages the calendar view by `unit`. * `"selection"` steps the SELECTED date itself by `unit` (a date spinner): * commits via `selectDay` and follows it into view, gated by `readOnly` and * min/max. Pair with ``. Single * (point) selection only; from today when nothing is selected yet. */ target?: "view" | "selection"; /** Accessible label override (else resolves from the label registry). */ label?: string; /** Edit this range edge instead of paging the view (overrides container). */ bound?: Bound; col?: number | string; }; /** Step the view backward. */ declare function CalendarToolbarPrev(props: StepProps): import("react/jsx-runtime").JSX.Element; /** Step the view forward. */ declare function CalendarToolbarNext(props: StepProps): import("react/jsx-runtime").JSX.Element; /** * Jump the view to today (disabled while today's month is already shown). In a * bound toolbar it resets THIS range edge to today instead — gated by readOnly, * the min/max window, and range ordering (the core is the final guard). */ declare function CalendarToolbarHome({ label, col, offset, bound, className, children }: WithClass & { label?: string; col?: number | string; offset?: number; bound?: Bound; }): import("react/jsx-runtime").JSX.Element; type LabelProps = WithClass & { /** Intl options override for the visible text. */ options?: Intl.DateTimeFormatOptions; col?: number | string; /** Months ahead of the toolbar's date (adds to the container offset). */ offset?: number; /** Title this range edge instead of the view (overrides the container). */ bound?: Bound; }; /** * Live "Month Year" toolbar title. Rendered as a heading (`aria-level`, * default 2) so screen-reader users can jump to the calendar's anchor point. * Pass `children` for a freeform title instead of the live one. * * Width-stable: invisible sizers hold every month's formatted value for the * displayed year (same Intl options), so stepping from "May" to "September" * never shifts the arrows around the label. */ declare function CalendarToolbarLabel({ options, level, col, offset, bound, className, children }: LabelProps & { level?: 1 | 2 | 3 | 4 | 5 | 6; }): import("react/jsx-runtime").JSX.Element; /** * Month-only label. Reserves the width of the locale's longest month name (the * v2 "sizer"), so stepping months never shifts the toolbar layout (CLS-free). */ declare function CalendarToolbarMonthLabel({ short, col, offset, bound, className }: WithClass & { short?: boolean; col?: number | string; offset?: number; bound?: Bound; }): import("react/jsx-runtime").JSX.Element; /** Year-only label. */ declare function CalendarToolbarYearLabel({ options, col, offset, bound, className }: LabelProps): import("react/jsx-runtime").JSX.Element; /** Day label — pairs with `unit="day"` prev/next for day-stepper toolbars. */ declare function CalendarToolbarDayLabel({ format, source, emptyText, col, offset, bound, className }: WithClass & { format?: "numeric" | "2-digit" | "long"; /** * Which date to show. `"view"` (default) = the toolbar's view day; * `"selection"` = the selected date (single/point), so a `target="selection"` * day stepper reads back the value it edits. When `"selection"` and nothing * is picked yet it shows `emptyText` instead of a misleading view date. */ source?: "view" | "selection"; /** Placeholder for `source="selection"` with no selection. Default `"—"`. */ emptyText?: string; col?: number | string; offset?: number; /** Show this range edge's day (with `source="view"`; overrides container). */ bound?: Bound; }): import("react/jsx-runtime").JSX.Element; type TriggerProps = WithClass & { /** Accessible label for the trigger button. */ label?: string; /** Icon-sized trigger: chevron + short text. */ compact?: boolean; /** * Edit this range edge (`"from"`/`"to"`) instead of the view: the trigger * shows the bound's month/year and picking commits via `setBoundDate` (the * core keeps the day in-month and owns ordering). Overrides the container * `bound`. No effect on point selections or before a range exists. */ bound?: Bound; col?: number | string; offset?: number; /** * Replace the popup body with custom content — e.g. a drum picker: * `picker={}` (wheels commit via `navigateTo` on * settle, so they work inside as-is). The wheel import is YOURS, so * grid-only consumers never bundle the drum physics. Default: the built-in * roving grid. */ picker?: ReactNode; /** * "Confirm" footer button under a custom `picker` (default true). COMMITS the * staged pick: a picker inside the popup mutates a draft (via * `PickerDraftContext`), and Confirm applies it to the view before closing and * refocusing the trigger — so spinning a wheel previews in the popup without * lurching the calendar until the user confirms. Registry key `confirm`. */ pickerConfirm?: boolean; /** aria-label override for the confirm footer button (visible = check icon). */ confirmLabel?: string; /** * "Now" reset in the custom-picker footer (default true): one row with * Confirm, STAGES the current month/year into the draft (registry keys * `resetMonth`/`resetYear`), disabled while already there. Applied on Confirm * like any other staged pick. Prefer this over the wheel's own `showReset` * inside a trigger — one footer row, no stack. */ pickerReset?: boolean; }; /** * Month trigger: a button showing the current month that opens a 12-cell month * picker (roving arrow-key grid; swap the body via `picker`). Picking a month * navigates the view and closes. Popup state lives in `UIContext` (adapter), * never the core reducer. */ declare function CalendarToolbarMonthTrigger({ label, compact, short, col, offset, bound, picker, pickerConfirm, confirmLabel, pickerReset, className }: TriggerProps & { /** * Force the localized SHORT month name ("Jun"). Independent of `compact` * (which only adds the chevron). Omit for the full name, which a too-narrow * toolbar auto-shortens anyway (`@container cal-toolbar`, v2 parity). */ short?: boolean; }): import("react/jsx-runtime").JSX.Element; /** * Year trigger: a button showing the current year that opens a paged year grid * (12/page). The pager re-anchors to the view year each time it opens, and the * pager buttons stop at the `min`/`max` window. */ declare function CalendarToolbarYearTrigger({ label, compact, col, offset, bound, picker, pickerConfirm, confirmLabel, pickerReset, className }: TriggerProps): import("react/jsx-runtime").JSX.Element; /** Clear the whole selection. Disabled when empty or readOnly. */ declare function CalendarToolbarClear({ label, col, className, children }: WithClass & { label?: string; col?: number | string; }): import("react/jsx-runtime").JSX.Element; /** * Hand the current public value (same shape as root `onChange`) to a host * callback — the "confirm" button of picker-in-popover UIs. Disabled when * nothing is selected or readOnly (override via `disabled`). */ declare function CalendarToolbarApply({ onApply, disabled, label, col, className, children }: WithClass & { onApply?: (value: AnyCalendarValue) => void; disabled?: boolean; label?: string; col?: number | string; }): import("react/jsx-runtime").JSX.Element; /** * Live wall-clock time, decorative (`aria-hidden` — assistive tech has the OS * clock). Ticks aligned to the minute (or second) boundary, so the interval * does no idle work between updates. */ declare function CalendarToolbarClock({ seconds, col, className }: WithClass & { seconds?: boolean; col?: number | string; }): import("react/jsx-runtime").JSX.Element; /** * Time trigger: a button showing the selected time that opens a time picker. * `compact` shows a clock icon instead of the text. The built-in popup is a * compact stepper UI; swap it for a drum via `picker={}` * (the wheel import stays on the consumer, like the month/year triggers). * `hour12` comes from the ROOT config so the display and any picker never * desync. Disabled until a date is selected — there is no time to edit yet. */ declare function CalendarToolbarTime({ compact, seconds, step, label, col, bound, className, picker, pickerConfirm, confirmLabel, onTimeSelect }: WithClass & { compact?: boolean; seconds?: boolean; step?: number; label?: string; col?: number | string; /** * Edit this range edge's time (`"from"`/`"to"`) instead of the from-time * default. Overrides the container `bound`. Span selections only. */ bound?: Bound; picker?: ReactNode; pickerConfirm?: boolean; confirmLabel?: string; onTimeSelect?: (time: CalendarTime) => void; }): import("react/jsx-runtime").JSX.Element; /** * Light/dark toggle. Flips the root `data-scheme` (resolving `"auto"` against * the OS on the first flip); `aria-pressed` reflects the resolved dark state. * Uncontrolled by default — under a controlled `` * the flip calls the host instead (see `Calendar`). */ declare function CalendarToolbarThemeToggle({ label, col, className, children }: WithClass & { label?: string; col?: number | string; }): import("react/jsx-runtime").JSX.Element; //#endregion export { CalendarToolbarYearTrigger as _, CalendarToolbarDayLabel as a, CalendarToolbarLabel as c, CalendarToolbarNext as d, CalendarToolbarPrev as f, CalendarToolbarYearLabel as g, CalendarToolbarTime as h, CalendarToolbarClock as i, CalendarToolbarMonthLabel as l, CalendarToolbarThemeToggle as m, CalendarToolbarApply as n, CalendarToolbarGroup as o, type CalendarToolbarProps as p, CalendarToolbarClear as r, CalendarToolbarHome as s, CalendarToolbar as t, CalendarToolbarMonthTrigger as u };