@uvalib/web-components 1.8.5 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -0
- package/README.md +719 -72
- package/bin/install-skill.mjs +174 -54
- package/dist/base/clipboard.d.ts +9 -0
- package/dist/base/clipboard.js +30 -0
- package/dist/base/clipboard.js.map +1 -0
- package/dist/base.css +301 -3
- package/dist/components/uvalib-citation/UvalibCitation.d.ts +124 -0
- package/dist/components/uvalib-citation/UvalibCitation.js +545 -0
- package/dist/components/uvalib-citation/UvalibCitation.js.map +1 -0
- package/dist/components/uvalib-citation/uvalib-citation.d.ts +1 -0
- package/dist/components/uvalib-citation/uvalib-citation.js +4 -0
- package/dist/components/uvalib-citation/uvalib-citation.js.map +1 -0
- package/dist/components/uvalib-dialog/UvalibDialog.d.ts +167 -0
- package/dist/components/uvalib-dialog/UvalibDialog.js +688 -0
- package/dist/components/uvalib-dialog/UvalibDialog.js.map +1 -0
- package/dist/components/uvalib-dialog/uvalib-dialog.d.ts +1 -0
- package/dist/components/uvalib-dialog/uvalib-dialog.js +4 -0
- package/dist/components/uvalib-dialog/uvalib-dialog.js.map +1 -0
- package/dist/components/uvalib-filter/UvalibFilter.d.ts +92 -9
- package/dist/components/uvalib-filter/UvalibFilter.js +748 -60
- package/dist/components/uvalib-filter/UvalibFilter.js.map +1 -1
- package/dist/components/uvalib-list-filter/UvalibListFilter.d.ts +162 -0
- package/dist/components/uvalib-list-filter/UvalibListFilter.js +685 -0
- package/dist/components/uvalib-list-filter/UvalibListFilter.js.map +1 -0
- package/dist/components/uvalib-list-filter/uvalib-list-filter.d.ts +1 -0
- package/dist/components/uvalib-list-filter/uvalib-list-filter.js +4 -0
- package/dist/components/uvalib-list-filter/uvalib-list-filter.js.map +1 -0
- package/dist/components/uvalib-metadata/UvalibMetadata.js +3 -4
- package/dist/components/uvalib-metadata/UvalibMetadata.js.map +1 -1
- package/dist/components/uvalib-pagefind-search/UvalibPagefindSearch.d.ts +28 -1
- package/dist/components/uvalib-pagefind-search/UvalibPagefindSearch.js +139 -3
- package/dist/components/uvalib-pagefind-search/UvalibPagefindSearch.js.map +1 -1
- package/dist/custom-elements.json +9503 -6086
- package/dist/edition.css +758 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/styles/base.js +112 -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 +6 -0
- package/dist/styles/controls.js.map +1 -1
- package/dist/styles/edition.d.ts +1 -0
- package/dist/styles/edition.js +747 -0
- package/dist/styles/edition.js.map +1 -0
- package/dist/styles/field-text.d.ts +1 -0
- package/dist/styles/field-text.js +21 -0
- package/dist/styles/field-text.js.map +1 -0
- package/dist/styles/hidden.js +15 -1
- package/dist/styles/hidden.js.map +1 -1
- package/dist/styles/layout.d.ts +1 -0
- package/dist/styles/layout.js +92 -0
- package/dist/styles/layout.js.map +1 -0
- package/dist/styles/table.d.ts +1 -0
- package/dist/styles/table.js +164 -0
- package/dist/styles/table.js.map +1 -0
- package/dist/tokens.css +4 -0
- package/dist-cdn/base.css +301 -3
- package/dist-cdn/chunks/{base-B3tNX103.js → base-DXkGlSgH.js} +113 -2
- package/dist-cdn/chunks/base-DXkGlSgH.js.map +1 -0
- package/dist-cdn/chunks/clipboard-CNG7Y_5X.js +18 -0
- package/dist-cdn/chunks/clipboard-CNG7Y_5X.js.map +1 -0
- package/dist-cdn/chunks/if-defined-COiQb-gl.js +6 -0
- package/dist-cdn/chunks/if-defined-COiQb-gl.js.map +1 -0
- package/dist-cdn/chunks/{site-header-CEmNtmk5.js → site-header-B78a_ldi.js} +27 -22
- package/dist-cdn/chunks/site-header-B78a_ldi.js.map +1 -0
- package/dist-cdn/chunks/{site-main-nav-CAwKq_x5.js → site-main-nav-CmMq2t8t.js} +52 -51
- package/dist-cdn/chunks/site-main-nav-CmMq2t8t.js.map +1 -0
- package/dist-cdn/custom-elements.json +9503 -6086
- package/dist-cdn/edition.css +758 -0
- package/dist-cdn/manifest.json +7 -3
- package/dist-cdn/site-header.js +1 -1
- package/dist-cdn/site-main-nav.js +1 -1
- package/dist-cdn/site-page.js +3 -3
- package/dist-cdn/site-style.js +1 -1
- package/dist-cdn/skills/uvalib-web-components/SKILL.md +34 -10
- package/dist-cdn/skills/uvalib-web-components/reference/components.md +188 -9
- package/dist-cdn/tokens.css +4 -0
- package/dist-cdn/uvalib-citation.js +382 -0
- package/dist-cdn/uvalib-citation.js.map +1 -0
- package/dist-cdn/uvalib-dialog.js +419 -0
- package/dist-cdn/uvalib-dialog.js.map +1 -0
- package/dist-cdn/uvalib-filter.js +603 -69
- package/dist-cdn/uvalib-filter.js.map +1 -1
- package/dist-cdn/uvalib-list-filter.js +451 -0
- package/dist-cdn/uvalib-list-filter.js.map +1 -0
- package/dist-cdn/uvalib-metadata.js +49 -49
- package/dist-cdn/uvalib-metadata.js.map +1 -1
- package/dist-cdn/uvalib-pagefind-search.js +118 -48
- package/dist-cdn/uvalib-pagefind-search.js.map +1 -1
- package/package.json +14 -1
- package/skills/uvalib-web-components/SKILL.md +34 -10
- package/skills/uvalib-web-components/reference/components.md +188 -9
- package/dist-cdn/chunks/base-B3tNX103.js.map +0 -1
- package/dist-cdn/chunks/site-header-CEmNtmk5.js.map +0 -1
- package/dist-cdn/chunks/site-main-nav-CAwKq_x5.js.map +0 -1
package/dist-cdn/base.css
CHANGED
|
@@ -130,7 +130,9 @@
|
|
|
130
130
|
uvalib-combobox,
|
|
131
131
|
uvalib-image-regions,
|
|
132
132
|
uvalib-map,
|
|
133
|
-
uvalib-filter-drawer
|
|
133
|
+
uvalib-filter-drawer,
|
|
134
|
+
uvalib-filter,
|
|
135
|
+
uvalib-list-filter
|
|
134
136
|
):not(:defined)[hidden],
|
|
135
137
|
:where(uvalib-combobox, uvalib-image-regions):not(:defined) > [hidden] {
|
|
136
138
|
display: none;
|
|
@@ -276,6 +278,25 @@ uvalib-metadata:not(:defined) > dl > dd[data-limit="12"] > :is(ul, ol):has(> li:
|
|
|
276
278
|
font: inherit;
|
|
277
279
|
line-height: 1.2;
|
|
278
280
|
}
|
|
281
|
+
/* A list filter draws its label, a 44px field and a one-line count from attributes: hold
|
|
282
|
+
their height (less the label with hide-label, less the count with results-count), so the
|
|
283
|
+
list below does not move when it upgrades. The list itself is the page's and stays
|
|
284
|
+
fully shown until then. */
|
|
285
|
+
uvalib-list-filter:not(:defined) {
|
|
286
|
+
display: block;
|
|
287
|
+
font-size: 1rem;
|
|
288
|
+
line-height: 1.5;
|
|
289
|
+
min-block-size: calc(1.5em + 0.25rem + 44px + 0.25rem + 1.5em);
|
|
290
|
+
}
|
|
291
|
+
uvalib-list-filter[hide-label]:not(:defined) {
|
|
292
|
+
min-block-size: calc(44px + 0.25rem + 1.5em);
|
|
293
|
+
}
|
|
294
|
+
uvalib-list-filter[results-count]:not(:defined) {
|
|
295
|
+
min-block-size: calc(1.5em + 0.25rem + 44px);
|
|
296
|
+
}
|
|
297
|
+
uvalib-list-filter[hide-label][results-count]:not(:defined) {
|
|
298
|
+
min-block-size: 44px;
|
|
299
|
+
}
|
|
279
300
|
/* Image regions: the image at its own width and the list beside it (or under it), the
|
|
280
301
|
layout the element keeps once it upgrades, so the image does not move. */
|
|
281
302
|
uvalib-image-regions:not(:defined) {
|
|
@@ -309,6 +330,13 @@ uvalib-metadata:not(:defined) > dl > dd[data-limit="12"] > :is(ul, ol):has(> li:
|
|
|
309
330
|
line-height: 1.5;
|
|
310
331
|
color: var(--uva-color-text-muted, #4b5563);
|
|
311
332
|
}
|
|
333
|
+
/* A collapsed filter group (<uvalib-filter collapsible collapsed>) draws only its 44px
|
|
334
|
+
legend button once it upgrades: hold that height. Low specificity, so the [hidden] rule
|
|
335
|
+
above still wins. */
|
|
336
|
+
:where(uvalib-filter[collapsible][collapsed]):not(:defined) {
|
|
337
|
+
display: block;
|
|
338
|
+
min-block-size: 44px;
|
|
339
|
+
}
|
|
312
340
|
/* A filter drawer on a phone (the default 48rem breakpoint): once it upgrades only its 44px
|
|
313
341
|
"Search and filters" button shows, so hold that height and keep the form and filters out
|
|
314
342
|
of sight meanwhile; nothing moves when it upgrades. A page with its own breakpoint adds the
|
|
@@ -323,6 +351,89 @@ uvalib-metadata:not(:defined) > dl > dd[data-limit="12"] > :is(ul, ol):has(> li:
|
|
|
323
351
|
display: none;
|
|
324
352
|
}
|
|
325
353
|
}
|
|
354
|
+
/* A contents list before <uvalib-contents> upgrades (a .uvalib-sidebar-layout sidebar): the
|
|
355
|
+
headline's line held above, the links already padded as it pads them (the rules drawn
|
|
356
|
+
transparent while hidden), so the list does not move. Narrow (the default 64rem
|
|
357
|
+
collapse-below, closed): only its 44px button shows once it upgrades, so hold that and
|
|
358
|
+
clip the list; the reveal releases it, so the list still shows if the script never loads.
|
|
359
|
+
The [hidden] rule above still wins (it alone sets display). */
|
|
360
|
+
uvalib-contents:not(:defined) {
|
|
361
|
+
padding-block-start: calc(1.125rem * 1.3 + 0.5rem);
|
|
362
|
+
animation-name: uvalib-contents-reveal;
|
|
363
|
+
}
|
|
364
|
+
:where(uvalib-contents):not(:defined) :is(ol, ul) {
|
|
365
|
+
margin: 0;
|
|
366
|
+
padding: 0;
|
|
367
|
+
list-style: none;
|
|
368
|
+
}
|
|
369
|
+
:where(uvalib-contents):not(:defined) > :is(ol, ul) {
|
|
370
|
+
border-block: 1px solid transparent;
|
|
371
|
+
}
|
|
372
|
+
:where(uvalib-contents):not(:defined) > :is(ol, ul) > li + li {
|
|
373
|
+
border-block-start: 1px solid transparent;
|
|
374
|
+
}
|
|
375
|
+
:where(uvalib-contents):not(:defined) li > a {
|
|
376
|
+
display: block;
|
|
377
|
+
padding: 0.5rem 0.75rem 0.5rem calc(0.75rem + 4px);
|
|
378
|
+
}
|
|
379
|
+
:where(uvalib-contents):not(:defined) li li > a {
|
|
380
|
+
padding-block: 0.25rem;
|
|
381
|
+
}
|
|
382
|
+
:where(uvalib-contents):not(:defined) li :is(ol, ul) {
|
|
383
|
+
padding-inline-start: 1rem;
|
|
384
|
+
border-inline-start: 2px solid transparent;
|
|
385
|
+
}
|
|
386
|
+
/* In light DOM (no-shadow-dom) a nested list is indented by a margin, with 0.5rem below. */
|
|
387
|
+
:where(uvalib-contents[no-shadow-dom]):not(:defined) li :is(ol, ul) {
|
|
388
|
+
margin: 0 0 0.5rem 0.75rem;
|
|
389
|
+
padding-inline-start: 0;
|
|
390
|
+
}
|
|
391
|
+
@media (max-width: 64rem) {
|
|
392
|
+
uvalib-contents:not([collapse-below], [open]):not(:defined) {
|
|
393
|
+
max-block-size: 44px;
|
|
394
|
+
padding-block-start: 0;
|
|
395
|
+
overflow: hidden;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
@keyframes uvalib-contents-reveal {
|
|
399
|
+
to {
|
|
400
|
+
visibility: visible;
|
|
401
|
+
max-block-size: none;
|
|
402
|
+
overflow: visible;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
/* A dialog before <uvalib-dialog> upgrades: its children are the dialog's content, never
|
|
406
|
+
shown in the page, so nothing flashes or moves. Once defined, a closed dialog renders
|
|
407
|
+
nothing (its host is display: contents around a closed <dialog>). */
|
|
408
|
+
uvalib-dialog:not(:defined) {
|
|
409
|
+
display: none;
|
|
410
|
+
}
|
|
411
|
+
/* A citation before <uvalib-citation> upgrades: only the first format's citation, boxed
|
|
412
|
+
as it will be, with the label and 44px format bar held above it (none for hide-label)
|
|
413
|
+
and the 44px Copy citation row below, so nothing moves when it upgrades (an app's
|
|
414
|
+
citations property cannot be held). */
|
|
415
|
+
uvalib-citation:not(:defined) {
|
|
416
|
+
display: block;
|
|
417
|
+
font-size: 1rem;
|
|
418
|
+
line-height: 1.5;
|
|
419
|
+
}
|
|
420
|
+
uvalib-citation:not(:defined):has(> [data-format]) {
|
|
421
|
+
padding-block: calc(2rem + 44px + 0.75rem) calc(0.75rem + 44px);
|
|
422
|
+
}
|
|
423
|
+
uvalib-citation[hide-label]:not(:defined):has(> [data-format]) {
|
|
424
|
+
padding-block-start: calc(44px + 0.75rem);
|
|
425
|
+
}
|
|
426
|
+
uvalib-citation:not(:defined) > [data-format] {
|
|
427
|
+
margin: 0;
|
|
428
|
+
padding: 0.75rem 1rem;
|
|
429
|
+
border: 1px solid transparent;
|
|
430
|
+
overflow-wrap: anywhere;
|
|
431
|
+
text-wrap: pretty;
|
|
432
|
+
}
|
|
433
|
+
uvalib-citation:not(:defined) > [data-format] ~ [data-format],
|
|
434
|
+
uvalib-citation:not(:defined) > [slot] {
|
|
435
|
+
display: none;
|
|
436
|
+
}
|
|
326
437
|
/* Printing a <site-page> (issue #20; its own styles leave out the chrome): a dark scheme
|
|
327
438
|
prints light (the role tokens resolve to their light values), and the content's links
|
|
328
439
|
are black and underlined, so they are told apart without colour. Content is <main> in
|
|
@@ -379,6 +490,8 @@ uvalib-metadata:not(:defined) > dl > dd[data-limit="12"] > :is(ul, ol):has(> li:
|
|
|
379
490
|
--uva-color-link: light-dark(var(--uva-brand-blue, #232d4b), #87b9d9);
|
|
380
491
|
--uva-color-highlight: light-dark(var(--uva-brand-orange-200, #ffc999), #854200);
|
|
381
492
|
--uva-color-on-highlight: light-dark(var(--uva-grey-darkest, #2b2b2b), #ffffff);
|
|
493
|
+
--uva-color-table-border: light-dark(var(--uva-grey-100, #dadada), #4f5a7a);
|
|
494
|
+
--uva-color-table-stripe: light-dark(var(--uva-grey-200, #f1f1f1), #1a2340);
|
|
382
495
|
}
|
|
383
496
|
:root[data-uva-color-scheme='system'] {
|
|
384
497
|
color-scheme: light dark;
|
|
@@ -947,9 +1060,194 @@ uvalib-metadata:not(:defined) > dl > dd[data-limit="12"] > :is(ul, ol):has(> li:
|
|
|
947
1060
|
}
|
|
948
1061
|
|
|
949
1062
|
|
|
1063
|
+
.uvalib-table {
|
|
1064
|
+
inline-size: 100%;
|
|
1065
|
+
margin-block: 0 1rem;
|
|
1066
|
+
border-collapse: collapse;
|
|
1067
|
+
border-spacing: 0;
|
|
1068
|
+
color: inherit;
|
|
1069
|
+
}
|
|
1070
|
+
.uvalib-table > caption {
|
|
1071
|
+
caption-side: top;
|
|
1072
|
+
padding-block: 0 0.5rem;
|
|
1073
|
+
font-size: 1.125rem;
|
|
1074
|
+
font-weight: 700;
|
|
1075
|
+
line-height: 1.3;
|
|
1076
|
+
text-align: start;
|
|
1077
|
+
}
|
|
1078
|
+
.uvalib-table > :is(thead, tbody, tfoot) > tr > :is(th, td) {
|
|
1079
|
+
padding: 0.5rem;
|
|
1080
|
+
border-block-end: 1px solid var(--uva-color-table-border, var(--uva-grey-100, #dadada));
|
|
1081
|
+
text-align: start;
|
|
1082
|
+
vertical-align: top;
|
|
1083
|
+
overflow-wrap: anywhere;
|
|
1084
|
+
}
|
|
1085
|
+
.uvalib-table > :is(thead, tbody, tfoot) > tr > :is(th, td):first-child {
|
|
1086
|
+
padding-inline-start: 1rem;
|
|
1087
|
+
}
|
|
1088
|
+
.uvalib-table th {
|
|
1089
|
+
font-weight: 700;
|
|
1090
|
+
}
|
|
1091
|
+
.uvalib-table > thead > tr > :is(th, td) {
|
|
1092
|
+
border-block-end-width: 2px;
|
|
1093
|
+
vertical-align: bottom;
|
|
1094
|
+
}
|
|
1095
|
+
.uvalib-table--striped > tbody > tr:nth-child(even) {
|
|
1096
|
+
background-color: var(--uva-color-table-stripe, var(--uva-grey-200, #f1f1f1));
|
|
1097
|
+
}
|
|
1098
|
+
.uvalib-table.uvalib-table--compact > :is(thead, tbody, tfoot) > tr > :is(th, td) {
|
|
1099
|
+
padding: 0.25rem 0.5rem;
|
|
1100
|
+
}
|
|
1101
|
+
.uvalib-table.uvalib-table--compact > :is(thead, tbody, tfoot) > tr > :is(th, td):first-child {
|
|
1102
|
+
padding-inline-start: 0.5rem;
|
|
1103
|
+
}
|
|
1104
|
+
/* Numbers: right-aligned (end), with digits of equal width so columns line up. */
|
|
1105
|
+
.uvalib-table .uvalib-table__num {
|
|
1106
|
+
text-align: end;
|
|
1107
|
+
font-variant-numeric: tabular-nums;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
/* A wide table scrolls inside its wrapper (role="region", tabindex="0", aria-labelledby the
|
|
1111
|
+
caption's id), never the page. */
|
|
1112
|
+
.uvalib-table-scroll {
|
|
1113
|
+
display: block;
|
|
1114
|
+
max-inline-size: 100%;
|
|
1115
|
+
margin-block: 0 1rem;
|
|
1116
|
+
overflow-x: auto;
|
|
1117
|
+
overscroll-behavior-inline: contain;
|
|
1118
|
+
}
|
|
1119
|
+
.uvalib-table-scroll:focus-visible {
|
|
1120
|
+
outline: 3px solid var(--uva-color-focus, var(--uva-brand-orange, #e57200));
|
|
1121
|
+
outline-offset: 2px;
|
|
1122
|
+
}
|
|
1123
|
+
.uvalib-table-scroll > .uvalib-table {
|
|
1124
|
+
margin-block-end: 0;
|
|
1125
|
+
}
|
|
1126
|
+
.uvalib-table-scroll > .uvalib-table > :is(thead, tbody, tfoot) > tr > :is(th, td) {
|
|
1127
|
+
overflow-wrap: break-word;
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
/* Stacked rows on a narrow wrapper (opt-in; add explicit ARIA roles, see above). */
|
|
1131
|
+
.uvalib-table-stack {
|
|
1132
|
+
container: uvalib-table-stack / inline-size;
|
|
1133
|
+
margin-block: 0 1rem;
|
|
1134
|
+
}
|
|
1135
|
+
.uvalib-table-stack > .uvalib-table {
|
|
1136
|
+
margin-block-end: 0;
|
|
1137
|
+
}
|
|
1138
|
+
@container uvalib-table-stack (width <= 30em) {
|
|
1139
|
+
.uvalib-table-stack .uvalib-table--stack,
|
|
1140
|
+
.uvalib-table-stack .uvalib-table--stack > :is(tbody, tfoot),
|
|
1141
|
+
.uvalib-table-stack .uvalib-table--stack > :is(tbody, tfoot) > tr,
|
|
1142
|
+
.uvalib-table-stack .uvalib-table--stack > :is(tbody, tfoot) > tr > :is(th, td),
|
|
1143
|
+
.uvalib-table-stack .uvalib-table--stack > caption {
|
|
1144
|
+
display: block;
|
|
1145
|
+
}
|
|
1146
|
+
/* The column headers stay for assistive technology; each cell shows its own label. */
|
|
1147
|
+
.uvalib-table-stack .uvalib-table--stack > thead {
|
|
1148
|
+
position: absolute;
|
|
1149
|
+
inline-size: 1px;
|
|
1150
|
+
block-size: 1px;
|
|
1151
|
+
overflow: hidden;
|
|
1152
|
+
clip-path: inset(50%);
|
|
1153
|
+
white-space: nowrap;
|
|
1154
|
+
}
|
|
1155
|
+
.uvalib-table-stack .uvalib-table--stack > :is(tbody, tfoot) > tr {
|
|
1156
|
+
padding-block: 0.5rem;
|
|
1157
|
+
border-block-end: 1px solid var(--uva-color-table-border, var(--uva-grey-100, #dadada));
|
|
1158
|
+
}
|
|
1159
|
+
.uvalib-table-stack .uvalib-table--stack > :is(tbody, tfoot) > tr > :is(th, td) {
|
|
1160
|
+
padding: 0.25rem 1rem;
|
|
1161
|
+
border: 0;
|
|
1162
|
+
text-align: start;
|
|
1163
|
+
}
|
|
1164
|
+
.uvalib-table-stack .uvalib-table--stack > :is(tbody, tfoot) > tr > [data-label]::before {
|
|
1165
|
+
content: attr(data-label);
|
|
1166
|
+
/* The label repeats the column header, so it is not read twice. */
|
|
1167
|
+
content: attr(data-label) / '';
|
|
1168
|
+
display: block;
|
|
1169
|
+
font-weight: 700;
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
@media (forced-colors: active) {
|
|
1174
|
+
.uvalib-table > :is(thead, tbody, tfoot) > tr > :is(th, td),
|
|
1175
|
+
.uvalib-table-stack .uvalib-table--stack > :is(tbody, tfoot) > tr {
|
|
1176
|
+
border-color: CanvasText;
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
@media print {
|
|
1180
|
+
.uvalib-table > :is(thead, tbody, tfoot) > tr > :is(th, td),
|
|
1181
|
+
.uvalib-table-stack .uvalib-table--stack > :is(tbody, tfoot) > tr {
|
|
1182
|
+
border-color: #000000;
|
|
1183
|
+
}
|
|
1184
|
+
.uvalib-table--striped > tbody > tr:nth-child(even) {
|
|
1185
|
+
background-color: transparent;
|
|
1186
|
+
}
|
|
1187
|
+
.uvalib-table-scroll {
|
|
1188
|
+
overflow: visible;
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
|
|
1193
|
+
.uvalib-sidebar-layout {
|
|
1194
|
+
container: uvalib-sidebar-layout / inline-size;
|
|
1195
|
+
display: flex;
|
|
1196
|
+
flex-wrap: wrap;
|
|
1197
|
+
align-items: stretch;
|
|
1198
|
+
gap: var(--uvalib-sidebar-stack-gap, 2rem) var(--uvalib-sidebar-gap, 3.5rem);
|
|
1199
|
+
}
|
|
1200
|
+
.uvalib-sidebar-layout > :is(.uvalib-sidebar-layout__sidebar, .uvalib-sidebar-layout__main) {
|
|
1201
|
+
flex: 1 1 100%;
|
|
1202
|
+
box-sizing: border-box;
|
|
1203
|
+
min-inline-size: 0;
|
|
1204
|
+
overflow-wrap: break-word;
|
|
1205
|
+
}
|
|
1206
|
+
@container uvalib-sidebar-layout (width >= 913px) {
|
|
1207
|
+
.uvalib-sidebar-layout > .uvalib-sidebar-layout__sidebar {
|
|
1208
|
+
flex: 0 0 var(--uvalib-sidebar-width, clamp(14rem, 25%, 20rem));
|
|
1209
|
+
}
|
|
1210
|
+
.uvalib-sidebar-layout > .uvalib-sidebar-layout__main {
|
|
1211
|
+
flex: 1 1 0;
|
|
1212
|
+
}
|
|
1213
|
+
.uvalib-sidebar-layout--sticky > .uvalib-sidebar-layout__sidebar {
|
|
1214
|
+
position: sticky;
|
|
1215
|
+
top: var(--uvalib-sidebar-sticky-top, 1rem);
|
|
1216
|
+
align-self: flex-start;
|
|
1217
|
+
max-block-size: calc(100dvh - 2 * var(--uvalib-sidebar-sticky-top, 1rem));
|
|
1218
|
+
overflow-y: auto;
|
|
1219
|
+
overscroll-behavior: contain;
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
@media print {
|
|
1223
|
+
.uvalib-sidebar-layout > :is(.uvalib-sidebar-layout__sidebar, .uvalib-sidebar-layout__main) {
|
|
1224
|
+
flex: 1 1 100%;
|
|
1225
|
+
position: static;
|
|
1226
|
+
max-block-size: none;
|
|
1227
|
+
overflow: visible;
|
|
1228
|
+
}
|
|
1229
|
+
.uvalib-sidebar-layout--print-hide-sidebar > .uvalib-sidebar-layout__sidebar {
|
|
1230
|
+
display: none;
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
|
|
950
1235
|
/* hidden hides every base.css class, though each sets display (see hidden.ts). */
|
|
951
|
-
:where(.uvalib-button, .uvalib-input, .uvalib-search-form, .uvalib-badge, .uvalib-media, .uvalib-media__badges, .uvalib-toolbar, .uvalib-toolbar__field, .uvalib-toolbar__group, .uvalib-toolbar__summary, .uvalib-empty-state, .uvalib-skeleton, .uvalib-skeleton-text, .uvalib-message, .uvalib-message__icon, .uvalib-result-list, .uvalib-result, .uvalib-result__title, .uvalib-result__meta, .uvalib-result__snippet, .uvalib-result__actions)[hidden],
|
|
952
|
-
:where(.uvalib-media > :is(img, video, picture))[hidden] {
|
|
1236
|
+
:where(.uvalib-button, .uvalib-input, .uvalib-search-form, .uvalib-badge, .uvalib-media, .uvalib-media__badges, .uvalib-toolbar, .uvalib-toolbar__field, .uvalib-toolbar__group, .uvalib-toolbar__summary, .uvalib-empty-state, .uvalib-skeleton, .uvalib-skeleton-text, .uvalib-message, .uvalib-message__icon, .uvalib-result-list, .uvalib-result, .uvalib-result__title, .uvalib-result__meta, .uvalib-result__snippet, .uvalib-result__actions, .uvalib-table, .uvalib-table-scroll, .uvalib-table-stack, .uvalib-sidebar-layout, .uvalib-help)[hidden],
|
|
1237
|
+
:where(.uvalib-media > :is(img, video, picture), .uvalib-table--stack > :is(tbody, tfoot, caption), .uvalib-table--stack > :is(tbody, tfoot) > tr, .uvalib-table--stack > :is(tbody, tfoot) > tr > :is(th, td))[hidden] {
|
|
953
1238
|
display: none !important;
|
|
954
1239
|
}
|
|
955
1240
|
|
|
1241
|
+
|
|
1242
|
+
.uvalib-help {
|
|
1243
|
+
display: block;
|
|
1244
|
+
margin-block: 0.25rem 0;
|
|
1245
|
+
color: var(--uva-color-text-muted, #4b5563);
|
|
1246
|
+
font-size: 0.9375rem;
|
|
1247
|
+
line-height: 1.4;
|
|
1248
|
+
}
|
|
1249
|
+
.uvalib-required {
|
|
1250
|
+
color: var(--uva-color-text-muted, #4b5563);
|
|
1251
|
+
font-weight: 400;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
@@ -226,7 +226,9 @@ var a = e`
|
|
|
226
226
|
uvalib-combobox,
|
|
227
227
|
uvalib-image-regions,
|
|
228
228
|
uvalib-map,
|
|
229
|
-
uvalib-filter-drawer
|
|
229
|
+
uvalib-filter-drawer,
|
|
230
|
+
uvalib-filter,
|
|
231
|
+
uvalib-list-filter
|
|
230
232
|
):not(:defined)[hidden],
|
|
231
233
|
:where(uvalib-combobox, uvalib-image-regions):not(:defined) > [hidden] {
|
|
232
234
|
display: none;
|
|
@@ -325,6 +327,25 @@ var a = e`
|
|
|
325
327
|
font: inherit;
|
|
326
328
|
line-height: 1.2;
|
|
327
329
|
}
|
|
330
|
+
/* A list filter draws its label, a 44px field and a one-line count from attributes: hold
|
|
331
|
+
their height (less the label with hide-label, less the count with results-count), so the
|
|
332
|
+
list below does not move when it upgrades. The list itself is the page's and stays
|
|
333
|
+
fully shown until then. */
|
|
334
|
+
uvalib-list-filter:not(:defined) {
|
|
335
|
+
display: block;
|
|
336
|
+
font-size: 1rem;
|
|
337
|
+
line-height: 1.5;
|
|
338
|
+
min-block-size: calc(1.5em + 0.25rem + 44px + 0.25rem + 1.5em);
|
|
339
|
+
}
|
|
340
|
+
uvalib-list-filter[hide-label]:not(:defined) {
|
|
341
|
+
min-block-size: calc(44px + 0.25rem + 1.5em);
|
|
342
|
+
}
|
|
343
|
+
uvalib-list-filter[results-count]:not(:defined) {
|
|
344
|
+
min-block-size: calc(1.5em + 0.25rem + 44px);
|
|
345
|
+
}
|
|
346
|
+
uvalib-list-filter[hide-label][results-count]:not(:defined) {
|
|
347
|
+
min-block-size: 44px;
|
|
348
|
+
}
|
|
328
349
|
/* Image regions: the image at its own width and the list beside it (or under it), the
|
|
329
350
|
layout the element keeps once it upgrades, so the image does not move. */
|
|
330
351
|
uvalib-image-regions:not(:defined) {
|
|
@@ -358,6 +379,13 @@ var a = e`
|
|
|
358
379
|
line-height: 1.5;
|
|
359
380
|
color: var(--uva-color-text-muted, #4b5563);
|
|
360
381
|
}
|
|
382
|
+
/* A collapsed filter group (<uvalib-filter collapsible collapsed>) draws only its 44px
|
|
383
|
+
legend button once it upgrades: hold that height. Low specificity, so the [hidden] rule
|
|
384
|
+
above still wins. */
|
|
385
|
+
:where(uvalib-filter[collapsible][collapsed]):not(:defined) {
|
|
386
|
+
display: block;
|
|
387
|
+
min-block-size: 44px;
|
|
388
|
+
}
|
|
361
389
|
/* A filter drawer on a phone (the default 48rem breakpoint): once it upgrades only its 44px
|
|
362
390
|
"Search and filters" button shows, so hold that height and keep the form and filters out
|
|
363
391
|
of sight meanwhile; nothing moves when it upgrades. A page with its own breakpoint adds the
|
|
@@ -372,6 +400,89 @@ var a = e`
|
|
|
372
400
|
display: none;
|
|
373
401
|
}
|
|
374
402
|
}
|
|
403
|
+
/* A contents list before <uvalib-contents> upgrades (a .uvalib-sidebar-layout sidebar): the
|
|
404
|
+
headline's line held above, the links already padded as it pads them (the rules drawn
|
|
405
|
+
transparent while hidden), so the list does not move. Narrow (the default 64rem
|
|
406
|
+
collapse-below, closed): only its 44px button shows once it upgrades, so hold that and
|
|
407
|
+
clip the list; the reveal releases it, so the list still shows if the script never loads.
|
|
408
|
+
The [hidden] rule above still wins (it alone sets display). */
|
|
409
|
+
uvalib-contents:not(:defined) {
|
|
410
|
+
padding-block-start: calc(1.125rem * 1.3 + 0.5rem);
|
|
411
|
+
animation-name: uvalib-contents-reveal;
|
|
412
|
+
}
|
|
413
|
+
:where(uvalib-contents):not(:defined) :is(ol, ul) {
|
|
414
|
+
margin: 0;
|
|
415
|
+
padding: 0;
|
|
416
|
+
list-style: none;
|
|
417
|
+
}
|
|
418
|
+
:where(uvalib-contents):not(:defined) > :is(ol, ul) {
|
|
419
|
+
border-block: 1px solid transparent;
|
|
420
|
+
}
|
|
421
|
+
:where(uvalib-contents):not(:defined) > :is(ol, ul) > li + li {
|
|
422
|
+
border-block-start: 1px solid transparent;
|
|
423
|
+
}
|
|
424
|
+
:where(uvalib-contents):not(:defined) li > a {
|
|
425
|
+
display: block;
|
|
426
|
+
padding: 0.5rem 0.75rem 0.5rem calc(0.75rem + 4px);
|
|
427
|
+
}
|
|
428
|
+
:where(uvalib-contents):not(:defined) li li > a {
|
|
429
|
+
padding-block: 0.25rem;
|
|
430
|
+
}
|
|
431
|
+
:where(uvalib-contents):not(:defined) li :is(ol, ul) {
|
|
432
|
+
padding-inline-start: 1rem;
|
|
433
|
+
border-inline-start: 2px solid transparent;
|
|
434
|
+
}
|
|
435
|
+
/* In light DOM (no-shadow-dom) a nested list is indented by a margin, with 0.5rem below. */
|
|
436
|
+
:where(uvalib-contents[no-shadow-dom]):not(:defined) li :is(ol, ul) {
|
|
437
|
+
margin: 0 0 0.5rem 0.75rem;
|
|
438
|
+
padding-inline-start: 0;
|
|
439
|
+
}
|
|
440
|
+
@media (max-width: 64rem) {
|
|
441
|
+
uvalib-contents:not([collapse-below], [open]):not(:defined) {
|
|
442
|
+
max-block-size: 44px;
|
|
443
|
+
padding-block-start: 0;
|
|
444
|
+
overflow: hidden;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
@keyframes uvalib-contents-reveal {
|
|
448
|
+
to {
|
|
449
|
+
visibility: visible;
|
|
450
|
+
max-block-size: none;
|
|
451
|
+
overflow: visible;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
/* A dialog before <uvalib-dialog> upgrades: its children are the dialog's content, never
|
|
455
|
+
shown in the page, so nothing flashes or moves. Once defined, a closed dialog renders
|
|
456
|
+
nothing (its host is display: contents around a closed <dialog>). */
|
|
457
|
+
uvalib-dialog:not(:defined) {
|
|
458
|
+
display: none;
|
|
459
|
+
}
|
|
460
|
+
/* A citation before <uvalib-citation> upgrades: only the first format's citation, boxed
|
|
461
|
+
as it will be, with the label and 44px format bar held above it (none for hide-label)
|
|
462
|
+
and the 44px Copy citation row below, so nothing moves when it upgrades (an app's
|
|
463
|
+
citations property cannot be held). */
|
|
464
|
+
uvalib-citation:not(:defined) {
|
|
465
|
+
display: block;
|
|
466
|
+
font-size: 1rem;
|
|
467
|
+
line-height: 1.5;
|
|
468
|
+
}
|
|
469
|
+
uvalib-citation:not(:defined):has(> [data-format]) {
|
|
470
|
+
padding-block: calc(2rem + 44px + 0.75rem) calc(0.75rem + 44px);
|
|
471
|
+
}
|
|
472
|
+
uvalib-citation[hide-label]:not(:defined):has(> [data-format]) {
|
|
473
|
+
padding-block-start: calc(44px + 0.75rem);
|
|
474
|
+
}
|
|
475
|
+
uvalib-citation:not(:defined) > [data-format] {
|
|
476
|
+
margin: 0;
|
|
477
|
+
padding: 0.75rem 1rem;
|
|
478
|
+
border: 1px solid transparent;
|
|
479
|
+
overflow-wrap: anywhere;
|
|
480
|
+
text-wrap: pretty;
|
|
481
|
+
}
|
|
482
|
+
uvalib-citation:not(:defined) > [data-format] ~ [data-format],
|
|
483
|
+
uvalib-citation:not(:defined) > [slot] {
|
|
484
|
+
display: none;
|
|
485
|
+
}
|
|
375
486
|
/* Printing a <site-page> (issue #20; its own styles leave out the chrome): a dark scheme
|
|
376
487
|
prints light (the role tokens resolve to their light values), and the content's links
|
|
377
488
|
are black and underlined, so they are told apart without colour. Content is <main> in
|
|
@@ -400,4 +511,4 @@ var a = e`
|
|
|
400
511
|
`;
|
|
401
512
|
export { i as a, n as i, l as n, a as r, c as t };
|
|
402
513
|
|
|
403
|
-
//# sourceMappingURL=base-
|
|
514
|
+
//# sourceMappingURL=base-DXkGlSgH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-DXkGlSgH.js","names":["unsafeCSS","i","r","fontFallback","FACES","loadFontFallback","fonts","doc","face","tokens","METADATA_LIMITS","metadataLimits","lists","n","l","TYPEKIT_URL","base"],"sources":["../../src/styles/font-fallback.ts","../../src/styles/tokens.ts","../../src/styles/base.ts"],"sourcesContent":["import { css } from 'lit';\n\n/**\n * A metric-matched fallback for Franklin Gothic URW (issue #32). The Adobe Fonts kit uses\n * `font-display: auto`, so on a slow connection text is drawn in the next font of\n * `--uva-font-family` and redrawn when the kit's files arrive. Plain Arial is wider than\n * Franklin Gothic (by 6% regular, 9% bold), so paragraphs rewrapped and the page moved\n * (layout shift). \"UVA Franklin Fallback\" is the system's Arial scaled to Franklin Gothic's\n * average widths, with its ascent and descent, for each face the kit serves (400, 500, 700 and\n * 400 italic; a 600 rule gets the 700 face, as the kit's own matching does). Measured against\n * the kit in Chromium: the fallback wraps a paragraph like Franklin Gothic in about 99% of\n * widths from 260 to 700px at 16 to 20px, against 55 to 82% for plain Arial.\n *\n * `size-adjust` scales Arial's glyphs; the overrides are Franklin Gothic's ascent (0.95 em) and\n * descent (0.25 em) divided by that scale, with no line gap, so a line is as tall in both.\n * Liberation Sans (Linux) has Arial's metrics. Where neither is installed (Android has Roboto),\n * the face is skipped and the next font in the stack is used, as before.\n */\nexport const fontFallback = css`\n @font-face {\n font-family: 'UVA Franklin Fallback';\n src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans');\n font-weight: 100 450;\n font-style: normal;\n size-adjust: 94.52%;\n ascent-override: 100.93%;\n descent-override: 26.56%;\n line-gap-override: 0%;\n }\n @font-face {\n font-family: 'UVA Franklin Fallback';\n src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans');\n font-weight: 451 599;\n font-style: normal;\n size-adjust: 95.99%;\n ascent-override: 99.18%;\n descent-override: 26.04%;\n line-gap-override: 0%;\n }\n @font-face {\n font-family: 'UVA Franklin Fallback';\n src:\n local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'),\n local('LiberationSans-Bold');\n font-weight: 600 1000;\n font-style: normal;\n size-adjust: 91.32%;\n ascent-override: 104.03%;\n descent-override: 27.38%;\n line-gap-override: 0%;\n }\n @font-face {\n font-family: 'UVA Franklin Fallback';\n src:\n local('Arial Italic'), local('Arial-ItalicMT'), local('Liberation Sans Italic'),\n local('LiberationSans-Italic');\n font-weight: 100 599;\n font-style: italic;\n size-adjust: 95.06%;\n ascent-override: 101.09%;\n descent-override: 26.4%;\n line-gap-override: 0%;\n }\n`;\n\n/** One font per fallback face, so each one is asked for. */\nconst FACES = ['400', '500', '700', 'italic 400'];\n\n/**\n * Load every fallback face now (issue #35). A face from a local() font loads only when text\n * first needs it, so the first italic (or medium) text could be drawn in unscaled Arial and\n * redrawn a moment later. Called once the faces are installed; failures (no Arial or\n * Liberation Sans on the system) are left to the next font in the stack, as before.\n */\nexport function loadFontFallback(doc: Document): void {\n const fonts = doc.fonts;\n if (!fonts?.load) return;\n for (const face of FACES) fonts.load(`${face} 1em \"UVA Franklin Fallback\"`).catch(() => {});\n}\n","// GENERATED by scripts/sync-tokens.mjs from ../monorepo/packages/drupal_library_theme/src/scss/base — do not edit\nimport { css } from 'lit';\n\nexport const tokens = css`\n :root {\n --uva-brand-blue-lightest: #87B9D9;\n --uva-brand-blue-lighter: #3395D4;\n --uva-brand-blue-light: #0370B7;\n --uva-brand-blue-base: #232D4B;\n --uva-brand-blue-300: #87B9D9;\n --uva-brand-blue-200: #3395D4;\n --uva-brand-blue-100: #0370B7;\n --uva-brand-blue: #232D4B;\n --uva-brand-orange-lightest: #FFEAD6;\n --uva-brand-orange-lighter: #FFC999;\n --uva-brand-orange-light: #FFB370;\n --uva-brand-orange-base: #E57200;\n --uva-brand-orange-dark: #B35900;\n --uva-brand-orange-darker: #854200;\n --uva-brand-orange-300: #FFEAD6;\n --uva-brand-orange-200: #FFC999;\n --uva-brand-orange-100: #FFB370;\n --uva-brand-orange: #E57200;\n --uva-brand-orange-A: #B35900;\n --uva-brand-orange-B: #854200;\n --uva-blue-alt-lightest: #BFE7F7;\n --uva-blue-alt-lighter: #91D8F2;\n --uva-blue-alt-light: #55C4EC;\n --uva-blue-alt-base: #007BAC;\n --uva-blue-alt-dark: #005679;\n --uva-blue-alt-darkest: #141E3C;\n --uva-blue-alt-400: #e6f2f7;\n --uva-blue-alt-300: #BFE7F7;\n --uva-blue-alt-200: #91D8F2;\n --uva-blue-alt-100: #55C4EC;\n --uva-blue-alt: #007BAC;\n --uva-blue-alt-A: #005679;\n --uva-blue-alt-B: #141E3C;\n --uva-teal-lightest: #C8F2F4;\n --uva-teal-light: #5BD7DE;\n --uva-teal-base: #25CAD3;\n --uva-teal-dark: #1DA1A8;\n --uva-teal-darker: #16777C;\n --uva-teal-200: #C8F2F4;\n --uva-teal-100: #5BD7DE;\n --uva-teal: #25CAD3;\n --uva-teal-A: #1DA1A8;\n --uva-teal-B: #16777C;\n --uva-green-lightest: #DDEFDC;\n --uva-green-lighter: #89CC74;\n --uva-green-base: #62BB46;\n --uva-green-dark: #4E9737;\n --uva-green-200: #DDEFDC;\n --uva-green-100: #89CC74;\n --uva-green: #62BB46;\n --uva-green-A: #4E9737;\n --uva-red-lightest: #FBCFDA;\n --uva-red-base: #EF3F6B;\n --uva-red-dark: #DF1E43;\n --uva-red-darker: #B30000;\n --uva-red-100: #FBCFDA;\n --uva-red: #EF3F6B;\n --uva-red-A: #DF1E43;\n --uva-red-B: #B30000;\n --uva-yellow-lightest: #FEF6C8;\n --uva-yellow-base: #ECC602;\n --uva-yellow-dark: #B99C02;\n --uva-yellow-100: #FEF6C8;\n --uva-yellow: #ECC602;\n --uva-yellow-A: #B99C02;\n --uva-grey-lightest: #F1F1F1;\n --uva-grey-light: #DADADA;\n --uva-grey-base: #808080;\n --uva-grey-dark: #4F4F4F;\n --uva-grey-darkest: #2B2B2B;\n --uva-grey-200: #F1F1F1;\n --uva-grey-100: #DADADA;\n --uva-grey-50: #ADADAD;\n --uva-grey: #808080;\n --uva-grey-A: #4F4F4F;\n --uva-grey-B: #2B2B2B;\n --uva-font-family: franklin-gothic-urw, \"UVA Franklin Fallback\", Arial, Helvetica, sans-serif;\n --uva-font-size-base: 17px;\n }\n`;\n","import { css, unsafeCSS } from 'lit';\n\n/**\n * `<uvalib-metadata>` long lists before it upgrades (issue #34): a list of more than N values\n * shows its first N and a line for its \"Show all\" button (4px above a 32px button), as the\n * upgraded element does. CSS cannot read N from the attribute into :nth-child(), so the rules\n * are written out for limits 1 to 12; a page with a larger limit adds its own (README). A row's\n * own data-limit on its <dd> wins over list-limit (data-limit=\"0\" shows them all); a data-limit\n * on the list itself works once upgraded but is not held before.\n */\nconst METADATA_LIMITS = Array.from({ length: 12 }, (_, i) => i + 1);\nconst metadataLimits = unsafeCSS(\n METADATA_LIMITS.map((n) => {\n const lists = [\n `uvalib-metadata[list-limit=\"${n}\"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit])`,\n `uvalib-metadata:not(:defined) > dl > dd[data-limit=\"${n}\"] > :is(ul, ol)`,\n ];\n return (\n `${lists.map((l) => `${l} > li:nth-child(n + ${n + 1})`).join(',\\n')} { display: none; }\\n` +\n `${lists.map((l) => `${l}:has(> li:nth-child(${n + 1}))::after`).join(',\\n')} { content: ''; display: block; block-size: 2.25rem; }`\n );\n }).join('\\n'),\n);\n\nexport const TYPEKIT_URL = 'https://use.typekit.net/oym8nvz.css';\n\n// The body background has no fallback: without dark mode it stays transparent, as before.\n//\n// site-page:not(:defined) applies when base.css is linked in <head>, before the element\n// upgrades: its own formatting context (flow-root), so a heading's top margin cannot collapse\n// through to <body> and shift the page once the element upgrades, and invisible, so its\n// content does not paint above where the header will go. If the script never loads, the\n// content appears anyway after two seconds.\nexport const base = css`\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n html,\n body {\n font-family: var(\n --uva-font-family,\n franklin-gothic-urw,\n 'UVA Franklin Fallback',\n Arial,\n Helvetica,\n sans-serif\n );\n }\n html {\n font-size: var(--uva-font-size-base, 17px);\n }\n body {\n margin: 0;\n line-height: 1.5;\n min-height: 100vh;\n color: var(--uva-color-text, var(--uva-grey-darkest, #2b2b2b));\n background-color: var(--uva-color-surface);\n }\n site-page:not(:defined) {\n display: flow-root;\n visibility: hidden;\n animation: uvalib-site-page-reveal 0s 2s forwards;\n }\n uvalib-breadcrumbs:not(:defined),\n uvalib-card:not(:defined),\n uvalib-card-grid:not(:defined),\n uvalib-pager:not(:defined),\n uvalib-contents:not(:defined),\n uvalib-metadata:not(:defined),\n uvalib-tag-list:not(:defined) {\n display: block;\n line-height: 1.5;\n visibility: hidden;\n animation: uvalib-site-page-reveal 0s 2s forwards;\n }\n /* A chip row: hidden, one 44px row tall (with the scrolling row's padding), the raw\n children kept on one line so they cannot make it taller. */\n uvalib-chip-group:not(:defined) {\n display: block;\n min-height: 44px;\n max-width: 100%;\n overflow: hidden;\n white-space: nowrap;\n visibility: hidden;\n animation: uvalib-site-page-reveal 0s 2s forwards;\n }\n uvalib-chip-group[scroll]:not(:defined) {\n min-height: calc(44px + 0.75rem);\n }\n /* A description: one line of it (0.875rem at 1.5, 0.25rem below the row). */\n uvalib-chip-group[description]:not(:defined) {\n padding-block-end: 1.5625rem;\n }\n /* Its text is drawn from attributes: hold one line until it upgrades. */\n uvalib-results-count:not(:defined) {\n display: block;\n min-block-size: 1.5em;\n }\n uvalib-tag-list:not(:defined)[hidden],\n uvalib-results-count:not(:defined)[hidden] {\n display: none;\n }\n /* The pre-upgrade rules here set display, which beats the hidden attribute's (issue #7).\n More specific than each of them (two pseudo-classes or attributes), so it needs no importance flag. */\n :where(\n site-page,\n uvalib-breadcrumbs,\n uvalib-card,\n uvalib-card-grid,\n uvalib-pager,\n uvalib-contents,\n uvalib-metadata,\n uvalib-chip-group,\n uvalib-tabs,\n uvalib-combobox,\n uvalib-image-regions,\n uvalib-map,\n uvalib-filter-drawer,\n uvalib-filter,\n uvalib-list-filter\n ):not(:defined)[hidden],\n :where(uvalib-combobox, uvalib-image-regions):not(:defined) > [hidden] {\n display: none;\n }\n /* A record's details before <uvalib-metadata> upgrades (issue #34): the rows already laid\n out as it lays them out (label beside value from 36rem of its own width, stacked below;\n 8px above and below each row, a 1px rule between rows; lists without bullets, 4px apart),\n so the page does not move when it upgrades. Rows the attributes add (creator, rights,\n citation) are not in the page's <dl> and cannot be held. */\n uvalib-metadata:not(:defined) {\n container-type: inline-size;\n font-size: 1rem;\n }\n uvalib-metadata:not(:defined) > dl {\n display: grid;\n grid-template-columns: minmax(7rem, 12rem) minmax(0, 1fr);\n column-gap: 1.5rem;\n margin: 0;\n }\n uvalib-metadata:not(:defined) > dl > dt {\n grid-column: 1;\n margin: 0;\n padding-block: 0.5rem;\n font-weight: 700;\n }\n uvalib-metadata:not(:defined) > dl > dd {\n grid-column: 2;\n margin: 0;\n padding-block: 0.5rem;\n }\n uvalib-metadata:not(:defined) > dl > dt:not(:first-child),\n uvalib-metadata:not(:defined) > dl > dt:not(:first-child) + dd {\n border-block-start: 1px solid transparent;\n }\n uvalib-metadata:not(:defined) > dl > dd > :is(ul, ol) {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n uvalib-metadata:not(:defined) > dl > dd li + li {\n margin-block-start: 0.25rem;\n }\n @container (width < 36rem) {\n uvalib-metadata:not(:defined) > dl {\n grid-template-columns: minmax(0, 1fr);\n }\n uvalib-metadata:not(:defined) > dl > :is(dt, dd) {\n grid-column: 1;\n }\n uvalib-metadata:not(:defined) > dl > dt {\n padding-block-end: 0;\n }\n uvalib-metadata:not(:defined) > dl > dd {\n padding-block-start: 0;\n }\n uvalib-metadata:not(:defined) > dl > dt:not(:first-child) + dd {\n border-block-start: 0;\n }\n }\n ${metadataLimits}\n /* Tabs stay readable before the script runs: a block, one panel, and a gap the\n size of the tab row (44px) plus its 1rem margin, so the first panel does not\n jump when the element upgrades. Later data-tab panels stay hidden. */\n uvalib-tabs:not(:defined) {\n display: block;\n padding-block-start: calc(44px + 1rem);\n }\n uvalib-tabs:not(:defined) > [data-tab] ~ [data-tab] {\n display: none;\n }\n /* A combobox: its label (from the attribute) and one 44px field (plus a one-line\n description) held, so nothing moves when it upgrades. A fallback <input list> child\n works meanwhile; the other children (options, a datalist) stay out of sight. */\n uvalib-combobox:not(:defined) {\n display: block;\n min-block-size: calc(1.5em + 0.25rem + 44px);\n line-height: 1.5;\n }\n uvalib-combobox[description]:not(:defined) {\n min-block-size: calc(3em + 0.5rem + 44px);\n }\n uvalib-combobox:not(:defined)::before {\n content: attr(label);\n display: block;\n margin-block-end: 0.25rem;\n font-weight: 600;\n }\n uvalib-combobox:not(:defined) > :not(input) {\n display: none;\n }\n uvalib-combobox:not(:defined) > input {\n display: block;\n box-sizing: border-box;\n inline-size: 100%;\n min-block-size: 44px;\n font: inherit;\n line-height: 1.2;\n }\n /* A list filter draws its label, a 44px field and a one-line count from attributes: hold\n their height (less the label with hide-label, less the count with results-count), so the\n list below does not move when it upgrades. The list itself is the page's and stays\n fully shown until then. */\n uvalib-list-filter:not(:defined) {\n display: block;\n font-size: 1rem;\n line-height: 1.5;\n min-block-size: calc(1.5em + 0.25rem + 44px + 0.25rem + 1.5em);\n }\n uvalib-list-filter[hide-label]:not(:defined) {\n min-block-size: calc(44px + 0.25rem + 1.5em);\n }\n uvalib-list-filter[results-count]:not(:defined) {\n min-block-size: calc(1.5em + 0.25rem + 44px);\n }\n uvalib-list-filter[hide-label][results-count]:not(:defined) {\n min-block-size: 44px;\n }\n /* Image regions: the image at its own width and the list beside it (or under it), the\n layout the element keeps once it upgrades, so the image does not move. */\n uvalib-image-regions:not(:defined) {\n display: flex;\n flex-wrap: wrap;\n gap: 1rem;\n align-items: flex-start;\n }\n uvalib-image-regions:not(:defined) > :is(img, picture) {\n display: block;\n flex: 0 1 auto;\n min-width: 0;\n max-width: 100%;\n height: auto;\n }\n uvalib-image-regions:not(:defined) > :is(ol, ul) {\n flex: 1 1 14rem;\n min-width: 0;\n }\n /* A map: its key instructions (the same text it shows) and the map's height held above\n the child list, so the list does not move when the map is drawn over the page's\n Leaflet. Padding, not margin, so it cannot collapse with the list's own top margin. */\n uvalib-map:not(:defined) {\n display: block;\n }\n uvalib-map:not(:defined)::before {\n content: 'Tab or arrow keys move between places; Enter opens one. With the map focused, arrow keys pan and + and − zoom.';\n display: block;\n padding-block-end: calc(0.5rem + max(12rem, var(--uvalib-map-height, min(24rem, 75vw))));\n font-size: 0.875rem;\n line-height: 1.5;\n color: var(--uva-color-text-muted, #4b5563);\n }\n /* A collapsed filter group (<uvalib-filter collapsible collapsed>) draws only its 44px\n legend button once it upgrades: hold that height. Low specificity, so the [hidden] rule\n above still wins. */\n :where(uvalib-filter[collapsible][collapsed]):not(:defined) {\n display: block;\n min-block-size: 44px;\n }\n /* A filter drawer on a phone (the default 48rem breakpoint): once it upgrades only its 44px\n \"Search and filters\" button shows, so hold that height and keep the form and filters out\n of sight meanwhile; nothing moves when it upgrades. A page with its own breakpoint adds the\n same two rules in a media query of that width (see the README). Low specificity, so the\n [hidden] rule above still wins. */\n @media (max-width: 48rem) {\n :where(uvalib-filter-drawer:not([breakpoint])):not(:defined) {\n display: block;\n min-block-size: 44px;\n }\n :where(uvalib-filter-drawer:not([breakpoint])):not(:defined) > * {\n display: none;\n }\n }\n /* A contents list before <uvalib-contents> upgrades (a .uvalib-sidebar-layout sidebar): the\n headline's line held above, the links already padded as it pads them (the rules drawn\n transparent while hidden), so the list does not move. Narrow (the default 64rem\n collapse-below, closed): only its 44px button shows once it upgrades, so hold that and\n clip the list; the reveal releases it, so the list still shows if the script never loads.\n The [hidden] rule above still wins (it alone sets display). */\n uvalib-contents:not(:defined) {\n padding-block-start: calc(1.125rem * 1.3 + 0.5rem);\n animation-name: uvalib-contents-reveal;\n }\n :where(uvalib-contents):not(:defined) :is(ol, ul) {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n :where(uvalib-contents):not(:defined) > :is(ol, ul) {\n border-block: 1px solid transparent;\n }\n :where(uvalib-contents):not(:defined) > :is(ol, ul) > li + li {\n border-block-start: 1px solid transparent;\n }\n :where(uvalib-contents):not(:defined) li > a {\n display: block;\n padding: 0.5rem 0.75rem 0.5rem calc(0.75rem + 4px);\n }\n :where(uvalib-contents):not(:defined) li li > a {\n padding-block: 0.25rem;\n }\n :where(uvalib-contents):not(:defined) li :is(ol, ul) {\n padding-inline-start: 1rem;\n border-inline-start: 2px solid transparent;\n }\n /* In light DOM (no-shadow-dom) a nested list is indented by a margin, with 0.5rem below. */\n :where(uvalib-contents[no-shadow-dom]):not(:defined) li :is(ol, ul) {\n margin: 0 0 0.5rem 0.75rem;\n padding-inline-start: 0;\n }\n @media (max-width: 64rem) {\n uvalib-contents:not([collapse-below], [open]):not(:defined) {\n max-block-size: 44px;\n padding-block-start: 0;\n overflow: hidden;\n }\n }\n @keyframes uvalib-contents-reveal {\n to {\n visibility: visible;\n max-block-size: none;\n overflow: visible;\n }\n }\n /* A dialog before <uvalib-dialog> upgrades: its children are the dialog's content, never\n shown in the page, so nothing flashes or moves. Once defined, a closed dialog renders\n nothing (its host is display: contents around a closed <dialog>). */\n uvalib-dialog:not(:defined) {\n display: none;\n }\n /* A citation before <uvalib-citation> upgrades: only the first format's citation, boxed\n as it will be, with the label and 44px format bar held above it (none for hide-label)\n and the 44px Copy citation row below, so nothing moves when it upgrades (an app's\n citations property cannot be held). */\n uvalib-citation:not(:defined) {\n display: block;\n font-size: 1rem;\n line-height: 1.5;\n }\n uvalib-citation:not(:defined):has(> [data-format]) {\n padding-block: calc(2rem + 44px + 0.75rem) calc(0.75rem + 44px);\n }\n uvalib-citation[hide-label]:not(:defined):has(> [data-format]) {\n padding-block-start: calc(44px + 0.75rem);\n }\n uvalib-citation:not(:defined) > [data-format] {\n margin: 0;\n padding: 0.75rem 1rem;\n border: 1px solid transparent;\n overflow-wrap: anywhere;\n text-wrap: pretty;\n }\n uvalib-citation:not(:defined) > [data-format] ~ [data-format],\n uvalib-citation:not(:defined) > [slot] {\n display: none;\n }\n /* Printing a <site-page> (issue #20; its own styles leave out the chrome): a dark scheme\n prints light (the role tokens resolve to their light values), and the content's links\n are black and underlined, so they are told apart without colour. Content is <main> in\n light DOM and the unslotted children in shadow DOM. print-chrome keeps the page as it is\n shown, apart from the light scheme. */\n @media print {\n :root[data-uva-color-scheme]:has(site-page) {\n color-scheme: light;\n --uva-color-scheme: light;\n }\n /* Light DOM's trail, here too, as the pre-upgrade rule above (unlayered) would win. */\n site-page:not([print-chrome]) > [slot='breadcrumbs'] {\n display: none;\n }\n site-page:not([print-chrome]) > :not([slot], site-header, site-footer, .alerts-list) :any-link,\n site-page:not([print-chrome]) > :any-link:not([slot], .skip-link) {\n color: #000;\n text-decoration: underline;\n }\n }\n @keyframes uvalib-site-page-reveal {\n to {\n visibility: visible;\n }\n }\n`;\n"],"mappings":";;AAkBA,IAAaG,IAAe,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDzBC,IAAQ;CAAC;CAAO;CAAO;CAAO;AAAY;AAQhD,SAAgBC,EAAiB,GAAqB;CACpD,IAAMC,IAAQC,EAAI;CAClB,IAAKD,GAAO,MACZ,KAAK,IAAME,KAAQJ,GAAO,EAAM,KAAK,GAAGI,EAAK,6BAA6B,CAAC,CAAC,YAAY,CAAC,CAAC;AAC5F;;AC3EA,IAAaC,IAAS,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GCOnBC,IAAkB,MAAM,KAAK,EAAE,QAAQ,GAAG,IAAI,GAAG,MAAMT,IAAI,CAAC,GAC5DU,IAAiBX,EACrBU,EAAgB,KAAK,MAAM;CACzB,IAAME,IAAQ,CACZ,+BAA+BC,EAAE,+EACjC,uDAAuDA,EAAE,iBAC3D;CACA,OACE,GAAGD,EAAM,KAAK,MAAM,GAAGE,EAAE,sBAAsBD,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,EAAE,uBAClED,EAAM,KAAK,MAAM,GAAGE,EAAE,sBAAsBD,IAAI,EAAE,UAAU,CAAC,CAAC,KAAK,KAAK,EAAE;AAEjF,CAAC,CAAC,CAAC,KAAK,IAAI,CACd,GAEaE,IAAc,uCASdC,IAAO,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoJnBL,EAAe"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// src/base/clipboard.ts
|
|
2
|
+
async function e(e, t) {
|
|
3
|
+
let n = navigator.clipboard;
|
|
4
|
+
if (t && typeof ClipboardItem == "function" && typeof n?.write == "function") try {
|
|
5
|
+
await n.write([new ClipboardItem({
|
|
6
|
+
"text/plain": new Blob([e], { type: "text/plain" }),
|
|
7
|
+
"text/html": new Blob([t], { type: "text/html" })
|
|
8
|
+
})]);
|
|
9
|
+
return;
|
|
10
|
+
} catch {}
|
|
11
|
+
await n.writeText(e);
|
|
12
|
+
}
|
|
13
|
+
function t(e) {
|
|
14
|
+
e && e.ownerDocument?.getSelection()?.selectAllChildren(e);
|
|
15
|
+
}
|
|
16
|
+
export { t as n, e as t };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=clipboard-CNG7Y_5X.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clipboard-CNG7Y_5X.js","names":["copyText","clipboard","html","text","selectContents","node"],"sources":["../../src/base/clipboard.ts"],"sourcesContent":["/**\n * Copy `text` to the clipboard. With `html`, it is copied as both `text/html` and\n * `text/plain` (a `ClipboardItem`), so emphasis such as an italic title survives a paste into\n * a word processor, falling back to plain text where that is not supported or refused.\n * Rejects when nothing could be copied (no clipboard, or permission denied).\n */\nexport async function copyText(text: string, html?: string): Promise<void> {\n const clipboard = navigator.clipboard;\n if (html && typeof ClipboardItem === 'function' && typeof clipboard?.write === 'function') {\n try {\n await clipboard.write([\n new ClipboardItem({\n 'text/plain': new Blob([text], { type: 'text/plain' }),\n 'text/html': new Blob([html], { type: 'text/html' }),\n }),\n ]);\n return;\n } catch {\n // Some browsers refuse HTML: plain text below.\n }\n }\n await clipboard.writeText(text);\n}\n\n/** Select everything in `node`, so that the visitor can copy it with the keyboard. */\nexport function selectContents(node: Node | null | undefined): void {\n if (node) node.ownerDocument?.getSelection()?.selectAllChildren(node);\n}\n"],"mappings":";AAMA,eAAsBA,EAAS,GAAc,GAA8B;CACzE,IAAMC,IAAY,UAAU;CAC5B,IAAIC,KAAQ,OAAO,iBAAkB,cAAc,OAAOD,GAAW,SAAU,YAC7E,IAAI;EACF,MAAMA,EAAU,MAAM,CACpB,IAAI,cAAc;GAChB,cAAc,IAAI,KAAK,CAACE,CAAI,GAAG,EAAE,MAAM,aAAa,CAAC;GACrD,aAAa,IAAI,KAAK,CAACD,CAAI,GAAG,EAAE,MAAM,YAAY,CAAC;EACrD,CAAC,CACH,CAAC;EACD;CACF,QAAQ,CAER;CAEF,MAAMD,EAAU,UAAUE,CAAI;AAChC;AAGA,SAAgBC,EAAe,GAAqC;CAClE,AAAIC,KAAMA,EAAK,eAAe,aAAa,CAAC,EAAE,kBAAkBA,CAAI;AACtE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"if-defined-COiQb-gl.js","names":["t","A","o"],"sources":["../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directives/if-defined.js"],"sourcesContent":["import{nothing as t}from\"../lit-html.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o=o=>o??t;export{o as ifDefined};\n//# sourceMappingURL=if-defined.js.map\n"],"ignoreList":[0],"mappings":";;AAKG,IAAME,KAAE,MAAGA,KAAGF"}
|