UNPKG

@oslokommune/punkt-elements

Version:

Komponentbiblioteket til Punkt, et designsystem laget av Oslo Origo

17 lines (16 loc) 919 B
import type { ICalendarGridDimensions } from '../../shared-types/calendar'; export type { ICalendarGridDimensions, IGridCellPosition } from '../../shared-types/calendar'; export declare const DAYS_PER_WEEK = 7; export declare const MONDAY_OFFSET = 6; /** * Calculate the dimensions and structure of the calendar grid */ export declare function calculateCalendarDimensions(year: number, month: number): ICalendarGridDimensions; /** * Determine what type of cell to render at a given position */ export declare function getCellType(rowIndex: number, colIndex: number, dayCounter: number, gridDimensions: ICalendarGridDimensions): 'prev-month' | 'current-month' | 'next-month'; /** * Get the day number to display for a given cell */ export declare function getDayNumber(cellType: 'prev-month' | 'current-month' | 'next-month', colIndex: number, dayCounter: number, gridDimensions: ICalendarGridDimensions): number;