@sarimarcus/content-sites-ui 0.51.1 → 0.52.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/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All packages in the platform release in lockstep; entries are per release version.
4
4
 
5
+ ## 0.52.0 (2026-10-27)
6
+
7
+ - Lockstep release, no change (SLA-3517).
8
+
9
+ ## 0.51.2 (2026-10-27)
10
+
11
+ - `ui`: `EraPeopleRow` expands "+N more" inline with a CSS-only checkbox toggle instead of a native `<details>`: the extra chips join the same wrapping row and the control reads "Show fewer", so the visible chips no longer drift out of line when it opens. The article pages with more than 3 people change (Córdoba 103, Granada 105 pages); the toggle works without JavaScript and needs `:has()` (SLA-3537).
12
+
5
13
  ## 0.51.1 (2026-10-27)
6
14
 
7
15
  - `ui`: `PeopleBand` throws a clear error when given a `pool` without `toLink`; `buildEraListing` takes its lastmod from core `maxDate`; the person page's era timeline orders people with `groupByEra`. No rendered change on Córdoba or Granada (proof.mjs: byte-identical, no `--allow`) (SLA-3536).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sarimarcus/content-sites-ui",
3
- "version": "0.51.1",
3
+ "version": "0.52.0",
4
4
  "description": "Universal Astro UI components, layout shell and design tokens shared by the content sites.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -50,6 +50,6 @@
50
50
  "@lucide/astro": "^1.23.0",
51
51
  "astro": "^7.0.6",
52
52
  "tailwindcss": "^4.1.18",
53
- "@sarimarcus/content-sites-core": "0.51.1"
53
+ "@sarimarcus/content-sites-core": "0.52.0"
54
54
  }
55
55
  }
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  /**
3
3
  * EraPeopleRow — the one compact row under an article intro: the era chip leads, then up to `visible` name-only person
4
- * chips, the rest behind a native <details> "+N more". Without an era a "People:" label leads. Renders nothing when
4
+ * chips, the rest behind a CSS-only checkbox toggle "+N more" that reveals them inline ("Show fewer" closes). Without an era a "People:" label leads. Renders nothing when
5
5
  * there is neither an era nor a person. The sm chips are 28px tall; `hit` stretches each tap target to 44px.
6
6
  */
7
7
  import type { EraDefinition } from '@sarimarcus/content-sites-core/eras';
@@ -43,20 +43,20 @@ const chip = (p: Person) => ({ name: p.name, href: p.href, dates: p.dates, size:
43
43
  <span class="text-xs font-semibold uppercase tracking-wide text-muted-foreground">{label}</span>
44
44
  )}
45
45
  {valid.length > 0 && (
46
- <ul class="flex flex-wrap items-center gap-x-1.5 gap-y-3" aria-label={era ? label : undefined}>
46
+ <ul class="group/people flex flex-wrap items-center gap-x-1.5 gap-y-3" aria-label={era ? label : undefined}>
47
47
  {shown.map((p) => <li><PersonChip {...chip(p)} /></li>)}
48
48
  {rest.length > 0 && (
49
- <li>
50
- <details class="group">
51
- <summary
52
- class:list={[PILL_BASE, hit, 'cursor-pointer list-none border border-border px-3 py-1.5 text-xs text-muted-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary [&::-webkit-details-marker]:hidden']}
53
- >{LABELS.eraPeopleRow.more(rest.length)}<span class="sr-only">{LABELS.eraPeopleRow.moreSr}</span></summary>
54
- <ul class="mt-3 flex flex-wrap gap-x-1.5 gap-y-3">
55
- {rest.map((p) => <li><PersonChip {...chip(p)} /></li>)}
56
- </ul>
57
- </details>
49
+ <li class="order-last">
50
+ <label
51
+ class:list={[PILL_BASE, hit, 'cursor-pointer border border-border px-3 py-1.5 text-xs text-muted-foreground hover:bg-muted has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-primary']}
52
+ >
53
+ <input type="checkbox" class="sr-only" />
54
+ <span class="group-has-[:checked]/people:hidden">{LABELS.eraPeopleRow.more(rest.length)}<span class="sr-only">{LABELS.eraPeopleRow.moreSr}</span></span>
55
+ <span class="hidden group-has-[:checked]/people:inline">{LABELS.eraPeopleRow.fewer}</span>
56
+ </label>
58
57
  </li>
59
58
  )}
59
+ {rest.map((p) => <li class="hidden group-has-[:checked]/people:list-item"><PersonChip {...chip(p)} /></li>)}
60
60
  </ul>
61
61
  )}
62
62
  </div>
@@ -83,7 +83,7 @@ export const LABELS = {
83
83
  articleFeatureCard: { readLabel: 'Read article', updatedLabel: 'Updated' },
84
84
  eraChip: { ariaLabel: (label: string, range: string) => `${label}, ${range}: see this era on the chronology` },
85
85
  personChip: { ariaLabel: (name: string, dates?: string) => `${name}${dates ? `, ${dates}` : ''}: read their profile` },
86
- eraPeopleRow: { peopleLabel: 'People:', more: (n: number) => `+${n} more`, moreSr: ' people' },
86
+ eraPeopleRow: { peopleLabel: 'People:', more: (n: number) => `+${n} more`, moreSr: ' people', fewer: 'Show fewer' },
87
87
  personCard: { cta: 'Read the profile' },
88
88
  peopleChips: { heading: 'People in this story' },
89
89
  peopleBand: { allLabel: 'All historical figures' },