@uvalib/web-components 1.6.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +133 -12
  3. package/dist/base/states.d.ts +12 -0
  4. package/dist/base/states.js +33 -0
  5. package/dist/base/states.js.map +1 -0
  6. package/dist/base.css +15 -5
  7. package/dist/components/bento-box/BentoBox.js +1 -0
  8. package/dist/components/bento-box/BentoBox.js.map +1 -1
  9. package/dist/components/events-section/EventsSection.js +1 -0
  10. package/dist/components/events-section/EventsSection.js.map +1 -1
  11. package/dist/components/library-hours/hours-data.js +1 -1
  12. package/dist/components/library-hours/hours-data.js.map +1 -1
  13. package/dist/components/library-weekly-hours/LibraryWeeklyHours.js +1 -0
  14. package/dist/components/library-weekly-hours/LibraryWeeklyHours.js.map +1 -1
  15. package/dist/components/uvalib-card/UvalibCard.js +6 -0
  16. package/dist/components/uvalib-card/UvalibCard.js.map +1 -1
  17. package/dist/components/uvalib-combobox/UvalibCombobox.d.ts +27 -0
  18. package/dist/components/uvalib-combobox/UvalibCombobox.js +85 -1
  19. package/dist/components/uvalib-combobox/UvalibCombobox.js.map +1 -1
  20. package/dist/components/uvalib-contents/UvalibContents.js +5 -0
  21. package/dist/components/uvalib-contents/UvalibContents.js.map +1 -1
  22. package/dist/components/uvalib-filter-drawer/UvalibFilterDrawer.d.ts +6 -0
  23. package/dist/components/uvalib-filter-drawer/UvalibFilterDrawer.js +10 -0
  24. package/dist/components/uvalib-filter-drawer/UvalibFilterDrawer.js.map +1 -1
  25. package/dist/components/uvalib-image-regions/UvalibImageRegions.d.ts +1 -0
  26. package/dist/components/uvalib-image-regions/UvalibImageRegions.js +4 -1
  27. package/dist/components/uvalib-image-regions/UvalibImageRegions.js.map +1 -1
  28. package/dist/components/uvalib-image-regions/regions.d.ts +6 -2
  29. package/dist/components/uvalib-image-regions/regions.js +6 -3
  30. package/dist/components/uvalib-image-regions/regions.js.map +1 -1
  31. package/dist/components/uvalib-lightbox/UvalibLightbox.d.ts +100 -7
  32. package/dist/components/uvalib-lightbox/UvalibLightbox.js +310 -83
  33. package/dist/components/uvalib-lightbox/UvalibLightbox.js.map +1 -1
  34. package/dist/components/uvalib-lightbox/compare.d.ts +48 -8
  35. package/dist/components/uvalib-lightbox/compare.js +226 -22
  36. package/dist/components/uvalib-lightbox/compare.js.map +1 -1
  37. package/dist/components/uvalib-map/UvalibMap.js +2 -2
  38. package/dist/components/uvalib-map/UvalibMap.js.map +1 -1
  39. package/dist/components/uvalib-metadata/UvalibMetadata.js +3 -0
  40. package/dist/components/uvalib-metadata/UvalibMetadata.js.map +1 -1
  41. package/dist/components/uvalib-pagefind-search/UvalibPagefindSearch.js +3 -1
  42. package/dist/components/uvalib-pagefind-search/UvalibPagefindSearch.js.map +1 -1
  43. package/dist/components/uvalib-photo-grid/UvalibPhotoGrid.d.ts +3 -3
  44. package/dist/components/uvalib-photo-grid/UvalibPhotoGrid.js +16 -8
  45. package/dist/components/uvalib-photo-grid/UvalibPhotoGrid.js.map +1 -1
  46. package/dist/components/uvalib-tag-list/UvalibTagList.d.ts +4 -1
  47. package/dist/components/uvalib-tag-list/UvalibTagList.js +9 -2
  48. package/dist/components/uvalib-tag-list/UvalibTagList.js.map +1 -1
  49. package/dist/custom-elements.json +596 -19
  50. package/dist/styles/message.js +4 -0
  51. package/dist/styles/message.js.map +1 -1
  52. package/dist/styles/result-list.js +25 -4
  53. package/dist/styles/result-list.js.map +1 -1
  54. package/dist/styles/results.js +17 -2
  55. package/dist/styles/results.js.map +1 -1
  56. package/dist-cdn/base.css +15 -5
  57. package/dist-cdn/bento-box.js +1 -0
  58. package/dist-cdn/bento-box.js.map +1 -1
  59. package/dist-cdn/chunks/{compare-D4VdaIJN.js → compare-C0nhByn7.js} +185 -56
  60. package/dist-cdn/chunks/compare-C0nhByn7.js.map +1 -0
  61. package/dist-cdn/chunks/{hours-data-Bw6vkIw7.js → hours-data-gMu5uT7H.js} +2 -2
  62. package/dist-cdn/chunks/hours-data-gMu5uT7H.js.map +1 -0
  63. package/dist-cdn/chunks/{library-weekly-hours-CrV3TlP5.js → library-weekly-hours-BJgxAyah.js} +3 -2
  64. package/dist-cdn/chunks/library-weekly-hours-BJgxAyah.js.map +1 -0
  65. package/dist-cdn/chunks/{regions-B8ExwUGP.js → regions-B-rOwa-v.js} +15 -15
  66. package/dist-cdn/chunks/regions-B-rOwa-v.js.map +1 -0
  67. package/dist-cdn/chunks/states-DGXGzcte.js +17 -0
  68. package/dist-cdn/chunks/states-DGXGzcte.js.map +1 -0
  69. package/dist-cdn/custom-elements.json +596 -19
  70. package/dist-cdn/events-section.js +1 -0
  71. package/dist-cdn/events-section.js.map +1 -1
  72. package/dist-cdn/library-hours-setup.js +1 -1
  73. package/dist-cdn/library-weekly-hours.js +1 -1
  74. package/dist-cdn/manifest.json +1 -1
  75. package/dist-cdn/site-hours-section.js +1 -1
  76. package/dist-cdn/skills/uvalib-web-components/SKILL.md +8 -6
  77. package/dist-cdn/skills/uvalib-web-components/reference/components.md +37 -6
  78. package/dist-cdn/uvalib-card.js +6 -0
  79. package/dist-cdn/uvalib-card.js.map +1 -1
  80. package/dist-cdn/uvalib-combobox.js +107 -68
  81. package/dist-cdn/uvalib-combobox.js.map +1 -1
  82. package/dist-cdn/uvalib-contents.js +5 -0
  83. package/dist-cdn/uvalib-contents.js.map +1 -1
  84. package/dist-cdn/uvalib-filter-drawer.js +27 -25
  85. package/dist-cdn/uvalib-filter-drawer.js.map +1 -1
  86. package/dist-cdn/uvalib-image-regions.js +4 -2
  87. package/dist-cdn/uvalib-image-regions.js.map +1 -1
  88. package/dist-cdn/uvalib-lightbox.js +230 -129
  89. package/dist-cdn/uvalib-lightbox.js.map +1 -1
  90. package/dist-cdn/uvalib-map.js +2 -2
  91. package/dist-cdn/uvalib-map.js.map +1 -1
  92. package/dist-cdn/uvalib-metadata.js +3 -0
  93. package/dist-cdn/uvalib-metadata.js.map +1 -1
  94. package/dist-cdn/uvalib-pagefind-search.js +2 -1
  95. package/dist-cdn/uvalib-pagefind-search.js.map +1 -1
  96. package/dist-cdn/uvalib-photo-grid.js +4 -5
  97. package/dist-cdn/uvalib-photo-grid.js.map +1 -1
  98. package/dist-cdn/uvalib-tag-list.js +21 -16
  99. package/dist-cdn/uvalib-tag-list.js.map +1 -1
  100. package/package.json +1 -1
  101. package/skills/uvalib-web-components/SKILL.md +8 -6
  102. package/skills/uvalib-web-components/reference/components.md +37 -6
  103. package/dist-cdn/chunks/compare-D4VdaIJN.js.map +0 -1
  104. package/dist-cdn/chunks/hours-data-Bw6vkIw7.js.map +0 -1
  105. package/dist-cdn/chunks/library-weekly-hours-CrV3TlP5.js.map +0 -1
  106. package/dist-cdn/chunks/regions-B8ExwUGP.js.map +0 -1
