feat: redesign transport section with improved UX, accessibility, and type safety

- Replace native <select> filters with scrollable chip components (TransportFilterChips)
- Add skeleton shimmer loaders for taxi and shuttle cards (TaxiSkeletonCard, ShuttleSkeletonCard)
- Add search bar to TaxisLocales to filter by driver name
- Horizontal card layout on mobile for ViajesTuristicos, vertical on tablet+
- Add ARIA roles (tablist/tab, list/listitem, switch, alert, status) throughout
- Apply hover: hover media query so card hover effects don't trigger on touch
- Add prefers-reduced-motion support across all animations and transitions
- Add clear-filters button in empty states when filters are active
- Fix min-height to use 100dvh instead of 100vh for mobile nav bar
- Reduce tab slider animation from 0.5s to 0.32s
- Fix tsconfig: noUncheckedSideEffectImports false, add vite-plugin-pwa/client types
- Fix AppImage unused parameter warning (_e)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-04 17:48:23 -05:00
parent fefaf30f38
commit 5c1b62f55a
9 changed files with 1392 additions and 532 deletions

View File

@ -0,0 +1,167 @@
<template>
<div class="shuttle-skeleton glass-effect" aria-hidden="true">
<!-- image area -->
<div class="sk-image"></div>
<!-- body -->
<div class="sk-body">
<div class="sk-route">
<div class="sk-line sk-loc"></div>
<div class="sk-arrow"></div>
<div class="sk-line sk-loc"></div>
</div>
<div class="sk-tags">
<div class="sk-tag"></div>
<div class="sk-tag sk-tag--sm"></div>
</div>
<div class="sk-footer">
<div class="sk-price"></div>
<div class="sk-btn-circle"></div>
</div>
</div>
</div>
</template>
<style scoped>
@keyframes shimmer {
0% { background-position: -400px 0; }
100% { background-position: 400px 0; }
}
.shimmer {
background: linear-gradient(
90deg,
var(--bg-secondary) 25%,
var(--border-color) 50%,
var(--bg-secondary) 75%
);
background-size: 800px 100%;
animation: shimmer 1.4s infinite linear;
border-radius: 0.5rem;
}
.shuttle-skeleton {
border-radius: 1.5rem;
overflow: hidden;
border: 1px solid var(--border-color);
background: var(--card-bg);
display: flex;
flex-direction: column;
}
.sk-image {
height: 180px;
width: 100%;
background: linear-gradient(
90deg,
var(--bg-secondary) 25%,
var(--border-color) 50%,
var(--bg-secondary) 75%
);
background-size: 800px 100%;
animation: shimmer 1.4s infinite linear;
}
.sk-body {
padding: 1.25rem;
display: flex;
flex-direction: column;
gap: 1rem;
}
.sk-route {
display: flex;
align-items: center;
gap: 0.75rem;
}
.sk-line {
background: linear-gradient(
90deg,
var(--bg-secondary) 25%,
var(--border-color) 50%,
var(--bg-secondary) 75%
);
background-size: 800px 100%;
animation: shimmer 1.4s infinite linear;
border-radius: 0.375rem;
height: 14px;
}
.sk-loc {
width: 80px;
}
.sk-arrow {
width: 20px;
height: 12px;
border-radius: 3px;
background: var(--border-color);
flex-shrink: 0;
}
.sk-tags {
display: flex;
gap: 0.75rem;
}
.sk-tag {
height: 24px;
width: 80px;
border-radius: 0.5rem;
background: linear-gradient(
90deg,
var(--bg-secondary) 25%,
var(--border-color) 50%,
var(--bg-secondary) 75%
);
background-size: 800px 100%;
animation: shimmer 1.4s infinite linear;
}
.sk-tag--sm {
width: 60px;
}
.sk-footer {
display: flex;
align-items: center;
justify-content: space-between;
padding-top: 1rem;
border-top: 1px solid var(--border-color);
}
.sk-price {
height: 28px;
width: 64px;
border-radius: 0.375rem;
background: linear-gradient(
90deg,
var(--bg-secondary) 25%,
var(--border-color) 50%,
var(--bg-secondary) 75%
);
background-size: 800px 100%;
animation: shimmer 1.4s infinite linear;
}
.sk-btn-circle {
width: 44px;
height: 44px;
border-radius: 50%;
background: linear-gradient(
90deg,
var(--bg-secondary) 25%,
var(--border-color) 50%,
var(--bg-secondary) 75%
);
background-size: 800px 100%;
animation: shimmer 1.4s infinite linear;
}
@media (prefers-reduced-motion: reduce) {
.sk-image, .sk-line, .sk-tag, .sk-price, .sk-btn-circle {
animation: none;
background: var(--bg-secondary);
}
}
</style>

View File

