input.d.ts 2.2 KB

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