igniteui-webcomponents 5.0.0-rc.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/CHANGELOG.md +11 -14
  2. package/components/button/button-base.js.map +1 -1
  3. package/components/checkbox/checkbox-base.js.map +1 -1
  4. package/components/checkbox/checkbox.d.ts +3 -0
  5. package/components/checkbox/checkbox.js +23 -5
  6. package/components/checkbox/checkbox.js.map +1 -1
  7. package/components/checkbox/themes/shared/checkbox/checkbox.indigo.css.js +1 -1
  8. package/components/checkbox/themes/shared/checkbox/checkbox.indigo.css.js.map +1 -1
  9. package/components/combo/types.js.map +1 -1
  10. package/components/common/controllers/root-click.d.ts +2 -3
  11. package/components/common/controllers/root-click.js +3 -4
  12. package/components/common/controllers/root-click.js.map +1 -1
  13. package/components/common/mixins/combo-box.js +0 -4
  14. package/components/common/mixins/combo-box.js.map +1 -1
  15. package/components/common/mixins/form-associated.js +4 -4
  16. package/components/common/mixins/form-associated.js.map +1 -1
  17. package/components/icon/icon-references.js +42 -2
  18. package/components/icon/icon-references.js.map +1 -1
  19. package/components/icon/icon-state.broadcast.d.ts +1 -0
  20. package/components/icon/icon-state.broadcast.js +12 -1
  21. package/components/icon/icon-state.broadcast.js.map +1 -1
  22. package/components/icon/icon.registry.js +21 -11
  23. package/components/icon/icon.registry.js.map +1 -1
  24. package/components/icon/internal-icons-lib.js +62 -0
  25. package/components/icon/internal-icons-lib.js.map +1 -1
  26. package/components/input/input-base.js.map +1 -1
  27. package/components/input/input.js.map +1 -1
  28. package/components/progress/themes/circular/circular.progress.base.css.js +1 -1
  29. package/components/progress/themes/circular/circular.progress.base.css.js.map +1 -1
  30. package/components/progress/themes/circular/dark/circular.progress.bootstrap.css.js +1 -1
  31. package/components/progress/themes/circular/dark/circular.progress.bootstrap.css.js.map +1 -1
  32. package/components/progress/themes/circular/dark/circular.progress.fluent.css.js +1 -1
  33. package/components/progress/themes/circular/dark/circular.progress.fluent.css.js.map +1 -1
  34. package/components/progress/themes/circular/dark/circular.progress.indigo.css.js +1 -1
  35. package/components/progress/themes/circular/dark/circular.progress.indigo.css.js.map +1 -1
  36. package/components/progress/themes/circular/dark/circular.progress.material.css.js +1 -1
  37. package/components/progress/themes/circular/dark/circular.progress.material.css.js.map +1 -1
  38. package/components/progress/themes/circular/light/circular.progress.bootstrap.css.js +1 -1
  39. package/components/progress/themes/circular/light/circular.progress.bootstrap.css.js.map +1 -1
  40. package/components/progress/themes/circular/light/circular.progress.indigo.css.js +1 -1
  41. package/components/progress/themes/circular/light/circular.progress.indigo.css.js.map +1 -1
  42. package/components/progress/themes/circular/light/circular.progress.shared.css.js +1 -1
  43. package/components/progress/themes/circular/light/circular.progress.shared.css.js.map +1 -1
  44. package/components/progress/themes/circular/shared/circular.progress.bootstrap.css.js +1 -1
  45. package/components/progress/themes/circular/shared/circular.progress.bootstrap.css.js.map +1 -1
  46. package/components/progress/themes/circular/shared/circular.progress.common.css.js +1 -1
  47. package/components/progress/themes/circular/shared/circular.progress.common.css.js.map +1 -1
  48. package/components/progress/themes/circular/shared/circular.progress.fluent.css.js +1 -1
  49. package/components/progress/themes/circular/shared/circular.progress.fluent.css.js.map +1 -1
  50. package/components/progress/themes/circular/shared/circular.progress.indigo.css.js +1 -1
  51. package/components/progress/themes/circular/shared/circular.progress.indigo.css.js.map +1 -1
  52. package/components/progress/themes/linear/linear.progress.base.css.js +1 -1
  53. package/components/progress/themes/linear/linear.progress.base.css.js.map +1 -1
  54. package/components/progress/themes/linear/shared/linear.progress.bootstrap.css.js +1 -1
  55. package/components/progress/themes/linear/shared/linear.progress.bootstrap.css.js.map +1 -1
  56. package/components/progress/themes/linear/shared/linear.progress.common.css.js +1 -1
  57. package/components/progress/themes/linear/shared/linear.progress.common.css.js.map +1 -1
  58. package/components/progress/themes/linear/shared/linear.progress.fluent.css.js +1 -1
  59. package/components/progress/themes/linear/shared/linear.progress.fluent.css.js.map +1 -1
  60. package/components/progress/themes/linear/shared/linear.progress.indigo.css.js +1 -1
  61. package/components/progress/themes/linear/shared/linear.progress.indigo.css.js.map +1 -1
  62. package/components/radio/radio.d.ts +1 -0
  63. package/components/radio/radio.js +10 -3
  64. package/components/radio/radio.js.map +1 -1
  65. package/components/radio-group/radio-group.d.ts +1 -0
  66. package/components/radio-group/radio-group.js +6 -0
  67. package/components/radio-group/radio-group.js.map +1 -1
  68. package/components/select/select.js.map +1 -1
  69. package/components/textarea/textarea.js.map +1 -1
  70. package/custom-elements.json +211 -31
  71. package/index.d.ts +1 -1
  72. package/index.js.map +1 -1
  73. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"select.js","sourceRoot":"","sources":["../../../src/components/select/select.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EACL,QAAQ,EACR,KAAK,EACL,qBAAqB,EACrB,KAAK,GACN,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EACL,cAAc,EACd,MAAM,EACN,SAAS,EACT,SAAS,EACT,UAAU,EACV,OAAO,EACP,MAAM,EACN,QAAQ,EACR,SAAS,EACT,OAAO,EACP,QAAQ,EACR,MAAM,GACP,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,4BAA4B,EAAE,MAAM,sDAAsD,CAAC;AACpG,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EACL,4BAA4B,EAC5B,cAAc,EACd,QAAQ,EACR,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,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,EAAE,IAAI,EAAE,sBAAsB,EAAE,CAAC;6DACP;AAuBjD;IADC,QAAQ,EAAE;+CAGV;AAcM;IADN,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;oDACnB;AAOR;IADf,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;qDACQ;AAO7B;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDACP;AAOb;IADN,QAAQ,EAAE;iDACW;AAOf;IADN,QAAQ,EAAE;uDACiB;AAOrB;IADN,QAAQ,EAAE;qDACqC;AAOzC;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;0DACoB;AAsBrD;IADT,KAAK,CAAC,gBAAgB,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;+DAGvD;AAGS;IADT,KAAK,CAAC,MAAM,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;oDAI7C;AA7KkB,kBAAkB;IAJtC,MAAM,CAAC,GAAG,CAAC;IACX,4BAA4B,CAC3B,gHAAgH,CACjH;GACoB,kBAAkB,CAglBtC;eAhlBoB,kBAAkB","sourcesContent":["import { html } from 'lit';\nimport {\n property,\n query,\n queryAssignedElements,\n state,\n} from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\n\nimport { themes } from '../../theming/theming-decorator.js';\nimport {\n addKeybindings,\n altKey,\n arrowDown,\n arrowLeft,\n arrowRight,\n arrowUp,\n endKey,\n enterKey,\n escapeKey,\n homeKey,\n spaceBar,\n tabKey,\n} from '../common/controllers/key-bindings.js';\nimport { addRootScrollHandler } from '../common/controllers/root-scroll.js';\nimport { blazorAdditionalDependencies } from '../common/decorators/blazorAdditionalDependencies.js';\nimport { watch } from '../common/decorators/watch.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport {\n IgcBaseComboBoxLikeComponent,\n getActiveItems,\n getItems,\n getNextActiveItem,\n getPreviousActiveItem,\n setInitialSelectionState,\n} from '../common/mixins/combo-box.js';\nimport type { AbstractConstructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { FormAssociatedRequiredMixin } from '../common/mixins/form-associated-required.js';\nimport { findElementFromEventPath, partNameMap } from '../common/util.js';\nimport IgcIconComponent from '../icon/icon.js';\nimport IgcInputComponent from '../input/input.js';\nimport IgcPopoverComponent, { type IgcPlacement } from '../popover/popover.js';\nimport IgcSelectGroupComponent from './select-group.js';\nimport IgcSelectHeaderComponent from './select-header.js';\nimport IgcSelectItemComponent from './select-item.js';\nimport { styles } from './themes/select.base.css.js';\nimport { styles as shared } from './themes/shared/select.common.css.js';\nimport { all } from './themes/themes.js';\nimport { selectValidators } from './validators.js';\n\nexport interface IgcSelectEventMap {\n igcChange: CustomEvent<IgcSelectItemComponent>;\n // For analyzer meta only:\n focus: FocusEvent;\n blur: FocusEvent;\n igcOpening: CustomEvent<void>;\n igcOpened: CustomEvent<void>;\n igcClosing: CustomEvent<void>;\n igcClosed: CustomEvent<void>;\n}\n\n/**\n * Represents a control that provides a menu of options.\n *\n * @element igc-select\n *\n * @slot - Renders the list of select items.\n * @slot prefix - Renders content before the input.\n * @slot suffix - Renders content after input.\n * @slot header - Renders a container before the list of options.\n * @slot footer - Renders a container after the list of options.\n * @slot helper-text - Renders content below the input.\n * @slot toggle-icon - Renders content inside the suffix container.\n * @slot toggle-icon-expanded - Renders content for the toggle icon when the component is in open state.\n *\n * @fires igcChange - Emitted when the control's checked state changes.\n * @fires igcOpening - Emitted just before the list of options is opened.\n * @fires igcOpened - Emitted after the list of options is opened.\n * @fires igcClosing - Emitter just before the list of options is closed.\n * @fires igcClosed - Emitted after the list of options is closed.\n *\n * @csspart list - The list wrapping container for the items of the igc-select.\n * @csspart input - The encapsulated igc-input of the igc-select.\n * @csspart label - The encapsulated text label of the igc-select.\n * @csspart prefix - The prefix wrapper of the input of the igc-select.\n * @csspart suffix - The suffix wrapper of the input of the igc-select.\n * @csspart toggle-icon - The toggle icon wrapper of the igc-select.\n * @csspart helper-text - The helper text wrapper of the igc-select.\n */\n@themes(all)\n@blazorAdditionalDependencies(\n 'IgcIconComponent, IgcInputComponent, IgcSelectGroupComponent, IgcSelectHeaderComponent, IgcSelectItemComponent'\n)\nexport default class IgcSelectComponent extends FormAssociatedRequiredMixin(\n EventEmitterMixin<\n IgcSelectEventMap,\n AbstractConstructor<IgcBaseComboBoxLikeComponent>\n >(IgcBaseComboBoxLikeComponent)\n) {\n public static readonly tagName = 'igc-select';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register() {\n registerComponent(\n IgcSelectComponent,\n IgcIconComponent,\n IgcInputComponent,\n IgcPopoverComponent,\n IgcSelectGroupComponent,\n IgcSelectHeaderComponent,\n IgcSelectItemComponent\n );\n }\n\n private _value!: string;\n private _searchTerm = '';\n private _lastKeyTime = 0;\n\n private _rootScrollController = addRootScrollHandler(this, {\n hideCallback: this.handleClosing,\n });\n\n private get _activeItems() {\n return Array.from(\n getActiveItems<IgcSelectItemComponent>(\n this,\n IgcSelectItemComponent.tagName\n )\n );\n }\n\n @state()\n protected _selectedItem: IgcSelectItemComponent | null = null;\n\n @state()\n protected _activeItem!: IgcSelectItemComponent;\n\n protected override get __validators() {\n return selectValidators;\n }\n\n @query(IgcInputComponent.tagName, true)\n protected input!: IgcInputComponent;\n\n @queryAssignedElements({ slot: 'helper-text' })\n protected helperText!: Array<HTMLElement>;\n\n @queryAssignedElements({ slot: 'suffix' })\n protected inputSuffix!: Array<HTMLElement>;\n\n @queryAssignedElements({ slot: 'prefix' })\n protected inputPrefix!: Array<HTMLElement>;\n\n @queryAssignedElements({ slot: 'toggle-icon-expanded' })\n protected _expandedIconSlot!: Array<HTMLElement>;\n\n protected get hasExpandedIcon() {\n return this._expandedIconSlot.length > 0;\n }\n\n protected get hasPrefixes() {\n return this.inputPrefix.length > 0;\n }\n\n protected get hasSuffixes() {\n return this.inputSuffix.length > 0;\n }\n\n protected get hasHelperText() {\n return this.helperText.length > 0;\n }\n\n /**\n * The value attribute of the control.\n * @attr\n */\n @property()\n public get value(): string {\n return this._value;\n }\n\n /* @tsTwoWayProperty(true, \"igcChange\", \"detail.value\", false) */\n public set value(value: string) {\n this._updateValue(value);\n const item = this.getItem(this._value);\n item ? this.setSelectedItem(item) : this.clearSelectedItem();\n }\n\n /**\n * The outlined attribute of the control.\n * @attr\n */\n @property({ reflect: true, type: Boolean })\n public outlined = false;\n\n /**\n * The autofocus attribute of the control.\n * @attr\n */\n @property({ type: Boolean })\n public override autofocus!: boolean;\n\n /**\n * The distance of the select dropdown from its input.\n * @attr\n */\n @property({ type: Number })\n public distance = 0;\n\n /**\n * The label attribute of the control.\n * @attr\n */\n @property()\n public label!: string;\n\n /**\n * The placeholder attribute of the control.\n * @attr\n */\n @property()\n public placeholder!: string;\n\n /** The preferred placement of the select dropdown around its input.\n * @type {'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end'}\n * @attr\n */\n @property()\n public placement: IgcPlacement = 'bottom-start';\n\n /**\n * Determines the behavior of the component during scrolling of the parent container.\n * @attr scroll-strategy\n */\n @property({ attribute: 'scroll-strategy' })\n public scrollStrategy: 'scroll' | 'block' | 'close' = 'scroll';\n\n /** Returns the items of the igc-select component. */\n public get items() {\n return Array.from(\n getItems<IgcSelectItemComponent>(this, IgcSelectItemComponent.tagName)\n );\n }\n\n /** Returns the groups of the igc-select component. */\n public get groups() {\n return Array.from(\n getItems<IgcSelectGroupComponent>(this, IgcSelectGroupComponent.tagName)\n );\n }\n\n /** Returns the selected item from the dropdown or null. */\n public get selectedItem() {\n return this._selectedItem;\n }\n\n @watch('scrollStrategy', { waitUntilFirstUpdate: true })\n protected scrollStrategyChanged() {\n this._rootScrollController.update({ resetListeners: true });\n }\n\n @watch('open', { waitUntilFirstUpdate: true })\n protected openChange() {\n this._rootClickController.update();\n this._rootScrollController.update();\n }\n\n constructor() {\n super();\n\n this._rootClickController.update({ hideCallback: this.handleClosing });\n\n addKeybindings(this, {\n skip: () => this.disabled,\n bindingDefaults: { preventDefault: true, triggers: ['keydownRepeat'] },\n })\n .set([altKey, arrowDown], this.altArrowDown)\n .set([altKey, arrowUp], this.altArrowUp)\n .set(arrowDown, this.onArrowDown)\n .set(arrowUp, this.onArrowUp)\n .set(arrowLeft, this.onArrowUp)\n .set(arrowRight, this.onArrowDown)\n .set(tabKey, this.onTabKey, { preventDefault: false })\n .set(escapeKey, this.onEscapeKey)\n .set(homeKey, this.onHomeKey)\n .set(endKey, this.onEndKey)\n .set(spaceBar, this.onSpaceBarKey)\n .set(enterKey, this.onEnterKey);\n\n this.addEventListener('keydown', this.handleSearch);\n this.addEventListener('focusin', this.handleFocusIn);\n this.addEventListener('focusout', this.handleFocusOut);\n }\n\n protected override createRenderRoot() {\n const root = super.createRenderRoot();\n root.addEventListener('slotchange', () => this.requestUpdate());\n return root;\n }\n\n protected override async firstUpdated() {\n await this.updateComplete;\n const selected = setInitialSelectionState(this.items);\n\n if (this.value && !selected) {\n this._selectItem(this.getItem(this.value), false);\n }\n\n if (selected && selected.value !== this.value) {\n this._defaultValue = selected.value;\n this._selectItem(selected, false);\n }\n\n if (this.autofocus) {\n this.focus();\n }\n\n this.updateValidity();\n }\n\n private handleFocusIn({ relatedTarget }: FocusEvent) {\n this._dirty = true;\n\n if (this.contains(relatedTarget as Node) || this.open) {\n return;\n }\n }\n\n private handleFocusOut({ relatedTarget }: FocusEvent) {\n if (this.contains(relatedTarget as Node)) {\n return;\n }\n\n this.checkValidity();\n }\n\n private handleClick(event: MouseEvent) {\n const item = findElementFromEventPath<IgcSelectItemComponent>(\n IgcSelectItemComponent.tagName,\n event\n );\n if (item && this._activeItems.includes(item)) {\n this._selectItem(item);\n }\n }\n\n private handleChange(item: IgcSelectItemComponent) {\n return this.emitEvent('igcChange', { detail: item });\n }\n\n private handleSearch(event: KeyboardEvent) {\n if (!/^.$/u.test(event.key)) {\n return;\n }\n\n event.preventDefault();\n const now = Date.now();\n\n if (now - this._lastKeyTime > 500) {\n this._searchTerm = '';\n }\n\n this._lastKeyTime = now;\n this._searchTerm += event.key.toLocaleLowerCase();\n\n const item = this._activeItems.find((item) =>\n item.textContent?.trim().toLocaleLowerCase().startsWith(this._searchTerm)\n );\n\n if (item) {\n this.open ? this.activateItem(item) : this._selectItem(item);\n this._activeItem.focus();\n }\n }\n\n protected override handleAnchorClick(): void {\n super.handleAnchorClick();\n this.focusItemOnOpen();\n }\n\n private onEnterKey() {\n this.open && this._activeItem\n ? this._selectItem(this._activeItem)\n : this.handleAnchorClick();\n }\n\n private onSpaceBarKey() {\n if (!this.open) {\n this.handleAnchorClick();\n }\n }\n\n private onArrowDown() {\n const item = getNextActiveItem(this.items, this._activeItem);\n this.open ? this._navigateToActiveItem(item) : this._selectItem(item);\n }\n\n private onArrowUp() {\n const item = getPreviousActiveItem(this.items, this._activeItem);\n this.open ? this._navigateToActiveItem(item) : this._selectItem(item);\n }\n\n private altArrowDown() {\n if (!this.open) {\n this._show(true);\n this.focusItemOnOpen();\n }\n }\n\n private async altArrowUp() {\n if (this.open && (await this._hide(true))) {\n this.input.focus();\n }\n }\n\n protected async onEscapeKey() {\n if (await this._hide(true)) {\n this.input.focus();\n }\n }\n\n private onTabKey(event: KeyboardEvent) {\n if (this.open) {\n event.preventDefault();\n this._selectItem(this._activeItem);\n this._hide(true);\n }\n }\n\n protected onHomeKey() {\n const item = this._activeItems.at(0);\n this.open ? this._navigateToActiveItem(item) : this._selectItem(item);\n }\n\n protected onEndKey() {\n const item = this._activeItems.at(-1);\n this.open ? this._navigateToActiveItem(item) : this._selectItem(item);\n }\n\n protected handleClosing() {\n this._hide(true);\n }\n\n private activateItem(item: IgcSelectItemComponent) {\n if (this._activeItem) {\n this._activeItem.active = false;\n }\n\n this._activeItem = item;\n this._activeItem.active = true;\n }\n\n private setSelectedItem(item: IgcSelectItemComponent) {\n if (this._selectedItem) {\n this._selectedItem.selected = false;\n }\n\n this._selectedItem = item;\n this._selectedItem.selected = true;\n\n return this._selectedItem;\n }\n\n private _selectItem(item?: IgcSelectItemComponent, emit = true) {\n if (!item) {\n this.clearSelectedItem();\n this._updateValue();\n return null;\n }\n\n const items = this.items;\n const [previous, current] = [\n items.indexOf(this._selectedItem!),\n items.indexOf(item),\n ];\n\n if (previous === current) {\n return this._selectedItem;\n }\n\n const newItem = this.setSelectedItem(item);\n this.activateItem(newItem);\n this._updateValue(newItem.value);\n\n if (emit) this.handleChange(newItem);\n if (emit && this.open) this.input.focus();\n if (emit && !this.keepOpenOnSelect) this._hide(true);\n\n return this._selectedItem;\n }\n\n private _navigateToActiveItem(item?: IgcSelectItemComponent) {\n if (item) {\n this.activateItem(item);\n this._activeItem.focus({ preventScroll: true });\n item.scrollIntoView({ behavior: 'auto', block: 'nearest' });\n }\n }\n\n private _updateValue(value?: string) {\n this._value = value as string;\n this.setFormValue(this._value ? this._value : null);\n this.updateValidity();\n this.setInvalidState();\n }\n\n private clearSelectedItem() {\n if (this._selectedItem) {\n this._selectedItem.selected = false;\n }\n this._selectedItem = null;\n }\n\n private async focusItemOnOpen() {\n await this.updateComplete;\n (this._selectedItem || this._activeItem)?.focus();\n }\n\n protected getItem(value: string) {\n return this.items.find((item) => item.value === value);\n }\n\n /* alternateName: focusComponent */\n /** Sets focus on the component. */\n public override focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /* alternateName: blurComponent */\n /** Removes focus from the component. */\n public override blur() {\n this.input.blur();\n super.blur();\n }\n\n /** Checks the validity of the control and moves the focus to it if it is not valid. */\n public override reportValidity() {\n const valid = super.reportValidity();\n if (!valid) this.input.focus();\n return valid;\n }\n\n /* blazorSuppress */\n /** Navigates to the item with the specified value. If it exists, returns the found item, otherwise - null. */\n public navigateTo(value: string): IgcSelectItemComponent | null;\n /* blazorSuppress */\n /** Navigates to the item at the specified index. If it exists, returns the found item, otherwise - null. */\n public navigateTo(index: number): IgcSelectItemComponent | null;\n /* blazorSuppress */\n /** Navigates to the specified item. If it exists, returns the found item, otherwise - null. */\n public navigateTo(value: string | number): IgcSelectItemComponent | null {\n const item =\n typeof value === 'string' ? this.getItem(value) : this.items[value];\n\n if (item) {\n this._navigateToActiveItem(item);\n }\n\n return item ?? null;\n }\n\n /* blazorSuppress */\n /** Selects the item with the specified value. If it exists, returns the found item, otherwise - null. */\n public select(value: string): IgcSelectItemComponent | null;\n /* blazorSuppress */\n /** Selects the item at the specified index. If it exists, returns the found item, otherwise - null. */\n public select(index: number): IgcSelectItemComponent | null;\n /* blazorSuppress */\n /** Selects the specified item. If it exists, returns the found item, otherwise - null. */\n public select(value: string | number): IgcSelectItemComponent | null {\n const item =\n typeof value === 'string' ? this.getItem(value) : this.items[value];\n return item ? this._selectItem(item, false) : null;\n }\n\n /** Resets the current value and selection of the component. */\n public clearSelection() {\n this._updateValue();\n this.clearSelectedItem();\n }\n\n protected renderInputSlots() {\n const prefixName = this.hasPrefixes ? 'prefix' : '';\n const suffixName = this.hasSuffixes ? 'suffix' : '';\n\n return html`\n <span slot=${prefixName}>\n <slot name=\"prefix\"></slot>\n </span>\n\n <span slot=${suffixName}>\n <slot name=\"suffix\"></slot>\n </span>\n `;\n }\n\n protected renderToggleIcon() {\n const parts = partNameMap({ 'toggle-icon': true, filled: this.value! });\n const iconHidden = this.open && this.hasExpandedIcon;\n const iconExpandedHidden = !(this.hasExpandedIcon && this.open);\n\n return html`\n <span slot=\"suffix\" part=${parts} aria-hidden=\"true\">\n <slot name=\"toggle-icon\" ?hidden=${iconHidden}>\n <igc-icon\n name=${this.open ? 'input_collapse' : 'input_expand'}\n collection=\"default\"\n ></igc-icon>\n </slot>\n <slot name=\"toggle-icon-expanded\" ?hidden=${iconExpandedHidden}></slot>\n </span>\n `;\n }\n\n protected renderHelperText() {\n return html`\n <div\n id=\"helper-text\"\n part=\"helper-text\"\n slot=\"anchor\"\n ?hidden=${!this.hasHelperText}\n >\n <slot name=\"helper-text\"></slot>\n </div>\n `;\n }\n\n protected renderInputAnchor() {\n const value = this.selectedItem?.textContent?.trim();\n\n return html`\n <igc-input\n id=\"input\"\n slot=\"anchor\"\n role=\"combobox\"\n readonly\n aria-controls=\"dropdown\"\n aria-describedby=\"helper-text\"\n aria-expanded=${this.open ? 'true' : 'false'}\n exportparts=\"container: input, input: native-input, label, prefix, suffix\"\n tabIndex=${this.disabled ? -1 : 0}\n value=${ifDefined(value)}\n placeholder=${ifDefined(this.placeholder)}\n label=${ifDefined(this.label)}\n .disabled=${this.disabled}\n .required=${this.required}\n .invalid=${this.invalid}\n .outlined=${this.outlined}\n @click=${this.handleAnchorClick}\n >\n ${this.renderInputSlots()} ${this.renderToggleIcon()}\n </igc-input>\n\n ${this.renderHelperText()}\n `;\n }\n\n protected renderDropdown() {\n return html`<div part=\"base\" .inert=${!this.open}>\n <div\n id=\"dropdown\"\n role=\"listbox\"\n part=\"list\"\n aria-labelledby=\"input\"\n @click=${this.handleClick}\n >\n <slot name=\"header\"></slot>\n <slot></slot>\n <slot name=\"footer\"></slot>\n </div>\n </div>`;\n }\n\n protected override render() {\n return html`<igc-popover\n ?open=${this.open}\n flip\n shift\n same-width\n .offset=${this.distance}\n .placement=${this.placement}\n >${this.renderInputAnchor()} ${this.renderDropdown()}\n </igc-popover>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-select': IgcSelectComponent;\n }\n}\n"]}
