Both were 40px or less, which is M3's state-layer size, not its 48px target: the paginator's steps and page numbers keep their 40px circle and now catch presses over 48, and the sort button — a title-small line and a 16px arrow, about 20px tall — does the same, since the cell's padding belongs to the cell and not to the button inside it. Plan step 20, findings IN-15 and IN-17. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9
58 lines
3.1 KiB
PHP
58 lines
3.1 KiB
PHP
{{-- Laravel's paginator (`$items->links()` outside Livewire), drawn in M3 as Livewire's is
|
||
(resources/views/pagination/livewire/tailwind.blade.php): links instead of actions, the current
|
||
page in secondary-container, "Page 2 of 7" on a phone. The package puts this in front of
|
||
`pagination::tailwind` (config `livewire-material.pagination`). --}}
|
||
|
||
@php
|
||
$step = 'grid size-10 place-items-center rounded-corner-full type-label-lg tabular-nums';
|
||
$live = $step.' state-layer focus-ring touch-target text-on-surface';
|
||
$dead = $step.' text-on-surface/38';
|
||
@endphp
|
||
|
||
@if ($paginator->hasPages())
|
||
<nav role="navigation" aria-label="{{ __('Pagination Navigation') }}" data-pagination class="flex items-center justify-between gap-4">
|
||
<p class="type-body-sm text-on-surface-variant">
|
||
<span class="medium:hidden">{{ __('Page :page of :pages', ['page' => $paginator->currentPage(), 'pages' => $paginator->lastPage()]) }}</span>
|
||
<span class="max-medium:hidden">{{ __(':first–:last of :total', ['first' => $paginator->firstItem(), 'last' => $paginator->lastItem(), 'total' => $paginator->total()]) }}</span>
|
||
</p>
|
||
|
||
<div class="flex items-center gap-1">
|
||
@if ($paginator->onFirstPage())
|
||
<span class="{{ $dead }}" aria-disabled="true" aria-label="{{ __('Previous') }}">
|
||
<x-livewire-material::icon name="chevron_left" class="size-6 rtl:-scale-x-100" />
|
||
</span>
|
||
@else
|
||
<a href="{{ $paginator->previousPageUrl() }}" rel="prev" class="{{ $live }}" aria-label="{{ __('Previous') }}">
|
||
<x-livewire-material::icon name="chevron_left" class="size-6 rtl:-scale-x-100" />
|
||
</a>
|
||
@endif
|
||
|
||
@foreach ($elements as $element)
|
||
@if (is_string($element))
|
||
<span class="{{ $dead }} max-medium:hidden" aria-disabled="true">{{ $element }}</span>
|
||
@endif
|
||
|
||
@if (is_array($element))
|
||
@foreach ($element as $page => $url)
|
||
@if ($page == $paginator->currentPage())
|
||
<span aria-current="page" class="{{ $step }} bg-secondary-container text-on-secondary-container max-medium:hidden">{{ $page }}</span>
|
||
@else
|
||
<a href="{{ $url }}" class="{{ $live }} max-medium:hidden" aria-label="{{ __('Go to page :page', ['page' => $page]) }}">{{ $page }}</a>
|
||
@endif
|
||
@endforeach
|
||
@endif
|
||
@endforeach
|
||
|
||
@if ($paginator->hasMorePages())
|
||
<a href="{{ $paginator->nextPageUrl() }}" rel="next" class="{{ $live }}" aria-label="{{ __('Next') }}">
|
||
<x-livewire-material::icon name="chevron_right" class="size-6 rtl:-scale-x-100" />
|
||
</a>
|
||
@else
|
||
<span class="{{ $dead }}" aria-disabled="true" aria-label="{{ __('Next') }}">
|
||
<x-livewire-material::icon name="chevron_right" class="size-6 rtl:-scale-x-100" />
|
||
</span>
|
||
@endif
|
||
</div>
|
||
</nav>
|
||
@endif
|