@meith/theme-raidframe 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-raidframe",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "A gaming theme for Meith — guild, raid and match boards — 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/ui": "^0.5.0",
25
- "@meith/theme-kit": "^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"
@@ -5,8 +5,15 @@ import { MICRO, NUMERIC } from '../shared'
5
5
  const STEP =
6
6
  'inline-flex min-w-8 items-center justify-center border border-border bg-card px-2 py-1 font-mono text-[0.6875rem] font-semibold uppercase tracking-[0.12em] tabular-nums text-muted-foreground hover:border-primary/60 hover:text-primary'
7
7
 
8
- export function Pagination({ page, pageCount, pages, previousHref, nextHref }: PaginationModel) {
9
- if (pageCount <= 1) return null
8
+ export function Pagination({
9
+ page,
10
+ pageCount,
11
+ pageCountIsExact,
12
+ pages,
13
+ previousHref,
14
+ nextHref,
15
+ }: PaginationModel) {
16
+ if (pageCount <= 1 && previousHref === null && nextHref === null) return null
10
17
 
11
18
  return (
12
19
  <nav aria-label="Pagination" className="flex flex-wrap items-center gap-1.5">
@@ -40,8 +47,12 @@ export function Pagination({ page, pageCount, pages, previousHref, nextHref }: P
40
47
 
41
48
  <span className={`${MICRO} ml-2 normal-case`}>
42
49
  <span className="uppercase">page</span> <span className={NUMERIC}>{page}</span>
43
- {' / '}
44
- <span className={NUMERIC}>{pageCount}</span>
50
+ {pageCountIsExact && (
51
+ <>
52
+ {' / '}
53
+ <span className={NUMERIC}>{pageCount}</span>
54
+ </>
55
+ )}
45
56
  </span>
46
57
  </nav>
47
58
  )
@@ -14,6 +14,7 @@ export function SearchResults({
14
14
  newSearchHref,
15
15
  within,
16
16
  refine,
17
+ regions,
17
18
  }: SearchResultsModel) {
18
19
  return (
19
20
  <main
@@ -67,12 +68,16 @@ export function SearchResults({
67
68
  </ul>
68
69
  )}
69
70
 
70
- {nextHref !== null && (
71
- <p className="border-t border-border px-4 py-2">
72
- <a href={nextHref} className={`${MICRO} hover:text-primary`}>
73
- {nextLabel}
74
- </a>
75
- </p>
71
+ {regions?.pagination !== undefined ? (
72
+ <div className="border-t border-border px-4 py-2">{regions.pagination}</div>
73
+ ) : (
74
+ nextHref !== null && (
75
+ <p className="border-t border-border px-4 py-2">
76
+ <a href={nextHref} className={`${MICRO} hover:text-primary`}>
77
+ {nextLabel} →
78
+ </a>
79
+ </p>
80
+ )
76
81
  )}
77
82
  </Frame>
78
83