1
+ {"version":3,"file":"select.js","sourceRoot":"","sources":["../../../src/components/select/select.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EACL,QAAQ,EACR,KAAK,EACL,qBAAqB,EACrB,KAAK,GACN,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,OAAO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BAAkB,CAglBtC;eAhlBoB,kBAAkB","sourcesContent":["import { html } from 'lit';\nimport {\n property,\n query,\n queryAssignedElements,\n state,\n} from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\n\nimport { themes } from '../../theming/theming-decorator.js';\nimport {\n addKeybindings,\n altKey,\n arrowDown,\n arrowLeft,\n arrowRight,\n arrowUp,\n endKey,\n enterKey,\n escapeKey,\n homeKey,\n spaceBar,\n tabKey,\n} from '../common/controllers/key-bindings.js';\nimport { addRootScrollHandler } from '../common/controllers/root-scroll.js';\nimport { blazorAdditionalDependencies } from '../common/decorators/blazorAdditionalDependencies.js';\nimport { watch } from '../common/decorators/watch.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport {\n IgcBaseComboBoxLikeComponent,\n getActiveItems,\n getItems,\n getNextActiveItem,\n getPreviousActiveItem,\n setInitialSelectionState,\n} from '../common/mixins/combo-box.js';\nimport type { AbstractConstructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { FormAssociatedRequiredMixin } from '../common/mixins/form-associated-required.js';\nimport { findElementFromEventPath, partNameMap } from '../common/util.js';\nimport IgcIconComponent from '../icon/icon.js';\nimport IgcInputComponent from '../input/input.js';\nimport IgcPopoverComponent, { type IgcPlacement } from '../popover/popover.js';\nimport IgcSelectGroupComponent from './select-group.js';\nimport IgcSelectHeaderComponent from './select-header.js';\nimport IgcSelectItemComponent from './select-item.js';\nimport { styles } from './themes/select.base.css.js';\nimport { styles as shared } from './themes/shared/select.common.css.js';\nimport { all } from './themes/themes.js';\nimport { selectValidators } from './validators.js';\n\nexport interface IgcSelectEventMap {\n igcChange: CustomEvent<IgcSelectItemComponent>;\n // For analyzer meta only:\n /* skipWCPrefix */\n focus: FocusEvent;\n /* skipWCPrefix */\n blur: FocusEvent;\n igcOpening: CustomEvent<void>;\n igcOpened: CustomEvent<void>;\n igcClosing: CustomEvent<void>;\n igcClosed: CustomEvent<void>;\n}\n\n/**\n * Represents a control that provides a menu of options.\n *\n * @element igc-select\n *\n * @slot - Renders the list of select items.\n * @slot prefix - Renders content before the input.\n * @slot suffix - Renders content after input.\n * @slot header - Renders a container before the list of options.\n * @slot footer - Renders a container after the list of options.\n * @slot helper-text - Renders content below the input.\n * @slot toggle-icon - Renders content inside the suffix container.\n * @slot toggle-icon-expanded - Renders content for the toggle icon when the component is in open state.\n *\n * @fires igcChange - Emitted when the control's checked state changes.\n * @fires igcOpening - Emitted just before the list of options is opened.\n * @fires igcOpened - Emitted after the list of options is opened.\n * @fires igcClosing - Emitter just before the list of options is closed.\n * @fires igcClosed - Emitted after the list of options is closed.\n *\n * @csspart list - The list wrapping container for the items of the igc-select.\n * @csspart input - The encapsulated igc-input of the igc-select.\n * @csspart label - The encapsulated text label of the igc-select.\n * @csspart prefix - The prefix wrapper of the input of the igc-select.\n * @csspart suffix - The suffix wrapper of the input of the igc-select.\n * @csspart toggle-icon - The toggle icon wrapper of the igc-select.\n * @csspart helper-text - The helper text wrapper of the igc-select.\n */\n@themes(all)\n@blazorAdditionalDependencies(\n 'IgcIconComponent, IgcInputComponent, IgcSelectGroupComponent, IgcSelectHeaderComponent, IgcSelectItemComponent'\n)\nexport default class IgcSelectComponent extends FormAssociatedRequiredMixin(\n EventEmitterMixin<\n IgcSelectEventMap,\n AbstractConstructor<IgcBaseComboBoxLikeComponent>\n >(IgcBaseComboBoxLikeComponent)\n) {\n public static readonly tagName = 'igc-select';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register() {\n registerComponent(\n IgcSelectComponent,\n IgcIconComponent,\n IgcInputComponent,\n IgcPopoverComponent,\n IgcSelectGroupComponent,\n IgcSelectHeaderComponent,\n IgcSelectItemComponent\n );\n }\n\n private _value!: string;\n private _searchTerm = '';\n private _lastKeyTime = 0;\n\n private _rootScrollController = addRootScrollHandler(this, {\n hideCallback: this.handleClosing,\n });\n\n private get _activeItems() {\n return Array.from(\n getActiveItems<IgcSelectItemComponent>(\n this,\n IgcSelectItemComponent.tagName\n )\n );\n }\n\n @state()\n protected _selectedItem: IgcSelectItemComponent | null = null;\n\n @state()\n protected _activeItem!: IgcSelectItemComponent;\n\n protected override get __validators() {\n return selectValidators;\n }\n\n @query(IgcInputComponent.tagName, true)\n protected input!: IgcInputComponent;\n\n @queryAssignedElements({ slot: 'helper-text' })\n protected helperText!: Array<HTMLElement>;\n\n @queryAssignedElements({ slot: 'suffix' })\n protected inputSuffix!: Array<HTMLElement>;\n\n @queryAssignedElements({ slot: 'prefix' })\n protected inputPrefix!: Array<HTMLElement>;\n\n @queryAssignedElements({ slot: 'toggle-icon-expanded' })\n protected _expandedIconSlot!: Array<HTMLElement>;\n\n protected get hasExpandedIcon() {\n return this._expandedIconSlot.length > 0;\n }\n\n protected get hasPrefixes() {\n return this.inputPrefix.length > 0;\n }\n\n protected get hasSuffixes() {\n return this.inputSuffix.length > 0;\n }\n\n protected get hasHelperText() {\n return this.helperText.length > 0;\n }\n\n /**\n * The value attribute of the control.\n * @attr\n */\n @property()\n public get value(): string {\n return this._value;\n }\n\n /* @tsTwoWayProperty(true, \"igcChange\", \"detail.value\", false) */\n public set value(value: string) {\n this._updateValue(value);\n const item = this.getItem(this._value);\n item ? this.setSelectedItem(item) : this.clearSelectedItem();\n }\n\n /**\n * The outlined attribute of the control.\n * @attr\n */\n @property({ reflect: true, type: Boolean })\n public outlined = false;\n\n /**\n * The autofocus attribute of the control.\n * @attr\n */\n @property({ type: Boolean })\n public override autofocus!: boolean;\n\n /**\n * The distance of the select dropdown from its input.\n * @attr\n */\n @property({ type: Number })\n public distance = 0;\n\n /**\n * The label attribute of the control.\n * @attr\n */\n @property()\n public label!: string;\n\n /**\n * The placeholder attribute of the control.\n * @attr\n */\n @property()\n public placeholder!: string;\n\n /** The preferred placement of the select dropdown around its input.\n * @type {'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end'}\n * @attr\n */\n @property()\n public placement: IgcPlacement = 'bottom-start';\n\n /**\n * Determines the behavior of the component during scrolling of the parent container.\n * @attr scroll-strategy\n */\n @property({ attribute: 'scroll-strategy' })\n public scrollStrategy: 'scroll' | 'block' | 'close' = 'scroll';\n\n /** Returns the items of the igc-select component. */\n public get items() {\n return Array.from(\n getItems<IgcSelectItemComponent>(this, IgcSelectItemComponent.tagName)\n );\n }\n\n /** Returns the groups of the igc-select component. */\n public get groups() {\n return Array.from(\n getItems<IgcSelectGroupComponent>(this, IgcSelectGroupComponent.tagName)\n );\n }\n\n /** Returns the selected item from the dropdown or null. */\n public get selectedItem() {\n return this._selectedItem;\n }\n\n @watch('scrollStrategy', { waitUntilFirstUpdate: true })\n protected scrollStrategyChanged() {\n this._rootScrollController.update({ resetListeners: true });\n }\n\n @watch('open', { waitUntilFirstUpdate: true })\n protected openChange() {\n this._rootClickController.update();\n this._rootScrollController.update();\n }\n\n constructor() {\n super();\n\n this._rootClickController.update({ hideCallback: this.handleClosing });\n\n addKeybindings(this, {\n skip: () => this.disabled,\n bindingDefaults: { preventDefault: true, triggers: ['keydownRepeat'] },\n })\n .set([altKey, arrowDown], this.altArrowDown)\n .set([altKey, arrowUp], this.altArrowUp)\n .set(arrowDown, this.onArrowDown)\n .set(arrowUp, this.onArrowUp)\n .set(arrowLeft, this.onArrowUp)\n .set(arrowRight, this.onArrowDown)\n .set(tabKey, this.onTabKey, { preventDefault: false })\n .set(escapeKey, this.onEscapeKey)\n .set(homeKey, this.onHomeKey)\n .set(endKey, this.onEndKey)\n .set(spaceBar, this.onSpaceBarKey)\n .set(enterKey, this.onEnterKey);\n\n this.addEventListener('keydown', this.handleSearch);\n this.addEventListener('focusin', this.handleFocusIn);\n this.addEventListener('focusout', this.handleFocusOut);\n }\n\n protected override createRenderRoot() {\n const root = super.createRenderRoot();\n root.addEventListener('slotchange', () => this.requestUpdate());\n return root;\n }\n\n protected override async firstUpdated() {\n await this.updateComplete;\n const selected = setInitialSelectionState(this.items);\n\n if (this.value && !selected) {\n this._selectItem(this.getItem(this.value), false);\n }\n\n if (selected && selected.value !== this.value) {\n this._defaultValue = selected.value;\n this._selectItem(selected, false);\n }\n\n if (this.autofocus) {\n this.focus();\n }\n\n this.updateValidity();\n }\n\n private handleFocusIn({ relatedTarget }: FocusEvent) {\n this._dirty = true;\n\n if (this.contains(relatedTarget as Node) || this.open) {\n return;\n }\n }\n\n private handleFocusOut({ relatedTarget }: FocusEvent) {\n if (this.contains(relatedTarget as Node)) {\n return;\n }\n\n this.checkValidity();\n }\n\n private handleClick(event: MouseEvent) {\n const item = findElementFromEventPath<IgcSelectItemComponent>(\n IgcSelectItemComponent.tagName,\n event\n );\n if (item && this._activeItems.includes(item)) {\n this._selectItem(item);\n }\n }\n\n private handleChange(item: IgcSelectItemComponent) {\n return this.emitEvent('igcChange', { detail: item });\n }\n\n private handleSearch(event: KeyboardEvent) {\n if (!/^.$/u.test(event.key)) {\n return;\n }\n\n event.preventDefault();\n const now = Date.now();\n\n if (now - this._lastKeyTime > 500) {\n this._searchTerm = '';\n }\n\n this._lastKeyTime = now;\n this._searchTerm += event.key.toLocaleLowerCase();\n\n const item = this._activeItems.find((item) =>\n item.textContent?.trim().toLocaleLowerCase().startsWith(this._searchTerm)\n );\n\n if (item) {\n this.open ? this.activateItem(item) : this._selectItem(item);\n this._activeItem.focus();\n }\n }\n\n protected override handleAnchorClick(): void {\n super.handleAnchorClick();\n this.focusItemOnOpen();\n }\n\n private onEnterKey() {\n this.open && this._activeItem\n ? this._selectItem(this._activeItem)\n : this.handleAnchorClick();\n }\n\n private onSpaceBarKey() {\n if (!this.open) {\n this.handleAnchorClick();\n }\n }\n\n private onArrowDown() {\n const item = getNextActiveItem(this.items, this._activeItem);\n this.open ? this._navigateToActiveItem(item) : this._selectItem(item);\n }\n\n private onArrowUp() {\n const item = getPreviousActiveItem(this.items, this._activeItem);\n this.open ? this._navigateToActiveItem(item) : this._selectItem(item);\n }\n\n private altArrowDown() {\n if (!this.open) {\n this._show(true);\n this.focusItemOnOpen();\n }\n }\n\n private async altArrowUp() {\n if (this.open && (await this._hide(true))) {\n this.input.focus();\n }\n }\n\n protected async onEscapeKey() {\n if (await this._hide(true)) {\n this.input.focus();\n }\n }\n\n private onTabKey(event: KeyboardEvent) {\n if (this.open) {\n event.preventDefault();\n this._selectItem(this._activeItem);\n this._hide(true);\n }\n }\n\n protected onHomeKey() {\n const item = this._activeItems.at(0);\n this.open ? this._navigateToActiveItem(item) : this._selectItem(item);\n }\n\n protected onEndKey() {\n const item = this._activeItems.at(-1);\n this.open ? this._navigateToActiveItem(item) : this._selectItem(item);\n }\n\n protected handleClosing() {\n this._hide(true);\n }\n\n private activateItem(item: IgcSelectItemComponent) {\n if (this._activeItem) {\n this._activeItem.active = false;\n }\n\n this._activeItem = item;\n this._activeItem.active = true;\n }\n\n private setSelectedItem(item: IgcSelectItemComponent) {\n if (this._selectedItem) {\n this._selectedItem.selected = false;\n }\n\n this._selectedItem = item;\n this._selectedItem.selected = true;\n\n return this._selectedItem;\n }\n\n private _selectItem(item?: IgcSelectItemComponent, emit = true) {\n if (!item) {\n this.clearSelectedItem();\n this._updateValue();\n return null;\n }\n\n const items = this.items;\n const [previous, current] = [\n items.indexOf(this._selectedItem!),\n items.indexOf(item),\n ];\n\n if (previous === current) {\n return this._selectedItem;\n }\n\n const newItem = this.setSelectedItem(item);\n this.activateItem(newItem);\n this._updateValue(newItem.value);\n\n if (emit) this.handleChange(newItem);\n if (emit && this.open) this.input.focus();\n if (emit && !this.keepOpenOnSelect) this._hide(true);\n\n return this._selectedItem;\n }\n\n private _navigateToActiveItem(item?: IgcSelectItemComponent) {\n if (item) {\n this.activateItem(item);\n this._activeItem.focus({ preventScroll: true });\n item.scrollIntoView({ behavior: 'auto', block: 'nearest' });\n }\n }\n\n private _updateValue(value?: string) {\n this._value = value as string;\n this.setFormValue(this._value ? this._value : null);\n this.updateValidity();\n this.setInvalidState();\n }\n\n private clearSelectedItem() {\n if (this._selectedItem) {\n this._selectedItem.selected = false;\n }\n this._selectedItem = null;\n }\n\n private async focusItemOnOpen() {\n await this.updateComplete;\n (this._selectedItem || this._activeItem)?.focus();\n }\n\n protected getItem(value: string) {\n return this.items.find((item) => item.value === value);\n }\n\n /* alternateName: focusComponent */\n /** Sets focus on the component. */\n public override focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /* alternateName: blurComponent */\n /** Removes focus from the component. */\n public override blur() {\n this.input.blur();\n super.blur();\n }\n\n /** Checks the validity of the control and moves the focus to it if it is not valid. */\n public override reportValidity() {\n const valid = super.reportValidity();\n if (!valid) this.input.focus();\n return valid;\n }\n\n /* blazorSuppress */\n /** Navigates to the item with the specified value. If it exists, returns the found item, otherwise - null. */\n public navigateTo(value: string): IgcSelectItemComponent | null;\n /* blazorSuppress */\n /** Navigates to the item at the specified index. If it exists, returns the found item, otherwise - null. */\n public navigateTo(index: number): IgcSelectItemComponent | null;\n /* blazorSuppress */\n /** Navigates to the specified item. If it exists, returns the found item, otherwise - null. */\n public navigateTo(value: string | number): IgcSelectItemComponent | null {\n const item =\n typeof value === 'string' ? this.getItem(value) : this.items[value];\n\n if (item) {\n this._navigateToActiveItem(item);\n }\n\n return item ?? null;\n }\n\n /* blazorSuppress */\n /** Selects the item with the specified value. If it exists, returns the found item, otherwise - null. */\n public select(value: string): IgcSelectItemComponent | null;\n /* blazorSuppress */\n /** Selects the item at the specified index. If it exists, returns the found item, otherwise - null. */\n public select(index: number): IgcSelectItemComponent | null;\n /* blazorSuppress */\n /** Selects the specified item. If it exists, returns the found item, otherwise - null. */\n public select(value: string | number): IgcSelectItemComponent | null {\n const item =\n typeof value === 'string' ? this.getItem(value) : this.items[value];\n return item ? this._selectItem(item, false) : null;\n }\n\n /** Resets the current value and selection of the component. */\n public clearSelection() {\n this._updateValue();\n this.clearSelectedItem();\n }\n\n protected renderInputSlots() {\n const prefixName = this.hasPrefixes ? 'prefix' : '';\n const suffixName = this.hasSuffixes ? 'suffix' : '';\n\n return html`\n <span slot=${prefixName}>\n <slot name=\"prefix\"></slot>\n </span>\n\n <span slot=${suffixName}>\n <slot name=\"suffix\"></slot>\n </span>\n `;\n }\n\n protected renderToggleIcon() {\n const parts = partNameMap({ 'toggle-icon': true, filled: this.value! });\n const iconHidden = this.open && this.hasExpandedIcon;\n const iconExpandedHidden = !(this.hasExpandedIcon && this.open);\n\n return html`\n <span slot=\"suffix\" part=${parts} aria-hidden=\"true\">\n <slot name=\"toggle-icon\" ?hidden=${iconHidden}>\n <igc-icon\n name=${this.open ? 'input_collapse' : 'input_expand'}\n collection=\"default\"\n ></igc-icon>\n </slot>\n <slot name=\"toggle-icon-expanded\" ?hidden=${iconExpandedHidden}></slot>\n </span>\n `;\n }\n\n protected renderHelperText() {\n return html`\n <div\n id=\"helper-text\"\n part=\"helper-text\"\n slot=\"anchor\"\n ?hidden=${!this.hasHelperText}\n >\n <slot name=\"helper-text\"></slot>\n </div>\n `;\n }\n\n protected renderInputAnchor() {\n const value = this.selectedItem?.textContent?.trim();\n\n return html`\n <igc-input\n id=\"input\"\n slot=\"anchor\"\n role=\"combobox\"\n readonly\n aria-controls=\"dropdown\"\n aria-describedby=\"helper-text\"\n aria-expanded=${this.open ? 'true' : 'false'}\n exportparts=\"container: input, input: native-input, label, prefix, suffix\"\n tabIndex=${this.disabled ? -1 : 0}\n value=${ifDefined(value)}\n placeholder=${ifDefined(this.placeholder)}\n label=${ifDefined(this.label)}\n .disabled=${this.disabled}\n .required=${this.required}\n .invalid=${this.invalid}\n .outlined=${this.outlined}\n @click=${this.handleAnchorClick}\n >\n ${this.renderInputSlots()} ${this.renderToggleIcon()}\n </igc-input>\n\n ${this.renderHelperText()}\n `;\n }\n\n protected renderDropdown() {\n return html`<div part=\"base\" .inert=${!this.open}>\n <div\n id=\"dropdown\"\n role=\"listbox\"\n part=\"list\"\n aria-labelledby=\"input\"\n @click=${this.handleClick}\n >\n <slot name=\"header\"></slot>\n <slot></slot>\n <slot name=\"footer\"></slot>\n </div>\n </div>`;\n }\n\n protected override render() {\n return html`<igc-popover\n ?open=${this.open}\n flip\n shift\n same-width\n .offset=${this.distance}\n .placement=${this.placement}\n >${this.renderInputAnchor()} ${this.renderDropdown()}\n </igc-popover>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-select': IgcSelectComponent;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../../src/components/textarea/textarea.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EACL,QAAQ,EACR,KAAK,EACL,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAkB,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEzE,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAiCtC,IAAM,oBAAoB,4BAA1B,MAAM,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C,CAAC,OAAO,CAAC;SACnD;KACF,CAAC;wDACgC;AAU3B;IADN,QAAQ,EAAE;kDACmC;AASvC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;0DAC3C;AA+EZ;IADf,KAAK,CAAC,OAAO,CAAC;wDAId;AAIS;IAFT,KAAK,CAAC,MAAM,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;IAC7C,KAAK,CAAC,QAAQ,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;yDAQ/C;AAhTkB,oBAAoB;IADxC,MAAM,CAAC,GAAG,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC;GACnB,oBAAoB,CAmbxC;eAnboB,oBAAoB","sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport {\n property,\n query,\n queryAssignedElements,\n queryAssignedNodes,\n} from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { type StyleInfo, styleMap } from 'lit/directives/style-map.js';\n\nimport { getThemeController, themes } from '../../theming/theming-decorator.js';\nimport { watch } from '../common/decorators/watch.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport type { Constructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { FormAssociatedRequiredMixin } from '../common/mixins/form-associated-required.js';\nimport { asNumber, createCounter, partNameMap } from '../common/util.js';\nimport type { RangeTextSelectMode, SelectionRangeDirection } from '../types.js';\nimport { styles as shared } from './themes/shared/textarea.common.css.js';\nimport { styles } from './themes/textarea.base.css.js';\nimport { all } from './themes/themes.js';\nimport { textAreaValidators } from './validators.js';\n\nexport interface IgcTextareaEventMap {\n igcInput: CustomEvent<string>;\n igcChange: CustomEvent<string>;\n // For analyzer meta only:\n focus: FocusEvent;\n blur: FocusEvent;\n}\n\n/**\n * This element represents a multi-line plain-text editing control,\n * useful when you want to allow users to enter a sizeable amount of free-form text,\n * for example a comment on a review or feedback form.\n *\n * @element igc-textarea\n *\n * @slot - Text content from the default slot will be used as the value of the component.\n * @slot prefix - Renders content before the input.\n * @slot suffix - Renders content after input.\n * @slot helper-text - Renders content below the input.\n *\n * @fires igcInput - Emitted when the control receives user input.\n * @fires igcChange - Emitted when the a change to the control value is committed by the user.\n *\n * @csspart container - The main wrapper that holds all main input elements of the textarea.\n * @csspart input - The native input element of the igc-textarea.\n * @csspart label - The native label element of the igc-textarea.\n * @csspart prefix - The prefix wrapper of the igc-textarea.\n * @csspart suffix - The suffix wrapper of the igc-textarea.\n * @csspart helper-text - The helper text wrapper of the igc-textarea.\n */\n@themes(all, { exposeController: true })\nexport default class IgcTextareaComponent extends FormAssociatedRequiredMixin(\n EventEmitterMixin<IgcTextareaEventMap, Constructor<LitElement>>(LitElement)\n) {\n public static readonly tagName = 'igc-textarea';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register() {\n registerComponent(IgcTextareaComponent);\n }\n\n protected override get __validators() {\n return textAreaValidators;\n }\n\n private static readonly increment = createCounter();\n protected inputId = `textarea-${IgcTextareaComponent.increment()}`;\n\n protected static shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n private _value = '';\n private observer!: ResizeObserver;\n\n @queryAssignedNodes({ flatten: true })\n private projected!: Array<Node>;\n\n @queryAssignedElements({ slot: 'prefix' })\n protected prefixes!: Array<HTMLElement>;\n\n @queryAssignedElements({ slot: 'suffix' })\n protected suffixes!: Array<HTMLElement>;\n\n @queryAssignedElements({ slot: 'helper-text' })\n protected helperText!: Array<HTMLElement>;\n\n @query('textarea', true)\n private input!: HTMLTextAreaElement;\n\n private get resizeStyles(): StyleInfo {\n return {\n resize: this.resize === 'auto' ? 'none' : this.resize,\n };\n }\n\n protected get _isMaterial() {\n return getThemeController(this)?.theme === 'material';\n }\n\n /**\n * Specifies what if any permission the browser has to provide for automated assistance in filling out form field values,\n * as well as guidance to the browser as to the type of information expected in the field.\n * Refer to [this page](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for additional information.\n *\n * @attr\n */\n @property()\n public autocomplete!: string;\n\n /**\n * Controls whether and how text input is automatically capitalized as it is entered/edited by the user.\n *\n * [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize).\n *\n * @attr\n */\n @property()\n public override autocapitalize!:\n | 'off'\n | 'none'\n | 'on'\n | 'sentences'\n | 'words'\n | 'characters';\n\n /**\n * Hints at the type of data that might be entered by the user while editing the element or its contents.\n * This allows a browser to display an appropriate virtual keyboard.\n *\n * [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode)\n *\n * @attr inputmode\n */\n @property({ attribute: 'inputmode' })\n public override inputMode!:\n | 'none'\n | 'text'\n | 'decimal'\n | 'numeric'\n | 'tel'\n | 'search'\n | 'email'\n | 'url';\n\n /**\n * The label for the control.\n *\n * @attr\n */\n @property()\n public label!: string;\n\n /**\n * The maximum number of characters (UTF-16 code units) that the user can enter.\n * If this value isn't specified, the user can enter an unlimited number of characters.\n *\n * @attr maxlength\n */\n @property({ type: Number, attribute: 'maxlength' })\n public maxLength!: number;\n\n /**\n * The minimum number of characters (UTF-16 code units) required that the user should enter.\n *\n * @attr minlength\n */\n @property({ type: Number, attribute: 'minlength' })\n public minLength!: number;\n\n /**\n * Whether the control will have outlined appearance.\n * @attr\n */\n @property({ reflect: true, type: Boolean })\n public outlined = false;\n\n /**\n * The placeholder attribute of the control.\n *\n * @attr\n */\n @property()\n public placeholder!: string;\n\n /**\n * Makes the control a readonly field.\n *\n * @attr readonly\n */\n @property({ type: Boolean, reflect: true, attribute: 'readonly' })\n public readOnly = false;\n\n /**\n * Controls whether the control can be resized.\n * When `auto` is set, the control will try to expand and fit its content.\n *\n * @attr\n */\n @property()\n public resize: 'auto' | 'vertical' | 'none' = 'vertical';\n\n /**\n * The number of visible text lines for the control. If it is specified, it must be a positive integer.\n * If it is not specified, the default value is 2.\n *\n * @attr\n */\n @property({ type: Number })\n public rows = 2;\n\n /* @tsTwoWayProperty(true, \"igcChange\", \"detail\", false) */\n /**\n * The value of the component\n *\n * @attr\n */\n @property()\n public set value(value: string) {\n this._value = value ?? '';\n this.setFormValue(this._value ? this._value : null);\n this.updateValidity();\n this.setInvalidState();\n }\n\n public get value(): string {\n return this._value;\n }\n\n /**\n * Controls whether the element may be checked for spelling errors.\n *\n * @attr\n */\n @property({\n type: Boolean,\n converter: {\n fromAttribute: (value) => !(!value || value === 'false'),\n toAttribute: (value) => (value ? 'true' : 'false'),\n },\n })\n public override spellcheck = true;\n\n /**\n * Indicates how the control should wrap the value for form submission.\n * Refer to [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attributes)\n * for explanation of the available values.\n *\n * @attr\n */\n @property()\n public wrap: 'hard' | 'soft' | 'off' = 'soft';\n\n /**\n * Enables validation rules to be evaluated without restricting user input. This applies to the `maxLength` property\n * when it is defined.\n *\n * @attr validate-only\n */\n @property({ type: Boolean, reflect: true, attribute: 'validate-only' })\n public validateOnly = false;\n\n constructor() {\n super();\n this.addEventListener('focus', () => {\n this._dirty = true;\n });\n this.addEventListener('blur', () => {\n this.updateValidity();\n this.setInvalidState();\n });\n }\n\n public override async connectedCallback() {\n super.connectedCallback();\n this.updateValidity();\n\n await this.updateComplete;\n\n this.setAreaHeight();\n this.observer = new ResizeObserver(() => this.setAreaHeight());\n this.observer.observe(this.input);\n }\n\n public override disconnectedCallback(): void {\n this.observer.disconnect();\n super.disconnectedCallback();\n }\n\n /** Selects all text within the control. */\n public select() {\n this.input.select();\n }\n\n /** Sets the text selection range of the control */\n public setSelectionRange(\n start: number,\n end: number,\n direction: SelectionRangeDirection = 'none'\n ) {\n this.input.setSelectionRange(start, end, direction);\n }\n\n /** Replaces the selected text in the control. */\n public setRangeText(\n replacement: string,\n start: number,\n end: number,\n selectMode: RangeTextSelectMode = 'preserve'\n ) {\n this.input.setRangeText(replacement, start, end, selectMode);\n this.value = this.input.value;\n }\n\n /* blazorSuppress */\n public override scrollTo(options?: ScrollToOptions | undefined): void;\n /* blazorSuppress */\n public override scrollTo(x: number, y: number): void;\n public override scrollTo(x?: unknown, y?: unknown): void {\n x !== undefined && y !== undefined\n ? this.input.scrollTo(x as number, y as number)\n : this.input.scrollTo(x as ScrollToOptions);\n }\n\n protected resolvePartNames(base: string) {\n return {\n [base]: true,\n prefixed: this.prefixes.length > 0,\n suffixed: this.suffixes.length > 0,\n filled: !!this.value,\n };\n }\n\n protected override async firstUpdated() {\n await this.updateComplete;\n this._defaultValue = this.value;\n }\n\n @watch('value')\n protected async valueChanged() {\n await this.updateComplete;\n this.setAreaHeight();\n }\n\n @watch('rows', { waitUntilFirstUpdate: true })\n @watch('resize', { waitUntilFirstUpdate: true })\n protected setAreaHeight() {\n if (this.resize === 'auto') {\n this.input.style.height = 'auto';\n this.input.style.height = `${this.setAutoHeight()}px`;\n } else {\n Object.assign(this.input.style, { height: undefined });\n }\n }\n\n private setAutoHeight() {\n const computed = getComputedStyle(this.input);\n const [top, bottom] = [\n asNumber(computed.getPropertyValue('border-top-width')),\n asNumber(computed.getPropertyValue('border-bottom-width')),\n ];\n return this.input.scrollHeight + top + bottom;\n }\n\n protected handleInput() {\n this.value = this.input.value;\n this.emitEvent('igcInput', { detail: this.value });\n }\n\n protected handleChange() {\n this.value = this.input.value;\n this.emitEvent('igcChange', { detail: this.value });\n }\n\n protected valueSlotChange() {\n const value = [];\n\n for (const node of this.projected) {\n const text = node.textContent?.trim();\n if (text) {\n value.push(text);\n }\n }\n\n if (value.length) {\n this.value = value.join('\\r\\n');\n }\n }\n\n protected slotChange() {\n this.requestUpdate();\n }\n\n protected renderValueSlot() {\n return html`<slot\n style=\"display: none\"\n @slotchange=${this.valueSlotChange}\n ></slot>`;\n }\n\n protected renderHelperText() {\n return html`\n <div part=\"helper-text\" .hidden=${this.helperText.length < 1}>\n <slot name=\"helper-text\" @slotchange=${this.slotChange}></slot>\n </div>\n `;\n }\n\n protected renderPrefix() {\n return html`<div part=\"prefix\" .hidden=${this.prefixes.length < 1}>\n <slot name=\"prefix\" @slotchange=${this.slotChange}></slot>\n </div>`;\n }\n\n protected renderSuffix() {\n return html`<div part=\"suffix\" .hidden=${this.suffixes.length < 1}>\n <slot name=\"suffix\" @slotchange=${this.slotChange}></slot>\n </div>`;\n }\n\n protected renderLabel() {\n return this.label\n ? html`<label part=\"label\" for=${this.id || this.inputId}\n >${this.label}</label\n >`\n : nothing;\n }\n\n protected renderStandard() {\n return html`\n ${this.renderLabel()}\n <div part=${partNameMap(this.resolvePartNames('container'))}>\n ${this.renderPrefix()} ${this.renderInput()} ${this.renderSuffix()}\n </div>\n ${this.renderHelperText()}\n `;\n }\n\n protected renderMaterial() {\n return html`\n <div\n part=${partNameMap({\n ...this.resolvePartNames('container'),\n labelled: this.label,\n })}\n >\n <div part=\"start\">${this.renderPrefix()}</div>\n <div part=\"notch\">${this.renderLabel()}</div>\n ${this.renderInput()}\n <div part=\"filler\"></div>\n <div part=\"end\">${this.renderSuffix()}</div>\n </div>\n ${this.renderHelperText()}\n `;\n }\n\n protected renderInput() {\n return html`${this.renderValueSlot()}\n <textarea\n id=${this.id || this.inputId}\n part=\"input\"\n style=${styleMap(this.resizeStyles)}\n @input=${this.handleInput}\n @change=${this.handleChange}\n placeholder=${ifDefined(this.placeholder)}\n .rows=${this.rows}\n .value=${live(this.value)}\n .wrap=${this.wrap}\n autocomplete=${ifDefined(this.autocomplete as any)}\n autocapitalize=${ifDefined(this.autocapitalize)}\n inputmode=${ifDefined(this.inputMode)}\n spellcheck=${ifDefined(this.spellcheck)}\n minlength=${ifDefined(this.minLength)}\n maxlength=${ifDefined(this.validateOnly ? undefined : this.maxLength)}\n ?disabled=${this.disabled}\n ?required=${this.required}\n ?readonly=${this.readOnly}\n aria-invalid=${this.invalid ? 'true' : 'false'}\n ></textarea>`;\n }\n\n protected override render() {\n return this._isMaterial ? this.renderMaterial() : this.renderStandard();\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-textarea': IgcTextareaComponent;\n }\n}\n"]}
1
+ {"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../../src/components/textarea/textarea.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EACL,QAAQ,EACR,KAAK,EACL,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAkB,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEzE,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAmCtC,IAAM,oBAAoB,4BAA1B,MAAM,oBAAqB,SAAQ,2BAA2B,CAC3E,iBAAiB,CAA+C,UAAU,CAAC,CAC5E;IAKQ,MAAM,CAAC,QAAQ;QACpB,iBAAiB,CAA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I,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;0DAC3C;AA+EZ;IADf,KAAK,CAAC,OAAO,CAAC;wDAId;AAIS;IAFT,KAAK,CAAC,MAAM,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;IAC7C,KAAK,CAAC,QAAQ,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;yDAQ/C;AAhTkB,oBAAoB;IADxC,MAAM,CAAC,GAAG,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC;GACnB,oBAAoB,CAmbxC;eAnboB,oBAAoB","sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport {\n property,\n query,\n queryAssignedElements,\n queryAssignedNodes,\n} from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { type StyleInfo, styleMap } from 'lit/directives/style-map.js';\n\nimport { getThemeController, themes } from '../../theming/theming-decorator.js';\nimport { watch } from '../common/decorators/watch.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport type { Constructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { FormAssociatedRequiredMixin } from '../common/mixins/form-associated-required.js';\nimport { asNumber, createCounter, partNameMap } from '../common/util.js';\nimport type { RangeTextSelectMode, SelectionRangeDirection } from '../types.js';\nimport { styles as shared } from './themes/shared/textarea.common.css.js';\nimport { styles } from './themes/textarea.base.css.js';\nimport { all } from './themes/themes.js';\nimport { textAreaValidators } from './validators.js';\n\nexport interface IgcTextareaEventMap {\n igcInput: CustomEvent<string>;\n igcChange: CustomEvent<string>;\n // For analyzer meta only:\n /* skipWCPrefix */\n focus: FocusEvent;\n /* skipWCPrefix */\n blur: FocusEvent;\n}\n\n/**\n * This element represents a multi-line plain-text editing control,\n * useful when you want to allow users to enter a sizeable amount of free-form text,\n * for example a comment on a review or feedback form.\n *\n * @element igc-textarea\n *\n * @slot - Text content from the default slot will be used as the value of the component.\n * @slot prefix - Renders content before the input.\n * @slot suffix - Renders content after input.\n * @slot helper-text - Renders content below the input.\n *\n * @fires igcInput - Emitted when the control receives user input.\n * @fires igcChange - Emitted when the a change to the control value is committed by the user.\n *\n * @csspart container - The main wrapper that holds all main input elements of the textarea.\n * @csspart input - The native input element of the igc-textarea.\n * @csspart label - The native label element of the igc-textarea.\n * @csspart prefix - The prefix wrapper of the igc-textarea.\n * @csspart suffix - The suffix wrapper of the igc-textarea.\n * @csspart helper-text - The helper text wrapper of the igc-textarea.\n */\n@themes(all, { exposeController: true })\nexport default class IgcTextareaComponent extends FormAssociatedRequiredMixin(\n EventEmitterMixin<IgcTextareaEventMap, Constructor<LitElement>>(LitElement)\n) {\n public static readonly tagName = 'igc-textarea';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register() {\n registerComponent(IgcTextareaComponent);\n }\n\n protected override get __validators() {\n return textAreaValidators;\n }\n\n private static readonly increment = createCounter();\n protected inputId = `textarea-${IgcTextareaComponent.increment()}`;\n\n protected static shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n private _value = '';\n private observer!: ResizeObserver;\n\n @queryAssignedNodes({ flatten: true })\n private projected!: Array<Node>;\n\n @queryAssignedElements({ slot: 'prefix' })\n protected prefixes!: Array<HTMLElement>;\n\n @queryAssignedElements({ slot: 'suffix' })\n protected suffixes!: Array<HTMLElement>;\n\n @queryAssignedElements({ slot: 'helper-text' })\n protected helperText!: Array<HTMLElement>;\n\n @query('textarea', true)\n private input!: HTMLTextAreaElement;\n\n private get resizeStyles(): StyleInfo {\n return {\n resize: this.resize === 'auto' ? 'none' : this.resize,\n };\n }\n\n protected get _isMaterial() {\n return getThemeController(this)?.theme === 'material';\n }\n\n /**\n * Specifies what if any permission the browser has to provide for automated assistance in filling out form field values,\n * as well as guidance to the browser as to the type of information expected in the field.\n * Refer to [this page](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for additional information.\n *\n * @attr\n */\n @property()\n public autocomplete!: string;\n\n /**\n * Controls whether and how text input is automatically capitalized as it is entered/edited by the user.\n *\n * [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize).\n *\n * @attr\n */\n @property()\n public override autocapitalize!:\n | 'off'\n | 'none'\n | 'on'\n | 'sentences'\n | 'words'\n | 'characters';\n\n /**\n * Hints at the type of data that might be entered by the user while editing the element or its contents.\n * This allows a browser to display an appropriate virtual keyboard.\n *\n * [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode)\n *\n * @attr inputmode\n */\n @property({ attribute: 'inputmode' })\n public override inputMode!:\n | 'none'\n | 'text'\n | 'decimal'\n | 'numeric'\n | 'tel'\n | 'search'\n | 'email'\n | 'url';\n\n /**\n * The label for the control.\n *\n * @attr\n */\n @property()\n public label!: string;\n\n /**\n * The maximum number of characters (UTF-16 code units) that the user can enter.\n * If this value isn't specified, the user can enter an unlimited number of characters.\n *\n * @attr maxlength\n */\n @property({ type: Number, attribute: 'maxlength' })\n public maxLength!: number;\n\n /**\n * The minimum number of characters (UTF-16 code units) required that the user should enter.\n *\n * @attr minlength\n */\n @property({ type: Number, attribute: 'minlength' })\n public minLength!: number;\n\n /**\n * Whether the control will have outlined appearance.\n * @attr\n */\n @property({ reflect: true, type: Boolean })\n public outlined = false;\n\n /**\n * The placeholder attribute of the control.\n *\n * @attr\n */\n @property()\n public placeholder!: string;\n\n /**\n * Makes the control a readonly field.\n *\n * @attr readonly\n */\n @property({ type: Boolean, reflect: true, attribute: 'readonly' })\n public readOnly = false;\n\n /**\n * Controls whether the control can be resized.\n * When `auto` is set, the control will try to expand and fit its content.\n *\n * @attr\n */\n @property()\n public resize: 'auto' | 'vertical' | 'none' = 'vertical';\n\n /**\n * The number of visible text lines for the control. If it is specified, it must be a positive integer.\n * If it is not specified, the default value is 2.\n *\n * @attr\n */\n @property({ type: Number })\n public rows = 2;\n\n /* @tsTwoWayProperty(true, \"igcChange\", \"detail\", false) */\n /**\n * The value of the component\n *\n * @attr\n */\n @property()\n public set value(value: string) {\n this._value = value ?? '';\n this.setFormValue(this._value ? this._value : null);\n this.updateValidity();\n this.setInvalidState();\n }\n\n public get value(): string {\n return this._value;\n }\n\n /**\n * Controls whether the element may be checked for spelling errors.\n *\n * @attr\n */\n @property({\n type: Boolean,\n converter: {\n fromAttribute: (value) => !(!value || value === 'false'),\n toAttribute: (value) => (value ? 'true' : 'false'),\n },\n })\n public override spellcheck = true;\n\n /**\n * Indicates how the control should wrap the value for form submission.\n * Refer to [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attributes)\n * for explanation of the available values.\n *\n * @attr\n */\n @property()\n public wrap: 'hard' | 'soft' | 'off' = 'soft';\n\n /**\n * Enables validation rules to be evaluated without restricting user input. This applies to the `maxLength` property\n * when it is defined.\n *\n * @attr validate-only\n */\n @property({ type: Boolean, reflect: true, attribute: 'validate-only' })\n public validateOnly = false;\n\n constructor() {\n super();\n this.addEventListener('focus', () => {\n this._dirty = true;\n });\n this.addEventListener('blur', () => {\n this.updateValidity();\n this.setInvalidState();\n });\n }\n\n public override async connectedCallback() {\n super.connectedCallback();\n this.updateValidity();\n\n await this.updateComplete;\n\n this.setAreaHeight();\n this.observer = new ResizeObserver(() => this.setAreaHeight());\n this.observer.observe(this.input);\n }\n\n public override disconnectedCallback(): void {\n this.observer.disconnect();\n super.disconnectedCallback();\n }\n\n /** Selects all text within the control. */\n public select() {\n this.input.select();\n }\n\n /** Sets the text selection range of the control */\n public setSelectionRange(\n start: number,\n end: number,\n direction: SelectionRangeDirection = 'none'\n ) {\n this.input.setSelectionRange(start, end, direction);\n }\n\n /** Replaces the selected text in the control. */\n public setRangeText(\n replacement: string,\n start: number,\n end: number,\n selectMode: RangeTextSelectMode = 'preserve'\n ) {\n this.input.setRangeText(replacement, start, end, selectMode);\n this.value = this.input.value;\n }\n\n /* blazorSuppress */\n public override scrollTo(options?: ScrollToOptions | undefined): void;\n /* blazorSuppress */\n public override scrollTo(x: number, y: number): void;\n public override scrollTo(x?: unknown, y?: unknown): void {\n x !== undefined && y !== undefined\n ? this.input.scrollTo(x as number, y as number)\n : this.input.scrollTo(x as ScrollToOptions);\n }\n\n protected resolvePartNames(base: string) {\n return {\n [base]: true,\n prefixed: this.prefixes.length > 0,\n suffixed: this.suffixes.length > 0,\n filled: !!this.value,\n };\n }\n\n protected override async firstUpdated() {\n await this.updateComplete;\n this._defaultValue = this.value;\n }\n\n @watch('value')\n protected async valueChanged() {\n await this.updateComplete;\n this.setAreaHeight();\n }\n\n @watch('rows', { waitUntilFirstUpdate: true })\n @watch('resize', { waitUntilFirstUpdate: true })\n protected setAreaHeight() {\n if (this.resize === 'auto') {\n this.input.style.height = 'auto';\n this.input.style.height = `${this.setAutoHeight()}px`;\n } else {\n Object.assign(this.input.style, { height: undefined });\n }\n }\n\n private setAutoHeight() {\n const computed = getComputedStyle(this.input);\n const [top, bottom] = [\n asNumber(computed.getPropertyValue('border-top-width')),\n asNumber(computed.getPropertyValue('border-bottom-width')),\n ];\n return this.input.scrollHeight + top + bottom;\n }\n\n protected handleInput() {\n this.value = this.input.value;\n this.emitEvent('igcInput', { detail: this.value });\n }\n\n protected handleChange() {\n this.value = this.input.value;\n this.emitEvent('igcChange', { detail: this.value });\n }\n\n protected valueSlotChange() {\n const value = [];\n\n for (const node of this.projected) {\n const text = node.textContent?.trim();\n if (text) {\n value.push(text);\n }\n }\n\n if (value.length) {\n this.value = value.join('\\r\\n');\n }\n }\n\n protected slotChange() {\n this.requestUpdate();\n }\n\n protected renderValueSlot() {\n return html`<slot\n style=\"display: none\"\n @slotchange=${this.valueSlotChange}\n ></slot>`;\n }\n\n protected renderHelperText() {\n return html`\n <div part=\"helper-text\" .hidden=${this.helperText.length < 1}>\n <slot name=\"helper-text\" @slotchange=${this.slotChange}></slot>\n </div>\n `;\n }\n\n protected renderPrefix() {\n return html`<div part=\"prefix\" .hidden=${this.prefixes.length < 1}>\n <slot name=\"prefix\" @slotchange=${this.slotChange}></slot>\n </div>`;\n }\n\n protected renderSuffix() {\n return html`<div part=\"suffix\" .hidden=${this.suffixes.length < 1}>\n <slot name=\"suffix\" @slotchange=${this.slotChange}></slot>\n </div>`;\n }\n\n protected renderLabel() {\n return this.label\n ? html`<label part=\"label\" for=${this.id || this.inputId}\n >${this.label}</label\n >`\n : nothing;\n }\n\n protected renderStandard() {\n return html`\n ${this.renderLabel()}\n <div part=${partNameMap(this.resolvePartNames('container'))}>\n ${this.renderPrefix()} ${this.renderInput()} ${this.renderSuffix()}\n </div>\n ${this.renderHelperText()}\n `;\n }\n\n protected renderMaterial() {\n return html`\n <div\n part=${partNameMap({\n ...this.resolvePartNames('container'),\n labelled: this.label,\n })}\n >\n <div part=\"start\">${this.renderPrefix()}</div>\n <div part=\"notch\">${this.renderLabel()}</div>\n ${this.renderInput()}\n <div part=\"filler\"></div>\n <div part=\"end\">${this.renderSuffix()}</div>\n </div>\n ${this.renderHelperText()}\n `;\n }\n\n protected renderInput() {\n return html`${this.renderValueSlot()}\n <textarea\n id=${this.id || this.inputId}\n part=\"input\"\n style=${styleMap(this.resizeStyles)}\n @input=${this.handleInput}\n @change=${this.handleChange}\n placeholder=${ifDefined(this.placeholder)}\n .rows=${this.rows}\n .value=${live(this.value)}\n .wrap=${this.wrap}\n autocomplete=${ifDefined(this.autocomplete as any)}\n autocapitalize=${ifDefined(this.autocapitalize)}\n inputmode=${ifDefined(this.inputMode)}\n spellcheck=${ifDefined(this.spellcheck)}\n minlength=${ifDefined(this.minLength)}\n maxlength=${ifDefined(this.validateOnly ? undefined : this.maxLength)}\n ?disabled=${this.disabled}\n ?required=${this.required}\n ?readonly=${this.readOnly}\n aria-invalid=${this.invalid ? 'true' : 'false'}\n ></textarea>`;\n }\n\n protected override render() {\n return this._isMaterial ? this.renderMaterial() : this.renderStandard();\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-textarea': IgcTextareaComponent;\n }\n}\n"]}