1import { Controller } from "@hotwired/stimulus" 2 3export default class extends Controller { 4 static targets = ["panel", "trigger"] 5 6 toggle(event) { 7 event.stopPropagation() 8 const isOpen = this.panelTarget.classList.toggle("site-header__nav-group--open") 9 this.triggerTarget.setAttribute("aria-expanded", String(isOpen)) 10 } 11 12 closeOnOutsideClick(event) { 13 if (!this.element.contains(event.target)) { 14 this.panelTarget.classList.remove("site-header__nav-group--open") 15 this.triggerTarget.setAttribute("aria-expanded", "false") 16 } 17 } 18}
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.