@meith/theme-phasebook 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meith/theme-phasebook",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "A theme for Meith with a familiar social shape, built on the default theme's slots.",
5
5
  "license": "LGPL-3.0-or-later",
6
6
  "repository": {
@@ -20,9 +20,9 @@
20
20
  "access": "public"
21
21
  },
22
22
  "dependencies": {
23
- "@meith/theme-default": "^0.5.0",
24
- "@meith/theme-kit": "^0.5.0",
25
- "@meith/ui": "^0.5.0"
23
+ "@meith/theme-default": "^0.7.0",
24
+ "@meith/theme-kit": "^0.7.0",
25
+ "@meith/ui": "^0.7.0"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "react": "^19.2.0"
@@ -3,7 +3,14 @@ import type { PaginationModel } from '@meith/theme-kit'
3
3
 
4
4
  import { NUMERIC, PILL } from '../shared'
5
5
 
6
- export function Pagination({ page, pageCount, pages, previousHref, nextHref }: PaginationModel) {
6
+ export function Pagination({
7
+ page,
8
+ pageCount,
9
+ pageCountIsExact,
10
+ pages,
11
+ previousHref,
12
+ nextHref,
13
+ }: PaginationModel) {
7
14
  if (pageCount <= 1 && previousHref === null && nextHref === null) return null
8
15
 
9
16
  const disabled = cn(PILL, 'pointer-events-none opacity-40')
@@ -55,7 +62,7 @@ export function Pagination({ page, pageCount, pages, previousHref, nextHref }: P
55
62
 
56
63
  <li className={`ml-1 text-xs whitespace-nowrap text-muted-foreground ${NUMERIC}`}>
57
64
  <span className="sr-only">Page </span>
58
- {page} of {pageCount}
65
+ {pageCountIsExact ? `${page} of ${pageCount}` : `Page ${page}`}
59
66
  </li>
60
67
  </ol>
61
68
 
@@ -11,6 +11,7 @@ export function SearchResults({
11
11
  newSearchHref,
12
12
  within,
13
13
  refine,
14
+ regions,
14
15
  }: SearchResultsModel) {
15
16
  return (
16
17
  <main id="board-content" tabIndex={-1} className={`${PAGE} flex-1 py-4 sm:py-6`}>
@@ -54,11 +55,12 @@ export function SearchResults({
54
55
  </ul>
55
56
  )}
56
57
 
57
- {nextHref !== null && (
58
- <a href={nextHref} className={PILL}>
59
- {nextLabel}
60
- </a>
61
- )}
58
+ {regions?.pagination ??
59
+ (nextHref !== null && (
60
+ <a href={nextHref} className={PILL}>
61
+ {nextLabel} →
62
+ </a>
63
+ ))}
62
64
 
63
65
  <section className="rounded-lg border border-border bg-card shadow-elevation">
64
66
  <form