@uvalib/web-components 1.8.5 → 1.10.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.
Files changed (98) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +719 -72
  3. package/bin/install-skill.mjs +174 -54
  4. package/dist/base/clipboard.d.ts +9 -0
  5. package/dist/base/clipboard.js +30 -0
  6. package/dist/base/clipboard.js.map +1 -0
  7. package/dist/base.css +301 -3
  8. package/dist/components/uvalib-citation/UvalibCitation.d.ts +124 -0
  9. package/dist/components/uvalib-citation/UvalibCitation.js +545 -0
  10. package/dist/components/uvalib-citation/UvalibCitation.js.map +1 -0
  11. package/dist/components/uvalib-citation/uvalib-citation.d.ts +1 -0
  12. package/dist/components/uvalib-citation/uvalib-citation.js +4 -0
  13. package/dist/components/uvalib-citation/uvalib-citation.js.map +1 -0
  14. package/dist/components/uvalib-dialog/UvalibDialog.d.ts +167 -0
  15. package/dist/components/uvalib-dialog/UvalibDialog.js +688 -0
  16. package/dist/components/uvalib-dialog/UvalibDialog.js.map +1 -0
  17. package/dist/components/uvalib-dialog/uvalib-dialog.d.ts +1 -0
  18. package/dist/components/uvalib-dialog/uvalib-dialog.js +4 -0
  19. package/dist/components/uvalib-dialog/uvalib-dialog.js.map +1 -0
  20. package/dist/components/uvalib-filter/UvalibFilter.d.ts +92 -9
  21. package/dist/components/uvalib-filter/UvalibFilter.js +748 -60
  22. package/dist/components/uvalib-filter/UvalibFilter.js.map +1 -1
  23. package/dist/components/uvalib-list-filter/UvalibListFilter.d.ts +162 -0
  24. package/dist/components/uvalib-list-filter/UvalibListFilter.js +685 -0
  25. package/dist/components/uvalib-list-filter/UvalibListFilter.js.map +1 -0
  26. package/dist/components/uvalib-list-filter/uvalib-list-filter.d.ts +1 -0
  27. package/dist/components/uvalib-list-filter/uvalib-list-filter.js +4 -0
  28. package/dist/components/uvalib-list-filter/uvalib-list-filter.js.map +1 -0
  29. package/dist/components/uvalib-metadata/UvalibMetadata.js +3 -4
  30. package/dist/components/uvalib-metadata/UvalibMetadata.js.map +1 -1
  31. package/dist/components/uvalib-pagefind-search/UvalibPagefindSearch.d.ts +28 -1
  32. package/dist/components/uvalib-pagefind-search/UvalibPagefindSearch.js +139 -3
  33. package/dist/components/uvalib-pagefind-search/UvalibPagefindSearch.js.map +1 -1
  34. package/dist/custom-elements.json +9503 -6086
  35. package/dist/edition.css +758 -0
  36. package/dist/index.d.ts +6 -0
  37. package/dist/index.js +3 -0
  38. package/dist/index.js.map +1 -1
  39. package/dist/styles/base.js +112 -1
  40. package/dist/styles/base.js.map +1 -1
  41. package/dist/styles/color-scheme.js +4 -0
  42. package/dist/styles/color-scheme.js.map +1 -1
  43. package/dist/styles/controls.js +6 -0
  44. package/dist/styles/controls.js.map +1 -1
  45. package/dist/styles/edition.d.ts +1 -0
  46. package/dist/styles/edition.js +747 -0
  47. package/dist/styles/edition.js.map +1 -0
  48. package/dist/styles/field-text.d.ts +1 -0
  49. package/dist/styles/field-text.js +21 -0
  50. package/dist/styles/field-text.js.map +1 -0
  51. package/dist/styles/hidden.js +15 -1
  52. package/dist/styles/hidden.js.map +1 -1
  53. package/dist/styles/layout.d.ts +1 -0
  54. package/dist/styles/layout.js +92 -0
  55. package/dist/styles/layout.js.map +1 -0
  56. package/dist/styles/table.d.ts +1 -0
  57. package/dist/styles/table.js +164 -0
  58. package/dist/styles/table.js.map +1 -0
  59. package/dist/tokens.css +4 -0
  60. package/dist-cdn/base.css +301 -3
  61. package/dist-cdn/chunks/{base-B3tNX103.js → base-DXkGlSgH.js} +113 -2
  62. package/dist-cdn/chunks/base-DXkGlSgH.js.map +1 -0
  63. package/dist-cdn/chunks/clipboard-CNG7Y_5X.js +18 -0
  64. package/dist-cdn/chunks/clipboard-CNG7Y_5X.js.map +1 -0
  65. package/dist-cdn/chunks/if-defined-COiQb-gl.js +6 -0
  66. package/dist-cdn/chunks/if-defined-COiQb-gl.js.map +1 -0
  67. package/dist-cdn/chunks/{site-header-CEmNtmk5.js → site-header-B78a_ldi.js} +27 -22
  68. package/dist-cdn/chunks/site-header-B78a_ldi.js.map +1 -0
  69. package/dist-cdn/chunks/{site-main-nav-CAwKq_x5.js → site-main-nav-CmMq2t8t.js} +52 -51
  70. package/dist-cdn/chunks/site-main-nav-CmMq2t8t.js.map +1 -0
  71. package/dist-cdn/custom-elements.json +9503 -6086
  72. package/dist-cdn/edition.css +758 -0
  73. package/dist-cdn/manifest.json +7 -3
  74. package/dist-cdn/site-header.js +1 -1
  75. package/dist-cdn/site-main-nav.js +1 -1
  76. package/dist-cdn/site-page.js +3 -3
  77. package/dist-cdn/site-style.js +1 -1
  78. package/dist-cdn/skills/uvalib-web-components/SKILL.md +34 -10
  79. package/dist-cdn/skills/uvalib-web-components/reference/components.md +188 -9
  80. package/dist-cdn/tokens.css +4 -0
  81. package/dist-cdn/uvalib-citation.js +382 -0
  82. package/dist-cdn/uvalib-citation.js.map +1 -0
  83. package/dist-cdn/uvalib-dialog.js +419 -0
  84. package/dist-cdn/uvalib-dialog.js.map +1 -0
  85. package/dist-cdn/uvalib-filter.js +603 -69
  86. package/dist-cdn/uvalib-filter.js.map +1 -1
  87. package/dist-cdn/uvalib-list-filter.js +451 -0
  88. package/dist-cdn/uvalib-list-filter.js.map +1 -0
  89. package/dist-cdn/uvalib-metadata.js +49 -49
  90. package/dist-cdn/uvalib-metadata.js.map +1 -1
  91. package/dist-cdn/uvalib-pagefind-search.js +118 -48
  92. package/dist-cdn/uvalib-pagefind-search.js.map +1 -1
  93. package/package.json +14 -1
  94. package/skills/uvalib-web-components/SKILL.md +34 -10
  95. package/skills/uvalib-web-components/reference/components.md +188 -9
  96. package/dist-cdn/chunks/base-B3tNX103.js.map +0 -1
  97. package/dist-cdn/chunks/site-header-CEmNtmk5.js.map +0 -1
  98. package/dist-cdn/chunks/site-main-nav-CAwKq_x5.js.map +0 -1
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: uvalib-web-components
3
- description: Use when building or editing UVA Library web pages or sites with @uvalib/web-components: the header, footer, page wrapper and other page chrome (<site-page>, <site-header>, <site-main-nav>, <site-footer>, <site-alerts>, <site-analytics>/<uvalib-analytics>, <site-style>), and other uvalib-* components (breadcrumbs, cards, pager, tabs, contents, metadata, chips, tags, results count, filter, filter drawer, date range, date histogram, combobox, map (Leaflet), lightbox, photo grid, image regions, back to top, Pagefind search), the library hours, events and bento-box elements (e.g. <uvalib-card>, <uvalib-chip-group>, <library-weekly-hours>), base.css classes, or script/link URLs on unpkg.internal.lib.virginia.edu (incl. migrating old /web-components/latest/ or cdn-v URLs). Covers CDN vs npm, version pinning, shadow vs light DOM, theming with --uva-* tokens, WCAG 2.2 AA accessibility testing, requesting components via GitHub issues, and a verification checklist.
3
+ description: Use when building or editing UVA Library web pages or sites with @uvalib/web-components: page chrome (<site-page>, <site-header>, <site-main-nav>, <site-footer>, <site-alerts>, <site-analytics>/<uvalib-analytics>, <site-style>), and other uvalib-* components (breadcrumbs, cards, pager, tabs, contents, metadata, citation, chips, tags, results count, filter, filter drawer, dialog, date range, date histogram, combobox, list filter, map (Leaflet), lightbox, photo grid, image regions, back to top, Pagefind search, edition.css for TEI texts), the library hours, events and bento-box elements (e.g. <uvalib-card>, <uvalib-chip-group>, <library-weekly-hours>), base.css classes (incl. tables, sidebar layout), or script/link URLs on unpkg.internal.lib.virginia.edu (incl. old /web-components/latest/ or cdn-v URLs). Covers CDN vs npm, version pinning, shadow vs light DOM, theming with --uva-* tokens, WCAG 2.2 AA accessibility testing, requesting components via GitHub issues, and a verification checklist.
4
4
  ---
5
5
 
6
6
  # UVA Library web components
7
7
 
