select.d.ts 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import { LitElement, TemplateResult } from 'lit';
  2. import { EventEmitter } from '../../internal/decorators';
  3. import type SlDropdown from '../dropdown/dropdown';
  4. import type SlMenu from '../menu/menu';
  5. import type SlMenuItem from '../menu-item/menu-item';
  6. export default class SlSelect extends LitElement {
  7. static styles: import("lit").CSSResult;
  8. dropdown: SlDropdown;
  9. input: HTMLInputElement;
  10. menu: SlMenu;
  11. private inputId;
  12. private helpTextId;
  13. private labelId;
  14. private resizeObserver;
  15. private hasFocus;
  16. private hasHelpTextSlot;
  17. private hasLabelSlot;
  18. private isOpen;
  19. private displayLabel;
  20. private displayTags;
  21. multiple: boolean;
  22. maxTagsVisible: number;
  23. disabled: boolean;
  24. name: string;
  25. placeholder: string;
  26. size: 'small' | 'medium' | 'large';
  27. hoist: boolean;
  28. value: string | Array<string>;
  29. pill: boolean;
  30. label: string;
  31. helpText: string;
  32. required: boolean;
  33. clearable: boolean;
  34. invalid: boolean;
  35. slClear: EventEmitter<void>;
  36. slChange: EventEmitter<void>;
  37. slFocus: EventEmitter<void>;
  38. slBlur: EventEmitter<void>;
  39. connectedCallback(): void;
  40. disconnectedCallback(): void;
  41. reportValidity(): boolean;
  42. setCustomValidity(message: string): void;
  43. getItemLabel(item: SlMenuItem): string;
  44. getItems(): SlMenuItem[];
  45. getValueAsArray(): string[];
  46. handleBlur(): void;
  47. handleClearClick(event: MouseEvent): void;
  48. handleDisabledChange(): void;
  49. handleFocus(): void;
  50. handleKeyDown(event: KeyboardEvent): void;
  51. handleLabelClick(): void;
  52. handleMenuSelect(event: CustomEvent): void;
  53. handleMenuShow(): void;
  54. handleMenuHide(): void;
  55. handleMultipleChange(): void;
  56. handleSlotChange(): Promise<void>;
  57. handleTagInteraction(event: KeyboardEvent | MouseEvent): void;
  58. handleValueChange(): void;
  59. resizeMenu(): void;
  60. syncItemsFromValue(): void;
  61. syncValueFromItems(): void;
  62. render(): TemplateResult<1>;
  63. }
  64. declare global {
  65. interface HTMLElementTagNameMap {
  66. 'sl-select': SlSelect;
  67. }
  68. }