@redkhat/timepicker
Version:
This project contains a series of time selection components. The timepicker allows users to select a time from a clock-like interface. The timepicker is built using **Angular 19+** and **Angular Material 19+**.
43 lines (42 loc) • 1.32 kB
TypeScript
/**
* A class that implements the `Iterable` interface to generate coordinates for clock labels.
*
* @template T - The type of the labels.
*/
export declare class ClockIterable<T> implements Iterable<[T, number, number]> {
/**
* The labels to be positioned around the clock.
*/
private labels;
/**
* The radius of the clock.
*/
private radio;
/**
* The size of each label.
*/
private labelSize;
/**
* The inset distance from the edge of the clock.
*/
private inset;
/**
* The degrees between each label.
*/
private readonly degreesByNumber;
/**
* Creates an instance of ClockIterable.
*
* @param labels - An array of labels to be positioned around the clock [12, 1, 2, 3...].
* @param labelSize - The size of each label.
* @param diameter - The diameter of the clock.
* @param inset - The inset distance from the edge of the clock (default is 0).
*/
constructor(labels: T[], labelSize: number, diameter: number, inset?: number);
/**
* Returns an iterator that yields the label and its x, y coordinates.
*
* @returns An iterator that yields a tuple containing the label and its x, y coordinates.
*/
[Symbol.iterator](): Iterator<[T, number, number]>;
}