@@ -13,6 +13,9 @@ import { css } from 'lit';
13
13
  //
14
14
  // In forced colors, where backgrounds are dropped, every message keeps a system-colour border
15
15
  // (thicker at the start), as <site-alerts> does.
16
+ //
17
+ // The text wraps with `text-wrap: pretty` (no one-word last line; ignored where unsupported),
18
+ // not `balance`: the message is a box, and balanced lines would leave empty space in it.
16
19
  export const message = css `
17
20
  .uvalib-message {
18
21
  display: block;
@@ -27,6 +30,7 @@ export const message = css `
27
30
  color: var(--uva-color-alert-text, var(--uva-grey-darkest, #2b2b2b));
28
31
  line-height: 1.5;
29
32
  overflow-wrap: anywhere;
33
+ text-wrap: pretty;
30
34
  }
31
35
  .uvalib-message > :first-child {
32
36
  margin-block-start: 0;
@@ -1 +1 @@
1
- {"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/styles/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,yFAAyF;AACzF,6FAA6F;AAC7F,4FAA4F;AAC5F,8FAA8F;AAC9F,0EAA0E;AAC1E,6FAA6F;AAC7F,EAAE;AACF,iFAAiF;AACjF,yFAAyF;AACzF,2FAA2F;AAC3F,8EAA8E;AAC9E,EAAE;AACF,8FAA8F;AAC9F,iDAAiD;AACjD,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiEzB,CAAC"}
1
+ {"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/styles/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,yFAAyF;AACzF,6FAA6F;AAC7F,4FAA4F;AAC5F,8FAA8F;AAC9F,0EAA0E;AAC1E,6FAA6F;AAC7F,EAAE;AACF,iFAAiF;AACjF,yFAAyF;AACzF,2FAA2F;AAC3F,8EAA8E;AAC9E,EAAE;AACF,8FAA8F;AAC9F,iDAAiD;AACjD,EAAE;AACF,8FAA8F;AAC9F,yFAAyF;AACzF,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkEzB,CAAC"}
@@ -3,7 +3,23 @@ import { css } from 'lit';
3
3
  // into `controls`): plain `<ul>` / `<li>` rows a page can render by the thousand, with no
4
4
  // element per row. A row holds optional meta (badges, a date), the title (the row's one
5
5
  // link), a snippet with the search terms in `<mark>`, and optional secondary actions, which
6
- // sit at the end of the row on wide screens and wrap below it on phones.
6
+ // sit at the end of the row when the list is wide and wrap below it when the list is narrow.
7
+ //
8
+ // Narrow is the list's own width, not the viewport's: the list is a named size container
9
+ // (`container: uvalib-result-list / inline-size`), so in a 250px sidebar or a drawer the
10
+ // actions wrap below as on a phone. Inline-size containment means the list no longer sizes
11
+ // to its content across: it is a block-level box, so it fills its parent as before; inside a
12
+ // shrink-wrapped flex or grid item, give it a width. Ems in `@container` resolve against the
13
+ // container's own font size (CSS Containment 3), so 40em is 40 of the list's ems: at the
14
+ // usual 16px the same 640px as the old 40em media query, which read the browser's initial
15
+ // font size. The rows' `content-visibility: auto` is unaffected (it contains the row, not
16
+ // the list).
17
+ //
18
+ // Typography: a non-link title is balanced (`text-wrap: balance`, short multi-line
19
+ // headings); a title that is itself the link is not, so balancing cannot leave clickable
20
+ // empty space beside it. The snippet uses `text-wrap: pretty` (no one-word last line).
21
+ // Both are ignored where unsupported. Off-screen rows are skipped by content-visibility, so
22
+ // the extra wrapping cost is paid only for the rows on screen.
7
23
  //
8
24
  // Speed: each row has `content-visibility: auto`, so the browser skips layout and paint for
9
25
  // rows off screen, with `contain-intrinsic-block-size: auto 7rem` (a typical row) so the
@@ -20,6 +36,7 @@ import { css } from 'lit';
20
36
  export const resultList = css `
21
37
  .uvalib-result-list {
22
38
  display: block;
39
+ container: uvalib-result-list / inline-size;
23
40
  margin: 0 0 1rem;
24
41
  padding: 0;
25
42
  list-style: none;
@@ -58,6 +75,9 @@ export const resultList = css `
58
75
  font-weight: 600;
59
76
  line-height: 1.4;
60
77
  }
78
+ .uvalib-result__title:not(a) {
79
+ text-wrap: balance;
80
+ }
61
81
  :is(a.uvalib-result__title, .uvalib-result__title a) {
62
82
  color: var(--uva-color-link, var(--uva-brand-blue, #232d4b));
63
83
  text-decoration: underline;
@@ -74,6 +94,7 @@ export const resultList = css `
74
94
  .uvalib-result__snippet {
75
95
  display: block;
76
96
  margin-block-start: 0.25rem;
97
+ text-wrap: pretty;
77
98
  }
78
99
  .uvalib-result__snippet mark {
79
100
  padding-inline: 0.1em;
@@ -82,7 +103,7 @@ export const resultList = css `
82
103
  color: var(--uva-color-on-highlight, var(--uva-grey-darkest, #2b2b2b));
83
104
  font-weight: 700;
84
105
  }
85
- /* Wide: the actions at the end of the row, beside its first lines. */
106
+ /* A wide list: the actions at the end of the row, beside its first lines. */
86
107
  .uvalib-result > .uvalib-result__actions {
87
108
  display: flex;
88
109
  flex-wrap: wrap;
@@ -91,8 +112,8 @@ export const resultList = css `
91
112
  grid-column: 2;
92
113
  grid-row: 1 / span 4;
93
114
  }
94
- /* Phones: the actions below the row's text, wrapping. */
95
- @media (max-width: 40em) {
115
+ /* A narrow list (a phone, a sidebar, a drawer): the actions below the row's text, wrapping. */
116
+ @container uvalib-result-list (width <= 40em) {
96
117
  .uvalib-result > .uvalib-result__actions {
97
118
  justify-content: flex-start;
98
119
  grid-column: 1;
@@ -1 +1 @@
1
- {"version":3,"file":"result-list.js","sourceRoot":"","sources":["../../src/styles/result-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,0FAA0F;AAC1F,0FAA0F;AAC1F,wFAAwF;AACxF,4FAA4F;AAC5F,yEAAyE;AACzE,EAAE;AACF,4FAA4F;AAC5F,yFAAyF;AACzF,8FAA8F;AAC9F,2FAA2F;AAC3F,2FAA2F;AAC3F,4FAA4F;AAC5F,qFAAqF;AACrF,EAAE;AACF,6FAA6F;AAC7F,8FAA8F;AAC9F,6FAA6F;AAC7F,mCAAmC;AACnC,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0F5B,CAAC"}
1
+ {"version":3,"file":"result-list.js","sourceRoot":"","sources":["../../src/styles/result-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,0FAA0F;AAC1F,0FAA0F;AAC1F,wFAAwF;AACxF,4FAA4F;AAC5F,6FAA6F;AAC7F,EAAE;AACF,yFAAyF;AACzF,yFAAyF;AACzF,2FAA2F;AAC3F,6FAA6F;AAC7F,6FAA6F;AAC7F,yFAAyF;AACzF,0FAA0F;AAC1F,0FAA0F;AAC1F,aAAa;AACb,EAAE;AACF,mFAAmF;AACnF,yFAAyF;AACzF,uFAAuF;AACvF,4FAA4F;AAC5F,+DAA+D;AAC/D,EAAE;AACF,4FAA4F;AAC5F,yFAAyF;AACzF,8FAA8F;AAC9F,2FAA2F;AAC3F,2FAA2F;AAC3F,4FAA4F;AAC5F,qFAAqF;AACrF,EAAE;AACF,6FAA6F;AAC7F,8FAA8F;AAC9F,6FAA6F;AAC7F,mCAAmC;AACnC,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+F5B,CAAC"}
@@ -10,6 +10,17 @@ import { css } from 'lit';
10
10
  // read the alert role tokens (7:1 or more in both schemes) plus two success tokens, and always
11
11
  // carry a text label; an icon is decorative. Every badge has a transparent border that shows
12
12
  // in forced colors, where backgrounds are dropped.
13
+ //
14
+ // The toolbar stacks by its own width, not the viewport's: it is a named size container
15
+ // (`container: uvalib-toolbar / inline-size`), so in a sidebar or a drawer it stacks as on a
16
+ // phone. It is a block-level box, so inline-size containment (it no longer sizes to its
17
+ // content across) changes nothing in normal flow; inside a shrink-wrapped flex or grid item,
18
+ // give it a width. 30em in `@container` is 30 of the toolbar's own ems (the old media query
19
+ // read the browser's initial font size): 480px at the usual 16px.
20
+ //
21
+ // The empty state's heading is balanced and its sentence wraps with `text-wrap: pretty`;
22
+ // both are ignored where unsupported. Badges are never balanced: a balanced line in a box
23
+ // leaves empty space inside it.
13
24
  export const results = css `
14
25
  .uvalib-badge {
15
26
  display: inline-flex;
@@ -103,6 +114,7 @@ export const results = css `
103
114
 
104
115
  /* A results toolbar: search, selects, chip groups and the count, wrapping on phones. */
105
116
  .uvalib-toolbar {
117
+ container: uvalib-toolbar / inline-size;
106
118
  display: flex;
107
119
  flex-wrap: wrap;
108
120
  align-items: flex-end;
@@ -122,7 +134,7 @@ export const results = css `
122
134
  .uvalib-toolbar__field > .uvalib-input {
123
135
  inline-size: 100%;
124
136
  }
125
- /* :where keeps it as specific as the phone rule below, which then wins. */
137
+ /* :where keeps it as specific as the narrow rule below, which then wins. */
126
138
  .uvalib-toolbar > :where(.uvalib-toolbar__field--grow, .uvalib-search-form) {
127
139
  flex: 1 1 16rem;
128
140
  }
@@ -137,7 +149,8 @@ export const results = css `
137
149
  margin-inline-start: auto;
138
150
  color: var(--uva-color-text-muted, var(--uva-grey-A, #4f4f4f));
139
151
  }
140
- @media (max-width: 30em) {
152
+ /* A narrow toolbar (a phone, a sidebar, a drawer): every item on its own line. */
153
+ @container uvalib-toolbar (width <= 30em) {
141
154
  .uvalib-toolbar > * {
142
155
  flex: 1 1 100%;
143
156
  }
@@ -170,9 +183,11 @@ export const results = css `
170
183
  .uvalib-empty-state > :is(h2, h3, h4, .uvalib-empty-state__heading) {
171
184
  font-size: 1.25rem;
172
185
  line-height: 1.3;
186
+ text-wrap: balance;
173
187
  }
174
188
  .uvalib-empty-state > p {
175
189
  color: var(--uva-color-text-muted, var(--uva-grey-A, #4f4f4f));
190
+ text-wrap: pretty;
176
191
  }
177
192
 
178
193
  /* Loading placeholders: a box (give it a height or an aspect ratio) and a text line, which
@@ -1 +1 @@
1
- {"version":3,"file":"results.js","sourceRoot":"","sources":["../../src/styles/results.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,0FAA0F;AAC1F,4FAA4F;AAC5F,wEAAwE;AACxE,EAAE;AACF,+FAA+F;AAC/F,6FAA6F;AAC7F,2FAA2F;AAC3F,8FAA8F;AAC9F,+FAA+F;AAC/F,6FAA6F;AAC7F,mDAAmD;AACnD,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoOzB,CAAC"}
1
+ {"version":3,"file":"results.js","sourceRoot":"","sources":["../../src/styles/results.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,0FAA0F;AAC1F,4FAA4F;AAC5F,wEAAwE;AACxE,EAAE;AACF,+FAA+F;AAC/F,6FAA6F;AAC7F,2FAA2F;AAC3F,8FAA8F;AAC9F,+FAA+F;AAC/F,6FAA6F;AAC7F,mDAAmD;AACnD,EAAE;AACF,wFAAwF;AACxF,6FAA6F;AAC7F,wFAAwF;AACxF,6FAA6F;AAC7F,4FAA4F;AAC5F,kEAAkE;AAClE,EAAE;AACF,yFAAyF;AACzF,0FAA0F;AAC1F,gCAAgC;AAChC,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwOzB,CAAC"}
package/dist-cdn/base.css CHANGED
@@ -487,6 +487,7 @@
487
487
 
488
488
  /* A results toolbar: search, selects, chip groups and the count, wrapping on phones. */
489
489
  .uvalib-toolbar {
490
+ container: uvalib-toolbar / inline-size;
490
491
  display: flex;
491
492
  flex-wrap: wrap;
492
493
  align-items: flex-end;
@@ -506,7 +507,7 @@
506
507
  .uvalib-toolbar__field > .uvalib-input {
507
508
  inline-size: 100%;
508
509
  }
509
- /* :where keeps it as specific as the phone rule below, which then wins. */
510
+ /* :where keeps it as specific as the narrow rule below, which then wins. */
510
511
  .uvalib-toolbar > :where(.uvalib-toolbar__field--grow, .uvalib-search-form) {
511
512
  flex: 1 1 16rem;
512
513
  }
@@ -521,7 +522,8 @@
521
522
  margin-inline-start: auto;
522
523
  color: var(--uva-color-text-muted, var(--uva-grey-A, #4f4f4f));
523
524
  }
524
- @media (max-width: 30em) {
525
+ /* A narrow toolbar (a phone, a sidebar, a drawer): every item on its own line. */
526
+ @container uvalib-toolbar (width <= 30em) {
525
527
  .uvalib-toolbar > * {
526
528
  flex: 1 1 100%;
527
529
  }
@@ -554,9 +556,11 @@
554
556
  .uvalib-empty-state > :is(h2, h3, h4, .uvalib-empty-state__heading) {
555
557
  font-size: 1.25rem;
556
558
  line-height: 1.3;
559
+ text-wrap: balance;
557
560
  }
558
561
  .uvalib-empty-state > p {
559
562
  color: var(--uva-color-text-muted, var(--uva-grey-A, #4f4f4f));
563
+ text-wrap: pretty;
560
564
  }
561
565
 
562
566
  /* Loading placeholders: a box (give it a height or an aspect ratio) and a text line, which
@@ -637,6 +641,7 @@
637
641
  color: var(--uva-color-alert-text, var(--uva-grey-darkest, #2b2b2b));
638
642
  line-height: 1.5;
639
643
  overflow-wrap: anywhere;
644
+ text-wrap: pretty;
640
645
  }
641
646
  .uvalib-message > :first-child {
642
647
  margin-block-start: 0;
@@ -692,6 +697,7 @@
692
697
 
693
698
  .uvalib-result-list {
694
699
  display: block;
700
+ container: uvalib-result-list / inline-size;
695
701
  margin: 0 0 1rem;
696
702
  padding: 0;
697
703
  list-style: none;
@@ -730,6 +736,9 @@
730
736
  font-weight: 600;
731
737
  line-height: 1.4;
732
738
  }
739
+ .uvalib-result__title:not(a) {
740
+ text-wrap: balance;
741
+ }
733
742
  :is(a.uvalib-result__title, .uvalib-result__title a) {
734
743
  color: var(--uva-color-link, var(--uva-brand-blue, #232d4b));
735
744
  text-decoration: underline;
@@ -746,6 +755,7 @@
746
755
  .uvalib-result__snippet {
747
756
  display: block;
748
757
  margin-block-start: 0.25rem;
758
+ text-wrap: pretty;
749
759
  }
750
760
  .uvalib-result__snippet mark {
751
761
  padding-inline: 0.1em;
@@ -754,7 +764,7 @@
754
764
  color: var(--uva-color-on-highlight, var(--uva-grey-darkest, #2b2b2b));
755
765
  font-weight: 700;
756
766
  }
757
- /* Wide: the actions at the end of the row, beside its first lines. */
767
+ /* A wide list: the actions at the end of the row, beside its first lines. */
758
768
  .uvalib-result > .uvalib-result__actions {
759
769
  display: flex;
760
770
  flex-wrap: wrap;
@@ -763,8 +773,8 @@
763
773
  grid-column: 2;
764
774
  grid-row: 1 / span 4;
765
775
  }
766
- /* Phones: the actions below the row's text, wrapping. */
767
- @media (max-width: 40em) {
776
+ /* A narrow list (a phone, a sidebar, a drawer): the actions below the row's text, wrapping. */
777
+ @container uvalib-result-list (width <= 40em) {
768
778
  .uvalib-result > .uvalib-result__actions {
769
779
  justify-content: flex-start;
770
780
  grid-column: 1;
@@ -829,6 +829,7 @@ var Z = (e) => `
829
829
  font-size: 1.5rem;
830
830
  font-weight: 500;
831
831
  line-height: 1.3;
832
+ text-wrap: balance;
832
833
  }
833
834
  .bs-search-term {
834
835
  font-style: italic;