From 2acd9ab4927b1ef58de88de3edf53e8a153c5d87 Mon Sep 17 00:00:00 2001 From: Andreas Reinhold / reini Date: Mon, 14 Sep 2026 15:47:07 +0200 Subject: [PATCH] Draw the paginators without Tailwind Laravel's and Livewire's paginator views render data-md-pagination hooks; pagination.css draws the row, the 40px steps with their 48px targets, the selected page and the swap to "Page n of m" below 600px (plan step 36, inputs). It imports button.css for the simple paginators, now that the button is rewritten. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9 --- resources/css/components.css | 1 + resources/css/components/pagination.css | 87 +++++++++++++++++++ .../laravel/simple-tailwind.blade.php | 2 +- .../pagination/laravel/tailwind.blade.php | 43 ++++----- .../livewire/simple-tailwind.blade.php | 2 +- .../pagination/livewire/tailwind.blade.php | 47 +++++----- tests/Browser/DataTest.php | 14 ++- tests/Feature/Components/DataTest.php | 27 ++++-- 8 files changed, 160 insertions(+), 63 deletions(-) create mode 100644 resources/css/components/pagination.css diff --git a/resources/css/components.css b/resources/css/components.css index ea00ad5f..a4ed3014 100644 --- a/resources/css/components.css +++ b/resources/css/components.css @@ -40,6 +40,7 @@ @import './components/search.css'; @import './components/table.css'; @import './components/sort-header.css'; +@import './components/pagination.css'; /* Containment */ diff --git a/resources/css/components/pagination.css b/resources/css/components/pagination.css new file mode 100644 index 00000000..e26ea35f --- /dev/null +++ b/resources/css/components/pagination.css @@ -0,0 +1,87 @@ +/* + * The paginators, Laravel's and Livewire's, drawn in M3 (resources/views/pagination/**): the package + * puts its views in front of the frameworks' `tailwind` and `simple-tailwind` ones, whose names they + * keep. + * + * The numbered paginator is a row: on its start, what the page holds in body-small on-surface-variant + * — "21–30 of 95", or "Page 3 of 10" below `medium` (600px), where the page numbers give way and only + * previous and next stay — and on its end the steps, 4px apart. A step is a 40px circle in label-large + * with tabular figures, M3's icon-button geometry: a live one in on-surface with the state layer, the + * focus ring and a 48px target (`md-state-layer`, `md-focus-ring`, `md-touch-target`, + * foundation/interaction.css); the current page is the selected state, secondary-container, never the + * action colour — it is where you are, not what to do next; an unreachable one (`aria-disabled`) is + * on-surface at 38%. The chevrons mirror in a right-to-left page. The simple paginator is the same + * row holding two outlined buttons. + * + * [data-md-pagination] the