@@ -236,11 +236,11 @@ const chartCategories = computed(() => {
236236 return {
237237 positive: {
238238 name: ' Positive' ,
239- color: ' #22c55e '
239+ color: ' var(--ui-success) '
240240 },
241241 negative: {
242242 name: ' Negative' ,
243- color: ' #ef4444 '
243+ color: ' var(--ui-error) '
244244 }
245245 }
246246 }
@@ -392,28 +392,30 @@ function selectWorstPages(count: number) {
392392 .slice (0 , count )
393393 selectedPagePaths .value = pages .map (p => p .path )
394394}
395-
396- function clearSearch() {
397- pageSearchQuery .value = ' '
398- }
399395 </script >
400396
401397<template >
402398 <div class =" space-y-6" >
403- <div class =" flex items-center justify-between" >
404- <div class =" flex items-center gap-3" >
405- <UIcon :name =" chartIcon" class =" size-5 text-primary" />
406- <div >
407- <h3 class =" text-lg font-semibold" >
399+ <div class =" flex flex-col lg:flex-row lg:items-center lg:justify-between gap-4" >
400+ <Motion
401+ :key =" `header-${chartType}`"
402+ :initial =" { opacity: 0, y: 10 }"
403+ :animate =" { opacity: 1, y: 0 }"
404+ :transition =" { duration: 0.4, ease: 'easeInOut' }"
405+ class =" flex items-center gap-3"
406+ >
407+ <UIcon :name =" chartIcon" class =" size-6 sm:size-5 text-primary shrink-0" />
408+ <div class =" min-w-0" >
409+ <h3 class =" text-lg font-semibold truncate" >
408410 {{ chartTitle }}
409411 </h3 >
410412 <p class =" text-sm text-muted" >
411413 {{ chartDescription }}
412414 </p >
413415 </div >
414- </div >
416+ </Motion >
415417
416- <div class =" flex items-center gap-2" >
418+ <div class =" flex items-center max-sm:flex-row-reverse max-sm:justify-end gap-2 flex-wrap " >
417419 <AnimatePresence mode =" wait" >
418420 <Motion
419421 v-if =" chartType !== 'overall'"
@@ -460,7 +462,6 @@ function clearSearch() {
460462 :x-label =" dateRangeLabel"
461463 y-label =" Rating (out of 4)"
462464 :show-tooltip =" true"
463- class =" min-h-[300px]"
464465 />
465466
466467 <LineChart
@@ -502,36 +503,44 @@ function clearSearch() {
502503 <template #content >
503504 <UCard >
504505 <template #header >
506+ <UButton
507+ size =" sm"
508+ variant =" ghost"
509+ color =" neutral"
510+ icon =" i-lucide-x"
511+ class =" absolute top-2 right-2"
512+ @click =" showPageSelector = false"
513+ />
505514 <div class =" space-y-3" >
506515 <h3 class =" text-lg font-semibold" >
507516 Select Pages to {{ chartType === 'line' ? 'Track' : 'Compare' }}
508517 </h3 >
509- <div class =" flex items-center gap-3 flex-wrap" >
518+ <div class =" flex items-center gap-2 flex-wrap" >
510519 <span class =" text-sm text-muted font-medium" >Quick select:</span >
511520 <UButton
512521 size =" sm"
513- variant =" ghost "
522+ variant =" soft "
514523 color =" neutral"
515524 label =" Best Rated 5"
516525 @click =" selectBestRatedPages(5)"
517526 />
518527 <UButton
519528 size =" sm"
520- variant =" ghost "
529+ variant =" soft "
521530 color =" neutral"
522531 label =" Most Popular 5"
523532 @click =" selectTopPages(5)"
524533 />
525534 <UButton
526535 size =" sm"
527- variant =" ghost "
536+ variant =" soft "
528537 color =" neutral"
529538 label =" Worst Rated 5"
530539 @click =" selectWorstPages(5)"
531540 />
532541 <UButton
533542 size =" sm"
534- variant =" ghost "
543+ variant =" soft "
535544 color =" neutral"
536545 label =" Worst Rated 10"
537546 @click =" selectWorstPages(10)"
@@ -543,12 +552,22 @@ function clearSearch() {
543552 <div class =" mb-4" >
544553 <UInput
545554 v-model =" pageSearchQuery"
546- placeholder =" Search pages by title or path ..."
555+ placeholder =" Search pages..."
547556 icon =" i-lucide-search"
548- :trailing-icon =" pageSearchQuery ? 'i-lucide-x' : undefined"
549557 class =" w-full"
550- @trailing-click =" clearSearch"
551- />
558+ :ui =" { trailing: 'pe-1' }"
559+ >
560+ <template v-if =" pageSearchQuery ?.length " #trailing >
561+ <UButton
562+ color =" neutral"
563+ variant =" link"
564+ size =" sm"
565+ icon =" i-lucide-circle-x"
566+ aria-label =" Clear input"
567+ @click =" pageSearchQuery = ''"
568+ />
569+ </template >
570+ </UInput >
552571 </div >
553572
554573 <div class =" space-y-3 max-h-96 overflow-y-auto" >
@@ -559,54 +578,45 @@ function clearSearch() {
559578 :class =" { 'bg-primary/5 border-primary/20 hover:bg-primary/10': selectedPagePaths.includes(page.path) }"
560579 @click =" togglePageSelection(page.path)"
561580 >
562- <div class =" flex items-center gap-3 flex-1" >
581+ <div class =" flex items-center gap-3 flex-1 min-w-0 " >
563582 <UCheckbox
564583 :model-value =" selectedPagePaths.includes(page.path)"
565584 @update:model-value =" togglePageSelection(page.path)"
566585 />
567- <div class =" flex-1" >
568- <div class =" font-medium text-sm" >
586+ <div class =" flex-1 min-w-0 " >
587+ <div class =" font-medium text-sm truncate " >
569588 {{ page.title }}
570589 </div >
571- <code class =" text-xs text-muted" >{{ page.path }}</code >
590+ <code class =" text-xs text-muted truncate block " >{{ page.path }}</code >
572591 </div >
573592 </div >
574- <div class =" flex items-center gap-4 text-sm" >
593+ <div class =" flex items-center gap-2 sm:gap- 4 text-sm shrink-0 " >
575594 <div class =" text-center" >
576595 <div class =" font-semibold" >
577596 {{ page.total }}
578597 </div >
579598 <div class =" text-muted text-xs" >
580- responses
599+ resp.
581600 </div >
582601 </div >
583602 <div class =" text-center" >
584603 <div class =" font-semibold" :class =" page.score >= 3.5 ? 'text-success' : page.score >= 3.0 ? 'text-warning' : 'text-error'" >
585604 {{ page.score.toFixed(1) }}/4
586605 </div >
587606 <div class =" text-muted text-xs" >
588- avg score
607+ score
589608 </div >
590609 </div >
591610 </div >
592611 </div >
593612
594- <div v-if =" availablePages.length === 0" class =" text-center py-8 text-muted" >
595- <UIcon name =" i-lucide-search-x" class =" size-8 mx-auto mb-2" />
596- <p >No pages found matching "{{ pageSearchQuery }}"</p >
613+ <div v-if =" availablePages.length === 0" class =" text-center py-8" >
614+ <UIcon name =" i-lucide-search-x" class =" size-8 text-muted mx-auto mb-2" />
615+ <p class =" text-sm text-muted" >
616+ No pages found matching your search
617+ </p >
597618 </div >
598619 </div >
599-
600- <template #footer >
601- <div class =" flex justify-between items-center" >
602- <div class =" text-sm text-muted" >
603- {{ selectedPagePaths.length }} pages selected
604- </div >
605- <UButton @click =" showPageSelector = false" >
606- Done
607- </UButton >
608- </div >
609- </template >
610620 </UCard >
611621 </template >
612622 </UModal >
@@ -622,9 +632,9 @@ function clearSearch() {
622632 --vis-tooltip-value-color : rgba (0 , 0 , 0 , 1 ) !important ;
623633
624634 --vis-axis-grid-color : rgba (255 , 255 , 255 , 0.1 ) !important ;
625- --vis-axis-tick-label-color : rgba ( 255 , 255 , 255 , 0.6 ) !important ;
626- --vis-axis-label-color : rgba ( 255 , 255 , 255 , 0.8 ) !important ;
627- --vis-legend-label-color : rgba ( 255 , 255 , 255 , 0.8 ) !important ;
635+ --vis-axis-tick-label-color : var ( --ui-text-muted ) !important ;
636+ --vis-axis-label-color : var ( --ui-text-toned ) !important ;
637+ --vis-legend-label-color : var ( --ui-text-muted ) !important ;
628638
629639 --dot-pattern-color : #111827 ;
630640}
0 commit comments