@uvalib/web-components 1.2.0 → 1.3.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 +87 -0
- package/README.md +808 -46
- package/dist/analytics.d.ts +10 -0
- package/dist/analytics.js +9 -0
- package/dist/analytics.js.map +1 -0
- package/dist/base/UvalibElement.js +8 -5
- package/dist/base/UvalibElement.js.map +1 -1
- package/dist/base/analytics-state.d.ts +7 -0
- package/dist/base/analytics-state.js.map +1 -1
- package/dist/base/light-dom-styles.d.ts +13 -0
- package/dist/base/light-dom-styles.js +26 -0
- package/dist/base/light-dom-styles.js.map +1 -1
- package/dist/base/search-tracker.d.ts +57 -0
- package/dist/base/search-tracker.js +51 -0
- package/dist/base/search-tracker.js.map +1 -0
- package/dist/base.css +286 -14
- package/dist/base.d.ts +2 -0
- package/dist/base.js +1 -0
- package/dist/base.js.map +1 -1
- package/dist/components/site-analytics/SiteAnalytics.d.ts +20 -1
- package/dist/components/site-analytics/SiteAnalytics.js +93 -12
- package/dist/components/site-analytics/SiteAnalytics.js.map +1 -1
- package/dist/components/site-page/SitePage.d.ts +23 -0
- package/dist/components/site-page/SitePage.js +77 -0
- package/dist/components/site-page/SitePage.js.map +1 -1
- package/dist/components/uvalib-back-to-top/UvalibBackToTop.d.ts +58 -0
- package/dist/components/uvalib-back-to-top/UvalibBackToTop.js +250 -0
- package/dist/components/uvalib-back-to-top/UvalibBackToTop.js.map +1 -0
- package/dist/components/uvalib-back-to-top/uvalib-back-to-top.d.ts +1 -0
- package/dist/components/uvalib-back-to-top/uvalib-back-to-top.js +4 -0
- package/dist/components/uvalib-back-to-top/uvalib-back-to-top.js.map +1 -0
- package/dist/components/uvalib-breadcrumbs/UvalibBreadcrumbs.d.ts +14 -0
- package/dist/components/uvalib-breadcrumbs/UvalibBreadcrumbs.js +56 -4
- package/dist/components/uvalib-breadcrumbs/UvalibBreadcrumbs.js.map +1 -1
- package/dist/components/uvalib-chip-group/UvalibChipGroup.d.ts +25 -3
- package/dist/components/uvalib-chip-group/UvalibChipGroup.js +80 -10
- package/dist/components/uvalib-chip-group/UvalibChipGroup.js.map +1 -1
- package/dist/components/uvalib-combobox/UvalibCombobox.d.ts +212 -0
- package/dist/components/uvalib-combobox/UvalibCombobox.js +1088 -0
- package/dist/components/uvalib-combobox/UvalibCombobox.js.map +1 -0
- package/dist/components/uvalib-combobox/uvalib-combobox.d.ts +1 -0
- package/dist/components/uvalib-combobox/uvalib-combobox.js +4 -0
- package/dist/components/uvalib-combobox/uvalib-combobox.js.map +1 -0
- package/dist/components/uvalib-contents/UvalibContents.d.ts +53 -0
- package/dist/components/uvalib-contents/UvalibContents.js +202 -3
- package/dist/components/uvalib-contents/UvalibContents.js.map +1 -1
- package/dist/components/uvalib-date-histogram/UvalibDateHistogram.d.ts +56 -17
- package/dist/components/uvalib-date-histogram/UvalibDateHistogram.js +285 -81
- package/dist/components/uvalib-date-histogram/UvalibDateHistogram.js.map +1 -1
- package/dist/components/uvalib-date-range/UvalibDateRange.d.ts +6 -0
- package/dist/components/uvalib-date-range/UvalibDateRange.js +23 -0
- package/dist/components/uvalib-date-range/UvalibDateRange.js.map +1 -1
- package/dist/components/uvalib-filter-drawer/UvalibFilterDrawer.d.ts +113 -0
- package/dist/components/uvalib-filter-drawer/UvalibFilterDrawer.js +589 -0
- package/dist/components/uvalib-filter-drawer/UvalibFilterDrawer.js.map +1 -0
- package/dist/components/uvalib-filter-drawer/uvalib-filter-drawer.d.ts +1 -0
- package/dist/components/uvalib-filter-drawer/uvalib-filter-drawer.js +4 -0
- package/dist/components/uvalib-filter-drawer/uvalib-filter-drawer.js.map +1 -0
- package/dist/components/uvalib-image-regions/UvalibImageRegions.d.ts +130 -0
- package/dist/components/uvalib-image-regions/UvalibImageRegions.js +658 -0
- package/dist/components/uvalib-image-regions/UvalibImageRegions.js.map +1 -0
- package/dist/components/uvalib-image-regions/regions.d.ts +57 -0
- package/dist/components/uvalib-image-regions/regions.js +117 -0
- package/dist/components/uvalib-image-regions/regions.js.map +1 -0
- package/dist/components/uvalib-image-regions/uvalib-image-regions.d.ts +1 -0
- package/dist/components/uvalib-image-regions/uvalib-image-regions.js +4 -0
- package/dist/components/uvalib-image-regions/uvalib-image-regions.js.map +1 -0
- package/dist/components/uvalib-lightbox/UvalibLightbox.d.ts +40 -0
- package/dist/components/uvalib-lightbox/UvalibLightbox.js +144 -16
- package/dist/components/uvalib-lightbox/UvalibLightbox.js.map +1 -1
- package/dist/components/uvalib-map/UvalibMap.d.ts +182 -0
- package/dist/components/uvalib-map/UvalibMap.js +1001 -0
- package/dist/components/uvalib-map/UvalibMap.js.map +1 -0
- package/dist/components/uvalib-map/uvalib-map.d.ts +1 -0
- package/dist/components/uvalib-map/uvalib-map.js +4 -0
- package/dist/components/uvalib-map/uvalib-map.js.map +1 -0
- package/dist/components/uvalib-metadata/UvalibMetadata.d.ts +39 -2
- package/dist/components/uvalib-metadata/UvalibMetadata.js +214 -8
- package/dist/components/uvalib-metadata/UvalibMetadata.js.map +1 -1
- package/dist/components/uvalib-pager/UvalibPager.d.ts +22 -3
- package/dist/components/uvalib-pager/UvalibPager.js +42 -4
- package/dist/components/uvalib-pager/UvalibPager.js.map +1 -1
- package/dist/custom-elements.json +9253 -3253
- package/dist/index.d.ts +8 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/pagefind.css +4 -0
- package/dist/styles/base.js +119 -0
- package/dist/styles/base.js.map +1 -1
- package/dist/styles/color-scheme.js +5 -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/hidden.d.ts +2 -0
- package/dist/styles/hidden.js +51 -0
- package/dist/styles/hidden.js.map +1 -0
- package/dist/styles/message.d.ts +1 -0
- package/dist/styles/message.js +82 -0
- package/dist/styles/message.js.map +1 -0
- package/dist/styles/pagefind.js +4 -0
- package/dist/styles/pagefind.js.map +1 -1
- package/dist/styles/result-list.d.ts +1 -0
- package/dist/styles/result-list.js +111 -0
- package/dist/styles/result-list.js.map +1 -0
- package/dist/styles/results.js +0 -15
- package/dist/styles/results.js.map +1 -1
- package/dist/testing/index.d.ts +110 -0
- package/dist/testing/index.js +100 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/lighthouse-rules.d.ts +10 -0
- package/dist/testing/lighthouse-rules.js +44 -0
- package/dist/testing/lighthouse-rules.js.map +1 -0
- package/dist/tokens.css +5 -0
- package/dist-cdn/analytics.js +32 -0
- package/dist-cdn/analytics.js.map +1 -0
- package/dist-cdn/base.css +286 -14
- package/dist-cdn/bento-box.js +3 -3
- package/dist-cdn/chunks/{SiteAnalytics-Cm-FyhYS.js → SiteAnalytics-B9gu5aGO.js} +59 -30
- package/dist-cdn/chunks/SiteAnalytics-B9gu5aGO.js.map +1 -0
- package/dist-cdn/chunks/{UvalibElement-BnI-eRRR.js → UvalibElement-pGONDAwB.js} +108 -101
- package/dist-cdn/chunks/UvalibElement-pGONDAwB.js.map +1 -0
- package/dist-cdn/chunks/{accessible-GqhVn5_H.js → accessible-DJv7YOtS.js} +2 -2
- package/dist-cdn/chunks/{accessible-GqhVn5_H.js.map → accessible-DJv7YOtS.js.map} +1 -1
- package/dist-cdn/chunks/analytics-state-Ce8DKe4F.js.map +1 -1
- package/dist-cdn/chunks/{base-p5pk0vb2.js → base-BI8h0Gf3.js} +121 -2
- package/dist-cdn/chunks/base-BI8h0Gf3.js.map +1 -0
- package/dist-cdn/chunks/{library-weekly-hours-COE7Vv6V.js → library-weekly-hours-CrV3TlP5.js} +3 -3
- package/dist-cdn/chunks/{library-weekly-hours-COE7Vv6V.js.map → library-weekly-hours-CrV3TlP5.js.map} +1 -1
- package/dist-cdn/chunks/regions-B8ExwUGP.js +86 -0
- package/dist-cdn/chunks/regions-B8ExwUGP.js.map +1 -0
- package/dist-cdn/chunks/{repeat-CIFUYkyh.js → repeat-m5Zd_QeP.js} +2 -2
- package/dist-cdn/chunks/{repeat-CIFUYkyh.js.map → repeat-m5Zd_QeP.js.map} +1 -1
- package/dist-cdn/chunks/{site-header-BlOYvQg1.js → site-header-DYRMpdBj.js} +9 -4
- package/dist-cdn/chunks/{site-header-BlOYvQg1.js.map → site-header-DYRMpdBj.js.map} +1 -1
- package/dist-cdn/chunks/{site-main-nav-AaxZ9rQf.js → site-main-nav-DURrQMal.js} +3 -3
- package/dist-cdn/chunks/{site-main-nav-AaxZ9rQf.js.map → site-main-nav-DURrQMal.js.map} +1 -1
- package/dist-cdn/chunks/{static-html-1mTAG6nS.js → static-html-C1rhtCHu.js} +2 -2
- package/dist-cdn/chunks/{static-html-1mTAG6nS.js.map → static-html-C1rhtCHu.js.map} +1 -1
- package/dist-cdn/custom-elements.json +9253 -3253
- package/dist-cdn/events-section.js +3 -3
- package/dist-cdn/library-hours-setup.js +2 -2
- package/dist-cdn/library-weekly-hours.js +1 -1
- package/dist-cdn/manifest.json +10 -2
- package/dist-cdn/pagefind.css +4 -0
- package/dist-cdn/site-alerts.js +4 -4
- package/dist-cdn/site-analytics.js +2 -2
- package/dist-cdn/site-footer.js +2 -2
- package/dist-cdn/site-header.js +1 -1
- package/dist-cdn/site-hours-section.js +4 -4
- package/dist-cdn/site-main-nav.js +1 -1
- package/dist-cdn/site-page.js +56 -11
- package/dist-cdn/site-page.js.map +1 -1
- package/dist-cdn/site-style.js +2 -2
- package/dist-cdn/skills/uvalib-web-components/SKILL.md +98 -13
- package/dist-cdn/skills/uvalib-web-components/reference/accessibility-testing.md +34 -2
- package/dist-cdn/skills/uvalib-web-components/reference/components.md +300 -13
- package/dist-cdn/skills/uvalib-web-components/reference/snippets.md +1 -1
- package/dist-cdn/tokens.css +5 -0
- package/dist-cdn/uvalib-analytics.js +2 -2
- package/dist-cdn/uvalib-back-to-top.js +156 -0
- package/dist-cdn/uvalib-back-to-top.js.map +1 -0
- package/dist-cdn/uvalib-breadcrumbs.js +31 -11
- package/dist-cdn/uvalib-breadcrumbs.js.map +1 -1
- package/dist-cdn/uvalib-card-grid.js +1 -1
- package/dist-cdn/uvalib-card.js +3 -3
- package/dist-cdn/uvalib-chip-group.js +53 -14
- package/dist-cdn/uvalib-chip-group.js.map +1 -1
- package/dist-cdn/uvalib-combobox.js +667 -0
- package/dist-cdn/uvalib-combobox.js.map +1 -0
- package/dist-cdn/uvalib-contents.js +100 -22
- package/dist-cdn/uvalib-contents.js.map +1 -1
- package/dist-cdn/uvalib-date-histogram.js +237 -127
- package/dist-cdn/uvalib-date-histogram.js.map +1 -1
- package/dist-cdn/uvalib-date-range.js +14 -2
- package/dist-cdn/uvalib-date-range.js.map +1 -1
- package/dist-cdn/uvalib-filter-drawer.js +355 -0
- package/dist-cdn/uvalib-filter-drawer.js.map +1 -0
- package/dist-cdn/uvalib-filter.js +3 -3
- package/dist-cdn/uvalib-image-regions.js +447 -0
- package/dist-cdn/uvalib-image-regions.js.map +1 -0
- package/dist-cdn/uvalib-lightbox.js +144 -55
- package/dist-cdn/uvalib-lightbox.js.map +1 -1
- package/dist-cdn/uvalib-map.js +471 -0
- package/dist-cdn/uvalib-map.js.map +1 -0
- package/dist-cdn/uvalib-metadata.js +150 -24
- package/dist-cdn/uvalib-metadata.js.map +1 -1
- package/dist-cdn/uvalib-pager.js +29 -17
- package/dist-cdn/uvalib-pager.js.map +1 -1
- package/dist-cdn/uvalib-photo-grid.js +2 -2
- package/dist-cdn/uvalib-results-count.js +2 -2
- package/dist-cdn/uvalib-tabs.js +2 -2
- package/dist-cdn/uvalib-tag-list.js +2 -2
- package/package.json +43 -1
- package/skills/uvalib-web-components/SKILL.md +98 -13
- package/skills/uvalib-web-components/reference/accessibility-testing.md +34 -2
- package/skills/uvalib-web-components/reference/components.md +300 -13
- package/skills/uvalib-web-components/reference/snippets.md +1 -1
- package/dist-cdn/chunks/SiteAnalytics-Cm-FyhYS.js.map +0 -1
- package/dist-cdn/chunks/UvalibElement-BnI-eRRR.js.map +0 -1
- package/dist-cdn/chunks/base-p5pk0vb2.js.map +0 -1
|
@@ -6,12 +6,22 @@ export interface HistogramItem {
|
|
|
6
6
|
count: number;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
|
-
* Monthly or
|
|
10
|
-
* timeline or a card. Give `items` (`{ date, count }`, `date` a `YYYY` or `YYYY-MM`)
|
|
11
|
-
* child `<table>` (the no-JS fallback). `granularity="month"` draws twelve bars for every
|
|
9
|
+
* Monthly, yearly or per-decade counts as bars: a date distribution for a search page, an
|
|
10
|
+
* archive timeline or a card. Give `items` (`{ date, count }`, `date` a `YYYY` or `YYYY-MM`)
|
|
11
|
+
* or a child `<table>` (the no-JS fallback). `granularity="month"` draws twelve bars for every
|
|
12
12
|
* year from the first date to the last, including months with a count of zero. A year-only
|
|
13
13
|
* count in a month chart, a day, or any other date is a chip beside the chart.
|
|
14
14
|
*
|
|
15
|
+
* `granularity="decade"` is for a long span (two centuries of minutes): one bar per decade
|
|
16
|
+
* ("1810s: 22 meetings"), an empty decade a gap, five decades to a row labelled with its
|
|
17
|
+
* first year (1800, 1850, …), the decades lined up in columns. Choosing a decade selects
|
|
18
|
+
* its first to last year (`selected="1810/1819"`, `select` `{ from: '1810-01-01', to:
|
|
19
|
+
* '1819-12-31' }`); up and down arrows move 50 years. `granularity="auto"` draws months
|
|
20
|
+
* when every count is a month within 3 years (at most 36 bars), years up to 30 years, and
|
|
21
|
+
* decades beyond. A year row that scrolls sideways is not offered: 200 years at the 24px
|
|
22
|
+
* minimum bar is over 5,000px, so a sidebar would show ten years at a time and lose the
|
|
23
|
+
* shape that decades show whole.
|
|
24
|
+
*
|
|
15
25
|
* Each bar is a button named like "October 2015: 5,311 photos". Arrow keys move between
|
|
16
26
|
* bars; Enter or Space selects. `selected` is one bucket (`2015-10`, `2015`) or a range
|
|
17
27
|
* (`2015-03/2016-01`, also `..` or an en dash). The selection is `aria-pressed`, an inset
|
|
@@ -20,20 +30,23 @@ export interface HistogramItem {
|
|
|
20
30
|
* again clears it (`from` and `to` are empty strings).
|
|
21
31
|
*
|
|
22
32
|
* `range-for` is the id of a `<uvalib-date-range>`. A bar click sets that element's
|
|
23
|
-
* `value`.
|
|
24
|
-
*
|
|
25
|
-
* that is exactly the range's own `min`
|
|
26
|
-
*
|
|
27
|
-
*
|
|
33
|
+
* `value`. Whenever the range's value changes, from its controls or set in script (a Clear
|
|
34
|
+
* button, Back/Forward, a restored URL), this element highlights the buckets that overlap it
|
|
35
|
+
* (it listens for `uvalib-date-range-value`). A value that is exactly the range's own `min`
|
|
36
|
+
* and `max` is no selection. On connect or reconnect, or when the range is added later, the
|
|
37
|
+
* range's value wins when it holds a selection or changed while this element was away;
|
|
38
|
+
* otherwise `selected` is written to it. A range value is never rounded to whole buckets
|
|
39
|
+
* and written back. Setting `selected` here updates the date range.
|
|
28
40
|
*
|
|
29
41
|
* `variant="strip"` is the small per-year row for a card: not interactive, `role="img"`,
|
|
30
|
-
* one bar per year
|
|
42
|
+
* one bar per year, or per decade with `decade` (or `auto` over more than 30 years).
|
|
31
43
|
*
|
|
32
44
|
* The chart reserves its height before the counts arrive: one bar track, or one track
|
|
33
|
-
* per year when those years are already known from the
|
|
34
|
-
* table (`--uvalib-date-histogram-bar-size`, 8rem, plus
|
|
35
|
-
* bars in does not move the page. On a narrow screen a month row
|
|
36
|
-
* component; "Scroll sideways to see more." shows while it overflows.
|
|
45
|
+
* per year (per half-century for decades) when those years are already known from the
|
|
46
|
+
* data, a linked date range or the table (`--uvalib-date-histogram-bar-size`, 8rem, plus
|
|
47
|
+
* the row gap). Filling the bars in does not move the page. On a narrow screen a month row
|
|
48
|
+
* scrolls inside the component; "Scroll sideways to see more." shows while it overflows.
|
|
49
|
+
* Years wrap; a decade row fits 320px.
|
|
37
50
|
*
|
|
38
51
|
* @tagname uvalib-date-histogram
|
|
39
52
|
* @slot - 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.
|
|
@@ -61,8 +74,12 @@ export declare class UvalibDateHistogram extends UvalibElement {
|
|
|
61
74
|
static styles: import("lit").CSSResult[];
|
|
62
75
|
/** Counts to draw. When non-empty, wins over the child table. Set a new array to update. */
|
|
63
76
|
items: HistogramItem[];
|
|
64
|
-
/**
|
|
65
|
-
|
|
77
|
+
/**
|
|
78
|
+
* `month` (twelve bars per year), `year`, `decade` (one bar per decade, five to a row), or
|
|
79
|
+
* `auto`: months when every count is a month within 3 years, years up to 30 years, else
|
|
80
|
+
* decades. Anything else is month, with one console warning.
|
|
81
|
+
*/
|
|
82
|
+
granularity: 'year' | 'month' | 'decade' | 'auto';
|
|
66
83
|
/** `log` scales bar height by log(count + 1). Anything else is linear. */
|
|
67
84
|
scale: 'linear' | 'log';
|
|
68
85
|
/**
|
|
@@ -94,6 +111,10 @@ export declare class UvalibDateHistogram extends UvalibElement {
|
|
|
94
111
|
private ro?;
|
|
95
112
|
private observed?;
|
|
96
113
|
private partnerObserver?;
|
|
114
|
+
/** The date range's value when this element last read or wrote it, and which range that was. */
|
|
115
|
+
private lastSeen?;
|
|
116
|
+
private lastSeenEl?;
|
|
117
|
+
private drawnGrain?;
|
|
97
118
|
constructor();
|
|
98
119
|
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
99
120
|
connectedCallback(): void;
|
|
@@ -101,6 +122,10 @@ export declare class UvalibDateHistogram extends UvalibElement {
|
|
|
101
122
|
protected willUpdate(changed: PropertyValues<this>): void;
|
|
102
123
|
protected updated(changed: PropertyValues<this>): void;
|
|
103
124
|
private get grain();
|
|
125
|
+
/** The strip is one bar per year, or per decade for `decade` (or `auto` over a long span). */
|
|
126
|
+
private get stripGrain();
|
|
127
|
+
/** Years from the linked date range's `min` to its `max`, or null. */
|
|
128
|
+
private partnerSpan;
|
|
104
129
|
private get strip();
|
|
105
130
|
private get log();
|
|
106
131
|
private get labelText();
|
|
@@ -108,14 +133,27 @@ export declare class UvalibDateHistogram extends UvalibElement {
|
|
|
108
133
|
private readTable;
|
|
109
134
|
private findPartner;
|
|
110
135
|
private bindPartner;
|
|
136
|
+
private unlisten;
|
|
137
|
+
/**
|
|
138
|
+
* On connect, or when the date range appears: the range's value wins when it holds a
|
|
139
|
+
* selection or changed while this element was away; otherwise `selected` is written to it.
|
|
140
|
+
*/
|
|
141
|
+
private syncOnBind;
|
|
111
142
|
/** While the named date range is not in the tree yet, take its value when it appears. */
|
|
112
143
|
private watchForPartner;
|
|
113
144
|
private partnerEnds;
|
|
114
145
|
/** `[min, max]` is the date range's empty state (a cleared selection, or the host's initial value). */
|
|
115
146
|
private isFullSpan;
|
|
116
|
-
|
|
147
|
+
/** The date range's value as it shows it: missing ends are `min` / `max`, both clamped to them. */
|
|
148
|
+
private partnerRange;
|
|
117
149
|
private onPartner;
|
|
150
|
+
/** Show the date range's value. A `selected` that already spans it exactly is kept as written. */
|
|
118
151
|
private pullPartner;
|
|
152
|
+
/**
|
|
153
|
+
* Write `selected` to the date range. A `selected` that is only the range's own value
|
|
154
|
+
* rounded to this chart's buckets is not written back (that would widen the range),
|
|
155
|
+
* unless `force` (a visitor chose that bar again to take the whole bucket).
|
|
156
|
+
*/
|
|
119
157
|
private pushPartner;
|
|
120
158
|
private emit;
|
|
121
159
|
private choose;
|
|
@@ -142,7 +180,8 @@ export declare class UvalibDateHistogram extends UvalibElement {
|
|
|
142
180
|
private renderDisclosure;
|
|
143
181
|
/** One bar track, or one per year when the span is already known, so late `items` do not shift the page. */
|
|
144
182
|
private reserveStyle;
|
|
145
|
-
|
|
183
|
+
/** Rows: one per year for months, one per half-century for decades. */
|
|
184
|
+
private reservedRows;
|
|
146
185
|
private renderStrip;
|
|
147
186
|
render(): TemplateResult;
|
|
148
187
|
}
|