@eldrajs/ui 0.0.0 → 0.1.2

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 (205) hide show
  1. package/CHANGELOG.md +1725 -0
  2. package/LICENSE +21 -0
  3. package/README.md +3177 -2
  4. package/dist/VariantPicker-CKw8hmxt.js +9009 -0
  5. package/dist/componentNames.d.ts +19 -0
  6. package/dist/components/accordion/Accordion.vue.d.ts +18 -0
  7. package/dist/components/accordion/AccordionItem.vue.d.ts +26 -0
  8. package/dist/components/accordion/context.d.ts +20 -0
  9. package/dist/components/accordion/detailsExclusivity.d.ts +3 -0
  10. package/dist/components/accordion/heightTransition.d.ts +59 -0
  11. package/dist/components/accordion/types.d.ts +40 -0
  12. package/dist/components/avatar/Avatar.vue.d.ts +10 -0
  13. package/dist/components/avatar/AvatarGroup.vue.d.ts +7 -0
  14. package/dist/components/avatar/types.d.ts +61 -0
  15. package/dist/components/badge/Badge.vue.d.ts +24 -0
  16. package/dist/components/badge/StockBadge.vue.d.ts +10 -0
  17. package/dist/components/badge/types.d.ts +79 -0
  18. package/dist/components/breadcrumb/Breadcrumb.vue.d.ts +10 -0
  19. package/dist/components/breadcrumb/types.d.ts +53 -0
  20. package/dist/components/button/Button.vue.d.ts +37 -0
  21. package/dist/components/button/ButtonGroup.vue.d.ts +17 -0
  22. package/dist/components/button/types.d.ts +68 -0
  23. package/dist/components/card/ContentCard.vue.d.ts +36 -0
  24. package/dist/components/card/FeatureCard.vue.d.ts +27 -0
  25. package/dist/components/card/cueArrow.d.ts +10 -0
  26. package/dist/components/card/stretchedLink.d.ts +45 -0
  27. package/dist/components/card/types.d.ts +92 -0
  28. package/dist/components/carousel/Carousel.vue.d.ts +39 -0
  29. package/dist/components/carousel/types.d.ts +75 -0
  30. package/dist/components/carousel/useCarousel.d.ts +152 -0
  31. package/dist/components/checkbox/Checkbox.vue.d.ts +36 -0
  32. package/dist/components/checkbox/CheckboxGroup.vue.d.ts +16 -0
  33. package/dist/components/checkbox/types.d.ts +78 -0
  34. package/dist/components/chip/Chip.vue.d.ts +37 -0
  35. package/dist/components/chip/ChipGroup.vue.d.ts +21 -0
  36. package/dist/components/chip/context.d.ts +22 -0
  37. package/dist/components/chip/types.d.ts +84 -0
  38. package/dist/components/container/Container.vue.d.ts +18 -0
  39. package/dist/components/container/types.d.ts +17 -0
  40. package/dist/components/currency-input/CurrencyInput.vue.d.ts +17 -0
  41. package/dist/components/currency-input/types.d.ts +8 -0
  42. package/dist/components/dialog/Dialog.vue.d.ts +34 -0
  43. package/dist/components/dialog/types.d.ts +25 -0
  44. package/dist/components/drawer/Drawer.vue.d.ts +36 -0
  45. package/dist/components/drawer/types.d.ts +30 -0
  46. package/dist/components/empty-state/EditorPlaceholder.vue.d.ts +9 -0
  47. package/dist/components/empty-state/EmptyState.vue.d.ts +28 -0
  48. package/dist/components/empty-state/types.d.ts +59 -0
  49. package/dist/components/field-wrapper/FieldError.vue.d.ts +37 -0
  50. package/dist/components/field-wrapper/FieldWrapper.vue.d.ts +30 -0
  51. package/dist/components/field-wrapper/context.d.ts +44 -0
  52. package/dist/components/field-wrapper/types.d.ts +38 -0
  53. package/dist/components/filter-panel/FilterGroup.vue.d.ts +48 -0
  54. package/dist/components/filter-panel/FilterPanel.vue.d.ts +77 -0
  55. package/dist/components/filter-panel/Histogram.vue.d.ts +15 -0
  56. package/dist/components/filter-panel/facets/ColourFacet.vue.d.ts +12 -0
  57. package/dist/components/filter-panel/facets/ListFacet.vue.d.ts +12 -0
  58. package/dist/components/filter-panel/facets/RangeFacet.vue.d.ts +20 -0
  59. package/dist/components/filter-panel/facets/SizeFacet.vue.d.ts +12 -0
  60. package/dist/components/filter-panel/facets/ToggleFacet.vue.d.ts +12 -0
  61. package/dist/components/filter-panel/facets/shared.d.ts +39 -0
  62. package/dist/components/filter-panel/northwind.d.ts +32 -0
  63. package/dist/components/filter-panel/swatchInk.d.ts +50 -0
  64. package/dist/components/filter-panel/types.d.ts +183 -0
  65. package/dist/components/filter-panel/useFilterPanel.d.ts +230 -0
  66. package/dist/components/form-layout/FormLayout.vue.d.ts +36 -0
  67. package/dist/components/form-layout/context.d.ts +33 -0
  68. package/dist/components/form-layout/focusInvalid.d.ts +18 -0
  69. package/dist/components/form-layout/types.d.ts +52 -0
  70. package/dist/components/icon/Icon.vue.d.ts +8 -0
  71. package/dist/components/icon/types.d.ts +29 -0
  72. package/dist/components/image/Image.vue.d.ts +21 -0
  73. package/dist/components/image/types.d.ts +81 -0
  74. package/dist/components/input/Input.vue.d.ts +47 -0
  75. package/dist/components/input/classes.d.ts +110 -0
  76. package/dist/components/input/types.d.ts +55 -0
  77. package/dist/components/internal/ValueText.vue.d.ts +7 -0
  78. package/dist/components/lightbox/Lightbox.vue.d.ts +19 -0
  79. package/dist/components/lightbox/types.d.ts +47 -0
  80. package/dist/components/link/Link.vue.d.ts +23 -0
  81. package/dist/components/link/types.d.ts +40 -0
  82. package/dist/components/load-more/LoadMore.vue.d.ts +12 -0
  83. package/dist/components/load-more/types.d.ts +21 -0
  84. package/dist/components/logo-item/LogoItem.vue.d.ts +10 -0
  85. package/dist/components/logo-item/types.d.ts +37 -0
  86. package/dist/components/pagination/Pagination.vue.d.ts +15 -0
  87. package/dist/components/pagination/types.d.ts +51 -0
  88. package/dist/components/popover/Popover.vue.d.ts +31 -0
  89. package/dist/components/popover/types.d.ts +53 -0
  90. package/dist/components/price/Price.vue.d.ts +25 -0
  91. package/dist/components/price/types.d.ts +104 -0
  92. package/dist/components/product-card/ProductCard.vue.d.ts +22 -0
  93. package/dist/components/product-card/types.d.ts +123 -0
  94. package/dist/components/quantity-stepper/QuantityStepper.vue.d.ts +26 -0
  95. package/dist/components/quantity-stepper/types.d.ts +35 -0
  96. package/dist/components/radio/RadioGroup.vue.d.ts +38 -0
  97. package/dist/components/radio/types.d.ts +39 -0
  98. package/dist/components/range-slider/RangeSlider.vue.d.ts +70 -0
  99. package/dist/components/range-slider/types.d.ts +151 -0
  100. package/dist/components/range-slider/useRangeSlider.d.ts +106 -0
  101. package/dist/components/rating/Rating.vue.d.ts +22 -0
  102. package/dist/components/rating/RatingStars.vue.d.ts +16 -0
  103. package/dist/components/rating/types.d.ts +45 -0
  104. package/dist/components/search-bar/SearchBar.vue.d.ts +47 -0
  105. package/dist/components/search-bar/SearchResultsPanel.vue.d.ts +93 -0
  106. package/dist/components/search-bar/shortcutOwner.d.ts +39 -0
  107. package/dist/components/search-bar/types.d.ts +122 -0
  108. package/dist/components/search-modal/SearchModal.vue.d.ts +53 -0
  109. package/dist/components/search-modal/types.d.ts +59 -0
  110. package/dist/components/section/Section.vue.d.ts +21 -0
  111. package/dist/components/section/context.d.ts +23 -0
  112. package/dist/components/section/types.d.ts +34 -0
  113. package/dist/components/select/MultiSelect.vue.d.ts +62 -0
  114. package/dist/components/select/Select.vue.d.ts +57 -0
  115. package/dist/components/select/SelectPanel.vue.d.ts +97 -0
  116. package/dist/components/select/openRegistry.d.ts +11 -0
  117. package/dist/components/select/panelParts.d.ts +91 -0
  118. package/dist/components/select/types.d.ts +129 -0
  119. package/dist/components/select/useListbox.d.ts +106 -0
  120. package/dist/components/select/useOptionList.d.ts +61 -0
  121. package/dist/components/select/usePopover.d.ts +147 -0
  122. package/dist/components/skeleton/Skeleton.vue.d.ts +12 -0
  123. package/dist/components/skeleton/types.d.ts +38 -0
  124. package/dist/components/spinner/Spinner.vue.d.ts +3 -0
  125. package/dist/components/switch/Switch.vue.d.ts +30 -0
  126. package/dist/components/switch/types.d.ts +20 -0
  127. package/dist/components/tabs/Tab.vue.d.ts +17 -0
  128. package/dist/components/tabs/TabPanel.vue.d.ts +16 -0
  129. package/dist/components/tabs/Tabs.vue.d.ts +28 -0
  130. package/dist/components/tabs/context.d.ts +48 -0
  131. package/dist/components/tabs/types.d.ts +63 -0
  132. package/dist/components/textarea/Textarea.vue.d.ts +27 -0
  133. package/dist/components/textarea/supportsFieldSizing.d.ts +10 -0
  134. package/dist/components/textarea/types.d.ts +32 -0
  135. package/dist/components/toast/Toast.vue.d.ts +16 -0
  136. package/dist/components/toast/Toaster.vue.d.ts +13 -0
  137. package/dist/components/toast/types.d.ts +44 -0
  138. package/dist/components/tooltip/Tooltip.vue.d.ts +9 -0
  139. package/dist/components/tooltip/supportsFocusVisible.d.ts +17 -0
  140. package/dist/components/tooltip/types.d.ts +46 -0
  141. package/dist/components/unit-input/UnitInput.vue.d.ts +55 -0
  142. package/dist/components/unit-input/types.d.ts +68 -0
  143. package/dist/components/unit-input/undo-redo.d.ts +6 -0
  144. package/dist/components/variant-picker/VariantPicker.vue.d.ts +15 -0
  145. package/dist/components/variant-picker/types.d.ts +49 -0
  146. package/dist/components/visually-hidden/VisuallyHidden.vue.d.ts +18 -0
  147. package/dist/components/visually-hidden/types.d.ts +14 -0
  148. package/dist/composables/dialogStack.d.ts +52 -0
  149. package/dist/composables/teleportTarget.d.ts +79 -0
  150. package/dist/composables/useControllableModel.d.ts +16 -0
  151. package/dist/composables/useDialog.d.ts +84 -0
  152. package/dist/composables/useFloating.d.ts +82 -0
  153. package/dist/composables/useHeadingTag.d.ts +24 -0
  154. package/dist/composables/useLocale.d.ts +81 -0
  155. package/dist/composables/useMessages.d.ts +30 -0
  156. package/dist/composables/useOverlay.d.ts +88 -0
  157. package/dist/composables/useSlotPresence.d.ts +29 -0
  158. package/dist/composables/useToast.d.ts +53 -0
  159. package/dist/icons/paths.d.ts +10 -0
  160. package/dist/index.d.ts +135 -0
  161. package/dist/index.js +12587 -0
  162. package/dist/listFormat-1UrH38f2.js +39 -0
  163. package/dist/messages/en-US.d.ts +485 -0
  164. package/dist/messages/index.d.ts +2 -0
  165. package/dist/messages/is-IS.d.ts +16 -0
  166. package/dist/messages/is-IS.js +169 -0
  167. package/dist/resolver.d.ts +43 -0
  168. package/dist/resolver.js +121 -0
  169. package/dist/style.css +5259 -0
  170. package/dist/tailwind.css +2057 -0
  171. package/dist/tokens.css +134 -0
  172. package/dist/utils/avatar.d.ts +15 -0
  173. package/dist/utils/color.d.ts +11 -0
  174. package/dist/utils/cssTiming.d.ts +40 -0
  175. package/dist/utils/cx.d.ts +31 -0
  176. package/dist/utils/date.d.ts +45 -0
  177. package/dist/utils/id.d.ts +36 -0
  178. package/dist/utils/listFormat.d.ts +22 -0
  179. package/dist/utils/mask.d.ts +48 -0
  180. package/dist/utils/number-format.d.ts +250 -0
  181. package/dist/utils/numeric-input.d.ts +42 -0
  182. package/dist/utils/rating.d.ts +26 -0
  183. package/dist/utils/ratio.d.ts +18 -0
  184. package/dist/utils/tagRecipe.d.ts +24 -0
  185. package/dist/utils/valueFade.d.ts +42 -0
  186. package/dist/vee-validate/FieldCheckbox.vue.d.ts +14 -0
  187. package/dist/vee-validate/FieldCheckboxGroup.vue.d.ts +14 -0
  188. package/dist/vee-validate/FieldCurrencyInput.vue.d.ts +14 -0
  189. package/dist/vee-validate/FieldInput.vue.d.ts +14 -0
  190. package/dist/vee-validate/FieldMultiSelect.vue.d.ts +14 -0
  191. package/dist/vee-validate/FieldQuantityStepper.vue.d.ts +14 -0
  192. package/dist/vee-validate/FieldRadioGroup.vue.d.ts +14 -0
  193. package/dist/vee-validate/FieldSearchBar.vue.d.ts +14 -0
  194. package/dist/vee-validate/FieldSelect.vue.d.ts +14 -0
  195. package/dist/vee-validate/FieldSwitch.vue.d.ts +14 -0
  196. package/dist/vee-validate/FieldTextarea.vue.d.ts +14 -0
  197. package/dist/vee-validate/FieldUnitInput.vue.d.ts +14 -0
  198. package/dist/vee-validate/FieldVariantPicker.vue.d.ts +14 -0
  199. package/dist/vee-validate/Form.vue.d.ts +27 -0
  200. package/dist/vee-validate/context.d.ts +48 -0
  201. package/dist/vee-validate/index.d.ts +27 -0
  202. package/dist/vee-validate/types.d.ts +115 -0
  203. package/dist/vee-validate/useFieldControl.d.ts +67 -0
  204. package/dist/vee-validate.js +1154 -0
  205. package/package.json +99 -2