@ -0,0 +1,139 @@
<template>
<div class="taxi-skeleton glass-effect" aria-hidden="true">
<div class="sk-top">
<div class="sk-avatar"></div>
<div class="sk-info">
<div class="sk-line sk-name"></div>
<div class="sk-line sk-meta"></div>
</div>
</div>
<div class="sk-chips">
<div class="sk-chip"></div>
<div class="sk-chip sk-chip--sm"></div>
</div>
<div class="sk-btn"></div>
</div>
</template>
<style scoped>
@keyframes shimmer {
0% { background-position: -400px 0; }
100% { background-position: 400px 0; }
}
.sk-base {
background: linear-gradient(
90deg,
var(--bg-secondary) 25%,
var(--border-color) 50%,
var(--bg-secondary) 75%
);
background-size: 800px 100%;
animation: shimmer 1.4s infinite linear;
border-radius: 0.5rem;
}
.taxi-skeleton {
border-radius: 1.5rem;
padding: 1.25rem;
border: 1px solid var(--border-color);
display: flex;
flex-direction: column;
gap: 1.25rem;
background: var(--card-bg);
}
.sk-top {
display: flex;
align-items: center;
gap: 1rem;
}
.sk-avatar {
width: 56px;
height: 56px;
border-radius: 1rem;
flex-shrink: 0;
composes: sk-base;
background: linear-gradient(
90deg,
var(--bg-secondary) 25%,
var(--border-color) 50%,
var(--bg-secondary) 75%
);
background-size: 800px 100%;
animation: shimmer 1.4s infinite linear;
}
.sk-info {
flex: 1;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.sk-line {
border-radius: 0.375rem;
background: linear-gradient(
90deg,
var(--bg-secondary) 25%,
var(--border-color) 50%,
var(--bg-secondary) 75%
);
background-size: 800px 100%;
animation: shimmer 1.4s infinite linear;
}
.sk-name {
height: 16px;
width: 60%;
}
.sk-meta {
height: 12px;
width: 40%;
}
.sk-chips {
display: flex;
gap: 0.5rem;
}
.sk-chip {
height: 28px;
width: 90px;
border-radius: 0.75rem;
background: linear-gradient(
90deg,
var(--bg-secondary) 25%,
var(--border-color) 50%,
var(--bg-secondary) 75%
);
background-size: 800px 100%;
animation: shimmer 1.4s infinite linear;
}
.sk-chip--sm {
width: 70px;
}
.sk-btn {
height: 48px;
border-radius: 1.125rem;
background: linear-gradient(
90deg,
var(--bg-secondary) 25%,
var(--border-color) 50%,
var(--bg-secondary) 75%
);
background-size: 800px 100%;
animation: shimmer 1.4s infinite linear;
}
@media (prefers-reduced-motion: reduce) {
.sk-avatar, .sk-line, .sk-chip, .sk-btn {
animation: none;
background: var(--bg-secondary);
}
}
</style>

View File

@ -0,0 +1,79 @@
<script setup lang="ts">
defineProps<{
options: { value: string; label: string; icon?: string }[]
modelValue: string
label?: string
}>()
defineEmits<{ 'update:modelValue': [value: string] }>()
</script>
<template>
<div class="filter-chips-group" :aria-label="label">
<button
v-for="opt in options"
:key="opt.value"
class="filter-chip"
:class="{ 'filter-chip--active': modelValue === opt.value }"
:aria-pressed="modelValue === opt.value"
@click="$emit('update:modelValue', opt.value)"
>
<span v-if="opt.icon" class="material-icons notranslate chip-icon" translate="no" aria-hidden="true">{{ opt.icon }}</span>
{{ opt.label }}
</button>
</div>
</template>
<style scoped>
.filter-chips-group {
display: flex;
gap: 0.5rem;
overflow-x: auto;
scroll-snap-type: x mandatory;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
padding-bottom: 2px; /* prevent clipping active border-bottom */
}
.filter-chips-group::-webkit-scrollbar {
display: none;
}
.filter-chip {
display: inline-flex;
align-items: center;
gap: 0.375rem;
padding: 0.5rem 1rem;
border-radius: 99px;
border: 1.5px solid var(--border-color);
background: var(--bg-primary);
color: var(--text-secondary);
font-size: 0.8125rem;
font-weight: 700;
white-space: nowrap;
cursor: pointer;
scroll-snap-align: start;
transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.15s ease;
min-height: 40px;
}
.filter-chip:active {
transform: scale(0.95);
}
.filter-chip--active {
background: var(--active-color);
border-color: var(--active-color);
color: #101820;
}
.chip-icon {
font-size: 1rem;
}
@media (prefers-reduced-motion: reduce) {
.filter-chip {
transition: none;
}
}
</style>