1import { Controller } from '@hotwired/stimulus' 2 3export default class extends Controller { 4 static targets = ['button', 'item', 'focus'] 5 6 7 show() { 8 this.itemTargets.forEach(item => { 9 item.classList.remove('hidden') 10 }) 11 12 if (this.hasButtonTarget) { 13 this.buttonTarget.setAttribute('aria-expanded', true) 14 } 15 16 if (this.hasFocusTarget) { 17 this.focusTarget.focus() 18 } 19 20 // Prevent scrolling outside of the modal 21 document.body.classList.add('overflow-hidden') 22 } 23 24 hide() { 25 this.itemTargets.forEach(item => { 26 item.classList.add('hidden') 27 }) 28 29 if (this.hasButtonTarget) { 30 this.buttonTarget.setAttribute('aria-expanded', false) 31 } 32 33 // Allow scrolling outside of the modal 34 document.body.classList.remove('overflow-hidden') 35 } 36}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.