diff --git a/documentation/reference-library-index.md b/documentation/reference-library-index.md index 4ac3f5ec5..c23c9b26a 100644 --- a/documentation/reference-library-index.md +++ b/documentation/reference-library-index.md @@ -26,6 +26,8 @@ and a change here can break other maps. `import … from '@map/components/ViewSelect.vue'` - **BarChart** — BarChart.vue — THE SHARED HORIZONTAL BAR CHART (hand-rolled SVG, zero dependencies). `import … from '@map/components/charts/BarChart.vue'` +- **ProgressBar** — ProgressBar.vue — the DX-life progress bar: a single-value track, or a segmented one with a legend. + `import … from '@map/components/charts/ProgressBar.vue'` - **PinHint** — PinHint.vue — the conversion coach-mark (bottom-center of any map). `import … from '@map/components/hints/PinHint.vue'` - **ApproxPinNote** — ApproxPinNote.vue — the ONE wording every map with people-group pins uses (APPROXPIN, 2026-09-26). @@ -84,8 +86,12 @@ and a change here can break other maps. `import … from '@map/components/poster/slots/TitleSlot.vue'` - **QaCorner** — QaCorner.vue — the embeddable QA corner widget (bottom-right of any map). `import … from '@map/components/qa/QaCorner.vue'` +- **GoalCard** — GoalCard.vue — a headline figure with a goal line pinned to the bottom of the card. + `import … from '@map/components/regions/GoalCard.vue'` - **RegionSectionCard** — RegionSectionCard.vue — one region as a card: a heading, a summary line, a grid of its countries, `import … from '@map/components/regions/RegionSectionCard.vue'` +- **StatCard** — StatCard.vue — one figure with a caption, on the DX-life card surface. + `import … from '@map/components/regions/StatCard.vue'` - **FilterDropdown** — FilterDropdown.vue — SHARED (@map/components/search/FilterDropdown.vue). `import … from '@map/components/search/FilterDropdown.vue'` - **SearchBar** — SearchBar.vue — SHARED (@map/components/search/SearchBar.vue). @@ -117,6 +123,8 @@ and a change here can break other maps. `import … from '@map/composables/retryableAsyncComponent.js'` - **useAvatarGenerator** — Avatar Generator Composable `import … from '@map/composables/useAvatarGenerator.js'` +- **useCardSurface** — useCardSurface.js — the DX-life card surface, as ONE rule set shared by every card component. + `import … from '@map/composables/useCardSurface.js'` - **useCountryOutline** — useCountryOutline.js — country boundary OUTLINE overlay on country search. `import … from '@map/composables/useCountryOutline.js'` - **useCsvExport** — useCsvExport.js — ★ SHARED LIBRARY CODE (dashboard-kit landing 3). Two parameters make it diff --git a/library/components/charts/ProgressBar.vue b/library/components/charts/ProgressBar.vue new file mode 100644 index 000000000..c839dee7d --- /dev/null +++ b/library/components/charts/ProgressBar.vue @@ -0,0 +1,133 @@ +...) instead of a single element. Measured by server-rendering it. So the branches + are bare and the explanation lives here: + • showLegend -> root is the ported .stack.stack--xs wrapper, 10px above the legend + • segments only -> root is the segmented .rd-bar + • neither -> root IS the plain .rd-bar, exactly as their cards 2 and 3 render it + + DOM IS UNCHANGED FOR ALL THREE INSTANCES, deliberately, because the clone is measured against the + live site. With a legend the root is the ported .stack.stack--xs wrapper (10px between bar and + legend); without one the root IS the .rd-bar element, exactly as their cards 2 and 3 render it -- + hence the three template branches rather than one uniform wrapper, which would have added a box + DX-life does not have to two of the three cards. + + NOT ADDED HERE, ON PURPOSE: role="progressbar" / aria-valuenow. Neither their bar nor our port has + it, and inventing an accessibility tree the clone target does not have is a change to request, not + to slip in. Carded for a ruling instead. + + CONTRACT: the containing shadow root carries the DX-life token layer (--dx-track, --dx-accent, + --spacing-*). No i18n is installed or required -- every string arrives pre-localized. +--> + + + diff --git a/library/components/regions/GoalCard.vue b/library/components/regions/GoalCard.vue new file mode 100644 index 000000000..7e83280d4 --- /dev/null +++ b/library/components/regions/GoalCard.vue @@ -0,0 +1,156 @@ + + + + diff --git a/library/components/regions/StatCard.vue b/library/components/regions/StatCard.vue new file mode 100644 index 000000000..8f24f6d91 --- /dev/null +++ b/library/components/regions/StatCard.vue @@ -0,0 +1,63 @@ + + + + diff --git a/library/composables/useCardSurface.js b/library/composables/useCardSurface.js new file mode 100644 index 000000000..b8c0bcebc --- /dev/null +++ b/library/composables/useCardSurface.js @@ -0,0 +1,44 @@ +/** + * useCardSurface.js — the DX-life card surface, as ONE rule set shared by every card component. + * + * WHY THIS IS A MODULE AND NOT A COPY IN EACH CARD. Vue only injects the ROOT component's