Merge branch 'main' into unique-notifications

This commit is contained in:
Jorge Manrubia
2025-11-13 09:38:01 +01:00
26 changed files with 153 additions and 64 deletions
@@ -5,7 +5,8 @@ import { limitHeightToViewport } from "helpers/sizing_helpers"
export default class extends Controller {
static targets = [ "dialog" ]
static values = {
modal: { type: Boolean, default: false }
modal: { type: Boolean, default: false },
sizing: { type: Boolean, default: true }
}
connect() {
@@ -22,7 +23,7 @@ export default class extends Controller {
orient(this.dialogTarget)
}
limitHeightToViewport(this.dialogTarget, true)
limitHeightToViewport(this.dialogTarget, this.sizingValue)
this.#loadLazyFrames()
this.dialogTarget.setAttribute("aria-hidden", "false")
@@ -43,6 +44,7 @@ export default class extends Controller {
this.dialogTarget.blur()
orient(this.dialogTarget, false)
limitHeightToViewport(this.dialogTarget, false)
this.dispatch("close")
}
closeOnClickOutside({ target }) {
@@ -20,4 +20,9 @@ export default class extends Controller {
this.dispatch("changed")
}
clearInput() {
if (!this.hasInputTarget) return
this.inputTarget.value = ""
}
}