rating.d.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. import { LitElement } from 'lit';
  2. import { EventEmitter } from '../../internal/decorators';
  3. export default class SlRating extends LitElement {
  4. static styles: import("lit").CSSResult;
  5. rating: HTMLElement;
  6. private hoverValue;
  7. private isHovering;
  8. value: number;
  9. max: number;
  10. precision: number;
  11. readonly: boolean;
  12. disabled: boolean;
  13. getSymbol: (value?: number | undefined) => string;
  14. slChange: EventEmitter<void>;
  15. focus(options?: FocusOptions): void;
  16. blur(): void;
  17. connectedCallback(): void;
  18. disconnectedCallback(): void;
  19. getValueFromMousePosition(event: MouseEvent): number;
  20. getValueFromTouchPosition(event: TouchEvent): number;
  21. getValueFromXCoordinate(coordinate: number): number;
  22. handleClick(event: MouseEvent): void;
  23. setValue(newValue: number): void;
  24. handleKeyDown(event: KeyboardEvent): void;
  25. handleMouseEnter(): void;
  26. handleMouseMove(event: MouseEvent): void;
  27. handleMouseLeave(): void;
  28. handleTouchStart(event: TouchEvent): void;
  29. handleTouchMove(event: TouchEvent): void;
  30. handleTouchEnd(event: TouchEvent): void;
  31. handleValueChange(): void;
  32. roundToPrecision(numberToRound: number, precision?: number): number;
  33. render(): import("lit-html").TemplateResult<1>;
  34. }
  35. declare global {
  36. interface HTMLElementTagNameMap {
  37. 'sl-rating': SlRating;
  38. }
  39. }