textarea.d.ts 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import { LitElement } from 'lit';
  2. import { EventEmitter } from '../../internal/decorators';
  3. export default class SlTextarea extends LitElement {
  4. static styles: import("lit").CSSResult;
  5. input: HTMLTextAreaElement;
  6. private inputId;
  7. private helpTextId;
  8. private labelId;
  9. private resizeObserver;
  10. private hasFocus;
  11. private hasHelpTextSlot;
  12. private hasLabelSlot;
  13. size: 'small' | 'medium' | 'large';
  14. name: string;
  15. value: string;
  16. label: string;
  17. helpText: string;
  18. placeholder: string;
  19. rows: number;
  20. resize: 'none' | 'vertical' | 'auto';
  21. disabled: boolean;
  22. readonly: boolean;
  23. minlength: number;
  24. maxlength: number;
  25. pattern: string;
  26. required: boolean;
  27. invalid: boolean;
  28. autocapitalize: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters' | 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';
  29. autocorrect: string;
  30. autocomplete: string;
  31. autofocus: boolean;
  32. spellcheck: boolean;
  33. inputmode: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
  34. slChange: EventEmitter<void>;
  35. slInput: EventEmitter<void>;
  36. slFocus: EventEmitter<void>;
  37. slBlur: EventEmitter<void>;
  38. connectedCallback(): void;
  39. disconnectedCallback(): void;
  40. focus(options?: FocusOptions): void;
  41. blur(): void;
  42. select(): void;
  43. scrollPosition(position?: {
  44. top?: number;
  45. left?: number;
  46. }): {
  47. top: number;
  48. left: number;
  49. } | undefined;
  50. setSelectionRange(selectionStart: number, selectionEnd: number, selectionDirection?: 'forward' | 'backward' | 'none'): void;
  51. setRangeText(replacement: string, start: number, end: number, selectMode?: 'select' | 'start' | 'end' | 'preserve'): void;
  52. reportValidity(): boolean;
  53. setCustomValidity(message: string): void;
  54. handleChange(): void;
  55. handleInput(): void;
  56. handleBlur(): void;
  57. handleFocus(): void;
  58. handleRowsChange(): void;
  59. handleSlotChange(): void;
  60. handleValueChange(): void;
  61. setTextareaHeight(): void;
  62. render(): import("lit-html").TemplateResult<1>;
  63. }
  64. declare global {
  65. interface HTMLElementTagNameMap {
  66. 'sl-textarea': SlTextarea;
  67. }
  68. }