Core utilities and base functionality for PrimeVue UI component library
52
Quality
Pending
Does it follow best practices?
Impact
52%
1.15xAverage score across 10 eval scenarios
Build a small UI module that mounts a date selection control and a paginated list into a provided DOM element. All visible text and accessibility labels for these controls must come from the UI dependency's global localization and accessibility configuration, with runtime switching between English and Spanish.
@generates
export type SupportedLocale = 'en' | 'es';
export interface LocaleBundle {
name: SupportedLocale;
calendarLabels: {
monthNames: string[];
dayNamesShort: string[];
today: string;
};
paginationLabels: {
previous: string;
next: string;
pageLabel: (page: number) => string;
};
accessibility?: {
close?: string;
nextPage?: string;
previousPage?: string;
};
}
export interface SetupOptions {
target: HTMLElement;
defaultLocale?: SupportedLocale;
overrides?: {
accessibility?: {
close?: string;
nextPage?: string;
previousPage?: string;
};
};
items: string[];
pageSize: number;
}
export interface LocalizationRuntime {
currentLocale: SupportedLocale;
switchLocale(next: SupportedLocale): void;
formatDate(date: Date): string;
formatPagination(page: number): string;
}
export function createLocalizedUi(locales: LocaleBundle[], options: SetupOptions): LocalizationRuntime;Provides UI components with built-in localization and accessibility configuration.
Install with Tessl CLI
npx tessl i tessl/npm-primevue--coreevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10