Minor fixes

This commit is contained in:
Ronan Berder
2025-04-22 17:43:19 +08:00
parent 207d89e78a
commit 0f6b117e06
9 changed files with 92 additions and 157 deletions
+2 -2
View File
@@ -65,7 +65,7 @@
$content: {
':inert'() { return !this.open },
'@click'(e) { e.target === this.$el && this.closeOnOverlayClick && this.hide() },
'@keydown.escape.window'() { this.open && this.hide() },
'@keydown.escape.prevent'() { this.open && this.hide() },
'x-cloak': ''
}
}));
@@ -123,7 +123,7 @@
{{ key }}="{{ value }}"
{% endfor %}
>
{{ caller() }}
{% if caller %}{{ caller() }}{% endif %}
</section>
{% endif %}
{% if footer %}
+2 -2
View File
@@ -75,7 +75,7 @@
$content: {
'@click'(e) { this.handleNavItemClick(e) },
'@keydown.escape.window'() { this.handleEscape() },
'@keydown.escape.prevent'() { this.handleEscape() },
'@keydown.down.prevent'() { this.nextNavItem() },
'@keydown.up.prevent'() { this.prevNavItem() },
'@keydown.home.prevent'() { this.focusNavItem(0) },
@@ -123,7 +123,7 @@
{{ key }}="{{ value }}"
{% endfor %}
>
{{ caller() }}
{% if caller %}{{ caller() }}{% endif %}
</div>
</div>
{% endmacro %}
+3 -3
View File
@@ -118,7 +118,7 @@
$trigger: {
'@click'() { this.open = !this.open; this.focusOnSelectedOption(); },
'@keydown.escape.window'() {
'@keydown.escape.prevent'() {
this.open = false;
this.$refs.trigger.focus();
},
@@ -156,7 +156,7 @@
x-data="select('{{ name }}', '{{ selected }}')"
@click.away="open = false"
{% if id %}id="{{ id }}"{% endif %}
{% for key, value in trigger_attrs %}
{% for key, value in main_attrs %}
{% if key != 'class' %}{{ key }}="{{ value }}"{% endif %}
{% endfor %}
>
@@ -214,7 +214,7 @@
{{ key }}="{{ value }}"
{% endfor %}
>
{{ caller() }}
{% if caller %}{{ caller() }}{% endif %}
</div>
</div>
{% if name %}
+2 -2
View File
@@ -29,7 +29,7 @@
$menu: {
'@click'(e) { this.handleMenuItemClick(e) },
'@keydown.escape.window'() { this.handleEscape() },
'@keydown.escape.prevent'() { this.handleEscape() },
'@keydown.down.prevent'() { this.nextItem() },
'@keydown.up.prevent'() { this.prevItem() },
'@keydown.home.prevent'() { this.focusItem(0) },
@@ -113,7 +113,7 @@
{{ key }}="{{ value }}"
{% endfor %}
>
{{ caller() }}
{% if caller %}{{ caller() }}{% endif %}
</nav>
</div>
{% endmacro %}
+1 -1
View File
@@ -44,7 +44,7 @@
$toast: {
['@mouseenter']() { this.$store.toaster.isPaused = true },
['@mouseleave']() { this.$store.toaster.isPaused = false },
['@keydown.escape.window']() { this.close() },
['@keydown.escape.prevent']() { this.close() },
},
}));
});