8
- `@uvalib/web-components` provides the UVA Library page chrome as custom elements: `<site-page>` (skip link, header with the library main navigation, one `<main>`, footer), `<site-header>`, `<site-main-nav>` (the main navigation, rendered by the header), `<site-footer>`, `<site-analytics>` (Matomo; also registered as `<uvalib-analytics>`) and `<site-style>` (legacy compatibility), plus `<uvalib-breadcrumbs>` (the breadcrumb trail), `<uvalib-contents>` (sub-navigation or a table of contents) and `<uvalib-metadata>` (a record's details, credit, rights and how to cite), all in section 2, `<uvalib-card>`, `<uvalib-card-grid>` and `<uvalib-pager>` (cards and paging, section 5), `<uvalib-tabs>` (tabbed panels), `<uvalib-back-to-top>` (a back-to-top button for long pages) and `<site-alerts>` (the live library alerts, which `<site-page>` shows itself). It also ships search-page components, `<uvalib-filter>`, `<uvalib-date-range>` and `<uvalib-date-histogram>`, `<uvalib-chip-group>` for segmented controls, filter chips and suggestion chips, `<uvalib-combobox>`, a text field that suggests values as you type, and `<uvalib-filter-drawer>`, the filters as a sidebar or a modal panel on phones (section 6), and three library-hours elements for library.virginia.edu, `<site-hours-section>`, `<library-weekly-hours>` and `<library-hours-setup>`, `<events-section>` for upcoming library events and `<bento-box>` for the library's search results page (section 7), and `pagefind.css` with `<uvalib-pagefind-search>` for a static site's Pagefind search, and `<uvalib-tag-list>`, `<uvalib-results-count>` and `base.css`'s badge, toolbar, empty-state and skeleton classes for results lists (section 6), and `<uvalib-lightbox>`, `<uvalib-photo-grid>` and `<uvalib-image-regions>` for images and `<uvalib-map>` for a map of places over the page's own Leaflet, with a linked list (section 8). Tag names are stable.
8
+ `@uvalib/web-components` provides the UVA Library page chrome as custom elements: `<site-page>` (skip link, header with the library main navigation, one `<main>`, footer), `<site-header>`, `<site-main-nav>` (the main navigation, rendered by the header), `<site-footer>`, `<site-analytics>` (Matomo; also registered as `<uvalib-analytics>`) and `<site-style>` (legacy compatibility), plus `<uvalib-breadcrumbs>` (the breadcrumb trail), `<uvalib-contents>` (sub-navigation or a table of contents), `<uvalib-metadata>` (a record's details, credit, rights and how to cite) and `<uvalib-citation>` (a citation in several formats with Copy citation), all in section 2, `<uvalib-card>`, `<uvalib-card-grid>` and `<uvalib-pager>` (cards and paging, section 5), `<uvalib-tabs>` (tabbed panels), `<uvalib-back-to-top>` (a back-to-top button for long pages) and `<site-alerts>` (the live library alerts, which `<site-page>` shows itself). It also ships search-page components, `<uvalib-filter>`, `<uvalib-date-range>` and `<uvalib-date-histogram>`, `<uvalib-chip-group>` for segmented controls, filter chips and suggestion chips, `<uvalib-combobox>`, a text field that suggests values as you type, `<uvalib-list-filter>`, a field that filters a long list on the page as you type, and `<uvalib-filter-drawer>`, the filters as a sidebar or a modal panel on phones, and `<uvalib-dialog>`, a modal dialog for search tips, Cite and short forms (section 6), and three library-hours elements for library.virginia.edu, `<site-hours-section>`, `<library-weekly-hours>` and `<library-hours-setup>`, `<events-section>` for upcoming library events and `<bento-box>` for the library's search results page (section 7), and `pagefind.css` with `<uvalib-pagefind-search>` for a static site's Pagefind search, `edition.css` for reading TEI texts converted to HTML, and `<uvalib-tag-list>`, `<uvalib-results-count>` and `base.css`'s badge, toolbar, empty-state and skeleton classes for results lists (section 6), and `<uvalib-lightbox>`, `<uvalib-photo-grid>` and `<uvalib-image-regions>` for images and `<uvalib-map>` for a map of places over the page's own Leaflet, with a linked list (section 8). Tag names are stable.
9
9
 
10
10
  Authority rule: https://www.library.virginia.edu and the UVA Library design system are the source of truth for how the chrome looks and what it says. Do not re-create, copy or restyle the header, footer, logo or links by hand. Use the components, and change appearance only through the theming surface below.
11
11
 
@@ -31,7 +31,7 @@ Loading rules:
31
31
 
32
32
  - One script is enough for the page chrome: `site-page.js` also loads the header (with its main navigation) and footer. For Matomo, give `<site-page>` a `matomo-id` (it loads the analytics code itself), or add `site-analytics.js` and a `<site-analytics>` (or `uvalib-analytics.js` and `<uvalib-analytics>`) element; never both, and never alongside a hand-written Matomo snippet.
33
33
  - Also link `.../v1/base.css` in `<head>` (npm: `@uvalib/web-components/base.css`), unless the page sets `no-global-styles`. `<site-page>` installs the same base styles only after the first paint, so without the link the page shifts once (the default body margin goes away, and a heading's margin stops collapsing through the not-yet-defined `<site-page>`). The link also keeps `<site-page>` invisible until it is defined, with a two-second fallback.
34
- - npm: the define entries (`@uvalib/web-components/site-page.js`, `site-header.js`, `site-main-nav.js`, `site-footer.js`, `site-analytics.js`, `uvalib-analytics.js`, `site-style.js`, `uvalib-breadcrumbs.js`, `uvalib-card.js`, `uvalib-card-grid.js`, `uvalib-pager.js`, `uvalib-contents.js`, `uvalib-metadata.js`, `site-alerts.js`, `uvalib-filter.js`, `uvalib-date-range.js`, `uvalib-date-histogram.js`, `site-hours-section.js`, `library-weekly-hours.js`, `library-hours-setup.js`, `events-section.js`, `bento-box.js`, `uvalib-pagefind-search.js`, `uvalib-lightbox.js`, `uvalib-photo-grid.js`, `uvalib-tabs.js`, `uvalib-chip-group.js`, `uvalib-tag-list.js`, `uvalib-results-count.js`, `uvalib-combobox.js`, `uvalib-image-regions.js`, `uvalib-map.js`, `uvalib-filter-drawer.js`, `uvalib-back-to-top.js`) register the element (`bento-box.js` also registers its four sections, `<catalog-section>`, `<articles-section>`, `<libguides-section>` and `<website-section>`). Importing the package root (`@uvalib/web-components`) gives the classes only and registers nothing. If you use the `SitePage` class directly, also import the header and footer define entries.
34
+ - npm: the define entries (`@uvalib/web-components/site-page.js`, `site-header.js`, `site-main-nav.js`, `site-footer.js`, `site-analytics.js`, `uvalib-analytics.js`, `site-style.js`, `uvalib-breadcrumbs.js`, `uvalib-card.js`, `uvalib-card-grid.js`, `uvalib-pager.js`, `uvalib-contents.js`, `uvalib-metadata.js`, `site-alerts.js`, `uvalib-filter.js`, `uvalib-date-range.js`, `uvalib-date-histogram.js`, `site-hours-section.js`, `library-weekly-hours.js`, `library-hours-setup.js`, `events-section.js`, `bento-box.js`, `uvalib-pagefind-search.js`, `uvalib-lightbox.js`, `uvalib-photo-grid.js`, `uvalib-tabs.js`, `uvalib-chip-group.js`, `uvalib-tag-list.js`, `uvalib-results-count.js`, `uvalib-combobox.js`, `uvalib-image-regions.js`, `uvalib-map.js`, `uvalib-filter-drawer.js`, `uvalib-back-to-top.js`, `uvalib-dialog.js`, `uvalib-citation.js`, `uvalib-list-filter.js`) register the element (`bento-box.js` also registers its four sections, `<catalog-section>`, `<articles-section>`, `<libguides-section>` and `<website-section>`). Importing the package root (`@uvalib/web-components`) gives the classes only and registers nothing. If you use the `SitePage` class directly, also import the header and footer define entries.
35
35
  - Do not load the same component from both the CDN and npm on one page.
36
36
 
37
37
  ## 2. Required page structure
@@ -41,8 +41,9 @@ Loading rules:
41
41
  - Sidebars and article content go inside `<site-page>` as ordinary elements (use `<nav aria-label="...">` for navigation, no ARIA menu roles).
42
42
  - Breadcrumbs: a `<uvalib-breadcrumbs slot="breadcrumbs">` (from `uvalib-breadcrumbs.js`) inside `<site-page>`, never a hand-built trail. Its children are `<a href>` links ending with the current page (`<span>Title</span>`, or `<a href aria-current="page">`); apps can set its `items` property (`[{ label, href? }]`) instead. `<site-page>` places it between the header and `<main>`, outside `<main>`. Outside `<site-page>` it goes first in the content, above the `<h1>`. To return to the search the visitor came from, give that crumb `data-return-from="<search path>"` (it links to the same-origin referrer when it is that path with a query), never an inline script. In a single-page app with history routing, listen for `uvalib-breadcrumbs-navigate` and call `preventDefault()` to route in place (hash links need nothing).
43
43
  - Cards and paging: a collection or photo is a `<uvalib-card>` (`uvalib-card.js`), inside `<uvalib-card-grid>` (`uvalib-card-grid.js`) when there are several. `href` makes the heading the one link for the whole card: never wrap the card in an `<a>`, and do not put another link, button or other control inside a clickable card. The heading needs an accessible name, or the link is hidden. A card with no `href` may contain its own links, including an `actions` slot row (“Read the story”, “Photos (132)”). Do not put that row in a clickable card: the card link covers it, and the component warns. `media-shape="circle"` draws a person or avatar as a circle and keeps the image alt; the count badge still sits on it. An image needs a real alt, or `alt=""` when the heading already names it. Previous/next sections, numbered pages, or `mode="load-more"` (a Load more button and “Showing N of M”, or “Showing N” with no `total`; with an unknown total add `has-more` and remove it, or set `hasMore = false`, after the last page) are one `<uvalib-pager>` (`uvalib-pager.js`); a second pager on the same page needs its own `label`. Load more fires `load-more` (`detail: { page }`, the next page). Call `loaded(firstNew)`, or set `for` to the list id and call `loaded()`, so focus moves to the new item. `<uvalib-tabs>` (`uvalib-tabs.js`) is a tab set: each child with `data-tab` is a panel, or pair `<button slot="tab">` with panels. Arrow keys move, Home and End jump, and `activation="manual"` waits for Enter or Space. `url-param` (or `url-param="hash"`) makes the selected tab linkable and Back restores it. In a single-page app, listen for `uvalib-card-navigate` and `uvalib-pager-navigate` and call `preventDefault()` to route in place.
44
- - Sub-navigation and tables of contents: a `<uvalib-contents>` (from `uvalib-contents.js`) holding one `<ol>`/`<ul>` of `<li><a href>` entries, nested lists for sub-entries (plain text in an `<li>` for a group label), never a hand-built `<nav>` list or `<details>` for it. It is the `<nav>` landmark (named and headed by `label`, default "Contents"; set `heading-level` to fit the outline) and marks the current page (`aria-current="page"`) and in-page section (`"location"`, from the hash) itself: do not add `aria-current` by hand unless the route is not the URL, and then prefer `current="<url>"`. It collapses into a disclosure button at 64rem and below (`collapse-below`), closed until opened. In a sidebar add `sticky`. For a long document's table of contents without a build-time list, `headings-from="#article"` (with `levels="2-3"`, `min`) builds it from the headings and adds ids; a build-time list (children) is better where possible, since it works without JavaScript. Apps can set `items` (`[{ label, href?, children? }]`); with history routing, cancel `uvalib-contents-navigate` to route in place.
44
+ - Sub-navigation and tables of contents: a `<uvalib-contents>` (from `uvalib-contents.js`) holding one `<ol>`/`<ul>` of `<li><a href>` entries, nested lists for sub-entries (plain text in an `<li>` for a group label), never a hand-built `<nav>` list or `<details>` for it. It is the `<nav>` landmark (named and headed by `label`, default "Contents"; set `heading-level` to fit the outline) and marks the current page (`aria-current="page"`) and in-page section (`"location"`, from the hash) itself: do not add `aria-current` by hand unless the route is not the URL, and then prefer `current="<url>"`. It collapses into a disclosure button at 64rem and below (`collapse-below`), closed until opened. In a sidebar add `sticky` (or, in a `.uvalib-sidebar-layout`, the layout's `--sticky`; never both). For a long document's table of contents without a build-time list, `headings-from="#article"` (with `levels="2-3"`, `min`) builds it from the headings and adds ids; a build-time list (children) is better where possible, since it works without JavaScript. Apps can set `items` (`[{ label, href?, children? }]`); with history routing, cancel `uvalib-contents-navigate` to route in place.
45
45
  - Record details: a `<uvalib-metadata>` (from `uvalib-metadata.js`) around a plain `<dl>` (`<dt>` label, `<dd>` values; lists such as subjects as a `<ul>` in the `<dd>`). Downloads are `<a href download data-size="184 KB">EPUB</a>`. For credit and rights use its attributes, not your own rows: `creator`, `organization`, `rights` (a rightsstatements.org or Creative Commons URL; it shows the short name), `rights-info` (`https://www.library.virginia.edu/policies/use-of-materials`) and `citation` or `citation-title` (the Special Collections citation "<title>, Albert and Shirley Small Special Collections Library, University of Virginia"), which adds a Copy citation button. A long list (30 participants) gets `list-limit="8"` (or `data-limit` on its `<dd>`), not your own Show more script. Do not add icons from rightsstatements.org or creativecommons.org. With `base.css` linked the page does not move when it upgrades, including `list-limit` (or `data-limit`) from 1 to 12; for a larger limit add the page rule from the README ("No jump on upgrade").
46
+ - Citations in several formats (a record's Cite dialog or a "Cite this item" block): a `<uvalib-citation>` (from `uvalib-citation.js`), never a hand-built tab set, select, copy script or toast. Give each format as `<blockquote data-format="MLA">…</blockquote>` (keep `<i>` for titles; nothing else is kept as markup), or set `citations` (`[{ format, text, html? }]`) in an app; never fetch HTML into it. It draws a "Citation format" radio group (not tabs), the selected citation as selectable text, a 44px Copy citation button (plain text plus HTML, so italics survive a paste) with a polite "MLA citation copied" status, and with `ris-href` a Download RIS link; more export links go in `slot="actions"`. `format` picks the default; `remember` keeps the visitor's last choice per site. In a dialog, add `hide-label` when the dialog's heading says "Cite this item". With `base.css` linked the page does not move when it upgrades. For one simple citation in a record's details, `<uvalib-metadata citation="…">` remains the right choice. It reports `format`, `copy` and `download` (the format name only) to analytics itself.
46
47
  - Long pages (minutes, finding aids, transcriptions, long result lists): a `<uvalib-back-to-top>` (from `uvalib-back-to-top.js`) last in the content inside `<site-page>`, never a hand-built button and scroll script. It stays hidden (`visibility: hidden`, not a tab stop) until the top 400px (`offset`) scroll away, then floats in the bottom corner; activating it scrolls to the top (smooth unless reduced motion) and moves focus to the page's `<h1>` (or `target`, a selector), adding `tabindex="-1"`. The element keeps 4.75rem of space at the end and the button rests there at the bottom, so it never covers the last lines or the footer: do not add your own padding for it. `label` changes its text. `<site-page>` has no attribute for it. It reports `click` to analytics itself.
47
48
  - Content for a band above the footer: put an element with `slot="pre-footer"` inside `<site-page>`.
48
49
  - `no-footer` on `<site-page>` hides the footer (and any pre-footer band). Use it only for tool or app-like pages, such as a full-screen editor, where the site footer does not belong; normal content pages keep the footer.
@@ -57,6 +58,8 @@ Loading rules:
57
58
  - A sub-site's name (Electronic Text Collections, an exhibit or project site): `site-name="…"` on `<site-page>` (and `site-name-href` when its home is not `/`). The header shows it after the logo as a link to the site's home; the logo still links to library.virginia.edu. Never add your own banner, title bar or second logo row for it, and never make it the page's `<h1>` (the page keeps its own). Keep it short (two lines at most on wide screens).
58
59
  - Buttons, toggles and search boxes in the page's own content: use `base.css`'s classes, never hand-rolled button CSS: `.uvalib-button` (on `<button>` or `<a>`), `--secondary` (outline), `--subtle`, `--small`, `--large`; a toggle is a `.uvalib-button` with `aria-pressed="true|false"` (flip it in script); fields are `.uvalib-input` with a visible `<label>`, and a search box is `<form class="uvalib-search-form" role="search">` holding the label, the field and a `.uvalib-button` submit. They need `base.css` linked (`<site-page>` does not install them); it carries the dark-mode role tokens they read. Disable with `disabled` (or `aria-disabled="true"` while busy); a pressed toggle is filled whatever its variant.
59
60
  - Messages in the page's own content (a search error, a "keyword results only" notice): `<div class="uvalib-message uvalib-message--error" role="alert">` (`--warning`, `--info`/`--notice`, `--success`), starting with the severity in words in `<strong class="uvalib-message__label">Error:</strong>`; `role="alert"` only for an error caused by what the visitor did, `role="status"` for notices. Never hand-rolled alert boxes, and never a `<site-alerts>` for them. `hidden` hides every `base.css` class (`el.hidden = true`); no `[hidden]` reset is needed.
61
+ - Data tables (holdings, schedules, statistics): `<table class="uvalib-table">` with a `<caption>` (or `aria-labelledby`) and `<th scope="col|row">`; `--striped`, `--compact`, `.uvalib-table__num` for right-aligned numbers. Wide ones go in `<div class="uvalib-table-scroll" role="region" tabindex="0" aria-labelledby="CAPTION-ID">` (scrolls inside itself, never the page). Grouped data (holdings by library) is a heading per group, at the level the page outline needs, then its table. The opt-in stack variant (`.uvalib-table-stack` > `.uvalib-table--stack`, cells with `data-label`) needs explicit ARIA table roles. Never hand-styled or W3.CSS tables, and never a table for layout.
62
+ - Sidebar pages (a contents or sub-navigation sidebar beside the text, related links beside an article): `<div class="uvalib-sidebar-layout">` with two children, `class="uvalib-sidebar-layout__sidebar"` and `class="uvalib-sidebar-layout__main"`, never a hand-built grid, W3 columns or media queries. Side by side from 913px of the layout's own width (a container query: the library's 993px breakpoint less `<site-page>`'s gutters), the sidebar a quarter (`clamp(14rem, 25%, 20rem)`, `--uvalib-sidebar-width`) 3.5rem from the content (`--uvalib-sidebar-gap`); stacked below that. Source order is the order everywhere: sidebar first for a reading page's contents (they stack above the text), after the main content for a right-hand sidebar (stacks below); never reorder with CSS. The sidebar is the `<nav>` itself (the class on `<uvalib-contents>` or a `<nav aria-label>`) or an `<aside>` named by its heading; never wrap a `<nav>` in `role="navigation"`. `--sticky` keeps it in view only when side by side (use it or `<uvalib-contents sticky>`, not both); `--print-hide-sidebar` leaves it out of print. Keep `<uvalib-contents>`'s default `collapse-below`.
60
63
  - Printing: `<site-page>` prints only `<main>` (no header, nav, alerts, breadcrumbs or footer), black on white with underlined links and a "UVA Library — site, URL" line; `print-chrome` keeps the chrome. Do not add print rules for the chrome yourself.
61
64
  - Third-party or vendor sites that are not library.virginia.edu: `<site-page header-variant="vendor">` (logo plus Ask a Librarian only). Links default to `root-link-domain="https://www.library.virginia.edu"`; set it only for a non-production domain.
62
65
  - Do not replace a light-mode page's children wholesale (`innerHTML` or `textContent` on `<site-page>`): that destroys the chrome. Append, or update a child container inside it.
@@ -76,7 +79,7 @@ Theme only through the documented surface, never by reaching into internals:
76
79
 
77
80
  - Inherited `--uva-*` custom properties (colors such as `--uva-brand-blue`, `--uva-brand-orange`; `--uva-font-family`, `--uva-font-size-base`). Set them on `:root` or an ancestor of `<site-page>`. The full set is in `tokens.css`; per-component ones are in reference/components.md. Prefer the library's values; override only with a stated reason. If you override `--uva-font-family`, keep `"UVA Franklin Fallback"` right after `franklin-gothic-urw`: it is Arial matched to Franklin Gothic's metrics, so text does not rewrap and shift the page when the Adobe Fonts kit arrives.
78
81
  - `::part()` in shadow mode. On a page, use `site-page::part(header)`, `site-page::part(footer)` and `site-page::part(main)` (`<site-page>` re-exports the header and footer parts; `site-header::part(header)` cannot reach through its shadow root). For a standalone `<site-header>` or `<site-footer>` use `site-header::part(header)` / `site-footer::part(footer)`. In light mode there are no shadow parts; style the elements with ordinary selectors.
79
- - Custom states for runtime state, in shadow and light mode: `uvalib-combobox:state(open)`, `:state(invalid)`, `:state(loading)`; `uvalib-filter-drawer:state(modal)` (phone layout), `:state(open)`; `uvalib-lightbox:state(open)`; `uvalib-tag-list:state(expanded)`. Style them; never add or watch attributes for that state (there are none) or set it yourself (a page cannot). Browsers without custom states just never match.
82
+ - Custom states for runtime state, in shadow and light mode: `uvalib-combobox:state(open)`, `:state(invalid)`, `:state(loading)`; `uvalib-filter-drawer:state(modal)` (phone layout), `:state(open)`; `uvalib-dialog:state(open)`; `uvalib-lightbox:state(open)`; `uvalib-tag-list:state(expanded)`. Style them; never add or watch attributes for that state (there are none) or set it yourself (a page cannot). Browsers without custom states just never match.
80
83
  - Never pierce shadow roots with JS, depend on internal class names, or use `!important` to fight the chrome.
81
84
 
82
85
  ### Dark mode (opt-in)
@@ -225,7 +228,7 @@ import '@uvalib/web-components/tokens.css'; // optional: tokens for your own CSS
225
228
 
226
229
  Analytics: only when the site needs Matomo, set `<site-page matomo-id="N">`, or add `site-analytics.js` and a `<site-analytics matomoid="N">` (add `downloads="event"`, or `matomo-downloads="event"` on `<site-page>`, when file URLs carry ids: downloads are then counted as `['download', '<extension>']` events without URLs); see the analytics page in [reference/snippets.md](reference/snippets.md). `<uvalib-analytics>` (`uvalib-analytics.js`) is the same element under its original name, for existing markup. It listens on `document` for `uvalib-analytics-*` and `site-analytics-*` events (`event`, `search`, `pageview`, `content`) and queues them for Matomo, so events fired before Matomo loads are kept, and a page never counts twice. A single-page app whose router uses `pushState` or hashes can set `spa="auto"` to have each route change counted (after the new title is set, never twice for one URL); bare `spa` means the app sends its own `uvalib-analytics-pageview` events.
227
230
 
228
- The library's components already report what visitors do with them; do not add tracking for any of it: header utility and site links, logo, skip link, Menu and colour scheme; main-nav menu opens and links; footer links; breadcrumb and contents levels, the contents disclosure, Copy citation; card clicks (the card's place in its grid, or single); pager next, previous, page numbers and Load more; tab changes (the tab's label); alerts (impressions, dismiss, links, errors); event clicks; See all hours, week changes; filter facets, scopes and See more/less; date-range changes; histogram selections (`<from>–<to>` when both ends are ISO dates, otherwise `other`); bento searches, result and See all clicks, retries; lightbox opens, next, previous and full size (the name is `image N`, never the URL or the caption) and version comparisons (`compare`, the mode and the version's place, never its label); load errors; and tag-list clicks and Show all (`list N`, or the label with `track-label`, and the tag's place; never the tag text); and combobox choices and clears (the field's label and the suggestion's place; never the typed text or the suggestion); and image-region outline clicks (the list's label and the region's number; never a region's label); and map marker choices and zoom-button presses (the map's label and the place's position or the zoom level; never the place's name, coordinates or URL). `<uvalib-photo-grid>` and `<uvalib-results-count>` report nothing. The README's "Analytics" section has the full table.
231
+ The library's components already report what visitors do with them; do not add tracking for any of it: header utility and site links, logo, skip link, Menu and colour scheme; main-nav menu opens and links; footer links; breadcrumb and contents levels, the contents disclosure, Copy citation; card clicks (the card's place in its grid, or single); pager next, previous, page numbers and Load more; tab changes (the tab's label); alerts (impressions, dismiss, links, errors); event clicks; See all hours, week changes; filter facets, scopes and See more/less; date-range changes; histogram selections (`<from>–<to>` when both ends are ISO dates, otherwise `other`); bento searches, result and See all clicks, retries; lightbox opens, next, previous and full size (the name is `image N`, never the URL or the caption) and version comparisons (`compare`, the mode and the version's place, never its label); load errors; and tag-list clicks and Show all (`list N`, or the label with `track-label`, and the tag's place; never the tag text); and combobox choices and clears (the field's label and the suggestion's place; never the typed text or the suggestion); and list-filter queries and clears (how many items match; never the typed text); and image-region outline clicks (the list's label and the region's number; never a region's label); and map marker choices and zoom-button presses (the map's label and the place's position or the zoom level; never the place's name, coordinates or URL). `<uvalib-photo-grid>` and `<uvalib-results-count>` report nothing. The README's "Analytics" section has the full table.
229
232
 
230
233
  For the host page's own content, tag the clickable element (or a wrapper) with `data-uvalib-track="category,action[,name[,value]]"` instead of writing a listener, for example `<a href="/spaces" data-uvalib-track="home-page,banner-click,Study spaces">`: the category is your page or widget, the action a fixed kebab-case verb, the name a short fixed label, the value a number. It works inside shadow DOM too. Never put titles, URLs, search text, ids, email addresses, phone numbers or other personal data in events.
231
234
 
@@ -421,10 +424,11 @@ A record page with its metadata and a contents sidebar (the sidebar is an ordina
421
424
 
422
425
  For a search results page that needs a checkbox facet, a date-range picker or date counts as bars, use `<uvalib-filter>`, `<uvalib-date-range>` and `<uvalib-date-histogram>` instead of hand-built fieldsets, sliders and charts. They are not page chrome: use them inside `<site-page>` alongside your own results, and load each from its own script (`uvalib-filter.js`, `uvalib-date-range.js`, `uvalib-date-histogram.js`; npm: `@uvalib/web-components/uvalib-filter.js`).
423
426
 
424
- - `<uvalib-filter>`: set `filter` (`{ name, title, position, buckets: [{ key, doc_count, selected }] }`), `value` (selected keys), and optionally `scopes` (`[{ value, label }]` chips), `scopeValue` and `scopesLabel`. `limit="5"` shows five buckets with See more / See less. Events: `filter-change` (`detail: { name, value }`) and `scope-change` (`detail: { value }`).
427
+ - `<uvalib-filter>`: set `filter` (`{ name, title, position, buckets: [{ key, doc_count, selected }] }`), `value` (selected keys), and optionally `scopes` (`[{ value, label }]` chips), `scopeValue` and `scopesLabel`. `limit="5"` shows five buckets with See more / See less. Events: `filter-change` (`detail: { name, value }`) and `scope-change` (`detail: { value }`). For a facet group (Virgo-style Subject, Format…) use its opt-in attributes, never a hand-built accordion, filter box or sort menu: `collapsible` (caret disclosure, `collapsed`, `heading-level`; shows "2 selected" while closed; fires `toggle` `{ open }`), `searchable` (`search-label`, `unit`; checked values stay pinned), `sortable` (`sort="count|name"`; fires `sort` `{ sort }`), `clearable`, `apply-button` (staged changes, one `filter-change` per Apply) and `match="any|all"` (helper text only).
425
428
  - `<uvalib-date-range>`: `min` and `max` (`YYYY-MM-DD`) are required; without them nothing renders and a console warning is logged. Set `value` to `[start, end]`; `label` renames the legend. Events: `date-range-change` (`detail: { value: [start, end] }`) for a visitor's change; `uvalib-date-range-value` (same detail) for any change, script sets included.
426
429
  - `<uvalib-date-histogram>`: set `items` (`[{ date: 'YYYY' | 'YYYY-MM', count }]`) or a child `<table>` (two columns, date and count, or a year-by-month grid). The table is the no-JS fallback and stays available; "Show as table" shows the same counts. `granularity` is `month` (bars grouped by year), `year`, `decade` (for a long span, e.g. 1817–2026: "1810s: 22 meetings", choosing one selects `1810/1819`) or `auto` (months up to 3 years, years up to 30, then decades). `unit` (default `items`) names each bar, for example "October 2015: 5,311 photos". Arrow keys move between bars; Enter or Space selects. `selected` is one bucket or a range (`2015-10` or `2015-10/2016-03`). A choice fires `select` (`detail: { from, to }` as ISO dates). `range-for` names a `<uvalib-date-range>`: a bar sets its `value`, and any change to the range's value, from its controls or set in script (Clear, Back/Forward, a restored URL), highlights the bars it covers (the range fires `uvalib-date-range-value` for every change). On (re)connect a range value that holds a selection wins over `selected`. Setting `selected` in script updates that date range and does not fire `select`. A value equal to that range's own `min` and `max` selects nothing. `scale="log"` sizes bars by log(count + 1). On a narrow screen month rows scroll inside the chart ("Scroll sideways to see more."); year bars wrap. `variant="strip"` is a non-interactive per-year row (`role="img"`) for a card. A date that is not a bucket at that granularity is a chip. Analytics: one `select` named `<from>–<to>` when both ends are ISO dates, otherwise `other`; nothing when the selection is cleared, set in script, or restored from a date range.
427
430
  - A search page's form and facets on phones: wrap them in one `<uvalib-filter-drawer>` (`uvalib-filter-drawer.js`), never a hand-built off-canvas panel, `role="dialog"` div or focus-return script. Above `breakpoint` (default `48rem`) the children are a plain sidebar (lay out the column yourself); at and below it a "Search and filters" button (`label`) opens them in a native modal `<dialog>` with a heading and a Close button that takes focus; Escape, Close and the backdrop close it and focus returns to the button. The rest of the page, `<site-page>`'s header included, is inert while it is open: do not add `inert` or focus-trapping code. Inert regions are not announced, so list the ids of the results count and status notices outside it in `live` (`live="results-count status"`) and it repeats their announcements inside the panel. Set `count` to the number of filters set (shown on the button). The children are moved, never re-created, so form state and filter state survive; call `close()` after running a search if you want the results shown. base.css holds the button's place on phones before it upgrades; with your own `breakpoint`, copy the README's `:not(:defined)` rule for that width. It reports `open` and `close` (the label) to analytics itself.
431
+ - Any modal (search tips, "Help me search", Cite, a sign-in prompt, a request or email form): one `<uvalib-dialog id="…" label="…">` (`uvalib-dialog.js`) around the content, never a hand-built modal, `role="dialog"` div, PrimeVue `<Dialog>` or other framework dialog, focus trap or focus-return script. Open it with `<button type="button" data-uvalib-dialog="<id>">` anywhere in the page (works for buttons rendered later), or `show()` / `open`; close with `close(returnValue)`. `label` is the visible heading and the name (`heading-level`, default 2). Focus goes to the content's `[autofocus]` element (put it on a form's first field) or else the heading, and returns to the opener on every close (or `return-focus`). Escape and Close always close it; the backdrop too unless `persistent`. Use `<form method="dialog">` (Cancel: `value="cancel" formnovalidate`) and read `uvalib-dialog-close`'s `detail.returnValue`. In forms: "required" in words in `.uvalib-required`, help in `.uvalib-help` tied with `aria-describedby`, errors in a `.uvalib-message--error` `role="alert"` summary plus `aria-invalid` and per-field text, a copy/sent confirmation in a `.uvalib-message--success` `role="status"` (never a toast), and links that open a new tab say so. `size="small|medium|large"` (30/40/60rem). Keep the default shadow mode with Vue or React (children are slotted, never moved). It reports `open` and `close` (the label) to analytics itself.
428
432
  - The filter and the date range are controlled: update `value` / `scopeValue` from your own state after each event, and re-run your search.
429
433
  - Do not hard-code ids on the filter's or date range's inner inputs; ids are unique per instance and the markup is internal.
430
434
 
@@ -543,13 +547,24 @@ A person, place or subject picker, or any text field that suggests values as you
543
547
  - For no-JavaScript visitors, put `<input name list aria-label>` and its `<datalist>` inside: base.css shows the label and the field before the script runs.
544
548
  - It reports `select` (the label and position) and `clear` to analytics itself, never what was typed: do not add your own tracking.
545
549
 
550
+ ### List filter
551
+
552
+ A field that narrows a long list already on the page (a collection's texts, a directory, a table of databases) is one `<uvalib-list-filter>` (`uvalib-list-filter.js`), never your own `input` listener that toggles `hidden`.
553
+
554
+ - `for="list-id"` names the list: its children are the items (`ul`/`ol`, a `dl` of `div` rows, a card grid; a `<table>`'s body rows). Or `selector` for the items. Put the words to match in `data-filter-text` on each item when its text is not enough (title, author, date); otherwise its text is used. Every typed word must match, in any order, ignoring case and accents.
555
+ - `label` (default "Filter"; `hide-label` when a heading says it), `placeholder`, `noun`/`singular` ("Showing 12 of 473 texts"). It has its own 44px Clear button, Escape, a polite count announced after typing settles, and a "No texts match …" message: do not add your own live region or empty-state text.
556
+ - Headed groups: wrap each heading and its list in an element with `data-filter-group` and use `selector` for the items; empty groups hide.
557
+ - `query-param` (bare: `?filter=`) keeps the filter in the URL. `results-count="id"` drives a `<uvalib-results-count total="473" noun="texts">` placed elsewhere instead of its own count.
558
+ - Listen for `uvalib-list-filter-change` (`detail: { query, shown, total }`). After changing an item's text in script call `refresh()`.
559
+ - With `base.css` linked nothing moves when it upgrades, and the whole list shows without the script. It reports `filter` (the match count) and `clear` itself, never the typed text.
560
+
546
561
  ### Static-site search (Pagefind)
547
562
 
548
563
  A static site (11ty, Jekyll, a generated collection) that searches with [Pagefind](https://pagefind.app) keeps Pagefind's own index and `pagefind-ui.js`, and gets the library look and the accessibility fixes from this package:
549
564
 
550
565
  - Link `pagefind.css` (npm: `@uvalib/web-components/pagefind.css`) **instead of** Pagefind's `pagefind-ui.css`; never both (the stock rules out-rank the theme's). It styles Pagefind's default UI (`.pagefind-ui__*`): the field and Clear like `.uvalib-input`, the filters like `<uvalib-filter>`, link-coloured result titles, the library `<mark>`, Load more as a `.uvalib-button`, with dark mode and forced colors. Pagefind's `--pagefind-ui-*` properties still work for small changes.
551
- - Use `<uvalib-pagefind-search>` (from `uvalib-pagefind-search.js`) rather than `new PagefindUI(...)`: it loads `<bundle-path>pagefind-ui.js` from the site's bundle and adds what CSS cannot: a visible label (the stock field has only a title), a polite result-count status (the stock message is not announced), focus that stays in the field after Clear and Escape and moves to the first new result after Load more, `?q=` read and written (`query-param`), and analytics (`trackSearch(…, 'Pagefind', count)` once results settle, and `filter-change` events). Do not add your own `?q=` script or live region.
552
- - Attributes: `bundle-path` (default `/pagefind/`), `merge-index` (JSON array, for sharded indexes), `page-size` (10), `show-sub-results`, `show-images`, `excerpt-length`, `placeholder`, `label`, `label-hidden`, `translations` and `options` (JSON). For filters from the URL, call `el.ready.then((ui) => ui.triggerFilters({ collection: ['…'] }))`.
566
+ - Use `<uvalib-pagefind-search>` (from `uvalib-pagefind-search.js`) rather than `new PagefindUI(...)`: it loads `<bundle-path>pagefind-ui.js` from the site's bundle and adds what CSS cannot: a visible label (the stock field has only a title), a polite result-count status (the stock message is not announced), focus that stays in the field after Clear and Escape and moves to the first new result after Load more, `?q=` read and written (`query-param`), Pagefind filters read from and written to the URL (`filter-params`), and analytics (`trackSearch(…, 'Pagefind', count)` once results settle, and `filter-change` events). Do not add your own `?q=` or `triggerFilters` URL script or live region.
567
+ - Attributes: `bundle-path` (default `/pagefind/`), `merge-index` (JSON array, for sharded indexes), `page-size` (10), `show-sub-results`, `show-images`, `excerpt-length`, `placeholder`, `label`, `label-hidden`, `translations` and `options` (JSON), `query-param` (default `q`) and `filter-params` (space-separated filter names, such as `collection author`: `?collection=Manuscripts` lands with that filter checked and its group open, applied with `?q=` as one search; repeated parameters check several values; values the index lacks are ignored; checkbox changes are written back). For a "Search this collection" link, use `filter-params` and link to `/search/?collection=…`; `el.ready.then((ui) => ui.triggerFilters(…))` is for filters set from your own script.
553
568
 
554
569
  ```html
555
570
  <!doctype html>
@@ -584,12 +599,21 @@ A static site (11ty, Jekyll, a generated collection) that searches with [Pagefin
584
599
  placeholder="Search all texts"
585
600
  show-sub-results
586
601
  excerpt-length="30"
602
+ filter-params="collection"
587
603
  ></uvalib-pagefind-search>
588
604
  </site-page>
589
605
  </body>
590
606
  </html>
591
607
  ```
592
608
 
609
+ ### Reading texts (edition.css)
610
+
611
+ For a TEI text converted to class-annotated HTML (the class is the TEI element name, as in ETC, TEI Boilerplate and most converters), link `edition.css` (npm `@uvalib/web-components/edition.css`) and put the text in `<div class="uvalib-edition" lang="…">`. Do not copy a facsimile's serif or write your own reading CSS: the rules are zero-specificity (`:where()`), so override only what the site needs.
612
+
613
+ - Classes: `div`/`div-*`, `head`, `p`, `ab`, `seg-*`, `lb`, `pb` (`pb-n`, `a.pb-image`), `lg`, `l` (`data-n`), `sp`, `speaker`, `stage`, `opener`, `closer`, `dateline`, `salute`, `signed`, `postscript`, `epigraph`, `argument`, `trailer`, `byline`, `bibl`, `cit`, `figure`, `figDesc`, `add`, `del`, `sic`, `orig`, `reg`, `unclear`, `gap`, `noteref`, `footnotes`, `note`, `note-inline`, `ornament`, `textbreak`, `titlepage`/`titlePage`, `list`, `rend-*` (italic, smallcaps, center, right, indent, indent2, indent3, hang, underline…).
614
+ - Keep whitespace before each `<br class="lb">` (CSS cannot space a `<br>`), or write `<span class="lb"></span>`. Line breaks: a `<label class="uvalib-edition__lines"><input type="checkbox"> Show original line breaks</label>` before or inside the edition (or the class `uvalib-edition--lines`); readings in `title`: `.uvalib-edition__readings` (a title alone is hover-only).
615
+ - Additions and deletions are announced by generated text; do not add your own. Page images: `<uvalib-lightbox selector=".uvalib-edition a.pb-image">`. README: "Reading texts (edition.css)".
616
+
593
617
  ### Results toolbar, badges and tags
594
618
 
595
619
  For a results list of your own (a collection, a Virgo-like listing, a photo archive), use these instead of hand-made pills, counts and spinners. Classes are in `base.css`; the two elements load from `uvalib-tag-list.js` and `uvalib-results-count.js`.
@@ -877,7 +901,7 @@ Before finishing, load the page in a browser (or test) and confirm:
877
901
 
878
902
  ## 10. Keeping this skill current
879
903
 
880
- This skill is a copy. `installed.json` next to this file records the package version it came from. When the user asks about updating it, or the page loads a newer component version than that, check it with `npx @uvalib/web-components@latest install-skill --check --dir <skills-dir>` (`<skills-dir>` is the folder that holds this skill, usually `.claude/skills`); it prints the update command when a newer release exists.
904
+ This skill is a copy. `installed.json` next to this file records the package version it came from. When the user asks about updating it, or the page loads a newer component version than that, check it with `npx @uvalib/web-components@latest install-skill --check --dir <skills-dir>` (`<skills-dir>` is the folder that holds this skill, such as `.claude/skills`, `.agents/skills` or `~/.agents/skills`); it prints the update command when a newer release exists. `install-skill --force` updates the copies in this project (`.claude/skills` and `.agents/skills`), `--global --force` those in the home folder.
881
905
 
882
906
  ## 11. Requesting components, features and fixes
883
907
 
@@ -773,6 +773,49 @@ A row of chips: a segmented control or single-select filter (`mode="single"`), f
773
773
  | `--uva-color-focus` | | Dark-mode role token: focus ring (else `--uva-brand-orange`). |
774
774
  | `--uva-color-surface` | | Dark-mode role token: the page background the scrolling row fades into at an edge with more chips (else #fff). |
775
775
 
776
+ ## `<uvalib-citation>`
777
+
778
+ One record's citation in several formats (MLA, APA, Chicago, Bluebook…), a radio group to choose one, and a Copy citation button, as in Virgo's Cite dialog. Inline on a record page or inside a dialog: it assumes nothing about where it sits. Give each format as a child, `<blockquote data-format="MLA">…</blockquote>` (any element with `data-format`), so the page reads the same before the script loads (with `base.css`, only the first shows then, and the chooser's and button's space is held). Inline markup in a citation (`<i>` or `<em>` for a title) is kept; other elements are reduced to their text and nothing is parsed as HTML. Apps set the `citations` property instead (`[{ format, text, html? }]`, winning over the children while set); `html` keeps only inline elements, too. The formats are native radios drawn as one segmented bar (`role="radiogroup"`, "Citation format"): one tab stop, the arrow keys move and select, and the selected one is filled and ticked. `format` names the selected one (default the first). With `remember`, the visitor's last choice is kept in localStorage (per site) and wins over `format` on their next record. The selected citation is shown as selectable text in a region named "<format> citation". Copy citation copies it as plain text and as HTML where the browser allows (so an italic title stays italic when pasted into a word processor) and says "MLA citation copied" in a polite status next to the button, in the text colour (AAA), not in a toast. If the clipboard is unavailable, the citation is selected and the status says to copy it with the keyboard. `ris-href` adds a "Download RIS" link (`ris-label`) with a `download` attribute. Other export links go in the `actions` slot (`<a slot="actions" href="…" download>EndNote</a>`), after it.
779
+
780
+ ### Attributes
781
+
782
+ | Attribute | Type | Default | Description |
783
+ |---|---|---|---|
784
+ | `label` | `string` | `'Cite this item'` | The group's visible label and accessible name. |
785
+ | `hide-label` | `boolean` | `false` | Hide the label visually (it still names the group), for a dialog whose heading says it. |
786
+ | `format` | `string` | `''` | The selected format's name (default the first). Reflected when the visitor chooses one. |
787
+ | `remember` | `boolean` | `false` | Keep the visitor's last format in localStorage (per site), winning over `format`. |
788
+ | `ris-href` | `string` | `''` | A RIS file for the record: adds a download link. |
789
+ | `ris-label` | `string` | `'Download RIS'` | The RIS link's text. |
790
+ | `no-shadow-dom` | `boolean` | `false` | |
791
+ | `no-style` | `boolean` | `false` | |
792
+
793
+ ### Slots
794
+
795
+ | Slot | Description |
796
+ |---|---|
797
+ | `actions` | More export links or buttons, after Copy citation and Download RIS. |
798
+
799
+ ### Events
800
+
801
+ | Event | Description |
802
+ |---|---|
803
+ | `uvalib-citation-format` | The visitor chose another format: `detail` is `{ format }`. Not fired when the app sets `format`. Bubbles and is composed. |
804
+ | `uvalib-analytics-event` | For `<site-analytics>`, on the visitor's actions only: `['uvalib-citation', 'format', '<format>']` (once the visitor settles on one, a second after the last change), `['uvalib-citation', 'copy', '<format>']` and `['uvalib-citation', 'download', 'ris']`. Never the citation. Bubbles and is composed. |
805
+
806
+ ### CSS custom properties
807
+
808
+ | Property | Default | Description |
809
+ |---|---|---|
810
+ | `--uva-color-text` | | Dark-mode role token: label, citation and status colour (else `--uva-grey-darkest`). |
811
+ | `--uva-color-border` | | Dark-mode role token: the citation's border (else #dadada). |
812
+ | `--uva-color-surface-raised` | | Dark-mode role token: the citation's, segments' and buttons' background (else #fff). |
813
+ | `--uva-color-control-border` | | Dark-mode role token: segment border (else `--uva-grey`, #808080). |
814
+ | `--uva-color-link` | | Dark-mode role token: segment and button text, button border (else `--uva-brand-blue`). |
815
+ | `--uva-color-accent-bg` | | Dark-mode role token: the selected segment (else `--uva-brand-blue`). |
816
+ | `--uva-color-on-accent` | | Dark-mode role token: the selected segment's text (else #fff). |
817
+ | `--uva-color-focus` | | Dark-mode role token: focus ring (else `--uva-brand-orange`). |
818
+
776
819
  ## `<uvalib-combobox>`
777
820
 
778
821
  An editable text field that suggests values as you type, from a local list or a URL: a person, place or subject picker. It follows the WAI-ARIA APG “Editable Combobox With List Autocomplete”: a real `<input role="combobox">` and a `role="listbox"` popup under it. Suggestions come from the `items` property (`{ value, label?, description?, disabled? }` objects, or strings), from `<option>` children (directly or inside a `<datalist>`; the `label` attribute or text is the label, `data-description` the second line), or from `src`, a URL template with `{q}` (fetched 250 ms after the last keystroke once the text has `min-length` characters, default 1; a newer keystroke aborts the older request; the response is a JSON array of the same shape, or anything `transform(data, query)` turns into one). `items` wins over the children while set. Local suggestions match anywhere in the label, ignoring case and accents, those starting with the text first, then those with a word starting with it; at most `max-results` (default 50, 0 for all) are shown, which keeps a list of 16,000 people fast. The matched text is bold and underlined in a `<mark>`. Keys: Down opens the list on the first suggestion and moves (wrapping), Up opens on the last, Alt+Down opens without moving, Alt+Up closes, Enter chooses the active suggestion (and then does not submit the form; with none active, Enter submits as in any field), Escape closes the list and a second Escape clears the field, Home, End, Left and Right move the caret, and Tab leaves without choosing. A real clear button (“Clear <label>”, 44px, shown only with text) empties the field and returns focus to it. Free text is allowed: `value` is whatever is in the field, and `selected` the chosen suggestion (or null); typing after choosing clears it, and leaving the field with text that is exactly one suggestion's label chooses it. `must-choose` makes any other text invalid (“Choose one of the suggestions.”). The element is form-associated: with `name` it submits the chosen suggestion's value, or else the text, and a form reset restores the `value` attribute. `required` and `disabled` (also from a disabled fieldset) work as on an input. A polite status says “5 suggestions”, “50 of 1,234 suggestions”, “No suggestions”, “Loading suggestions” or “Couldn't load suggestions” half a second after the list settles (never on the first render); the popup shows the same notes visibly. A failed load never throws. Where the browser supports the Popover API and CSS anchor positioning, the popup is a manual popover in the top layer, anchored under the field and as wide as it (above it when there is no room below), so an ancestor with `overflow: hidden` or a scrolling panel never clips it. Elsewhere it is positioned under the field inside the element, as before. Pages can style the runtime state with `:state(open)`, `:state(invalid)` and `:state(loading)` (no attributes are added). Before it upgrades, `base.css` shows the label (from the attribute) and holds the field's height. A fallback `<input list>` child works as a plain field meanwhile; on upgrade its text, `name` and `placeholder` carry over, and it is disabled so it does not submit twice.
@@ -982,9 +1025,73 @@ A date-range picker: a two-thumb year slider plus "From" and "To" date inputs. `
982
1025
  | `--uva-color-control-border` | | Dark-mode role token: date input border (else `--uva-grey`, #808080). |
983
1026
  | `--uva-color-focus` | | Dark-mode role token: focus ring (else `--uva-brand-orange`). |
984
1027
 
1028
+ ## `<uvalib-dialog>`
1029
+
1030
+ A modal dialog for content and short forms: search tips, Cite, a sign-in prompt, a request form. Use it instead of a hand-built modal, a `role="dialog"` div or a framework's dialog. The children are the content. In shadow DOM they are slotted, never moved, so the page's CSS, ids, listeners and framework-rendered nodes keep working; with `no-shadow-dom` they are moved into the dialog (the same nodes, in the same document). It opens as a native `<dialog>` with `showModal()`: everything else on the page, `<site-page>`'s shadow header included, is inert while it is open, so focus stays inside without a trap script. The visible heading (`label`, an `<h2>` unless `heading-level` says otherwise) names it, and a 44px Close button is always shown; `description` (or a `slot="description"` child) is shown under the heading and is the dialog's description. Open it with a button anywhere in the page, `<button type="button" data-uvalib-dialog="<id>">` (one delegated listener, so buttons rendered later work too), with an invoker button (`commandfor="<id>" command="--show-modal"`) where the browser has invoker commands, with `show()`, or by setting `open`. On open, focus goes to the content's `[autofocus]` element when it has one (a form dialog: the first field), else to the heading, so a screen reader reads the dialog from the top and long content starts in view. On every close (Close, Escape, the backdrop, a `data-uvalib-dialog-close` button, a `<form method="dialog">` submitted, `close()`) focus returns to the element that opened it; if that is gone, to `return-focus` (a selector, or an element set as the property). Escape always closes it. A click on the backdrop closes it too (the native `closedby="any"`, or the same check in script where the browser lacks it), except with `persistent`, and never when a press starts inside the dialog and ends on the backdrop (a text selection or a drag). A `<form method="dialog">` in the content closes it on submit with the submitter's `value` as `returnValue`; other forms submit as usual. `size` is `small` (30rem), `medium` (the default, 40rem) or `large` (60rem) at most, and never wider or taller than the viewport less 16px on each side; the content scrolls inside it under a header that stays in view.
1031
+
1032
+ ### Attributes
1033
+
1034
+ | Attribute | Type | Default | Description |
1035
+ |---|---|---|---|
1036
+ | `label` | `string` | `''` | The visible heading and the dialog's accessible name. |
1037
+ | `heading-level` | `number` | `2` | The heading's level, 1 to 6 (default 2). |
1038
+ | `description` | `string` | `''` | A short description under the heading (or a `slot="description"` child), read as the dialog's description. |
1039
+ | `size` | `'small' \| 'medium' \| 'large'` | `'medium'` | The widest the dialog gets: `small` (30rem), `medium` (40rem) or `large` (60rem). |
1040
+ | `open` | `boolean` | `false` | Whether it is open. Reflected; setting it opens or closes the dialog (as `show()` and `close()`). |
1041
+ | `persistent` | `boolean` | `false` | A click on the backdrop does not close it (Escape and Close still do). For forms that would lose typed text. |
1042
+ | `return-focus` | `string \| HTMLElement \| null` | `null` | Where focus goes on close when the opener is gone: a selector (in the dialog's root, then the document) or an element. |
1043
+ | `close-label` | `string` | `'Close'` | The Close button's text. |
1044
+ | `no-shadow-dom` | `boolean` | `false` | |
1045
+ | `no-style` | `boolean` | `false` | |
1046
+
1047
+ ### Slots
1048
+
1049
+ | Slot | Description |
1050
+ |---|---|
1051
+ | (default) | The content: text, links, a form. |
1052
+ | `description` | A short description under the heading, read as the dialog's description (instead of the `description` attribute). |
1053
+
1054
+ ### CSS parts
1055
+
1056
+ | Part | Description |
1057
+ |---|---|
1058
+ | `dialog` | The `<dialog>`. |
1059
+ | `header` | The heading row (the heading and Close). |
1060
+ | `heading` | The heading. |
1061
+ | `close` | The Close button. |
1062
+ | `description` | The description under the heading. |
1063
+ | `body` | The scrolling wrapper of the content. |
1064
+
1065
+ ### CSS states
1066
+
1067
+ | State | Description |
1068
+ |---|---|
1069
+ | `:state(open)` | The dialog is open. |
1070
+
1071
+ ### Events
1072
+
1073
+ | Event | Description |
1074
+ |---|---|
1075
+ | `uvalib-dialog-open` | The dialog opened: `detail` is `{ reason }`, `button` (a visitor's opener) or `api` (`show()` or `open`). Bubbles and is composed. |
1076
+ | `uvalib-dialog-close` | The dialog closed: `detail` is `{ reason, returnValue }`, `reason` one of `close-button`, `button` (a `data-uvalib-dialog-close` or invoker close button), `escape`, `backdrop`, `form` (a `<form method="dialog">`), `api` (`close()` or `open = false`) or `removed` (taken out of the page while open). Bubbles and is composed. |
1077
+ | `uvalib-analytics-event` | For `<site-analytics>`: `['uvalib-dialog', 'open', '<label>']` when a visitor's button opens it, and `['uvalib-dialog', 'close', '<label>']` when the visitor closes it (Close, a close button, Escape, the backdrop or a dialog form); never on `show()`, `close()` or `open` from script, and never the content. Bubbles and is composed. |
1078
+
1079
+ ### CSS custom properties
1080
+
1081
+ | Property | Default | Description |
1082
+ |---|---|---|
1083
+ | `--uvalib-dialog-width` | | The dialog's widest inline size, instead of `size`'s (still never wider than the viewport less 16px on each side). |
1084
+ | `--uva-color-surface` | | Dark-mode role token: dialog background (else #fff). |
1085
+ | `--uva-color-text` | | Dark-mode role token: dialog text (else `--uva-grey-darkest`, #2b2b2b). |
1086
+ | `--uva-color-text-muted` | | Dark-mode role token: the description (else #4b5563, 7.5:1 on white). |
1087
+ | `--uva-color-border` | | Dark-mode role token: dialog edge and heading rule (else #dadada). |
1088
+ | `--uva-color-button-bg` | | Dark-mode role token: Close's border and text (else `--uva-blue-alt`, #007bac). |
1089
+ | `--uva-color-button-hover-bg` | | Dark-mode role token: hovered Close (else `--uva-blue-alt-A`, #005679). |
1090
+ | `--uva-color-focus` | | Dark-mode role token: focus ring (else `--uva-brand-orange`). |
1091
+
985
1092
  ## `<uvalib-filter>`
986
1093
 
987
- A faceted-search filter: a fieldset of checkboxes (value plus result count), optional toggle chips ("scopes") above them, and "See more" / "See less" buttons when `limit` is set. It is controlled: set `filter`, `value` and `scopeValue` from your search state and listen for the change events.
1094
+ A faceted-search filter: a fieldset of checkboxes (value plus result count), optional toggle chips ("scopes") above them, and "See more" / "See less" buttons when `limit` is set. It is controlled: set `filter`, `value` and `scopeValue` from your search state and listen for the change events. Optional filter-group features, each off by default (without them the markup, events and order are as before): `collapsible` (a caret disclosure button in the legend, with the selected count while collapsed), `searchable` (search within the values), `sortable` (Count \| Name (A–Z)), `clearable` (a Clear button), `apply-button` (stage changes until Apply) and `match` (says how the values combine).
988
1095
 
989
1096
  ### Attributes
990
1097
 
@@ -996,6 +1103,17 @@ A faceted-search filter: a fieldset of checkboxes (value plus result count), opt
996
1103
  | `scopevalue` | `string[]` | `[]` | Pressed scope values (matched case-insensitively). |
997
1104
  | `scopes-label` | `string` | `''` | Accessible name of the scope chip group. Empty (the default) means `Filter <title> by type`. |
998
1105
  | `limit` | `number` | `0` | Maximum buckets to show at first; 0 shows all. "See more" doubles it, "See less" halves it back. |
1106
+ | `collapsible` | `boolean` | `false` | The legend becomes a disclosure button (with the library's caret) that shows and hides the group. |
1107
+ | `collapsed` | `boolean` | `false` | With `collapsible`: the group is closed (its legend button and selected count only). The visitor's toggle updates it; nothing is remembered. |
1108
+ | `heading-level` | `number` | `0` | Wrap the legend's text (or disclosure button) in a heading of this level, 2 to 6. Unset (the default): no heading, as before. |
1109
+ | `searchable` | `boolean` | `false` | A search field above the values that narrows them as the visitor types. |
1110
+ | `search-label` | `string` | `''` | The search field's visible label. Empty (the default) means `Search <title>`. |
1111
+ | `unit` | `string` | `'values'` | What the values are, plural, for the search status ("12 of 340 subjects"). |
1112
+ | `sortable` | `boolean` | `false` | A "Sort by: Count \| Name (A–Z)" control. |
1113
+ | `sort` | `'count' \| 'name'` | `'count'` | The order: `count` (most results first; without `sortable`, the data's own order) or `name` (A–Z). The visitor's choice updates it. |
1114
+ | `clearable` | `boolean` | `false` | A Clear button, shown while something in the group is selected. |
1115
+ | `apply-button` | `boolean` | `false` | Stage checkbox changes until the visitor presses Apply (with Reset back to the applied state); `filter-change` fires on Apply only. |
1116
+ | `match` | `'any' \| 'all' \| undefined` | | Say how the selected values combine, under the legend: `any` ("Matches any selected value") or `all`. Unset: no text. |
999
1117
  | `no-shadow-dom` | `boolean` | `false` | |
1000
1118
  | `no-style` | `boolean` | `false` | |
1001
1119
 
@@ -1005,14 +1123,21 @@ A faceted-search filter: a fieldset of checkboxes (value plus result count), opt
1005
1123
  |---|---|
1006
1124
  | `see-more` | The "See more" button (shadow mode). |
1007
1125
  | `see-less` | The "See less" button (shadow mode). |
1126
+ | `toggle` | The disclosure button in the legend (`collapsible`). |
1127
+ | `search` | The search-within field (`searchable`). |
1128
+ | `clear` | The Clear button (`clearable`). |
1129
+ | `apply` | The Apply button (`apply-button`). |
1130
+ | `reset` | The Reset button (`apply-button`). |
1008
1131
 
1009
1132
  ### Events
1010
1133
 
1011
1134
  | Event | Description |
1012
1135
  |---|---|
1013
- | `filter-change` | A checkbox was toggled. `detail` is `{ name, value }`: the facet name and the new array of selected keys. Does not bubble. |
1136
+ | `filter-change` | A checkbox was toggled, Clear was pressed, or (with `apply-button`) Apply was pressed. `detail` is `{ name, value }`: the facet name and the new array of selected keys (`[]` after Clear). Does not bubble. |
1014
1137
  | `scope-change` | A scope chip was toggled. `detail` is `{ value }`: the new array of pressed scope values. Does not bubble. |
1015
- | `uvalib-analytics-event` | For `<site-analytics>`, on the visitor's changes only: `['uvalib-filter', 'facet-change', '<title>: <value>', 1 \| 0]` (checked or unchecked), `['uvalib-filter', 'scope-change', <scope label>, 1 \| 0]` (pressed or not), and `['uvalib-filter', 'see-more' \| 'see-less', <title>]`. Bubbles and is composed. |
1138
+ | `toggle` | With `collapsible`: the visitor opened or closed the group. `detail` is `{ open }`. Does not bubble. |
1139
+ | `sort` | With `sortable`: the visitor chose a sort. `detail` is `{ sort }` (`count` or `name`). Does not bubble. |
1140
+ | `uvalib-analytics-event` | For `<site-analytics>`, on the visitor's changes only: `['uvalib-filter', 'facet-change', '<title>: <value>', 1 \| 0]` (checked or unchecked; with `apply-button`, one per value when Apply is pressed), `['uvalib-filter', 'scope-change', <scope label>, 1 \| 0]` (pressed or not), `['uvalib-filter', 'see-more' \| 'see-less', <title>]`, `['uvalib-filter', 'toggle', <title>, 1 \| 0]` (opened or closed), `['uvalib-filter', 'sort', '<title>: count' \| '<title>: name']`, `['uvalib-filter', 'clear', <title>, <number cleared>]`, `['uvalib-filter', 'apply', <title>, <number of changes>]` and `['uvalib-filter', 'search', <title>, <number of matches>]` once a search-within settles (never the typed text). Bubbles and is composed. |
1016
1141
 
1017
1142
  ### CSS custom properties
1018
1143
 
@@ -1021,11 +1146,13 @@ A faceted-search filter: a fieldset of checkboxes (value plus result count), opt
1021
1146
  | `--uva-brand-blue` | `#232d4b` | Scope chip text, hover border and pressed background. |
1022
1147
  | `--uva-brand-orange` | `#e57200` | Focus ring colour (focus-visible outline). |
1023
1148
  | `--uva-color-border` | | Dark-mode role token: divider under the scope chips (else #e5e7eb). |
1024
- | `--uva-color-control-border` | | Dark-mode role token: scope chip border (else `--uva-grey`, #808080). |
1025
- | `--uva-color-surface-raised` | | Dark-mode role token: scope chip background (else #fff). |
1026
- | `--uva-color-link` | | Dark-mode role token: scope chip text and hover border (else `--uva-brand-blue`). |
1027
- | `--uva-color-accent-bg` | | Dark-mode role token: pressed chip background and border (else `--uva-brand-blue`). |
1028
- | `--uva-color-on-accent` | | Dark-mode role token: pressed chip text (else #fff). |
1149
+ | `--uva-color-control-border` | | Dark-mode role token: scope chip, search field, sort and button borders (else `--uva-grey`, #808080). |
1150
+ | `--uva-color-surface-raised` | | Dark-mode role token: scope chip, search field, sort and button background (else #fff). |
1151
+ | `--uva-color-link` | | Dark-mode role token: scope chip and button text, the caret, hover border (else `--uva-brand-blue`). |
1152
+ | `--uva-color-accent-bg` | | Dark-mode role token: pressed chip, current sort and Apply background (else `--uva-brand-blue`). |
1153
+ | `--uva-color-on-accent` | | Dark-mode role token: pressed chip, current sort and Apply text (else #fff). |
1154
+ | `--uva-color-text-muted` | | Dark-mode role token: the match text, selected count, search status and staged note (else #4f4f4f). |
1155
+ | `--uva-color-input-text` | | Dark-mode role token: search field text (else #1f2937). |
1029
1156
  | `--uva-color-focus` | | Dark-mode role token: focus ring (else `--uva-brand-orange`). |
1030
1157
 
1031
1158
  ## `<uvalib-filter-drawer>`
@@ -1219,6 +1346,57 @@ An accessible image viewer over a set of plain links. With JavaScript a primary
1219
1346
  | `--uva-grey-darkest` | `#2b2b2b` | Text when `--uva-color-text` is unset. |
1220
1347
  | `--uva-grey-100` | `#dadada` | Border when `--uva-color-border` is unset. |
1221
1348
 
1349
+ ## `<uvalib-list-filter>`
1350
+
1351
+ A text field that filters a long list on the page as you type: a collection's 473 texts, a staff directory, a table of databases. The list is the page's own markup and stays fully visible without the script. `for` is the id of the list: any element whose children are the items (a `<ul>` or `<ol>`, a `<dl>` of `<div>` rows, a grid of cards; for a `<table>`, the rows of its bodies). `selector` picks the items instead (inside `for` when both are set, else in the page). An item matches when every word typed appears in its `data-filter-text`, or else its text, in any order, ignoring case and accents (“eneide” finds “Énéide”). Items that do not match get the `hidden` attribute (kept hidden whatever `display` the page gives them); clearing the field shows them all again. Thousands of items filter at once on every keystroke: the text is read once, and only items whose state changes are touched. Groups: give each group's wrapper `data-filter-group` (a `<section>` with its heading and its list) and point `selector` at the items; a group whose items are all hidden is hidden too, heading and all. The visible `label` (default “Filter”; `hide-label` hides it visually) names the field, and a Clear button (“Clear <label>”, 44px, shown only with text) or Escape empties it, keeping focus in the field. Under the field a count follows at once (“Showing 12 of 473 texts”; `noun`, plural, and `singular` name the items), and a polite status announces it once the typing settles (a second after the last keystroke), never on every key or at load. When nothing matches, a message says “No texts match “…”.” To put the count elsewhere, point `results-count` at a `<uvalib-results-count>` (give it `total` and `noun` in the markup): the element then sets its `shown` and `total` and leaves the count and announcement to it. With `query-param` (bare: `filter`) the filter is read from that URL parameter at start and written back with `history.replaceState` as you type, so a filtered list can be shared and Back returns to it. The list's content is read once; call `refresh()` after changing an item's text in script (added or removed items and `data-filter-text` changes are noticed). Before it upgrades, `base.css` holds the label, field and count's height, so nothing moves.
1352
+
1353
+ ### Attributes
1354
+
1355
+ | Attribute | Type | Default | Description |
1356
+ |---|---|---|---|
1357
+ | `for` | `string` | `''` | The id of the list whose children are the items (for a table, its body rows). |
1358
+ | `selector` | `string` | `''` | A CSS selector for the items, inside `for` when it is set, else in the page. |
1359
+ | `label` | `string` | `'Filter'` | The field's visible label and accessible name. |
1360
+ | `hide-label` | `boolean` | `false` | Hide the label visually (it still names the field), when a heading beside it says it. |
1361
+ | `placeholder` | `string` | `''` | Placeholder text in the empty field, such as “Title or author”. |
1362
+ | `noun` | `string` | `'items'` | What the items are, plural: “items” by default. |
1363
+ | `singular` | `string` | `''` | What one item is. Default: “item” when `noun` is unset, else `noun`. |
1364
+ | `results-count` | `string` | `''` | The id of a `<uvalib-results-count>` to drive instead of the element's own count. |
1365
+ | `query-param` | `string \| null` | `null` | The URL parameter to read the filter from and write it to; a bare attribute uses `filter`. Off by default. |
1366
+ | `value` | `string` | `''` | The text in the field. Setting it filters the list (not reported to analytics). |
1367
+ | `no-shadow-dom` | `boolean` | `false` | |
1368
+ | `no-style` | `boolean` | `false` | |
1369
+
1370
+ ### CSS parts
1371
+
1372
+ | Part | Description |
1373
+ |---|---|
1374
+ | `label` | The visible label. |
1375
+ | `field` | The box around the field and its clear button. |
1376
+ | `input` | The text field. |
1377
+ | `clear` | The clear button. |
1378
+ | `count` | The visible count under the field. |
1379
+ | `empty` | The “No … match” message. |
1380
+
1381
+ ### Events
1382
+
1383
+ | Event | Description |
1384
+ |---|---|
1385
+ | `uvalib-list-filter-change` | The filter was applied with a new query (typing, Clear, Escape, `value` set in script, the URL at start, Back and Forward). `detail` is `{ query, shown, total }`. Not fired at load without a query. Bubbles and is composed. |
1386
+ | `uvalib-analytics-event` | For `<site-analytics>`, on the visitor's actions only: `['uvalib-list-filter', 'filter', '', <shown>]` once the typing settles on a new query, and `['uvalib-list-filter', 'clear']` when the visitor empties the field. Never the typed text. Bubbles and is composed. |
1387
+
1388
+ ### CSS custom properties
1389
+
1390
+ | Property | Default | Description |
1391
+ |---|---|---|
1392
+ | `--uva-color-surface-raised` | | Dark-mode role token: field background (else #fff). |
1393
+ | `--uva-color-control-border` | | Dark-mode role token: field border (else `--uva-grey`, #808080). |
1394
+ | `--uva-color-input-text` | | Dark-mode role token: field text (else #2b2b2b). |
1395
+ | `--uva-color-text` | | Dark-mode role token: label text (else #2b2b2b). |
1396
+ | `--uva-color-text-muted` | | Dark-mode role token: placeholder, count and the clear icon (else #4f4f4f). |
1397
+ | `--uva-color-alert-info-bg` | | Dark-mode role token: the no-match message background. |
1398
+ | `--uva-color-focus` | | Dark-mode role token: focus ring (else `--uva-brand-orange`). |
1399
+
1222
1400
  ## `<uvalib-map>`
1223
1401
 
1224
1402
  A map of places with a linked list of the same places: buildings, rooms or outdoor spaces, each a marker sized by a count, with a link to the place's page. It wraps [Leaflet](https://leafletjs.com) 1.9, which the page provides (the library never bundles it): set the `leaflet` property to the Leaflet module (`import * as L from 'leaflet'`), or load leaflet.js so that `window.L` exists. Without Leaflet only the list is shown, with one console warning. Leaflet's leaflet.css is optional: the element carries the layout rules it needs, in shadow DOM and light DOM alike. Places come from `items` (`{ id?, name, lat, lng, count?, href?, description? }`) or from a child `<ul>`/`<ol>` of `<li><a href data-lat data-lng data-count>Name</a></li>`, which is the list before the script runs (and without it). The list always stays, under the map: it is the text equivalent. Each marker is a real link (a button when the place has no `href`) named like "The Rotunda, 2,702 photos" (`count-label` is the noun), sized by the square root of its count (a 24 to 56px dot in a hit area of at least 44px). Tab or the arrow keys move between markers, Enter follows the link (or chooses the place), and Escape hides the tooltip. Hovering or focusing a marker shows a tooltip with its name and count and highlights its list entry; hovering or focusing a list entry highlights its marker (a ring and a larger dot, not colour alone) and brings it into view. Markers whose 44px targets would overlap at the current zoom are drawn as one group marker (regrouped after every zoom and resize): a button showing how many places it holds, sized by their summed count and named like "The Rotunda and 2 more places, 3,610 photos" (the largest place's name; `place-label` is the noun). Choosing it zooms in until its places part; when they cannot (one point, or the maximum zoom) it spreads them in a ring around it instead, with focus on the first; Escape or a zoom closes the ring and focus returns to the group. The arrow keys move between the markers shown (a group is one); a place in the list that is in a group highlights the group, whose tooltip names the place. The map is a region named by `label`, after a "Skip map, go to the list" link and a line of key instructions. It opens on the bounds of the places, or on `center` and `zoom`. The zoom buttons are 44px with a visible focus ring; the attribution stays. Tiles come from `tile-url` (OpenStreetMap by default: low-traffic use only) with `attribution`. In the page's dark mode the tiles are inverted with a CSS filter (`--uvalib-map-dark-filter`) unless `dark-tile-url` gives dark tiles; markers and controls are never filtered. With `prefers-reduced-motion` nothing animates.
@@ -1324,7 +1502,7 @@ A record's details as a description list, as on the library's digital collection
1324
1502
 
1325
1503
  ## `<uvalib-pagefind-search>`
1326
1504
 
1327
- Pagefind's default search UI (`PagefindUI`, from the site's own Pagefind bundle) with the library's defaults and the accessibility fixes that need script. Use it with pagefind.css, in place of Pagefind's pagefind-ui.css. It renders in light DOM, so the page's styles reach Pagefind's markup. It loads `<bundle-path>pagefind-ui.js` unless `window.PagefindUI` already exists. What it adds to the stock UI: a visible `<label>` for the field (the stock field is named only by its title); a polite status region that announces the result count ("12 results for virginia") once results settle (the stock message is not a live region); focus kept in the field after Clear or Escape (the stock UI blurs it, dropping focus to the page) and moved to the first new result after "Load more results"; the loading placeholders' dots hidden from screen readers; `?q=` read at start (and on Back and Forward) and the settled query written back with `history.replaceState`, so a search can be shared; and reports to `<site-analytics>`. The `ui` property is the `PagefindUI` instance (for `triggerFilters`), and `ready` resolves with it. Attributes are read once, when the element is first connected.
1505
+ Pagefind's default search UI (`PagefindUI`, from the site's own Pagefind bundle) with the library's defaults and the accessibility fixes that need script. Use it with pagefind.css, in place of Pagefind's pagefind-ui.css. It renders in light DOM, so the page's styles reach Pagefind's markup. It loads `<bundle-path>pagefind-ui.js` unless `window.PagefindUI` already exists. What it adds to the stock UI: a visible `<label>` for the field (the stock field is named only by its title); a polite status region that announces the result count ("12 results for virginia") once results settle (the stock message is not a live region); focus kept in the field after Clear or Escape (the stock UI blurs it, dropping focus to the page) and moved to the first new result after "Load more results"; the loading placeholders' dots hidden from screen readers; `?q=` read at start (and on Back and Forward) and the settled query written back with `history.replaceState`, so a search can be shared; with `filter-params`, the named Pagefind filters read from and written to the URL the same way; and reports to `<site-analytics>`. The `ui` property is the `PagefindUI` instance (for `triggerFilters`), and `ready` resolves with it. Attributes are read once, when the element is first connected.
1328
1506
 
1329
1507
  ### Attributes
1330
1508
 
@@ -1342,6 +1520,7 @@ Pagefind's default search UI (`PagefindUI`, from the site's own Pagefind bundle)
1342
1520
  | `translations` | `string` | | JSON of Pagefind UI strings to override (`{"zero_results": "…"}`). |
1343
1521
  | `options` | `string` | | JSON of any other `PagefindUI` options (`{"openFilters": ["author"]}`), applied last. |
1344
1522
  | `query-param` | `string` | `q` | The URL parameter that holds the query; empty turns it off. |
1523
+ | `filter-params` | `string` | | Space-separated Pagefind filter names read from and written to URL parameters of the same name (`collection author`: `?collection=A&collection=B`). URL filters are applied with the query as one search, their filter groups open; values not in the index are ignored. Empty (the default) turns it off. |
1345
1524
 
1346
1525
  ### Events
1347
1526
 
@@ -1 +0,0 @@
1
- {"version":3,"file":"base-B3tNX103.js","names":["unsafeCSS","i","r","fontFallback","FACES","loadFontFallback","fonts","doc","face","tokens","METADATA_LIMITS","metadataLimits","lists","n","l","TYPEKIT_URL","base"],"sources":["../../src/styles/font-fallback.ts","../../src/styles/tokens.ts","../../src/styles/base.ts"],"sourcesContent":["import { css } from 'lit';\n\n/**\n * A metric-matched fallback for Franklin Gothic URW (issue #32). The Adobe Fonts kit uses\n * `font-display: auto`, so on a slow connection text is drawn in the next font of\n * `--uva-font-family` and redrawn when the kit's files arrive. Plain Arial is wider than\n * Franklin Gothic (by 6% regular, 9% bold), so paragraphs rewrapped and the page moved\n * (layout shift). \"UVA Franklin Fallback\" is the system's Arial scaled to Franklin Gothic's\n * average widths, with its ascent and descent, for each face the kit serves (400, 500, 700 and\n * 400 italic; a 600 rule gets the 700 face, as the kit's own matching does). Measured against\n * the kit in Chromium: the fallback wraps a paragraph like Franklin Gothic in about 99% of\n * widths from 260 to 700px at 16 to 20px, against 55 to 82% for plain Arial.\n *\n * `size-adjust` scales Arial's glyphs; the overrides are Franklin Gothic's ascent (0.95 em) and\n * descent (0.25 em) divided by that scale, with no line gap, so a line is as tall in both.\n * Liberation Sans (Linux) has Arial's metrics. Where neither is installed (Android has Roboto),\n * the face is skipped and the next font in the stack is used, as before.\n */\nexport const fontFallback = css`\n @font-face {\n font-family: 'UVA Franklin Fallback';\n src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans');\n font-weight: 100 450;\n font-style: normal;\n size-adjust: 94.52%;\n ascent-override: 100.93%;\n descent-override: 26.56%;\n line-gap-override: 0%;\n }\n @font-face {\n font-family: 'UVA Franklin Fallback';\n src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans');\n font-weight: 451 599;\n font-style: normal;\n size-adjust: 95.99%;\n ascent-override: 99.18%;\n descent-override: 26.04%;\n line-gap-override: 0%;\n }\n @font-face {\n font-family: 'UVA Franklin Fallback';\n src:\n local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'),\n local('LiberationSans-Bold');\n font-weight: 600 1000;\n font-style: normal;\n size-adjust: 91.32%;\n ascent-override: 104.03%;\n descent-override: 27.38%;\n line-gap-override: 0%;\n }\n @font-face {\n font-family: 'UVA Franklin Fallback';\n src:\n local('Arial Italic'), local('Arial-ItalicMT'), local('Liberation Sans Italic'),\n local('LiberationSans-Italic');\n font-weight: 100 599;\n font-style: italic;\n size-adjust: 95.06%;\n ascent-override: 101.09%;\n descent-override: 26.4%;\n line-gap-override: 0%;\n }\n`;\n\n/** One font per fallback face, so each one is asked for. */\nconst FACES = ['400', '500', '700', 'italic 400'];\n\n/**\n * Load every fallback face now (issue #35). A face from a local() font loads only when text\n * first needs it, so the first italic (or medium) text could be drawn in unscaled Arial and\n * redrawn a moment later. Called once the faces are installed; failures (no Arial or\n * Liberation Sans on the system) are left to the next font in the stack, as before.\n */\nexport function loadFontFallback(doc: Document): void {\n const fonts = doc.fonts;\n if (!fonts?.load) return;\n for (const face of FACES) fonts.load(`${face} 1em \"UVA Franklin Fallback\"`).catch(() => {});\n}\n","// GENERATED by scripts/sync-tokens.mjs from ../monorepo/packages/drupal_library_theme/src/scss/base — do not edit\nimport { css } from 'lit';\n\nexport const tokens = css`\n :root {\n --uva-brand-blue-lightest: #87B9D9;\n --uva-brand-blue-lighter: #3395D4;\n --uva-brand-blue-light: #0370B7;\n --uva-brand-blue-base: #232D4B;\n --uva-brand-blue-300: #87B9D9;\n --uva-brand-blue-200: #3395D4;\n --uva-brand-blue-100: #0370B7;\n --uva-brand-blue: #232D4B;\n --uva-brand-orange-lightest: #FFEAD6;\n --uva-brand-orange-lighter: #FFC999;\n --uva-brand-orange-light: #FFB370;\n --uva-brand-orange-base: #E57200;\n --uva-brand-orange-dark: #B35900;\n --uva-brand-orange-darker: #854200;\n --uva-brand-orange-300: #FFEAD6;\n --uva-brand-orange-200: #FFC999;\n --uva-brand-orange-100: #FFB370;\n --uva-brand-orange: #E57200;\n --uva-brand-orange-A: #B35900;\n --uva-brand-orange-B: #854200;\n --uva-blue-alt-lightest: #BFE7F7;\n --uva-blue-alt-lighter: #91D8F2;\n --uva-blue-alt-light: #55C4EC;\n --uva-blue-alt-base: #007BAC;\n --uva-blue-alt-dark: #005679;\n --uva-blue-alt-darkest: #141E3C;\n --uva-blue-alt-400: #e6f2f7;\n --uva-blue-alt-300: #BFE7F7;\n --uva-blue-alt-200: #91D8F2;\n --uva-blue-alt-100: #55C4EC;\n --uva-blue-alt: #007BAC;\n --uva-blue-alt-A: #005679;\n --uva-blue-alt-B: #141E3C;\n --uva-teal-lightest: #C8F2F4;\n --uva-teal-light: #5BD7DE;\n --uva-teal-base: #25CAD3;\n --uva-teal-dark: #1DA1A8;\n --uva-teal-darker: #16777C;\n --uva-teal-200: #C8F2F4;\n --uva-teal-100: #5BD7DE;\n --uva-teal: #25CAD3;\n --uva-teal-A: #1DA1A8;\n --uva-teal-B: #16777C;\n --uva-green-lightest: #DDEFDC;\n --uva-green-lighter: #89CC74;\n --uva-green-base: #62BB46;\n --uva-green-dark: #4E9737;\n --uva-green-200: #DDEFDC;\n --uva-green-100: #89CC74;\n --uva-green: #62BB46;\n --uva-green-A: #4E9737;\n --uva-red-lightest: #FBCFDA;\n --uva-red-base: #EF3F6B;\n --uva-red-dark: #DF1E43;\n --uva-red-darker: #B30000;\n --uva-red-100: #FBCFDA;\n --uva-red: #EF3F6B;\n --uva-red-A: #DF1E43;\n --uva-red-B: #B30000;\n --uva-yellow-lightest: #FEF6C8;\n --uva-yellow-base: #ECC602;\n --uva-yellow-dark: #B99C02;\n --uva-yellow-100: #FEF6C8;\n --uva-yellow: #ECC602;\n --uva-yellow-A: #B99C02;\n --uva-grey-lightest: #F1F1F1;\n --uva-grey-light: #DADADA;\n --uva-grey-base: #808080;\n --uva-grey-dark: #4F4F4F;\n --uva-grey-darkest: #2B2B2B;\n --uva-grey-200: #F1F1F1;\n --uva-grey-100: #DADADA;\n --uva-grey-50: #ADADAD;\n --uva-grey: #808080;\n --uva-grey-A: #4F4F4F;\n --uva-grey-B: #2B2B2B;\n --uva-font-family: franklin-gothic-urw, \"UVA Franklin Fallback\", Arial, Helvetica, sans-serif;\n --uva-font-size-base: 17px;\n }\n`;\n","import { css, unsafeCSS } from 'lit';\n\n/**\n * `<uvalib-metadata>` long lists before it upgrades (issue #34): a list of more than N values\n * shows its first N and a line for its \"Show all\" button (4px above a 32px button), as the\n * upgraded element does. CSS cannot read N from the attribute into :nth-child(), so the rules\n * are written out for limits 1 to 12; a page with a larger limit adds its own (README). A row's\n * own data-limit on its <dd> wins over list-limit (data-limit=\"0\" shows them all); a data-limit\n * on the list itself works once upgraded but is not held before.\n */\nconst METADATA_LIMITS = Array.from({ length: 12 }, (_, i) => i + 1);\nconst metadataLimits = unsafeCSS(\n METADATA_LIMITS.map((n) => {\n const lists = [\n `uvalib-metadata[list-limit=\"${n}\"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit])`,\n `uvalib-metadata:not(:defined) > dl > dd[data-limit=\"${n}\"] > :is(ul, ol)`,\n ];\n return (\n `${lists.map((l) => `${l} > li:nth-child(n + ${n + 1})`).join(',\\n')} { display: none; }\\n` +\n `${lists.map((l) => `${l}:has(> li:nth-child(${n + 1}))::after`).join(',\\n')} { content: ''; display: block; block-size: 2.25rem; }`\n );\n }).join('\\n'),\n);\n\nexport const TYPEKIT_URL = 'https://use.typekit.net/oym8nvz.css';\n\n// The body background has no fallback: without dark mode it stays transparent, as before.\n//\n// site-page:not(:defined) applies when base.css is linked in <head>, before the element\n// upgrades: its own formatting context (flow-root), so a heading's top margin cannot collapse\n// through to <body> and shift the page once the element upgrades, and invisible, so its\n// content does not paint above where the header will go. If the script never loads, the\n// content appears anyway after two seconds.\nexport const base = css`\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n html,\n body {\n font-family: var(\n --uva-font-family,\n franklin-gothic-urw,\n 'UVA Franklin Fallback',\n Arial,\n Helvetica,\n sans-serif\n );\n }\n html {\n font-size: var(--uva-font-size-base, 17px);\n }\n body {\n margin: 0;\n line-height: 1.5;\n min-height: 100vh;\n color: var(--uva-color-text, var(--uva-grey-darkest, #2b2b2b));\n background-color: var(--uva-color-surface);\n }\n site-page:not(:defined) {\n display: flow-root;\n visibility: hidden;\n animation: uvalib-site-page-reveal 0s 2s forwards;\n }\n uvalib-breadcrumbs:not(:defined),\n uvalib-card:not(:defined),\n uvalib-card-grid:not(:defined),\n uvalib-pager:not(:defined),\n uvalib-contents:not(:defined),\n uvalib-metadata:not(:defined),\n uvalib-tag-list:not(:defined) {\n display: block;\n line-height: 1.5;\n visibility: hidden;\n animation: uvalib-site-page-reveal 0s 2s forwards;\n }\n /* A chip row: hidden, one 44px row tall (with the scrolling row's padding), the raw\n children kept on one line so they cannot make it taller. */\n uvalib-chip-group:not(:defined) {\n display: block;\n min-height: 44px;\n max-width: 100%;\n overflow: hidden;\n white-space: nowrap;\n visibility: hidden;\n animation: uvalib-site-page-reveal 0s 2s forwards;\n }\n uvalib-chip-group[scroll]:not(:defined) {\n min-height: calc(44px + 0.75rem);\n }\n /* A description: one line of it (0.875rem at 1.5, 0.25rem below the row). */\n uvalib-chip-group[description]:not(:defined) {\n padding-block-end: 1.5625rem;\n }\n /* Its text is drawn from attributes: hold one line until it upgrades. */\n uvalib-results-count:not(:defined) {\n display: block;\n min-block-size: 1.5em;\n }\n uvalib-tag-list:not(:defined)[hidden],\n uvalib-results-count:not(:defined)[hidden] {\n display: none;\n }\n /* The pre-upgrade rules here set display, which beats the hidden attribute's (issue #7).\n More specific than each of them (two pseudo-classes or attributes), so it needs no importance flag. */\n :where(\n site-page,\n uvalib-breadcrumbs,\n uvalib-card,\n uvalib-card-grid,\n uvalib-pager,\n uvalib-contents,\n uvalib-metadata,\n uvalib-chip-group,\n uvalib-tabs,\n uvalib-combobox,\n uvalib-image-regions,\n uvalib-map,\n uvalib-filter-drawer\n ):not(:defined)[hidden],\n :where(uvalib-combobox, uvalib-image-regions):not(:defined) > [hidden] {\n display: none;\n }\n /* A record's details before <uvalib-metadata> upgrades (issue #34): the rows already laid\n out as it lays them out (label beside value from 36rem of its own width, stacked below;\n 8px above and below each row, a 1px rule between rows; lists without bullets, 4px apart),\n so the page does not move when it upgrades. Rows the attributes add (creator, rights,\n citation) are not in the page's <dl> and cannot be held. */\n uvalib-metadata:not(:defined) {\n container-type: inline-size;\n font-size: 1rem;\n }\n uvalib-metadata:not(:defined) > dl {\n display: grid;\n grid-template-columns: minmax(7rem, 12rem) minmax(0, 1fr);\n column-gap: 1.5rem;\n margin: 0;\n }\n uvalib-metadata:not(:defined) > dl > dt {\n grid-column: 1;\n margin: 0;\n padding-block: 0.5rem;\n font-weight: 700;\n }\n uvalib-metadata:not(:defined) > dl > dd {\n grid-column: 2;\n margin: 0;\n padding-block: 0.5rem;\n }\n uvalib-metadata:not(:defined) > dl > dt:not(:first-child),\n uvalib-metadata:not(:defined) > dl > dt:not(:first-child) + dd {\n border-block-start: 1px solid transparent;\n }\n uvalib-metadata:not(:defined) > dl > dd > :is(ul, ol) {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n uvalib-metadata:not(:defined) > dl > dd li + li {\n margin-block-start: 0.25rem;\n }\n @container (width < 36rem) {\n uvalib-metadata:not(:defined) > dl {\n grid-template-columns: minmax(0, 1fr);\n }\n uvalib-metadata:not(:defined) > dl > :is(dt, dd) {\n grid-column: 1;\n }\n uvalib-metadata:not(:defined) > dl > dt {\n padding-block-end: 0;\n }\n uvalib-metadata:not(:defined) > dl > dd {\n padding-block-start: 0;\n }\n uvalib-metadata:not(:defined) > dl > dt:not(:first-child) + dd {\n border-block-start: 0;\n }\n }\n ${metadataLimits}\n /* Tabs stay readable before the script runs: a block, one panel, and a gap the\n size of the tab row (44px) plus its 1rem margin, so the first panel does not\n jump when the element upgrades. Later data-tab panels stay hidden. */\n uvalib-tabs:not(:defined) {\n display: block;\n padding-block-start: calc(44px + 1rem);\n }\n uvalib-tabs:not(:defined) > [data-tab] ~ [data-tab] {\n display: none;\n }\n /* A combobox: its label (from the attribute) and one 44px field (plus a one-line\n description) held, so nothing moves when it upgrades. A fallback <input list> child\n works meanwhile; the other children (options, a datalist) stay out of sight. */\n uvalib-combobox:not(:defined) {\n display: block;\n min-block-size: calc(1.5em + 0.25rem + 44px);\n line-height: 1.5;\n }\n uvalib-combobox[description]:not(:defined) {\n min-block-size: calc(3em + 0.5rem + 44px);\n }\n uvalib-combobox:not(:defined)::before {\n content: attr(label);\n display: block;\n margin-block-end: 0.25rem;\n font-weight: 600;\n }\n uvalib-combobox:not(:defined) > :not(input) {\n display: none;\n }\n uvalib-combobox:not(:defined) > input {\n display: block;\n box-sizing: border-box;\n inline-size: 100%;\n min-block-size: 44px;\n font: inherit;\n line-height: 1.2;\n }\n /* Image regions: the image at its own width and the list beside it (or under it), the\n layout the element keeps once it upgrades, so the image does not move. */\n uvalib-image-regions:not(:defined) {\n display: flex;\n flex-wrap: wrap;\n gap: 1rem;\n align-items: flex-start;\n }\n uvalib-image-regions:not(:defined) > :is(img, picture) {\n display: block;\n flex: 0 1 auto;\n min-width: 0;\n max-width: 100%;\n height: auto;\n }\n uvalib-image-regions:not(:defined) > :is(ol, ul) {\n flex: 1 1 14rem;\n min-width: 0;\n }\n /* A map: its key instructions (the same text it shows) and the map's height held above\n the child list, so the list does not move when the map is drawn over the page's\n Leaflet. Padding, not margin, so it cannot collapse with the list's own top margin. */\n uvalib-map:not(:defined) {\n display: block;\n }\n uvalib-map:not(:defined)::before {\n content: 'Tab or arrow keys move between places; Enter opens one. With the map focused, arrow keys pan and + and − zoom.';\n display: block;\n padding-block-end: calc(0.5rem + max(12rem, var(--uvalib-map-height, min(24rem, 75vw))));\n font-size: 0.875rem;\n line-height: 1.5;\n color: var(--uva-color-text-muted, #4b5563);\n }\n /* A filter drawer on a phone (the default 48rem breakpoint): once it upgrades only its 44px\n \"Search and filters\" button shows, so hold that height and keep the form and filters out\n of sight meanwhile; nothing moves when it upgrades. A page with its own breakpoint adds the\n same two rules in a media query of that width (see the README). Low specificity, so the\n [hidden] rule above still wins. */\n @media (max-width: 48rem) {\n :where(uvalib-filter-drawer:not([breakpoint])):not(:defined) {\n display: block;\n min-block-size: 44px;\n }\n :where(uvalib-filter-drawer:not([breakpoint])):not(:defined) > * {\n display: none;\n }\n }\n /* Printing a <site-page> (issue #20; its own styles leave out the chrome): a dark scheme\n prints light (the role tokens resolve to their light values), and the content's links\n are black and underlined, so they are told apart without colour. Content is <main> in\n light DOM and the unslotted children in shadow DOM. print-chrome keeps the page as it is\n shown, apart from the light scheme. */\n @media print {\n :root[data-uva-color-scheme]:has(site-page) {\n color-scheme: light;\n --uva-color-scheme: light;\n }\n /* Light DOM's trail, here too, as the pre-upgrade rule above (unlayered) would win. */\n site-page:not([print-chrome]) > [slot='breadcrumbs'] {\n display: none;\n }\n site-page:not([print-chrome]) > :not([slot], site-header, site-footer, .alerts-list) :any-link,\n site-page:not([print-chrome]) > :any-link:not([slot], .skip-link) {\n color: #000;\n text-decoration: underline;\n }\n }\n @keyframes uvalib-site-page-reveal {\n to {\n visibility: visible;\n }\n }\n`;\n"],"mappings":";;AAkBA,IAAaG,IAAe,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDzBC,IAAQ;CAAC;CAAO;CAAO;CAAO;AAAY;AAQhD,SAAgBC,EAAiB,GAAqB;CACpD,IAAMC,IAAQC,EAAI;CAClB,IAAKD,GAAO,MACZ,KAAK,IAAME,KAAQJ,GAAO,EAAM,KAAK,GAAGI,EAAK,6BAA6B,CAAC,CAAC,YAAY,CAAC,CAAC;AAC5F;;AC3EA,IAAaC,IAAS,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GCOnBC,IAAkB,MAAM,KAAK,EAAE,QAAQ,GAAG,IAAI,GAAG,MAAMT,IAAI,CAAC,GAC5DU,IAAiBX,EACrBU,EAAgB,KAAK,MAAM;CACzB,IAAME,IAAQ,CACZ,+BAA+BC,EAAE,+EACjC,uDAAuDA,EAAE,iBAC3D;CACA,OACE,GAAGD,EAAM,KAAK,MAAM,GAAGE,EAAE,sBAAsBD,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,EAAE,uBAClED,EAAM,KAAK,MAAM,GAAGE,EAAE,sBAAsBD,IAAI,EAAE,UAAU,CAAC,CAAC,KAAK,KAAK,EAAE;AAEjF,CAAC,CAAC,CAAC,KAAK,IAAI,CACd,GAEaE,IAAc,uCASdC,IAAO,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkJnBL,EAAe"}