@uvalib/web-components 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +53 -0
- package/README.md +515 -47
- package/dist/base/url-param.d.ts +23 -0
- package/dist/base/url-param.js +49 -0
- package/dist/base/url-param.js.map +1 -0
- package/dist/base.css +289 -1
- package/dist/components/uvalib-card/UvalibCard.d.ts +19 -5
- package/dist/components/uvalib-card/UvalibCard.js +112 -9
- package/dist/components/uvalib-card/UvalibCard.js.map +1 -1
- package/dist/components/uvalib-chip-group/UvalibChipGroup.d.ts +156 -0
- package/dist/components/uvalib-chip-group/UvalibChipGroup.js +747 -0
- package/dist/components/uvalib-chip-group/UvalibChipGroup.js.map +1 -0
- package/dist/components/uvalib-chip-group/uvalib-chip-group.d.ts +1 -0
- package/dist/components/uvalib-chip-group/uvalib-chip-group.js +4 -0
- package/dist/components/uvalib-chip-group/uvalib-chip-group.js.map +1 -0
- package/dist/components/uvalib-date-histogram/UvalibDateHistogram.d.ts +148 -0
- package/dist/components/uvalib-date-histogram/UvalibDateHistogram.js +1248 -0
- package/dist/components/uvalib-date-histogram/UvalibDateHistogram.js.map +1 -0
- package/dist/components/uvalib-date-histogram/uvalib-date-histogram.d.ts +1 -0
- package/dist/components/uvalib-date-histogram/uvalib-date-histogram.js +4 -0
- package/dist/components/uvalib-date-histogram/uvalib-date-histogram.js.map +1 -0
- package/dist/components/uvalib-lightbox/UvalibLightbox.js +8 -1
- package/dist/components/uvalib-lightbox/UvalibLightbox.js.map +1 -1
- package/dist/components/uvalib-lightbox/media.d.ts +1 -18
- package/dist/components/uvalib-lightbox/media.js +1 -42
- package/dist/components/uvalib-lightbox/media.js.map +1 -1
- package/dist/components/uvalib-pager/UvalibPager.d.ts +58 -4
- package/dist/components/uvalib-pager/UvalibPager.js +232 -8
- package/dist/components/uvalib-pager/UvalibPager.js.map +1 -1
- package/dist/components/uvalib-photo-grid/UvalibPhotoGrid.d.ts +27 -1
- package/dist/components/uvalib-photo-grid/UvalibPhotoGrid.js +192 -26
- package/dist/components/uvalib-photo-grid/UvalibPhotoGrid.js.map +1 -1
- package/dist/components/uvalib-results-count/UvalibResultsCount.d.ts +62 -0
- package/dist/components/uvalib-results-count/UvalibResultsCount.js +208 -0
- package/dist/components/uvalib-results-count/UvalibResultsCount.js.map +1 -0
- package/dist/components/uvalib-results-count/uvalib-results-count.d.ts +1 -0
- package/dist/components/uvalib-results-count/uvalib-results-count.js +4 -0
- package/dist/components/uvalib-results-count/uvalib-results-count.js.map +1 -0
- package/dist/components/uvalib-tabs/UvalibTabs.d.ts +127 -0
- package/dist/components/uvalib-tabs/UvalibTabs.js +821 -0
- package/dist/components/uvalib-tabs/UvalibTabs.js.map +1 -0
- package/dist/components/uvalib-tabs/uvalib-tabs.d.ts +1 -0
- package/dist/components/uvalib-tabs/uvalib-tabs.js +4 -0
- package/dist/components/uvalib-tabs/uvalib-tabs.js.map +1 -0
- package/dist/components/uvalib-tag-list/UvalibTagList.d.ts +89 -0
- package/dist/components/uvalib-tag-list/UvalibTagList.js +411 -0
- package/dist/components/uvalib-tag-list/UvalibTagList.js.map +1 -0
- package/dist/components/uvalib-tag-list/uvalib-tag-list.d.ts +1 -0
- package/dist/components/uvalib-tag-list/uvalib-tag-list.js +4 -0
- package/dist/components/uvalib-tag-list/uvalib-tag-list.js.map +1 -0
- package/dist/custom-elements.json +7140 -2630
- package/dist/index.d.ts +8 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/styles/base.js +35 -1
- package/dist/styles/base.js.map +1 -1
- package/dist/styles/color-scheme.js +4 -0
- package/dist/styles/color-scheme.js.map +1 -1
- package/dist/styles/controls.js +2 -0
- package/dist/styles/controls.js.map +1 -1
- package/dist/styles/results.d.ts +1 -0
- package/dist/styles/results.js +257 -0
- package/dist/styles/results.js.map +1 -0
- package/dist/tokens.css +4 -0
- package/dist-cdn/base.css +289 -1
- package/dist-cdn/chunks/{base-CAFQWnZG.js → base-p5pk0vb2.js} +36 -2
- package/dist-cdn/chunks/{base-CAFQWnZG.js.map → base-p5pk0vb2.js.map} +1 -1
- package/dist-cdn/chunks/inline-copy-BANQSMIR.js +69 -0
- package/dist-cdn/chunks/inline-copy-BANQSMIR.js.map +1 -0
- package/dist-cdn/chunks/{site-header-C9V7Wuw2.js → site-header-BlOYvQg1.js} +5 -1
- package/dist-cdn/chunks/site-header-BlOYvQg1.js.map +1 -0
- package/dist-cdn/chunks/source-children-BHsDwCvL.js +53 -0
- package/dist-cdn/chunks/source-children-BHsDwCvL.js.map +1 -0
- package/dist-cdn/chunks/url-param-C1sk_F1d.js +28 -0
- package/dist-cdn/chunks/url-param-C1sk_F1d.js.map +1 -0
- package/dist-cdn/custom-elements.json +7140 -2630
- package/dist-cdn/manifest.json +7 -2
- package/dist-cdn/site-header.js +1 -1
- package/dist-cdn/site-page.js +2 -2
- package/dist-cdn/site-style.js +1 -1
- package/dist-cdn/skills/uvalib-web-components/SKILL.md +179 -19
- package/dist-cdn/skills/uvalib-web-components/reference/components.md +220 -6
- package/dist-cdn/tokens.css +4 -0
- package/dist-cdn/uvalib-card.js +94 -20
- package/dist-cdn/uvalib-card.js.map +1 -1
- package/dist-cdn/uvalib-chip-group.js +496 -0
- package/dist-cdn/uvalib-chip-group.js.map +1 -0
- package/dist-cdn/uvalib-contents.js +2 -1
- package/dist-cdn/uvalib-contents.js.map +1 -1
- package/dist-cdn/uvalib-date-histogram.js +850 -0
- package/dist-cdn/uvalib-date-histogram.js.map +1 -0
- package/dist-cdn/uvalib-lightbox.js +26 -48
- package/dist-cdn/uvalib-lightbox.js.map +1 -1
- package/dist-cdn/uvalib-metadata.js +2 -1
- package/dist-cdn/uvalib-metadata.js.map +1 -1
- package/dist-cdn/uvalib-pager.js +141 -7
- package/dist-cdn/uvalib-pager.js.map +1 -1
- package/dist-cdn/uvalib-photo-grid.js +121 -19
- package/dist-cdn/uvalib-photo-grid.js.map +1 -1
- package/dist-cdn/uvalib-results-count.js +101 -0
- package/dist-cdn/uvalib-results-count.js.map +1 -0
- package/dist-cdn/uvalib-tabs.js +436 -0
- package/dist-cdn/uvalib-tabs.js.map +1 -0
- package/dist-cdn/uvalib-tag-list.js +267 -0
- package/dist-cdn/uvalib-tag-list.js.map +1 -0
- package/package.json +24 -3
- package/skills/uvalib-web-components/SKILL.md +179 -19
- package/skills/uvalib-web-components/reference/components.md +220 -6
- package/dist-cdn/chunks/site-header-C9V7Wuw2.js.map +0 -1
- package/dist-cdn/chunks/source-children-RuAec527.js +0 -119
- package/dist-cdn/chunks/source-children-RuAec527.js.map +0 -1
|
@@ -613,13 +613,14 @@ A breadcrumb trail, as on library.virginia.edu: links separated by slashes, endi
|
|
|
613
613
|
|
|
614
614
|
## `<uvalib-card>`
|
|
615
615
|
|
|
616
|
-
One card: a collection (title and “N texts”), a photo (image, count, date, category, title, excerpt) or any other raised summary. With `href`, the heading is the link and a pseudo-element stretches that link over the card, so the whole card is one click. The arrow is only a visual aid. The card is never wrapped in an `<a>`. A clickable card must not contain another link, button or other control: the stretched link covers it. A static card (no `href`, or an empty or unsafe one) has no stretch, so its excerpt may contain links. With `href`, the heading needs an accessible name (text, or an image `alt` or `aria-label`); otherwise the link is hidden. Regions are light-DOM children. Give `slot="media"`, `slot="badge"`, `slot="heading"`, `slot="meta"` or `slot="
|
|
616
|
+
One card: a collection (title and “N texts”), a photo (image, count, date, category, title, excerpt) or any other raised summary. With `href`, the heading is the link and a pseudo-element stretches that link over the card, so the whole card is one click. The arrow is only a visual aid. The card is never wrapped in an `<a>`. A clickable card must not contain another link, button or other control: the stretched link covers it. A static card (no `href`, or an empty or unsafe one) has no stretch, so its excerpt and `actions` slot may contain links. With `href`, the heading needs an accessible name (text, or an image `alt` or `aria-label`); otherwise the link is hidden. `media-shape="circle"` draws the media as a centered circle, for a person or avatar. The image keeps its alt, and the count badge still sits on it. Any other shape is ignored. Regions are light-DOM children. Give `slot="media"`, `slot="badge"`, `slot="heading"`, `slot="meta"`, `slot="chip"` or `slot="actions"`; anything else (including text) is the excerpt. An image needs a real alt, or `alt=""` when the heading already names it. A date belongs in `<time>` in the meta slot. One element per chip. `actions` is a row of links or buttons on a static card (“Read the story”, “Photos (132)”). The heading level defaults like `<events-section>`: one below the nearest heading before the card, or 3 when there is none. `heading-level` (1–6) wins. An invalid value is ignored.
|
|
617
617
|
|
|
618
618
|
### Attributes
|
|
619
619
|
|
|
620
620
|
| Attribute | Type | Default | Description |
|
|
621
621
|
|---|---|---|---|
|
|
622
622
|
| `href` | `string \| undefined` | | Makes the card one link: the heading stretches over the card. Empty is not a link. |
|
|
623
|
+
| `media-shape` | `string` | `''` | `circle` crops the media to a centered circle and keeps the image alt. Anything else is ignored, with one console warning. |
|
|
623
624
|
| `heading-level` | `number \| undefined` | | Heading level of the title, 1–6. Unset, it is one below the nearest heading before this card, or 3 when there is none. Any other value is ignored. |
|
|
624
625
|
| `no-shadow-dom` | `boolean` | `false` | |
|
|
625
626
|
| `no-style` | `boolean` | `false` | |
|
|
@@ -633,6 +634,7 @@ One card: a collection (title and “N texts”), a photo (image, count, date, c
|
|
|
633
634
|
| `heading` | The card title. With `href`, this heading’s link is the card, so it needs an accessible name. |
|
|
634
635
|
| `meta` | Date (`<time>`) or byline, under the title. |
|
|
635
636
|
| `chip` | Category. One element per chip. |
|
|
637
|
+
| `actions` | Links or buttons on a static card. A clickable card must not contain them; the card link covers them. |
|
|
636
638
|
| (default) | Excerpt. A static card may put links here; a clickable card must not contain other controls. |
|
|
637
639
|
|
|
638
640
|
### Events
|
|
@@ -684,6 +686,45 @@ A grid of `<uvalib-card>` elements. It is a list, so a screen reader announces h
|
|
|
684
686
|
|---|---|---|
|
|
685
687
|
| `--uvalib-card-min` | | Set from `min-card-width` when that value is a length. The grid uses it as the `auto-fill` minimum. |
|
|
686
688
|
|
|
689
|
+
## `<uvalib-chip-group>`
|
|
690
|
+
|
|
691
|
+
A row of chips: a segmented control or single-select filter (`mode="single"`), filter chips that toggle (`mode="multi"`), or suggestion chips that go somewhere (`mode="links"`), as in a year rail with counts (“2005 213”), a sort toggle (“Most photos \| Date \| Title A–Z”) or “Try: snow on the Lawn”. Give the chips as children, `<button value="2005" data-count="213">2005</button>` (the value is the `value` attribute, else `data-value`, else the text; `disabled` disables), or `<a href>` in `links` mode, or set the `items` property (`{ value, label, count?, href?, disabled? }`), which wins over the children while set. The chips follow later changes to the children. `single`: native radios drawn as chips, in a `role="radiogroup"` named by `label`. Tab enters the group at the selected chip, the arrow keys move and select (as any radio group), and `value` is the selected chip's value. `multi`: toggle buttons with `aria-pressed`, and `value` is an array (as an attribute, comma-separated). `links`: links, or buttons that fire `select`, with no selected state; a chip whose href is unsafe (`javascript:`) is plain text, and an empty href is a button. A count is shown in a smaller muted span after the label and read as part of the name: “2005, 213 items”, with `count-label` in place of “items”. A selected chip is filled, keeps its border and shows a tick. Chips wrap on a narrow screen; `scroll` keeps them on one row that scrolls sideways, with its scrollbar shown and a fade at an edge with more chips. Each chip is a target at least 44px square. `segmented` joins the chips into one bar that does not wrap (a long label wraps inside its segment), like the header's Light / Dark / System control. `url-param` (for example `year`) keeps the value in the address (`?year=2005`, a multi value comma-separated, inside the hash on a hash route). It is read on connect; the markup's `value` stands for the address without the parameter, and any other value is written, an empty one as `?year=`. Each change is one `pushState`: in `multi` at once, in `single` once the visitor settles (a second after the last change, so arrowing through a year rail adds one entry, none if it ends where it started). Back and Forward are followed and fire `change` with `restored: true`.
|
|
692
|
+
|
|
693
|
+
### Attributes
|
|
694
|
+
|
|
695
|
+
| Attribute | Type | Default | Description |
|
|
696
|
+
|---|---|---|---|
|
|
697
|
+
| `mode` | `ChipGroupMode` | `'single'` | `single` (radios: one value), `multi` (toggles: an array of values) or `links`. |
|
|
698
|
+
| `label` | `string` | `''` | The group's accessible name (required), also the first part of the analytics name. |
|
|
699
|
+
| `value` | `string \| string[]` | `''` | The selection: a chip's value in `single`, an array of values in `multi` (as an attribute, comma-separated). Setting it does not fire `change`. Unused in `links`. |
|
|
700
|
+
| `count-label` | `string` | `'items'` | The word after a count in each chip's accessible name: “2005, 213 items”. |
|
|
701
|
+
| `scroll` | `boolean` | `false` | One row that scrolls sideways instead of wrapping. |
|
|
702
|
+
| `segmented` | `boolean` | `false` | Join the chips into one segmented bar. |
|
|
703
|
+
| `url-param` | `string` | `''` | Query parameter that keeps the value in the address, for example `year` → `?year=2005`. |
|
|
704
|
+
| `no-shadow-dom` | `boolean` | `false` | |
|
|
705
|
+
| `no-style` | `boolean` | `false` | |
|
|
706
|
+
|
|
707
|
+
### Events
|
|
708
|
+
|
|
709
|
+
| Event | Description |
|
|
710
|
+
|---|---|
|
|
711
|
+
| `change` | The visitor changed the selection (`single`, `multi`), or Back or Forward changed it through `url-param`: `detail` is `{ value, restored? }` (a string in `single`, an array in `multi`; `restored` is true for Back and Forward). Not fired when the app sets `value`. Bubbles and is composed. |
|
|
712
|
+
| `select` | `links` mode: a chip was chosen. `detail` is `{ value, href? }`. For a link, a plain primary click fires it cancelable: cancel it (`preventDefault()`) to route in the app, and the click's default is prevented too. Bubbles and is composed. |
|
|
713
|
+
| `uvalib-analytics-event` | For `<site-analytics>`, on the visitor's actions only: `['uvalib-chip-group', 'change', '<label>: <chip label>', <count>?]` (in `single`, one second after the last change, for the chip then selected; in `multi`, for the chip toggled), and `['uvalib-chip-group', 'select', '<label>']` in `links` mode (never the chip or its URL). The count is sent when it is a number. Bubbles and is composed. |
|
|
714
|
+
|
|
715
|
+
### CSS custom properties
|
|
716
|
+
|
|
717
|
+
| Property | Default | Description |
|
|
718
|
+
|---|---|---|
|
|
719
|
+
| `--uva-color-surface-raised` | | Dark-mode role token: chip background (else #fff). |
|
|
720
|
+
| `--uva-color-control-border` | | Dark-mode role token: chip border (else `--uva-grey`, #808080). |
|
|
721
|
+
| `--uva-color-link` | | Dark-mode role token: chip text and hover border (else `--uva-brand-blue`). |
|
|
722
|
+
| `--uva-color-text-muted` | | Dark-mode role token: the count (else #4f4f4f). |
|
|
723
|
+
| `--uva-color-accent-bg` | | Dark-mode role token: selected chip background and border (else `--uva-brand-blue`). |
|
|
724
|
+
| `--uva-color-on-accent` | | Dark-mode role token: selected chip text (else #fff). |
|
|
725
|
+
| `--uva-color-focus` | | Dark-mode role token: focus ring (else `--uva-brand-orange`). |
|
|
726
|
+
| `--uva-color-surface` | | Dark-mode role token: the page background the scrolling row fades into at an edge with more chips (else #fff). |
|
|
727
|
+
|
|
687
728
|
## `<uvalib-contents>`
|
|
688
729
|
|
|
689
730
|
Sub-navigation or a table of contents, as library.virginia.edu's sub-navigation: a `<nav>` landmark (named by `label`, "Contents" by default) with the label as a visible headline, and a nested list of links with dividers between the top-level entries and a bar beside each nested level. Give the list as a child: an `<ol>` or `<ul>` of `<li>` elements, each with an `<a href>` (or plain text for a group label) and, for sub-entries, a nested `<ol>`/`<ul>`, to any depth. Other children (a heading) are ignored. The list follows changes to the children. Apps set the `items` property instead (`{ label, href?, children? }`, winning over the children while set). The current entry gets `aria-current`: `page` for the link to this page, `location` for the link to the section of it in the URL's hash. It is found from the page URL (path, and hash for in-page sections), followed through same-document navigations (`hashchange`, `popstate` and the Navigation API), or from the `current` attribute (a URL, resolved like the links). An entry whose href has a query string matches only that query (`?part=2`); one without matches the page whatever its query. Hash-only hrefs are places on that page. With `current` unset, a valid `aria-current` on a source link (`page`, `location` or `true`) is used instead, the first of each kind. `lang` and `dir` on the source links and items, and inline markup in their text (`em`, `cite`, `code`, `abbr`…, copied element by element, never as HTML), are kept. On narrow screens the list collapses into a disclosure: the headline becomes a button with `aria-expanded`, and the list starts closed (as the Electronic Text Collections' Contents does on phones, so the text comes first) until the reader opens it, or while the `open` attribute is set; opening it shows the current entry. Narrow means the viewport (`collapse-below`, 64rem by default), not the element's own width: a contents sidebar is always far narrower than 64rem, so a container query could not tell a phone from a desktop. `sticky` keeps it in view in a sidebar on wide screens; a list longer than the window then scrolls, and the current entry is scrolled into view inside it (never the page). Single-page apps: the list is drawn from copies of the children, so a router's own click handlers on them do not run. Listen for `uvalib-contents-navigate` and cancel it to route in place; hash links need nothing.
|
|
@@ -727,6 +768,65 @@ Sub-navigation or a table of contents, as library.virginia.edu's sub-navigation:
|
|
|
727
768
|
| `--uva-color-surface-raised` | | Dark-mode role token: the button's background (else #fff). |
|
|
728
769
|
| `--uva-color-focus` | | Dark-mode role token: focus ring (else `--uva-brand-orange`). |
|
|
729
770
|
|
|
771
|
+
## `<uvalib-date-histogram>`
|
|
772
|
+
|
|
773
|
+
Monthly or yearly counts as bars: a date distribution for a search page, an archive timeline or a card. Give `items` (`{ date, count }`, `date` a `YYYY` or `YYYY-MM`) or a child `<table>` (the no-JS fallback). `granularity="month"` draws twelve bars for every year from the first date to the last, including months with a count of zero. A year-only count in a month chart, a day, or any other date is a chip beside the chart. Each bar is a button named like "October 2015: 5,311 photos". Arrow keys move between bars; Enter or Space selects. `selected` is one bucket (`2015-10`, `2015`) or a range (`2015-03/2016-01`, also `..` or an en dash). The selection is `aria-pressed`, an inset ring and a stripe, not colour alone. Choosing a bar fires `select` with `{ from, to }` as ISO dates (a month runs from its first day to its last). Choosing the selected bar again clears it (`from` and `to` are empty strings). `range-for` is the id of a `<uvalib-date-range>`. A bar click sets that element's `value`. Its `date-range-change` (and its `value` when this element connects, reconnects, or the range is added later) highlights the buckets that overlap the range. A value that is exactly the range's own `min` and `max` is no selection. Setting `selected` here updates the date range; setting the date range's `value` in script does not, unless this element connects afterwards or the range fires `date-range-change`. `variant="strip"` is the small per-year row for a card: not interactive, `role="img"`, one bar per year whatever `granularity` is. The chart reserves its height before the counts arrive: one bar track, or one track per year when those years are already known from the data, a linked date range or the table (`--uvalib-date-histogram-bar-size`, 8rem, plus the year-row gap). Filling the bars in does not move the page. On a narrow screen a month row scrolls inside the component; "Scroll sideways to see more." shows while it overflows. Years wrap.
|
|
774
|
+
|
|
775
|
+
### Attributes
|
|
776
|
+
|
|
777
|
+
| Attribute | Type | Default | Description |
|
|
778
|
+
|---|---|---|---|
|
|
779
|
+
| `items` | `HistogramItem[]` | `[]` | Counts to draw. When non-empty, wins over the child table. Set a new array to update. |
|
|
780
|
+
| `granularity` | `'year' \| 'month'` | `'month'` | `month` (twelve bars per year) or `year`. Anything else is month, with one console warning. |
|
|
781
|
+
| `scale` | `'linear' \| 'log'` | `'linear'` | `log` scales bar height by log(count + 1). Anything else is linear. |
|
|
782
|
+
| `selected` | `string` | `''` | One bucket (`2015-10` or `2015`) or a range (`2015-03/2016-01`). A linked date range writes a range here. Empty when nothing is selected. |
|
|
783
|
+
| `range-for` | `string` | `''` | Id of a `<uvalib-date-range>` to keep in step with, both ways. |
|
|
784
|
+
| `variant` | `string` | `''` | `strip`: a non-interactive per-year row (`role="img"`). Anything else is the bar chart. |
|
|
785
|
+
| `unit` | `string` | `'items'` | Word after the count in each bar's name. Plural; a count of one drops a trailing s. |
|
|
786
|
+
| `label` | `string` | `'Dates'` | Accessible name of the bar group, and the start of the strip's summary. |
|
|
787
|
+
| `no-shadow-dom` | `boolean` | `false` | |
|
|
788
|
+
| `no-style` | `boolean` | `false` | |
|
|
789
|
+
|
|
790
|
+
### Slots
|
|
791
|
+
|
|
792
|
+
| Slot | Description |
|
|
793
|
+
|---|---|
|
|
794
|
+
| (default) | A `<table>` of dates and counts: two columns (date, count) or a year-by-month grid. Without JavaScript it is the fallback. With JavaScript it supplies the counts when `items` is empty. Show as table lists those counts, including odd dates; once `items` is set it lists `items` instead. |
|
|
795
|
+
|
|
796
|
+
### CSS parts
|
|
797
|
+
|
|
798
|
+
| Part | Description |
|
|
799
|
+
|---|---|
|
|
800
|
+
| `chart` | The bar chart (shadow mode). |
|
|
801
|
+
| `bar` | A bar button, or a strip segment (shadow mode). |
|
|
802
|
+
| `table` | The generated table in Show as table (shadow mode). |
|
|
803
|
+
|
|
804
|
+
### Events
|
|
805
|
+
|
|
806
|
+
| Event | Description |
|
|
807
|
+
|---|---|
|
|
808
|
+
| `select` | A bar or an odd-date chip was chosen, or the current one chosen again to clear it. `detail` is `{ from, to }` (ISO dates, or the odd token). Empty strings clear the selection. Not fired when `selected` is set in script or when a linked date range changes. Bubbles and is composed. |
|
|
809
|
+
| `uvalib-analytics-event` | For `<site-analytics>`: `['uvalib-date-histogram', 'select', '<from>–<to>']` when both ends are ISO dates, or `'other'` for any other choice. Not fired when the selection is cleared, set in script, or restored from a date range. Bubbles and is composed. |
|
|
810
|
+
|
|
811
|
+
### CSS custom properties
|
|
812
|
+
|
|
813
|
+
| Property | Default | Description |
|
|
814
|
+
|---|---|---|
|
|
815
|
+
| `--uvalib-date-histogram-bar-size` | `8rem` | Height of each bar track. The chart reserves one track, or one per known year, before the counts arrive. |
|
|
816
|
+
| `--uvalib-date-histogram-strip-size` | `1.5rem` | Height of `variant="strip"`. |
|
|
817
|
+
| `--uva-brand-blue` | `#232d4b` | Bar fill. |
|
|
818
|
+
| `--uva-brand-orange` | `#e57200` | Focus ring when `--uva-color-focus` is unset. |
|
|
819
|
+
| `--uva-font-family` | `inherit` | Font family. |
|
|
820
|
+
| `--uva-color-accent-bg` | | Dark-mode role token: bar fill (else `--uva-brand-blue`). |
|
|
821
|
+
| `--uva-color-on-accent` | | Dark-mode role token: the selection stripe (else #fff). |
|
|
822
|
+
| `--uva-color-text` | | Dark-mode role token: labels and the selection ring (else #2b2b2b). |
|
|
823
|
+
| `--uva-color-text-muted` | | Dark-mode role token: the scroll hint (else #4b5563). |
|
|
824
|
+
| `--uva-color-track` | | Dark-mode role token: the empty part of a bar (else #e5e7eb). |
|
|
825
|
+
| `--uva-color-surface` | | Dark-mode role token: the sticky year label (else #fff). |
|
|
826
|
+
| `--uva-color-surface-raised` | | Dark-mode role token: odd-date chips (else #fff). |
|
|
827
|
+
| `--uva-color-control-border` | | Dark-mode role token: bar, chip and table borders (else #808080). |
|
|
828
|
+
| `--uva-color-focus` | | Dark-mode role token: focus ring (else `--uva-brand-orange`). |
|
|
829
|
+
|
|
730
830
|
## `<uvalib-date-range>`
|
|
731
831
|
|
|
732
832
|
A date-range picker: a two-thumb year slider plus "From" and "To" date inputs. `min` and `max` (ISO dates, `YYYY-MM-DD`) are required; without valid ones the element renders nothing and logs a console warning once. The start can never pass the end, and both stay within `min`..`max`.
|
|
@@ -935,7 +1035,7 @@ Pagefind's default search UI (`PagefindUI`, from the site's own Pagefind bundle)
|
|
|
935
1035
|
|
|
936
1036
|
## `<uvalib-pager>`
|
|
937
1037
|
|
|
938
|
-
Previous/next section links, as on a reading page, or a numbered page list. Previous/next: set `prev-href` and `next-href` (either may be omitted). Each link shows a “Previous” or “Next” kicker and, when `prev-label` or `next-label` is set, that title. A visually hidden “: ” sits between them, so the accessible name is punctuated even when CSS is off. A long title truncates visually; the full text stays in the accessible name. The links use `rel="prev"` and `rel="next"`. With neither href, nothing is rendered. Numbered pages: set `pages` (a positive count). `page` is the current page, clamped to `1…pages`. Each link’s href comes from `href-template`, which must contain `{page}` (the default is `?page={page}`). The current page is text with `aria-current="page"`, not a link. Long ranges collapse to the first page, a window around the current page, the last page, and an ellipsis where numbers are skipped. `pages` wins when previous/next attributes are also set, with one console warning. The landmark’s accessible name is `label`, or “Sections” for previous/next and “Pagination” for numbered pages. An empty `label` uses that default. Two pagers on one page need different labels: a repeated landmark name fails the accessibility check.
|
|
1038
|
+
Previous/next section links, as on a reading page, or a numbered page list. Previous/next: set `prev-href` and `next-href` (either may be omitted). Each link shows a “Previous” or “Next” kicker and, when `prev-label` or `next-label` is set, that title. A visually hidden “: ” sits between them, so the accessible name is punctuated even when CSS is off. A long title truncates visually; the full text stays in the accessible name. The links use `rel="prev"` and `rel="next"`. With neither href, nothing is rendered. Numbered pages: set `pages` (a positive count). `page` is the current page, clamped to `1…pages`. Each link’s href comes from `href-template`, which must contain `{page}` (the default is `?page={page}`). The current page is text with `aria-current="page"`, not a link. Long ranges collapse to the first page, a window around the current page, the last page, and an ellipsis where numbers are skipped. `pages` wins when previous/next attributes are also set, with one console warning. Load more: `mode="load-more"` shows a “Load more” button and “Showing N of M” (`shown` of `total`). It wins over numbered pages and previous/next, with one warning when those are also set. The button is not a link and the control is a group, not a navigation landmark. The button hides once `shown` has reached a positive `total`. `page` is the last loaded page (default 1). A click fires `load-more` with `{ page }` set to the next page and reports `['uvalib-pager', 'load-more', '', page]`. Nothing is reported on render. Call `loaded(firstNewElement)`, or set `for` to a list id and call `loaded()`, and focus moves to that new item. The landmark’s accessible name is `label`, or “Sections” for previous/next and “Pagination” for numbered pages. Load more uses `label` or “More results”. An empty `label` uses that default. Two pagers on one page need different labels: a repeated landmark name fails the accessibility check.
|
|
939
1039
|
|
|
940
1040
|
### Attributes
|
|
941
1041
|
|
|
@@ -945,7 +1045,11 @@ Previous/next section links, as on a reading page, or a numbered page list. Prev
|
|
|
945
1045
|
| `prev-label` | `string \| undefined` | | Title of the previous section, under the “Previous” kicker. |
|
|
946
1046
|
| `next-href` | `string \| undefined` | | Href of the next section. Omitted, that side is not shown. |
|
|
947
1047
|
| `next-label` | `string \| undefined` | | Title of the next section, under the “Next” kicker. |
|
|
948
|
-
| `
|
|
1048
|
+
| `mode` | `string \| undefined` | | `load-more` shows a Load more button instead of previous/next or numbered pages. Any other value, including empty, leaves the pager in its other modes. |
|
|
1049
|
+
| `shown` | `number \| undefined` | | How many results are already shown. Used by `mode="load-more"` as N in “Showing N of M”. |
|
|
1050
|
+
| `total` | `number \| undefined` | | How many results there are. Used by `mode="load-more"` as M in “Showing N of M”. |
|
|
1051
|
+
| `for` | `string \| undefined` | | Id of the list Load more appends to. `loaded()` focuses the first child added after the click. Ignored when `loaded` is passed an element. |
|
|
1052
|
+
| `page` | `number \| undefined` | | Current page, from 1. Clamped to `pages`. Used when `pages` is set. In load-more, the last loaded page (default 1); a click asks for the next one. |
|
|
949
1053
|
| `pages` | `number \| undefined` | | How many pages. A positive number selects numbered pages and ignores previous/next. Zero, negative or non-numeric does not. |
|
|
950
1054
|
| `href-template` | `string \| undefined` | | Href of each numbered page, with `{page}` where the number goes. Default `?page={page}` when omitted. Without `{page}`, numbered links are not made. |
|
|
951
1055
|
| `label` | `string \| undefined` | | Accessible name of the navigation landmark. Default “Pagination” for numbered pages and “Sections” for previous/next. Empty uses that default. A second pager on the page needs its own name. |
|
|
@@ -956,7 +1060,8 @@ Previous/next section links, as on a reading page, or a numbered page list. Prev
|
|
|
956
1060
|
|
|
957
1061
|
| Event | Description |
|
|
958
1062
|
|---|---|
|
|
959
|
-
| `
|
|
1063
|
+
| `load-more` | A primary click on Load more: `detail` is `{ page }` (the next page). Bubbles and is composed. |
|
|
1064
|
+
| `uvalib-analytics-event` | For `<site-analytics>`: a primary-button click that was not already canceled, including a modified click, on a page link `['uvalib-pager', 'page-change', 'number', <n>]`, on a section link `['uvalib-pager', 'page-change', 'next'\|'previous']`, or on Load more `['uvalib-pager', 'load-more', '', <next page>]`. Never the label or URL. Nothing on render. Bubbles and is composed. |
|
|
960
1065
|
| `uvalib-pager-navigate` | A plain click on a pager link: `detail` is `{ href, kind, page? }` (`kind` is `'next'`, `'previous'` or `'number'`; `page` is set for `'number'`). Cancel it (`preventDefault()`) to route in the app; the click’s default is then prevented. Bubbles and is composed. |
|
|
961
1066
|
|
|
962
1067
|
### CSS custom properties
|
|
@@ -969,10 +1074,13 @@ Previous/next section links, as on a reading page, or a numbered page list. Prev
|
|
|
969
1074
|
| `--uva-color-focus` | | Dark-mode role token: focus ring (else `--uva-brand-orange`). |
|
|
970
1075
|
| `--uva-color-accent-bg` | | Dark-mode role token: current page background (else `--uva-brand-blue`). |
|
|
971
1076
|
| `--uva-color-on-accent` | | Text on the current page background (else #fff). |
|
|
1077
|
+
| `--uva-color-button-bg` | | Load more background (else `--uva-blue-alt`). |
|
|
1078
|
+
| `--uva-color-button-text` | | Load more text (else #fff). Dark mode’s own text is dark on the light button. |
|
|
1079
|
+
| `--uva-color-button-hover-bg` | | Load more hover background (else `--uva-blue-alt-A`). |
|
|
972
1080
|
|
|
973
1081
|
## `<uvalib-photo-grid>`
|
|
974
1082
|
|
|
975
|
-
Justified rows of thumbnails. Each direct child that is a link or a button is one photo; its image keeps its shape from the `width` and `height` attributes, or from the loaded image, so the row does not jump when the picture arrives. The row is about 220px tall and shorter on a phone; `row-height` sets that height. Every item stays a real link or button. An image with no visible text gets a visible caption from its alt (the caption is then the accessible name, and a repeated alt is cleared). The original alt is kept in `data-uvalib-alt` so a lightbox still describes the picture. An item with no name at all is captioned “Photo N” and warned about once; that caption is renumbered when the photos change order. An `aria-label` is left as the name: the grid does not add a caption that would disagree with it. Put the grid inside `<uvalib-lightbox>` and a plain click opens the viewer.
|
|
1083
|
+
Justified rows of thumbnails. Each direct child that is a link or a button is one photo; its image keeps its shape from the `width` and `height` attributes, or from the loaded image, so the row does not jump when the picture arrives. The row is about 220px tall and shorter on a phone; `row-height` sets that height. Every item stays a real link or button. An image with no visible text gets a visible caption from its alt (the caption is then the accessible name, and a repeated alt is cleared). The original alt is kept in `data-uvalib-alt` so a lightbox still describes the picture. An item with no name at all is captioned “Photo N” and warned about once; that caption is renumbered when the photos change order. An `aria-label` is left as the name: the grid does not add a caption that would disagree with it. Put the grid inside `<uvalib-lightbox>` and a plain click opens the viewer. A badge sits on the thumbnail: `<span slot="badge">` inside the link or button, or `data-badge` on that item (for example “seq” or “3 photos”). It is read after the caption (“The Lawn, 3 photos”). When the item already has an `aria-label`, the badge is appended to that label (the author’s words stay in `data-uvalib-label`) and an alt that repeats those words is cleared. A badge does not replace the alt caption.
|
|
976
1084
|
|
|
977
1085
|
### Attributes
|
|
978
1086
|
|
|
@@ -986,7 +1094,7 @@ Justified rows of thumbnails. Each direct child that is a link or a button is on
|
|
|
986
1094
|
|
|
987
1095
|
| Slot | Description |
|
|
988
1096
|
|---|---|
|
|
989
|
-
| (default) | The thumbnails: one `<a href>` or `<button>` per photo, each with an `<img>`. |
|
|
1097
|
+
| (default) | The thumbnails: one `<a href>` or `<button>` per photo, each with an `<img>`. A `<span slot="badge">` inside an item is drawn over that thumbnail. |
|
|
990
1098
|
|
|
991
1099
|
### CSS custom properties
|
|
992
1100
|
|
|
@@ -998,6 +1106,112 @@ Justified rows of thumbnails. Each direct child that is a link or a button is on
|
|
|
998
1106
|
| `--uva-grey-darkest` | `#2b2b2b` | Caption colour when `--uva-color-text` is unset. |
|
|
999
1107
|
| `--uva-brand-orange` | `#e57200` | Focus ring when `--uva-color-focus` is unset. |
|
|
1000
1108
|
|
|
1109
|
+
## `<uvalib-results-count>`
|
|
1110
|
+
|
|
1111
|
+
The results summary of a search or listing page, such as “Showing 48 of 3,694 shoots”, and a polite live region that tells screen reader users when it changes. Set `total` (how many match), `shown` (how many are on the page) and `noun` (plural, default “results”; `singular` for a total of one). The visible text follows at once: “Showing 48 of 3,694 shoots”, “Showing all 12 shoots” (shown is the total, or unset), “Showing 1 shoot” or “No shoots” (a total of 0, or 0 shown); with only `shown`, “Showing 48 shoots”. Numbers use thousands separators. A missing or blank `shown` or `total` is unset, not 0. The announcement waits until the text has not changed for `announce-delay` milliseconds (default 1000, as `<bento-box>` and `<uvalib-pagefind-search>` settle), so typing in a filter box is announced once. The first render is never announced; when it has no count yet (the data still loading), the first count that arrives is. A count is announced again when it comes back after a different one (a new search with the same number of results), but not when nothing was shown in between. The announcement is cleared from the hidden region five seconds later, so reading the page finds the count once. `<bento-box>` and `<uvalib-pagefind-search>` announce their own counts: use this element for your own listings, not beside them.
|
|
1112
|
+
|
|
1113
|
+
### Attributes
|
|
1114
|
+
|
|
1115
|
+
| Attribute | Type | Default | Description |
|
|
1116
|
+
|---|---|---|---|
|
|
1117
|
+
| `shown` | `number \| undefined` | | How many results are shown on the page. |
|
|
1118
|
+
| `total` | `number \| undefined` | | How many results match in all. |
|
|
1119
|
+
| `noun` | `string` | `'results'` | What is counted, plural: “results” by default. |
|
|
1120
|
+
| `singular` | `string` | `''` | What is counted, singular, for a total of one. Default: “result” when `noun` is unset, else `noun`. |
|
|
1121
|
+
| `announce-delay` | `number` | `1000` | Milliseconds the text must stay the same before it is announced. |
|
|
1122
|
+
| `no-shadow-dom` | `boolean` | `false` | |
|
|
1123
|
+
| `no-style` | `boolean` | `false` | |
|
|
1124
|
+
|
|
1125
|
+
### CSS parts
|
|
1126
|
+
|
|
1127
|
+
| Part | Description |
|
|
1128
|
+
|---|---|
|
|
1129
|
+
| `text` | The visible summary. |
|
|
1130
|
+
|
|
1131
|
+
### CSS custom properties
|
|
1132
|
+
|
|
1133
|
+
| Property | Default | Description |
|
|
1134
|
+
|---|---|---|
|
|
1135
|
+
| `--uva-color-text-muted` | | Dark-mode role token: text colour (else `--uva-grey-A`, #4f4f4f). |
|
|
1136
|
+
|
|
1137
|
+
## `<uvalib-tabs>`
|
|
1138
|
+
|
|
1139
|
+
Tabs, as on library.virginia.edu: a row of buttons over one visible panel. Each panel is a child with `data-tab="Events"` (and an `id` when the tab should be linkable). Or put `<button slot="tab">` elements first and one panel element after each; the button text is the label and those buttons are hidden, because the component draws the real tabs. The selected panel stays visible across the upgrade. With `base.css`, later `data-tab` panels stay hidden before the element upgrades, and space is reserved for the tab row so the first panel does not jump. The tab row wraps on a narrow screen. Arrow keys, Home and End move between tabs. Selection follows the arrow unless `activation="manual"`, in which case Enter or Space selects the focused tab. `selected` is the panel id (a label or a 0-based index also selects). It reflects the panel id. `url-param` writes that id into the query string, or into the hash when the page is a hash route (`#/stories?tab=events`). `url-param="hash"` uses the hash itself (`#events`) and leaves a hash route (`#/…`) alone.
|
|
1140
|
+
|
|
1141
|
+
### Attributes
|
|
1142
|
+
|
|
1143
|
+
| Attribute | Type | Default | Description |
|
|
1144
|
+
|---|---|---|---|
|
|
1145
|
+
| `selected` | `string` | `''` | The selected tab. A panel id, the tab label, or a 0-based index. Reflects the panel id once the tabs have been read. Empty selects the first tab. |
|
|
1146
|
+
| `activation` | `string` | `''` | `manual`: arrow keys move focus and Enter or Space selects. Anything else, including empty, selects as the arrow moves. |
|
|
1147
|
+
| `url-param` | `string` | `''` | Name of the query parameter that stores the selected panel id, so the tab is linkable and Back restores it. `hash` stores it in the hash (`#panel-id`) instead. Empty does not touch the URL. |
|
|
1148
|
+
| `label` | `string` | `''` | Accessible name of the tab list. Empty uses “Tabs”. |
|
|
1149
|
+
| `no-shadow-dom` | `boolean` | `false` | |
|
|
1150
|
+
| `no-style` | `boolean` | `false` | |
|
|
1151
|
+
|
|
1152
|
+
### Slots
|
|
1153
|
+
|
|
1154
|
+
| Slot | Description |
|
|
1155
|
+
|---|---|
|
|
1156
|
+
| (default) | The panels. Each element with `data-tab` is a panel, or each element that is not a `slot="tab"` button. |
|
|
1157
|
+
| `tab` | A `<button>` whose text labels the panel that follows. Hidden once the tabs are drawn. |
|
|
1158
|
+
|
|
1159
|
+
### Events
|
|
1160
|
+
|
|
1161
|
+
| Event | Description |
|
|
1162
|
+
|---|---|
|
|
1163
|
+
| `change` | The selected tab changed after the first render, including a script setting `selected` and the Back button. `detail` is `{ id, label, index }` (`id` is the panel id, `index` from 0). Not fired on the first render. Bubbles and is composed. |
|
|
1164
|
+
| `uvalib-analytics-event` | For `<site-analytics>`: a click or arrow-key selection, `['uvalib-tabs', 'change', '<tab label>']`. The label is cut to 100 characters. Not fired on the first render, when `selected` is set from script, or when Back or the hash restores a tab. |
|
|
1165
|
+
|
|
1166
|
+
### CSS custom properties
|
|
1167
|
+
|
|
1168
|
+
| Property | Default | Description |
|
|
1169
|
+
|---|---|---|
|
|
1170
|
+
| `--uva-color-button-bg` | | Dark-mode role token: unselected tab background (else `--uva-blue-alt-base`). |
|
|
1171
|
+
| `--uva-color-button-text` | | Text on an unselected tab (else #fff). |
|
|
1172
|
+
| `--uva-color-button-hover-bg` | | Dark-mode role token: unselected tab hover (else `--uva-blue-alt-dark`). |
|
|
1173
|
+
| `--uva-color-accent-bg` | | Dark-mode role token: selected tab background (else `--uva-brand-blue`). |
|
|
1174
|
+
| `--uva-color-on-accent` | | Selected tab text and the selected underline (else #fff). |
|
|
1175
|
+
| `--uva-color-focus` | | Dark-mode role token: focus outline (else `--uva-brand-orange`). |
|
|
1176
|
+
| `--uva-blue-alt-base` | `#007BAC` | Unselected tab when `--uva-color-button-bg` is unset. |
|
|
1177
|
+
| `--uva-blue-alt-dark` | `#005679` | Unselected hover when `--uva-color-button-hover-bg` is unset. |
|
|
1178
|
+
| `--uva-brand-blue` | `#232D4B` | Selected tab when `--uva-color-accent-bg` is unset. |
|
|
1179
|
+
| `--uva-brand-orange` | `#E57200` | Focus outline when `--uva-color-focus` is unset. |
|
|
1180
|
+
|
|
1181
|
+
## `<uvalib-tag-list>`
|
|
1182
|
+
|
|
1183
|
+
A labelled list of keywords or subjects that wraps: each tag a link (for example a search for that term) or plain text. Link tags are outlined pills in the link colour; plain tags are filled chips (the card chip's colours), so a link never looks like a label. Every tag and the toggle are at least 2rem (34px) tall and wide, 0.5rem apart. Give the tags as children: `<a href>` for a link, any other element (`<span>`) for plain text. A child's `lang` and `dir` are kept, and so is inline markup inside it (`em`, `cite`, `abbr`, `bdi`, a `span lang`…), copied element by element (never parsed as HTML). Or set `href-template` (with `{tag}`, replaced by the URL-encoded text) to make every tag without its own href a link; a blank href counts as none. Apps can set the `items` property (`{ label, href?, lang?, dir? }`) instead; it wins over the children. Children with no text are skipped with one warning. `label` names the list (shown above it, or visually hidden with `hide-label`); without one a console warning is logged. `limit` shows that many tags and a “Show all N” button (`aria-expanded`, `aria-controls`), which reveals the rest in place and keeps focus. Analytics never sends a tag's text (record tags can be user-submitted or machine-made), and by default not the label either, which a template may fill from a record: the name is the list's place among the tag lists on the page, `list N`. Add `track-label` when the label is fixed text the page author wrote (“Subjects”), to send it instead.
|
|
1184
|
+
|
|
1185
|
+
### Attributes
|
|
1186
|
+
|
|
1187
|
+
| Attribute | Type | Default | Description |
|
|
1188
|
+
|---|---|---|---|
|
|
1189
|
+
| `label` | `string` | `''` | The list's name: shown above the tags (and, with `track-label`, the analytics name). |
|
|
1190
|
+
| `hide-label` | `boolean` | `false` | Hide the label visually; it still names the list. |
|
|
1191
|
+
| `track-label` | `boolean` | `false` | Send the label as the analytics name. Only for fixed text the page author wrote, never a label filled from a record. Without it the name is `list N`. |
|
|
1192
|
+
| `limit` | `number \| undefined` | | Show this many tags and a “Show all N” button. Zero or empty shows every tag. |
|
|
1193
|
+
| `href-template` | `string` | `''` | Href for tags without their own, with `{tag}` where the URL-encoded text goes, for example `/search?q={tag}`. Empty: such tags are plain text. |
|
|
1194
|
+
| `no-shadow-dom` | `boolean` | `false` | |
|
|
1195
|
+
| `no-style` | `boolean` | `false` | |
|
|
1196
|
+
|
|
1197
|
+
### Events
|
|
1198
|
+
|
|
1199
|
+
| Event | Description |
|
|
1200
|
+
|---|---|
|
|
1201
|
+
| `uvalib-analytics-event` | For `<site-analytics>`: a primary-button click on a tag link, `['uvalib-tag-list', 'tag-click', '<name>', <n>]` (n from 1, the tag's place in the list), and the toggle, `['uvalib-tag-list', 'show-all'\|'show-fewer', '<name>']`. The name is `list N` (N from 1, the list's place among the tag lists in its document or shadow root), or with `track-label` the list's `label`; never the tag text or URL. Bubbles and is composed. |
|
|
1202
|
+
| `uvalib-tag-list-navigate` | A plain click on a tag link: `detail` is `{ href, tag, index }` (index from 0). Cancel it (`preventDefault()`) to route in the app; the click's default is then prevented. Bubbles and is composed. |
|
|
1203
|
+
|
|
1204
|
+
### CSS custom properties
|
|
1205
|
+
|
|
1206
|
+
| Property | Default | Description |
|
|
1207
|
+
|---|---|---|
|
|
1208
|
+
| `--uva-blue-alt-300` | `#BFE7F7` | Plain tag background (the card chip's). |
|
|
1209
|
+
| `--uva-blue-alt-dark` | `#005679` | Plain tag text. |
|
|
1210
|
+
| `--uva-color-link` | | Dark-mode role token: link tag text (else `--uva-brand-blue`). |
|
|
1211
|
+
| `--uva-color-control-border` | | Dark-mode role token: link tag outline (else `--uva-grey`). |
|
|
1212
|
+
| `--uva-color-text` | | Dark-mode role token: the label (else `--uva-grey-darkest`). |
|
|
1213
|
+
| `--uva-color-focus` | | Dark-mode role token: focus ring (else `--uva-brand-orange`). |
|
|
1214
|
+
|
|
1001
1215
|
## `<website-section>`
|
|
1002
1216
|
|
|
1003
1217
|
The library website's first pages (pages, people, libraries, news) matching `query`, from Drupal's search index, with its excerpt (the matched words marked). The index sends no CORS headers, so this section works on library.virginia.edu (or wherever `BentoBox.endpoints.website` points to a same-origin copy) only.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"site-header-C9V7Wuw2.js","names":["unsafeCSS","nothing","ifDefined","_decorate","property","state","n","i","r$1","b","define","__decorate","r","installLightDomStyles","UvalibElement","o","normalizeItems","readItemsMarkup","SiteMainNav","trackEvent","siteLink","accessible","dark","preFooterLinks","colorScheme","COLOR_SCHEME_STORAGE_KEY","COLOR_SCHEME_ATTR","CHANGE","DARK_QUERY","memory","asPreference","v","colorSchemeSupported","css","doc","readPreference","kept","systemIsDark","resolvePreference","pref","applyPreference","html","inline","clearPreference","setPreference","storage","installColorSchemeStyles","owners","ownersOf","set","FORCED_QUERY","rootColorScheme","attr","ColorSchemeController","host","enabled","renders","supported","root","next","changed","k","update","level","forced","ACCOUNT_URL","TAG","FULL_LINKS","VENDOR_LINKS","l","menuCounter","schemeCounter","DARK_LOGO_URL","SCHEME_OPTIONS","SITE_LINKS","isSiteLinksChild","MAIN_NAV","isMainNavChild","ALERTS","isAlertsChild","LINK_ATTRS","stopEvent","SiteHeader","path","a","link","menu","popover","brand","header","row","edge","items","top","crowded","li","was","keep","holder","logo","name","input","hint","systemDark","where","preference","A","sources","moved","raw","s","result","incoming","ref","invalid","el","text","content","vendor","id","anchor","mainNav","mainNavEl","label","own","classic","classicHidden","accordion","withMainNav","withMainNavHidden","end","hidden","registered"],"sources":["../../src/styles/color-scheme.ts","../../src/base/color-scheme.ts","../../src/components/site-header/SiteHeader.ts","../../src/components/site-header/site-header.ts"],"sourcesContent":["import { css, unsafeCSS } from 'lit';\n\n// Hand-written (not generated): the opt-in dark mode. Nothing here applies until the page's\n// root element has `data-uva-color-scheme` (set by `color-scheme-switch` or the documented\n// inline snippet), and only in browsers with light-dark(); everywhere else the role tokens are\n// undefined and every component falls back to its palette token or hex value, exactly as\n// before. The palette tokens in tokens.ts are untouched.\n//\n// Role tokens are light-dark() pairs; the light half reads the palette token, so a host's\n// own `:root { --uva-brand-*: … }` still applies in light mode. They are resolved where they\n// are used, against that element's `color-scheme`, which every component sets from\n// `--uva-color-scheme` (default `light`). Tokens with no single light value (the decorative\n// border) are set in dark only.\n\n/** Dark values for properties that have no one light value: each reader keeps its own. */\nconst darkOnly = `\n --uva-color-border: #7a84a0;\n`;\n\nconst dark = unsafeCSS(darkOnly);\n\n/**\n * Links in the pre-footer band are the site's own content: unstyled ones would keep the\n * browser's dark link colours (#9e9eff is 3.37:1 on the band). White is 8.05:1, visited too.\n * Layered like the rest of this sheet, so a site's own link colours still win.\n */\nconst preFooterLinks = 'color: var(--uva-color-pre-footer-text, #ffffff);';\n\nexport const colorScheme = css`\n @supports (color: light-dark(#000, #fff)) {\n :root[data-uva-color-scheme] {\n --uva-color-surface: light-dark(#ffffff, #10172b);\n --uva-color-surface-raised: light-dark(#ffffff, #232d4b);\n --uva-color-surface-hover: light-dark(var(--uva-grey-100, #dadada), #2c3858);\n --uva-color-text: light-dark(var(--uva-grey-darkest, #2b2b2b), #e8e8e8);\n --uva-color-text-muted: light-dark(#4b5563, #adadad);\n --uva-color-link: light-dark(var(--uva-brand-blue, #232d4b), #87b9d9);\n --uva-color-utility-link: light-dark(var(--uva-blue-alt-dark, #005679), #91d8f2);\n --uva-color-focus: light-dark(var(--uva-brand-orange, #e57200), #ffb370);\n --uva-color-current: light-dark(var(--uva-brand-orange, #e57200), #e57200);\n --uva-color-accent-bg: light-dark(var(--uva-brand-blue, #232d4b), #87b9d9);\n --uva-color-on-accent: light-dark(#ffffff, #10172b);\n --uva-color-control-border: light-dark(var(--uva-grey, #808080), #7a84a0);\n --uva-color-input-text: light-dark(#1f2937, #e8e8e8);\n --uva-color-track: light-dark(#e5e7eb, #2c3858);\n --uva-color-shadow: light-dark(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.6));\n --uva-color-pre-footer-bg: light-dark(var(--uva-blue-alt-300, #bfe7f7), #005679);\n --uva-color-pre-footer-text: light-dark(var(--uva-grey-darkest, #2b2b2b), #ffffff);\n /* base.css's .uvalib-button family: library.virginia.edu's blue-alt button, and a\n light-blue one on the dark surface (dark text 8.9:1). */\n --uva-color-button-bg: light-dark(var(--uva-blue-alt, #007bac), #55c4ec);\n --uva-color-button-text: light-dark(#ffffff, #10172b);\n --uva-color-button-hover-bg: light-dark(var(--uva-blue-alt-A, #005679), #91d8f2);\n --uva-color-button-subtle-bg: light-dark(var(--uva-blue-alt-300, #bfe7f7), #0d3247);\n --uva-color-button-subtle-hover-bg: light-dark(var(--uva-blue-alt-200, #91d8f2), #134a66);\n /* <site-alerts>: library.virginia.edu's alert colours, and a muted dark palette. Text\n is 7:1 or more (WCAG AAA) on every alert background in both schemes. */\n --uva-color-alert-text: light-dark(var(--uva-grey-darkest, #2b2b2b), #e8e8e8);\n --uva-color-alert-link: light-dark(var(--uva-blue-alt-B, #141e3c), #ffffff);\n --uva-color-alert-header-bg: light-dark(var(--uva-teal, #25cad3), #0e4a57);\n --uva-color-alert-header-text: light-dark(#000000, #e8e8e8);\n --uva-color-alert-critical-bg: light-dark(var(--uva-red-100, #fbcfda), #4a1622);\n --uva-color-alert-critical-border: light-dark(var(--uva-red-B, #b30000), #ef3f6b);\n --uva-color-alert-warning-bg: light-dark(var(--uva-yellow-100, #fef6c8), #3d3510);\n --uva-color-alert-warning-border: light-dark(var(--uva-yellow, #ecc602), #ecc602);\n --uva-color-alert-info-bg: light-dark(var(--uva-blue-alt-300, #bfe7f7), #0d3247);\n --uva-color-alert-info-border: light-dark(var(--uva-blue-alt, #007bac), #55c4ec);\n --uva-color-alert-regional-bg: light-dark(var(--uva-yellow-100, #fef6c8), #3d3510);\n --uva-color-alert-regional-border: light-dark(var(--uva-yellow, #ecc602), #ecc602);\n --uva-color-alert-regional-info-bg: light-dark(var(--uva-teal-200, #c8f2f4), #0f3a3d);\n --uva-color-alert-regional-info-border: light-dark(var(--uva-teal, #25cad3), #25cad3);\n }\n :root[data-uva-color-scheme='system'] {\n color-scheme: light dark;\n --uva-color-scheme: light dark;\n }\n :root[data-uva-color-scheme='light'] {\n color-scheme: light;\n --uva-color-scheme: light;\n }\n :root[data-uva-color-scheme='dark'] {\n color-scheme: dark;\n --uva-color-scheme: dark;\n ${dark}\n }\n :root[data-uva-color-scheme='dark'] [slot='pre-footer'] a {\n ${unsafeCSS(preFooterLinks)}\n }\n @media (prefers-color-scheme: dark) {\n :root[data-uva-color-scheme='system'] {\n ${dark}\n }\n :root[data-uva-color-scheme='system'] [slot='pre-footer'] a {\n ${unsafeCSS(preFooterLinks)}\n }\n }\n }\n`;\n","import type { ReactiveController, ReactiveControllerHost } from 'lit';\nimport { colorScheme } from '../styles/color-scheme.js';\nimport { installLightDomStyles } from './light-dom-styles.js';\n\n/** The visitor's choice: follow the OS (`system`, the default) or pin `light` or `dark`. */\nexport type ColorSchemePreference = 'light' | 'dark' | 'system';\n/** What is shown: the preference, with `system` resolved from `prefers-color-scheme`. */\nexport type ResolvedColorScheme = 'light' | 'dark';\n\n/** localStorage key, per site (origin): `light` or `dark`; absent means `system`. */\nexport const COLOR_SCHEME_STORAGE_KEY = 'uvalib-color-scheme';\n/** Attribute on the root element that turns the opt-in dark-mode rules on. */\nexport const COLOR_SCHEME_ATTR = 'data-uva-color-scheme';\n/** Fired on the document whenever a control changes the preference. */\nconst CHANGE = 'uvalib-color-scheme-change';\nconst DARK_QUERY = '(prefers-color-scheme: dark)';\n\n/** Choices made while storage is unavailable, kept for the page's lifetime. */\nconst memory = new WeakMap<Document, ColorSchemePreference>();\n\nconst asPreference = (v: unknown): ColorSchemePreference =>\n v === 'light' || v === 'dark' ? v : 'system';\n\n/** Dark mode needs light-dark(); without it nothing is shown or set, and the page stays light. */\nexport function colorSchemeSupported(doc: Document = document): boolean {\n const css = doc.defaultView?.CSS;\n try {\n return !!css?.supports?.('color', 'light-dark(#000, #fff)');\n } catch {\n return false;\n }\n}\n\n/** The stored preference: this page's in-memory choice if storage failed, else localStorage. */\nexport function readPreference(doc: Document = document): ColorSchemePreference {\n const kept = memory.get(doc);\n if (kept) return kept;\n try {\n return asPreference(doc.defaultView?.localStorage.getItem(COLOR_SCHEME_STORAGE_KEY));\n } catch {\n return 'system';\n }\n}\n\n/** Whether the OS asks for dark. */\nexport function systemIsDark(doc: Document = document): boolean {\n return !!doc.defaultView?.matchMedia?.(DARK_QUERY).matches;\n}\n\nexport function resolvePreference(\n pref: ColorSchemePreference,\n doc: Document = document,\n): ResolvedColorScheme {\n return pref === 'system' ? (systemIsDark(doc) ? 'dark' : 'light') : pref;\n}\n\n/**\n * Show `pref` on the page: `data-uva-color-scheme` on the root element, and with `inline`\n * (for `no-style`, where no stylesheet maps the attribute) `color-scheme` as an inline style.\n */\nexport function applyPreference(doc: Document, pref: ColorSchemePreference, inline = false): void {\n const html = doc.documentElement;\n if (html.getAttribute(COLOR_SCHEME_ATTR) !== pref) html.setAttribute(COLOR_SCHEME_ATTR, pref);\n if (inline) html.style.colorScheme = pref === 'system' ? 'light dark' : pref;\n}\n\n/** Turn dark mode off again: remove the attribute and any inline `color-scheme`. */\nexport function clearPreference(doc: Document): void {\n const html = doc.documentElement;\n html.removeAttribute(COLOR_SCHEME_ATTR);\n html.style.removeProperty('color-scheme');\n if (!html.getAttribute('style')) html.removeAttribute('style');\n}\n\n/**\n * Remember and show `pref`. `system` removes the stored value; storage that throws keeps the\n * choice in memory for this page. Every connected control is told.\n */\nexport function setPreference(doc: Document, pref: ColorSchemePreference, inline = false): void {\n try {\n const storage = doc.defaultView!.localStorage;\n if (pref === 'system') storage.removeItem(COLOR_SCHEME_STORAGE_KEY);\n else storage.setItem(COLOR_SCHEME_STORAGE_KEY, pref);\n memory.delete(doc);\n } catch {\n memory.set(doc, pref);\n }\n applyPreference(doc, pref, inline);\n doc.dispatchEvent(new CustomEvent(CHANGE));\n}\n\n/** The opt-in rules on the document (layered, so host CSS wins), for pages without tokens.css. */\nexport function installColorSchemeStyles(doc: Document): void {\n installLightDomStyles('uvalib-color-scheme', [colorScheme], { root: doc, scope: false });\n}\n\n/** Per document, the controllers that currently own `data-uva-color-scheme`. */\nconst owners = new WeakMap<Document, Set<ColorSchemeController>>();\nconst ownersOf = (doc: Document): Set<ColorSchemeController> => {\n let set = owners.get(doc);\n if (!set) owners.set(doc, (set = new Set()));\n return set;\n};\n\nconst FORCED_QUERY = '(forced-colors: active)';\n\n/** The scheme the root element shows: from `data-uva-color-scheme`, or null when dark mode is off. */\nexport function rootColorScheme(doc: Document = document): ResolvedColorScheme | null {\n const attr = doc.documentElement.getAttribute(COLOR_SCHEME_ATTR);\n if (attr === null || !colorSchemeSupported(doc)) return null;\n return resolvePreference(asPreference(attr), doc);\n}\n\n/**\n * A component's view of dark mode. While `enabled()` and supported (`active`), it owns\n * `data-uva-color-scheme` on the root element: it sets it, keeps it current with the\n * stored preference (any control on the page, another tab through the `storage` event) and\n * removes it when the last owner in the document is turned off or disconnected. A connected\n * controller that is not enabled removes a stray attribute (for example from the inline\n * snippet on a page without the switch) unless another one owns it.\n *\n * Every connected controller also follows the root's scheme (`rootDark`) and the OS\n * preference (`systemDark`), so a header without the switch never shows the navy logo on a\n * dark page. A controller that is off on a page where dark mode is off stays inert: it reads\n * no storage and queries no media, and listens only for the controllers' own change event.\n */\nexport class ColorSchemeController implements ReactiveController {\n preference: ColorSchemePreference = 'system';\n /** What \"System\" resolves to: the OS preference. */\n systemDark = false;\n /** Whether the root element currently shows the dark scheme. */\n rootDark = false;\n /** Whether forced colors (a contrast theme) are on. */\n forcedColors = false;\n /** Whether the root element has `data-uva-color-scheme` (dark mode is on for the page). */\n rootOn = false;\n /** Enabled and supported: this controller owns the root attribute. */\n active = false;\n /** Set while sync() runs, so its own change events do not request a second update. */\n private syncing = false;\n\n private listening?: {\n doc: Document;\n level: 'change' | 'full';\n dark?: MediaQueryList;\n forced?: MediaQueryList;\n };\n\n constructor(\n private readonly host: ReactiveControllerHost & HTMLElement,\n private readonly enabled: () => boolean,\n private readonly inline: () => boolean,\n /** Whether the host renders anything from this state (and so needs updates). */\n private readonly renders = true,\n ) {\n host.addController(this);\n }\n\n hostConnected(): void {\n this.sync();\n }\n\n hostDisconnected(): void {\n this.listen('none');\n this.release(this.host.ownerDocument);\n }\n\n /** Call when `enabled()` may have changed (from the host's `willUpdate`). */\n sync(): void {\n const doc = this.host.ownerDocument;\n if (!this.host.isConnected) return;\n this.syncing = true;\n const supported = colorSchemeSupported(doc);\n this.active = this.enabled() && supported;\n if (this.active) {\n ownersOf(doc).add(this);\n if (!this.inline()) installColorSchemeStyles(doc);\n this.preference = readPreference(doc);\n applyPreference(doc, this.preference, this.inline());\n doc.dispatchEvent(new CustomEvent(CHANGE));\n } else {\n this.release(doc);\n // Not ours, and nobody owns it: a stray attribute (the snippet without the switch).\n if (!ownersOf(doc).size && doc.documentElement.hasAttribute(COLOR_SCHEME_ATTR)) {\n clearPreference(doc);\n doc.dispatchEvent(new CustomEvent(CHANGE));\n }\n }\n this.syncing = false;\n this.refresh(false);\n this.listen(supported ? this.listenLevel() : 'none');\n }\n\n /**\n * Whether to show the reversed (white) logo: only while the page shows dark mode, and under\n * forced colors (a contrast theme repaints the header) only when the OS theme is dark.\n */\n get logoDark(): boolean {\n return this.rootOn && (this.forcedColors ? this.systemDark : this.rootDark);\n }\n\n /** The visitor picked `pref` in a control. */\n choose(pref: ColorSchemePreference): void {\n setPreference(this.host.ownerDocument, pref, this.inline());\n }\n\n /** Stop owning the attribute; the last owner to go removes it. */\n private release(doc: Document): void {\n const set = ownersOf(doc);\n if (!set.delete(this)) return;\n this.active = false;\n if (!set.size) {\n clearPreference(doc);\n doc.dispatchEvent(new CustomEvent(CHANGE));\n }\n }\n\n private readonly onChange = (): void => this.refresh(!this.syncing);\n\n private readonly onStorage = (e: StorageEvent): void => {\n if (e.key !== null && e.key !== COLOR_SCHEME_STORAGE_KEY) return;\n if (this.active)\n applyPreference(\n this.host.ownerDocument,\n readPreference(this.host.ownerDocument),\n this.inline(),\n );\n this.refresh(true);\n };\n\n private refresh(update: boolean): void {\n const doc = this.host.ownerDocument;\n const root = rootColorScheme(doc);\n // A controller that is off, on a page where dark mode is off, stays inert: no storage\n // read and no media queries, only the cheap root-attribute check above.\n const engaged = this.active || root !== null;\n const next = engaged\n ? {\n preference: readPreference(doc),\n systemDark: systemIsDark(doc),\n rootDark: root === 'dark',\n rootOn: root !== null,\n forcedColors: !!doc.defaultView?.matchMedia?.(FORCED_QUERY).matches,\n }\n : {\n preference: 'system' as const,\n systemDark: false,\n rootDark: false,\n rootOn: false,\n forcedColors: false,\n };\n const changed = (Object.keys(next) as (keyof typeof next)[]).some((k) => next[k] !== this[k]);\n Object.assign(this, next);\n if (this.listening) this.listen(this.listenLevel());\n if (changed && update && this.renders) this.host.requestUpdate();\n }\n\n /**\n * What to listen to: nothing without `light-dark()` support; everything (storage, the OS\n * and forced-colors queries) while this controller owns the attribute or the page shows\n * dark mode; otherwise only the controllers' own change event, which tells an inert\n * controller that another one turned dark mode on.\n */\n private listenLevel(): 'none' | 'change' | 'full' {\n if (!colorSchemeSupported(this.host.ownerDocument)) return 'none';\n return this.active || this.rootOn ? 'full' : 'change';\n }\n\n private listen(level: 'none' | 'change' | 'full'): void {\n if (level === (this.listening?.level ?? 'none')) return;\n if (this.listening) {\n const { doc, dark, forced } = this.listening;\n doc.removeEventListener(CHANGE, this.onChange);\n doc.defaultView?.removeEventListener('storage', this.onStorage);\n dark?.removeEventListener('change', this.onChange);\n forced?.removeEventListener('change', this.onChange);\n this.listening = undefined;\n }\n if (level === 'none') return;\n const doc = this.host.ownerDocument;\n doc.addEventListener(CHANGE, this.onChange);\n if (level === 'change') {\n this.listening = { doc, level };\n return;\n }\n const dark = doc.defaultView?.matchMedia?.(DARK_QUERY);\n const forced = doc.defaultView?.matchMedia?.(FORCED_QUERY);\n doc.defaultView?.addEventListener('storage', this.onStorage);\n dark?.addEventListener('change', this.onChange);\n forced?.addEventListener('change', this.onChange);\n this.listening = { doc, level, dark, forced };\n }\n}\n","import { html, css, nothing, type PropertyValues } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { trackEvent } from '../../base/analytics.js';\nimport { UvalibElement } from '../../base/UvalibElement.js';\nimport { siteLink } from '../link.js';\nimport { accessible } from '../../styles/accessible.js';\nimport { ColorSchemeController, type ColorSchemePreference } from '../../base/color-scheme.js';\nimport {\n normalizeItems,\n readItemsMarkup,\n type MainNavItem,\n} from '../site-main-nav/main-nav-items.js';\n\nconst ACCOUNT_URL = 'https://search.lib.virginia.edu/account';\n/** The analytics category. */\nconst TAG = 'site-header';\n\nconst FULL_LINKS: ReadonlyArray<{ label: string; path: string }> = [\n { label: 'My account', path: ACCOUNT_URL },\n { label: 'Ask a Librarian', path: '/askalibrarian' },\n { label: 'Hours', path: '/hours' },\n { label: 'Give', path: '/support-library' },\n { label: 'Alerts', path: '/status#alerts' },\n { label: 'Search', path: '/search' },\n];\n\nconst VENDOR_LINKS = FULL_LINKS.filter((l) => l.label === 'Ask a Librarian');\n\n/** Light-DOM instances share the document id space, so each gets its own popover id. */\nlet menuCounter = 0;\n/** Radio group names are per instance and per control (two controls per header). */\nlet schemeCounter = 0;\n\n/** The reversed (white) library logo, for dark mode. Same aspect ratio as the navy one. */\nexport const DARK_LOGO_URL =\n 'https://static.lib.virginia.edu/files/downloads/LibraryLogos/UVALIB_primary_color_white_web.png';\nconst SCHEME_OPTIONS: ReadonlyArray<{ value: ColorSchemePreference; label: string }> = [\n { value: 'light', label: 'Light' },\n { value: 'dark', label: 'Dark' },\n { value: 'system', label: 'System' },\n];\n\n/** A site's own link, read from an `<a slot=\"site-links\">` child. */\ninterface SiteLinkItem {\n href: string;\n text: string;\n current?: string;\n target?: string;\n rel?: string;\n hreflang?: string;\n}\n\nconst SITE_LINKS = 'site-links';\nconst isSiteLinksChild = (n: Node): n is Element =>\n n instanceof Element && n.getAttribute('slot') === SITE_LINKS;\nconst MAIN_NAV = 'main-nav';\nconst isMainNavChild = (n: Node): n is Element =>\n n instanceof Element && n.getAttribute('slot') === MAIN_NAV;\nconst ALERTS = 'alerts';\nconst isAlertsChild = (n: Node | null): n is Element =>\n n instanceof Element && n.getAttribute('slot') === ALERTS;\n/** Attributes of a source anchor that change what the header renders. */\nconst LINK_ATTRS = ['href', 'aria-current', 'target', 'rel', 'hreflang'];\n/** Swallows the popover accordion's copy of an `items-src` error the bar also reports. */\nconst stopEvent = (e: Event) => e.stopPropagation();\n\n/**\n * UVA Library site header: logo, utility navigation, and a popover menu on narrow screens.\n *\n * A site can replace the library utility links (My account, Ask a Librarian, Hours, Give,\n * Alerts, Search) with its own: give the header `<a slot=\"site-links\" href=\"…\">` children.\n * They are shown, in order, in the inline nav and the Menu popover, with `href` as written\n * (not joined to `root-link-domain`) and their `aria-current`, `target`, `rel` and\n * `hreflang`. The source anchors themselves stay hidden. Children that are not `<a href>`\n * with text (empty or whitespace-only text counts as none) are ignored with one console\n * warning. The `vendor` variant ignores site links and keeps\n * its own reduced link set.\n *\n * The full header also shows the UVA Library main navigation (`<site-main-nav>`): a row\n * under the logo row on wide screens, and an accordion at the top of the Menu popover on\n * narrow ones (992px and below), above the utility or site links. `no-main-nav` turns it\n * off, leaving the header exactly as it was without it; the `vendor` variant never shows it.\n * A `<nav slot=\"main-nav\">` child replaces its links (see `<site-main-nav>`), and\n * `main-nav-src` loads them from JSON; `main-nav-current` sets the URL marked current.\n *\n * `color-scheme-switch` opts in to dark mode (off by default; see the README's \"Dark mode\"):\n * a Light / Dark / System radio group (\"Theme\") at the end of the utility-links row on wide\n * screens and at the bottom of the Menu popover on narrow ones. The `vendor` variant, which\n * has no Menu, shows it after its inline link, on a row of its own under the logo row on\n * narrow screens. In dark mode the logo is the reversed (white) one.\n *\n * `site-name` shows a sub-site's name after the logo, past a thin divider, as a link to the\n * site's home (`site-name-href`, default `/`); the logo still links to library.virginia.edu.\n * The name is not a heading (the page keeps its own `<h1>`) and its link is named\n * \"<name> home\". On wide screens it sits in the logo row, wrapping to at most two lines (keep\n * it short), so the header is no taller, while the links (and theme control) fit beside it on\n * one line; when they would not, and at 992px and below, it gets its own lines under the\n * logo, so the links are laid out exactly as without it. The `vendor` variant shows it too.\n *\n * @tagname site-header\n * @slot skip-link - Shadow mode only: optional skip link, rendered first inside `<header>` (`<site-page>` uses it).\n * @slot alerts - Optional alert banner (`<site-page>` passes its `<site-alerts show=\"header\">`), shown as a full-bleed row at the very top of `<header>` (flush with its top and both edges, outside its padding), after the skip link and before the logo row. In light mode the children are moved to the start of `<header>`. The header never loads alerts itself.\n * @slot main-nav - Optional `<nav>` whose `<ul>` replaces the main navigation's links in both layouts: `<li><a href>` for a direct link, `<li><span>Group</span><ul><li><a href>…</a></li></ul></li>` for a group. Invalid entries are skipped with one console warning. Never shown itself; in light mode it is moved into a hidden holder. Ignored with `no-main-nav` and by the `vendor` variant.\n * @slot site-links - Optional `<a href>` elements with text that replace the library utility links in the inline nav and the Menu popover (ignored by the `vendor` variant). In light mode they are moved into a hidden holder.\n * @csspart header - The `<header>` element.\n * @fires site-main-nav-error - `main-nav-src` could not be loaded; the bundled main navigation is shown. `detail` is `{ src, message }`. Fired once, from the bar's `<site-main-nav>`; bubbles and is composed.\n * @fires uvalib-analytics-event - For `<site-analytics>`: the visitor picked a colour scheme, `['site-header', 'color-scheme', 'light' | 'dark' | 'system']` (not the initial value); `['site-header', 'link-click', <label>]` for a utility or site link, `['site-header', 'logo-click']`, `['site-header', 'site-name-click']` (the `site-name` link), `['site-header', 'skip-link']` (a slotted skip link) and `['site-header', 'menu-open']` when the Menu popover opens; and the main navigation's menu opens and link clicks (see `<site-main-nav>`). Never a URL. Bubbles and is composed.\n * @cssprop [--uva-blue-alt-dark=#005679] - Utility link colour.\n * @cssprop [--uva-grey-darkest=#2b2b2b] - Menu button colour.\n * @cssprop [--uva-brand-orange=#e57200] - Focus ring colour (focus-visible outline), and the underline colour of an `aria-current` link (also bold, with a 3px underline).\n * @cssprop [--uva-brand-blue=#232d4b] - Skip-link background for a skip link slotted into `skip-link` (shadow mode, shared accessibility sheet).\n * @cssprop --uva-color-surface-raised - Dark-mode role token: header, Menu popover and theme control background (else #ffffff).\n * @cssprop --uva-color-utility-link - Dark-mode role token: utility and site link colour (else `--uva-blue-alt-dark`).\n * @cssprop --uva-color-text - Dark-mode role token: Menu button and theme control text (else `--uva-grey-darkest`).\n * @cssprop --uva-color-border - Dark-mode role token: popover border and rules (else #ccc).\n * @cssprop --uva-color-control-border - Dark-mode role token: theme control border (else `--uva-grey`, #808080).\n * @cssprop --uva-color-accent-bg - Dark-mode role token: selected theme option and skip-link background (else `--uva-brand-blue`).\n * @cssprop --uva-color-on-accent - Dark-mode role token: selected theme option and skip-link text (else #fff).\n * @cssprop --uva-color-focus - Dark-mode role token: focus ring (else `--uva-brand-orange`).\n * @cssprop --uva-color-current - Dark-mode role token: current-page underline (else `--uva-brand-orange`).\n */\nexport class SiteHeader extends UvalibElement {\n static styles = [\n accessible,\n // site-name (.brand, .site-name): the logo, a divider and the site's name, centred on the\n // logo, at most two lines (10em, 18em from 1200px), so the logo row is no taller and the\n // utility links keep their room down to 993px. At 992px and below the name gets its own lines\n // under the logo, no wider than it, so the logo column is exactly as wide as before and the\n // Menu button (or vendor link) keeps its place.\n css`\n :host {\n display: block;\n width: 100%;\n }\n /* Logo on the start, everything else on the end, as one row. A grid (not a wrapping\n flex row) so an alerts row can span the top without changing where the logo row\n breaks: flex wrapping decides lines on max-content sizes before anything shrinks. */\n header {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr);\n align-items: start;\n position: relative;\n background-color: var(--uva-color-surface-raised, #ffffff);\n --_pad-block: 0.5rem;\n --_pad-inline: 16px; /* old: .w3-container 16px side padding */\n padding: var(--_pad-block) var(--_pad-inline);\n }\n header > :not(.logo, .brand) {\n grid-column: 2;\n justify-self: end;\n }\n /* The alerts (slot=\"alerts\") are a full-bleed row above the logo row, as in Virgo:\n negative margins equal to the header's padding put them flush with the top and both\n edges, and the bottom margin gives the logo row back its top padding. With no\n alerts content they take no space, so the logo row is exactly where it was. */\n ::slotted([slot='alerts']),\n header > [slot='alerts'] {\n grid-column: 1 / -1;\n justify-self: stretch;\n min-inline-size: 0;\n margin: calc(-1 * var(--_pad-block)) calc(-1 * var(--_pad-inline)) var(--_pad-block);\n }\n .logo {\n display: block;\n text-decoration: none;\n }\n .logo img {\n display: block;\n max-width: 225px;\n height: auto;\n }\n .brand {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 0.25rem 0.625rem;\n min-inline-size: 0;\n }\n .site-name {\n max-inline-size: 10em;\n padding-inline-start: 0.625rem;\n border-inline-start: 1px solid var(--uva-color-control-border, var(--uva-grey, #808080));\n color: var(--uva-color-text, var(--uva-grey-darkest, #2b2b2b));\n font-size: 1.125rem;\n font-weight: 700;\n line-height: 1.2;\n text-decoration: none;\n overflow-wrap: anywhere;\n }\n .site-name:hover {\n text-decoration: underline;\n }\n @media screen and (min-width: 1200px) {\n .site-name {\n max-inline-size: 18em;\n }\n }\n nav ul {\n list-style-type: none;\n margin: 0;\n padding: 0;\n }\n /* Old nav hung from the top of the header below the default 1em list margin. */\n nav.inline ul {\n margin: 1em 0;\n display: flex;\n gap: 1.5rem;\n }\n a {\n color: var(--uva-color-utility-link, var(--uva-blue-alt-dark, #005679));\n }\n /* Current page: bold with a thick underline, so it does not rely on colour alone. */\n nav a[aria-current]:not([aria-current='false']) {\n font-weight: 700;\n text-decoration-line: underline;\n text-decoration-thickness: 3px;\n text-decoration-color: var(--uva-color-current, var(--uva-brand-orange, #e57200));\n text-underline-offset: 0.3em;\n }\n .menu-toggle {\n display: none;\n align-items: center;\n gap: 0.25rem;\n background: none;\n border: none;\n color: var(--uva-color-text, var(--uva-grey-darkest, #2b2b2b));\n font: inherit;\n cursor: pointer;\n }\n /* Old shared sheet sized every inline svg at 17px. */\n .menu-toggle svg {\n width: 17px;\n height: 17px;\n }\n [popover] {\n position: fixed;\n inset: auto;\n /* Fallback offset (about the header height) for engines without anchor(). */\n top: 4.75rem;\n inset-inline-end: 1rem;\n inline-size: min(80dvw, 24rem);\n max-inline-size: calc(100dvw - 2rem);\n block-size: fit-content;\n max-block-size: calc(100dvh - 6rem);\n overflow: auto;\n box-sizing: border-box;\n margin: 0.5rem 0 0;\n padding: 0.5rem 1rem;\n border: 1px solid var(--uva-color-border, #ccc);\n background: var(--uva-color-surface-raised, #ffffff);\n }\n nav.menu li {\n padding: 0.375rem 0;\n }\n /* The main navigation: a full-bleed row under the logo row, flush with the header's\n bottom (its 5px rule is the header's bottom edge), 0.5rem below the logo row. */\n header > site-main-nav.bar {\n grid-column: 1 / -1;\n justify-self: stretch;\n min-inline-size: 0;\n margin: var(--_pad-block) calc(-1 * var(--_pad-inline)) calc(-1 * var(--_pad-block));\n }\n /* Narrow screens: the main navigation leads the Menu popover, then a rule, then the\n utility or site links. */\n .menu-popover > site-main-nav + nav.menu > ul,\n .menu-popover > .color-scheme {\n margin-block-start: 0.5rem;\n padding-block-start: 0.5rem;\n border-block-start: 1px solid var(--uva-color-border, #ccc);\n }\n nav.menu {\n display: contents;\n }\n @supports (top: anchor(--x bottom)) {\n [popover] {\n top: anchor(var(--menu-anchor) bottom);\n }\n }\n /* One line: the links wrap within their own space, the control stays at the end. */\n .utility-row {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n column-gap: 1.5rem;\n min-inline-size: 0;\n }\n .utility-row > nav.inline {\n min-inline-size: 0;\n }\n .utility-row > nav.inline ul {\n flex-wrap: wrap;\n justify-content: flex-end;\n row-gap: 0.25rem;\n }\n .utility-row > .color-scheme {\n flex: none;\n }\n .color-scheme {\n min-inline-size: 0;\n margin: 0;\n padding: 0;\n border: 0;\n color: var(--uva-color-text, var(--uva-grey-darkest, #2b2b2b));\n }\n .color-scheme legend {\n padding: 0;\n font-weight: 700;\n }\n .segments {\n display: flex;\n border: 1px solid var(--uva-color-control-border, var(--uva-grey, #808080));\n border-radius: 0.3rem;\n background: var(--uva-color-surface-raised, #ffffff);\n }\n .segments label {\n position: relative;\n display: flex;\n flex: 1;\n min-inline-size: 28px;\n font-size: 0.875rem;\n cursor: pointer;\n }\n .segments label + label {\n border-inline-start: 1px solid var(--uva-color-control-border, var(--uva-grey, #808080));\n }\n .segment {\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: center;\n min-block-size: 28px;\n padding: 0.125rem 0.625rem;\n }\n .segments input {\n position: absolute;\n inset: 0;\n inline-size: 100%;\n block-size: 100%;\n margin: 0;\n opacity: 0;\n cursor: pointer;\n }\n .segments input:checked + .segment {\n background: var(--uva-color-accent-bg, var(--uva-brand-blue, #232d4b));\n color: var(--uva-color-on-accent, #ffffff);\n font-weight: 700;\n }\n .segments input:focus-visible + .segment {\n position: relative;\n z-index: 1;\n outline: 3px solid var(--uva-color-focus, var(--uva-brand-orange, #e57200));\n outline-offset: 2px;\n }\n /* Floated, so it is not drawn into the fieldset's top border (the popover rule). */\n .menu-popover > .color-scheme legend {\n float: inline-start;\n inline-size: 100%;\n margin-block-end: 0.375rem;\n }\n .menu-popover > .color-scheme .segments {\n clear: both;\n }\n @media (forced-colors: active) {\n .segments input:checked + .segment {\n forced-color-adjust: none;\n background: Highlight;\n color: HighlightText;\n }\n }\n @media screen and (max-width: 992px) {\n header:not(.vendor) nav.inline,\n header:not(.vendor) .utility-row,\n header > site-main-nav.bar {\n display: none;\n }\n header.vendor .utility-row {\n display: contents;\n }\n header.vendor .utility-row > nav.inline {\n grid-column: 2;\n justify-self: end;\n }\n header.vendor .utility-row > .color-scheme {\n grid-column: 1 / -1;\n justify-self: end;\n margin-block-end: 0.5rem;\n }\n .menu-toggle {\n display: inline-flex;\n }\n .brand {\n max-inline-size: 225px;\n }\n .site-name {\n flex-basis: 100%;\n max-inline-size: none;\n padding: 0;\n border: 0;\n }\n }\n .brand.stacked {\n max-inline-size: 225px;\n }\n .stacked > .site-name {\n flex-basis: 100%;\n max-inline-size: none;\n padding: 0;\n border: 0;\n }\n @media screen and (min-width: 993px) {\n .menu-toggle,\n [popover] {\n display: none;\n }\n }\n `,\n ];\n\n @property({ type: String, attribute: 'root-link-domain' }) rootLinkDomain =\n 'https://www.library.virginia.edu';\n @property({ type: String, reflect: true }) variant: 'full' | 'vendor' = 'full';\n /** Accessible name of the nav when site links replace the utility links (default \"Site\"; the popover nav's name adds \" menu\"). */\n @property({ type: String, attribute: 'site-links-label' }) siteLinksLabel?: string;\n\n /**\n * The sub-site's name, shown after the library logo as a link to the site's home\n * (`site-name-href`). The logo still links to library.virginia.edu. Not a heading.\n */\n @property({ type: String, attribute: 'site-name' }) siteName?: string;\n /** Where the site name links (default `/`, the site's own home). */\n @property({ type: String, attribute: 'site-name-href' }) siteNameHref?: string;\n\n /** Hide the UVA Library main navigation (the row under the logo and the popover accordion). */\n @property({ type: Boolean, attribute: 'no-main-nav' }) noMainNav = false;\n /** Accessible name of the main navigation (default \"Main\"). */\n @property({ type: String, attribute: 'main-nav-label' }) mainNavLabel?: string;\n /** URL of JSON main navigation items (`MainNavItem[]`, needs CORS), passed to `<site-main-nav items-src>`. */\n @property({ type: String, attribute: 'main-nav-src' }) mainNavSrc?: string;\n /**\n * The URL whose main-navigation link is marked current, passed to `<site-main-nav current>`.\n * Default: the page location, followed through same-document navigations.\n */\n @property({ type: String, attribute: 'main-nav-current' }) mainNavCurrent?: string;\n\n /**\n * Opt in to dark mode: the page follows the OS light or dark preference (\"System\"), and a\n * Light / Dark / System control (at the end of the utility-links row on wide screens, at\n * the bottom of the Menu popover on narrow ones) lets the visitor override it, remembered\n * per site in localStorage (`uvalib-color-scheme`). Sets `data-uva-color-scheme` on the root\n * element, and swaps in the reversed logo while dark. Ignored (the page stays light and no\n * control is shown) in browsers without CSS `light-dark()`.\n */\n @property({ type: Boolean, attribute: 'color-scheme-switch' }) colorSchemeSwitch = false;\n\n private readonly scheme = new ColorSchemeController(\n this,\n () => this.colorSchemeSwitch,\n () => this.noStyle,\n );\n private readonly schemeName = `uva-color-scheme-${++schemeCounter}`;\n\n /** Main navigation items from `slot=\"main-nav\"` markup, or null for the default. */\n @state() private mainNavItems: MainNavItem[] | null = null;\n private warnedMainNav = false;\n /** Light mode: hidden container this element owns for the `slot=\"main-nav\"` children. */\n private mainNavHolder?: HTMLDivElement;\n\n /** The site's own links, or null to show the library utility links. */\n @state() private siteLinks: SiteLinkItem[] | null = null;\n private warnedInvalid = false;\n private observer?: MutationObserver;\n /** Light mode: hidden container this element owns for the `slot=\"site-links\"` children. */\n private holder?: HTMLDivElement;\n\n constructor() {\n super();\n this.addEventListener('click', this.onMenuLinkClick);\n this.addEventListener('click', this.trackClick);\n }\n\n /**\n * Analytics for the header's own links (never their URLs): the logo, the utility or site\n * links by label, and a skip link slotted into `skip-link`. Links inside the main\n * navigation (it reports its own) and the alerts are left alone.\n */\n private trackClick = (e: Event): void => {\n const path = e.composedPath();\n const a = path.find((n): n is HTMLAnchorElement => n instanceof HTMLAnchorElement);\n if (\n !a ||\n path.some((n) => n instanceof Element && /^site-(main-nav|alerts)$/.test(n.localName))\n )\n return;\n if (a.slot === 'skip-link' && a.parentNode === this) trackEvent(this, [TAG, 'skip-link']);\n else if (a.matches('.logo')) trackEvent(this, [TAG, 'logo-click']);\n else if (a.matches('.site-name')) trackEvent(this, [TAG, 'site-name-click']);\n else if (a.closest('nav.inline, nav.menu') && this.renderRoot.contains(a))\n trackEvent(this, [TAG, 'link-click', a.textContent!.replace(/\\s+/g, ' ').trim()]);\n };\n\n /** The Menu popover opening (not closing). */\n private trackToggle = (e: Event): void => {\n const t = e.composedPath()[0];\n if (t instanceof HTMLElement && t.id === this.menuId && (e as ToggleEvent).newState === 'open')\n trackEvent(this, [TAG, 'menu-open']);\n };\n\n /**\n * A plain click on a link in the Menu popover closes it, so a single-page app that handles\n * the navigation in place does not leave the menu open. Modified clicks (a new tab or\n * window) keep it open.\n */\n private onMenuLinkClick = (e: MouseEvent): void => {\n if (e.button !== 0 || e.ctrlKey || e.metaKey || e.shiftKey || e.altKey) return;\n const path = e.composedPath();\n const link = path.findIndex((n) => n instanceof Element && n.localName === 'a');\n const menu = path.findIndex((n) => n instanceof HTMLElement && n.id === this.menuId);\n if (link < 0 || menu < link) return;\n const popover = path[menu] as HTMLElement;\n if (popover.matches(':popover-open')) popover.hidePopover();\n };\n\n override connectedCallback(): void {\n super.connectedCallback();\n // Fitted on the next frame, outside the observer's callback: the fit changes the height.\n this.resizeObserver ??= new ResizeObserver(() =>\n requestAnimationFrame(() => {\n if (this.getBoundingClientRect().width !== this.fittedWidth) this.fitName();\n }),\n );\n this.resizeObserver.observe(this);\n // The web font is narrower than its fallback: fit again once it has loaded.\n void this.ownerDocument.fonts?.ready.then(() => this.fitName());\n // `toggle` neither bubbles nor leaves the shadow root: capture it on the render root\n // (adding the same listener again on a reconnect does nothing).\n this.renderRoot.addEventListener('toggle', this.trackToggle, true);\n // Reconnect after a disconnect; the first connect reads the links in firstUpdated().\n if (this.hasUpdated) this.syncChildren();\n // The main-nav markup is read before the first render too, so it costs no second update.\n else this.syncMainNav();\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.resizeObserver?.disconnect();\n this.observer?.disconnect();\n }\n\n /** Which header template render() uses: with dark mode, with a site name, or neither. */\n private get template(): string {\n return this.scheme.active ? 'scheme' : this.name ? 'named' : 'plain';\n }\n private renderedTemplate?: string;\n\n protected override willUpdate(changed: PropertyValues): void {\n if (changed.has('colorSchemeSwitch')) this.scheme.sync();\n // Light mode: turning dark mode or the site name on or off swaps the header template, and\n // Lit clears everything after its start marker: the alerts moved into the old <header>\n // and the hidden source holders. Move them before the marker; updated() re-adopts the\n // alerts.\n const was = this.renderedTemplate;\n this.renderedTemplate = this.template;\n if (this.lightDom && this.hasUpdated && was !== this.renderedTemplate) {\n const header = this.querySelector(':scope > header');\n const keep = [...(header?.children ?? [])].filter(isAlertsChild);\n for (const holder of [this.holder, this.mainNavHolder]) if (holder) keep.push(holder);\n this.prepend(...keep);\n this.templateSwapped = true;\n }\n }\n private templateSwapped = false;\n\n protected override updated(): void {\n this.fitName();\n if (!this.templateSwapped) return;\n this.templateSwapped = false;\n this.adoptAlerts();\n }\n\n /** Watches the host's width, so the site name is re-fitted when it changes. */\n private resizeObserver?: ResizeObserver;\n private fittedWidth = -1;\n\n /**\n * Wide screens: the site name shares the logo row only while the links (and the theme\n * control) still fit on one line beside it; otherwise it goes under the logo, as on narrow\n * screens, so nothing overflows or wraps. Always measured with the name in the row, so the\n * result depends on the width alone and never flips back and forth.\n */\n private fitName = (): void => {\n const brand = this.renderRoot.querySelector<HTMLElement>('.brand');\n if (!brand) return;\n this.fittedWidth = this.getBoundingClientRect().width;\n brand.classList.remove('stacked');\n if (!matchMedia('screen and (min-width: 993px)').matches) return;\n const header = brand.parentElement!;\n const row = header.querySelector<HTMLElement>(':scope > .utility-row, :scope > nav.inline');\n if (!row) return;\n const edge =\n header.getBoundingClientRect().right - parseFloat(getComputedStyle(header).paddingRight);\n const items = [...row.querySelectorAll('nav.inline li')];\n const top = items[0]?.getBoundingClientRect().top;\n const crowded =\n row.getBoundingClientRect().right > edge + 0.5 ||\n row.scrollWidth > row.clientWidth + 0.5 ||\n items.some(\n (li) =>\n Math.abs(li.getBoundingClientRect().top - top!) > 0.5 ||\n li.querySelector('a')!.getClientRects().length > 1,\n );\n brand.classList.toggle('stacked', crowded);\n };\n\n protected override firstUpdated(): void {\n this.syncChildren();\n }\n\n /** The site name, trimmed, or empty for none. */\n private get name(): string {\n return (this.siteName ?? '').replace(/\\s+/g, ' ').trim();\n }\n\n /**\n * The logo, and with `site-name` the site's name after it. Their link names differ (\"UVA\n * Library home\", \"<name> home\"), and each starts with its visible text, for voice control.\n */\n private brand() {\n const logo = html`<a class=\"logo\" href=${siteLink(this.rootLinkDomain, '/')}\n ><img src=${this.logoSrc()} alt=\"UVA Library home\" width=\"304\" height=\"69\"\n /></a>`;\n const name = this.name;\n if (!name) return logo;\n return html`<div class=\"brand\">\n ${logo}<a class=\"site-name\" href=${this.siteNameHref || '/'} aria-label=${`${name} home`}\n >${name}</a\n >\n </div>`;\n }\n\n /** The navy logo, or the reversed (white) one while the page shows dark mode. */\n private logoSrc(): string {\n return this.scheme.logoDark\n ? DARK_LOGO_URL\n : siteLink(this.rootLinkDomain, '/sites/default/files/2022-09/library_rgb.png');\n }\n\n private onSchemeChange(e: Event): void {\n const input = e.target as HTMLInputElement;\n if (!input.checked) return;\n this.scheme.choose(input.value as ColorSchemePreference);\n trackEvent(this, [TAG, 'color-scheme', input.value]);\n }\n\n /**\n * The Light / Dark / System radio group. `inline` sits in the utility-links row, with its\n * legend visually hidden; `menu` closes the Menu popover, legend shown. \"System\" names\n * what it resolves to (the OS preference, whichever option is chosen), for screen readers.\n * Each option's look is on the span after its radio (no `:has()`, which Firefox 120 lacks).\n */\n private schemeControl(where: 'inline' | 'menu') {\n const { preference, systemDark } = this.scheme;\n const hint = ` (currently ${systemDark ? 'dark' : 'light'})`;\n const name = `${this.schemeName}-${where}`;\n return html`<fieldset class=\"color-scheme ${where}\">\n <legend class=${where === 'inline' ? 'visually-hidden' : ''}>Theme</legend>\n <div class=\"segments\">\n ${SCHEME_OPTIONS.map(\n (o) =>\n html`<label\n ><input\n type=\"radio\"\n name=${name}\n value=${o.value}\n .checked=${preference === o.value}\n @change=${this.onSchemeChange}\n /><span class=\"segment\"\n >${o.label}${\n o.value === 'system'\n ? html`<span class=\"visually-hidden\">${hint}</span>`\n : nothing\n }</span\n ></label\n >`,\n )}\n </div>\n </fieldset>`;\n }\n\n /** Light mode: place slotted alerts in `<header>`, then read the site links and main nav. */\n private syncChildren(): void {\n this.adoptAlerts();\n this.syncSources();\n }\n\n /** Read the site links and the main-nav markup, and watch both. */\n private syncSources(): void {\n const sources = [...this.syncSiteLinks(), ...this.syncMainNav()];\n this.watch(sources);\n }\n\n /**\n * Shadow mode: the `slot=\"main-nav\"` children, with a forwarded `<slot>` (from\n * `<site-page>`) replaced by what is assigned to it. Needs no rendered slot.\n */\n private get slottedMainNav(): Element[] {\n return [...this.children]\n .filter(isMainNavChild)\n .flatMap((k) => (k instanceof HTMLSlotElement ? k.assignedElements({ flatten: true }) : [k]));\n }\n\n /** Light mode: move `slot=\"main-nav\"` children into their own hidden holder. */\n private adoptMainNav(): Element[] {\n const moved = [...this.children].filter(isMainNavChild);\n if (moved.length && !this.mainNavHolder) {\n this.mainNavHolder = document.createElement('div');\n this.mainNavHolder.hidden = true;\n this.mainNavHolder.className = 'main-nav-source';\n }\n if (this.mainNavHolder) {\n this.mainNavHolder.append(...moved);\n if (this.mainNavHolder.parentNode !== this) this.append(this.mainNavHolder);\n }\n return this.mainNavHolder ? [...this.mainNavHolder.children] : [];\n }\n\n /** Read the `slot=\"main-nav\"` markup once, for both main-nav instances. */\n private syncMainNav(): Element[] {\n const sources = this.lightDom ? this.adoptMainNav() : this.slottedMainNav;\n if (!sources.length) {\n if (this.mainNavItems) this.mainNavItems = null;\n return sources;\n }\n const raw = sources.flatMap((s, i) => (i === 0 ? readItemsMarkup(s) : [{}]));\n const result = normalizeItems(raw);\n if ((result.invalid || result.flattened) && !this.warnedMainNav) {\n this.warnedMainNav = true;\n console.warn(\n `${this.localName}: ignoring invalid slot=\"${MAIN_NAV}\" entries (each needs a label, and an href or links; deeper levels are shown in their group).`,\n );\n }\n const next = result.items.length ? result.items : null;\n // Only a real change re-renders the header and both navs.\n if (JSON.stringify(next) !== JSON.stringify(this.mainNavItems)) this.mainNavItems = next;\n return sources;\n }\n\n /**\n * Light mode has no slots: move `slot=\"alerts\"` children to the start of `<header>`, after\n * any alerts already there. That is before every Lit part in the header, so re-renders\n * never touch them.\n */\n private adoptAlerts(): void {\n if (!this.lightDom) return;\n const header = this.querySelector(':scope > header');\n const incoming = [...this.children].filter(isAlertsChild);\n if (!header || !incoming.length) return;\n let ref = header.firstChild;\n while (isAlertsChild(ref)) ref = ref.nextSibling;\n for (const n of incoming) header.insertBefore(n, ref);\n }\n\n /** Shadow mode: the elements assigned to the site-links slot, through forwarded slots. */\n private get slotted(): Element[] {\n const slot = this.renderRoot.querySelector<HTMLSlotElement>(`slot[name=\"${SITE_LINKS}\"]`);\n return slot?.assignedElements({ flatten: true }) ?? [];\n }\n\n /** Light mode has no slots: move `slot=\"site-links\"` children into the hidden holder. */\n private adoptSiteLinks(): Element[] {\n const moved = [...this.children].filter(isSiteLinksChild);\n if (moved.length && !this.holder) {\n this.holder = document.createElement('div');\n this.holder.hidden = true;\n this.holder.className = 'site-links-source';\n }\n if (this.holder) {\n this.holder.append(...moved);\n if (this.holder.parentNode !== this) this.append(this.holder);\n }\n return this.holder ? [...this.holder.children] : [];\n }\n\n /** Read the source links and render them; returns the sources to watch. */\n private syncSiteLinks(): Element[] {\n const sources = this.lightDom ? this.adoptSiteLinks() : this.slotted;\n const items: SiteLinkItem[] = [];\n let invalid = false;\n for (const el of sources) {\n const text = (el.textContent ?? '').replace(/\\s+/g, ' ').trim();\n // A link with no text would have no accessible name.\n if (!(el instanceof HTMLAnchorElement) || !el.hasAttribute('href') || !text) {\n invalid = true;\n continue;\n }\n const attr = (name: string) => el.getAttribute(name) ?? undefined;\n items.push({\n href: el.getAttribute('href')!,\n text,\n current: attr('aria-current'),\n target: attr('target'),\n rel: attr('rel'),\n hreflang: attr('hreflang'),\n });\n }\n if (invalid && !this.warnedInvalid) {\n this.warnedInvalid = true;\n console.warn(\n `${this.localName}: ignoring slot=\"${SITE_LINKS}\" children that are not <a href> elements with text.`,\n );\n }\n this.siteLinks = items.length ? items : null;\n return sources;\n }\n\n /**\n * Shadow mode: slotchange reports added and removed links, and the observer watches the\n * assigned anchors' attributes and text. Light mode: the observer also watches the host\n * for new children and the holder for removals.\n */\n private watch(sources: Element[]): void {\n this.observer ??= new MutationObserver(() => this.syncChildren());\n this.observer.disconnect();\n const content = {\n attributes: true,\n attributeFilter: LINK_ATTRS,\n characterData: true,\n childList: true,\n subtree: true,\n };\n if (this.lightDom) {\n this.observer.observe(this, { childList: true });\n if (this.holder) this.observer.observe(this.holder, content);\n if (this.mainNavHolder)\n this.observer.observe(this.mainNavHolder, { ...content, attributeFilter: ['href'] });\n } else {\n for (const el of sources) this.observer.observe(el, content);\n }\n }\n\n private onSourcesChange(): void {\n this.syncSources();\n }\n\n private _menuId?: string;\n private get menuId(): string {\n this._menuId ??= this.lightDom ? `utility-menu-${++menuCounter}` : 'utility-menu';\n return this._menuId;\n }\n\n /**\n * The header with dark mode on: the inline nav and the control share the utility row, the\n * Menu popover ends with the control, and the logo follows the scheme. A template of its\n * own, so the header without the switch renders exactly what it did before dark mode.\n */\n private renderWithScheme(\n items: unknown,\n label: string,\n mainNav: boolean,\n mainNavEl: (accordion: boolean) => unknown,\n ) {\n const vendor = this.variant === 'vendor';\n const id = this.menuId;\n const anchor = `--${id}`;\n const menu = html`<button\n popovertarget=${id}\n aria-controls=${id}\n class=\"menu-toggle\"\n style=\"anchor-name: ${anchor}\"\n >\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"28\"\n height=\"28\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"butt\"\n stroke-linejoin=\"bevel\"\n >\n <line x1=\"3\" y1=\"12\" x2=\"21\" y2=\"12\"></line>\n <line x1=\"3\" y1=\"6\" x2=\"21\" y2=\"6\"></line>\n <line x1=\"3\" y1=\"18\" x2=\"21\" y2=\"18\"></line>\n </svg>\n Menu\n </button>\n <div id=${id} popover class=\"menu-popover\" style=\"--menu-anchor: ${anchor}\">\n ${mainNav ? mainNavEl(true) : nothing}\n <nav class=\"menu\" aria-label=${`${label} menu`}>\n <ul>\n ${items}\n </ul>\n </nav>\n ${this.schemeControl('menu')}\n </div>\n ${mainNav ? mainNavEl(false) : nothing}`;\n return html`\n <header part=\"header\" class=${vendor ? 'vendor' : ''}>\n ${this.lightDom ? nothing : html`<slot name=\"skip-link\"></slot><slot name=\"alerts\"></slot>`}\n ${this.brand()}\n <div class=\"utility-row\">\n <nav class=\"inline\" aria-label=${label}>\n <ul>\n ${items}\n </ul>\n </nav>\n ${this.schemeControl('inline')}\n </div>\n ${vendor ? nothing : menu}\n </header>\n ${\n this.lightDom\n ? nothing\n : html`<div hidden>\n <slot name=\"site-links\" @slotchange=${this.onSourcesChange}></slot>\n </div>\n <div hidden>\n <slot name=\"main-nav\" @slotchange=${this.onSourcesChange}></slot>\n </div>`\n }\n `;\n }\n\n render() {\n const root = this.rootLinkDomain;\n const vendor = this.variant === 'vendor';\n const own = vendor ? null : this.siteLinks;\n const items = own\n ? own.map(\n (l) =>\n html`<li>\n <a\n href=${l.href}\n aria-current=${ifDefined(l.current)}\n target=${ifDefined(l.target)}\n rel=${ifDefined(l.rel)}\n hreflang=${ifDefined(l.hreflang)}\n >${l.text}</a\n >\n </li>`,\n )\n : (vendor ? VENDOR_LINKS : FULL_LINKS).map(\n (l) => html`<li><a href=${siteLink(root, l.path)}>${l.label}</a></li>`,\n );\n const label = own ? this.siteLinksLabel || 'Site' : 'Utility';\n const id = this.menuId;\n const anchor = `--${id}`;\n const mainNav = !vendor && !this.noMainNav;\n // Without the main navigation the header renders exactly what it did before it existed,\n // whitespace included: these two templates are kept verbatim (prettier-ignore).\n // prettier-ignore\n const classic = html`<button\n popovertarget=${id}\n aria-controls=${id}\n class=\"menu-toggle\"\n style=\"anchor-name: ${anchor}\"\n >\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"28\"\n height=\"28\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"butt\"\n stroke-linejoin=\"bevel\"\n >\n <line x1=\"3\" y1=\"12\" x2=\"21\" y2=\"12\"></line>\n <line x1=\"3\" y1=\"6\" x2=\"21\" y2=\"6\"></line>\n <line x1=\"3\" y1=\"18\" x2=\"21\" y2=\"18\"></line>\n </svg>\n Menu\n </button>\n <nav class=\"menu\" aria-label=${`${label} menu`}>\n <ul id=${id} popover style=\"--menu-anchor: ${anchor}\">\n ${items}\n </ul>\n </nav>`;\n // prettier-ignore\n const classicHidden = html`<div hidden>\n <slot name=\"site-links\" @slotchange=${this.onSourcesChange}></slot>\n </div>`;\n const mainNavEl = (accordion: boolean) =>\n html`<site-main-nav\n class=${accordion ? 'accordion' : 'bar'}\n layout=${ifDefined(accordion ? 'accordion' : undefined)}\n ?no-shadow-dom=${this.lightDom}\n ?no-style=${this.noStyle}\n label=${this.mainNavLabel || 'Main'}\n root-link-domain=${root}\n items-src=${ifDefined(this.mainNavSrc || undefined)}\n current=${ifDefined(this.mainNavCurrent || undefined)}\n .items=${this.mainNavItems ?? undefined}\n @site-main-nav-error=${accordion ? stopEvent : nothing}\n ></site-main-nav>`;\n // With it: the Menu popover holds the accordion and then the utility links, and the bar\n // is the header's last child, a row of its own.\n const withMainNav = html`<button\n popovertarget=${id}\n aria-controls=${id}\n class=\"menu-toggle\"\n style=\"anchor-name: ${anchor}\"\n >\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"28\"\n height=\"28\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"butt\"\n stroke-linejoin=\"bevel\"\n >\n <line x1=\"3\" y1=\"12\" x2=\"21\" y2=\"12\"></line>\n <line x1=\"3\" y1=\"6\" x2=\"21\" y2=\"6\"></line>\n <line x1=\"3\" y1=\"18\" x2=\"21\" y2=\"18\"></line>\n </svg>\n Menu\n </button>\n <div id=${id} popover class=\"menu-popover\" style=\"--menu-anchor: ${anchor}\">\n ${mainNavEl(true)}\n <nav class=\"menu\" aria-label=${`${label} menu`}>\n <ul>\n ${items}\n </ul>\n </nav>\n </div>\n ${mainNavEl(false)}`;\n const withMainNavHidden = html`<div hidden>\n <slot name=\"site-links\" @slotchange=${this.onSourcesChange}></slot>\n </div>\n <div hidden>\n <slot name=\"main-nav\" @slotchange=${this.onSourcesChange}></slot>\n </div>`;\n if (this.scheme.active) return this.renderWithScheme(items, label, mainNav, mainNavEl);\n const end = vendor ? nothing : mainNav ? withMainNav : classic;\n const hidden = this.lightDom ? nothing : mainNav ? withMainNavHidden : classicHidden;\n // A template of its own, so the header without a site name stays byte-identical.\n if (this.name)\n return html`\n <header part=\"header\" class=${vendor ? 'vendor' : ''}>\n ${this.lightDom ? nothing : html`<slot name=\"skip-link\"></slot><slot name=\"alerts\"></slot>`}\n ${this.brand()}\n <nav class=\"inline\" aria-label=${label}>\n <ul>\n ${items}\n </ul>\n </nav>\n ${end}\n </header>\n ${hidden}\n `;\n return html`\n <header part=\"header\" class=${vendor ? 'vendor' : ''}>\n ${this.lightDom ? nothing : html`<slot name=\"skip-link\"></slot><slot name=\"alerts\"></slot>`}\n <a class=\"logo\" href=${siteLink(root, '/')}\n ><img src=${this.logoSrc()} alt=\"UVA Library home\" width=\"304\" height=\"69\"\n /></a>\n <nav class=\"inline\" aria-label=${label}>\n <ul>\n ${items}\n </ul>\n </nav>\n ${end}\n </header>\n ${hidden}\n `;\n }\n}\n","import { define } from '../../base/define.js';\nimport { SiteHeader } from './SiteHeader.js';\nimport { SiteMainNav } from '../site-main-nav/SiteMainNav.js';\nimport '../site-main-nav/site-main-nav.js';\n\ndefine('site-header', SiteHeader);\n\n// Another build (a second copy of the package, or the CDN and npm on one page) registered\n// <site-main-nav> first: the header then renders that version, which may not match it.\nconst registered = customElements.get('site-main-nav');\nif (registered && registered !== SiteMainNav) {\n console.warn(\n 'site-header: <site-main-nav> is already defined by another copy of @uvalib/web-components; the header uses that one. Load the components from one source only.',\n );\n}\n"],"mappings":";;;;;;AAmBA,IAAMsB,IAAOtB,EAAU,oCAAQ,GAOzBuB,IAAiB,qDAEVC,IAAc,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAuDtBF,EAAK;;;QAGLtB,EAAUuB,CAAc,EAAE;;;;UAIxBD,EAAK;;;UAGLtB,EAAUuB,CAAc,EAAE;;;;GCnFvBE,IAA2B,uBAE3BC,IAAoB,yBAE3BC,IAAS,8BACTC,IAAa,gCAGbC,oBA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