package/CHANGELOG.md ADDED
@@ -0,0 +1,1725 @@
1
+ # @eldrajs/ui changelog
2
+
3
+ Hand-maintained: every change a consumer can see gets a line under Unreleased in the same change.
4
+ Release-please writes the generated notes from commit messages and does not replace this.
5
+
6
+ ## Unreleased
7
+
8
+ ### Added
9
+
10
+ - **`RangeSlider`** — the design spec's new "Range slider" section: two thumbs on one track for a numeric span, `modelValue: [number, number]` that cannot cross, `min`/`max`/`step`/`largeStep`, an optional `inputs` row of typed min / "to" / max fields, `formatValue` for every number the control speaks or prints, `disabled`, `label` with `minLabel`/`maxLabel` for the two ends, per-part `classes` and the `messages` prop (five new keys: `minimum`, `maximum`, `minimumOf`, `maximumOf`, `to`). Each thumb is a `role="slider"` reporting **its own** limits — the minimum thumb's `aria-valuemax` is the maximum thumb's current value — with an `aria-valuetext` run through `formatValue`, so a price filter announces "$1,200" rather than "1200", and both ends are their own tab stop because both have to be reachable. `←`/`↓`/`→`/`↑` move by `step`, `Shift` with any of them and `PageUp`/`PageDown` by `largeStep`, `Home`/`End` to the focused thumb's own limits. A pointer press anywhere on the rail moves the **nearer** thumb and keeps dragging it, parking it against its neighbour rather than swapping; the rail is `target-touch` tall below its container's tablet width (`target-min` from it) and each thumb's hit area follows. A typed value commits on **blur or `Enter` only**, never on a keystroke, snapped and clamped to the bounds and to the other thumb, with an emptied field falling back to that end of the range. `update:modelValue` reports every move, `change` once the move is over (pointer release, key release, field commit, and a pointer capture lost without either) — the one anything that costs a request should listen to. The typed fields are the same box as `Input`, in the same states, drawn from the shared field recipes rather than a copy of them, and they ask for the decimal keypad when the step has fraction digits. A slider nobody binds `v-model` to **follows its bounds** until something moves it, so a price filter whose `facets.price` arrives after the first render spans the catalogue instead of collapsing at its cheapest product; a `max` below `min` is treated as an empty range at `min` (with a dev-only warning) rather than reporting a value outside its own thumb limits. Both bounds are stops of their own alongside the step grid, so a catalogue's off-grid highest price can still be chosen, and every result is rounded to the digits the step is written with (a `0.1` step twenty times is `2`, not `1.9999999999999998`).
11
+ - **`RangeSlider`'s `inputs` slot** — the typed min / "to" / max row is replaceable, and the value is not. A store filtering by price wants its *own* currency field (the symbol, the store's grouping, the caret behaviour a money field has), which the built-in generic number fields cannot be without this package deciding a consumer's money formatting for them. The slot is handed `{ value, min, max, step, disabled, labels, commit }`: `labels` is the two names the thumbs already carry plus the word between the fields (name a replacement field with the same string its thumb uses, or a screen reader hears two names for one end), and `commit(end, next)` — `end` being `0` or `1` — applies that end exactly as a built-in field's blur does: snapped to the step grid, clamped to `[min, max]`, clamped against the other thumb, then `change` emitted once. It returns the number actually applied, which is what a controlled field should show (the parent has not written back yet, and an `Enter` commit leaves the field focused), and `null` is an emptied field, falling back to that end of the range. Call it on **blur or `Enter`**, never per keystroke — a commit per character would snap and clamp a half-typed number. The built-in fields are the slot's default content, so nothing changes for a consumer that does not fill it, and the `inputs` prop still decides whether the row exists at all. New exported types: `RangeSliderInputsSlotProps`, `RangeSliderEnd`.
12
+ - **`FilterPanel`** — the design spec's new "Filter panel" section: the faceted product filter a collection or search page is narrowed with, as one core component. `facets: FilterFacet[]` are five ways of drawing the same values — `list` (checkbox rows with counts), `colour` (real product swatches as rows or tiles), `size` (equal tiles grouped under one sub-heading per size system, with a **Size guide** link), `range` (a two-thumb `RangeSlider` with Min/Max fields and an optional decorative histogram) and `toggle` (one `Switch` per yes/no facet, never a checkbox pair) — and `modelValue` is the selection keyed by facet id (two-way), an array of values per facet or the two ends of a range. `mode` is `sidebar` or `drawer`, `showHead` draws the title and **Clear all**, `showApplied` the removable chips, and `title`/`label`/`locale`/`currency`/`resultCount`/`dense`/`idPrefix`/`classes`/`messages` the rest. Events: `update:modelValue` and `change` after every check, switch, committed range or field; `apply` when the drawer's **Show N products** is pressed; `clear` after **Clear all** has reset every facet, ranges included; `remove` with `{facetId, value}` for a chip. Slots: `foot` (the drawer foot, whose default content is the spec's own two buttons) and `facet` (one facet's body, for a type this package does not draw). `defineExpose({ focusTitle, focusChip })`.
13
+ Each group is a disclosure the spec describes exactly and `Accordion` cannot be: an `h3` holding a `<button type="button" aria-expanded aria-controls>` with a selected-count `Badge` named "N selected" and, while collapsed, a `muted` summary of the selected labels that is part of the trigger's own name; the body is a `<fieldset>` with a visually hidden `<legend>`, and `Esc` inside it collapses the group and returns focus to the trigger in sidebar mode (in the drawer the key carries on to the dialog). Every value is a real `<input type="checkbox">` however it is painted — a swatch and a size tile are one stretched invisibly over the whole row or tile, so the whole thing is the target and carries the one focus ring — named as a whole sentence ("Sweaters, 18 products", "Knitwear M, 14 products", plus ", none available" where nothing is left). A `list` facet shows the first 6 values then **Show all N** / **Show fewer**, and more than 12 values add a search field above it that filters the **whole** list, case- and accent-insensitively, with a persistent `role="status"` region saying "No matches for “x”". A value with 0 products stays in place, disabled and struck through — never hidden, so the list does not jump — and a value the shopper has selected is never disabled. A swatch's check mark picks its own ink from the colour's relative luminance, so it stays visible on a colour nobody chose, and selection is never colour alone (a ring, a check mark and a bold name). Colour rows go to two columns only once the **panel itself** is 26rem wide, which a 15rem sidebar never is. The panel is a `<form>` named "Product filters" that never submits, and it is deliberately **URL-free**: the query string, the debounce window and the result count stay with the owning page, because a published component that wrote a query string would hard-wire a router into every store that installed it.
14
+ **A range facet with fewer than two distinct values is not drawn at all** — no group, no single thumb that cannot move, no pair of fields reading "3,500" to "3,500". A catalogue whose cheapest and dearest product cost the same has no span to narrow, and a control that answers every gesture with nothing says there is something to filter when there is not. A leftover selection for such a facet (one inherited from a URL, or from a catalogue whose span has since collapsed) is dropped on the **next change** rather than on mount, so the panel never emits a change nobody asked for, and it never counts towards **Clear all**. Every other facet type is drawn whatever it holds: an empty `list` says, truly, that the catalogue offers no values for it.
15
+ Pure modules beside it, all exported from the root entry: `useFilterPanel.ts` (`toggleValue`, `removeValue`, `setRange`, `clearedSelection`, `rangeOf`, `rangeLimits`, `isRangeAtLimits`, `isRangeSelection`, `selectedValues`, `isValueSelected`, `isValueDisabled`, `facetSelectedCount`, `facetSummaryLabels`, `facetStartsOpen`, `hasSelection`, `appliedFilters`, `foldForSearch`, `matchesSearch`, `facetIsSearchable`, `facetCanShowAll`, `facetIsRenderable`, `renderableFacets`, `dropOmittedFacets`, `facetHasHiddenValues`, `visibleFacetValues`, `facetValues`, `facetRows`, `sizeSystemGroups`, `histogramBarInRange`, `FILTER_VALUES_SHOWN`, `FILTER_SEARCH_FROM`) and `swatchInk.ts` (`swatchInk`, `swatchLuminance`, `SWATCH_INK_LUMINANCE_THRESHOLD`). Two rules in there are worth knowing before writing an adapter for it: a facet's key is **removed** rather than emptied when its last value goes, and a range at its own limits is no key at all — one representation of "nothing selected here", which is what lets **Clear all** know whether it has anything to clear and makes a round trip through a query string idempotent. New types: `FilterFacet`, `FilterFacetValue`, `FilterFacetType`, `FilterFacetLayout`, `FilterFacetSelection`, `FilterSelection`, `FilterPanelMode`, `FilterPanelPart`, `FilterPanelProps`, `FilterRemoval`, `AppliedFilter`, `SwatchInk`, `FacetListState`, `FacetRow`, `SizeSystemGroup`. New messages, all under a `filterPanel*` prefix: `filterPanelTitle`, `filterPanelLabel`, `filterPanelClearAll`, `filterPanelApplied`, `filterPanelRemoveFilter`, `filterPanelShowAll`, `filterPanelShowFewer`, `filterPanelSearchLabel`, `filterPanelSearchPlaceholder`, `filterPanelValueName`, `filterPanelSizeName`, `filterPanelNoneAvailable`, `filterPanelImpliedBy`, `filterPanelUnder`, `filterPanelSizeGuide`, `filterPanelMin`, `filterPanelMax`, `filterPanelOrMore`, `filterPanelShowResults`, `filterPanelShowProducts`. New per-component CSS variables, documented in the README's Customisation table: `--eldra-filter-subheading-tracking`, `--eldra-filter-swatch-edge-width`, `--eldra-filter-swatch-ring-width`, `--eldra-filter-histogram-bar-min`, `--eldra-filter-histogram-bar-radius`.
16
+ - **`Chip` takes a `messages` prop.** It renders one string itself — `removeTag`, the remove button's name — and the override for it is often **per chip** rather than per app: a row of filter chips all read "Brown", "M", "Sweaters", and each remove button has to say which facet it belongs to ("Remove filter Colour: Brown"), which one provided string cannot do because it cannot see the chip. The ambient `provideEldraUiMessages` still applies underneath, as everywhere else.
17
+ - **`FilterFacet` range shape gains `slider?: boolean`** (default `true`), and `RangeSlider` gains the `trackVisible` prop it is drawn through. `false` draws the labelled Min and Max fields alone — no rail, no thumbs, no track, no histogram — for a catalogue whose prices sit in a few tight clusters a track cannot separate; the fields keep every clamping, snapping and commit rule the slider shape has, because `RangeSlider`'s `inputs` row and its `commit` function are unaffected by whether the rail is drawn. Both additive, and both default to the slider shape every existing consumer already has.
18
+ - **`RangeSlider`'s `formatValue` is told which end it is formatting**, and gains a `track` slot. Both additive: `formatValue?: (value: number, end?: RangeSliderEnd) => string` hands `0` (the minimum) or `1` (the maximum) to the formatter for a **thumb's** own text, so a formatter can say something true of one end alone — a price filter's maximum thumb sitting at `max` announcing "$240 or more", because above the catalogue's highest price there is nothing left to exclude, which the one-argument signature could not express. The typed fields deliberately get no `end`: a field holds a number the shopper edits, and "$240 or more" is not one. Every existing one-argument formatter is unaffected. The `track` slot draws a decoration over the track's own span — a price histogram is the one it exists for — rendered inside the gutter box and **before** the rail, so it is exactly as wide as the track without knowing what `eldra-range-gutter` currently reserves for a thumb and its ring, and so it never takes a pointer press away from the rail (a decoration is not a second way to set the value). It is handed `{ value, min, max, step, disabled, percent }`, `percent` being the filled part's two edges as percentages of the track, which is what tells "inside the range" from "outside" (a histogram bar is "in" when its bucket centre lies between the thumbs) without every consumer writing the same arithmetic. New exported type: `RangeSliderTrackSlotProps`.
19
+ - The range slider's arithmetic is public, as pure functions rather than a composable: `snapToRangeStep`, `rangeValueToPercent`, `rangePositionToValue`, `rangeThumbLimits`, `clampRangeThumb`, `normalizeRangeValue`, `nearestRangeThumb`, `rangeKeyTransition`, `rangeStepDigits` and `fractionDigits`, with the `RangeSliderMath` type — the same building blocks `RangeSlider` itself is built on, for a consumer building a range control this package does not ship.
20
+ - New per-component CSS variables, all documented in the README's Customisation table: `--eldra-range-thumb-size` (`1.25rem`), `--eldra-range-thumb-border-width` (`1.5px`), `--eldra-range-thumb-halo` (`0.25rem`) and `--eldra-range-track-height` (`0.375rem`). The gutter that keeps a thumb **and its focus ring** inside the control is `calc()`-ed from the thumb size and the two focus-ring tokens, so raising either (a `Carousel` ancestor sets `--eldra-focus-offset: 4px` and a custom property inherits) moves the reservation with it instead of clipping the ring.
21
+
22
+ - `defaultUnitFormat(options, extraOptions?)`, `formatUnit(value, options)` and `formatCurrency(value, locale, currency, narrowSymbol, maxFraction, minFraction?)` — options being `{ locale, unit, maxFraction, isCurrency, currency, narrow, minFraction }` (`src/utils/number-format.ts`, exported from the root entry with the new `UnitFormatOptions` type): one currency amount, and one number with a unit, formatted the way this package's own prices and currency fields format them — the currency's **narrow** sign (`"kr 2,800"` under `en-US`/`ISK`, not `"ISK 2,800"`; `"2.800 kr."` under `is-IS`; `"$28"` for dollars). For a consumer that has to put money in a sentence ("Add to cart · kr 2,800") rather than render a `<Price>`: a hand-built `Intl.NumberFormat({ style: 'currency' })` writes the wide sign, which no longer matches anything this package renders. All three are **ports of the private Eldra library's own helpers, and the canonical copy of them** — that library is expected to import them and delete its `unit-utils.ts` outright — so the signatures are its signatures rather than this package's usual options object, and for the arguments it passes the output is identical. `defaultUnitFormat` is the one that holds the rule (it returns the `Intl.NumberFormat`, and the other two are wrappers over it, exactly as that library's own two are), and it takes the same optional second `Intl.NumberFormatOptions` bag, applied last so it overrides anything the rule decided. The rule: `minimumFractionDigits` is `0` (so `28` is `"$28"`), `maximumFractionDigits` is `maxFraction` (default `2` whatever the currency — pass `currencyFractionDigits(currency, locale)` for the currency's own count), a currency carries `currencyDisplay: narrow ? "narrowSymbol" : "symbol"`, and a unit carries no `unitDisplay` at all. `minFraction` is the one addition to the ported signatures and it is **display-only — omit it to match input formatting**: a currency field shows what a person typed (`"$28"`), while a displayed price passes the currency's own count and gets `"$28.00"`, because a list in which one row reads `$96` and the next `$96.50` is not a column of money. It must not exceed `maxFraction`, and that pair is refused with a `RangeError` naming both rather than `Intl`'s own message blaming a `maximumFractionDigits` the caller never set. All three throw `RangeError` for a currency code, unit identifier or locale `Intl` rejects, as the originals do; `formatUnit` memoises its formatter per distinct shape while staying pure, and the two that return a formatter are uncached because the caller then owns its lifetime.
23
+ - `currencySymbol(currency, locale, narrow = true)` — the sign a currency is written with in a locale, on its own (`"kr"`, `"kr."`, `"$"`), read out of `formatToParts` rather than a code → symbol table, for a place that names a currency rather than formatting an amount in it. This package's own addition rather than a port, and it never throws: a currency with no sign distinct from its code in that locale (and a code `Intl` rejects) returns the code.
24
+
25
+ - `revalidating` on `Price`, `ProductCard` and `StockBadge`: a value that is already on screen while a fresher one is fetched keeps its text and its place, dimmed to the new `--eldra-revalidating-opacity` token (default `0.75`, from `tokens.json` — the deepest dim at which every colour these values are drawn in still clears 3:1 on every ground the package ships; below 4.5:1 for everything but `text` while the read lasts — raise it to `0.9` for 4.5:1 on `background` and `surface`, `0.94` for `surface-strong` too), with a `1em` spinner drawn beside it outside the component's own box — no width change, no layout shift — plus `aria-busy="true"` and a visually hidden `aria-live="polite"` region reading the new `updatingPrice` / `updatingStock` messages. Distinct from `loading`, which still renders the skeleton and wins when both are set; `ProductCard` passes the flag to its price and stock line and is otherwise unchanged. New parts: `spinner`, `srStatus` on `Price` and `StockBadge`.
26
+ - A refreshed value's **change** is eased as well as its waiting: a changed `Price` amount or compare-at, and a changed `StockBadge` status line, fade in over `--eldra-duration-base`. Enter only — the new value is in the DOM the instant the props change, in the same render as `aria-busy`, the dim and the spinner, and fades in from there; nothing fades out, so a stale value is never left on screen after the component has stopped saying it is busy. One element and one copy throughout, so nothing is added to the accessibility tree; no animation at all under `prefers-reduced-motion: reduce` (checked twice over: the media query, and the duration token `tokens.css` zeroes under it). A value on screen still never regresses to a skeleton. New parts, the inner spans the fade plays on: `currentValue` / `compareAtValue` on `Price`, `labelValue` on `StockBadge` — the dim stays on `current` / `compareAt` / `label` as before, so a `classes` override of those parts is unaffected.
27
+ - `--eldra-shadow-float` / `shadow-float`: a wider, softer shadow than `shadow-sm` for a sticky header once the page has scrolled (from `tokens.json`).
28
+ - `searchLoading` message (`'Searching…'`), used by `SearchBar` and `SearchModal` — see Fixed below.
29
+ - `SearchBar` / `SearchModal` draw a spinner beside the field while a request is in flight (the shared `Spinner`, on the same 300ms delay as the panel's own loading view) and mark the listbox `aria-busy="true"` while it is showing. New part: `busy`. Until now the loading state was three skeleton rows inside the panel and a hidden live-region line — nothing beside the field itself, so a slow search looked like nothing was happening.
30
+
31
+ ### Changed
32
+
33
+ - **Icelandic prints the same everywhere.** Every number, price, date and list now formats through `@eldrajs/sdk/format`, a new dependency on `@eldrajs/sdk`, so Chrome and Cloudflare Workers (which ship without Icelandic locale data) print `2.800 kr.` and `12. sep. 2026` exactly as Node, Safari and Firefox do, and a server-rendered page hydrates without a mismatch. This replaces the Danish (`da-DK`) fallback, which matched Icelandic only for narrow currency signs and plain decimals. `formatDate` now builds and formats its date in UTC.
34
+ - **The wide currency sign is the default.** `Price`, `CurrencyInput` and `UnitInput` default `narrowSymbol` to `false`, and `RangeFacet` passes `false`: an English price reads `ISK 2,800`, not `kr 2,800`, which is also the Danish, Norwegian and Swedish krone. `is-IS` is unaffected (`2.800 kr.` either way). `formatCurrency` and `currencySymbol` keep the private library's narrow default.
35
+ - **`FilterPanel`'s price range fills its panel, and the en dash sits between the fields.** The track and histogram are inset by the thumb's radius (new `eldra-range-gutter-thumb` utility, swappable against `eldra-range-gutter` through `classes.group`) rather than by half a touch target, and the separator is a control-height box on the fields' own baseline.
36
+ - **Internal review wording is gone from every file this package ships, and the hygiene spec now guards against it.** Roughly two hundred doc comments, README paragraphs and test names attributed a rule to the review cycle or the planning document it came out of rather than stating the rule: the starter's `UiImage` props each named a numbered review pass and a numbered decision inside it, a dozen components named an operator's verdict as the authority for a deviation, and some fifty comments gave a prop's provenance as the private implementation document instead of the fact. None of it resolves to anything a reader outside the private planning repository has, and each one replaced the thing worth writing down. The comments now say what the rule is; where the attribution mattered it is a dated decision rather than an ordinal. `publicRepoHygiene.spec.ts` grew a third pattern family for that vocabulary — narrow on purpose, and its boundary is pinned by thirty sample sentences asserted in both directions, so the ordinary English senses this kit uses correctly (a short, non-blocking status message; a momentary pending transition; rounding a number to two decimal places) still pass — and its scan widened from this package's `src/` to **every** package's source, this package's `scripts/`, and the design spec, the trees the previous "the only tree not reached" claim had missed. This file's own "Task N" convention is unchanged and still exempt, for the reason that entry already gives; this entry deliberately describes the forbidden vocabulary rather than spelling it, exactly as the spec's own source does for the private npm scope.
37
+
38
+ - **No currency is guessed any more: `useEldraUiCurrency()` has no default code, and an amount with no currency is rendered as a plain number.** It answered `USD` for a store that had provided none, which is the one wrong answer available — a dollar sign in front of krónur is a *wrong* price, where a bare number is merely an incomplete one. It now returns `string | undefined`, and `Price` (and `ProductCard` through it) formats the amount through the same `Intl` path with `style: 'decimal'`: no symbol, and no code appended either, since there is no code to print. A code `Intl` **rejects** is unchanged — still the number plus the raw code (`"1,234 XYZ1"`), the one thing a reader can act on — and so is the minor-unit scale with no currency: 2, ISO 4217's own default and what `currencyFractionDigits` already answered for a code it could not use.
39
+ - **Providing `undefined` is meaningful**, and different from not providing at all: it says this store has no currency, and nothing is logged. A store whose currency the platform has not published can now say so directly instead of providing `''` — a code `Intl` must reject — purely to decline one, which is what consumers had to do while the default stood. The retired `''` keeps working, and means the same thing, wherever a currency is read: through the provide, and through `Price`/`ProductCard`'s own `currency` prop, which a consumer that unwraps `CURRENCY_KEY` itself passes it down as.
40
+ - **No provider at all** warns once per session in dev (never in a production build), naming `CURRENCY_KEY` / `provideEldraUiCurrency` so an unwired app is told rather than quietly shown dollars.
41
+ - **`DEFAULT_UI_CURRENCY` is gone** from the root entry; there is no default currency for it to name. `DEFAULT_UI_LOCALE` stays — grouping and a decimal point are a formatting convention, not a claim about what the money is. The public `formatCurrency(value, locale, currency = 'USD', …)` util keeps its own positional default: it is a byte-identical port of the private library's helper, and that signature is the whole point of it.
42
+
43
+ - **`Carousel` takes one tab stop for the whole row.** A carousel whose slides hold their own links
44
+ or buttons (a product row, a gallery of tiles, a linked hero figure) no longer puts its track in
45
+ the tab sequence, and no longer leaves every card's controls in it: the **active slide** owns the
46
+ single entry point, `Tab`/`Shift+Tab` move through that card's own controls in DOM order and then
47
+ leave the carousel — never into the next card — and `←`/`→` move between slides from anywhere
48
+ inside one, with `Home`/`End` for the ends. Focus follows onto the new slide and the track
49
+ scrolls to it (clamped, never wrapping, instant under reduced motion); `Enter`/`Space` stay with
50
+ the focused control. The arrow keys are never taken from an `<input>` of any type but
51
+ `checkbox`/`button`/`submit`/`reset`/`image`/`file`/`color` — so the text-like types, and `radio`,
52
+ `range` and `number` and the date/time family, each of which reads `←`/`→` itself (a native radio
53
+ group moves its selection with them, so moving the row as well would fire two things on one key) —
54
+ nor from a `textarea`, a `select`, `[contenteditable]`, an ARIA role that owns them (`combobox`,
55
+ `listbox`, `radiogroup`, `slider`, `spinbutton`, `tablist`, `tree`, `treegrid`, `grid`, `menu`,
56
+ `menubar`, `textbox`), media with controls, or an element marked `data-no-arrow-keys`. A checkbox,
57
+ a submit button or a file picker owns no horizontal arrows, so the row still moves from one.
58
+
59
+ Before this, tabbing past a twelve-card row took thirteen presses, with a double stop (the track,
60
+ then immediately the first card's link) to start it — the spec's own Keyboard rule asks a
61
+ composite widget for one stop and arrow keys inside. A carousel whose slides hold nothing
62
+ focusable is unchanged: the track keeps `tabindex="0"` and `←`/`→` step it, which is also what
63
+ `Lightbox`'s stage keeps. **If you assert on the track's `tabindex`, or on every card's link
64
+ being tabbable, those assertions will change.** The composable owns `tabindex` on the slides and
65
+ their controls now, so pass none of your own; `useCarousel` returns `trackFocusable` (bind the
66
+ track's `tabindex` to it) and `focusItem` alongside the existing members.
67
+
68
+ Focus lands on the slide's first **tab stop candidate**: rendered, outside `aria-hidden="true"`,
69
+ not `disabled`, not at the author's own `tabindex="-1"`. A decorative `aria-hidden` image link
70
+ ahead of a card's title link is stepped past rather than focused. A slide with no candidate at
71
+ all — an unlinked figure, or one whose only focusable content is an author's `-1` focus target —
72
+ becomes the tab stop itself (`tabindex="0"` while active, plus the package's `eldra-focus` ring),
73
+ so a carousel is never left with no tab stop; a slide that holds a control has no `tabindex`
74
+ written on it at all. Before the first client render — on the server, and with no JavaScript —
75
+ the pre-enhancement shape stands: the track focusable, every card's link tabbable.
76
+ - New message `slideInstructions` — "Use the left and right arrow keys to move between slides. Press
77
+ Tab to move within the current slide." `Carousel` renders it once per carousel as a visually
78
+ hidden paragraph (new part: `instructions`) referenced by the **root's** own `aria-describedby`,
79
+ so a screen reader hears the keyboard pattern on entering the carousel rather than once per
80
+ slide. Rendered only in the model it describes (slides holding something focusable).
81
+
82
+ ### Fixed
83
+
84
+ - **`Lightbox`** — the image sits centred with equal space above and below. Without a thumbnail strip the stage now has bottom padding matching the bar's height (4rem, 4.25rem below 48rem), where the image used to run to the bottom edge of the viewport.
85
+ - **`Drawer`** — the open dialog stretches between its pinned top and bottom edges instead of taking `100%` of the layout viewport, so a foot pinned to the panel's bottom edge (the filter drawer's **Clear all** / **Show N products**, the cart's **Check out**) sits at the bottom of the visible area on a phone — not under the browser's toolbar, and not above a strip of page.
86
+ - **`Tabs` no longer clips a focused pill's focus ring at the scrolling list's edge.** The tab list is `overflow-x-auto`, which forces `overflow-y` to compute `auto` as well, so it clips anything a tab paints outside its own border box — on every side, not just the two it scrolls on. The design spec's answer is padding on the list with a matching negative margin, and that was written as the literal `0.25rem` the two ring tokens add up to by default, leaving the ring flush against the clip edge with no slack: raise `--eldra-focus-offset` or `--eldra-focus-width` — a restyle, or simply a `Tabs` inside a `Carousel` slide, since the track sets `--eldra-focus-offset: 4px` and custom properties inherit — and the ring was cut off flat by the difference on three edges at once. The reservation is now `calc(var(--eldra-focus-offset) + var(--eldra-focus-width))`, per axis, with `scroll-padding` to match so the inline half cannot be scrolled out of the visible box; the list's rendered footprint is unchanged. The underline variant is untouched and reserves nothing, its tabs carrying the spec's own inset ring. Measured in a real browser with real `Tab` presses, in pixels (`tabsRing.browser.spec.ts`) — it needs Chromium, like the kit's other browser specs.
87
+
88
+ - **`Price` now formats through `formatCurrency`, so it writes the same sign and the same digits as every other currency in the kit.** Its formatter was built by hand, without the narrow display, so an Icelandic store's price read `"ISK 2,800"` on an `en-US` page while the `CurrencyInput` the operator typed that price into read `"kr 2,800"` — the same money in two signs, on the same storefront. One thing changes for a store, and it reaches `ProductCard` through its own `Price` as well:
89
+ - **The sign.** The new `narrowSymbol` prop is `true` by default, the same default `CurrencyInput` already carried; pass `false` for the previous wide sign. This changes what a store sees only where its currency and content locale differ in their signs (`ISK` under `en-US`, `USD` under `is-IS`, `CAD`/`AUD` under `en-US`); a locale whose two signs are identical — `is-IS` writes `kr.` either way — is unaffected.
90
+ - **The fraction digits are unchanged**, deliberately. The ported formatter's own rule is a maximum of `2` and a minimum of `0` — the rule a currency *field* wants, where it shows what a person typed — so `Price` passes `currencyFractionDigits(currency, locale)` as both, which is exactly what the currency's own `Intl` defaults gave before: `"$48.00"` is still `"$48.00"`, `"6.990 kr."` is still itself, and a three-decimal currency still prints three places. Only the sign moved.
91
+ - `SearchBar` / `SearchModal`: the live region announces the response as soon as it arrives instead of waiting out another 400ms. The debounce is the typing pause; once it has fired for a query, the response *for that query* replaces "Searching…" in the same tick the panel's rows change. A response arriving mid-pause still waits it out, and no longer restarts it.
92
+ - `SearchBar` / `SearchModal`: the live region no longer announces "No results for “q”" while a
93
+ request for that query is still in flight. With `results` absent — the consumer's "nothing yet",
94
+ which already drew the loading panel rather than the empty one — the region now announces the new
95
+ `searchLoading` message, and the count (or a genuine "No results") lands when the response does.
96
+ The visible panel was already right; the announcement contradicted it for as long as the request
97
+ took.
98
+ - `Lightbox`: the thumbnail strip has room above the tiles for the current tile's outline, which the strip's own scroll container used to clip.
99
+ - `Carousel`: slide positions are measured relative to the track (the track is now positioned, and
100
+ the slide-start math subtracts the track's own offset when a `classes.track` override removes
101
+ that positioning). Previously `offsetLeft` was measured from the page, so on any page where the
102
+ track sat away from the left edge the counter snapped back to the previous slide after each
103
+ `next` while the track stayed where it was, and `goTo` overshot by the same offset.
104
+ - **`Carousel`: the ring reservation on the track is per axis now, and a block's own edge-to-edge
105
+ bleed goes through `--eldra-carousel-bleed` instead of its own padding utilities.** The track
106
+ reserves room for a slide's focus ring because `overflow-x-auto` makes it clip one; that
107
+ reservation was a single `p-*`/`-m-*` pair, and a consumer passing a gutter through
108
+ `classes.track` (`px-[gutter] … @tablet:px-0`) silently took the inline half of it away — `px-*`
109
+ and `p-*` are different `tailwind-merge` groups, so both classes survived the merge and
110
+ `padding-inline`, which Tailwind emits after `padding`, simply won. The visible result was a
111
+ focused first card with its ring drawn on top and right and cut off flat down its left edge. The
112
+ inline padding, its negative margin and the scroll padding are now one `max(var
113
+ (--eldra-carousel-bleed, 0px), ring reach)` each, so a bleed composes with the reservation rather
114
+ than replacing it, and the three can never fall out of step. **If you bled a track with your own
115
+ `-mx-`/`px-`/`scroll-px-` utilities, set the variable instead** (`[--eldra-carousel-bleed:1rem]
116
+ @tablet:[--eldra-carousel-bleed:0px]` through `classes.track`); a padding utility of your own
117
+ still wins on that axis, and still costs the ring its room there.
118
+ - **`Carousel`: a focus ring a consumer puts on the slides with `classes.slide` is visible at last.**
119
+ `eldra-focus` is keyed to the element's own `:focus-visible`, and in the roving model a slide that
120
+ holds a control is not focusable at all — so that ring was fully declared, permanently at alpha 0,
121
+ and could not appear on any interaction. The component now adds `eldra-focus-proxy`
122
+ (`:has(:focus-visible)`) beside it whenever the slide's entry point is a control inside the slide,
123
+ which is the same modifier `Checkbox` and `ProductCard` already draw their ring with. Exactly one
124
+ element still rings: the component's own slide ring is only ever added to a slide that *is* the
125
+ tab stop, and a card that brings its own ring draws it on the card.
126
+
127
+ - **Fix (2026-09-27, package bug): `Carousel`'s `perView` now actually reaches a consumer's CSS.**
128
+ The track set `--eldra-carousel-per-view` through interpolated Tailwind arbitrary-property classes
129
+ (`` `[--eldra-carousel-per-view:${n}]` ``, plus `@tablet:`/`@content:` steps), and Tailwind scans
130
+ source *text* for class names — an interpolated value is never in it. A consumer's build emitted no
131
+ rule for any of the three, the slide width formula fell back to `1`, and every carousel rendered
132
+ one full-width slide (the starter's testimonials, product row, `split-carousel` hero and
133
+ `carousel` gallery at once). The three numbers now arrive as an inline style on the track
134
+ (`--eldra-carousel-per-view-base`/`-md`/`-lg`) and the breakpoints are static CSS: the new
135
+ `eldra-carousel-track` utility. **Breaking for a direct caller of the composable's helper:**
136
+ `carouselPerViewClasses` is replaced by `carouselPerViewStyle`, which returns the style object
137
+ instead of a class string, and a track built by hand needs the `eldra-carousel-track` class.
138
+ `Lightbox` moved with it. Consumers of `<Carousel>`/`<Lightbox>` themselves need no change, and
139
+ `--eldra-carousel-per-view`/`--eldra-carousel-gap` are still the variables to override.
140
+ - **Fix (2026-09-27): `Breadcrumb`'s expand focus move works with a component `linkAs`.** After the
141
+ ellipsis is activated, focus moves to the first revealed link; with a component `linkAs` (a
142
+ `NuxtLink`/`RouterLink` wrapper) Vue's `:ref` gives a component instance rather than an element, so
143
+ the previous `HTMLElement` cast reached a `focus()` only when the component happened to expose one
144
+ and did nothing at all otherwise. The package now prefers a component's own exposed `focus()` and
145
+ falls back to its `$el`, so the guarantee is the package's rather than the consumer's.
146
+ - **`classes` parts given an array are flattened, and warned about in dev.** `classes: { root: [...] }`
147
+ used to render an array's *indices* as class names (`class="0 1"`), silently replacing the classes
148
+ that were written with two that style nothing. `cx` now flattens one the way Vue's `:class` array
149
+ syntax does, and `partClass` emits a single `console.warn` naming the component and the part under
150
+ `import.meta.env.DEV` (production carries neither the message nor the check). One class string per
151
+ part is still the contract — the type is unchanged.
152
+ - **`formatDate` takes an options argument** (`FormatDateOptions`, also exported): the
153
+ `Intl.DateTimeFormatOptions` subset `day`/`month`/`year`/`weekday`, where an omitted key keeps the
154
+ default `12 Sep 2026` style rather than dropping that part — so `{ month: 'long' }` is a one-key
155
+ change to the long form. Never-throwing as before, now including the options themselves: a value
156
+ outside `Intl`'s own enums falls back to the default style and warns once in dev instead of
157
+ throwing a `RangeError` out of a `computed`.
158
+ - **`VariantPicker` takes a `legend` prop separate from `name`.** A page rendering more than one
159
+ picker has to give each a unique radio-group `name`, which until now also became the visible
160
+ legend — and, since a `<fieldset>`'s `<legend>` is the group's accessible name, what a screen
161
+ reader announced. `legend` is the human label, `name` stays the grouping key, and `name`'s own
162
+ behaviour is unchanged whenever `legend` is absent.
163
+
164
+ - **Fix (2026-09-27, package bug): `@content:`/`@wide:`/`@narrow:` container-query variants now
165
+ actually compile.** `tailwind.css`'s `@theme` block declared `--container-narrow`/`-content`/
166
+ `-wide` as `var(--eldra-container-*)`, but a `@container` condition cannot reference a custom
167
+ property — Tailwind silently dropped all three variants instead of erroring, so `Container`'s own
168
+ `@content:` desktop gutter, and every starter block's `@content:` layout, never engaged (the
169
+ starter's footer, for example, shipped its mobile layout at any width). The three theme keys are
170
+ now literal lengths (40rem/64rem/80rem, matching `eldra-starter-spec/tokens.json`), and
171
+ `Container`'s own `width` prop reads three new dedicated `eldra-container-{narrow,content,wide}`
172
+ utilities instead of Tailwind's now-literal `max-w-narrow`/`-content`/`-wide`, so a consumer can
173
+ still restyle a block's width at runtime by setting `--eldra-container-{narrow,content,wide}`. See
174
+ the README's Deviations entry for the full mechanism.
175
+ - **Fix (2026-09-26, operator report: "we are not able to drag on a card, we have to place the
176
+ cursor between cards"): `Carousel`/`Lightbox` pointer drag now starts on any pointer press inside
177
+ the track — a slide's own link or button included — not only the track's bare background.** The
178
+ previous fix bailed out of tracking a pointerdown on any link/button/`role="button"`, which is
179
+ exactly why a `ProductCard`'s card-covering title link swallowed every drag attempt; now only an
180
+ editable/range control (`input`, `textarea`, `select`, `[contenteditable]`, `input[type="range"]`)
181
+ or an explicit `data-no-drag` opt-out is excluded. The pointerdown itself is never
182
+ `preventDefault()`ed (the previous fix did this on every qualifying press, which is what also
183
+ suppressed a slide's own focus/click below the drag threshold); a text selection the bare
184
+ `mousedown` already started is instead cleared the instant the gesture actually crosses the
185
+ threshold. The click a mouse drag fires on release is still cancelled, but only after a real
186
+ drag — a sub-threshold press still clicks or navigates normally, on a link or button exactly as it
187
+ did on plain track background.
188
+ - **`Accordion` animates height on expand and collapse** (operator, 2026-09-26): opening plays a
189
+ `Element.prototype.animate` height transition from `0` to the panel's measured content height
190
+ (`--eldra-duration-base`/`--eldra-ease-out`), driven by the native `toggle` event so a
191
+ browser-forced open (find-in-page revealing a match inside a closed panel) animates too, with no
192
+ click involved. Closing intercepts the summary's `click` (and the `Enter`/`Space` activation the
193
+ browser converts into one) to play the same animation in reverse
194
+ (`--eldra-ease-in`) before flipping `open` itself, so `modelValue`/`toggle` still fire at exactly
195
+ the point they did before. The existing opacity fade is unchanged and runs alongside. Reduced
196
+ motion skips the height animation entirely, the same way `useCarousel`/`Tooltip` check it. An
197
+ exclusive-`name` group's sibling closed by another item opening still closes instantly, with no
198
+ collapse animation of its own — see the README's Deviations entry for the full account.
199
+
200
+ - **`Breadcrumb` items sit closer together** (operator, 2026-09-26): the list gap is 0.25rem and the chevron carries 0.125rem on each side (1.5rem between words instead of 2rem).
201
+
202
+ - **Fix (2026-09-26, operator report): `Carousel`/`Lightbox` pointer drag and touch swipe actually
203
+ work; no text selection while dragging; `Breadcrumb` separator chevron enlarged.** The track's
204
+ `scroll-smooth` was fighting the drag's own instant `scrollLeft` writes (each one started an
205
+ animation the next write interrupted) — `data-[dragging=true]:scroll-auto` now rides the same
206
+ `data-dragging` attribute as `snap-none`, with a forced reflow before the release snap so it still
207
+ animates. `touch-action` changes from `touch-pan-y` alone to `touch-pan-x touch-pan-y`, restoring
208
+ native horizontal touch-swipe panning that `pan-y` alone left with no native handler. A mouse drag
209
+ no longer highlights text: `onTrackPointerDown` now calls `preventDefault()` once a drag may
210
+ start, and `document.documentElement`'s own `user-select` is suppressed for the drag's duration
211
+ (the pointer can leave the track), restored on release. `Breadcrumb`'s separator chevron grows
212
+ from `size-1.5` (0.375rem, the spec's own number) to `size-4` (1rem) — see the README's Deviations
213
+ entries for both.
214
+ - **Batch fix (2026-09-26): `Breadcrumb` separator alignment for every position (including a
215
+ wrapping current-page title); `Carousel`/`Lightbox` pointer drag now also ends on
216
+ `lostpointercapture`; `Tooltip` no longer treats Enter/Space typed inside an editable trigger as
217
+ activation.** `Breadcrumb`'s separator no longer branches its class recipe by position — every
218
+ separator is now the same fixed 24px (`h-6`) top-pinned flex frame around the chevron, and the
219
+ current-page `<span>` carries the same `target-min` frame the trail links use, so a separator's
220
+ vertical position no longer depends on which kind of sibling it precedes (see the README's
221
+ Deviations entry for the geometry). `useCarousel`'s pointer drag now also listens for
222
+ `lostpointercapture` — capture can be revoked with no preceding `pointerup`/`pointercancel` (an
223
+ OS edge-swipe gesture, another element stealing capture) — ending the drag exactly like
224
+ `pointercancel` does: snapping to the nearest slide, clearing `data-dragging`, resuming autoplay.
225
+ `Tooltip`'s `onRootKeyDown` now only treats `Enter`/`Space` as activation when the event's own
226
+ target is button/link-like (`button`, `a[href]`, `[role="button"]`, `[role="link"]`, `summary`),
227
+ never an editable one (`input`, `textarea`, `select`, `[contenteditable]`) — a `role="description"`
228
+ tooltip on a text input no longer disappears for the rest of the focus session after the first
229
+ space or Enter typed into it.
230
+ - **`Tooltip` hides after pointer activation; focus holds only when keyboard-visible** (operator
231
+ report, 2026-09-26: "hover and click the element, the tooltip gets stuck and does not disappear
232
+ on hover-out"). `focusWithin` counted any `focusin` toward the spec's "focus within it", and a
233
+ mouse click also focuses its target, so `mouseleave` alone could no longer hide the bubble.
234
+ `wantsOpen` now reads a new `keyboardFocusWithin`, gated on `element.matches(':focus-visible')`
235
+ behind a `supportsFocusVisible` feature test with a same-page keyboard/pointer fallback flag for
236
+ where `:focus-visible` cannot be trusted (`supportsFocusVisible.ts`, mirroring `Textarea`'s
237
+ `supportsFieldSizing`). Activating the trigger (`pointerdown`, `click`, or an `Enter`/`Space`
238
+ `keydown`) now also dismisses the tooltip exactly like `Esc` does, clearing again on the next
239
+ hover or the focus actually leaving — see the README's Deviations section.
240
+ - **`Carousel` and `Lightbox` gain pointer drag (operator fix).** Touch already swiped the track
241
+ for free through native scroll-snap; mouse/pen dragging the track now does too. `Carousel` gets
242
+ a `draggable` prop (default `true`); `Lightbox` inherits it through `useCarousel` unchanged, on
243
+ its image stage (thumbnails unaffected). A drag past a 6px threshold suspends scroll snapping
244
+ (`cursor-grab`/`cursor-grabbing`, `touch-pan-y` so a touch page-scroll still works) and moves
245
+ `scrollLeft` with the pointer; release snaps to the nearest slide, biased one slide further by a
246
+ fast flick (> 0.5 px/ms), and cancels the click that would otherwise follow the drag. Starting a
247
+ drag on a slide's own link/button is left alone entirely, so its click still works regardless of
248
+ how far the pointer moves. Autoplay pauses for the span of a drag and resumes after, without
249
+ flipping the Pause/Play label; reduced motion still snaps instantly. `index`/`update:index` and
250
+ the arrows/keyboard are unchanged.
251
+ - **Operator fix (2026-09-26): links underlined at rest by default; `Breadcrumb` separator
252
+ geometry.** `Link` now underlines every variant at rest, including `standalone` — WCAG 2.2 F73 /
253
+ 1.4.1 — with a new `underline` prop (default `true`) whose `false` value restores the old
254
+ standalone-only, hover-appears shape for a navigation bar whose own design removes the rest-state
255
+ underline. The same underline-at-rest change reaches `Breadcrumb`'s trail links and the stretched
256
+ title links `ContentCard`, `FeatureCard` and `ProductCard` build on `stretchedLink.ts` — see the
257
+ README's Deviations entries for the full reasoning; `LogoItem`'s link and `Rating`'s linked
258
+ variant were reviewed and left unchanged. Separately, `Breadcrumb`'s separator chevron no longer
259
+ sits above the baseline before a link: it was centred with a fixed `mt-1.875` sized for a plain
260
+ text line, applied even before a `target-min` (1.5rem) link or the ellipsis button — it now uses
261
+ `align-self: center` there instead, keeping the old fixed offset only before the trail's final,
262
+ possibly-wrapping current-page item.
263
+ - **Fix: closed modal dialogs (`Dialog`, `Drawer`, `Lightbox`, `SearchModal`) rendered their full
264
+ box instead of nothing.** Each root's own `display` utility (a bare `flex`, or nothing at all)
265
+ overrode the UA stylesheet's `dialog:not([open]) { display: none }` — an author `display` rule
266
+ always beats a user-agent one in the cascade, regardless of specificity, so the closed `<dialog>`
267
+ kept its box on screen (most visibly, a `Drawer`'s `Cart` story: "opens as a dialog; once closed
268
+ it just sits on the right-hand side"). Every modal root now carries `hidden open:flex`
269
+ (`Drawer`/`SearchModal`) or `hidden open:block` (`Dialog`/`Lightbox`, whose roots never used
270
+ `flex` — `open:flex` there measurably narrows the panel at small viewports, a flex item's default
271
+ shrinking fighting the UA `dialog:modal` rule's own `max-width`; `open:block` does not) instead —
272
+ `hidden` sets `display: none` unconditionally, `open:<value>` only wins once the `open` attribute
273
+ is back, by specificity, both being the same author origin.
274
+ - **Modal stacking is now allowed, superseding the design spec's "Never stack two modals" rule**
275
+ (operator override; see the README's Deviations entry for the full reasoning). A modal may open
276
+ another modal on top of it — `Drawer`'s new `StackedConfirm` story is a cart drawer whose
277
+ "Remove" opens a confirm `Dialog` — with `Esc` and a backdrop click acting only on the topmost
278
+ one; a lower modal stays open, untouched, until the one above it closes. `dialogStack.ts` changed
279
+ from a single slot that refused a second `showModal()` to a stack: opening pushes, closing pops,
280
+ `TOAST_HOST_KEY` and the scroll lock both track/hold for the stack rather than one dialog.
281
+ Closing the top returns focus to whatever was focused in the modal underneath, for free (the
282
+ existing per-instance opener capture already worked this way).
283
+ - **Plan 3 final review fixes.** `Dialog`/`Drawer`/`Lightbox` default `modelValue: undefined`
284
+ (not a literal `false`), so an uncontrolled instance is genuinely self-managing instead of
285
+ permanently "controlled" the moment a parent stops binding `v-model` — see `useControllableModel`'s
286
+ own doc comment. A programmatic close (a parent setting `modelValue` to `false` directly) now
287
+ reports `close("programmatic")` instead of a stale reason left over from an earlier close via the
288
+ close button; `Drawer`/`SearchModal` inherit it through `useDialog`. `Pagination`'s compact status
289
+ ("Page 2 of 12") bolds the page numbers by splitting the translated sentence on digit runs,
290
+ message contract unchanged. `Carousel`'s `Play` button no longer re-arms autoplay under reduced
291
+ motion. `Toast`/`Toaster`'s types (`ToastProps`, `ToasterProps`, `ToastPart`, `ToasterPart`,
292
+ `ToastVariant`, `ToastAction`) are now exported from the root entry, closing the one gap in an
293
+ index-order guard that now checks every component directory has a matching type-export block. The
294
+ component value-export list in `src/index.ts` is fully alphabetical (`Pagination`/`Popover`,
295
+ `Toast`/`Toaster`/`Tooltip`), guarded going forward. The README's per-component CSS-variable table
296
+ was accidentally duplicated (both copies incomplete) by an earlier change; merged into one
297
+ complete table, with a guard that fails on a second copy or a duplicated row. `@eldrajs/ui —
298
+ everything, without vue`'s size budget is raised to 80 kB (the real, tree-shaken cost of twelve
299
+ overlay/navigation components — see `.size-limit.cjs`'s own comment), alongside a new
300
+ `Badge`-only 12 kB budget that keeps tree-shaking itself guarded. Internal plan/task references
301
+ ("Task 11", "plan-3 Task 3") are reworded to plain design-decision language throughout the shipped
302
+ source, README and starter; `publicRepoHygiene.spec.ts` now catches a bare reference like this
303
+ too, not only an artifact filename. `Tooltip` warns in development when its ARIA graft
304
+ (`aria-labelledby`/`aria-describedby`) does not reach the DOM — a slotted trigger with
305
+ `inheritAttrs: false` whose own template rebinds the attribute after `v-bind="$attrs"`
306
+ (`Input`/`Textarea`/`Select`/`Switch`/…) silently overwrote it — and documents the trigger
307
+ contract this implies. `Tabs`' `v-model` is now tested through the slot-children API, not only
308
+ `items`; manual activation gained a direct Enter/Space selection test.
309
+ - **Task 13 (starter, docs, closing) for the "overlays, navigation and feedback" sub-project.** The
310
+ starter (`examples/starter-nuxt`) drops its last hand-rolled overlay/navigation primitives:
311
+ `UiAccordion.vue`/`UiAccordionItem.vue`, `UiDialog.vue`, `UiDrawer.vue` and
312
+ `UiTabs.vue`/`UiTab.vue`/`UiTabPanel.vue` (plus their stories and `__tests__`) are deleted, and the
313
+ composables only they used (`useAccordion`, `useCarousel`, `useFocusTrap`, `useScrollLock`,
314
+ `useTabs`, plus `test/useFocusTrap.spec.ts`/`useScrollLock.spec.ts`) go with them. Every block that
315
+ used them now imports the package component directly: `faq` → `Accordion`/`AccordionItem`;
316
+ `gallery`'s lightbox → `Lightbox` (its own images now carry `width`/`height`, falling back to the
317
+ demo assets' real 1600×1000 where a media item has none) and its `carousel` variant, and
318
+ `testimonials`' `carousel` variant, → `Carousel`; `navigation`'s mobile menu → `Drawer`, moved to
319
+ `side="left"` (the package's own convention for a menu drawer, `right` being for a cart/filters/
320
+ quick-view sheet — the hand-rolled version used `right`). No block in this starter has a search
321
+ trigger or toast-like feedback, so `SearchModal` and `Toaster` are not wired in; `UiTabs`/`UiDialog`
322
+ had no block usage to move either, only the files to delete. `UiImage.vue` stays — it carries
323
+ Studio's own image-framing contract, not a duplicate of anything this package ships (see the
324
+ README's Deviations entry). `test/support/dialog.ts` (the `showModal`/`close` polyfill) stays too:
325
+ the starter's own vitest config still runs on jsdom, which — unlike the package's own happy-dom
326
+ suite — implements neither method natively, regardless of which component now calls them.
327
+ `app/i18n`'s `gallery.previous`/`.next`/`.imageOf`/`.open`, `carousel.previous`/`.next`/`.slideOf`
328
+ and `dialog.close` keys are removed (dead: `Lightbox`/`Carousel`/`Dialog` carry their own English/
329
+ Icelandic vocabulary now); `gallery.viewer` and `testimonials.carousel` replace them as the two
330
+ blocks' own fallback accessible names for when they have no heading to use instead. Previews
331
+ regenerated for the four changed blocks (`faq`, `gallery`, `navigation`, `testimonials`).
332
+ `README.md`: fixed a merge artifact in the Composables section that left two contradictory,
333
+ partially-duplicated sentences about which modal surfaces `useDialog`/`useToast` are shared by
334
+ (`Drawer`/`Lightbox`/`SearchModal`, all three, now that all three have landed); `Accordion`'s
335
+ Deviations-adjacent ordinal ("the first component of the sub-project") is now `Task 6`, matching
336
+ every sibling entry's own "Task N" convention, and `SearchModal`'s entry gained the `Task 12`
337
+ reference every other component in this sub-project already carries. `docs/starter-kit.md` now
338
+ describes the starter's primitives as package components throughout, with `UiImage` named as the
339
+ one exception and why.
340
+ - **`SearchModal`** — Task 12 of the "overlays, navigation, feedback" sub-project. Puts the Search
341
+ bar's field, results panel and listbox inside a native `<dialog>`,
342
+ opened by a consumer's own trigger or by `/`/`⌘K`/`Ctrl+K` from anywhere. Built on `useDialog`
343
+ (the same shared modal contract `Dialog`/`Drawer` use) and the reused `SearchResultsPanel`/
344
+ `useListbox` pair (`SearchResultsPanel` gained a `flat` prop for this: no floating position,
345
+ border, shadow or open animation of its own). Properties mirror `SearchBar`'s data props
346
+ (`results`, `loading`, `recent`, `popular`, `showRecent`, `resultTypes`, `placeholder`, `action`,
347
+ `shortcut`), plus `ariaLabel` (the dialog's own accessible name, default `messages.search`) and a
348
+ named `query`/`update:query` v-model distinct from the open/closed `modelValue`. Recent searches
349
+ share `SearchBar`'s own `localStorage` key. `/` opens it only while no `SearchBar` on the page
350
+ owns that key, and `⌘K`/`Ctrl+K` always opens it — `shortcutOwner.ts` gained a `kind` parameter
351
+ (default `'/'`, so every existing call is unchanged) for the independent `⌘K` queue. `Esc` is the
352
+ spec's own three steps (clear the active option; clear the query; close), handled by a listener on
353
+ the dialog's native `cancel` event rather than `useDialog`'s `onCancel` (which cannot prevent the
354
+ close that always follows it). The dialog is `min(40rem, 100vw - 2rem)` wide, 8vh from the top,
355
+ full screen below a 48rem *viewport* (`eldra-search-modal-width`/`-max-height`/`-position`, the
356
+ same bundled-media-query technique `eldra-drawer-width` uses). `README.md` gained the
357
+ `SearchModal` Customisation row and nine Deviations entries; `docs/ui.md`'s "Navigation, overlays
358
+ and feedback" list gained a `SearchModal` bullet.
359
+ - **`Popover`** — an operator addition beyond design spec 1 (plan 3 task 5), for the private
360
+ component library's own `Popover`/`Dropdown`: a generic non-modal trigger + floating panel for
361
+ menus, filters and dropdowns, built on `usePopover` (`Select`/`MultiSelect`/`SearchBar`'s own
362
+ shared machinery — the "only one open at a time" registry, `useOverlay`'s closing rules,
363
+ `useFloating`'s positioning, the teleport, the pointer latch), one level more generic: it draws no
364
+ listbox of its own and joins the same registry, so opening it closes an open `Select` and vice
365
+ versa. Parts `root` (a `display: contents` wrapper), `trigger` (not drawn — the consumer's own
366
+ element, wired through a scoped slot: `{ open, toggle, attrs }`, `attrs` carrying `id`, `type:
367
+ 'button'`, `aria-haspopup`, `aria-expanded`, `aria-controls` and the click/pointerdown pair for
368
+ `v-bind="attrs"`, mirroring the private library's own `#trigger="{ triggerAttrs }"` shape) and
369
+ `panel` (the floating box, teleported and positioned exactly like `Select`'s). The panel carries no
370
+ default `role` — a consumer's own fallthrough attrs (`inheritAttrs: false`) land on it directly
371
+ (`<Popover role="menu">`), and `ariaLabel` sets its `aria-label`. `tabRedirect` is always on;
372
+ opening moves no focus into the panel (the private library's own `focusOnOpen: false` default).
373
+ `modelValue` (two-way), `placement` (`useFloating`'s own vocabulary), `matchWidth`, `teleport`
374
+ (`boolean` only — no custom-selector target for this addition). `README.md` gained the `Popover`
375
+ Customisation row and an Additions entry; `docs/ui.md`'s "Navigation, overlays and feedback" list
376
+ gained a `Popover` bullet (and lost a stray duplicate heading line left over from an earlier
377
+ merge).
378
+ - **`Pagination` and `LoadMore` — Task 9 of the "overlays, navigation, feedback" sub-project.**
379
+ - `Pagination`: numbered links (previous/next, page numbers collapsing to "…" past `siblings`
380
+ pages on each side of the current one, first and last always shown) with a compact "Page 2 of
381
+ 12" alternative, switched by a `@container` query on the pagination's own root — not the
382
+ viewport — from 48rem of its own width; `compact` forces the compact form regardless of width.
383
+ Renders nothing at all with one page or fewer. With `hrefForPage` (page → URL), every control
384
+ is a real `<a href>` (`rel="prev"`/`rel="next"` on the ends, `linkAs` for a router component,
385
+ the same contract `Link`'s own `as` uses — named `linkAs` rather than `as` because this
386
+ component's root is spec-fixed, the same reason `ContentCard`/`FeatureCard`/`ProductCard`'s
387
+ own title-link prop is `linkAs`); without it, the controls are `<button type="button">`s that
388
+ emit `update:page` instead. Parts: `root`, `list`, `item`, `page`, `current`, `ellipsis`,
389
+ `prev`, `next`.
390
+ - `LoadMore`: a live "Showing 24 of 96 products" status (`role="status" aria-live="polite"`), a
391
+ decorative progress meter, and an outline button that hides once `shown` reaches `total`,
392
+ stays clickable and shows a spinner while `pending` (the same "still clickable, the action is
393
+ already under way" rule `Button`'s own `loading` state follows), and is `aria-describedby` the
394
+ status. Emits `load`. Parts: `root`, `status`, `button`.
395
+ - New messages: `pagination`, `previousPage`, `nextPage`, `pageN(n, current?)`,
396
+ `pageOfTotal(page, total)`, `showingOf(shown, total, noun)`, `loadMore` — in both `en-US` and
397
+ `is-IS`.
398
+ - **Final whole-branch review fixes for the "display, commerce and layout" sub-project.**
399
+ - `formatDate` (`src/utils/date.ts`) never throws now: a malformed, empty or calendar-invalid
400
+ date (`'2026-02-30'`) returns `null` instead of an Invalid Date/`RangeError`, and `ContentCard`
401
+ renders no `<time>` at all for one rather than a fabricated `"Jan 1, 1900"`.
402
+ - `Skeleton` gained a `busyLabel?: string | null` prop (spec :3340): with one given, the root is a
403
+ named live busy region (`role="status"`, `aria-busy="true"`, `aria-label`, every shape
404
+ individually `aria-hidden`); without it the root stays plain `aria-hidden`, as before.
405
+ `ContentCard`'s own loading state is now a named `role="group"` region too, matching
406
+ `ProductCard`'s existing treatment.
407
+ - Removed every internal SDD planning-artifact reference (numbered task/fix filenames and their
408
+ review reports, and the private planning repo's own directory path) from shipped files,
409
+ including one that named a full private-repo path in
410
+ `examples/starter-nuxt/app/components/ui/UiImage.vue`. `src/__tests__/publicRepoHygiene.spec.ts`
411
+ now fails on any of those patterns in `src/`, `README.md`, `CHANGELOG.md` and the starter's
412
+ `app`/`blocks` directories.
413
+ - `ContentCard`/`FeatureCard`/`ProductCard`'s title-link prop is now **`linkAs`**, not `as` — the
414
+ card's own root is spec-fixed, so `as` was ambiguous with `Badge`/`Container`/`Section`'s `as`,
415
+ which picks the root tag itself. Breaking, pre-release.
416
+ - `Section.label` and `ChipGroup.label` are now **`ariaLabel`** — both are accessible-name-only
417
+ props, and `label` means visible text everywhere else in this package. Breaking, pre-release.
418
+ The starter's own `[...slug].vue` not-found `Section` switched from `:label` (duplicating a
419
+ visible `<h1>`) to `:labelled-by` pointing at it.
420
+ - `ProductCard` now consumes `card/stretchedLink.ts`'s shared `CARD_FOCUS_PROXY`/
421
+ `STRETCHED_LINK`/`STRETCHED_LINK_OUTLINE` instead of a hand-rolled copy of the same classes, and
422
+ wraps its composed `Price`/`Rating`/`StockBadge` in their own `<div data-part="…">` (the same
423
+ convention already used for `Image`'s `media` wrapper) so each child's own `data-part="root"`
424
+ survives instead of being overwritten by the parent's fallthrough attribute.
425
+ - `ProductCard`'s sale badge no longer renders (a fabricated "−0%") for `badge: { variant: 'sale'
426
+ }` with no real discount.
427
+ - `Price`'s `srLabel` part is renamed **`srText`**, matching `Avatar`/`LogoItem`'s naming for the
428
+ same visually-hidden-text concept. `StockBadge`'s `out` level now reads the shared `soldOut`
429
+ message key instead of a separately-translatable `stockOut` (identical string in both locales).
430
+ - `AvatarGroup` warns once in dev when `max` is out of the 0–3 range it clamps to, matching the
431
+ package's existing override-warning convention; `Chip`'s leading `Avatar` scales its icon/
432
+ initials fallback down to the chip's own leading size instead of leaving them sized for a 2rem
433
+ circle, and now passes `label` as the `Avatar`'s `name` so a broken image falls back to initials
434
+ rather than the generic icon.
435
+ - `frameAspectRatio`, `formatDate`, `useSlotPresence`, `useHeadingTag`/`HeadingLevel`,
436
+ `roundRatingToHalf`/`ratingStarStates`, and `initialsFromName` are now exported from the root
437
+ entry, matching their plan-1 peers (`cx`, `mixToward`, `useUiId`, …); `tagRecipe`/`listFormat`
438
+ stay internal (class strings and a join helper, not public API).
439
+ - **`Toast`, `Toaster` and `useToast` — Task 3 of the "overlays, navigation, feedback" sub-project.**
440
+ A brief, non-blocking status message in a fixed bottom-right region (design spec's Toast
441
+ section): `useToast()` is a module-level queue (`show`/`dismiss`/`clear`/`toasts`), callable from
442
+ anywhere, not only from a `Toaster`'s own subtree; `Toaster` is the one host an app mounts once
443
+ (`<Toaster />`, no props required) and owns every timer, the region's placement, and rendering the
444
+ queue. `show({ variant, title, text?, action?, duration?, id? })` resolves `variant` (default
445
+ `"success"`) and `duration` together — `success` 6000ms, `warning` 10000ms, both overridable,
446
+ `danger` always `0` regardless of what is passed (never auto-dismissed); an `id` dedupes (a second
447
+ `show()` with the same `id` replaces that toast in place rather than adding a second one); at most
448
+ three toasts queue at once, the oldest evicted when a fourth arrives. Parts (`data-part`): `Toast`
449
+ — `root`, `icon`, `title`, `text`, `action`, `close`; `Toaster` — `root`, `list`. Every timer pauses
450
+ while the pointer is over the stack or focus is inside it, and resumes for whatever time was left;
451
+ `Esc` closes only the toast that holds focus (its `keydown` handler also `preventDefault()`s, so a
452
+ toast teleported inside an open `Dialog` does not also close the dialog behind it — see the
453
+ Deviations entry). Two live regions, never nested: non-danger toasts render inside an always-
454
+ present `role="status" aria-live="polite"` `list`; a danger toast is `role="alert"` on `Toast`'s
455
+ own root, rendered as a further direct child of `root`, a sibling of `list`, never inside it.
456
+ While a modal `Dialog` is open, `Toaster` teleports its region into that dialog's own element
457
+ (`TOAST_HOST_KEY`, from Task 1's `dialogStack`) instead of `<body>`, so a toast raised mid-flow is
458
+ never inert behind it. `useToast` is SSR-safe: no `window`/`document` access and no timer starts
459
+ outside `Toaster`. New `tailwind.css` utilities: `eldra-toast-width` (the region's own width,
460
+ capped at `100vw - 2rem`), `text-toast-title`, and the `eldra-toast-in` entrance keyframes (fade +
461
+ 0.5rem rise over `duration-base` `ease-out`; reduced motion needs no second keyframe — the zeroed
462
+ duration token already produces no movement) — all registered in `src/utils/cx.ts`'s merge groups.
463
+ New messages: `dismissNotification` ("Dismiss notification", the close button's name, distinct
464
+ from the generic `close`), `notifications` (the region's `aria-label`), in both `en-US` and
465
+ `is-IS`. `README.md` gained the `Toast`/`Toaster` Customisation rows, a `useToast` Composables
466
+ write-up, and four Deviations entries (no exit animation, `Toaster`'s two-part anatomy despite the
467
+ danger group, `list`'s `hidden`-while-empty collapse, and the Escape `preventDefault()`).
468
+ - **`Dialog` and `useDialog`/`dialogStack` — Task 1 of the "overlays, navigation, feedback"
469
+ sub-project, and the foundation `Drawer`, `Lightbox`, `SearchModal` and the `Toaster` build on.**
470
+ `Dialog` is a small modal window for one decision or a short form (design spec's Dialog section):
471
+ a native `<dialog>` opened with `showModal()`, no `role="dialog"` anywhere and no custom focus
472
+ trap — a modal `<dialog>` already makes the rest of the page inert and already contains
473
+ `Tab`/`Shift+Tab` to its own controls for free. Parts (`data-part`): `root`, `panel`, `header`,
474
+ `title`, `close`, `description`, `body`, `footer`; slots `default` (body) and `footer`; props
475
+ `modelValue` (two-way), `title` (required, the `<h2>`/`aria-labelledby`), `description`
476
+ (`aria-describedby`, omitted for a form body), `size` (`sm` 24rem / `md` 32rem, both capped at
477
+ `100vw - 2rem`), `dismissable` (default `true` — a backdrop click only), `messages`, `classes`;
478
+ emits `update:modelValue`, `cancel` (the native `cancel` event, before the dialog actually
479
+ closes), `close` (with how: `"escape"`, `"backdrop"`, `"button"`, or an action value passed to
480
+ the exposed `close(returnValue)` method — `<Dialog ref="dialogRef">` then
481
+ `dialogRef.value.close('remove')` from a footer button's own handler). `useDialog`
482
+ (`src/composables/useDialog.ts`, exported from the root) is the reusable modal lifecycle every
483
+ later modal surface is built on: open/close synced to `open`, initial focus (the first meaningful
484
+ control that is not `[data-part="close"]`, applied a tick after `showModal()`), focus return to
485
+ the opener, `Esc` always closing (never `dismissable`-gated), and a backdrop click closing only
486
+ when `dismissable` is `true`. `dialogStack.ts` (also exported) is the "never stack two modals"
487
+ registry: a second `showModal()` while one is open is refused with a dev-only console warning and
488
+ the refused dialog's own `v-model` is put back to `false`; it also owns the page-scroll lock
489
+ (`<html>` gets `overflow: hidden` while any modal is open) and `TOAST_HOST_KEY` — a plain
490
+ `Ref<HTMLDialogElement | null>`, **not** a Vue injection key despite matching this package's
491
+ `*_KEY` naming convention (see its own doc comment: a `Toaster`, plan-3 Task 3, mounts as a
492
+ sibling of whatever opens a `Dialog`, and `provide`/`inject` cannot connect siblings) — that
493
+ Task 3's `Toaster` will read to render its live region inside the open dialog rather than being
494
+ inert behind it. New `tailwind.css` utilities: `text-dialog-title`, `eldra-dialog-width(-sm)`,
495
+ `eldra-dialog-max-height`, and the `eldra-dialog-in`/`-reduced` entrance keyframes (fade + 0.5rem
496
+ rise + scale over `duration-slow` `ease-out`; reduced motion is a real 200ms linear fade, not the
497
+ zeroed-duration token, the same exception `animate-eldra-pulse` makes for the Button spinner) —
498
+ all registered in `src/utils/cx.ts`'s `cx()` merge groups. `README.md` gained the `Dialog`
499
+ Customisation row, a `useDialog` Composables write-up and four Deviations entries (the close
500
+ button's active state as a 2% scale rather than a 1px translate, the `close` event's reason for a
501
+ plain external close, `TOAST_HOST_KEY`'s not-an-injection-key shape, and `defineExpose`d
502
+ `close`/`isTop` instead of an `actionValue` prop); `docs/ui.md` gained an "Overlays" section.
503
+ - **`Tabs`, `Tab` and `TabPanel`** — task 7 of the "overlays, navigation and feedback"
504
+ sub-project (design spec's "Tabs" section, APG tabs pattern with automatic activation by
505
+ default). Two ways to build one: `items` (`{ value, title, content? }`) renders the whole thing
506
+ from data; for panel content richer than plain text, place `<Tab>`s in the `tabs` slot and
507
+ `<TabPanel>`s in the default slot instead. Both share one implementation — `items` renders as
508
+ exactly that `Tab`/`TabPanel` pair internally — and one new `TABS_KEY` context
509
+ (`src/components/tabs/context.ts`, exported from the root entry): each `Tab` registers itself in
510
+ `onMounted`/unregisters in `onBeforeUnmount`, which is what gives `Tabs` its children's order
511
+ (Vue mounts siblings in document order) with no prop telling it what that order is, needed both
512
+ for the spec's "defaults to the first tab" rule and for cross-tab arrow-key moves.
513
+
514
+ Roving tabindex: only the selected tab has `tabindex="0"`, the rest `-1`, set from selection and
515
+ moved together with `aria-selected` on every change. `←`/`→` move focus one tab, wrapping at the
516
+ ends; `Home`/`End` jump to the first/last. Under the default `activation="auto"` moving focus
517
+ selects immediately; `"manual"` moves focus only, and `Enter`/`Space` select through the tab's
518
+ own native `<button>` activation — no keydown handling for either key exists at all, since a
519
+ second path risked firing selection twice. Each panel is `role="tabpanel"
520
+ aria-labelledby` its
521
+ tab, `hidden` when inactive, and gets `tabindex="0"` only when it holds no focusable content of
522
+ its own (the API contract's "panel focusability rule" — see the README's Deviations entry).
523
+
524
+ `underline` (default) draws a per-tab indicator bar, and `pills` a per-tab filled background —
525
+ the spec's "the indicator does not slide" means there is no shared, position-animated element to
526
+ slide in the first place: each `Tab` owns its own indicator (or, for pills, its own fill), shown
527
+ or hidden by a `duration-fast` colour transition alone. The tab list scrolls horizontally rather
528
+ than wrapping, scrollbar hidden via the new `eldra-scrollbar-hide` `tailwind.css` utility (no
529
+ stock Tailwind equivalent, registered in `src/utils/cx.ts`'s own merge group). `Tab`'s own type
530
+ style reuses `VariantPicker`'s `text-variant-pill` (same numbers, same "no baked-in weight"
531
+ reasoning) rather than a new utility; see the README's Deviations entry for that and for the
532
+ spec's `label` property shipping as `ariaLabel` (package convention) and the lack of a
533
+ `disabled` tab, which the spec's own "Tabs" section never mentions.
534
+
535
+ Parts (`data-part`, and `classes` keys): `root`, `list`, `tab`, `indicator`, `panel` — the last
536
+ three drawn by `Tab`/`TabPanel`, which `Tabs` forwards its own `classes.tab`/`.indicator`/
537
+ `.panel` to in the `items` API, and which a standalone `<Tab>`/`<TabPanel>` takes directly in the
538
+ slots API. Stories: `Underline`, `Pills`, `Manual`, `ManyTabs`, `LongContent`, `Narrow`,
539
+ `ReducedMotion`, `ForcedColors`.
540
+ - **`Accordion` and `AccordionItem`** (design spec's "Accordion" section) — Task 6 of the
541
+ "overlays, navigation and feedback" sub-project. Native `<details>`/`<summary>` disclosure
542
+ rows: `Accordion` is a plain grouping wrapper (`multiple`, default `true`; `false` puts every
543
+ child `AccordionItem` in the same native `name` group, generated when not given, so the browser
544
+ closes the previously open sibling itself). `AccordionItem` takes `title`, an optional `help`
545
+ line (part of the accessible name for free, since both are plain text inside the same
546
+ `<summary>`), `modelValue` (two-way, mirroring the native `open` attribute — see the README's
547
+ Deviations entry for why this is `modelValue` and not the spec's own `open`), `headingLevel`
548
+ (`2`–`4`, no default — plain text unless the page outline needs a heading) and `href` (a link
549
+ row: a plain `<a>` styled as the same trigger, no `<details>`, no chevron, no panel). The chevron
550
+ is Tabler's `chevron-down` geometry, rotating 180° on open via a new self-conditioned
551
+ `eldra-accordion-chevron` utility (`details[open] & { rotate: 180deg }`, reduced motion baked
552
+ in); the panel fades in via `eldra-accordion-panel` (`@starting-style` plus
553
+ `transition-behavior: allow-discrete` on `opacity`/`display`) rather than animating height — see
554
+ the README's Deviations entry for why a grid-rows height animation was rejected. Same-`name`
555
+ exclusivity is native in every current browser and feature-detected
556
+ (`src/components/accordion/detailsExclusivity.ts`), with a JS fallback that only runs where the
557
+ platform lacks it — which is also what the test suite (happy-dom) exercises, since that engine
558
+ implements neither the grouping algorithm nor the `.name` property.
559
+ - **`Drawer` — Task 2 of the "overlays, navigation, feedback" sub-project, built on Task 1's
560
+ `useDialog`.** A modal side sheet for long content (design spec's Drawer section): the cart,
561
+ filters and quick view slide in from the right; the mobile menu from the left. Native `<dialog>`
562
+ + `showModal()`, sharing `Dialog`'s one-modal-at-a-time `dialogStack` slot. Parts (`data-part`):
563
+ `root`, `panel`, `header`, `title`, `count`, `close`, `body`, `footer`; slots `default`
564
+ (scrolling body) and `footer` (fixed); props `modelValue` (two-way), `side` (`"right"` default /
565
+ `"left"`), `title` (visible `<h2>`, `aria-labelledby`), `ariaLabel` (the accessible name with no
566
+ visible heading — the menu drawer: `ariaLabel="Menu"` — the API contract's own `label` renamed to match
567
+ this package's "accessible-name-only props are `ariaLabel`" convention), `count` (appends "(3)"
568
+ in `muted` next to `title`), `width` (a CSS length feeding `--eldra-drawer-width`, default
569
+ `28rem`, always capped at the viewport), `messages`, `classes`; emits `update:modelValue`,
570
+ `cancel`, `close` (with how — the identical `"escape"`/`"backdrop"`/`"button"`/action-value shape
571
+ `Dialog`'s own `close` uses). No `dismissable` prop: the spec gives a drawer's backdrop click no
572
+ exception, unlike `Dialog`'s. Below a 48rem **viewport** (one of only two rules in the whole
573
+ design spec measured on the viewport rather than a container — the other is form-field text) the
574
+ drawer covers the full screen, via a plain `@media (width < 48rem)` query baked into the new
575
+ `eldra-drawer-width` utility itself, never a `@container` query. The right side (cart, filters,
576
+ quick view) focuses the close button on open by default, unless a control inside is marked
577
+ `autofocus` — the opposite of `Dialog`'s own "never the close button while a better candidate
578
+ exists" — computed as `Drawer`'s own `initialFocus` passed into the same `useDialog` call
579
+ `Dialog` uses; the left side (the menu) gets no override, so `useDialog`'s existing default (the
580
+ first focusable that is not `[data-part="close"]`) already gives "the first link in the menu" for
581
+ free. A new `closeDrawer(name)` message (`en-US`/`is-IS`) gives the close button a name-specific
582
+ accessible name ("Close cart", "Close menu") from whichever of `title`/`ariaLabel` names the
583
+ drawer, falling back to the plain `close` message with neither. New `tailwind.css`: `text-drawer-
584
+ title`, `eldra-drawer-width` (the width variable, viewport clamp and full-screen media query all
585
+ in one utility), and the `eldra-drawer-in-right`/`-left` entrance keyframes (a `translateX` slide
586
+ over `duration-slow` `ease-out`, applied to the root `<dialog>` the same way `Dialog`'s own
587
+ `animate-eldra-dialog-in` is) — reduced motion reuses `Dialog`'s own `eldra-dialog-in-reduced`
588
+ fade rather than a third keyframe, since both spec sections ask for the identical plain opacity
589
+ fade. All new utilities registered in `src/utils/cx.ts`'s `cx()` merge groups. `README.md` gained
590
+ the `Drawer` Customisation row, a `useDialog` Composables note, and Deviations entries (`label` →
591
+ `ariaLabel`, the viewport-not-container full-screen rule, the width variable, the right-side
592
+ close-button-first focus rule, no `dismissable` prop, the reused reduced-motion keyframe, the
593
+ root-not-panel animation placement, the name-specific close message, and the `modelValue`/`close`
594
+ event naming versus the spec's literal `open`/`openChange`/`afterLeave`); `docs/ui.md`'s
595
+ "Overlays" section gained a `Drawer` bullet.
596
+ - **`Tooltip`** (design spec's "Tooltip" section, plan 3 task 4) — a short, non-modal text label
597
+ that names an icon-only trigger on hover and keyboard focus, or adds a description to one that
598
+ already has a visible label (`role="label"` / `role="description"`). Built directly on
599
+ `useFloating` and `useOverlay` — never on `usePopover`, and never joining its "only one open at a
600
+ time" registry, so showing a tooltip can never close somebody else's open `Select`. `placement`
601
+ (`top`/`bottom`) and `align` (`start`/`center`/`end`) cover the spec's Variants table;
602
+ `useFloating`'s `FloatingPlacement` gained `top-end`/`bottom-end` to express `align="end"`. The
603
+ bubble is teleported like the popover panels (a new internal `useTeleportTarget`, shared with
604
+ `usePopover`, which now reads from it too with no behaviour change) but stays mounted
605
+ permanently and fades with a CSS transition, unlike a `usePopover` panel's mount-and-replay
606
+ keyframe — a transition only plays on a change to an element already in the DOM. WCAG 1.4.13:
607
+ dismissible (`Esc`, without moving focus), hoverable (a CSS bridge across the visual gap) and
608
+ persistent (stays until hover and focus both end). The trigger's `aria-labelledby`/
609
+ `aria-describedby` is wired onto the slotted element itself via `cloneVNode`, the one place in
610
+ the package that reaches into a slot's own vnode. See the README's Deviations section for the
611
+ full reasoning on each of these.
612
+ - **`Carousel` and `useCarousel`** — task 10 of the "overlays, navigation and feedback"
613
+ sub-project (design spec's "Carousel" section). A native scroll-snap track with arrows, an
614
+ optional counter and dots, and optional autoplay with a mandatory Pause/Play button (WCAG
615
+ 2.2.2): `ariaLabel` (required, the region's own accessible name), `perView` (a number or
616
+ `{ base, md, lg }`, default `1.25`; `md`/`lg` are the package's own 48rem/64rem container-query
617
+ breakpoints — the same ones `Container`'s gutter step reads), `controls` (`"header"` default or
618
+ `"below"`), `dots`, `counter`, `autoplay` (ms; any non-zero value always renders Pause/Play).
619
+ Arrows and dots never loop — they disable at the ends, and a focused arrow that becomes disabled
620
+ moves focus to the other one; only autoplay wraps from the last slide back to the first.
621
+ Autoplay pauses on hover, on focus and while the tab is hidden, and never starts at all under
622
+ reduced motion. `useCarousel` (`src/components/carousel/useCarousel.ts`, exported from the root)
623
+ is the whole behaviour with no rendering of its own — index tracking from real scroll geometry
624
+ (with an index-based fallback where none exists), previous/next/`goTo`, edge detection, autoplay
625
+ — reading the track's own DOM children directly rather than Vue's slot vnodes, and annotating
626
+ each one in place (`data-part="slide"`, `role="group"`, `aria-roledescription="slide"`, an "n of
627
+ total" `aria-label`, the `eldra-carousel-slide` sizing class) via a `MutationObserver`, so a
628
+ consumer's own `<li>`/`<figure>`/component root becomes the slide with no wrapper added — the
629
+ same file a future `Lightbox` (task 11) reuses unchanged for its own track. See the README's
630
+ Deviations entries for the ways this simplifies the spec's own product-row/gallery split (one
631
+ slide-labelling rule for both, one fixed track name, no separate "slideshow" suffix on
632
+ Pause/Play, an unbolded counter).
633
+ - **`Lightbox`** — task 11 of the "overlays, navigation and feedback" sub-project (design spec's
634
+ "Lightbox" section). A full-screen native `<dialog>` image viewer for product galleries, built on
635
+ `useDialog` and `useCarousel` unchanged: `modelValue`/`index` (both two-way), `images` (`{ src,
636
+ alt, caption?, width, height }[]`), `ariaLabel` (required), `thumbnails`. A counter, close button
637
+ and previous/next arrows sit in a bar/stage around a one-image-per-view track; arrows never loop,
638
+ and a focused arrow that becomes disabled moves focus to the other one, exactly like `Carousel`.
639
+ Opens at `index` with no scroll animation, then scrolls smoothly on every later move unless
640
+ reduced motion is on. Initial focus is the close button (the opposite of `Dialog`'s own rule);
641
+ focus returns to the opener on close. `←`/`→` move the image from anywhere in the viewer, not
642
+ only a focused track. There is no backdrop click and no `dismissable` prop — the viewer's own
643
+ ground covers the backdrop entirely. `Image` (this task) gained a `fit?: 'cover' | 'contain'`
644
+ prop for the Lightbox's own "never crop a full-resolution photo" rule; see the README's
645
+ Deviations entries for that and the rest of this task's judgment calls (the always-full-screen
646
+ reading of the spec's own viewport exception, the `<div>`-not-`<figure>` slide wrapper axe fix,
647
+ and the `*Image` message vocabulary).
648
+ - **`Lightbox` fix: full-resolution images no longer fetch while the viewer is closed.** Every
649
+ slide's `Image` was `priority` (eager) and unconditionally in the DOM, on the mistaken premise
650
+ that a closed `<dialog>`'s own `display: none` blocks every fetch regardless of `loading` — true
651
+ for `loading="lazy"`, **false for an eager `<img>`**, which starts fetching the moment it is
652
+ connected to the DOM. A `Lightbox` mounted closed next to a product gallery downloaded every
653
+ full-resolution photo immediately. `Image` is now `v-if="model"` inside each slide (the slide
654
+ `<div>` wrapper itself stays mounted, since `useCarousel`'s own index/count maths reads its
655
+ children directly and must not depend on `MutationObserver` timing across an open/close
656
+ transition); every slide stays `priority` once it exists, since by definition that is only while
657
+ the viewer is open. Also: the track's own `aria-label` is now the spec's literal "Images" (a
658
+ dedicated `lightboxImages` message key), not `Carousel`'s own "Slides", which the original task
659
+ reused by oversight. New tests cover the closed/open/reopened-closed image lifecycle and the
660
+ track's own label; see the README's Deviations entries for the full reasoning.
661
+ - **Task 13 (starter, docs, closing) for the "display, commerce and layout" sub-project.** The
662
+ starter (`examples/starter-nuxt`) drops its last duplicated primitives of package components:
663
+ `UiBadge.vue`, `UiPrice.vue` and `UiRating.vue` (plus their stories and `__tests__`) are deleted,
664
+ and every block/page that used them now imports `Badge`/`StockBadge`, `Price` and `Rating`
665
+ straight from `@eldrajs/ui`, the same way blocks already import `Button`/`Input`/`Link`/`Icon`/
666
+ `Image`. `UiImage.vue` stays (it carries Studio's own framing contract, not a duplicate — see
667
+ the README's Deviations entry); `UiAccordion*`/`UiDialog`/`UiDrawer`/`UiTab*` stay (plan 3).
668
+ `README.md`'s Customisation table now has a row for every one of this package's 38 components
669
+ (`src/componentNames.ts`), guarded against drift by the new
670
+ `src/__tests__/readmeCoverage.spec.ts`; the "sixth component" ordinal collision in this file
671
+ (`Avatar`/`LogoItem`/`Skeleton`/`EmptyState` all separately claiming "sixth") is renumbered by
672
+ actual landing order (`LogoItem` seventh, `Skeleton` eighth, `EmptyState`/`EditorPlaceholder`
673
+ ninth); `README.md`'s Deviations section gained the `Container`/`Section` entries
674
+ (`data-section-bg`, `SECTION_KEY`'s nesting warning) and the `EditorPlaceholder`-icon-via-`Icon`
675
+ entry that earlier tasks recorded in their own reports but never actually added to the file.
676
+ `ProductCard`'s title link now uses `outline-none`, matching `stretchedLink.ts`'s own
677
+ `STRETCHED_LINK_OUTLINE` decision, instead of the `outline-hidden` it shipped with (a double-ring
678
+ bug under forced colours that Task 12's own report flagged for a later task to fix, since
679
+ `ProductCard` merged after `ContentCard`/`FeatureCard` despite landing as the earlier-numbered
680
+ task). `docs/ui.md` gained a full one-line-per-component list; `docs/starter-kit.md` reflects the
681
+ starter's primitive table after this move.
682
+ - **`ContentCard` and `FeatureCard`** — the editorial/journal card and the icon feature card
683
+ (design spec's "Content card" and "Feature card" sections), both composing `Image`, `Skeleton`
684
+ and a shared "whole card is one link" pattern. `ContentCard` renders optional media (`ratio`
685
+ `3x2`/`4x3`/`16x9`, `radius-lg`), an eyebrow, a title (the stretched link), a clamped excerpt, a
686
+ date + meta line (`date` formatted through the new `src/utils/date.ts#formatDate` as
687
+ `<time datetime>`), and a `variant` (`plain`/`surface`/`outlined`) — `plain` with no `image`
688
+ renders as `surface` automatically, `surface` shows an optional "Read the update"-style link cue
689
+ pinned to the card's bottom, `outlined` pins a count meta ("24 products") there instead.
690
+ `FeatureCard` renders an icon tile, title, body and, only when `href` makes it linked, a "Learn
691
+ more" cue (new `learnMore` message key) — unlinked cards have no tab stop at all. Both take
692
+ `headingLevel` (2–6, default `3`) and `as` (the same `Button`/`Link` contract: a string tag still
693
+ takes `href`, a component takes it as `to`).
694
+
695
+ Root `<article>`/`<div>`, the whole card a single tab stop with the standard focus ring around it
696
+ at `radius-lg` corners — the shared pattern lives in
697
+ `src/components/card/stretchedLink.ts` (`CARD_FOCUS_PROXY`, `STRETCHED_LINK`,
698
+ `STRETCHED_LINK_OUTLINE`), the same `eldra-focus-proxy` shape `Checkbox`'s drawn box uses, applied
699
+ here to a *visible* title `<a>` rather than a hidden input. New `text-content-card-title` and
700
+ `text-content-card-excerpt` `tailwind.css` utilities (the latter shared by `FeatureCard`'s `body`,
701
+ since both read the same 0.9375rem spec number).
702
+
703
+ See `README.md`'s Deviations section for the shared stretched-link file (and the note for
704
+ `ProductCard`, landing in the same wave, to reuse it), the `outline-none` vs. `outline-hidden`
705
+ decision, and the `formatDate` locale behaviour.
706
+ - **`EmptyState` and `EditorPlaceholder`** — the ninth component of the "display, commerce and
707
+ layout" sub-project (design spec's "Empty and error states" section). `EmptyState` is the shared
708
+ "nothing here / no results / error" panel shown inside a block: an icon circle, a required
709
+ `title`, optional `text` (max 36ch, `null` renders nothing), and an `actions` slot scoped with
710
+ `{ retrying }` so a caller's own "Try again" `Button` can bind `:loading="retrying"` itself. With
711
+ no `actions` slot, `variant="error"` alone renders a built-in "Try again" `Button` (new `tryAgain`
712
+ message key) wired to `retrying` and emitting `retry` — `empty`/`noResults` have no generic
713
+ action to fall back to, since the spec's own examples are all store-specific. `variant`
714
+ (`empty`/`noResults`/`error`, default `empty`) sets the role — `status` for the first two,
715
+ `alert` for `error` — and colours the icon circle `danger` for `error`, default icon or caller's
716
+ own alike. With no `icon` prop a built-in Tabler-geometry icon is drawn per variant (inbox,
717
+ magnifying glass, warning triangle) at the spec's 1.75rem / 1.5 stroke, the same "copy the path
718
+ data, no runtime `@tabler/icons-vue` dependency" approach `StockBadge`'s icons already use.
719
+ `plain` drops the boundary and background for a state already inside a drawer, list or card;
720
+ `headingLevel` (2–6, default `3`) picks the title's heading element. New `text-empty-state-title`
721
+ `tailwind.css` utility.
722
+
723
+ `EditorPlaceholder` is the Studio page-builder's own hint for an unfilled block field — an
724
+ optional icon, a required `label` (the action, e.g. "Add products"), and optional `help`
725
+ guidance — never rendered on the live storefront and, per the spec's own accessibility note,
726
+ carrying no ARIA role. `inline` shrinks the padding from 2rem to 1rem for a hint inside a compact
727
+ inline field (an empty heading). New `eldra-editor-placeholder-border` `tailwind.css` utility
728
+ (1.5px dashed boundary, distinct from `EmptyState`'s own 1px one).
729
+
730
+ See `README.md`'s Deviations section for the default-icon-per-variant choice, the
731
+ `empty`/`noResults`-have-no-built-in-action decision, and the new `tryAgain` message key.
732
+ - **`Container` and `Section`** — the layout primitives every block is built from (design spec's
733
+ "Container and section" section). `Section` sets the background (`none`/`surface`/
734
+ `surface-strong`/`primary`/`accent`) and the vertical `spacing` (`none`/`sm`/`md`/`lg`, from the
735
+ new `--eldra-section-*` tokens split into separate `pt-*`/`pb-*` utilities); `Container` sets the
736
+ max content width (`narrow`/`content`/`wide`/`full`, the existing `--eldra-container-*` scale)
737
+ and the side gutters (`--eldra-gutter-mobile/-tablet/-desktop`, breakpointed on the **block**
738
+ width via the `@tablet`/`@content` container queries already declared for `Button`, not the
739
+ viewport). `Section` renders `<section aria-labelledby>` when given `labelledBy`, `<section
740
+ aria-label>` when given only `label`, or a plain `<div>` with neither — `as` overrides the tag
741
+ outright, independent of the aria attributes, for a `<header>`/`<footer>` landmark that needs no
742
+ name of its own. A `primary`/`accent` `Section` marks itself `class="group/section"
743
+ data-section="primary|accent"`, the same mechanism `Button`, `Link`, `Price` and `Rating` already
744
+ read for their own colour inversion (task 6 is the first to render it); every background,
745
+ including `none`, is also marked with the new `data-section-bg`, which a new unlayered rule in
746
+ `tailwind.css` reads to drop a `Section`'s own top padding when the **previous** sibling `Section`
747
+ shares its background (spec Do/Don't: "alternate none and surface between neighbouring blocks
748
+ instead of adding divider lines") — unlayered CSS always wins the cascade over the layered
749
+ `pt-*` utility it overrides, regardless of specificity, so `Section`'s own `spacing` stays an
750
+ ordinary, always-overridable class. `Section` is `@container`, which is what every block's own
751
+ breakpoints (and `Container`'s gutters) measure — the anatomy's "block root" — and it provides
752
+ the new `SECTION_KEY` for its own subtree, so a `Section` mounted inside another warns in
753
+ development against the spec's "sections are never nested inside another section". The starter
754
+ (`examples/starter-nuxt`) moves onto both in the same change: every block replaces its copied
755
+ `UiContainer`/`UiSection` primitives with these, `app/assets/main.css` no longer declares its own
756
+ container/gutter rules or `--spacing-section`/`-lg` (`Container`/`Section` own that now), and the
757
+ regenerated block previews are the visible result.
758
+ - **`Chip` and `ChipGroup`** — an operator addition beyond design spec 1 (the private component
759
+ library's `FilterChip`, for a store migrating onto this package): a removable tag or a
760
+ selectable filter chip, never both at once on the same element (see `README.md`'s Additions
761
+ entry for why). `size` `sm`/`md`, `removable` (a `"Remove <label>"` button, `Backspace`/`Delete`
762
+ on a focused root or that button), `selectable`/`selected` (a real `aria-pressed` `<button>`,
763
+ filled `primary` when selected), an optional leading `icon` or `avatar`, `disabled`. `ChipGroup`
764
+ (`modelValue: string[]`, `label`, `disabled`) is a `role="group"` slot wrapper, like
765
+ `ButtonGroup`, that derives a member chip's selected state and toggle from context rather than
766
+ props. New `CHIP_GROUP_KEY`/`ChipGroupContext` exported from the root entry for a consumer
767
+ building a chip-like control of its own.
768
+ - **`Avatar` and `AvatarGroup`** — the sixth component of the "display, commerce and layout"
769
+ sub-project (design spec's Avatar section). `Avatar` is the people/maker identity atom: a round
770
+ `sm`/`md`/`lg`/`xl` (2rem/2.5rem/3.5rem/6rem) circle that falls back image → initials → the
771
+ generic user icon. `src` accepts an `ImageMedia` (`Image`'s own type) or a bare URL string, and
772
+ falls back automatically on a failed `<img>` load, not only a missing `src`. Initials are the
773
+ first letter of the given and family name, uppercase (`src/utils/avatar.ts#initialsFromName`;
774
+ a single-word name takes its own first two letters instead of a lone one). `decorative`
775
+ (default `true`) hides the avatar from assistive technology, for the common case where the name
776
+ is printed right next to it (a review byline); `false` renders a standalone avatar instead,
777
+ `role="img"` with `aria-label` set to `name`, and a dev-only console warning fires if that name
778
+ is missing (WCAG 1.1.1/4.1.2). New `text-avatar-initials-{sm,md,lg,xl}` and
779
+ `eldra-avatar-icon-{sm,md,lg,xl}` `tailwind.css` utilities.
780
+
781
+ `AvatarGroup` stacks up to three avatars plus a "+N" counter (never more than four circles in
782
+ total — `max` is clamped to 0–3 regardless of what is passed), each avatar `decorative` and
783
+ overlapping the last by 25% of its diameter with a 2px `background` ring. The whole group is one
784
+ `role="group"` named by a single accessible sentence — `aria-labelledby` pointing at a visually
785
+ hidden `srText` part — built by the new `avatarGroup(label, names, more)` message:
786
+ `"Makers: Ingrid, Tomas, Maya and 4 more"`, joined by the new
787
+ `src/utils/listFormat.ts#formatConjunctionList` (`Intl.ListFormat` per locale, with its English
788
+ Oxford comma stripped to match the spec's own example, and a hand-written fallback for a runtime
789
+ with no `Intl.ListFormat` at all). See `README.md`'s Deviations section for the `max` clamp, the
790
+ fixed `sm` group size (the API contract's own `AvatarGroupProps` type has no `size` prop) and the
791
+ Oxford-comma decision.
792
+ - **`LogoItem`** — the seventh component of the "display, commerce and layout" sub-project (design
793
+ spec's Logo item section). One logo in a stockist/press logo cloud: `name` (used as the logo
794
+ image's `alt`, never "logo", and as the wordmark text), an optional `logo` (`ImageMedia | null`;
795
+ no logo renders the wordmark fallback, never an empty cell), and an optional `href` that renders
796
+ the cell as a link (`as` follows `Link`'s own contract — a string tag still takes `href`, a
797
+ component takes it as `to`). The rendered element is always a real `<li>`, since `<ul role="list">`
798
+ only reads as a list once its children are real `<li>`s; unlinked, the `<li>` is the cell itself,
799
+ linked, the `<a>`/`as` becomes the cell (padding, 4rem min-height, the `eldra-focus` ring at
800
+ `radius-md`) and the outer `<li>` is bare — see the README's Deviations entry for why `root`
801
+ moves rather than staying on one fixed tag. The logo image is greyscale + 110% contrast at 75%
802
+ opacity, contained within 2.5rem × 9rem (new `--eldra-logo-image-max-height`/`-max-width`
803
+ variables), rising to 100% opacity on hover only when linked; the wordmark is `muted` turning
804
+ `text` on hover, in a new `text-logo-wordmark` type style. A linked item's accessible name gets
805
+ the new `stockistSite` message (" (stockist site)") appended automatically when `href` looks
806
+ external (an absolute URL) — `LogoItem` has no `external` prop like `Link`'s, so this is judged
807
+ from the href itself — and `linkContext` overrides the judgement either way, rendered verbatim.
808
+ - **`Skeleton`** — the eighth component of the "display, commerce and layout" sub-project (design
809
+ spec's Skeleton section). A neutral, shimmering loading placeholder: `variant` picks the shape —
810
+ `text` (default; `lines` rows, each a percentage width cycling 85/70/55/35% deterministically by
811
+ index, or the row's own `100%` for a single line), `title` (one fixed 60%-wide bar), `circle`
812
+ (`size`, default `2.5rem`, width = height, fully round), `media` (`ratio`, default `4x5`, the
813
+ same presets `Image`'s `src/utils/ratio.ts` uses), `btn` (the shared `control-height`, matching a
814
+ resting `Button`). Every shape is the `eldra-skeleton` utility (`tailwind.css`) — the shimmer
815
+ `Price`'s own loading state already draws — which was already reduced-motion aware (no change
816
+ needed there). `width` sizes the root itself instead of letting it fill its container: the root
817
+ is `block`/`w-full` by default (never `inline-*`) so the default percentage-wide `text`/`title`
818
+ shapes resolve against something even inside an ordinary block layout; `width` is the escape
819
+ hatch for a shrink-to-fit ancestor (`inline-flex`/`inline-block`), where a percentage width would
820
+ otherwise collapse to nothing exactly like the trap `Price`'s own loading state once had — every shape then
821
+ renders at the root's own (now definite) full width instead of its default fraction of it. The
822
+ root is `aria-hidden="true"`; there is no live region — a loading region's own `aria-busy`/hidden
823
+ text is the caller's responsibility, not this primitive's. `Price` and `Image` keep their own
824
+ inline loading skeletons unchanged (follow-up: point them at `Skeleton` itself in a later pass).
825
+ - **`ProductCard`** — the first composed component of the "display, commerce and layout"
826
+ sub-project (design spec's Product card section): the product tile used in every grid, carousel
827
+ and search result, assembling `Image`, `Price`, `Rating`, `Badge`, `StockBadge`, `Button` and
828
+ `Skeleton` — all already shipped — rather than duplicating any of them. `product` is one object
829
+ (`ProductCardProduct`: `title`, `url`, `vendor`, `featuredImage`, `price`, `rating`, `colours`,
830
+ `badge`, `stock`, `available`); `showVendor`/`showRating`/`showSwatches`/`quickAdd` toggle the
831
+ optional rows, `ratio` picks the media's aspect (`4x5`/`1x1`/`3x4`, default `4x5`), `headingLevel`
832
+ sets the title's heading level (default `3`), `loading` swaps the whole card for a skeleton, and
833
+ `currency`/`locale` pass straight through to `Price`. The whole card is one stretched link (a
834
+ card-covering `::after` on the title's `<a>`, anchored to the card root so it is not clipped to
835
+ the title's own box) with the design spec's proxy focus ring (`eldra-focus-proxy`) drawn on the
836
+ card itself, `radius-lg` cornered; quick add sits above that overlay (`relative z-10`) so
837
+ clicking it never navigates, and is named "Quick add" plus the full product title via the new
838
+ `quickAdd(title)` function message, applied as the button's `aria-label`. Sold out
839
+ (`available: false`) dims the media to 60% opacity, shows an outline "Sold out" `Badge` in the
840
+ media-corner badge stack (never alongside a sale/new badge — a third badge is never rendered),
841
+ and replaces quick add with a disabled "Sold out" button. The sale badge's rounded percentage
842
+ ("−20%") derives from `price.compareAt`/`price.amount`, independently of the caller's own
843
+ `badge` field. Colour dots show up to three plus a "+N" overflow, `aria-hidden`, summarised by a
844
+ new hidden `swatchesAvailable(n)` message ("Available in N colours"). An addition beyond the
845
+ spec's own 8-part anatomy: when `product.stock` is set (and the product is not sold out), a
846
+ `StockBadge` status line renders above quick add — see the README's Deviations section for why,
847
+ and for the corner "Sold out" badge being a plain `Badge` rather than `StockBadge` despite the
848
+ API contract's own framing. New messages: `quickAdd`, `quickAddLabel`, `newBadge`,
849
+ `loadingProduct`, `swatchesAvailable`, in both `en-US`/`is-IS`.
850
+ - **`Image`** — the fifth component of the "display, commerce and layout" sub-project (design
851
+ spec's Image section). The responsive media frame every card and block builds on: a fixed aspect
852
+ preset (`auto`, `1x1`, `4x3`, `3x2`, `16x9`, `3x4`, `4x5`, default `4x3`) sets the frame's
853
+ `aspect-ratio` (`src/utils/ratio.ts`) — `auto` uses `media.width`/`height`'s own ratio when both
854
+ are given, or 4:3 when there is no `media` at all, so the frame always reserves its space and
855
+ never shifts the layout while an image loads. `focal` (0–100 percent on each axis, default
856
+ centred) sets `object-position`; once `zoom` (1–2) is above 1 the media also scales around a
857
+ `transform-origin` clamped into the safe band for that zoom, so a focal point near an edge never
858
+ pulls the image away from the frame's own edge and exposes it (never stretched, never
859
+ letterboxed). With no `media`, the live site shows a hatched `surface` placeholder (new
860
+ `eldra-image-placeholder-hatch` `tailwind.css` utility) with a photo icon and "No image",
861
+ `role="img"`/`aria-label="No image available"` unless `decorative` is set; a dev-only console
862
+ warning fires whenever `media` is set but neither `alt` nor `decorative` says anything about it
863
+ (WCAG 1.1.1). `caption` renders a `<figcaption>` and makes the root a `<figure>`. `rounded`
864
+ (`none`/`lg`/`xl`) maps to `radius-lg`/`radius-xl` on the frame. `priority` is for the first hero
865
+ image only (`loading="eager"`, `fetchpriority="high"`); every other image defaults to
866
+ `loading="lazy"`, `decoding="async"`. `loading` renders a skeleton (`eldra-skeleton`) at the
867
+ frame's own ratio instead of `media`/the placeholder. `media.type: 'video'` renders a `<video>`
868
+ with native controls instead of an `<img>`, never autoplaying. `Image` sets `inheritAttrs: false`
869
+ and forwards every attribute except `class`/`style` (which go to the root) onto the `<img>`/
870
+ `<video>` element, so a consumer's `data-testid`, `width`/`height` or a framing helper's
871
+ `data-*` markers land on the media element they describe. New `noImage`/`noImageAvailable`
872
+ messages. The starter's `UiImage` (`examples/starter-nuxt/app/components/ui/UiImage.vue`) is now
873
+ a thin wrapper over `Image` rather than its own hand-rolled `<img>` — see `README.md`'s
874
+ Deviations section for the framing-contract decision and why it is a wrapper, not a replacement.
875
+ Follow-up: `UiImage` gained `rounded`/`fill`/`fit`/`classes`, mapped onto
876
+ `Image`'s `rounded` prop and `classes.frame`/`classes.media`, so every block that needs a
877
+ radius (`hero`, `gallery`, `feature-grid`, `testimonials`, `image`), a background fill
878
+ (`hero`'s `image-background` variant) or an uncropped view (the gallery lightbox) still gets
879
+ one now that a caller's plain `class`/`style` land on `Image`'s root rather than the `<img>`
880
+ itself — see `README.md`'s Deviations section.
881
+ Second follow-up: the navigation block's logo (not a CMS-framed image — no
882
+ `framing`, no `entryId`/`fieldPath`) no longer goes through `UiImage` at all, since its bare
883
+ `class="h-8 w-auto"` had the same class-lands-on-the-root problem the first pass fixed everywhere else;
884
+ it is a plain `<img>` now. `fit="contain"` also shrink-wraps the frame (`classes.frame` gains
885
+ `w-auto max-w-full`) and constrains the media on both axes (`classes.media` becomes
886
+ `object-contain h-auto w-auto max-w-full max-h-[inherit]`) instead of only changing
887
+ `object-fit`, so a portrait image in the gallery lightbox scales down to fit a height cap like
888
+ `max-h-[85vh]` instead of being clipped by the frame's `overflow-hidden` — see `README.md`'s
889
+ Deviations section.
890
+ - **`Button` never grows past the shared control height** (operator addition, 2026-09-25: "make
891
+ all scales match so sm button = sm input, base button = base input, large input = large
892
+ button"). The design spec grows an `md` `primary` button to a 2.75rem touch target below a
893
+ 48rem container; every other sized control already shared `control-h-sm`/`control-h`/
894
+ `control-h-lg` with `Input`, so that one growth was the reason a primary button next to an `md`
895
+ input rendered taller. `Button` now stays on the shared control-height scale at every variant
896
+ and size, in every container (README Deviations). `--eldra-target-touch` and the `target-touch`
897
+ utility are unchanged.
898
+ - **Every enabled button shows `cursor: pointer`** (operator report, 2026-09-25), overriding
899
+ Tailwind v4 preflight's `button { cursor: default }`: every live `Button` variant, the
900
+ `Input`/`SearchBar`/`UnitInput`/`CurrencyInput` clear buttons, a live `QuantityStepper` +/-
901
+ button, a live `Select`/`MultiSelect` trigger, clear button and `MultiSelect` tag remove button,
902
+ and `Switch`. A disabled or loading control keeps its own cursor (`cursor-not-allowed`,
903
+ `cursor-progress`); `Select`/`MultiSelect`'s read-only trigger keeps `cursor-default`; the
904
+ `UnitInput` drag handle keeps `cursor-ns-resize`. `Link` needed no change.
905
+ - **`UnitInput`/`CurrencyInput` tighten trailing action pairs** (operator report, 2026-09-25). With
906
+ the clear button and the drag handle both showing, each action is now `1.5rem` wide with no gap
907
+ between them (still the WCAG 2.5.8 24px minimum) instead of two `2rem` squares a full `gap-1`
908
+ apart — the row previously read as `$1,234,567.89 × ↕`, far wider than any other icon pair in
909
+ the library. A single trailing action (`Input`, `SearchBar`, or `UnitInput`/`CurrencyInput` with
910
+ only the clear button or only the drag handle) is unchanged.
911
+ - **`Rating`** — the fourth component of the "display, commerce and layout" sub-project (design
912
+ spec's Rating section). A read-only five-star rating in half steps: `value` (0–5) rounds to the
913
+ nearest 0.5, rendering full, half (a clipped filled star over an outline star) and empty stars —
914
+ always `text` colour, never yellow or brand colour, with a `border-strong` outline on the empty
915
+ ones so they still meet 1.4.11 on any ground. One accessible sentence
916
+ (`messages.rating(value, count)`, "Rated 4.5 out of 5, 128 reviews") carries the rating for
917
+ assistive technology on `role="img"`/`aria-label`; the stars, value and count underneath are all
918
+ `aria-hidden`, so `showValue`/`showCount` are purely visual — even the stars-only variant keeps
919
+ the full accessible name. `count = 0` renders "No reviews yet" (`messages.noReviews`) instead of
920
+ a value or count, with an optional `emptyAction` slot below it, never a fabricated "0.0". `href`
921
+ (ignored while `count` is `0`) turns the whole rating into one link to the reviews — a single tab
922
+ stop, never one per star — whose visible count switches to a pluralised "128 reviews"
923
+ (`messages.reviewCount`), underlined and thickening on hover; the focus ring is drawn on the root
924
+ via the same proxy-focus technique `Checkbox`/`VariantPicker` use, so it wraps the whole rating
925
+ rather than just the link text, and the root keeps a 1.5rem minimum height (2.5.8). Two sizes,
926
+ `md`/`lg`, changing only the star size — value/count text stays 0.875rem at both. New
927
+ `eldra-rating-half` `tailwind.css` utility (the half star's `clip-path` overlay) and
928
+ `src/utils/rating.ts` (`roundRatingToHalf`/`ratingStarStates`), exported nowhere but used by the
929
+ component and unit-tested on their own.
930
+ - **`Price`** — the third component of the "display, commerce and layout" sub-project (design
931
+ spec's Price section). Formats `amount` (minor units) with `Intl.NumberFormat`, so `4800` reads
932
+ `$48.00` in `en-US`/`USD` and `6990` reads `6.990 kr.` in `is-IS`/`ISK` (no minor units, "."
933
+ thousands grouping) — never a hand-concatenated currency symbol. Sale turns on automatically only
934
+ when `compareAt` is greater than `amount`: the current price turns `accent`, the compare-at
935
+ renders as a real `<s>`, `muted` and struck through, and both are preceded by a visually hidden
936
+ "Sale price"/"Regular price" label (`messages.salePrice`/`regularPrice`, or `labels.sale`/
937
+ `regular` per instance) so a screen reader reads "Sale price $38.40 Regular price $48.00" even
938
+ though many screen readers do not announce strike-through on their own. `from` shows a "From"
939
+ label (`messages.from`/`labels.from`); `unitPrice` renders a second, full-width line ("$5.10 /
940
+ 100 g", `messages.perUnit`); three sizes, only `sm`/`lg` of which set an explicit size — `md`'s
941
+ current price inherits the surrounding text, and `compareAt`/`from`/`unit` scale at `0.9em` of
942
+ whichever size the root ends up at; `loading` replaces the whole price with one shimmering text
943
+ skeleton. New `provideEldraUiCurrency`/`useEldraUiCurrency`/`CURRENCY_KEY`
944
+ (`src/composables/useLocale.ts`), `LOCALE_KEY`'s sibling for the store currency `Price` formats
945
+ with by default (`USD`), and a new `eldra-skeleton` shimmer utility (`tailwind.css`) that the
946
+ `Skeleton` primitive (a later task) reuses for every shape. Every part also carries the
947
+ `group-data-[section=…]/section:` colour-switching classes `Button` and `Link` already use, so a
948
+ `Price` outside a card already reads correctly once `Section` (a later task) lands, without a
949
+ change here.
950
+ - **`Badge` and `StockBadge`** — the first two components of the "display, commerce and layout"
951
+ sub-project (design spec's Badge section). `Badge` is a static, non-interactive `<span>` (or
952
+ `as`) for product flags, categories, materials and order states: six tones, `outline` and `pill`
953
+ shapes, a `variant` of `sale`/`new` that overrides `tone`, an optional decorative leading icon
954
+ (a dev warning when a `success`/`warning`/`danger` badge has none), and a visually hidden
955
+ `hiddenSuffix` that completes a symbol ("−20%" reads "−20% off"). `StockBadge` is the section's
956
+ inline stock status line — icon plus words, no fill — for the four `StockLevel`s (`in`, `low`,
957
+ `out`, `preorder`), each with a fixed colour, a built-in icon and a default message
958
+ (`messages.stockIn`/`stockLow(n)`/`stockOut`/`stockPreorder(date?)`), overridable per instance
959
+ with `message`.
960
+ - **`Select`, `MultiSelect` and `SearchBar` panels are teleported and positioned against the
961
+ viewport.** They were rendered inside the control, positioned `absolute`ly with `z-popover`, so
962
+ any ancestor with `overflow: hidden` clipped them and any later stacking context (a sticky header
963
+ with a `z-index`, a card with `isolate`) painted over them however high that `z-index` was. The
964
+ panel now goes through a `<Teleport>` to `document.body` — or into the open native `<dialog>` the
965
+ control sits in, since that renders in the browser's top layer and `body` would be behind it —
966
+ with floating-ui's `fixed` strategy; `autoUpdate` keeps it on the trigger through every scroll.
967
+ Nothing about opening, closing, the keyboard, `matchWidth`, flipping or the entrance changed, and
968
+ a server render still emits no panel at all. Three consequences worth knowing, all in the
969
+ README's new **Layering** section: a descendant CSS selector rooted **above** the control no
970
+ longer reaches the panel (`data-part` and the `classes` prop still do, and so does
971
+ `#<control-id>-panel`); `--eldra-*` overrides must be set on `:root` rather than on a wrapper
972
+ `<div>`, because the panel no longer inherits from one; and the panel is no longer in document
973
+ order after its trigger, so the `Tab` walk into it is restored by `usePopover`'s new
974
+ `tabRedirect` rather than by the browser (see below). New `teleport` prop on all three controls —
975
+ `true` (default), a CSS selector string, or `false` for the old in-place rendering.
976
+ - **The `SearchBar`'s results panel is now exactly as wide as its field.** It always looked that
977
+ way, but only because its containing block happened to stop it: it is a shrink-to-fit box with a
978
+ `min-width` from the field and no `max-width`, and the teleport would have let it grow to the
979
+ window. `useFloating`'s `matchWidth` takes `'exact'` for that — a floor *and* a ceiling — which
980
+ is what the spec's "Matches the field's width" asks for. `Select`'s panel keeps the floor only,
981
+ and can now really grow to its own `min(22rem, 90vw)` the way its spec describes; in place it
982
+ could never exceed its trigger.
983
+ - **`Tab` still walks into a teleported panel that has tab stops.** Sequential focus follows the
984
+ DOM, and the panel has left it — so `usePopover`'s new `tabRedirect` puts back exactly two steps:
985
+ `Tab` on the **last** tab stop the control still holds (its trigger, or the clear button beside
986
+ it, or anything else carrying `data-eldra-overlay-owner`) moves focus to the panel's first
987
+ focusable, and `Shift+Tab` on that first focusable moves it back there. Everything between stays
988
+ the browser's own order, including the steps inside the control. `Tab` on the panel's **last**
989
+ focusable is left alone, so focus leaves for the page and the popup closes behind it — an exit in
990
+ both directions, which is what keeps this a redirect and not a keyboard trap (WCAG 2.1.2). A
991
+ non-searchable `MultiSelect` therefore still walks trigger → clear button → footer Clear → Done
992
+ exactly as the spec's Keyboard table describes; searchable controls, which already move focus
993
+ into the panel on open, are untouched.
994
+ - **A `<dialog>` teleport target is now chosen by `:modal`, not just by `open`.** Only a dialog
995
+ opened with `showModal()` is in the top layer, and a non-modal `<dialog open>` can sit inside a
996
+ modal one; the nearest ancestor that claims the top layer wins. Where no ancestor claims it — or
997
+ the engine does not implement `:modal` — the nearest open dialog is still used, which is the
998
+ cheaper mistake of the two.
999
+ - **`useOverlay` returns `isInside(node)`**, the same question its closing rules ask: trigger,
1000
+ content, or anything under a `data-eldra-overlay-owner` matching the content's id. Its
1001
+ `focusables()` now takes an optional root (and includes that root when it is itself a tab stop),
1002
+ so one answer to "what is a tab stop" serves both halves of a teleported overlay.
1003
+ - **`usePopover` gained `teleport`, and `useFloating` gained `strategy`.** `usePopover` returns
1004
+ `teleportTo` and `teleportDisabled` for a `<Teleport>` around your own panel, resolving the
1005
+ enclosing open `<dialog>` for you and staying disabled until mount so the pair is SSR-safe.
1006
+ `useFloating`'s `strategy` is `'absolute'` by default, so nothing changes for an existing caller.
1007
+ - **`parseLocaleNumber` reads a trailing decimal separator as the whole number.** `"12."` is `12`,
1008
+ and so is `"12,"` under `is-IS`; a lone `-`, `.` or `,` is still `null`. A numeric field whose
1009
+ fraction digits were deleted before the field was left used to commit an empty value.
1010
+ - **The numeric typing filter refuses the locale group separator on whole-number fields.** `1,5`
1011
+ typed into a `QuantityStepper` under `en-US` used to leave the field showing what an Icelandic
1012
+ customer reads as "one point five" while committing fifteen. It now shows an
1013
+ **ungrouped** editing string while focused (`1,000` becomes `1000` and back on blur), which is
1014
+ what makes refusing the character cost nothing. `filterNumericBeforeInput` still accepts it on a
1015
+ decimal field, so pasting `1,234.50` still means 1234.5.
1016
+ - **A disabled `Button` with a component `as` no longer navigates.** A router link navigates from
1017
+ its own click listener rather than from the default action, so `preventDefault()` arrived after
1018
+ the route had already changed. While disabled the element falls back to the plain `<a href>` for
1019
+ the same destination — same `aria-disabled`, same `tabindex="-1"`, same `href` — and routes again
1020
+ as soon as it is enabled.
1021
+ - **`Select` and `MultiSelect` triggers show the focus ring while their popover is open.** A
1022
+ trigger opened with the pointer is focused but not `:focus-visible`, so the ring stayed hidden
1023
+ under an open panel. New `eldra-focus-open` utility, keyed to the trigger's own `aria-expanded`;
1024
+ it is a modifier of `eldra-focus` and registered in `cx`'s merge config with a group of its own.
1025
+ - **`joinIds` deduplicates per id rather than per argument**, so composing `'a b'` with `'b c'`
1026
+ gives `'a b c'` instead of announcing `b` twice.
1027
+ - `dist/style.css` no longer ships a rule for the press class the scale replaced. Tailwind's source
1028
+ scan reads this package's `README.md` and `CHANGELOG.md` as well as `src/`, and all three named
1029
+ that class while explaining the change — which emitted real CSS for a class on no element.
1030
+
1031
+ - **New components: `UnitInput` and `CurrencyInput`**, replacing the `NumberInput` that appeared
1032
+ earlier in this same unreleased window and **never shipped**. They are one-to-one ports of the
1033
+ two fields Eldra's private component library ships, so a store that knows those fields knows
1034
+ these: the value is formatted in the field **while it is typed into** (`$1,234.5`, `1.234 kr.`,
1035
+ `1,234 km`) rather than on blur, with the caret mapped through each reformat by numeric content,
1036
+ `ArrowUp`/`ArrowDown` stepping by `step`, arrow/backspace/delete rules that step over separators
1037
+ and never eat the symbol, `,` and `.` both inserting the locale's own decimal, undo/redo, an
1038
+ optional pointer-only drag handle (`enableDragAdjust`), a clear button, and an emptied field that
1039
+ stays empty until you leave it and then falls back to `min`. They draw `Input`'s box, sizes,
1040
+ focus ring and error boundary; `name` posts the **raw** number through a hidden input. Exported
1041
+ from the root with `UnitInputProps`/`UnitInputPart` and `CurrencyInputProps`/`CurrencyInputPart`.
1042
+ **Anyone who took `NumberInput` from a pre-release build**: `UnitInput` replaces it —
1043
+ `format="currency"` becomes `CurrencyInput` (or `isCurrency`), `format="unit"` is `UnitInput`'s
1044
+ default shape, `precision` is `maxFraction`, and there is no plain `decimal` format: a field with
1045
+ no unit and no currency is not one of these two.
1046
+ - **New `./vee-validate` components: `FieldUnitInput` and `FieldCurrencyInput`**, both binding
1047
+ `number | null`. `FieldNumberInput` is gone with the component it wrapped.
1048
+ - **New: `provideEldraUiLocale()` / `useEldraUiLocale()` / `LOCALE_KEY`** — the number locale as a
1049
+ provide/inject pair, the same shape as the messages one and a separate key on purpose. It is the
1050
+ default for `UnitInput`, `CurrencyInput` and `QuantityStepper`; each component's own `locale`
1051
+ prop still wins, and with nothing provided every field formats in `en-US` as before.
1052
+ - **Typing into `QuantityStepper` is filtered.** The field is `type="text"`
1053
+ (a native number input cannot hold a locale-grouped value), so it did not have the browser's own
1054
+ numeric filtering: you could type letters into a quantity and only the blur corrected it. A
1055
+ `beforeinput` filter now cancels a non-numeric insertion, lets deletions/undo/redo through, and
1056
+ **sanitises a paste instead of refusing it** — pasting `12ab3` inserts `123`. The helper is
1057
+ exported as `filterNumericBeforeInput` for a consumer building a numeric control of their own.
1058
+ `UnitInput` and `CurrencyInput` deliberately do **not** use it: a non-numeric keystroke lands
1059
+ there and the reformat strips it, which is the private components' own behaviour.
1060
+ - **The tick in a `Checkbox` and in a multi-select option is a real tick.** Both were drawn to the
1061
+ spec's literal 2 : 1 ink box and read as a shallow V; both are now Tabler's `check` geometry
1062
+ (≈3 : 2) scaled to fit the same box with the same 2px stroke, centred. The indeterminate dash is
1063
+ unchanged. A consumer who styled `[data-part="check"] path` by its `d` attribute should stop.
1064
+ - **A pressed `Button` scales to 98% instead of moving down 1px.** The `active:` one-pixel
1065
+ downward translate utility is gone from every variant, replaced by `active:scale-[0.98]`; `link`
1066
+ keeps no press movement, and a disabled or loading button has none either. Under
1067
+ `prefers-reduced-motion: reduce` the button does not scale at all. `eldra-focus`'s transition
1068
+ list gained `scale` at `--eldra-duration-fast`, beside `translate`. A consumer whose own CSS
1069
+ targeted the old press class should target `active:scale-[0.98]`.
1070
+ - **One popover entrance for `Select`, `MultiSelect` and `SearchBar`:** a fade plus a uniform scale
1071
+ from 98% over `--eldra-duration-base`, growing from the corner the panel is anchored by. The
1072
+ slide is gone, and with it `--eldra-popover-slide` — `usePopover`'s `panelStyle` no longer writes
1073
+ it, and the `eldra-popover-in` keyframes no longer read it. `--eldra-popover-origin` now carries
1074
+ a two-value `transform-origin` (`top left` / `bottom left`) rather than `top` / `bottom`. The
1075
+ `SearchBar`'s results panel had no entrance at all before this and now plays the same one.
1076
+ - **`Input`, `SearchBar` and `UnitInput` share one field class recipe** (`src/components/input/classes.ts`).
1077
+ `SearchBar`'s field was a hand-copied duplicate that had drifted: it had lost the
1078
+ `--eldra-input-radius` variable and the `max-md:` mobile type-size override, so it rounded and
1079
+ resized differently from every `Input` beside it. No API change; the search field simply behaves
1080
+ like the other fields now.
1081
+ - **`src/utils/number-format.ts` gains `localeSeparators`, `currencyFractionDigits`, and
1082
+ `currencyDisplay`/`unitDisplay` on `NumberFormatOptions`** — all additive, all exported from the
1083
+ root.
1084
+
1085
+ - **`peerDependencies.vue` is now `^3.5.0`** (was `^3.4.0`). Every control's ids come from Vue's
1086
+ `useId()`, added in 3.5 — on 3.4 the install succeeded and the first control to mount threw
1087
+ `useId is not a function`. No code change; the declared range now matches what the package does.
1088
+ - **`@vueuse/core` is no longer a dependency.** It was never imported: floating positioning is
1089
+ `@floating-ui/vue` directly and the overlay/model composables are this package's own. Runtime
1090
+ dependencies are now `@floating-ui/vue` and `tailwind-merge`.
1091
+ - **`Button` gains `as`** (design spec "Customisation layers" §5), with `Link`'s contract exactly:
1092
+ with `href` set, a component `as` receives the destination as `to` (`NuxtLink`, `RouterLink`) and
1093
+ a string `as` is used as the tag and still receives `href`; with no `href` it is ignored and the
1094
+ component is a `<button>`. So a same-site call to action routes instead of reloading the document.
1095
+ Icon-only, loading, `aria-pressed` and the disabled-link semantics are unchanged.
1096
+ - **`Icon` and `VisuallyHidden` now render `data-part="root"`**, like every other component — a
1097
+ consumer's `[data-part="root"]` selector or E2E locator no longer misses exactly these two.
1098
+ - **`describedBy` composes everywhere instead of replacing.** On `Input`, `Textarea`, `Checkbox`,
1099
+ `Select` and `MultiSelect`, a `describedBy` prop used to *replace* the field wrapper's error and
1100
+ help ids, so `<FieldWrapper error="…"><Input described-by="x"/></FieldWrapper>` silently stopped
1101
+ describing the error. Every control now merges the same way — its own ids first, then the field
1102
+ context's — deduplicated, and the attribute is omitted rather than empty. The helper the
1103
+ components use, `joinIds`, is exported from the root for a consumer composing their own control.
1104
+ - **`FieldContext` gains `labelId`**, the id of the wrapper's `<label>` (or a group's `<legend>`).
1105
+ `Select` and `MultiSelect` read it for `aria-labelledby` instead of rebuilding `` `${id}-label` ``
1106
+ by string convention. A consumer typing against `FieldContext` must add the field.
1107
+ - **`@eldrajs/ui/resolver` also exports `componentNames` and the `ComponentName` type**, so a
1108
+ consumer registering every component globally, or typing their own wrapper map, has the list.
1109
+ - **`@eldrajs/ui/vee-validate` also exports `FIELD_ONLY`**, the props a `Field*` keeps for itself
1110
+ and must not forward — the other half of what `useFieldControl` is exported for.
1111
+ - A stylesheet fix with no visual change: `eldra-field-invalid`'s corner radius is lifted into an
1112
+ `--eldra-field-invalid-radius` custom property instead of a three-deep `var()` fallback written
1113
+ inline in its `calc()`. The computed value is identical; it stops PostCSS printing a
1114
+ "Parse error … unexpected RPAREN" warning in every consumer's build log.
1115
+
1116
+ - `@eldrajs/ui/vee-validate` follow-ups:
1117
+ - `FieldBinding` gains **`path`**, defaulting to `name`. A `VariantPicker`'s `name` is its
1118
+ *visible* option name as well as the radios' shared native name, so one prop was serving as both
1119
+ the legend and the key in `values` — `<FieldVariantPicker name="Size" path="size" />` now keeps
1120
+ the legend and puts the value where it belongs. Every other control is unaffected: a
1121
+ `RadioGroup`'s and `CheckboxGroup`'s `name` is only the native group name (their question is
1122
+ `legend`), and an `Input`'s is the native name outright. `path` is never forwarded to the
1123
+ control, and `apiErrors`, `initialValues`, `validationSchema` and the `errors` slot prop are all
1124
+ keyed by it.
1125
+ - `FormLayout` gains **`focusOnInvalid`** (default `true`). The `./vee-validate` `Form` sets it to
1126
+ `false`, because it validates asynchronously and so owns the focus move itself — otherwise a
1127
+ submit the layout refuses moved focus twice. The `invalid` event and the refusal are unchanged.
1128
+ - A **`group` `FieldWrapper`'s `<fieldset>` now carries `tabindex="-1"`**, so an error summary
1129
+ link to a group (whose id is the fieldset's — a group has no single control) actually moves
1130
+ focus rather than only scrolling. It stays out of the tab order, and programmatic focus still
1131
+ prefers the first real control inside it.
1132
+ - `FieldSearchBar` no longer forwards `name`: a `SearchBar` has no such prop and its native field
1133
+ is always `q`.
1134
+ - Documented precisely: how long an `apiErrors` entry survives a change to a *different* field
1135
+ (before submit, or with per-field rules, it stays; after a submit with a form-level
1136
+ `validationSchema`, vee-validate's `validated-only` revalidation replaces it), that a `Form`
1137
+ never posts without scripting (`handleSubmit` prevents the default — use `FormLayout` directly
1138
+ for that), and that fields are revalidated while submitting, unlike the spec's Submitting state.
1139
+
1140
+ - `@eldrajs/ui/vee-validate` — the optional adapter entry: `Form`, eleven `Field*` components
1141
+ (`FieldInput`, `FieldTextarea`, `FieldCheckbox`, `FieldCheckboxGroup`, `FieldRadioGroup`,
1142
+ `FieldSwitch`, `FieldSelect`, `FieldMultiSelect`, `FieldQuantityStepper`, `FieldVariantPicker`,
1143
+ `FieldSearchBar`), `API_ERRORS_KEY` and the `useFieldControl` composable they are built on.
1144
+ `vee-validate ^4.12` stays an **optional** peer: `src/vee-validate/**` is the only place in the
1145
+ package that imports it, and `src/__tests__/veeValidateIsolation.spec.ts` proves the root entry
1146
+ loads with it mocked to throw *and* that neither `dist/index.js` nor any chunk it imports carries
1147
+ a `vee-validate` specifier.
1148
+
1149
+ Each `Field*` calls `useField(name, rules, { label })` and binds the value to the agnostic
1150
+ component's `modelValue`, `handleBlur` to its blur (`focusout` for the three fieldset controls,
1151
+ because native `blur` does not bubble), and the message to `invalid` / `error` — but only once the
1152
+ field has been touched or the form submitted, which is the design spec's "validate on submit, then
1153
+ on blur" rule applied to the *display* rather than to when validation runs. Every other prop, slot
1154
+ and attribute is forwarded; `modelValue`, `invalid` and `error` are `Omit`ted from each
1155
+ `Field*Props` type, so passing one is a compile error rather than a prop that does nothing.
1156
+
1157
+ `Form` wraps `useForm` and renders `FormLayout` with all of its props passed through. It emits
1158
+ `submit(values, ctx)` through `handleSubmit` (never with values that failed validation) and
1159
+ `invalid(errors)` otherwise, takes `submitting` from `isSubmitting`, moves focus to the first
1160
+ invalid field once validation comes back, and draws the spec's error-summary alert after a failed
1161
+ submit — a link per error, pointing at the control's own id, replaceable through the
1162
+ `errorSummary` slot. `apiErrors` attaches a server's field errors with `setErrors` and each one is
1163
+ dropped the moment its own field changes. `successMessage` fills `FormLayout`'s polite status
1164
+ region after a submit passes validation.
1165
+
1166
+ Because `FieldWrapper` is validation-agnostic and cannot read a vee-validate field, the wrapper
1167
+ gets its message from `Form`'s default slot instead: `<template #default="{ errors }">` with
1168
+ `:error="errors.<name>"`. `errors` carries only what should currently show, on the same gate the
1169
+ controls use. Documented in `README.md` and demonstrated in the `Forms/Form` stories
1170
+ (`Newsletter`, `Contact`, `ApiErrors`).
1171
+ - New message `formErrors(n)` in both catalogues ("There are 2 problems with this form" /
1172
+ "Það eru 2 villur í þessu eyðublaði"), the error summary's own line.
1173
+ - `FormLayout`'s focus-the-first-invalid-field logic moved to
1174
+ `src/components/form-layout/focusInvalid.ts` so the `./vee-validate` `Form` reuses it rather than
1175
+ keeping a second copy that could drift. No behaviour change.
1176
+
1177
+ - `@eldrajs/ui/resolver` — `EldraUiResolver({ prefix = 'Eldra' })`, a plain
1178
+ `unplugin-vue-components` resolver (`{ type: 'component', resolve(name) }`) resolving
1179
+ `<prefix><Name>` for every component the root entry exports (default prefix `Eldra`; never `Ui`).
1180
+ Backed by a hand-maintained `src/componentNames.ts`, guarded against drift from `src/index.ts` by
1181
+ a test that imports the real entry and compares its component keys.
1182
+ - `README.md` reorganised into the design spec's section list (Install, Styles, Fonts,
1183
+ Customisation, Messages, Composables, Resolver, the forthcoming `./vee-validate` entry,
1184
+ Accessibility and testing, Deviations) and its Deviations list completed with every recorded
1185
+ departure from the spec for `Button`, `Link`, `Input`, `Textarea`, `VariantPicker` and `SearchBar`
1186
+ that had not made it there yet (the `Textarea` live-region entry was written against a threshold
1187
+ the component no longer uses and has been corrected, not merely added). Composables gained
1188
+ `usePopover`, the composable `Select`, `MultiSelect` and `SearchBar` actually build their popup on
1189
+ — previously undocumented even though it is exported from the root. `docs/ui.md` added to the
1190
+ kit's docs.
1191
+ - Public-repo hygiene: the private Eldra library's package specifier, which had leaked into
1192
+ `README.md` and `src/resolver.ts`'s own JSDoc, is gone from both; a new
1193
+ `src/__tests__/publicRepoHygiene.spec.ts` scans every source file plus `README.md`/`CHANGELOG.md`
1194
+ for the private npm scope and a couple of representative internal-only hostnames so it cannot
1195
+ recur unnoticed.
1196
+ - `SearchBar` — the storefront search field with a live, grouped results panel: a real
1197
+ `<form role="search" method="get" :action>` with the field named `q`, so `Enter` with no active
1198
+ row reaches the Search page with or without scripting (`submit` fires with the query first and
1199
+ prevents nothing). The field is a `role="combobox"` (`aria-expanded`, `aria-controls`,
1200
+ `aria-autocomplete="list"`, `aria-activedescendant`, `autocomplete="off"`) and the results panel
1201
+ is a **non-modal popup**, never a dialog: it is positioned with `useFloating` against the field
1202
+ (matching its width), closed by `useOverlay`, and focus never leaves the caret — rows are reached
1203
+ through `aria-activedescendant` and a pointer press inside the panel does not blur the field.
1204
+ Four views, exactly one at a time: `idle` (recent rows, a row that empties them, then popular
1205
+ chips), `results` (Products max 4, Collections max 3, Journal and help max 3 — articles then
1206
+ pages — then "See all N results"), `none` (the query by name, one line of advice and the popular
1207
+ chips as suggestions) and `loading`, which appears only once a request has been in flight for
1208
+ 300ms so a fast response never flickers the panel. Matches are marked with weight and an
1209
+ underline (a `<mark>` with no background), ignoring case and accents; the active row is marked by
1210
+ a fill, an arrow and `aria-activedescendant`, never colour alone. `/` anywhere on the page focuses
1211
+ the field (never while someone is typing elsewhere), `ArrowDown`/`ArrowUp` walk every row across
1212
+ groups without wrapping, `Enter` follows the active row (or fills the field from a recent row or
1213
+ chip, or submits), `Escape` clears the active row, then the query, then closes, and `Tab` closes
1214
+ and moves on — options are never in the tab order. Only one search bar on a page answers `/`: the
1215
+ first one mounted with `shortcut` on owns it and hands it to the next when it unmounts. A visually
1216
+ hidden polite live region announces "4 results for “mer”", or "No results for “teapot”", 400ms
1217
+ after typing stops. Recent searches live in `localStorage["eldra-ui:recent-searches"]` when
1218
+ `recent` is not given: read on mount and **written when a search actually happens** — the form is
1219
+ submitted, or a row is followed — most recent first, deduplicated without regard to case, capped
1220
+ at 5, with every storage call wrapped so a browser that refuses simply keeps no history. "Clear
1221
+ recent searches" empties them and emits `clearRecent`. A query with no `results` yet shows no
1222
+ panel at all (and, after 300ms, the loading view): the "no results" view is an answer from the
1223
+ shop, not the absence of one. `size` is `"md"` or `"lg"`, `pill` rounds the
1224
+ field fully, `autofocus` is for the Search page, `resultTypes` picks the groups, `showRecent`
1225
+ turns the history off, and `classes`/`messages`/the `item` and `empty` slots are the styling and
1226
+ content hooks. New type utilities `text-search-meta`, `text-search-title` and `text-search-kbd`,
1227
+ and a new `eldra-search-panel-height` (`min(32rem, 70vh)`, on Tailwind's `max-h` merge group).
1228
+ - New composable `usePopover` (exported from the package root): the open/closed life of a non-modal
1229
+ popup anchored to a control — the "only one open at a time" registry, `useOverlay`'s closing
1230
+ rules, `useFloating`'s position plus the two entrance variables the keyframes read, the open →
1231
+ activate → `afterOpen` sequence, and the label-forwarded-click latch. `Select`, `MultiSelect` and
1232
+ `SearchBar` all open their panel with it; it replaced ~160 lines that were line-identical between
1233
+ the first two, and neither their tests nor their screenshot baselines moved.
1234
+ - New messages `noResultsFor(query)`, `searchSuggestions`, `searchProducts`, `searchCollections`,
1235
+ `searchJournal` and `searchAdvice`. `clearRecent` is now the spec's own "Clear recent searches"
1236
+ (it was "Clear recent"), and `resultsCount` and `viewAllResults` both take an optional second
1237
+ argument: `resultsCount(4, 'mer')` is "4 results for “mer”" and `viewAllResults(12, 'mer')` is
1238
+ "See all 12 results for “mer”", while the one-argument call is unchanged apart from
1239
+ `viewAllResults`' verb ("See all N results", was "View all N results" — `is-IS` already said
1240
+ "Sjá allar").
1241
+
1242
+ - `VariantPicker` — a native radio group in a `<fieldset>` for a product option (size, colour):
1243
+ pills (default) or swatches. `modelValue` is two-way, defaulting to the first available option;
1244
+ `name` is used unmodified as the shared native radio `name` and in the legend ("Size: M"). Every
1245
+ radio shares one `name`, so arrow keys move and select natively — no key handling of any kind
1246
+ lives in the component. `options[].available: false` marks a sold-out option or combination: it
1247
+ stays selectable (never `disabled`), draws a struck-through pill or swatch, and adds ", sold out"
1248
+ to its accessible name (`messages.soldOut`) and to the legend when it is the selected value.
1249
+ Swatches carry the one per-item colour the spec allows (`options[].swatch`) as an inline style;
1250
+ the disc's edge is a real `border-strong` boundary (not a shadow), so pale colours stay visible
1251
+ at a 3:1 boundary in forced-colours mode, and the colour name is `sr-only` text inside the label,
1252
+ never colour alone. The sold-out diagonal line — on both pills and swatches — is an inline SVG
1253
+ `<line stroke="currentColor">` rather than a `background`/`box-shadow` trick: the pill's own line
1254
+ needs `vector-effect="non-scaling-stroke"` to stay a constant 1px regardless of the pill's
1255
+ label-dependent width, and forced-colours mode drops `background-color`/`box-shadow` outright, so
1256
+ only a real stroke survives there for either shape. New type utilities `text-variant-legend`/
1257
+ `text-variant-pill` (size and line only, so the two weights each needs are the stock
1258
+ `font-normal`/`-medium`/`-semibold` utilities, not baked into the shorthand); new border-width
1259
+ utilities `eldra-variant-pill-border`/`eldra-variant-swatch-ring`/`eldra-variant-swatch-edge`;
1260
+ new inset-line utility `eldra-variant-pill-selected-line` for the sold-out-and-selected pill's
1261
+ 2px boundary, the same technique `eldra-radio-card-selected` uses.
1262
+ - `QuantityStepper` — a decrease/input/increase group for a basket quantity, never reaching 0.
1263
+ `modelValue` is two-way (default `min`); `min`/`max` default `1`/`99`; `size` is `"md"` or
1264
+ `"sm"`; `itemName` is appended to both button names ("Increase, Stoneware mug") for use in a
1265
+ list of several lines; `error` renders the same error row a `FieldWrapper` draws, linked by
1266
+ `aria-describedby`; `locale` (default `"en-US"`) drives display formatting and parsing of a
1267
+ typed value. Pressing a button, or `ArrowUp`/`ArrowDown` in the field, steps by 1 and clamps to
1268
+ `[min, max]`, firing `change` once — never per keystroke. A typed value is rounded to a whole
1269
+ number and clamped on blur or `Enter`; a non-number becomes `min`; "0" and values past `max` are
1270
+ silently corrected rather than shown as an error. The relevant button is `aria-disabled="true"`
1271
+ at a limit (not `disabled`), so it stays focusable. A polite, visually-hidden live region
1272
+ announces the settled value once per commit. The field is `type="text"` with
1273
+ `inputmode="numeric"` and `role="spinbutton"` (`aria-valuenow`/`-valuemin`/`-valuemax`) rather
1274
+ than the design spec's literal `<input type="number">` — see the component's own doc comment:
1275
+ a native number input cannot hold a locale-grouped typed value (`is-IS`'s `"1.234"`).
1276
+ - New utility `src/utils/number-format.ts`: `createNumberFormat`/`formatNumber` wrap
1277
+ `Intl.NumberFormat` for a decimal, currency or unit value, and `parseLocaleNumber` turns text a
1278
+ person typed in their own locale back into a `number`, deriving the group and decimal separators
1279
+ from `Intl.NumberFormat(locale).formatToParts()` rather than assuming an arrangement (so
1280
+ `is-IS`'s `"1.234,56"` and `en-US`'s `"1,234.56"` both parse to `1234.56`).
1281
+ - New message `quantityUpdated(n)`, and new type utilities `text-stepper-value`/
1282
+ `text-stepper-value-sm` (the stepper value's 0.9375rem/0.875rem, weight 600, tabular type).
1283
+ - `Switch` now merges a `FieldWrapper`'s `help` text into its `aria-describedby`, alongside its own
1284
+ `description` when it has one (own id first), instead of only ever describing itself.
1285
+ - `MultiSelect` — the custom multiple select: the same trigger, popover, listbox, search field,
1286
+ groups, rich options, keyboard and "only one open at a time" rule as `Select`, with a checkbox on
1287
+ every row (`aria-multiselectable="true"`, `aria-selected` per row), a trigger summary of up to
1288
+ `maxSummary` labels followed by a "+N" pill, a removable tag list under the control
1289
+ (`showTags: false` turns it off) and a panel footer holding a polite live count, Clear and Done.
1290
+ `modelValue` is a `string[]`; `change`, `clear`, `open`, `close` and `search` are emitted, and a
1291
+ hidden native `<select multiple name>` underneath stays in sync both ways and fires a bubbling
1292
+ `change`, so forms post every selected value. Toggling never closes the popover: `Enter` (and
1293
+ `Space` without a search field) toggles, `Alt+ArrowUp` toggles and closes, `Tab` walks into the
1294
+ footer with the popover still open, `Backspace` in an empty search field takes the last tag off,
1295
+ and `Backspace`/`Delete` on the closed trigger clear everything. A `disabled` or `readonly`
1296
+ control keeps its tags readable and drops their remove buttons, as it already drops the clear
1297
+ button. Slots: `option` (`{ option, selected, active }`), `value` (`{ options }`), `tag`
1298
+ (`{ option }`) and `empty`.
1299
+ - `Select`'s panel is now the same component `MultiSelect` opens. The search field, the listbox, the
1300
+ groups, the option rows, the empty state, the press guard that keeps a click inside the panel from
1301
+ blurring the focused element, and the active row's scroll-into-view live in one place; the two
1302
+ controls differ only in what choosing a row does. Nothing about `Select` changed — every part,
1303
+ class and screenshot baseline is identical.
1304
+ - New messages `selected`, `selectedCount(n)`, `noneSelected` and `done`, and the default
1305
+ `multiSelectPlaceholder` is now the spec's `"Any"` (`is-IS`: `"Allt"`) rather than
1306
+ `"Select options"`.
1307
+ - New utilities `text-select-pill` (the "+N" pill's 0.75rem/600 tabular type) and
1308
+ `eldra-select-check-radius` (an option checkbox's 0.25rem corner), with the variables
1309
+ `--eldra-select-pill-line` and `--eldra-select-check-radius`.
1310
+ - `Select` — the custom single select: a `<button role="combobox">` trigger over a non-modal
1311
+ popover, never the platform's native select UI, with a hidden native `<select name>` (and
1312
+ `<optgroup>`s) underneath that stays in sync and fires a bubbling `change`, so forms post the
1313
+ value and existing listeners keep working. `modelValue` is two-way; `change`, `clear`, `open`,
1314
+ `close` and `search` are emitted. `options` take a `group`, `hint`, `meta` (+ `metaTone`
1315
+ `warning`/`danger`), `swatch`, `icon` and `disabled`, and the chosen option's swatch or icon
1316
+ shows in the trigger. `searchable` turns itself on past 10 options and puts a search field
1317
+ (`role="combobox"`, `aria-autocomplete="list"`, inset focus ring) at the top of the panel;
1318
+ filtering ignores case and diacritics, bolds and underlines the matched run, hides groups with no
1319
+ matches and shows "No matches for “…”" as real text. `clearable` adds a clear button beside the
1320
+ chevron (`Backspace`/`Delete` clear too), `placeholder`, `leadingIcon`, `invalid`, `describedBy`,
1321
+ `required`, `disabled`, `readonly`, `size` (`sm`/`md`/`lg`, the same box as `Input`) and
1322
+ `placement` (`auto` flips above when there is no room; `above` always opens above) round it out.
1323
+ Slots: `option` (`{ option, selected, active }`), `value` (`{ option }`) and `empty`. The whole of
1324
+ the design spec's two keyboard tables is implemented, including `PageUp`/`PageDown` by ten,
1325
+ `Alt+ArrowUp`, `Escape` clearing the query before it closes, `Tab` closing without trapping
1326
+ focus, and type-ahead with a 0.6s buffer. Opening one select closes any other open one.
1327
+ - `useListbox` — the listbox keyboard and active row, exported from the package root: `Select` and
1328
+ the coming `MultiSelect` share it, and so can a control of your own. It owns no DOM; `activeId`
1329
+ is what you bind to `aria-activedescendant`, and choosing, clearing and querying are callbacks.
1330
+ `normalizeText` is exported with it, for case- and diacritic-insensitive matching.
1331
+ - New message `noMatchesFor(query)` ("No matches for “…”"), used by `Select`'s empty state when a
1332
+ search query is showing; `noResults` is still used when there is none.
1333
+ - New CSS variables: `--eldra-select-panel-max-height` (`20rem`), `--eldra-select-panel-max-width`
1334
+ (`22rem`, clamped to `90vw`), `--eldra-z-popover` (`30`, above the sticky header),
1335
+ `--eldra-select-group-tracking`, `--eldra-select-option-line`, `--eldra-select-swatch-edge` and
1336
+ `--eldra-select-match-weight`/`-underline`/`-underline-offset`. New utilities
1337
+ `eldra-focus-inset-always` (the inset ring on any focus, for a select's search field) and
1338
+ `animate-eldra-popover-in` (the popover's entrance, instant under reduced motion; its direction
1339
+ comes from `--eldra-popover-origin`/`--eldra-popover-slide` so a panel that flips does not replay
1340
+ it), and `eldra-select-option-active`/`-selected`, which give the active and the selected row a
1341
+ real boundary under forced colours, where a fill and a weight difference both disappear.
1342
+ - **Breaking-ish:** the default `selectPlaceholder` message is now `"Select"` (`is-IS`: `"Velja"`),
1343
+ the design spec's own default, rather than `"Select an option"`.
1344
+
1345
+ - `useOverlay` and `useFloating` — the two composables every **non-modal** popup in this package is
1346
+ built from (Select, Multi-select, the Search bar's results panel), exported from the package root
1347
+ so a consumer can build one of their own. Neither traps focus: the design spec reserves
1348
+ `<dialog>` and focus traps for modal surfaces and says these popups are not dialogs, so `Tab`
1349
+ always moves on and focus landing outside is what closes the popup.
1350
+ `useOverlay({ open, trigger, content, setOpen, closeOnOutsideClick?, closeOnEscape?,
1351
+ returnFocus? })` returns `{ close, focusFirst, focusables }` and listens on `document` only while
1352
+ `open` is `true` — a captured `pointerdown` outside the trigger, the content, or any element
1353
+ under `data-eldra-overlay-owner="<the content's id>"` (so a teleported panel still counts as
1354
+ inside); a bubbling `focusout` whose new owner is outside; and a bubbling `Escape`, which it both
1355
+ `preventDefault()`s and stops, so a popup inside a native `<dialog>` does not close the dialog
1356
+ behind it. `returnFocus` (default on) puts focus back on the trigger on `Escape` and when focus
1357
+ went nowhere, and never pulls it off the element a pointer press just moved it to. Every listener
1358
+ comes off when the overlay closes or the scope is disposed.
1359
+ `useFloating(reference, floating, { placement?, offset?, matchWidth?, flip? })` wraps
1360
+ `@floating-ui/vue` (`autoUpdate`, `offset`, `flip`, `shift`, `size`) and returns
1361
+ `{ styles, placement, update }`. `placement` takes the design spec's own words — `auto` (below,
1362
+ flipping above when it does not fit) and `above` (always above, never flips) — as well as the
1363
+ four concrete `bottom`/`bottom-start`/`top`/`top-start` values, and `flip` overrides either
1364
+ default. `styles` is a plain `:style` object (`position`, `top`, `left`, plus `minWidth` under
1365
+ `matchWidth`) rather than a transform, leaving `transform` free for the popover's own open
1366
+ animation. `matchWidth` is a floor, not a fixed width — the spec's popover is "min width =
1367
+ trigger, grows to fit its content up to min(22rem, 90vw)", and that clamp is the panel's own
1368
+ `max-width`.
1369
+
1370
+ - `Switch` — an on/off control for a setting that takes effect immediately, `<button type="button"
1371
+ role="switch" aria-checked>` with the visible label as its own content (so the accessible name
1372
+ matches the screen) and no key handling of its own: `Space`/`Enter` toggle for free from a real,
1373
+ native button. `modelValue` is two-way and `change` fires with the new boolean; `size` is `md`
1374
+ (2.75 × 1.5rem track) or `sm` (2.25 × 1.25rem, filter bars); `description` adds a second `muted`
1375
+ line, linked by `aria-describedby` and kept `aria-hidden` so it never joins the accessible name;
1376
+ a hidden `<input type="checkbox">` mirrors `modelValue` and carries `name` for a plain form
1377
+ submit, disabled exactly when the switch is. On/off is shown by the thumb's position and a check
1378
+ icon as well as colour, never colour alone; the thumb slides and the track fills over
1379
+ `duration-fast`, both owning their own transition since neither carries the focus ring (the
1380
+ button does, at the spec's `radius-sm` corner). Per-part `classes` for `root`, `track`, `thumb`,
1381
+ `label` and `description`. Inside a plain (non-group) `FieldWrapper`, a `Switch` drops its own
1382
+ `label` part and takes the wrapper's id, the same shape `Checkbox`'s `labelsControl` uses — not
1383
+ part of the design spec, which never discusses a Switch inside a field wrapper, but named
1384
+ explicitly by the task. CSS variables: `--eldra-switch-radius` (default `radius-full`),
1385
+ `--eldra-switch-track-border-width` (default `1.5px`) and `--eldra-switch-thumb-offset` (default
1386
+ `0.1875rem`, the thumb's rest inset from the track's start edge).
1387
+ - `@eldrajs/ui/tailwind.css` gains `eldra-switch-track-border`, `eldra-switch-thumb-offset`,
1388
+ `text-switch-label` and `text-switch-description` (the Switch's own border-width, thumb-inset and
1389
+ type-style utilities, none of them a spacing-scale multiple or an existing type token).
1390
+ - `RadioGroup` — a native radio group in a `<fieldset>` with a `<legend>`, one shared `name`
1391
+ (generated when you give none) and no key handling of its own: arrow keys, wrapping, skipping
1392
+ disabled options, and the group's single tab stop are all native `<input type="radio">`
1393
+ behaviour. `modelValue` is the two-way selected value and `change` fires with it; `options` is
1394
+ `{ value, label, hint?, meta?, disabled? }[]`, and `label`/`hint`/`meta` are also scoped slots.
1395
+ `layout` is `vertical` (default), `row` (wraps, for short labels) or `cards` — the whole option
1396
+ becomes a bordered card with `meta` pushed to the end in tabular numerals, selection shown by a
1397
+ filled radio, a `surface` fill and a 2px `primary` border (never colour alone). `size` (`md`/`lg`)
1398
+ changes the radio in plain layouts only; a card's radio is always `md`. `required` is native, on
1399
+ every radio. `error` sets `aria-invalid="true"` on **every radio** (unlike `CheckboxGroup`'s,
1400
+ which stays on the fieldset) and links the message by `aria-describedby`, drawn by the same row
1401
+ `FieldWrapper` and `CheckboxGroup` use. The focus ring is drawn on the radio in every layout,
1402
+ including cards, through the same `eldra-focus-proxy` utility `Checkbox` uses. Per-part `classes`
1403
+ for `root`, `legend`, `options`, `option`, `radio`, `label`, `hint`, `meta`, `error` and
1404
+ `errorIcon`. CSS variables: `--eldra-radio-card-border-width` (default `1px`),
1405
+ `--eldra-radio-card-radius` (default `radius-md`); the radio circle itself reuses
1406
+ `--eldra-checkbox-border-width`/`-invalid`, since the spec gives it the same numbers.
1407
+ - `Checkbox` inside a `FieldWrapper` — a plain wrapper already renders a `<label for>` naming the
1408
+ box, so the box no longer renders a second `<label>` of its own (its root becomes a `<span>`);
1409
+ one control, one label. The control is now positioned over the drawn box rather than `sr-only`
1410
+ inside it, so the box stays clickable with no label of its own to click through. The spec's
1411
+ single-consent shape — the sentence beside the box — is `<FieldWrapper group>`. `FieldContext`
1412
+ gains `labelsControl`, which also stops `Checkbox`, `Input` and `Textarea` adopting the context
1413
+ `id` inside a `group`, where that id belongs to the `<fieldset>` itself.
1414
+ - `Checkbox` — an invalid box that is checked or indeterminate keeps its `primary` fill and its
1415
+ mark; the error is the 2px `danger` boundary alone. A `background` fill under a
1416
+ `primary-contrast` mark drew the tick in the page's own colour.
1417
+ - `Checkbox` — the tick and the dash are drawn at the sizes the spec gives them (tick 0.625 ×
1418
+ 0.3125rem, dash 0.625rem wide, both 2px).
1419
+ - `CheckboxGroup` — `classes` gains an `errorIcon` key, and the error row is now the same
1420
+ component a `FieldWrapper` draws.
1421
+
1422
+ - `Checkbox` — a native `<input type="checkbox">`, visually hidden inside its own `<label>` so the
1423
+ whole row (box, label, hint) is the click target and is at least 1.5rem tall, drawn as a box with
1424
+ a tick or a dash. `modelValue` is two-way and `change` fires with the new boolean; `indeterminate`
1425
+ sets the native property (re-applied after every toggle, because activating a checkbox clears it
1426
+ in the browser) and `aria-checked="mixed"` beside it, with `controls` naming the children an
1427
+ indeterminate parent stands for. `size` is `md` (1.125rem box, nudged onto the first text line) or
1428
+ `lg` (1.5rem, top-aligned); `hint` adds a `muted` second line under the label; `value`/`name` are
1429
+ the native form values; `invalid`, `required`, `describedBy` and `id` fall back to the
1430
+ `FieldWrapper`'s context exactly as `Input`'s do. Because the input is hidden, the standard focus
1431
+ ring is drawn on the **box** through the new `eldra-focus-proxy` utility — the focus-ring
1432
+ foundation's "Proxy focus" rule. Per-part `classes` for `root`, `box`, `check`, `label` and
1433
+ `hint`. CSS variables: `--eldra-checkbox-radius` (default `radius-sm`),
1434
+ `--eldra-checkbox-border-width` (`1.5px`) and `--eldra-checkbox-border-width-invalid` (`2px`).
1435
+ - `CheckboxGroup` — a real `<fieldset>` with a `<legend>`, so the question is read with every
1436
+ option. `modelValue` is the two-way array of checked values (and `change` fires with the new
1437
+ array, never the same instance twice), `options` is `{ value, label, hint?, disabled? }[]`,
1438
+ `layout` is `vertical` (0.5rem gaps) or `row` (0.5rem × 1.5rem, wrapping, for short labels like
1439
+ sizes), and `name` is the one form field name they share. `error` renders the message with its
1440
+ `alert-circle` icon and links it to the **fieldset** with `aria-describedby`, marking that
1441
+ `aria-invalid="true"` while the individual options stay valid. It needs no `FieldWrapper` around
1442
+ it, and must not be put inside one with `group` set — that would nest a second `<fieldset>` and
1443
+ legend around the first. Per-part `classes` for `root`, `legend`, `options` and `error`.
1444
+ - `Input`, `Textarea` — the error boundary now follows the field's own radius (`--eldra-input-radius`
1445
+ / `--eldra-textarea-radius`, through the new `--eldra-field-radius`) rather than always
1446
+ `radius-md`, and `--eldra-field-border-width` now drives the control's real border as well as the
1447
+ inset line that completes it, so the two can no longer come apart. The danger boundary is also
1448
+ dropped on a **disabled** field (`aria-invalid` stays: still invalid, just not correctable here)
1449
+ and kept on a **read-only** one, on the root and the control alike.
1450
+ - `defaultCharacterMeaning` is exported as `Readonly<Record<string, RegExp>>`. Documented: a mask
1451
+ format with no placeholder slots in it (`'--'`) formats and strips every value to `''`, and a
1452
+ masked field loses the caret to the end of the value after an edit in the middle of it.
1453
+
1454
+ - `FieldWrapper` — the wrapper every form control sits in: the visible `label` with its `required`
1455
+ asterisk (`aria-hidden`, with the control's native `required` doing the announcing) or
1456
+ `(optional)` mark, the control, the `error` with its `alert-circle` icon, and a foot row carrying
1457
+ `help` at the start and a `counter` (`{ max, value }`, `danger` weight 600 once over the limit) at
1458
+ the end. It provides `FIELD_KEY`, so a bare `<Input />` or `<Textarea />` inside it needs no `id`,
1459
+ no `aria-describedby`, no `aria-invalid` and no `required` of its own — `describedBy` is the error
1460
+ id **first**, then help, then the counter, and only ids that actually render. The error is a plain `<p>` linked by
1461
+ id, never a live region: announcing a failed submit belongs to the form. `full` spans both columns
1462
+ of a two-column `FormLayout`, and `group` renders the whole wrapper as a `<fieldset>` with the
1463
+ label as its `<legend>` — the spec's shape for a set of checkboxes or radios that answer one
1464
+ question, with the help and error linked to the fieldset itself — the `<legend>` is the
1465
+ fieldset's first child, which is what names it, and the fieldset carries the field's id so a
1466
+ failed submit can name the group. Slots: `default` (the control),
1467
+ `label`, `help`, `error` — a slot is content, so a `#error` slot makes the field invalid exactly
1468
+ as the prop does, and one toggled on or off is followed. Per-part `classes` for `root`, `label`,
1469
+ `legend`, `requiredMark`, `optionalText`, `control`, `error`, `errorIcon`, `foot`, `help` and
1470
+ `counter`.
1471
+ - `FormLayout` — a real `<form novalidate>` that arranges fields in a single column, a responsive
1472
+ two-column grid or an inline row, and closes with an actions row. `heading` names it through
1473
+ `aria-labelledby` (`headingLevel`, 2–4, picks the element; "h4" in the spec is the type style, not
1474
+ the level), `ariaLabel` names one with no visible heading; `action` and `method` keep it posting
1475
+ without scripting. On submit the form asks the DOM which fields are invalid
1476
+ (`[aria-invalid="true"]`, which every control in this package sets from its field's `error`): if
1477
+ any are, the submit is stopped, focus moves to the first one and **`invalid`** fires with their
1478
+ ids; otherwise **`submit`** fires with `{ event, data }` — the native event, undefaulted so the
1479
+ form still posts, and the form's own `FormData`, read with the event's `submitter` so a named
1480
+ submit button contributes its own name/value pair (how a form tells "Save draft" from "Publish"). The `errorSummary` slot draws the spec's alert
1481
+ box above the fields (`surface` fill, 1px `danger` border, `danger` icon) around your list of
1482
+ links to the failed fields, and `statusMessage` feeds a permanent, visually hidden polite
1483
+ `role="status"` region so a success is announced without moving focus. The two-column pairs appear
1484
+ from a **36rem container** (not a viewport width), so a form in a narrow page-builder column
1485
+ behaves like a form on a phone; below it everything stacks and the actions go full width with the
1486
+ primary first, without moving in the DOM, and a leading back link pushes itself to the start of a
1487
+ wide row without a class from the caller. `submitting` provides `FORM_SUBMITTING_KEY`, which makes
1488
+ the `type="submit"` Button loading and every other action disabled while the fields stay editable.
1489
+ The form is a `@container`, which is what lets the md primary Button inside it grow to the 2.75rem
1490
+ touch target on a narrow *form*. Slots: `default` (fields), `errorSummary` and `actions`; per-part
1491
+ `classes` for `root`, `heading`, `errorSummary`, `fields`, `actions` and `status`.
1492
+ - `FORM_LAYOUT_KEY` is exported alongside `FORM_SUBMITTING_KEY` and `FIELD_KEY`, so a consumer
1493
+ composing its own field or form wrapper can join the same wiring.
1494
+ - The `optional` message is now `"optional"` (`"valfrjálst"`), lower case: the `FieldWrapper`
1495
+ renders it in parentheses as the spec's `(optional)` mark.
1496
+ - `@eldrajs/ui/tailwind.css` gains `text-field-note` (the 0.8125rem / 1.45 line a field's help and
1497
+ error text share, with no `font-weight` of its own) and the `--container-two-col` breakpoint
1498
+ (36rem), which is the form layout's two-column edge — `@two-col:` and `@max-two-col:`.
1499
+ - **`Button`**: the 2.75rem touch-target growth below a 48rem container is now the **primary**
1500
+ action's alone, per the spec's "Controls keep their height on mobile. Only primary action buttons
1501
+ grow to `target-touch`." A secondary, outline, ghost or danger `md` button keeps the 2.5rem
1502
+ control height it shares with the inputs beside it, so a mixed actions row no longer has two
1503
+ button heights in it on a narrow container.
1504
+
1505
+ - `Textarea` — multi-line text entry that grows with its content from `minHeight` (`5rem` by
1506
+ default) up to 16rem, then scrolls: `field-sizing: content` where the runtime supports it, with a
1507
+ measured `rows` fallback (re-measured against `scrollHeight`/`clientHeight` on mount, on every
1508
+ `input`, and on a programmatic `v-model` change alike) where it does not. `counter` shows
1509
+ `"n / maxLength"` in the foot row once `maxLength` is also set — `muted` under the limit, `danger`
1510
+ weight 600 once the value runs over it (typing past this *soft* limit is still allowed);
1511
+ `hardLimit` also sets the native `maxlength`, so typing stops there instead. The counter itself
1512
+ carries no `role` or `aria-live`; a separate visually hidden, always-rendered `role="status"`
1513
+ `aria-live="polite"` region announces once on crossing 80% of the limit ("20 characters left")
1514
+ and once on passing it ("Over the limit by 3"), clearing itself on leaving a zone so re-crossing
1515
+ it announces again — never on every keystroke. `input` fires alongside `update:modelValue` on
1516
+ every keystroke; `change` fires the committed value. `invalid`, `describedBy` (the counter wires
1517
+ its own id in automatically), `required`, `readonly` and `disabled` share `Input`'s states and its
1518
+ field-context wiring through `FIELD_KEY`; the per-part `classes` prop covers `root`, `control`,
1519
+ `foot` and `counter`. `--eldra-textarea-radius`, `--eldra-textarea-min-height` and
1520
+ `--eldra-counter-line-height` restyle it without touching a class.
1521
+ - Messages — `overLimit` (a `Textarea`'s over-the-limit announcement: en-US "Over the limit by 3",
1522
+ is-IS "Yfir hámarkinu um 3").
1523
+ - `@eldrajs/ui/tailwind.css` gains `text-counter` (a field's character-counter type style: the
1524
+ caption token's size on a `1.5` line, with no `font-weight` of its own so the over-limit state's
1525
+ `font-semibold` is a plain, reliably-ordered stock utility rather than fighting a shorthand `font`
1526
+ declaration).
1527
+
1528
+ - First release: a public, MIT-licensed Vue 3 core component library for Eldra storefronts, built
1529
+ to the Eldra starter design spec and WCAG 2.2 AA. Peers on `vue` ^3.4; `vee-validate` ^4 is an
1530
+ optional peer used only by the `@eldrajs/ui/vee-validate` entry.
1531
+ - `@eldrajs/ui/tokens.css` declares the design system as `--eldra-*` custom properties on `:root`:
1532
+ 17 colour roles, 12 type styles, the spacing, radius, shadow, layout, duration, easing and layer
1533
+ scales. A `@media (prefers-reduced-motion: reduce)` block zeroes every duration. Setting these
1534
+ variables is how a store restyles the components — no value in the package is a literal.
1535
+ - `@eldrajs/ui/tailwind.css` is the Tailwind v4 theme over those variables, for consumers who run
1536
+ Tailwind themselves: import it after `@import 'tailwindcss'`. It maps the `color`, `font`,
1537
+ `spacing`, `radius`, `shadow`, `ease` and `container` namespaces onto the tokens (resetting the
1538
+ stock palettes it replaces) and adds the `text-*` type-style utilities, `control-h{,-sm,-lg}`,
1539
+ `target-min`, `target-touch`, `duration-{fast,base,slow}`, `z-{sticky,drawer,dialog,toast}` and
1540
+ the one focus ring: `eldra-focus`, `eldra-focus-always` and `eldra-focus-inset`, each with a
1541
+ `forced-colors` fallback.
1542
+ - `@eldrajs/ui/style.css` is the same theme compiled with the components' utilities, for consumers
1543
+ without Tailwind.
1544
+ - `Icon` — renders a Tabler (or any) icon component at the spec's four sizes (1, 1.25, 1.5 and
1545
+ 2rem) with stroke 1.75, in the current text colour. Decorative (`aria-hidden`) unless `label` is
1546
+ given, which makes it `role="img"` with an accessible name.
1547
+ - `Button` — the spec's one action control, in six variants (`primary`, `secondary`, `outline`,
1548
+ `ghost`, `link`, `danger`) and three sizes. Renders a native `<button>`, or an `<a href>` when
1549
+ `href` is set. `loading` hides the label and icons without changing the width, shows a spinner
1550
+ and swaps the accessible name to `label`; `iconOnly` makes it square and named by `label`;
1551
+ `pressed` exposes `aria-pressed` with a fill, not only a hue; `disabled`, `block` and the
1552
+ per-part `classes` prop complete the set. Hover fills are `color-mix()` of the tokens, so a
1553
+ rebranded `primary` or `accent` carries them with it, and on a `primary` or `accent` section the
1554
+ variants invert on their own. `--eldra-button-radius`, `--eldra-button-line-height` and
1555
+ `--eldra-button-font-size-lg` restyle it without touching a class.
1556
+ - `ButtonGroup` — the layout helper: a wrapping row with a `space-3` gap, or a segmented control
1557
+ with `attached` (`role="group"`, square inner corners, 1px neighbour overlap, the focused button
1558
+ raised above its neighbours). It is a container-query context, which is what lets an md Button
1559
+ inside it grow to the 2.75rem touch target when the block is narrower than 48rem.
1560
+ - `FORM_SUBMITTING_KEY` — the injection key a form layout provides so that, while the form
1561
+ submits, its `type="submit"` Button becomes a loading button and every other action is disabled.
1562
+ - `@eldrajs/ui/tailwind.css` gains `text-button-{sm,md,lg}`, `animate-eldra-spin` and
1563
+ `animate-eldra-pulse` (with the `eldra-spin`/`eldra-pulse` keyframes), and a `--container-tablet`
1564
+ key so `@max-tablet:` is the spec's "narrower than 48rem" container query.
1565
+ - `VisuallyHidden` — content for assistive technology only, with `as` for the rendered element and
1566
+ `focusable` for the skip-link pattern.
1567
+ - Messages: `useMessages`, `provideEldraUiMessages` and `MESSAGES_KEY` resolve the strings the
1568
+ components emit themselves in the order English defaults → provided → the component's `messages`
1569
+ prop. `enUS` is the default set; `@eldrajs/ui/messages/is-IS` now ships the Icelandic one.
1570
+ - `cx` and `partClass` merge classes with a `tailwind-merge` instance extended with this package's
1571
+ own `@utility` classes (type styles, control heights, `target-min`/`target-touch`, the
1572
+ `eldra-focus` family, motion durations, layers and the spinner animation) as their matching or
1573
+ own class groups, so a consumer's `classes.container: 'text-lg'` now replaces `text-button-md`
1574
+ instead of landing beside it. `mixToward` builds the `color-mix(in oklab, …)` string that derived
1575
+ states use. `useUiId` produces SSR-safe ids and `useControllableModel` the controlled/
1576
+ uncontrolled `v-model` behaviour.
1577
+ - `Link` — text navigation in three forms: `inline` (always underlined, 1px at 55% of the text
1578
+ colour thickening to 2px on hover), `standalone` (weight 600, optional trailing `arrow-right`
1579
+ that moves 2px right on hover, no underline at rest), and `external` (`target="_blank"`,
1580
+ `rel="noopener noreferrer"`, the `external-link` icon and visually hidden "(opens in a new tab)").
1581
+ `tone="muted"` is for footer and meta-line links. With no `href` it renders a
1582
+ `<span data-part="root">` with the same text and no link semantics, per the spec's "render plain
1583
+ text instead of a link." `as` takes a tag or a router-link component (a component receives the
1584
+ destination as `to`, matching Vue Router / NuxtLink). On a `primary` or `accent` section it
1585
+ inherits the section's contrast colour. `--eldra-link-radius` restyles the focus ring's corner
1586
+ radius.
1587
+ - `@eldrajs/ui/tailwind.css` gains `eldra-link-radius` (Link's 2px focus-ring corner radius, with
1588
+ no radius token that small).
1589
+ - `Button` — a `loading` button with no `label` now also warns once in development that it loses
1590
+ its accessible name while loading (the visible label is `visibility: hidden`), next to the
1591
+ existing icon-only warning.
1592
+ - `@eldrajs/ui/tailwind.css` — `eldra-focus` and `eldra-focus-inset` now own the transition list of
1593
+ the element they sit on: one `transition` shorthand covering colour, border, text-decoration,
1594
+ `translate` and `opacity` at `duration-fast` and the ring's own `outline-width`/`box-shadow` at
1595
+ `duration-base`, plus the reduced-motion rule. Before this the ring never grew in — a component's
1596
+ own `transition-[…] duration-fast` was a later rule for the same shorthand property and replaced
1597
+ the ring's entries wholesale, so it snapped to full size. **If you put the focus ring on your own
1598
+ element, do not add a `transition-*`/`duration-*` utility beside it**; add the property you need
1599
+ to the ring's list instead. `motion-reduce:transition-none` is no longer needed and stays
1600
+ harmless where it is.
1601
+ - `Button` — a disabled link button (`href` plus `disabled`) now keeps its `href` and gains
1602
+ `aria-disabled="true"` and `tabindex="-1"`, with navigation prevented on click. It used to drop
1603
+ the `href`, which also dropped `role="link"`, so assistive technology stopped naming the element
1604
+ exactly when the user needed to hear that it was unavailable.
1605
+ - `Button` — `aria-pressed` is emitted only on a `<button>`; a `pressed` link button drops it (a
1606
+ link cannot be pressed) and warns in development. `pressed` on any variant but `outline` also
1607
+ warns: the design spec gives the toggle fill to `outline` alone, so the other variants look
1608
+ identical pressed and unpressed.
1609
+ - `ButtonGroup` — the attached group raises the focused button with `z-10` inside an `isolate`
1610
+ context rather than `position: relative`. Every Button is already `relative`, so the old raise
1611
+ did nothing and the next button's 1px overlap covered the focus ring. Its inner corners and
1612
+ overlap are now logical (`rounded-s-none`, `rounded-e-none`, `-ms-px`), so a segmented control
1613
+ reads correctly in an RTL document.
1614
+ - `cx` — `eldra-link-radius` (Link's focus-ring corner radius) is now registered in the `rounded`
1615
+ class group, so a consumer's `classes.root: 'rounded-full'` replaces it instead of landing
1616
+ beside it as an unmerged duplicate. A new spec,
1617
+ `src/__tests__/custom-utility-coverage.spec.ts`, parses every `@utility` out of `tailwind.css`
1618
+ and fails if any of them is not covered by the merge config, so the next custom utility cannot
1619
+ ship unregistered the same way.
1620
+ - Messages — `opensInNewTab` (`en-US` "(opens in a new tab)", `is-IS` "(opnast í nýjum flipa)") is
1621
+ now parenthesised and lower-case, matching the design spec's own wording for the text a
1622
+ screen-reader appends after an external link's label.
1623
+ - `Input` — single-line text entry in seven native types (`text`, `email`, `tel`, `number`,
1624
+ `search`, `url`, `password`) and three sizes (2rem / 2.5rem / 3rem). `leadingIcon` and the
1625
+ `leadingIcon` slot put a decorative icon inside the field; `clearable` (on by default for
1626
+ `type="search"`) adds a real `<button type="button">` that shows only while there is a value,
1627
+ empties the field and returns focus to it; the `suffix` slot shares the end-edge area with it.
1628
+ `invalid` sets `aria-invalid="true"` and draws the spec's 2px `danger` boundary without the value
1629
+ shifting a pixel; `describedBy`, `required`, `readonly` and `disabled` complete the states, and
1630
+ the per-part `classes` prop covers `root`, `leadingIcon`, `control`, `clearButton` and `suffix`.
1631
+ The focus ring is on the `<input>` itself and shows on *any* focus, pointer included, as the spec
1632
+ requires of text fields. `--eldra-input-radius`, `--eldra-control-font-size`,
1633
+ `--eldra-control-font-size-mobile`, `--eldra-control-line-height` and `--eldra-field-border-width`
1634
+ restyle it without touching a class.
1635
+ - `Input` masks — `mask` takes a format such as `(###) ###-####` or `A#A #A#` (`#` a digit, `A` a
1636
+ letter, `*` either, everything else a separator). The field shows the formatted text while
1637
+ `v-model` stays the **raw** value, so what you submit is what you store. The engine is exported
1638
+ as `applyMask`, `stripMask` and `defaultCharacterMeaning` for the same job outside a component.
1639
+ - `FIELD_KEY` / `FieldContext` — the injection key a field wrapper provides so the control inside it
1640
+ takes its `id`, `aria-describedby`, invalid and required state without any wiring. Any explicit
1641
+ prop on the control wins over it.
1642
+ - `@eldrajs/ui/tailwind.css` gains `text-control{,-sm,-lg,-mobile}` (the compact-control type
1643
+ styles, on the spec's fixed 1.5rem line; `max-md:text-control-mobile` is the spec's viewport
1644
+ exception that keeps a focused field at 1rem below 48rem so iOS never zooms) and
1645
+ `eldra-field-invalid` (the second 1px line that makes a field's error boundary read as 2px).
1646
+ - `cx` — `eldra-focus-always` no longer shares a class group with `eldra-focus`. It modifies the
1647
+ ring rather than replacing it, so `cx('eldra-focus eldra-focus-always')` used to collapse to
1648
+ `eldra-focus-always` alone: a `:focus` rule with no outline, infill or transition behind it. Any
1649
+ text field of your own that carries both classes now keeps both.
1650
+ - Messages — `charactersLeft`, `resultsCount` and `viewAllResults` now read naturally at one
1651
+ ("1 character left", "1 result", "View 1 result"), in English and in Icelandic (which takes the
1652
+ singular for any count ending in 1 except 11).
1653
+ - **The focus ring fades in instead of growing.** `eldra-focus`, `eldra-focus-always`,
1654
+ `eldra-focus-inset`, `eldra-focus-inset-always` and `eldra-focus-proxy` now draw the two-tone ring
1655
+ at its full 2px infill + 2px ring at all times and animate its opacity over `duration-base`,
1656
+ through a new registered custom property `--eldra-focus-alpha` (`@property`, `syntax: '<number>'`)
1657
+ feeding `color-mix()` into both shadow colours. Animating the geometry (an `outline-width` and a
1658
+ `box-shadow` spread from 0 to 2px) could never be smooth: browsers paint both at whole device
1659
+ pixels, so the growth had two or three frames and looked like a dropped-frame stutter. The
1660
+ resting and focused appearances are unchanged; only the arrival is. No component class changes.
1661
+ Engines without `color-mix` or without `@property` show the ring at full size with no fade, and
1662
+ forced-colours mode is unchanged (a static `outline` in the system `Highlight` colour).
1663
+ **If you restyle the ring**, note it is now one `box-shadow` pair rather than a `box-shadow` plus
1664
+ an `outline`, and `--eldra-focus-alpha` is what the `transition` list carries.
1665
+ - **`Breadcrumb` — Task 8 of the "overlays, navigation, feedback" sub-project** (design spec's
1666
+ "Breadcrumb" section). A `<nav aria-label="Breadcrumb">` landmark wrapping an `<ol>`, one `<li>`
1667
+ per level: props `items` (`{ label, href? }[]`, root first — the last entry always renders as the
1668
+ current page, `<span aria-current="page">`, never a link, whatever `href` it carries), `collapseAfter`
1669
+ (default `1`, levels kept at the start), `keepLast` (default `2`, levels kept at the end), `linkAs`
1670
+ (every level link's tag/component, `Link`/`LogoItem`'s own `as` contract, named `linkAs` because
1671
+ this component's own root is spec-fixed at `<nav>` — the same reason `ContentCard`/`FeatureCard`/
1672
+ `ProductCard` use `linkAs` rather than `as`), `classes`. Parts (`data-part`): `root`, `list`,
1673
+ `item`, `link`, `current`, `separator`, `ellipsis`. No events, no slots — purely data-driven, the
1674
+ same shape `LogoItem` takes.
1675
+
1676
+ The collapse (spec: "driven by the breadcrumb's own width, not the viewport") is pure CSS: a
1677
+ `@container` root plus the existing `--container-tablet` (48rem) breakpoint `Container`'s own
1678
+ gutters already use, so a middle level carries `@max-tablet:hidden` and the ellipsis carries
1679
+ `hidden @max-tablet:inline-flex` — no `ResizeObserver`, no JS width measurement. Activating the
1680
+ ellipsis (`Enter`/`Space`, native `<button type="button">` semantics — no keydown handling needed)
1681
+ sets one internal `expanded` ref that reveals every level and removes the ellipsis from the DOM
1682
+ for good, then moves focus to the first revealed link once Vue's next tick has rendered it. The
1683
+ ellipsis's accessible name is a new `showMoreLevels(n)` message ("Show 3 more levels", singular
1684
+ "Show 1 more level"); the landmark's own name is a new `breadcrumbLabel` message ("Breadcrumb"),
1685
+ both `en-US`/`is-IS`. The separator is an inline Tabler `chevron-right` SVG (`aria-hidden`), not
1686
+ text, so it is never announced. **No title is ever truncated** — the design spec is explicit
1687
+ ("Product titles are never truncated; the trail wraps") and binding over an earlier truncation
1688
+ rule in the task's own interface comment; see the README's Deviations entry. `Breadcrumb` also
1689
+ emits the spec's own `BreadcrumbList` JSON-LD from the same `items`, as a `<script type=
1690
+ "application/ld+json">` set with `v-text` (not `v-html` or `{{ }}` — see the README's Deviations
1691
+ entry for why). `README.md` gained the `Breadcrumb` Customisation row and four Deviations entries
1692
+ (no truncation, the SVG separator, the message-catalogue names and the `v-text` JSON-LD); the
1693
+ `linkAs` naming joins `ContentCard`/`FeatureCard`/`ProductCard` in the Customisation section's
1694
+ own `as`-vs-`linkAs` rule rather than getting a Deviations entry of its own. `docs/ui.md`'s
1695
+ "Navigation, overlays and feedback" list gained its line.
1696
+ - **`Breadcrumb` fix: `keepLast: 0` no longer duplicates the whole trail.** `endItems` reached a
1697
+ bare `props.items.slice(-props.keepLast)`, and `Array.prototype.slice(-0)` is specified to
1698
+ behave as `slice(0)` — the whole array, not an empty one, because `-0` is not `< 0` — so the
1699
+ current page leaked into the collapsible middle as a demoted, non-current item while `endItems`
1700
+ rendered the entire trail again on top of it. Every level-count computation (`hasMiddle`,
1701
+ `startItems`, `middleItems`, `endItems`) now reads a clamped `effectiveKeepLast` (`Math.max
1702
+ (props.keepLast, 1)`) instead of the raw prop: the trail's last item is always the current page
1703
+ (see `BreadcrumbItem`'s own comment) and can never be collapsed away, so `keepLast: 0` behaves
1704
+ the same as `1` rather than losing that guarantee. New regression tests cover `keepLast: 0`,
1705
+ `collapseAfter: 0`, `collapseAfter + keepLast >= items.length`, and `keepLast > items.length`.
1706
+ - **`Carousel`: a focused slide's own ring is no longer clipped by the track.** `overflow-x-auto`
1707
+ forces `overflow-y` to compute `auto` as well, so the track clipped a slide's `eldra-focus` ring
1708
+ (drawn outside the slide's own box as an outline/box-shadow pair) flat at its own edge on every
1709
+ side, leaving only the inner edge toward a neighbouring slide visible — seen on a focused
1710
+ `ProductCard` in a product row, and the same way on a gallery tile and a testimonial card. The
1711
+ track now carries padding sized from `--eldra-focus-offset` plus `--eldra-focus-width` (the
1712
+ ring's own reach, read from `tailwind.css`'s focus-ring utility rather than assumed), pulled back
1713
+ in by a negative margin of the same size so its rendered footprint — and every slide's position
1714
+ inside it — is unchanged, plus a matching scroll padding so `scroll-snap-align: start` still
1715
+ lands on a slide's own edge instead of the new padding in front of it.
1716
+ - **`RangeSlider`'s own `inputs`-slot example (README, `CurrencyFields` story) now matches the
1717
+ wiring a consumer should actually ship**, not an unsafe shape. It passed the slot's `min`/`max`
1718
+ straight to the replacement field, which would have refused a keystroke `commit` was always
1719
+ going to clamp anyway (typing "1250" by way of "1" stops dead); used a visible `label`, doubling
1720
+ the name the row already shows beside the separator; and called `commit(end, next)` for its side
1721
+ effect without assigning the return back to the field's own model, which is the one thing that
1722
+ keeps a replacement field honest when a typed value snaps onto the thumb's current position —
1723
+ `commit` writes nothing and `change` never fires, so a field left showing its own stale number
1724
+ would keep a figure the control never applied. No component code changed; the example and the
1725
+ story now drop the field-level `min`/`max`, use `aria-label`, and assign `commit`'s return back.