@api-client/ui 0.5.7 → 0.5.9

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 (27) hide show
  1. package/build/src/elements/mention-textarea/internals/MentionTextArea.d.ts +225 -0
  2. package/build/src/elements/mention-textarea/internals/MentionTextArea.d.ts.map +1 -0
  3. package/build/src/elements/mention-textarea/internals/MentionTextArea.js +1065 -0
  4. package/build/src/elements/mention-textarea/internals/MentionTextArea.js.map +1 -0
  5. package/build/src/elements/mention-textarea/internals/MentionTextArea.styles.d.ts +3 -0
  6. package/build/src/elements/mention-textarea/internals/MentionTextArea.styles.d.ts.map +1 -0
  7. package/build/src/elements/mention-textarea/internals/MentionTextArea.styles.js +274 -0
  8. package/build/src/elements/mention-textarea/internals/MentionTextArea.styles.js.map +1 -0
  9. package/build/src/elements/mention-textarea/ui-mention-textarea.d.ts +13 -0
  10. package/build/src/elements/mention-textarea/ui-mention-textarea.d.ts.map +1 -0
  11. package/build/src/elements/mention-textarea/ui-mention-textarea.js +28 -0
  12. package/build/src/elements/mention-textarea/ui-mention-textarea.js.map +1 -0
  13. package/build/src/md/chip/internals/Chip.styles.d.ts.map +1 -1
  14. package/build/src/md/chip/internals/Chip.styles.js +2 -0
  15. package/build/src/md/chip/internals/Chip.styles.js.map +1 -1
  16. package/demo/elements/index.html +3 -0
  17. package/demo/elements/mention-textarea/index.html +19 -0
  18. package/demo/elements/mention-textarea/index.ts +205 -0
  19. package/package.json +2 -2
  20. package/src/elements/mention-textarea/internals/MentionTextArea.styles.ts +274 -0
  21. package/src/elements/mention-textarea/internals/MentionTextArea.ts +1068 -0
  22. package/src/elements/mention-textarea/ui-mention-textarea.ts +18 -0
  23. package/src/md/chip/internals/Chip.styles.ts +2 -0
  24. package/test/elements/http/CertificateAdd.test.ts +0 -3
  25. package/test/elements/mention-textarea/MentionTextArea.basic.test.ts +114 -0
  26. package/test/elements/mention-textarea/MentionTextArea.test.ts +613 -0
  27. package/t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;;cAIpB,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAA,eAAe,YAAY,KAAK,IAAI,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO;;;iCAG1D,CAAC,IAAI,CAAC,QAAQ;kCACb,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC;wBACrC,IAAI,CAAC,iBAAiB;0BACpB,IAAI,CAAC,mBAAmB;wBAC1B,IAAI,CAAC,iBAAiB;uBACvB,IAAI,CAAC,gBAAgB;wBACpB,IAAI,CAAC,iBAAiB;;4BAElB,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC;;+BAElB,IAAI,CAAC,QAAQ;8BACd,IAAI,CAAC,OAAO;0BAChB,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;UAItC,IAAI,CAAC,iBAAiB,EAAE;;QAE1B,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAA,iCAAiC,IAAI,CAAC,cAAc,SAAS,CAAC,CAAC,CAAC,OAAO;KACpG,CAAA;QACH,CAAC;;;AA1/BH;;;;;;;;;;;;;;;;;GAiBG;AACH","sourcesContent":["import { html, LitElement, PropertyValues, TemplateResult, nothing } from 'lit'\nimport { property, query, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport reactive from '../../../decorators/reactive.js'\nimport '../../../md/chip/ui-chip.js'\n\nexport interface MentionSuggestion {\n /** Unique identifier for the suggestion */\n id: string\n /** Main label/headline displayed */\n label: string\n /** Supporting description text */\n description?: string\n /** Suffix text (e.g., role, department) */\n suffix?: string\n /** Additional data associated with the suggestion */\n data?: Record<string, unknown>\n}\n\nexport interface MentionInsertEvent {\n /** The inserted mention suggestion */\n suggestion: MentionSuggestion\n /** The text that triggered the mention (e.g., \"@john\") */\n trigger: string\n /** The position where the mention was inserted */\n position: number\n}\n\nexport interface MentionRemoveEvent {\n /** The removed mention suggestion */\n suggestion: MentionSuggestion\n /** The position where the mention was removed from */\n position: number\n}\n\ninterface Fragment {\n type: 'text' | 'mention'\n content: string\n mentionId?: string\n}\n\n/**\n * A NodeFilter mask that includes text nodes and elements.\n * It is used with the NodeWalker\n */\nconst ShowMask = NodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT\n\n/**\n * A material design textarea component that supports @mentions with suggestions.\n *\n * Features:\n * - Material Design styling\n * - @mention triggers with customizable suggestions\n * - Inline pill/chip rendering for mentions\n * - Proper caret management\n * - Keyboard navigation for suggestions\n * - Overflow container support\n * - Generic design for extensibility\n * - Accessibility support\n *\n * @fires mention-insert - When a mention is inserted\n * @fires mention-remove - When a mention is removed\n * @fires input - When the input value changes\n * @fires change - When the input loses focus and value has changed\n */\nexport default class MentionTextArea extends LitElement {\n /**\n * Shadow root configuration for the component.\n * Uses 'open' mode for accessibility and delegates focus to enable proper focus management.\n */\n static override shadowRootOptions: ShadowRootInit = {\n mode: 'open',\n delegatesFocus: true,\n }\n\n /**\n * The label text displayed as placeholder/floating label\n */\n @property({ type: String })\n accessor label = ''\n\n /**\n * Supporting text displayed below the input\n */\n @property({ type: String, attribute: 'supporting-text' })\n accessor supportingText = ''\n\n /**\n * Whether the component is disabled\n */\n @property({ type: Boolean, reflect: true })\n accessor disabled = false\n\n /**\n * Whether the component is in an invalid state\n */\n @property({ type: Boolean, reflect: true })\n accessor invalid = false\n\n /**\n * The name attribute for form integration\n */\n @property({ type: String })\n accessor name = ''\n\n /**\n * Whether the input is required\n */\n @property({ type: Boolean })\n accessor required = false\n\n /**\n * Placeholder text shown when input is empty\n */\n @property({ type: String })\n accessor placeholder = ''\n\n get value(): string {\n return this._value\n }\n\n @property({ type: String })\n set value(newValue: string) {\n const oldValue = this._value\n if (newValue === this._value) return // No change, skip update\n this._value = newValue\n this.requestUpdate('value', oldValue)\n // Only sync editor from value when set externally and element is ready\n if (this.editorElement) {\n this.syncEditorFromValue()\n }\n }\n\n /**\n * Available suggestions for mentions\n */\n @property({ type: Array, attribute: false })\n accessor suggestions: MentionSuggestion[] = []\n\n /**\n * Character that triggers mention suggestions (default: '@')\n */\n @property({ type: String, attribute: 'mention-trigger' })\n accessor mentionTrigger = '@'\n\n /**\n * Minimum characters after trigger to show suggestions\n */\n @property({ type: Number, attribute: 'min-query-length' })\n accessor minQueryLength = 0\n\n @query('.editor')\n private accessor editorElement!: HTMLDivElement\n\n @query('.suggestions-popover')\n private accessor suggestionsPopover!: HTMLElement\n\n @state()\n @reactive()\n private accessor isShowingSuggestions = false\n\n @reactive()\n private accessor filteredSuggestions: MentionSuggestion[] = []\n\n @state()\n private accessor selectedSuggestionIndex = 0\n\n @state()\n private accessor hasContent = false\n\n @state()\n private accessor isLabelFloating = false\n\n @state()\n private accessor isEditorFocus = false\n\n private currentMentionQuery = ''\n private currentMentionStart = -1\n private mentionMap = new Map<string, MentionSuggestion>()\n private mutationObserver?: MutationObserver\n private _value = '' // Internal value storage\n\n /**\n * A read-only list of the names of the fields currently mentioned in the textarea.\n */\n get mentions(): string[] {\n const dependencies = new Set<string>()\n if (!this.value) {\n return []\n }\n const regex = /@\\{([^}]+)\\}/g\n let match: RegExpExecArray | null\n while ((match = regex.exec(this.value)) !== null) {\n dependencies.add(match[1])\n }\n return Array.from(dependencies)\n }\n\n override connectedCallback(): void {\n super.connectedCallback()\n\n // Setup mutation observer to watch for changes in the editor\n this.mutationObserver = new MutationObserver(() => {\n this.syncValueFromEditor()\n })\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback()\n this.mutationObserver?.disconnect()\n }\n\n override firstUpdated(): void {\n // Start observing mutations in the editor\n if (this.editorElement && this.mutationObserver) {\n this.mutationObserver.observe(this.editorElement, {\n childList: true,\n subtree: true,\n characterData: true,\n })\n }\n\n // Setup initial content\n this.updateComplete.then(() => {\n this.syncEditorFromValue()\n })\n }\n\n override willUpdate(changedProperties: PropertyValues): void {\n super.willUpdate(changedProperties)\n\n // No need to sync editor from value here since setter handles it\n\n if (changedProperties.has('suggestions')) {\n this.updateFilteredSuggestions()\n }\n if (changedProperties.has('selectedSuggestionIndex')) {\n const index = this.selectedSuggestionIndex\n if (index >= 0) {\n this.suggestionsPopover?.querySelector(`.suggestion-item:nth-child(${index + 1})`)?.scrollIntoView({\n behavior: 'smooth',\n block: 'nearest',\n })\n }\n }\n }\n\n /**\n * Get the plain text content without field references\n * @returns The plain text content with field names instead of references\n */\n public getPlainText(): string {\n let text = this.value\n\n // Replace field references with their display names\n text = text.replace(/@\\{([^}]+)\\}/g, (match, fieldId) => {\n const field = this.suggestions.find((f) => f.id === fieldId)\n return field ? field.label : fieldId\n })\n\n return text\n }\n\n /**\n * Sets the caret position at the beginning of a specific text node\n */\n private setCaretPositionAtTextNode(textNode: Text, offset = 0): void {\n const selection = window.getSelection()\n if (!selection) return\n\n const range = document.createRange()\n range.setStart(textNode, offset)\n range.setEnd(textNode, offset)\n\n selection.removeAllRanges()\n selection.addRange(range)\n }\n\n /**\n * Synchronizes the value property from the editor content\n */\n private syncValueFromEditor(): void {\n const newValue = this.getValueFromEditor()\n if (newValue !== this._value) {\n // Update internal value directly to avoid triggering setter\n this._value = newValue\n this.requestUpdate('value')\n this.dispatchEvent(new Event('input', { bubbles: true }))\n }\n\n this.updateContentState()\n }\n\n /**\n * Gets the value from editor content, converting chips to @{mention} format\n */\n private getValueFromEditor(): string {\n const childNodes = Array.from(this.editorElement.childNodes)\n let result = ''\n\n for (const node of childNodes) {\n if (node.nodeType === Node.TEXT_NODE) {\n result += node.textContent || ''\n } else if (node.nodeType === Node.ELEMENT_NODE) {\n const element = node as Element\n if (element.classList.contains('mention-chip')) {\n const mentionId = element.getAttribute('data-mention-id')\n if (mentionId) {\n result += `@{${mentionId}}`\n }\n } else {\n result += element.textContent || ''\n }\n }\n }\n\n return result\n }\n\n /**\n * Synchronizes the editor content from the value property\n */\n private syncEditorFromValue(): void {\n if (!this.editorElement) return\n\n const fragments = this.parseValueToFragments(this._value)\n this.editorElement.innerHTML = ''\n\n for (const fragment of fragments) {\n if (fragment.type === 'text') {\n this.editorElement.appendChild(document.createTextNode(fragment.content))\n } else if (fragment.type === 'mention') {\n if (fragment.mentionId) {\n let mention = this.mentionMap.get(fragment.mentionId)\n\n // If mention not in map, try to find it in suggestions\n if (!mention) {\n mention = this.suggestions.find((s) => s.id === fragment.mentionId)\n if (mention) {\n // Add to map for future use\n this.mentionMap.set(mention.id, mention)\n }\n }\n\n if (mention) {\n const chipElement = this.createMentionChip(mention)\n this.editorElement.appendChild(chipElement)\n } else {\n // Fallback to text if mention not found anywhere\n this.editorElement.appendChild(document.createTextNode(`@{${fragment.mentionId}}`))\n }\n }\n }\n }\n\n this.updateContentState()\n }\n\n /**\n * Parses value string into text and mention fragments\n */\n private parseValueToFragments(value: string): Fragment[] {\n const fragments: Fragment[] = []\n const mentionRegex = /@\\{([^}]+)\\}/g\n let lastIndex = 0\n let match\n\n while ((match = mentionRegex.exec(value)) !== null) {\n // Add text before mention\n if (match.index > lastIndex) {\n fragments.push({\n type: 'text',\n content: value.substring(lastIndex, match.index),\n })\n }\n\n // Add mention\n fragments.push({\n type: 'mention',\n content: match[0],\n mentionId: match[1],\n })\n\n lastIndex = mentionRegex.lastIndex\n }\n\n // Add remaining text\n if (lastIndex < value.length) {\n fragments.push({\n type: 'text',\n content: value.substring(lastIndex),\n })\n }\n\n return fragments\n }\n\n /**\n * Creates a mention chip element\n */\n private createMentionChip(mention: MentionSuggestion): HTMLElement {\n const wrapper = document.createElement('span')\n wrapper.className = 'mention-chip'\n wrapper.setAttribute('data-mention-id', mention.id)\n wrapper.setAttribute('contenteditable', 'false')\n\n const chip = document.createElement('ui-chip')\n chip.setAttribute('type', 'input')\n chip.setAttribute('removable', 'true')\n chip.textContent = mention.label\n chip.addEventListener('remove', () => {\n this.removeMention(wrapper, mention)\n })\n\n wrapper.appendChild(chip)\n return wrapper\n }\n\n /**\n * Updates content state flags\n */\n private updateContentState(): void {\n const hasAnyContent =\n this.editorElement.childNodes.length > 0 && (this.editorElement.textContent?.trim().length || 0) > 0\n\n this.hasContent = hasAnyContent\n this.isLabelFloating = hasAnyContent || this.isShowingSuggestions || this.isEditorFocus\n }\n\n /**\n * Handles input events in the editor\n */\n private handleEditorInput(event: Event): void {\n event.stopPropagation()\n\n // Check for mention trigger\n this.checkForMentionTrigger()\n\n // Sync value\n this.syncValueFromEditor()\n }\n\n /**\n * Handles keydown events in the editor\n */\n private handleEditorKeyDown(event: KeyboardEvent): void {\n if (this.isShowingSuggestions) {\n this.handleSuggestionKeyDown(event)\n }\n }\n\n /**\n * Handles keydown events when suggestions are visible\n */\n private handleSuggestionKeyDown(event: KeyboardEvent): void {\n switch (event.key) {\n case 'ArrowUp':\n event.preventDefault()\n this.selectedSuggestionIndex = Math.max(0, this.selectedSuggestionIndex - 1)\n break\n case 'ArrowDown':\n event.preventDefault()\n this.selectedSuggestionIndex = Math.min(this.filteredSuggestions.length - 1, this.selectedSuggestionIndex + 1)\n break\n case 'Enter':\n case 'Tab':\n event.preventDefault()\n this.selectSuggestion(this.filteredSuggestions[this.selectedSuggestionIndex])\n break\n case 'Escape':\n event.preventDefault()\n this.hideSuggestions()\n break\n }\n }\n\n /**\n * Handles focus events\n */\n private handleEditorFocus(): void {\n this.isEditorFocus = true\n this.updateContentState()\n }\n\n /**\n * Handles blur events\n */\n private handleEditorBlur(event: FocusEvent): void {\n // Don't hide suggestions if focus moved to suggestions popover\n if (event.relatedTarget && this.suggestionsPopover?.contains(event.relatedTarget as Node)) {\n return\n }\n\n this.isEditorFocus = false\n this.hideSuggestions()\n this.updateContentState()\n this.dispatchEvent(new Event('change', { bubbles: true }))\n }\n\n private handleEditorPaste(event: ClipboardEvent): void {\n // Prevent default paste behavior to handle mentions properly\n event.preventDefault()\n\n const pastedContent = event.clipboardData?.getData('text/plain')\n if (!pastedContent) return\n\n const selection = window.getSelection()\n if (!selection || selection.rangeCount === 0) return\n\n // Get the current range\n let range: Range | StaticRange\n if ('getComposedRanges' in selection && typeof selection.getComposedRanges === 'function' && this.shadowRoot) {\n const composedRanges = selection.getComposedRanges({ shadowRoots: [this.shadowRoot] })\n if (composedRanges.length === 0) return\n range = composedRanges[0]\n } else {\n range = selection.getRangeAt(0)\n }\n\n // Convert StaticRange to Range if needed for deleteContents\n let workingRange: Range\n if (range instanceof StaticRange) {\n workingRange = document.createRange()\n workingRange.setStart(range.startContainer, range.startOffset)\n workingRange.setEnd(range.endContainer, range.endOffset)\n } else {\n workingRange = range\n }\n\n // Delete the current selection (if any)\n workingRange.deleteContents()\n\n // Insert the pasted text at the current position\n const textNode = document.createTextNode(pastedContent)\n workingRange.insertNode(textNode)\n\n // Position cursor at the end of the inserted text\n workingRange.setStartAfter(textNode)\n workingRange.setEndAfter(textNode)\n selection.removeAllRanges()\n selection.addRange(workingRange)\n\n // Hide suggestions if showing\n this.hideSuggestions()\n\n // Sync value and trigger events\n this.syncValueFromEditor()\n }\n\n /**\n * Checks if the current caret position indicates a mention trigger\n */\n private checkForMentionTrigger(): void {\n const selection = window.getSelection()\n if (!selection || selection.rangeCount === 0) {\n this.hideSuggestions()\n return\n }\n\n // Use getComposedRanges() for shadow DOM support, fallback to getRangeAt()\n let range: Range | StaticRange\n if ('getComposedRanges' in selection && typeof selection.getComposedRanges === 'function' && this.shadowRoot) {\n const composedRanges = selection.getComposedRanges({ shadowRoots: [this.shadowRoot] })\n if (composedRanges.length === 0) {\n this.hideSuggestions()\n return\n }\n range = composedRanges[0]\n } else {\n range = selection.getRangeAt(0)\n }\n\n const caretContainer = range.startContainer\n const caretOffset = range.startOffset\n\n // Ensure the caret is within our editor element\n if (!this.editorElement.contains(caretContainer)) {\n this.hideSuggestions()\n return\n }\n\n // Only look for triggers in text nodes\n if (caretContainer.nodeType !== Node.TEXT_NODE) {\n this.hideSuggestions()\n return\n }\n\n const textContent = caretContainer.textContent || ''\n\n // Look backwards from caret to find mention trigger\n let mentionStart = -1\n for (let i = caretOffset - 1; i >= 0; i--) {\n const char = textContent[i]\n if (char === this.mentionTrigger) {\n mentionStart = i\n break\n }\n if (char === ' ' || char === '\\n') {\n break\n }\n }\n if (mentionStart >= 0) {\n const query = textContent.substring(mentionStart + 1, caretOffset)\n\n if (query.length >= this.minQueryLength) {\n this.currentMentionQuery = query\n this.currentMentionStart = this.getGlobalTextPosition(caretContainer, mentionStart)\n this.showSuggestions()\n this.updateFilteredSuggestions()\n } else {\n this.hideSuggestions()\n }\n } else {\n this.hideSuggestions()\n }\n }\n\n private walkerNodeFilter(node: Node): number {\n if (node.nodeType === Node.TEXT_NODE) {\n return NodeFilter.FILTER_ACCEPT\n } else if (node.nodeType === Node.ELEMENT_NODE) {\n const element = node as Element\n if (element.classList.contains('mention-chip')) {\n // Accept mention chips as single characters\n return NodeFilter.FILTER_ACCEPT\n } else if (element.parentElement?.classList.contains('mention-chip')) {\n // It's a chip, ignore the entire tree\n return NodeFilter.FILTER_REJECT\n }\n }\n return NodeFilter.FILTER_SKIP\n }\n\n /**\n * Gets the global text position within the editor for a position within a text node\n */\n private getGlobalTextPosition(textNode: Node, offsetInNode: number): number {\n let position = 0\n const walker = document.createTreeWalker(this.editorElement, ShowMask, this.walkerNodeFilter)\n\n let node = walker.nextNode()\n while (node && node !== textNode) {\n if (node.nodeType === Node.TEXT_NODE) {\n position += node.textContent?.length || 0\n } else if (node.nodeType === Node.ELEMENT_NODE) {\n const element = node as Element\n if (element.classList?.contains('mention-chip')) {\n position += 1 // Count chip as 1 character\n }\n }\n node = walker.nextNode()\n }\n\n return position + offsetInNode\n }\n\n /**\n * Finds the DOM node and offset that corresponds to a global text position\n */\n private findNodeAtGlobalPosition(globalPosition: number): { node: Node; offset: number } | null {\n let currentPosition = 0\n const walker = document.createTreeWalker(this.editorElement, ShowMask, this.walkerNodeFilter)\n\n let node = walker.nextNode()\n while (node) {\n if (node.nodeType === Node.TEXT_NODE) {\n const textLength = node.textContent?.length || 0\n if (currentPosition + textLength >= globalPosition) {\n return {\n node,\n offset: globalPosition - currentPosition,\n }\n }\n currentPosition += textLength\n } else if (node.nodeType === Node.ELEMENT_NODE) {\n const element = node as Element\n if (element.classList?.contains('mention-chip')) {\n if (currentPosition === globalPosition) {\n // Position is right before the chip\n const parentNode = element.parentNode\n if (parentNode) {\n return {\n node: parentNode,\n offset: Array.from(parentNode.childNodes).indexOf(element),\n }\n }\n }\n currentPosition += 1 // Count chip as 1 character\n }\n }\n node = walker.nextNode()\n }\n\n // Position is beyond the end, return the last position\n const lastChild = this.editorElement.lastChild\n if (lastChild) {\n if (lastChild.nodeType === Node.TEXT_NODE) {\n return {\n node: lastChild,\n offset: lastChild.textContent?.length || 0,\n }\n } else {\n return {\n node: this.editorElement,\n offset: this.editorElement.childNodes.length,\n }\n }\n }\n\n return null\n }\n\n /**\n * Shows the suggestions popover\n */\n private showSuggestions(): void {\n if (!this.isShowingSuggestions) {\n this.isShowingSuggestions = true\n this.selectedSuggestionIndex = 0\n this.updateContentState()\n\n // Use Popover API to show the popover\n this.updateComplete.then(() => {\n if (this.suggestionsPopover) {\n this.suggestionsPopover.showPopover()\n this.positionSuggestions()\n }\n })\n }\n }\n\n /**\n * Hides the suggestions popover\n */\n private hideSuggestions(): void {\n if (this.isShowingSuggestions) {\n this.isShowingSuggestions = false\n this.currentMentionQuery = ''\n this.currentMentionStart = -1\n this.updateContentState()\n\n // Use Popover API to hide the popover\n if (this.suggestionsPopover) {\n this.suggestionsPopover.hidePopover()\n }\n }\n }\n\n /**\n * Updates filtered suggestions based on current query\n */\n private updateFilteredSuggestions(): void {\n if (!this.currentMentionQuery) {\n this.filteredSuggestions = this.suggestions.slice(0, 10) // Limit to 10\n return\n }\n\n const query = this.currentMentionQuery.toLowerCase()\n this.filteredSuggestions = this.suggestions\n .filter(\n (suggestion) =>\n suggestion.label.toLowerCase().includes(query) ||\n suggestion.description?.toLowerCase().includes(query) ||\n suggestion.suffix?.toLowerCase().includes(query)\n )\n .slice(0, 10) // Limit to 10\n\n // Reset selection if needed\n if (this.selectedSuggestionIndex >= this.filteredSuggestions.length) {\n this.selectedSuggestionIndex = 0\n }\n }\n\n /**\n * Positions the suggestions popover using the Popover API anchor positioning\n */\n private positionSuggestions(): void {\n if (!this.suggestionsPopover) return\n\n const selection = window.getSelection()\n if (!selection || selection.rangeCount === 0) return\n\n // Use getComposedRanges() for shadow DOM support, fallback to getRangeAt()\n let range: Range | StaticRange\n if ('getComposedRanges' in selection && typeof selection.getComposedRanges === 'function' && this.shadowRoot) {\n const composedRanges = selection.getComposedRanges({ shadowRoots: [this.shadowRoot] })\n if (composedRanges.length === 0) return\n range = composedRanges[0]\n } else {\n range = selection.getRangeAt(0)\n }\n\n // Convert StaticRange to Range if needed for getBoundingClientRect\n let workingRange: Range\n if (range instanceof StaticRange) {\n workingRange = document.createRange()\n workingRange.setStart(range.startContainer, range.startOffset)\n workingRange.setEnd(range.endContainer, range.endOffset)\n } else {\n workingRange = range\n }\n\n const rect = workingRange.getBoundingClientRect()\n\n // Position suggestions below the caret using manual positioning as fallback\n // The Popover API will handle proper layering and overflow handling\n this.suggestionsPopover.style.left = `${rect.left}px`\n this.suggestionsPopover.style.top = `${rect.bottom + 4}px`\n }\n\n /**\n * Selects a suggestion and inserts it as a mention\n */\n private selectSuggestion(suggestion: MentionSuggestion): void {\n if (!suggestion) return\n\n // Add to mention map\n this.mentionMap.set(suggestion.id, suggestion)\n\n // Find the position where the mention trigger starts\n const mentionStart = this.currentMentionStart\n\n // Find the DOM node and offset for the mention start position\n const mentionStartInfo = this.findNodeAtGlobalPosition(mentionStart)\n\n if (!mentionStartInfo) {\n // Fallback: insert at the end\n const chip = this.createMentionChip(suggestion)\n const afterTextNode = document.createTextNode('')\n this.editorElement.appendChild(chip)\n this.editorElement.appendChild(afterTextNode)\n this.setCaretPositionAtTextNode(afterTextNode, 0)\n this.hideSuggestions()\n this.syncValueFromEditor()\n this.dispatchEvent(\n new CustomEvent<MentionInsertEvent>('mention-insert', {\n detail: {\n suggestion,\n trigger: this.mentionTrigger + this.currentMentionQuery,\n position: mentionStart,\n },\n bubbles: true,\n })\n )\n return\n }\n\n // If the target is not a text node, insert at the container level\n if (mentionStartInfo.node.nodeType !== Node.TEXT_NODE) {\n const chip = this.createMentionChip(suggestion)\n const container = mentionStartInfo.node\n const beforeNode = container.childNodes[mentionStartInfo.offset]\n\n // Create an empty text node for caret positioning\n const afterTextNode = document.createTextNode('')\n\n if (beforeNode) {\n container.insertBefore(chip, beforeNode)\n container.insertBefore(afterTextNode, beforeNode)\n } else {\n container.appendChild(chip)\n container.appendChild(afterTextNode)\n }\n\n // Position caret at the beginning of the after text node\n this.setCaretPositionAtTextNode(afterTextNode, 0)\n this.hideSuggestions()\n this.syncValueFromEditor()\n this.dispatchEvent(\n new CustomEvent<MentionInsertEvent>('mention-insert', {\n detail: {\n suggestion,\n trigger: this.mentionTrigger + this.currentMentionQuery,\n position: mentionStart,\n },\n bubbles: true,\n })\n )\n return\n }\n\n // We have a text node - split it and insert the chip\n const textNode = mentionStartInfo.node as Text\n const splitOffset = mentionStartInfo.offset\n\n // Create the mention chip\n const chip = this.createMentionChip(suggestion)\n\n // Split the text node at the mention start position\n const beforeText = textNode.textContent?.substring(0, splitOffset) || ''\n const afterText = textNode.textContent?.substring(splitOffset + 1) || '' // +1 to skip the trigger\n\n // Replace the original text node with the split content\n const parentNode = textNode.parentNode\n if (parentNode) {\n // Create new text nodes - always create afterTextNode even if empty\n const beforeTextNode = beforeText ? document.createTextNode(beforeText) : null\n const afterTextNode = document.createTextNode(afterText) // Always create, even if empty\n\n // Insert the nodes in order\n if (beforeTextNode) {\n parentNode.insertBefore(beforeTextNode, textNode)\n }\n parentNode.insertBefore(chip, textNode)\n parentNode.insertBefore(afterTextNode, textNode)\n\n // Remove the original text node\n parentNode.removeChild(textNode)\n\n // Position caret at the beginning of the after text node\n this.setCaretPositionAtTextNode(afterTextNode, 0)\n } else {\n // Fallback: append to editor and create a text node for caret positioning\n const afterTextNode = document.createTextNode('')\n this.editorElement.appendChild(chip)\n this.editorElement.appendChild(afterTextNode)\n this.setCaretPositionAtTextNode(afterTextNode, 0)\n }\n\n // Hide suggestions\n this.hideSuggestions()\n\n // Sync value and dispatch events\n this.syncValueFromEditor()\n this.dispatchEvent(\n new CustomEvent<MentionInsertEvent>('mention-insert', {\n detail: {\n suggestion,\n trigger: this.mentionTrigger + this.currentMentionQuery,\n position: mentionStart,\n },\n bubbles: true,\n })\n )\n }\n\n /**\n * Removes a mention chip\n */\n private removeMention(chipElement: HTMLElement, mention: MentionSuggestion): void {\n const position = this.getElementPosition(chipElement)\n chipElement.remove()\n\n this.syncValueFromEditor()\n this.dispatchEvent(\n new CustomEvent<MentionRemoveEvent>('mention-remove', {\n detail: {\n suggestion: mention,\n position,\n },\n bubbles: true,\n })\n )\n }\n\n /**\n * Gets the text position of an element\n */\n private getElementPosition(element: HTMLElement): number {\n let position = 0\n let currentNode = this.editorElement.firstChild\n\n while (currentNode && currentNode !== element) {\n if (currentNode.nodeType === Node.TEXT_NODE) {\n position += currentNode.textContent?.length || 0\n } else if (currentNode.nodeType === Node.ELEMENT_NODE) {\n const element = currentNode as Element\n if (element.classList?.contains('mention-chip')) {\n position += 1 // Count chip as 1 character\n }\n }\n currentNode = currentNode.nextSibling\n }\n\n return position\n }\n\n /**\n * Handles clicking on a suggestion\n */\n private handleSuggestionClick(suggestion: MentionSuggestion, event: Event): void {\n event.preventDefault()\n this.selectSuggestion(suggestion)\n this.focus()\n }\n\n /**\n * Renders a suggestion item\n */\n private renderSuggestion(suggestion: MentionSuggestion, index: number): TemplateResult {\n const isSelected = index === this.selectedSuggestionIndex\n const classes = classMap({\n 'suggestion-item': true,\n 'selected': isSelected,\n })\n\n return html`\n <button\n class=\"${classes}\"\n @click=\"${(e: Event) => this.handleSuggestionClick(suggestion, e)}\"\n @mouseenter=\"${() => (this.selectedSuggestionIndex = index)}\"\n >\n <div class=\"suggestion-content\">\n <div class=\"suggestion-headline\">${suggestion.label}</div>\n ${suggestion.description\n ? html` <div class=\"suggestion-supporting-text\">${suggestion.description}</div> `\n : nothing}\n </div>\n ${suggestion.suffix ? html` <div class=\"suggestion-suffix\">${suggestion.suffix}</div> ` : nothing}\n </button>\n `\n }\n\n /**\n * Renders the suggestions popover\n */\n private renderSuggestions(): TemplateResult {\n return html`\n <div class=\"suggestions-popover\" popover=\"manual\">\n ${this.isShowingSuggestions && this.filteredSuggestions.length > 0\n ? this.filteredSuggestions.map((suggestion, index) => this.renderSuggestion(suggestion, index))\n : nothing}\n </div>\n `\n }\n\n override render(): TemplateResult {\n const surfaceClasses = classMap({\n 'surface': true,\n 'has-content': this.hasContent,\n })\n\n const labelClasses = classMap({\n label: true,\n floating: this.isLabelFloating,\n })\n\n return html`\n <div class=\"${surfaceClasses}\">\n <div class=\"container\"></div>\n <div class=\"content\">\n <div class=\"body\">\n ${this.label ? html`<div class=\"${labelClasses}\">${this.label}</div>` : nothing}\n <div\n class=\"editor\"\n contenteditable=\"${!this.disabled}\"\n data-placeholder=\"${ifDefined(this.placeholder)}\"\n @input=\"${this.handleEditorInput}\"\n @keydown=\"${this.handleEditorKeyDown}\"\n @focus=\"${this.handleEditorFocus}\"\n @blur=\"${this.handleEditorBlur}\"\n @paste=\"${this.handleEditorPaste}\"\n role=\"textbox\"\n aria-label=\"${ifDefined(this.label)}\"\n aria-multiline=\"true\"\n aria-required=\"${this.required}\"\n aria-invalid=\"${this.invalid}\"\n tabindex=\"${this.disabled ? -1 : 0}\"\n ></div>\n </div>\n </div>\n ${this.renderSuggestions()}\n </div>\n ${this.supportingText ? html` <div class=\"supporting-text\">${this.supportingText}</div> ` : nothing}\n `\n }\n}\n"]}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("lit").CSSResult;
2
+ export default _default;
3
+ //# sourceMappingURL=MentionTextArea.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MentionTextArea.styles.d.ts","sourceRoot":"","sources":["../../../../../src/elements/mention-textarea/internals/MentionTextArea.styles.ts"],"names":[],"mappings":";AAEA,wBA+QC"}
@@ -0,0 +1,274 @@
1
+ import { css } from 'lit';
2
+ export default css `
3
+ :host {
4
+ display: inline-flex;
5
+ flex-direction: column;
6
+ vertical-align: top;
7
+ outline: none;
8
+ -webkit-tap-highlight-color: transparent;
9
+ cursor: text;
10
+ min-width: 200px;
11
+ font-family: var(--md-sys-typescale-body-large-font);
12
+ font-size: var(--md-sys-typescale-body-large-size);
13
+ letter-spacing: var(--md-sys-typescale-body-large-tracking);
14
+ line-height: var(--md-sys-typescale-body-large-height);
15
+ }
16
+
17
+ .surface {
18
+ height: auto;
19
+ min-height: 56px;
20
+ position: relative;
21
+ display: flex;
22
+ align-items: flex-start;
23
+ cursor: inherit;
24
+ border-radius: var(--md-sys-shape-corner-extra-small);
25
+ }
26
+
27
+ .container {
28
+ position: absolute;
29
+ inset: 0;
30
+ z-index: 1;
31
+ border-radius: inherit;
32
+ background-color: transparent;
33
+ border: 1px solid var(--md-sys-color-outline);
34
+ outline: 0px solid var(--md-sys-color-primary);
35
+ outline-offset: -1px;
36
+ transition:
37
+ border-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
38
+ outline-width 150ms cubic-bezier(0.4, 0, 0.2, 1),
39
+ outline-offset 150ms cubic-bezier(0.4, 0, 0.2, 1);
40
+ }
41
+
42
+ .content {
43
+ height: inherit;
44
+ min-height: inherit;
45
+ display: flex;
46
+ align-items: flex-start;
47
+ justify-content: start;
48
+ box-sizing: border-box;
49
+ position: relative;
50
+ z-index: 2;
51
+ flex: 1;
52
+ cursor: inherit;
53
+ padding: 16px;
54
+ }
55
+
56
+ .body {
57
+ flex: 1;
58
+ box-sizing: border-box;
59
+ position: relative;
60
+ cursor: inherit;
61
+ min-height: 24px;
62
+ }
63
+
64
+ .label {
65
+ color: var(--md-sys-color-on-surface-variant);
66
+ position: absolute;
67
+ top: 0px;
68
+ left: 0px;
69
+ max-width: calc(100% - 32px);
70
+ pointer-events: none;
71
+ overflow: hidden;
72
+ text-overflow: ellipsis;
73
+ white-space: nowrap;
74
+ z-index: 3;
75
+ font-family: var(--md-sys-typescale-body-large-font);
76
+ font-weight: var(--md-sys-typescale-body-large-weight);
77
+ font-size: var(--md-sys-typescale-body-large-size);
78
+ letter-spacing: var(--md-sys-typescale-body-large-tracking);
79
+ line-height: var(--md-sys-typescale-body-large-height);
80
+ transform-origin: left center;
81
+ transition:
82
+ transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
83
+ color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
84
+ background-color: var(--md-sys-color-surface);
85
+ padding: 0 4px;
86
+ margin-left: -4px;
87
+ }
88
+
89
+ .label.floating {
90
+ transform: translateY(-28px) scale(0.75);
91
+ color: var(--md-sys-color-primary);
92
+ }
93
+
94
+ .editor {
95
+ width: 100%;
96
+ min-height: 24px;
97
+ background: transparent;
98
+ border: none;
99
+ outline: none;
100
+ padding: 0;
101
+ margin: 0;
102
+ color: var(--md-sys-color-on-surface);
103
+ font-family: inherit;
104
+ font-size: inherit;
105
+ letter-spacing: inherit;
106
+ line-height: inherit;
107
+ cursor: inherit;
108
+ word-wrap: break-word;
109
+ overflow-wrap: break-word;
110
+ white-space: pre-wrap;
111
+ resize: none;
112
+ }
113
+
114
+ .editor:empty::before {
115
+ content: attr(data-placeholder);
116
+ color: var(--md-sys-color-on-surface-variant);
117
+ opacity: 0.6;
118
+ }
119
+
120
+ .mention-chip {
121
+ display: inline-flex;
122
+ align-items: center;
123
+ margin: 0 2px;
124
+ vertical-align: baseline;
125
+ user-select: none;
126
+ }
127
+
128
+ .mention-chip ui-chip {
129
+ margin: 0;
130
+ font-size: inherit;
131
+ line-height: inherit;
132
+ }
133
+
134
+ .suggestions-popover {
135
+ position: fixed;
136
+ border: none;
137
+ margin: 0;
138
+ padding: 0;
139
+ background: var(--md-sys-color-surface-container);
140
+ box-shadow: var(--md-sys-elevation-2);
141
+ border-radius: var(--md-sys-shape-corner-medium);
142
+ max-height: 300px;
143
+ overflow-y: auto;
144
+ min-width: 200px;
145
+ max-width: 400px;
146
+ /* Popover API handles z-index and layering automatically */
147
+ }
148
+
149
+ .suggestion-item {
150
+ display: flex;
151
+ align-items: center;
152
+ padding: 12px 16px;
153
+ cursor: pointer;
154
+ border: none;
155
+ background: none;
156
+ width: 100%;
157
+ text-align: left;
158
+ font-family: inherit;
159
+ color: var(--md-sys-color-on-surface);
160
+ transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
161
+ }
162
+
163
+ .suggestion-item:hover {
164
+ background-color: var(--md-sys-color-surface-container-highest);
165
+ }
166
+
167
+ .suggestion-item.selected {
168
+ background-color: var(--md-sys-color-secondary-container);
169
+ color: var(--md-sys-color-on-secondary-container);
170
+ }
171
+
172
+ .suggestion-content {
173
+ flex: 1;
174
+ min-width: 0;
175
+ }
176
+
177
+ .suggestion-headline {
178
+ font-weight: var(--md-sys-typescale-label-large-weight);
179
+ font-size: var(--md-sys-typescale-label-large-size);
180
+ line-height: var(--md-sys-typescale-label-large-height);
181
+ margin-bottom: 2px;
182
+ }
183
+
184
+ .suggestion-supporting-text {
185
+ font-weight: var(--md-sys-typescale-body-small-weight);
186
+ font-size: var(--md-sys-typescale-body-small-size);
187
+ line-height: var(--md-sys-typescale-body-small-height);
188
+ color: var(--md-sys-color-on-surface-variant);
189
+ overflow: hidden;
190
+ text-overflow: ellipsis;
191
+ white-space: nowrap;
192
+ }
193
+
194
+ .suggestion-suffix {
195
+ margin-left: 8px;
196
+ font-weight: var(--md-sys-typescale-body-small-weight);
197
+ font-size: var(--md-sys-typescale-body-small-size);
198
+ line-height: var(--md-sys-typescale-body-small-height);
199
+ color: var(--md-sys-color-on-surface-variant);
200
+ flex-shrink: 0;
201
+ }
202
+
203
+ .supporting-text {
204
+ margin-top: 4px;
205
+ padding: 0 16px;
206
+ color: var(--md-sys-color-on-surface-variant);
207
+ font-family: var(--md-sys-typescale-body-small-font);
208
+ font-weight: var(--md-sys-typescale-body-small-weight);
209
+ font-size: var(--md-sys-typescale-body-small-size);
210
+ letter-spacing: var(--md-sys-typescale-body-small-tracking);
211
+ line-height: var(--md-sys-typescale-body-small-height);
212
+ }
213
+
214
+ /* Hover state */
215
+ :host(:hover:not(:focus-within):not([disabled])) .container {
216
+ border-color: var(--md-sys-color-on-surface);
217
+ }
218
+
219
+ /* Focus states */
220
+ :host(:focus-within) .container {
221
+ border-color: var(--md-sys-color-primary);
222
+ outline-width: 2px;
223
+ outline-offset: -2px;
224
+ }
225
+
226
+ :host(:focus-within) .label {
227
+ color: var(--md-sys-color-primary);
228
+ }
229
+
230
+ /* Disabled state */
231
+ :host([disabled]) {
232
+ pointer-events: none;
233
+ opacity: 0.38;
234
+ }
235
+
236
+ :host([disabled]) .container {
237
+ border-color: var(--md-sys-color-on-surface);
238
+ opacity: 0.12;
239
+ }
240
+
241
+ :host([disabled]) .label,
242
+ :host([disabled]) .editor {
243
+ color: var(--md-sys-color-on-surface);
244
+ opacity: 0.38;
245
+ }
246
+
247
+ /* Invalid state */
248
+ :host([invalid]) .container {
249
+ border-color: var(--md-sys-color-error);
250
+ }
251
+
252
+ :host([invalid]:focus-within) .container {
253
+ outline-color: var(--md-sys-color-error);
254
+ }
255
+
256
+ :host([invalid]) .label,
257
+ :host([invalid]:focus-within) .label {
258
+ color: var(--md-sys-color-error);
259
+ }
260
+
261
+ :host([invalid]) .supporting-text {
262
+ color: var(--md-sys-color-error);
263
+ }
264
+
265
+ /* Empty state for label floating */
266
+ .label:not(.floating) {
267
+ opacity: 1;
268
+ }
269
+
270
+ .has-content .label:not(.floating) {
271
+ opacity: 0;
272
+ }
273
+ `;
274
+ //# sourceMappingURL=MentionTextArea.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MentionTextArea.styles.js","sourceRoot":"","sources":["../../../../../src/elements/mention-textarea/internals/MentionTextArea.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+QjB,CAAA","sourcesContent":["import { css } from 'lit'\n\nexport default css`\n :host {\n display: inline-flex;\n flex-direction: column;\n vertical-align: top;\n outline: none;\n -webkit-tap-highlight-color: transparent;\n cursor: text;\n min-width: 200px;\n font-family: var(--md-sys-typescale-body-large-font);\n font-size: var(--md-sys-typescale-body-large-size);\n letter-spacing: var(--md-sys-typescale-body-large-tracking);\n line-height: var(--md-sys-typescale-body-large-height);\n }\n\n .surface {\n height: auto;\n min-height: 56px;\n position: relative;\n display: flex;\n align-items: flex-start;\n cursor: inherit;\n border-radius: var(--md-sys-shape-corner-extra-small);\n }\n\n .container {\n position: absolute;\n inset: 0;\n z-index: 1;\n border-radius: inherit;\n background-color: transparent;\n border: 1px solid var(--md-sys-color-outline);\n outline: 0px solid var(--md-sys-color-primary);\n outline-offset: -1px;\n transition:\n border-color 150ms cubic-bezier(0.4, 0, 0.2, 1),\n outline-width 150ms cubic-bezier(0.4, 0, 0.2, 1),\n outline-offset 150ms cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .content {\n height: inherit;\n min-height: inherit;\n display: flex;\n align-items: flex-start;\n justify-content: start;\n box-sizing: border-box;\n position: relative;\n z-index: 2;\n flex: 1;\n cursor: inherit;\n padding: 16px;\n }\n\n .body {\n flex: 1;\n box-sizing: border-box;\n position: relative;\n cursor: inherit;\n min-height: 24px;\n }\n\n .label {\n color: var(--md-sys-color-on-surface-variant);\n position: absolute;\n top: 0px;\n left: 0px;\n max-width: calc(100% - 32px);\n pointer-events: none;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n z-index: 3;\n font-family: var(--md-sys-typescale-body-large-font);\n font-weight: var(--md-sys-typescale-body-large-weight);\n font-size: var(--md-sys-typescale-body-large-size);\n letter-spacing: var(--md-sys-typescale-body-large-tracking);\n line-height: var(--md-sys-typescale-body-large-height);\n transform-origin: left center;\n transition:\n transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),\n color 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n background-color: var(--md-sys-color-surface);\n padding: 0 4px;\n margin-left: -4px;\n }\n\n .label.floating {\n transform: translateY(-28px) scale(0.75);\n color: var(--md-sys-color-primary);\n }\n\n .editor {\n width: 100%;\n min-height: 24px;\n background: transparent;\n border: none;\n outline: none;\n padding: 0;\n margin: 0;\n color: var(--md-sys-color-on-surface);\n font-family: inherit;\n font-size: inherit;\n letter-spacing: inherit;\n line-height: inherit;\n cursor: inherit;\n word-wrap: break-word;\n overflow-wrap: break-word;\n white-space: pre-wrap;\n resize: none;\n }\n\n .editor:empty::before {\n content: attr(data-placeholder);\n color: var(--md-sys-color-on-surface-variant);\n opacity: 0.6;\n }\n\n .mention-chip {\n display: inline-flex;\n align-items: center;\n margin: 0 2px;\n vertical-align: baseline;\n user-select: none;\n }\n\n .mention-chip ui-chip {\n margin: 0;\n font-size: inherit;\n line-height: inherit;\n }\n\n .suggestions-popover {\n position: fixed;\n border: none;\n margin: 0;\n padding: 0;\n background: var(--md-sys-color-surface-container);\n box-shadow: var(--md-sys-elevation-2);\n border-radius: var(--md-sys-shape-corner-medium);\n max-height: 300px;\n overflow-y: auto;\n min-width: 200px;\n max-width: 400px;\n /* Popover API handles z-index and layering automatically */\n }\n\n .suggestion-item {\n display: flex;\n align-items: center;\n padding: 12px 16px;\n cursor: pointer;\n border: none;\n background: none;\n width: 100%;\n text-align: left;\n font-family: inherit;\n color: var(--md-sys-color-on-surface);\n transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .suggestion-item:hover {\n background-color: var(--md-sys-color-surface-container-highest);\n }\n\n .suggestion-item.selected {\n background-color: var(--md-sys-color-secondary-container);\n color: var(--md-sys-color-on-secondary-container);\n }\n\n .suggestion-content {\n flex: 1;\n min-width: 0;\n }\n\n .suggestion-headline {\n font-weight: var(--md-sys-typescale-label-large-weight);\n font-size: var(--md-sys-typescale-label-large-size);\n line-height: var(--md-sys-typescale-label-large-height);\n margin-bottom: 2px;\n }\n\n .suggestion-supporting-text {\n font-weight: var(--md-sys-typescale-body-small-weight);\n font-size: var(--md-sys-typescale-body-small-size);\n line-height: var(--md-sys-typescale-body-small-height);\n color: var(--md-sys-color-on-surface-variant);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .suggestion-suffix {\n margin-left: 8px;\n font-weight: var(--md-sys-typescale-body-small-weight);\n font-size: var(--md-sys-typescale-body-small-size);\n line-height: var(--md-sys-typescale-body-small-height);\n color: var(--md-sys-color-on-surface-variant);\n flex-shrink: 0;\n }\n\n .supporting-text {\n margin-top: 4px;\n padding: 0 16px;\n color: var(--md-sys-color-on-surface-variant);\n font-family: var(--md-sys-typescale-body-small-font);\n font-weight: var(--md-sys-typescale-body-small-weight);\n font-size: var(--md-sys-typescale-body-small-size);\n letter-spacing: var(--md-sys-typescale-body-small-tracking);\n line-height: var(--md-sys-typescale-body-small-height);\n }\n\n /* Hover state */\n :host(:hover:not(:focus-within):not([disabled])) .container {\n border-color: var(--md-sys-color-on-surface);\n }\n\n /* Focus states */\n :host(:focus-within) .container {\n border-color: var(--md-sys-color-primary);\n outline-width: 2px;\n outline-offset: -2px;\n }\n\n :host(:focus-within) .label {\n color: var(--md-sys-color-primary);\n }\n\n /* Disabled state */\n :host([disabled]) {\n pointer-events: none;\n opacity: 0.38;\n }\n\n :host([disabled]) .container {\n border-color: var(--md-sys-color-on-surface);\n opacity: 0.12;\n }\n\n :host([disabled]) .label,\n :host([disabled]) .editor {\n color: var(--md-sys-color-on-surface);\n opacity: 0.38;\n }\n\n /* Invalid state */\n :host([invalid]) .container {\n border-color: var(--md-sys-color-error);\n }\n\n :host([invalid]:focus-within) .container {\n outline-color: var(--md-sys-color-error);\n }\n\n :host([invalid]) .label,\n :host([invalid]:focus-within) .label {\n color: var(--md-sys-color-error);\n }\n\n :host([invalid]) .supporting-text {\n color: var(--md-sys-color-error);\n }\n\n /* Empty state for label floating */\n .label:not(.floating) {\n opacity: 1;\n }\n\n .has-content .label:not(.floating) {\n opacity: 0;\n }\n`\n"]}
@@ -0,0 +1,13 @@
1
+ import type { CSSResultOrNative } from 'lit';
2
+ import Element from './internals/MentionTextArea.js';
3
+ export declare class MentionTextAreaElement extends Element {
4
+ static styles: CSSResultOrNative[];
5
+ }
6
+ declare global {
7
+ interface HTMLElementTagNameMap {
8
+ 'mention-textarea': MentionTextAreaElement;
9
+ }
10
+ }
11
+ export default MentionTextAreaElement;
12
+ export type { MentionSuggestion, MentionInsertEvent, MentionRemoveEvent } from './internals/MentionTextArea.js';
13
+ //# sourceMappingURL=ui-mention-textarea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-mention-textarea.d.ts","sourceRoot":"","sources":["../../../../src/elements/mention-textarea/ui-mention-textarea.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,KAAK,CAAA;AAE5C,OAAO,OAAO,MAAM,gCAAgC,CAAA;AAGpD,qBACa,sBAAuB,SAAQ,OAAO;IACjD,OAAgB,MAAM,EAAE,iBAAiB,EAAE,CAAW;CACvD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,sBAAsB,CAAA;KAC3C;CACF;AAED,eAAe,sBAAsB,CAAA;AACrC,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA"}
@@ -0,0 +1,28 @@
1
+ import { __esDecorate, __runInitializers } from "tslib";
2
+ import { customElement } from 'lit/decorators.js';
3
+ import Element from './internals/MentionTextArea.js';
4
+ import styles from './internals/MentionTextArea.styles.js';
5
+ let MentionTextAreaElement = (() => {
6
+ let _classDecorators = [customElement('mention-textarea')];
7
+ let _classDescriptor;
8
+ let _classExtraInitializers = [];
9
+ let _classThis;
10
+ let _classSuper = Element;
11
+ var MentionTextAreaElement = class extends _classSuper {
12
+ static { _classThis = this; }
13
+ static {
14
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
15
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
16
+ MentionTextAreaElement = _classThis = _classDescriptor.value;
17
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
18
+ }
19
+ static styles = [styles];
20
+ static {
21
+ __runInitializers(_classThis, _classExtraInitializers);
22
+ }
23
+ };
24
+ return MentionTextAreaElement = _classThis;
25
+ })();
26
+ export { MentionTextAreaElement };
27
+ export default MentionTextAreaElement;
28
+ //# sourceMappingURL=ui-mention-textarea.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-mention-textarea.js","sourceRoot":"","sources":["../../../../src/elements/mention-textarea/ui-mention-textarea.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,OAAO,MAAM,gCAAgC,CAAA;AACpD,OAAO,MAAM,MAAM,uCAAuC,CAAA;IAG7C,sBAAsB;4BADlC,aAAa,CAAC,kBAAkB,CAAC;;;;sBACU,OAAO;sCAAf,SAAQ,WAAO;;;;YAAnD,6KAEC;;;;QADC,MAAM,CAAU,MAAM,GAAwB,CAAC,MAAM,CAAC,CAAA;;YAD3C,uDAAsB;;;;;SAAtB,sBAAsB;AAUnC,eAAe,sBAAsB,CAAA","sourcesContent":["import type { CSSResultOrNative } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport Element from './internals/MentionTextArea.js'\nimport styles from './internals/MentionTextArea.styles.js'\n\n@customElement('mention-textarea')\nexport class MentionTextAreaElement extends Element {\n static override styles: CSSResultOrNative[] = [styles]\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'mention-textarea': MentionTextAreaElement\n }\n}\n\nexport default MentionTextAreaElement\nexport type { MentionSuggestion, MentionInsertEvent, MentionRemoveEvent } from './internals/MentionTextArea.js'\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Chip.styles.d.ts","sourceRoot":"","sources":["../../../../../src/md/chip/internals/Chip.styles.ts"],"names":[],"mappings":";AAEA,wBAqLC"}
1
+ {"version":3,"file":"Chip.styles.d.ts","sourceRoot":"","sources":["../../../../../src/md/chip/internals/Chip.styles.ts"],"names":[],"mappings":";AAEA,wBAuLC"}
@@ -13,6 +13,8 @@ export default css `
13
13
  letter-spacing: var(--md-sys-typescale-label-large-tracking);
14
14
  line-height: var(--md-sys-typescale-label-large-height);
15
15
 
16
+ white-space: normal;
17
+
16
18
  --md-ripple-hover-state-layer-color: var(--md-sys-color-on-surface);
17
19
  --md-ripple-focus-state-layer-color: var(--md-sys-color-on-surface);
18
20
  --md-ripple-pressed-state-layer-color: var(--md-sys-color-primary);
@@ -1 +1 @@
1
- {"version":3,"file":"Chip.styles.js","sourceRoot":"","sources":["../../../../../src/md/chip/internals/Chip.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqLjB,CAAA","sourcesContent":["import { css } from 'lit'\n\nexport default css`\n :host {\n display: inline-block;\n vertical-align: middle;\n outline: none;\n -webkit-tap-highlight-color: transparent;\n position: relative;\n user-select: none;\n\n font-family: var(--md-sys-typescale-label-large-font);\n font-size: var(--md-sys-typescale-label-large-size);\n letter-spacing: var(--md-sys-typescale-label-large-tracking);\n line-height: var(--md-sys-typescale-label-large-height);\n\n --md-ripple-hover-state-layer-color: var(--md-sys-color-on-surface);\n --md-ripple-focus-state-layer-color: var(--md-sys-color-on-surface);\n --md-ripple-pressed-state-layer-color: var(--md-sys-color-primary);\n\n --_leading-icon-color: currentColor;\n --_trailing-icon-color: currentColor;\n --_background-color: transparent;\n --_color: inherit;\n --_shadow: var(--md-sys-elevation-0);\n --_outline-color: transparent;\n --_outline-size: 0;\n --_inline-padding-start: 16px;\n --_inline-padding-end: 16px;\n --_avatar-size: 24px;\n --_avatar-shape: 24px;\n --_icon-size: 18px;\n\n height: 32px;\n border-radius: var(--md-sys-shape-corner-small);\n box-shadow: var(--_shadow);\n border: var(--_outline-size) solid var(--_outline-color);\n }\n\n .ripple {\n border-radius: inherit;\n transition: border-radius var(--md-sys-motion-duration-medium1) var(--md-sys-motion-easing-standard);\n }\n\n .ripple.activated {\n z-index: 1;\n }\n\n :host([disabled]) {\n --_background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);\n --_color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);\n --_leading-icon-color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);\n --_trailing-icon-color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);\n --_outline-color: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);\n box-shadow: none;\n cursor: not-allowed;\n pointer-events: none;\n }\n\n .surface {\n height: inherit;\n display: flex;\n align-items: center;\n justify-content: start;\n box-sizing: border-box;\n padding: 0 var(--_inline-padding-end) 0 var(--_inline-padding-start);\n border-radius: inherit;\n background-color: var(--_background-color);\n color: var(--_color);\n gap: 0;\n }\n\n .leading-icon {\n height: var(--_icon-size);\n width: 0px;\n overflow: hidden;\n transition: width 230ms var(--md-sys-animation-easing-standard);\n color: var(--_leading-icon-color);\n fill: currentColor;\n }\n\n .leading-icon::slotted(*) {\n width: var(--_icon-size);\n height: var(--_icon-size);\n margin-right: 8px;\n }\n\n slot[name='avatar']::slotted(*) {\n width: var(--_avatar-size);\n height: var(--_avatar-size);\n border-radius: var(--_avatar-shape);\n flex-shrink: 0;\n flex-grow: 0;\n margin-right: 8px;\n }\n\n .check-mark.checked {\n width: 18px;\n margin-right: 8px;\n }\n\n .trailing-icon {\n margin-left: 8px;\n width: 18px;\n height: 18px;\n color: var(--_trailing-icon-color);\n fill: currentColor;\n }\n\n :host([elevated]) {\n --_shadow: var(--md-sys-elevation-1);\n border: none;\n --_background-color: var(--md-sys-color-surface-container-low);\n }\n\n :host([elevated]:hover:not([disabled])) {\n --_shadow: var(--md-sys-elevation-2);\n }\n\n .surface.has-trailing-icon {\n --_inline-padding-end: 8px;\n }\n\n :host([type='assist']:not([disabled])) {\n --_outline-color: var(--md-sys-color-outline-variant);\n --_outline-size: 1px;\n --_color: var(--md-sys-color-on-surface);\n --_leading-icon-color: var(--md-sys-color-primary);\n }\n\n :host .has-icon {\n --_inline-padding-start: 8px;\n }\n\n :host .has-avatar {\n --_inline-padding-start: 4px;\n }\n\n :host([checked]) {\n --_inline-padding-start: 8px;\n --_background-color: var(--md-sys-color-secondary-container);\n }\n\n :host([type='filter']:not([disabled])) {\n --_leading-icon-color: var(--md-sys-color-primary);\n --_trailing-icon-color: var(--md-sys-on-surface-variant);\n --_outline-color: var(--md-sys-color-outline-variant);\n --_outline-size: 1px;\n --_color: var(--md-sys-color-on-surface-variant);\n }\n\n :host([type='filter'][checked]) {\n --_outline-size: 1px;\n }\n\n :host([type='filter'][checked]:not([disabled])) {\n --_leading-icon-color: var(--md-sys-color-on-secondary-container);\n --_trailing-icon-color: var(--md-sys-on-secondary-container);\n --_outline-color: var(--md-sys-color-secondary-container);\n --_color: var(--md-sys-color-on-secondary-container);\n }\n\n :host([type='input']:not([disabled])) {\n --_outline-color: var(--md-sys-color-outline-variant);\n --_outline-size: 1px;\n --_leading-icon-color: var(--md-sys-color-primary);\n --_trailing-icon-color: var(--md-sys-color-on-surface-variant);\n --_color: var(--md-sys-color-on-surface-variant);\n }\n\n :host([type='input'][checked]) {\n --_outline-size: 0px;\n }\n\n :host([type='suggestion']) {\n --_outline-size: 1px;\n --_outline-color: var(--md-sys-color-outline-variant);\n --_color: var(--md-sys-color-on-surface-variant);\n }\n\n :host([type='suggestion']:not([disabled])) {\n --_leading-icon-color: var(--md-sys-color-primary);\n }\n`\n"]}
1
+ {"version":3,"file":"Chip.styles.js","sourceRoot":"","sources":["../../../../../src/md/chip/internals/Chip.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuLjB,CAAA","sourcesContent":["import { css } from 'lit'\n\nexport default css`\n :host {\n display: inline-block;\n vertical-align: middle;\n outline: none;\n -webkit-tap-highlight-color: transparent;\n position: relative;\n user-select: none;\n\n font-family: var(--md-sys-typescale-label-large-font);\n font-size: var(--md-sys-typescale-label-large-size);\n letter-spacing: var(--md-sys-typescale-label-large-tracking);\n line-height: var(--md-sys-typescale-label-large-height);\n\n white-space: normal;\n\n --md-ripple-hover-state-layer-color: var(--md-sys-color-on-surface);\n --md-ripple-focus-state-layer-color: var(--md-sys-color-on-surface);\n --md-ripple-pressed-state-layer-color: var(--md-sys-color-primary);\n\n --_leading-icon-color: currentColor;\n --_trailing-icon-color: currentColor;\n --_background-color: transparent;\n --_color: inherit;\n --_shadow: var(--md-sys-elevation-0);\n --_outline-color: transparent;\n --_outline-size: 0;\n --_inline-padding-start: 16px;\n --_inline-padding-end: 16px;\n --_avatar-size: 24px;\n --_avatar-shape: 24px;\n --_icon-size: 18px;\n\n height: 32px;\n border-radius: var(--md-sys-shape-corner-small);\n box-shadow: var(--_shadow);\n border: var(--_outline-size) solid var(--_outline-color);\n }\n\n .ripple {\n border-radius: inherit;\n transition: border-radius var(--md-sys-motion-duration-medium1) var(--md-sys-motion-easing-standard);\n }\n\n .ripple.activated {\n z-index: 1;\n }\n\n :host([disabled]) {\n --_background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);\n --_color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);\n --_leading-icon-color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);\n --_trailing-icon-color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);\n --_outline-color: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);\n box-shadow: none;\n cursor: not-allowed;\n pointer-events: none;\n }\n\n .surface {\n height: inherit;\n display: flex;\n align-items: center;\n justify-content: start;\n box-sizing: border-box;\n padding: 0 var(--_inline-padding-end) 0 var(--_inline-padding-start);\n border-radius: inherit;\n background-color: var(--_background-color);\n color: var(--_color);\n gap: 0;\n }\n\n .leading-icon {\n height: var(--_icon-size);\n width: 0px;\n overflow: hidden;\n transition: width 230ms var(--md-sys-animation-easing-standard);\n color: var(--_leading-icon-color);\n fill: currentColor;\n }\n\n .leading-icon::slotted(*) {\n width: var(--_icon-size);\n height: var(--_icon-size);\n margin-right: 8px;\n }\n\n slot[name='avatar']::slotted(*) {\n width: var(--_avatar-size);\n height: var(--_avatar-size);\n border-radius: var(--_avatar-shape);\n flex-shrink: 0;\n flex-grow: 0;\n margin-right: 8px;\n }\n\n .check-mark.checked {\n width: 18px;\n margin-right: 8px;\n }\n\n .trailing-icon {\n margin-left: 8px;\n width: 18px;\n height: 18px;\n color: var(--_trailing-icon-color);\n fill: currentColor;\n }\n\n :host([elevated]) {\n --_shadow: var(--md-sys-elevation-1);\n border: none;\n --_background-color: var(--md-sys-color-surface-container-low);\n }\n\n :host([elevated]:hover:not([disabled])) {\n --_shadow: var(--md-sys-elevation-2);\n }\n\n .surface.has-trailing-icon {\n --_inline-padding-end: 8px;\n }\n\n :host([type='assist']:not([disabled])) {\n --_outline-color: var(--md-sys-color-outline-variant);\n --_outline-size: 1px;\n --_color: var(--md-sys-color-on-surface);\n --_leading-icon-color: var(--md-sys-color-primary);\n }\n\n :host .has-icon {\n --_inline-padding-start: 8px;\n }\n\n :host .has-avatar {\n --_inline-padding-start: 4px;\n }\n\n :host([checked]) {\n --_inline-padding-start: 8px;\n --_background-color: var(--md-sys-color-secondary-container);\n }\n\n :host([type='filter']:not([disabled])) {\n --_leading-icon-color: var(--md-sys-color-primary);\n --_trailing-icon-color: var(--md-sys-on-surface-variant);\n --_outline-color: var(--md-sys-color-outline-variant);\n --_outline-size: 1px;\n --_color: var(--md-sys-color-on-surface-variant);\n }\n\n :host([type='filter'][checked]) {\n --_outline-size: 1px;\n }\n\n :host([type='filter'][checked]:not([disabled])) {\n --_leading-icon-color: var(--md-sys-color-on-secondary-container);\n --_trailing-icon-color: var(--md-sys-on-secondary-container);\n --_outline-color: var(--md-sys-color-secondary-container);\n --_color: var(--md-sys-color-on-secondary-container);\n }\n\n :host([type='input']:not([disabled])) {\n --_outline-color: var(--md-sys-color-outline-variant);\n --_outline-size: 1px;\n --_leading-icon-color: var(--md-sys-color-primary);\n --_trailing-icon-color: var(--md-sys-color-on-surface-variant);\n --_color: var(--md-sys-color-on-surface-variant);\n }\n\n :host([type='input'][checked]) {\n --_outline-size: 0px;\n }\n\n :host([type='suggestion']) {\n --_outline-size: 1px;\n --_outline-color: var(--md-sys-color-outline-variant);\n --_color: var(--md-sys-color-on-surface-variant);\n }\n\n :host([type='suggestion']:not([disabled])) {\n --_leading-icon-color: var(--md-sys-color-primary);\n }\n`\n"]}
@@ -46,6 +46,9 @@
46
46
  <dt><a href="http-client/index.html">HTTP Client</a></dt>
47
47
  <dd>The HTTP Client UI library.</dd>
48
48
 
49
+ <dt><a href="mention-textarea/index.html">Mention Textarea</a></dt>
50
+ <dd>The mention-textarea component.</dd>
51
+
49
52
  <dt><a href="icons/index.html">Icons</a></dt>
50
53
  <dd>The icons library.</dd>
51
54
 
@@ -0,0 +1,19 @@
1
+ <!doctype html>
2
+ <html lang="en-GB">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
6
+ <title>Mention Textarea</title>
7
+ <link
8
+ href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
9
+ rel="stylesheet"
10
+ />
11
+ <link href="../../../src/styles/m3/tokens.css" rel="stylesheet" type="text/css" />
12
+ <link href="../../../src/styles/m3/theme.css" rel="stylesheet" type="text/css" />
13
+ <link href="../../page.css" rel="stylesheet" type="text/css" />
14
+ <script type="module" src="/.tmp/demo/elements/mention-textarea/index.js"></script>
15
+ </head>
16
+ <body>
17
+ <div id="app"></div>
18
+ </body>
19
+ </html>