Favivon - Correção

This commit is contained in:
2026-05-30 19:59:39 -03:00
parent 76ddaa815d
commit d7dfd221f0
32859 changed files with 5459654 additions and 404 deletions
+12
View File
@@ -0,0 +1,12 @@
export * from "./labelDayButton.js";
export * from "./labelGrid.js";
export * from "./labelGrid.js";
export * from "./labelGridcell.js";
export * from "./labelMonthDropdown.js";
export * from "./labelNav.js";
export * from "./labelNext.js";
export * from "./labelPrevious.js";
export * from "./labelWeekday.js";
export * from "./labelWeekNumber.js";
export * from "./labelWeekNumberHeader.js";
export * from "./labelYearDropdown.js";
+12
View File
@@ -0,0 +1,12 @@
export * from "./labelDayButton.js";
export * from "./labelGrid.js";
export * from "./labelGrid.js";
export * from "./labelGridcell.js";
export * from "./labelMonthDropdown.js";
export * from "./labelNav.js";
export * from "./labelNext.js";
export * from "./labelPrevious.js";
export * from "./labelWeekday.js";
export * from "./labelWeekNumber.js";
export * from "./labelWeekNumberHeader.js";
export * from "./labelYearDropdown.js";
+23
View File
@@ -0,0 +1,23 @@
import { DateLib, type DateLibOptions } from "../classes/DateLib.js";
import type { Modifiers } from "../types/index.js";
/**
* Generates the ARIA label for a day button.
*
* Use the `modifiers` argument to provide additional context for the label,
* such as indicating if the day is "today" or "selected."
*
* @defaultValue The formatted date.
* @param date - The date to format.
* @param modifiers - The modifiers providing context for the day.
* @param options - Optional configuration for the date formatting library.
* @param dateLib - An optional instance of the date formatting library.
* @returns The ARIA label for the day button.
* @group Labels
* @see https://daypicker.dev/docs/translation#aria-labels
*/
export declare function labelDayButton(date: Date, modifiers: Modifiers, options?: DateLibOptions, dateLib?: DateLib): string;
/**
* @ignore
* @deprecated Use `labelDayButton` instead.
*/
export declare const labelDay: typeof labelDayButton;
+29
View File
@@ -0,0 +1,29 @@
import { DateLib } from "../classes/DateLib.js";
/**
* Generates the ARIA label for a day button.
*
* Use the `modifiers` argument to provide additional context for the label,
* such as indicating if the day is "today" or "selected."
*
* @defaultValue The formatted date.
* @param date - The date to format.
* @param modifiers - The modifiers providing context for the day.
* @param options - Optional configuration for the date formatting library.
* @param dateLib - An optional instance of the date formatting library.
* @returns The ARIA label for the day button.
* @group Labels
* @see https://daypicker.dev/docs/translation#aria-labels
*/
export function labelDayButton(date, modifiers, options, dateLib) {
let label = (dateLib ?? new DateLib(options)).format(date, "PPPP");
if (modifiers.today)
label = `Today, ${label}`;
if (modifiers.selected)
label = `${label}, selected`;
return label;
}
/**
* @ignore
* @deprecated Use `labelDayButton` instead.
*/
export const labelDay = labelDayButton;
+19
View File
@@ -0,0 +1,19 @@
import { DateLib, type DateLibOptions } from "../classes/DateLib.js";
/**
* Generates the ARIA label for the month grid, which is announced when entering
* the grid.
*
* @defaultValue Locale-specific month/year order (e.g., "November 2022").
* @param date - The date representing the month.
* @param options - Optional configuration for the date formatting library.
* @param dateLib - An optional instance of the date formatting library.
* @returns The ARIA label for the month grid.
* @group Labels
* @see https://daypicker.dev/docs/translation#aria-labels
*/
export declare function labelGrid(date: Date, options?: DateLibOptions, dateLib?: DateLib): string;
/**
* @ignore
* @deprecated Use {@link labelGrid} instead.
*/
export declare const labelCaption: typeof labelGrid;
+22
View File
@@ -0,0 +1,22 @@
import { DateLib } from "../classes/DateLib.js";
/**
* Generates the ARIA label for the month grid, which is announced when entering
* the grid.
*
* @defaultValue Locale-specific month/year order (e.g., "November 2022").
* @param date - The date representing the month.
* @param options - Optional configuration for the date formatting library.
* @param dateLib - An optional instance of the date formatting library.
* @returns The ARIA label for the month grid.
* @group Labels
* @see https://daypicker.dev/docs/translation#aria-labels
*/
export function labelGrid(date, options, dateLib) {
const lib = dateLib ?? new DateLib(options);
return lib.formatMonthYear(date);
}
/**
* @ignore
* @deprecated Use {@link labelGrid} instead.
*/
export const labelCaption = labelGrid;
+14
View File
@@ -0,0 +1,14 @@
import { DateLib, type DateLibOptions } from "../classes/DateLib.js";
import type { Modifiers } from "../types/index.js";
/**
* Generates the label for a day grid cell when the calendar is not interactive.
*
* @param date - The date to format.
* @param modifiers - Optional modifiers providing context for the day.
* @param options - Optional configuration for the date formatting library.
* @param dateLib - An optional instance of the date formatting library.
* @returns The label for the day grid cell.
* @group Labels
* @see https://daypicker.dev/docs/translation#aria-labels
*/
export declare function labelGridcell(date: Date, modifiers?: Modifiers, options?: DateLibOptions, dateLib?: DateLib): string;
+19
View File
@@ -0,0 +1,19 @@
import { DateLib } from "../classes/DateLib.js";
/**
* Generates the label for a day grid cell when the calendar is not interactive.
*
* @param date - The date to format.
* @param modifiers - Optional modifiers providing context for the day.
* @param options - Optional configuration for the date formatting library.
* @param dateLib - An optional instance of the date formatting library.
* @returns The label for the day grid cell.
* @group Labels
* @see https://daypicker.dev/docs/translation#aria-labels
*/
export function labelGridcell(date, modifiers, options, dateLib) {
let label = (dateLib ?? new DateLib(options)).format(date, "PPPP");
if (modifiers?.today) {
label = `Today, ${label}`;
}
return label;
}
+11
View File
@@ -0,0 +1,11 @@
import type { DateLibOptions } from "../classes/DateLib.js";
/**
* Generates the ARIA label for the months dropdown.
*
* @defaultValue `"Choose the Month"`
* @param options - Optional configuration for the date formatting library.
* @returns The ARIA label for the months dropdown.
* @group Labels
* @see https://daypicker.dev/docs/translation#aria-labels
*/
export declare function labelMonthDropdown(_options?: DateLibOptions): string;
+12
View File
@@ -0,0 +1,12 @@
/**
* Generates the ARIA label for the months dropdown.
*
* @defaultValue `"Choose the Month"`
* @param options - Optional configuration for the date formatting library.
* @returns The ARIA label for the months dropdown.
* @group Labels
* @see https://daypicker.dev/docs/translation#aria-labels
*/
export function labelMonthDropdown(_options) {
return "Choose the Month";
}
+9
View File
@@ -0,0 +1,9 @@
/**
* Generates the ARIA label for the navigation toolbar.
*
* @defaultValue `""`
* @returns The ARIA label for the navigation toolbar.
* @group Labels
* @see https://daypicker.dev/docs/translation#aria-labels
*/
export declare function labelNav(): string;
+11
View File
@@ -0,0 +1,11 @@
/**
* Generates the ARIA label for the navigation toolbar.
*
* @defaultValue `""`
* @returns The ARIA label for the navigation toolbar.
* @group Labels
* @see https://daypicker.dev/docs/translation#aria-labels
*/
export function labelNav() {
return "";
}
+12
View File
@@ -0,0 +1,12 @@
import type { DateLibOptions } from "../classes/DateLib.js";
/**
* Generates the ARIA label for the "next month" button.
*
* @defaultValue `"Go to the Next Month"`
* @param month - The date representing the next month, or `undefined` if there
* is no next month.
* @returns The ARIA label for the "next month" button.
* @group Labels
* @see https://daypicker.dev/docs/translation#aria-labels
*/
export declare function labelNext(_month: Date | undefined, _options?: DateLibOptions): string;
+14
View File
@@ -0,0 +1,14 @@
const defaultLabel = "Go to the Next Month";
/**
* Generates the ARIA label for the "next month" button.
*
* @defaultValue `"Go to the Next Month"`
* @param month - The date representing the next month, or `undefined` if there
* is no next month.
* @returns The ARIA label for the "next month" button.
* @group Labels
* @see https://daypicker.dev/docs/translation#aria-labels
*/
export function labelNext(_month, _options) {
return defaultLabel;
}
+11
View File
@@ -0,0 +1,11 @@
/**
* Generates the ARIA label for the "previous month" button.
*
* @defaultValue `"Go to the Previous Month"`
* @param month - The date representing the previous month, or `undefined` if
* there is no previous month.
* @returns The ARIA label for the "previous month" button.
* @group Labels
* @see https://daypicker.dev/docs/translation#aria-labels
*/
export declare function labelPrevious(_month: Date | undefined): string;
+13
View File
@@ -0,0 +1,13 @@
/**
* Generates the ARIA label for the "previous month" button.
*
* @defaultValue `"Go to the Previous Month"`
* @param month - The date representing the previous month, or `undefined` if
* there is no previous month.
* @returns The ARIA label for the "previous month" button.
* @group Labels
* @see https://daypicker.dev/docs/translation#aria-labels
*/
export function labelPrevious(_month) {
return "Go to the Previous Month";
}
+12
View File
@@ -0,0 +1,12 @@
import type { DateLibOptions } from "../classes/DateLib.js";
/**
* Generates the ARIA label for the week number cell (the first cell in a row).
*
* @defaultValue `Week ${weekNumber}`
* @param weekNumber - The number of the week.
* @param options - Optional configuration for the date formatting library.
* @returns The ARIA label for the week number cell.
* @group Labels
* @see https://daypicker.dev/docs/translation#aria-labels
*/
export declare function labelWeekNumber(weekNumber: number, _options?: DateLibOptions): string;
+13
View File
@@ -0,0 +1,13 @@
/**
* Generates the ARIA label for the week number cell (the first cell in a row).
*
* @defaultValue `Week ${weekNumber}`
* @param weekNumber - The number of the week.
* @param options - Optional configuration for the date formatting library.
* @returns The ARIA label for the week number cell.
* @group Labels
* @see https://daypicker.dev/docs/translation#aria-labels
*/
export function labelWeekNumber(weekNumber, _options) {
return `Week ${weekNumber}`;
}
@@ -0,0 +1,11 @@
import type { DateLibOptions } from "../classes/DateLib.js";
/**
* Generates the ARIA label for the week number header element.
*
* @defaultValue `"Week Number"`
* @param options - Optional configuration for the date formatting library.
* @returns The ARIA label for the week number header.
* @group Labels
* @see https://daypicker.dev/docs/translation#aria-labels
*/
export declare function labelWeekNumberHeader(_options?: DateLibOptions): string;
+12
View File
@@ -0,0 +1,12 @@
/**
* Generates the ARIA label for the week number header element.
*
* @defaultValue `"Week Number"`
* @param options - Optional configuration for the date formatting library.
* @returns The ARIA label for the week number header.
* @group Labels
* @see https://daypicker.dev/docs/translation#aria-labels
*/
export function labelWeekNumberHeader(_options) {
return "Week Number";
}
+13
View File
@@ -0,0 +1,13 @@
import { DateLib, type DateLibOptions } from "../classes/DateLib.js";
/**
* Generates the ARIA label for a weekday column header.
*
* @defaultValue `"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"`
* @param date - The date representing the weekday.
* @param options - Optional configuration for the date formatting library.
* @param dateLib - An optional instance of the date formatting library.
* @returns The ARIA label for the weekday column header.
* @group Labels
* @see https://daypicker.dev/docs/translation#aria-labels
*/
export declare function labelWeekday(date: Date, options?: DateLibOptions, dateLib?: DateLib): string;
+15
View File
@@ -0,0 +1,15 @@
import { DateLib } from "../classes/DateLib.js";
/**
* Generates the ARIA label for a weekday column header.
*
* @defaultValue `"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"`
* @param date - The date representing the weekday.
* @param options - Optional configuration for the date formatting library.
* @param dateLib - An optional instance of the date formatting library.
* @returns The ARIA label for the weekday column header.
* @group Labels
* @see https://daypicker.dev/docs/translation#aria-labels
*/
export function labelWeekday(date, options, dateLib) {
return (dateLib ?? new DateLib(options)).format(date, "cccc");
}
+11
View File
@@ -0,0 +1,11 @@
import type { DateLibOptions } from "../classes/DateLib.js";
/**
* Generates the ARIA label for the years dropdown.
*
* @defaultValue `"Choose the Year"`
* @param options - Optional configuration for the date formatting library.
* @returns The ARIA label for the years dropdown.
* @group Labels
* @see https://daypicker.dev/docs/translation#aria-labels
*/
export declare function labelYearDropdown(_options?: DateLibOptions): string;
+12
View File
@@ -0,0 +1,12 @@
/**
* Generates the ARIA label for the years dropdown.
*
* @defaultValue `"Choose the Year"`
* @param options - Optional configuration for the date formatting library.
* @returns The ARIA label for the years dropdown.
* @group Labels
* @see https://daypicker.dev/docs/translation#aria-labels
*/
export function labelYearDropdown(_options) {
return "Choose the Year";
}