@eldrajs/ui 0.0.0 → 0.1.1

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 +1724 -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 +12586 -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 +5251 -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
@@ -0,0 +1,39 @@
1
+ import { listFormat } from "@eldrajs/sdk/format/list";
2
+ //#region src/utils/listFormat.ts
3
+ /**
4
+ * Joins a list of strings the way a short list naturally reads: comma-separated, with the last
5
+ * item introduced by the locale's own conjunction word and no comma before it —
6
+ * `AvatarGroup`'s accessible sentence is the one caller (spec "Avatar" → Accessibility:
7
+ * `aria-label="Makers: Ingrid, Tomas, Maya and 4 more"`, no Oxford comma before "and"; the API contract:
8
+ * "Icelandic list joining: use `Intl.ListFormat` with the message locale where available").
9
+ *
10
+ * `Intl.ListFormat` is the right primitive for this locale by locale, but its English "long
11
+ * conjunction" CLDR pattern inserts a comma before "and" once there are three or more items
12
+ * ("a, b, and c"), which the spec's own example does not have — Icelandic's own pattern has no
13
+ * such comma, so verbatim output already matches there. Rather than hand-roll the whole join and
14
+ * lose every locale's own conjunction word, word order and pluralisation, this keeps
15
+ * `Intl.ListFormat`'s output and removes only that one separator: `formatToParts` exposes the
16
+ * literal immediately before the final element, and stripping a leading `", "` from it turns
17
+ * "a, b, and c" into "a, b and c" while leaving a locale that never had the comma (Icelandic
18
+ * among them) untouched.
19
+ *
20
+ * Falls back to a hand-written join — `", "` between every item but the last, `" and "`/`" og "`
21
+ * before it, picked from the locale tag — when `Intl.ListFormat` is not available in the runtime
22
+ * at all (some minimal JS engines ship `Intl` without every constructor).
23
+ */
24
+ function formatConjunctionList(items, locale) {
25
+ if (items.length === 0) return "";
26
+ if (items.length === 1) return items[0];
27
+ if (typeof Intl !== "undefined" && typeof Intl.ListFormat === "function") {
28
+ const parts = listFormat(locale, {
29
+ style: "long",
30
+ type: "conjunction"
31
+ }).formatToParts(items);
32
+ const conjunctionIndex = parts.length - 2;
33
+ return parts.map((part, index) => index === conjunctionIndex && part.type === "literal" ? part.value.replace(/^,\s*/, " ") : part.value).join("");
34
+ }
35
+ const and = locale.toLowerCase().startsWith("is") ? "og" : "and";
36
+ return `${items.slice(0, -1).join(", ")} ${and} ${items[items.length - 1]}`;
37
+ }
38
+ //#endregion
39
+ export { formatConjunctionList as t };
@@ -0,0 +1,485 @@
1
+ export declare const enUS: {
2
+ /** Empties a field or a selection. */
3
+ clear: string;
4
+ /** Dismisses a dialog, a drawer or a toast. */
5
+ close: string;
6
+ /**
7
+ * A `Drawer`'s close button, when the drawer has a name to put in it (spec "Drawer" →
8
+ * Accessibility: "Close button names the drawer: 'Close cart', 'Close menu', 'Close filters'").
9
+ * `name` is whatever names the drawer — its `title` text if it has one, else its `ariaLabel` —
10
+ * so a consumer names the exact wording by choosing that prop's value (`title="Cart"` reads
11
+ * "Close Cart"). Falls back to the plain `close` above when the drawer has neither.
12
+ */
13
+ closeDrawer: (name: string) => string;
14
+ /** The `SearchModal`'s close button (desktop and tablet) — distinct from the plain `close` above
15
+ * because the design spec gives it this exact wording (spec "Search modal" → Sizes, Close row:
16
+ * "'Close search'"), unlike `Dialog`/`Drawer`'s generic "Close". */
17
+ closeSearch: string;
18
+ /** The `SearchModal`'s own text button on phones, replacing the icon `closeSearch` button there
19
+ * (spec "Search modal" → Sizes, Close row: "'Cancel' small ghost text button"). */
20
+ cancel: string;
21
+ /** The `SearchModal`'s clear button (spec "Search modal" → Sizes, Clear row: "'Clear search'") —
22
+ * distinct from the plain `clear` above for the same reason `closeSearch` is. */
23
+ clearSearch: string;
24
+ /** A `Toast`'s close button (spec "Toast" -> Accessibility: `aria-label="Dismiss notification"`)
25
+ * — distinct from `close` above, which is the generic word `Dialog` and future modal surfaces
26
+ * use for the same button. */
27
+ dismissNotification: string;
28
+ /** A `Toaster`'s own region (spec "Toast" -> Accessibility: `aria-label="Notifications"`, on the
29
+ * `role="status" aria-live="polite"` element). */
30
+ notifications: string;
31
+ /** Accompanies a spinner or a busy region. */
32
+ loading: string;
33
+ /**
34
+ * Marks a field that may be left empty. The `FieldWrapper` renders it in parentheses, so the
35
+ * spec's optional mark reads "(optional)" — hence the lower case here, unlike the labels above.
36
+ */
37
+ optional: string;
38
+ /** Marks a field that must be filled in. */
39
+ required: string;
40
+ /** The search control's own label. */
41
+ search: string;
42
+ /**
43
+ * Shown by a `Select` with no value (spec "Select" -> Properties, `placeholder`: default
44
+ * `"Select"`). Two words would not fit a narrow filter bar's trigger, and the field's own label
45
+ * already says which choice this is.
46
+ */
47
+ selectPlaceholder: string;
48
+ /**
49
+ * Shown by a `MultiSelect` with no value (spec "Multi-select" -> Properties, `placeholder`:
50
+ * default `"Any"`). It reads as a filter's "no filter applied", which is what a multi-select
51
+ * mostly is, and the field's own label says which choice it belongs to.
52
+ */
53
+ multiSelectPlaceholder: string;
54
+ /** Shown when a filtered list has nothing to show. */
55
+ noResults: string;
56
+ /**
57
+ * A `SearchBar`'s no-results title (spec "Search bar" -> Panel views, `none`: '"No results for
58
+ * “q”"'). Deliberately not `noMatchesFor`, which is a `Select`'s own empty state and whose
59
+ * "matches" is that section's own word.
60
+ */
61
+ noResultsFor: (query: string) => string;
62
+ /**
63
+ * A `Select`'s empty state while a search query is showing (spec "Select" -> Behaviour, Search:
64
+ * 'With no matches, the empty state "No matches for “query”" shows as real text'). The
65
+ * curly quotation marks are the spec's own.
66
+ */
67
+ noMatchesFor: (query: string) => string;
68
+ /** The overflow badge on a `MultiSelect` that cannot show every tag. */
69
+ moreSelected: (n: number) => string;
70
+ /** The accessible name of a selected tag's remove button. */
71
+ removeTag: (label: string) => string;
72
+ /**
73
+ * Names a `MultiSelect`'s tag list. Inside a `FieldWrapper` it is joined with the field's own
74
+ * label, so the list reads "Selected categories".
75
+ */
76
+ selected: string;
77
+ /** A `MultiSelect` footer's live count. */
78
+ selectedCount: (n: number) => string;
79
+ /** A `MultiSelect` footer's live count with nothing chosen. */
80
+ noneSelected: string;
81
+ /** Closes a `MultiSelect`'s popover. It commits nothing: every toggle already applied. */
82
+ done: string;
83
+ /** The accessible name of a `QuantityStepper`'s minus button. */
84
+ decrease: string;
85
+ /** The accessible name of a `QuantityStepper`'s plus button. */
86
+ increase: string;
87
+ /** The accessible name of a `QuantityStepper`'s field. */
88
+ quantity: string;
89
+ /** A `QuantityStepper`'s polite live-region announcement after a settled change. */
90
+ quantityUpdated: (n: number) => string;
91
+ /** A `RangeSlider` thumb's and field's name with no visible group label to join it to. */
92
+ minimum: string;
93
+ /** The same, for the other end of the range. */
94
+ maximum: string;
95
+ /**
96
+ * A `RangeSlider` thumb's and field's name built from the visible group label, so a price
97
+ * filter's two ends read "Minimum price" and "Maximum price" (spec "Range slider" →
98
+ * Accessibility). `name` is the control's own `label`; the same shape as `closeDrawer` above.
99
+ */
100
+ minimumOf: (name: string) => string;
101
+ /** The same, for the other end of the range. */
102
+ maximumOf: (name: string) => string;
103
+ /** The word between a `RangeSlider`'s two typed fields (spec "Range slider" → Anatomy item 6).
104
+ * Decorative: both fields are already named, so it is `aria-hidden`. */
105
+ to: string;
106
+ /** Appended to a link that opens a new browsing context. */
107
+ opensInNewTab: string;
108
+ /** A position-in-a-set counter, e.g. a carousel's slide count. */
109
+ counter: (n: number, max: number) => string;
110
+ /** `Carousel`'s previous-arrow accessible name (spec "Carousel" → Accessibility: "'Previous
111
+ * slide' ... (galleries)"; used uniformly for product rows too — see `Carousel.vue`'s own
112
+ * comment on why one label serves both variants). */
113
+ previous: string;
114
+ /** `Carousel`'s next-arrow accessible name. */
115
+ next: string;
116
+ /** `Carousel`'s Pause/Play button, both its visible text and (with no autoplay-specific
117
+ * "slideshow" suffix — a deliberate simplification, recorded under Deviations in the README)
118
+ * its accessible name while playing. */
119
+ pause: string;
120
+ /** `Carousel`'s Pause/Play button while paused. */
121
+ play: string;
122
+ /** A `Carousel` slide's accessible label (spec "Carousel" → Accessibility: `aria-label="2 of
123
+ * 4"`), `position` and `total` both 1-based. */
124
+ slideOf: (position: number, total: number) => string;
125
+ /** A `Carousel` dot's accessible name (spec "Carousel" → Accessibility: `aria-label="Go to
126
+ * slide 3"`), 1-based. */
127
+ goToSlide: (n: number) => string;
128
+ /** A `Carousel` track's own accessible name (spec "Carousel" → Accessibility: the track needs
129
+ * "a label" distinct from the region's own — the spec's own examples are "Bestsellers,
130
+ * scrollable list" for a product row and "Slides" for a gallery; this package uses the single
131
+ * generic word for both, recorded under Deviations in the README). */
132
+ slides: string;
133
+ /** How to operate a `Carousel` whose slides hold their own links or buttons, read once when
134
+ * focus enters the carousel (it describes the carousel itself, not each slide — see
135
+ * `Carousel.vue`'s own `instructionsId` comment). Spec "Keyboard": a composite widget "take[s]
136
+ * one tab stop and use[s] arrow keys inside", which is worth saying out loud to the one visitor
137
+ * who cannot see the row of cards it applies to. */
138
+ slideInstructions: string;
139
+ /** A `Lightbox`'s close button (spec "Lightbox" → Anatomy, part 3: "'Close image viewer'") —
140
+ * distinct from `close` above, the same way `dismissNotification` is distinct from it for
141
+ * `Toast`: a full-screen image viewer is not "a dialog" to the person closing it. */
142
+ closeLightbox: string;
143
+ /** A `Lightbox` arrow's accessible name (spec "Lightbox" → Accessibility: "'Previous image' /
144
+ * 'Next image'"). Deliberately `*Image`, not `Carousel`'s own `previous`/`next` ("…slide"): the
145
+ * Lightbox spec's own wording never says "slide" anywhere in its Anatomy or Accessibility
146
+ * sections, even though it is built on the same track internally. */
147
+ previousImage: string;
148
+ /** A `Lightbox` arrow's accessible name. See `previousImage`. */
149
+ nextImage: string;
150
+ /** A `Lightbox` slide's accessible label (spec "Lightbox" → Accessibility: `aria-label="2 of
151
+ * 4"`), `position` and `total` both 1-based — the same shape as `Carousel`'s own `slideOf`, but
152
+ * its own key: a consumer overriding one must not silently change the other's wording. */
153
+ imageOf: (position: number, total: number) => string;
154
+ /**
155
+ * A `Lightbox` thumbnail's accessible name. The spec's own wording ("With thumbnails" → "each
156
+ * 'Go to slide n'") reuses `Carousel`'s dot phrasing verbatim, but this package gives `Lightbox`
157
+ * its own `*Image` vocabulary throughout (see `previousImage`/`imageOf` above) rather than
158
+ * surfacing "slide" — an internal implementation detail this component's own track shares with
159
+ * `Carousel` — to the person using it. Recorded under Deviations in the README.
160
+ */
161
+ goToImage: (n: number) => string;
162
+ /** A `Lightbox` track's own accessible name (spec "Lightbox" → Accessibility: "Track: focusable
163
+ * (`tabindex="0"`), `aria-label="Images"`") — the spec's own literal word, not `Carousel`'s
164
+ * `slides` key: unlike the rest of this component's vocabulary (see `previousImage`/`imageOf`/
165
+ * `goToImage` above), the spec gives the track a specific, real word here rather than leaving it
166
+ * to this package's own generic choice, so it gets its own key instead of reusing `slides`. */
167
+ lightboxImages: string;
168
+ /** A `Textarea`'s remaining-characters hint, announced once at 80% of the limit. */
169
+ charactersLeft: (n: number) => string;
170
+ /** A `Textarea`'s over-the-limit hint, announced once when the limit is passed. */
171
+ overLimit: (n: number) => string;
172
+ /** A product that cannot be bought. `ProductCard`'s own sold-out `Badge`, and `StockBadge`'s
173
+ * default copy for `level="out"` — one key, not two, for the same English/Icelandic phrase. */
174
+ soldOut: string;
175
+ /**
176
+ * `ProductCard`'s "New" badge (spec "Product card" → Anatomy, part 2). A plain string, unlike
177
+ * `quickAdd` below: the word never takes a value, so it needs no function.
178
+ */
179
+ newBadge: string;
180
+ /**
181
+ * `ProductCard`'s quick-add button's *visible* text (spec "Product card" → Anatomy, part 8:
182
+ * "Quick add"). Separate from `quickAdd` below — see that key's own comment for why the two are
183
+ * not the same string.
184
+ */
185
+ quickAddLabel: string;
186
+ /**
187
+ * `ProductCard`'s quick-add button's full accessible name (spec "Product card" → Accessibility:
188
+ * "Quick add names the product: 'Quick add' + hidden ' Merino crew sweater'"), a *function*
189
+ * rather than the visible label plus an appended title: the English spec text always puts the
190
+ * product name last, but a locale's natural word order need not — `is-IS`'s own translation
191
+ * puts it in the middle ("Setja {title} í körfu") — so the whole sentence has to be one
192
+ * catalogue entry a locale can reorder freely, not `quickAddLabel` plus a raw suffix glued on
193
+ * by the component. Applied as the button's `aria-label`, which replaces the *visible* text for
194
+ * accessible-name purposes (confirmed: a fallthrough `aria-label` on `<Button>` overrides its
195
+ * own computed one — see `ProductCard.vue`'s own comment), so the visible/hidden split the spec
196
+ * draws for English is honoured without constraining every locale to the same shape.
197
+ */
198
+ quickAdd: (title: string) => string;
199
+ /**
200
+ * `ProductCard`'s loading skeleton's accessible name (spec "Product card" → Variants, Loading
201
+ * row: `aria-label="Loading product"`).
202
+ */
203
+ loadingProduct: string;
204
+ /**
205
+ * `ProductCard`'s colour dots' hidden summary (spec "Product card" → Anatomy, part 7: 'hidden
206
+ * "Available in 5 colours"'; → Accessibility: "Colour dots are `aria-hidden`, summarised by
207
+ * hidden 'Available in 5 colours'"). The dots themselves carry no text of their own.
208
+ */
209
+ swatchesAvailable: (n: number) => string;
210
+ /** `Image`'s live placeholder text, shown next to the photo icon when there is no `media` (spec
211
+ * "Image" → Variants, "Placeholder (live)" row). */
212
+ noImage: string;
213
+ /** `Image`'s live placeholder's accessible name (spec "Image" → Accessibility: 'otherwise it
214
+ * gets `role="img"` and `aria-label="No image available"`'), omitted when `decorative` is on. */
215
+ noImageAvailable: string;
216
+ /**
217
+ * `LogoItem`'s default `linkContext` (spec "Logo item" → Properties, `linkContext` row: `"
218
+ * (stockist site)"` when `href` is external), appended to a linked logo's accessible name —
219
+ * "Kiln Street (stockist site)". Only used when `href` looks external and no `linkContext` was
220
+ * given; an on-site stockist page link gets no extra context.
221
+ */
222
+ stockistSite: string;
223
+ /** A `StockBadge`'s default copy for `level="in"` (spec "Badge" → Stock status line). */
224
+ stockIn: string;
225
+ /**
226
+ * A `StockBadge`'s default copy for `level="low"` (spec "Badge" → Stock status line): "Low
227
+ * stock: only 3 left" is the spec's own example with a quantity of 3. With no `quantity` there
228
+ * is nothing to count, so the copy drops the count rather than fabricate one.
229
+ */
230
+ stockLow: (n: number | null) => string;
231
+ /**
232
+ * A `StockBadge`'s default copy for `level="preorder"` (spec "Badge" → Stock status line): the
233
+ * spec's own example is "Pre-order, ships 14 Nov", but `StockBadge` has no `date` prop to fill
234
+ * that in — a store that knows the ship date passes it here or overrides the whole line with
235
+ * `message`. With no date this reads as plain "Pre-order".
236
+ */
237
+ stockPreorder: (date?: string) => string;
238
+ /**
239
+ * A `Price`'s visually hidden label before the current amount when on sale (spec "Price" →
240
+ * Anatomy, part 2). `labels.sale` overrides it per instance.
241
+ */
242
+ salePrice: string;
243
+ /**
244
+ * A `Price`'s visually hidden label before the compare-at amount when on sale (spec "Price" →
245
+ * Anatomy, part 3). `labels.regular` overrides it per instance.
246
+ */
247
+ regularPrice: string;
248
+ /**
249
+ * A `Price`'s "From" label for a product whose variants differ in price (spec "Price" →
250
+ * Properties, `from` row). `labels.from` overrides it per instance.
251
+ */
252
+ from: string;
253
+ /**
254
+ * A `Price`'s unit-price line (spec "Price" → Anatomy, part 4): "$6.00 / 100 g" — this is the
255
+ * separator and unit half, appended after the formatted per-unit amount.
256
+ */
257
+ perUnit: (per: string) => string;
258
+ /**
259
+ * What a `Price` says in its live region while `revalidating` — a prerendered amount that is
260
+ * still on screen, dimmed, while a fresher one is fetched. Its own sentence rather than the
261
+ * generic `loading` above, because the two states are different news for a shopper: `loading`
262
+ * means there is no price yet, this means the price shown may be a moment out of date.
263
+ */
264
+ updatingPrice: string;
265
+ /**
266
+ * The `StockBadge` half of `updatingPrice` — the same state on the stock line. Two keys, not one
267
+ * "Updating" with the noun spliced on: a locale's own wording for each need not share a stem,
268
+ * and the two are announced separately.
269
+ */
270
+ updatingStock: string;
271
+ /**
272
+ * `Rating`'s one accessible sentence (spec "Rating" → Accessibility: "the wrapper has `role="img"`
273
+ * and `aria-label="Rated 4.5 out of 5, 128 reviews"`"), reused verbatim as the linked variant's
274
+ * `aria-label` too — see `Rating.vue`'s own comment for why both forms share one sentence rather
275
+ * than the spec's separately worded linked hidden text. `value` is the already-rounded rating.
276
+ */
277
+ rating: (value: number, count: number) => string;
278
+ /** `Rating`'s no-reviews state (spec "Rating" → Variants, "No reviews" row): "count = 0 renders
279
+ * the no-reviews state ... never '0.0'." Read as normal text, not an `aria-label`. */
280
+ noReviews: string;
281
+ /**
282
+ * `Rating`'s linked-variant visible count text (spec "Rating" → Anatomy, part 3: "'(128)' on
283
+ * cards; '128 reviews' underlined when linked") — the one piece of `Rating`'s own text the task
284
+ * API contract's two named keys (`rating`, `noReviews`) do not cover: the card form's `"(128)"` is a
285
+ * literal parenthesised number with no word to pluralise, but the linked form's visible text is a
286
+ * real English/Icelandic sentence fragment and so must come from `useMessages()` like every other
287
+ * word this package renders.
288
+ */
289
+ reviewCount: (n: number) => string;
290
+ /** The `SearchModal`'s field label. */
291
+ searchTheShop: string;
292
+ /** The `SearchBar`'s results-panel name, and the `SearchModal`'s. */
293
+ searchSuggestions: string;
294
+ /** The heading of a search panel's product group. */
295
+ searchProducts: string;
296
+ /** The heading of a search panel's collection group. */
297
+ searchCollections: string;
298
+ /** The heading of a search panel's articles-and-pages group. */
299
+ searchJournal: string;
300
+ /** The line under a search panel's "No results" title, above the suggestion chips. */
301
+ searchAdvice: string;
302
+ /** The `SearchModal`'s history group heading. */
303
+ recentSearches: string;
304
+ /** The `SearchModal`'s suggestions group heading. */
305
+ popularSearches: string;
306
+ /** Empties the search history (the spec's own row label). */
307
+ clearRecent: string;
308
+ /**
309
+ * The live-region announcement after a search (spec "Search bar" -> Behaviour, Announcements:
310
+ * 'announces "4 results for mer" (singular "1 result for mer")'). The query is optional: a
311
+ * results count with nothing to name — a filtered list, a Search page heading — reads "4 results".
312
+ */
313
+ resultsCount: (n: number, query?: string) => string;
314
+ /**
315
+ * The last row of a search results panel, which opens the full results page (spec "Search bar":
316
+ * '"See all N results for “q”" is always the last row'). The query is optional, for a panel that
317
+ * has none to show — the Search modal's own "See all n results" row.
318
+ */
319
+ viewAllResults: (n: number, query?: string) => string;
320
+ /**
321
+ * What a search control's live region says while a request for the current query is still out —
322
+ * `SearchBar`/`SearchModal` announce this instead of a count (spec "Search bar" → Behaviour,
323
+ * Announcements). Until a response for *that* query exists there is nothing to count, and
324
+ * `noResultsFor` would be a wrong answer rather than an empty one — the same distinction the
325
+ * `loading` and `none` panel views draw, in the channel a screen reader hears.
326
+ */
327
+ searchLoading: string;
328
+ /** The keyboard hint beside a search control. */
329
+ shortcutHint: string;
330
+ /** The `SearchModal`'s foot, first hint (spec "Search modal" → Anatomy, item 6: "↑↓ to move").
331
+ * Read after a key-cap pair, `aria-hidden` alongside it — screen readers get the combobox
332
+ * semantics instead (spec → Accessibility). */
333
+ searchMoveHint: string;
334
+ /** The `SearchModal`'s foot, second hint ("↵ to open"). */
335
+ searchOpenHint: string;
336
+ /** The `SearchModal`'s foot, third hint ("esc to clear or close"). */
337
+ searchEscHint: string;
338
+ /** The label of an error region. */
339
+ error: string;
340
+ /** `EmptyState`'s built-in "Try again" button (`variant="error"`, no `actions` slot given). */
341
+ tryAgain: string;
342
+ /**
343
+ * The error summary's own line in the `./vee-validate` entry's `Form` (spec "Form layout" ->
344
+ * States, Invalid on submit: "Long forms add an error summary alert at the top ... that lists a
345
+ * link to each error"). The links below it are the messages themselves, so this one only has to
346
+ * say how many there are.
347
+ */
348
+ formErrors: (n: number) => string;
349
+ /**
350
+ * `AvatarGroup`'s one accessible sentence (spec "Avatar" → Accessibility: "A group gets one
351
+ * name: `role="group"`, `aria-label="Makers: Ingrid, Tomas, Maya and 4 more"`"). `names` is the
352
+ * visible avatars' own names, in order; `more` is however many more people the group holds
353
+ * beyond those — `0` when every person in the group already has a visible avatar, in which case
354
+ * the sentence is just `label` plus the plain conjunction list with nothing appended.
355
+ */
356
+ avatarGroup: (label: string, names: string[], more: number) => string;
357
+ /** A `FeatureCard`'s default link cue when linked (spec "Feature card" → Properties, `cue` row:
358
+ * default `"Learn more"`). `cue` overrides it per instance. */
359
+ learnMore: string;
360
+ /** `Breadcrumb`'s landmark name (spec "Breadcrumb" → Accessibility: `<nav aria-label=
361
+ * "Breadcrumb">`). */
362
+ breadcrumbLabel: string;
363
+ /**
364
+ * `Breadcrumb`'s ellipsis button (spec "Breadcrumb" → Accessibility: `<button type="button"
365
+ * aria-label="Show 3 more levels">`, "the count is the number of hidden levels"). `n` is always
366
+ * the number of collapsed middle items, so the same rule reads "Show 1 more level" for a single
367
+ * hidden level rather than the spec's own three-level example.
368
+ */
369
+ showMoreLevels: (n: number) => string;
370
+ /** `Pagination`'s `<nav>` accessible name (spec "Pagination" → Accessibility:
371
+ * `<nav aria-label="Pagination">`), the default for its `ariaLabel` prop. */
372
+ pagination: string;
373
+ /**
374
+ * `Pagination`'s previous control, in both forms: the numbered form's visible "Previous page"
375
+ * link text and the compact form's icon-only `aria-label`. The design spec's own anatomy gives
376
+ * the numbered form a shorter visible "Previous" — this package uses the one fuller phrase for
377
+ * both, rather than a second, unspecified sentence for the compact icon-only arrow (see the
378
+ * README's Deviations entry).
379
+ */
380
+ previousPage: string;
381
+ /** `Pagination`'s next control — see `previousPage` above. */
382
+ nextPage: string;
383
+ /**
384
+ * A `Pagination` page link's accessible name (spec "Pagination" → Accessibility: `aria-label="Page
385
+ * 7"`; the current one `aria-label="Page 6, current page"`). One message, not two: `current`
386
+ * defaults to `false`, so `pageN(7)` and `pageN(6, true)` share a single translatable sentence
387
+ * rather than a second key existing only to append four words.
388
+ */
389
+ pageN: (n: number, current?: boolean) => string;
390
+ /**
391
+ * `Pagination`'s compact-form status (spec "Pagination" → Anatomy, part 6: "Page 2 of 12"). Not
392
+ * one of the message keys the API contract names explicitly, but the compact form has no other way
393
+ * to say it: unlike `pageN`, the sentence needs the total baked in, and generating it from two
394
+ * separate calls would leave "of" untranslated. Recorded under the README's Deviations entry.
395
+ */
396
+ pageOfTotal: (page: number, total: number) => string;
397
+ /**
398
+ * `LoadMore`'s live status (spec "Pagination" → Anatomy, part 7: "Showing 24 of 96 products").
399
+ * `noun` is the caller's own word (the `noun` prop), already declined for this sentence — the
400
+ * same shape `QuantityStepper`'s `unit` prop follows.
401
+ */
402
+ showingOf: (shown: number, total: number, noun: string) => string;
403
+ /** `LoadMore`'s button label (spec "Pagination" → Anatomy, part 9). */
404
+ loadMore: string;
405
+ /** The `FilterPanel` head's visible title (spec "Filter panel" → Properties, `title`). */
406
+ filterPanelTitle: string;
407
+ /** The `<form>`'s accessible name (spec → Properties, `label`). */
408
+ filterPanelLabel: string;
409
+ /**
410
+ * The head's reset button, and the drawer foot's (spec → Anatomy item 1). Deliberately not the
411
+ * plain `clear` above, which is a field's own "Clear": this one empties every facet at once, and
412
+ * the spec gives it these two words.
413
+ */
414
+ filterPanelClearAll: string;
415
+ /** The applied-chip list's accessible name (spec → Accessibility: 'a list labelled "Active
416
+ * filters"'). */
417
+ filterPanelApplied: string;
418
+ /**
419
+ * An applied chip's remove button (spec → Accessibility: 'each remove button is labelled "Remove
420
+ * filter Colour: Brown"'). Both halves are named, because a chip reads "Brown" and a shopper
421
+ * with four chips has to hear which facet each one belongs to.
422
+ */
423
+ filterPanelRemoveFilter: (facet: string, value: string) => string;
424
+ /** The button under a truncated list (spec → Anatomy item 5). `n` is the facet's *whole* count,
425
+ * not the hidden remainder — the spec's own "Show all 12" on a list of twelve. */
426
+ filterPanelShowAll: (n: number) => string;
427
+ /** The same button once the list is open (spec → Behaviour: "changes to **Show fewer**"). */
428
+ filterPanelShowFewer: string;
429
+ /** A long list's search field, its accessible name (spec → Accessibility: 'labelled "Search
430
+ * material values"'). */
431
+ filterPanelSearchLabel: (facet: string) => string;
432
+ /** The same field's placeholder (spec → Accessibility: 'placeholder "Search material"'). */
433
+ filterPanelSearchPlaceholder: (facet: string) => string;
434
+ /**
435
+ * One value's whole accessible name: its label and what it would leave (spec → Accessibility:
436
+ * '"Sweaters, 18 products"', '"Brown, 9 products"'). One sentence rather than a visible number
437
+ * with hidden words around it, so a translation can put the count where its own grammar wants it.
438
+ */
439
+ filterPanelValueName: (label: string, count: number) => string;
440
+ /**
441
+ * A size tile's accessible name, which names its size system as well (spec → Accessibility:
442
+ * '"Knitwear M, 14 products"'). A size on its own is ambiguous the moment a store sells two
443
+ * systems — "42" is a shoe and a sock.
444
+ */
445
+ filterPanelSizeName: (system: string, label: string, count: number) => string;
446
+ /** Appended to a value nothing is left for (spec → Accessibility: '", none available"'). Include
447
+ * the leading comma and space: the component renders it verbatim after the name above. */
448
+ filterPanelNoneAvailable: string;
449
+ /**
450
+ * Said of a value ticked because its parent is, not because it is a filter of its own — the
451
+ * request carries the parent's value and the platform expands it. Said out loud because a
452
+ * ticked, disabled box with no explanation reads as a dead end. The leading space is the
453
+ * component's to add, not this string's.
454
+ */
455
+ filterPanelImpliedBy: (parent: string) => string;
456
+ /** Names the nested rows under one value (spec: a real grouping, and no extra tab stop). */
457
+ filterPanelUnder: (parent: string) => string;
458
+ /** The link under a size facet's tiles (spec → Anatomy item 9). */
459
+ filterPanelSizeGuide: string;
460
+ /** The visible label of a range facet's lower field (spec → Anatomy item 12). */
461
+ filterPanelMin: string;
462
+ /** The upper one. */
463
+ filterPanelMax: string;
464
+ /**
465
+ * Appended to a range facet's **maximum** thumb while it sits at the facet's own limit (spec →
466
+ * Behaviour: 'the top thumb at the maximum adds " or more" ("$240 or more")'). Above the
467
+ * catalogue's highest value there is nothing left to exclude, and "$240" would claim otherwise.
468
+ * Include the leading space: the component appends it to the formatted number verbatim.
469
+ */
470
+ filterPanelOrMore: string;
471
+ /** The drawer foot's apply button (spec → Anatomy item 14: "**Show N products**"). */
472
+ filterPanelShowResults: (n: number) => string;
473
+ /**
474
+ * The same button before any count has arrived. The drawer's number is the owning block's own
475
+ * pending-count read, which a panel mounted ahead of it does not have yet — and a button that
476
+ * said "Show 0 products" while the read was in flight would be a number nobody can trust.
477
+ */
478
+ filterPanelShowProducts: string;
479
+ };
480
+ /**
481
+ * Every message a component can emit. A consumer overrides any subset of it,
482
+ * per component (the `messages` prop) or app-wide
483
+ * (`provideEldraUiMessages`).
484
+ */
485
+ export type UiMessages = typeof enUS;
@@ -0,0 +1,2 @@
1
+ export { enUS, enUS as defaultMessages } from './en-US.js';
2
+ export type { UiMessages } from './en-US.js';
@@ -0,0 +1,16 @@
1
+ import { UiMessages } from './en-US.js';
2
+ /**
3
+ * The Icelandic message set, shipped as its own entry point
4
+ * (`@eldrajs/ui/messages/is-IS`) so an English-only store never bundles it.
5
+ *
6
+ * ```ts
7
+ * import { isIS } from '@eldrajs/ui/messages/is-IS';
8
+ * app.provide(MESSAGES_KEY, isIS);
9
+ * ```
10
+ *
11
+ * Typed as `UiMessages`, so a key added to `en-US.ts` is a compile error here
12
+ * until it is translated; `parity.spec.ts` also checks arity and that no
13
+ * string is left in English.
14
+ */
15
+ export declare const isIS: UiMessages;
16
+ export default isIS;