@eldrajs/ui 0.0.0-stage → 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 +105 -3
@@ -0,0 +1,110 @@
1
+ import { InputSize } from './types.js';
2
+ /**
3
+ * The field recipes of the design spec's **Input**, in one place.
4
+ *
5
+ * `Input` is the spec's field box, and two other controls draw the same box: `SearchBar`'s search
6
+ * field ("Search bar" → Sizes says it *is* an input) and `UnitInput` (so `CurrencyInput` too).
7
+ * `SearchBar` used to carry a
8
+ * hand-copied duplicate of these strings, and the copy drifted — the operator's report was that
9
+ * the search field "does not behave like the regular input fields", which was exactly that: the
10
+ * copy had lost the radius variable and the mobile type-size rule, so the field rounded and
11
+ * resized differently from every `Input` beside it.
12
+ *
13
+ * So the recipes live here and the three components import them. What a component may add is its
14
+ * own **delta** — a pill radius, a different padding for an icon it draws itself — never a second
15
+ * copy of the box.
16
+ *
17
+ * Nothing here is exported from the package: a consumer restyles through `classes`, tokens and
18
+ * the per-component CSS variables (see the README's Customisation section), not by importing our
19
+ * class strings, which are not a stable API.
20
+ */
21
+ /**
22
+ * The shared box (spec "Input" → Anatomy, Sizes, States). The `<input>` *is* the field box — the
23
+ * anatomy calls it "the native `<input>`, full width" — so the border, the radius and the one
24
+ * focus ring all live on it, and any leading or trailing decoration is absolutely positioned over
25
+ * the padding the sizes reserve for it.
26
+ *
27
+ * `eldra-focus-always` is the text-field rule from the focus-ring foundation: the ring shows on
28
+ * *any* focus, pointer included, "because a caret alone is easy to miss". There is deliberately no
29
+ * `transition-*`/`duration-*` utility beside it — `eldra-focus` owns this element's transition
30
+ * list, including the `duration-fast` border-colour change the spec's Behaviour section asks for.
31
+ * See `src/styles/tailwind.css` and `src/__tests__/focus-transition.spec.ts`.
32
+ */
33
+ export declare const FIELD_BASE: string;
34
+ /**
35
+ * The type style per size (spec "Input" → Sizes). Its own constant because `SearchBar`'s two sizes
36
+ * take exactly these rules while its paddings are its own — the `max-md:text-control-mobile`
37
+ * override in particular, which is a *viewport* rule (so iOS never zooms into a focused field) and
38
+ * is the half that had gone missing from the copy.
39
+ */
40
+ export declare const FIELD_TEXT: Record<InputSize, string>;
41
+ /**
42
+ * Sizes (spec "Input" → Sizes). `--spacing` is 0.25rem, so `py-0.75`/`px-2.25` are the spec's
43
+ * 0.1875/0.5625rem, `py-1.75`/`px-2.75` its 0.4375/0.6875rem and `py-2.75` its 0.6875rem.
44
+ * The 1.5rem line comes from the `text-control*` utilities, so the value sits on the spec's line
45
+ * inside the spec's box at every size.
46
+ */
47
+ export declare const FIELD_SIZE: Record<InputSize, string>;
48
+ /**
49
+ * Room for the decorations (spec "Input" → Sizes, md row): "With a leading icon, the start padding
50
+ * is 2.25rem. With a trailing action, the end padding is 2.5rem." The leading icon is 1.125rem at
51
+ * every size, so its 2.25rem applies to all three; the trailing action is 2rem square, which does
52
+ * not fit a 2rem sm box, so sm uses a 1.5rem button (still the 2.5.8 target minimum) and 2rem of
53
+ * end padding to match.
54
+ */
55
+ export declare const FIELD_LEADING_PAD = "ps-9";
56
+ export declare const FIELD_TRAILING_PAD: Record<InputSize, string>;
57
+ export declare const FIELD_CLEAR_SIZE: Record<InputSize, string>;
58
+ /**
59
+ * Two trailing actions (operator report, 2026-09-25; recorded under Deviations in the README): a
60
+ * `UnitInput`/`CurrencyInput` with `clearable` and a drag handle both on showed `$1,234,567.89 ×
61
+ * ↕` — each action a full 2rem square around a 1.125rem icon, `gap-1` between them, so the two
62
+ * icons ended up roughly 1.1rem apart, far wider than any other icon pair in the library (the
63
+ * private library's own handle sits `px-0` beside the clear button, no gap at all).
64
+ *
65
+ * A single action keeps `FIELD_TRAILING_PAD`/`FIELD_CLEAR_SIZE` unchanged (`Input`'s and
66
+ * `SearchBar`'s only ever have one, and their rendered classes must not change). With two, the row
67
+ * itself carries no gap (`FIELD_SUFFIX_ROW` below), each action shrinks to `w-6` (1.5rem — still
68
+ * the WCAG 2.5.8 24px minimum) at the row's own height, and the control's end padding grows to fit
69
+ * both of them plus the row's own 0.25rem inset from the edge.
70
+ */
71
+ export declare const FIELD_TRAILING_PAD_PAIR: Record<InputSize, string>;
72
+ export declare const FIELD_ACTION_PAIR_SIZE: Record<InputSize, string>;
73
+ /**
74
+ * States (spec "Input" → States). Disabled and read-only replace the live colours outright rather
75
+ * than layering over them, so a `:hover` rule can never win back a live boundary on a dead field.
76
+ * The error row's second 1px line is drawn by the root's `eldra-field-invalid` pseudo-element,
77
+ * because the ring already owns this element's `outline` and `box-shadow`.
78
+ */
79
+ export declare const FIELD_LIVE = "border-border-strong hover:border-text focus:border-text";
80
+ export declare const FIELD_INVALID = "border-danger hover:border-danger focus:border-danger";
81
+ export declare const FIELD_DISABLED = "bg-surface-strong border-border border-dashed text-muted cursor-not-allowed";
82
+ export declare const FIELD_READONLY = "bg-surface border-border text-text";
83
+ /** Spec "Input" → Variants, `search`: "The browser's own clear button is hidden." */
84
+ export declare const FIELD_SEARCH_APPEARANCE: string;
85
+ /**
86
+ * A ghost icon button at the field's end edge (spec "Input" → Anatomy): square, `muted`, the ring.
87
+ * `cursor-pointer` (operator report, 2026-09-25; recorded under Deviations in the README): Tailwind
88
+ * v4's preflight sets `button { cursor: default }`, so without it every clear button in the
89
+ * package — `Input`'s, `SearchBar`'s and `UnitInput`'s (`CurrencyInput` wraps the last) — showed
90
+ * the default arrow rather than a pointer.
91
+ */
92
+ export declare const FIELD_CLEAR_BUTTON: string;
93
+ /** 1.125rem, `muted`, 0.6875rem from the start edge, and out of the pointer's way. */
94
+ export declare const FIELD_LEADING_ICON: string;
95
+ /**
96
+ * The end-edge area, 0.25rem from the edge (spec "Input" → Anatomy, "Trailing action"). The clear
97
+ * button and the `suffix` slot share it, so a field that has both keeps them on one row in reading
98
+ * order — which is also the tab order the Keyboard table asks for: the input first, the clear
99
+ * button next.
100
+ *
101
+ * `gap-1` is the shared default: `Input`'s own doc comment documents `clearable`/`type="search"`
102
+ * plus a populated `suffix` slot as first-class ("the clear button and the `suffix` slot share it,
103
+ * so a field with both keeps them on one row"), and this constant is `Input`'s and `SearchBar`'s
104
+ * row too — dropping the gap here would silently change `Input`'s rendered output for that
105
+ * combination, which an early review caught. Only `UnitInput`'s two-action pair (see
106
+ * `FIELD_TRAILING_PAD_PAIR` above) wants flush icons, and it overrides this locally
107
+ * (`cx(FIELD_SUFFIX_ROW, isActionPair && 'gap-0')` — `gap-*` is a stock tailwind-merge group, so no
108
+ * merge-group registration is needed) rather than changing the shared default.
109
+ */
110
+ export declare const FIELD_SUFFIX_ROW = "absolute end-1 inset-y-0 my-auto flex items-center gap-1";
@@ -0,0 +1,55 @@
1
+ import { IconComponent } from '../icon/types.js';
2
+ /** The native input types the design spec's Input supports. */
3
+ export type InputType = 'text' | 'email' | 'tel' | 'number' | 'search' | 'url' | 'password';
4
+ /** The spec's three compact-control heights: 2rem, 2.5rem and 3rem. */
5
+ export type InputSize = 'sm' | 'md' | 'lg';
6
+ /** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
7
+ export type InputPart = 'root' | 'leadingIcon' | 'control' | 'clearButton' | 'suffix';
8
+ export interface InputProps {
9
+ /**
10
+ * The value (two-way). With `mask` set this is the **raw** value — the digits and letters the
11
+ * customer typed, without the separators — and the field shows the formatted one.
12
+ */
13
+ modelValue?: string;
14
+ /** Native type. Defaults to `text`. */
15
+ type?: InputType;
16
+ /** One of the spec's three sizes. Defaults to `md`. */
17
+ size?: InputSize;
18
+ /** The control's id. Comes from the `FieldWrapper` when there is one; this wins over it. */
19
+ id?: string;
20
+ /** The form field name. */
21
+ name?: string;
22
+ /** An example only, never the label. Format hints belong in the field's help text. */
23
+ placeholder?: string;
24
+ /** Always set it for personal data: `name`, `email`, `address-line1`, `postal-code`… */
25
+ autocomplete?: string;
26
+ /** For example `numeric`. A `number` field defaults to `numeric`. */
27
+ inputmode?: string;
28
+ /** For `type="number"`. */
29
+ min?: number;
30
+ /** For `type="number"`. */
31
+ max?: number;
32
+ /** For `type="number"`. */
33
+ step?: number;
34
+ /** A decorative icon at the start of the field (`search`, `mail`, `discount`). */
35
+ leadingIcon?: IconComponent;
36
+ /** Shows the clear button while there is a value. Defaults to `true` for `type="search"`. */
37
+ clearable?: boolean;
38
+ /** Sets `aria-invalid="true"` and the error boundary. Comes from the `FieldWrapper` otherwise. */
39
+ invalid?: boolean;
40
+ /** `aria-describedby` ids, error id first. Comes from the `FieldWrapper` otherwise. */
41
+ describedBy?: string;
42
+ /** Native `required`. Comes from the `FieldWrapper` otherwise. */
43
+ required?: boolean;
44
+ /** Native `readonly`. The value stays focusable and selectable. */
45
+ readonly?: boolean;
46
+ /** Native `disabled`. */
47
+ disabled?: boolean;
48
+ /**
49
+ * A format mask, e.g. `(###) ###-####` or `A#A #A#`: `#` a digit, `A` a letter, `*` either,
50
+ * everything else a separator. The field displays the formatted value; `modelValue` stays raw.
51
+ */
52
+ mask?: string;
53
+ /** Per-part class overrides, merged with `tailwind-merge`. */
54
+ classes?: Partial<Record<InputPart, string>>;
55
+ }
@@ -0,0 +1,7 @@
1
+ type __VLS_Props = {
2
+ /** The formatted text to show. A change to it plays the fade; the first render never does. */
3
+ text: string;
4
+ };
5
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import { LightboxProps } from './types.js';
2
+ declare const __VLS_export: import('vue').DefineComponent<LightboxProps, {
3
+ close: (returnValue?: string) => void;
4
+ isTop: import('vue').ComputedRef<boolean>;
5
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
6
+ "update:modelValue": (value: boolean) => any;
7
+ "update:index": (value: number) => any;
8
+ }, string, import('vue').PublicProps, Readonly<LightboxProps> & Readonly<{
9
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
10
+ "onUpdate:index"?: ((value: number) => any) | undefined;
11
+ }>, {
12
+ classes: Partial<Record<import('./types.js').LightboxPart, string>>;
13
+ modelValue: boolean;
14
+ index: number;
15
+ messages: Partial<import('../../index.js').UiMessages>;
16
+ thumbnails: boolean;
17
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -0,0 +1,47 @@
1
+ import { UiMessages } from '../../composables/useMessages.js';
2
+ /** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them
3
+ * (spec "Lightbox" → Anatomy) plus the API contract's own `thumbnails`/`thumbnail` pair, which the
4
+ * spec describes ("With thumbnails" variant) but does not number. */
5
+ export type LightboxPart = 'root' | 'panel' | 'close' | 'track' | 'slide' | 'image' | 'caption' | 'prev' | 'next' | 'counter' | 'thumbnails' | 'thumbnail';
6
+ /**
7
+ * One image in the gallery (spec "Lightbox" → Properties, `images` row). `width`/`height` are the
8
+ * asset's real intrinsic pixel size — passed straight through to `Image` as `ratio="auto"`'s own
9
+ * `media.width`/`.height`, so the viewer reserves each photo's own aspect ratio rather than a fixed
10
+ * grid preset (spec "Sizes": "Image: fits the stage height and width, keeps its aspect ratio").
11
+ */
12
+ export interface LightboxImage {
13
+ /** The full-resolution asset URL — never a thumbnail crop (spec "Do": "load full-resolution
14
+ * images only when the viewer opens"). */
15
+ src: string;
16
+ /** Required: describes what matters about the photo (spec "Properties": "`alt` is required and
17
+ * describes the image"). */
18
+ alt: string;
19
+ /** Shown as the slide's own `<figcaption>`, centred below the image. Omit for no caption. */
20
+ caption?: string;
21
+ /** Intrinsic width in pixels. */
22
+ width: number;
23
+ /** Intrinsic height in pixels. */
24
+ height: number;
25
+ }
26
+ export interface LightboxProps {
27
+ /** Shows the viewer with `showModal()` when `true`, closes it when `false` (two-way). */
28
+ modelValue?: boolean;
29
+ /** The image shown when the viewer opens — set it to the thumbnail/photo that was activated
30
+ * (spec "Properties": "set it to the thumbnail that was activated before opening"). Two-way:
31
+ * updates as the shopper moves between images. Default `0`. */
32
+ index?: number;
33
+ /** The images, in gallery order. At least one is expected; a single image hides the arrows and
34
+ * counter (spec "Variants" → "Single image"). */
35
+ images: LightboxImage[];
36
+ /** The viewer's accessible name (spec "Properties", `label` row — package convention: an
37
+ * accessible-name-only prop is `ariaLabel`, never the bare noun). E.g. "Merino crew sweater,
38
+ * images". */
39
+ ariaLabel: string;
40
+ /** Shows the thumbnail strip under the caption (spec "Variants" → "With thumbnails"). Default
41
+ * `false`. Ignored for a single image, which has nothing to pick between. */
42
+ thumbnails?: boolean;
43
+ /** Message overrides. See `useMessages`. */
44
+ messages?: Partial<UiMessages>;
45
+ /** Per-part class overrides, merged with `tailwind-merge`. */
46
+ classes?: Partial<Record<LightboxPart, string>>;
47
+ }
@@ -0,0 +1,23 @@
1
+ import { LinkProps, LinkTone } from './types.js';
2
+ declare var __VLS_8: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_8) => any;
5
+ };
6
+ declare const __VLS_base: import('vue').DefineComponent<LinkProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<LinkProps> & Readonly<{}>, {
7
+ classes: Partial<Record<import('./types.js').LinkPart, string>>;
8
+ href: string;
9
+ tone: LinkTone;
10
+ variant: import('./types.js').LinkVariant;
11
+ as: string | import('vue').Component;
12
+ arrow: boolean;
13
+ external: boolean;
14
+ underline: boolean;
15
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
16
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
19
+ type __VLS_WithSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -0,0 +1,40 @@
1
+ import { Component } from 'vue';
2
+ /** The spec's two variants: inline in a sentence, or a standalone "Shop all knitwear →" action. */
3
+ export type LinkVariant = 'inline' | 'standalone';
4
+ /** Default is `text`; `muted` is for footer and meta-line links ("Size guide", "Privacy"). */
5
+ export type LinkTone = 'default' | 'muted';
6
+ /** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
7
+ export type LinkPart = 'root' | 'label' | 'arrow' | 'externalIcon';
8
+ export interface LinkProps {
9
+ /**
10
+ * Destination. With no destination the spec says to "render plain text instead of a link": the
11
+ * component renders a `<span data-part="root">` with no link semantics at all.
12
+ */
13
+ href?: string;
14
+ /** Inline in a sentence, or standalone with weight 600 and an optional arrow. Defaults to `inline`. */
15
+ variant?: LinkVariant;
16
+ /** Standalone only: adds the trailing `arrow-right` icon. */
17
+ arrow?: boolean;
18
+ /** Adds `target="_blank"`, `rel="noopener noreferrer"`, the external icon and hidden "opens in a new tab" text. */
19
+ external?: boolean;
20
+ /** Tertiary links in footers and meta lines. Defaults to `default`. */
21
+ tone?: LinkTone;
22
+ /**
23
+ * Underline at rest. Defaults to `true` — every variant, including `standalone`, is underlined
24
+ * at rest (Deviation, operator direction 2026-09-26: WCAG 2.2 F73/1.4.1 — see the README's
25
+ * Deviations entry, which overrides the spec's own "no underline at rest" for `standalone`).
26
+ * `false` is the explicit opt-out for a navigation bar (or similar) whose design removes the
27
+ * rest-state underline; hover still shows a 1px underline, thickening to 2px on `:active`, the
28
+ * same as before this default changed.
29
+ */
30
+ underline?: boolean;
31
+ /** Per-part class overrides, merged with `tailwind-merge`. */
32
+ classes?: Partial<Record<LinkPart, string>>;
33
+ /**
34
+ * Render as a different tag or component instead of a native `<a>` — a router link component,
35
+ * for example `resolveComponent('NuxtLink')`. A string is used as the tag directly and still
36
+ * receives `href`; a component receives the destination as its `to` prop instead, matching
37
+ * Vue Router / NuxtLink's own contract. Ignored when there is no `href`.
38
+ */
39
+ as?: string | Component;
40
+ }
@@ -0,0 +1,12 @@
1
+ import { LoadMoreProps } from './types.js';
2
+ declare const __VLS_export: import('vue').DefineComponent<LoadMoreProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
3
+ load: () => any;
4
+ }, string, import('vue').PublicProps, Readonly<LoadMoreProps> & Readonly<{
5
+ onLoad?: (() => any) | undefined;
6
+ }>, {
7
+ classes: Partial<Record<import('./types.js').LoadMorePart, string>>;
8
+ noun: string;
9
+ pending: boolean;
10
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The parts a consumer can restyle through `classes`, named as the spec's anatomy names them
3
+ * (spec "Pagination" → Anatomy, "load more" rows 7 and 9). The decorative meter (row 8) has no
4
+ * part of its own — it is `aria-hidden`, purely visual, and never independently restyled, the
5
+ * same shape `Rating`'s half-star clip or `Skeleton`'s shimmer are drawn without one.
6
+ */
7
+ export type LoadMorePart = 'root' | 'status' | 'button';
8
+ export interface LoadMoreProps {
9
+ /** Items currently shown. */
10
+ shown: number;
11
+ /** Total items. The button hides once `shown` reaches `total`. */
12
+ total: number;
13
+ /** The word used in the status sentence ("Showing 24 of 96 **products**"). Defaults to
14
+ * `"products"` — a literal prop default, not a message: a consumer in another locale passes
15
+ * the noun already declined for this sentence, the same way `QuantityStepper`'s `unit` does. */
16
+ noun?: string;
17
+ /** Loading state of the button: busy, spinner, `aria-busy`. Defaults to `false`. */
18
+ pending?: boolean;
19
+ /** Per-part class overrides, merged with `tailwind-merge`. */
20
+ classes?: Partial<Record<LoadMorePart, string>>;
21
+ }
@@ -0,0 +1,10 @@
1
+ import { LogoItemProps } from './types.js';
2
+ declare const __VLS_export: import('vue').DefineComponent<LogoItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<LogoItemProps> & Readonly<{}>, {
3
+ classes: Partial<Record<import('./types.js').LogoItemPart, string>>;
4
+ href: string | null;
5
+ as: string | import('vue').Component;
6
+ logo: import('../../index.js').ImageMedia | null;
7
+ linkContext: string | null;
8
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,37 @@
1
+ import { Component } from 'vue';
2
+ import { ImageMedia } from '../image/types.js';
3
+ /** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them.
4
+ *
5
+ * There is no separate part for the structural `<li>` a linked item wraps its `<a>`/`as` cell in
6
+ * (see `LogoItem.vue`'s own comment) — `root` always names the single visually significant cell,
7
+ * whichever tag actually renders it.
8
+ */
9
+ export type LogoItemPart = 'root' | 'image' | 'wordmark' | 'srText';
10
+ export interface LogoItemProps {
11
+ /** The company name. Used as the logo image's `alt` (never "logo") and as the wordmark text. */
12
+ name: string;
13
+ /**
14
+ * An SVG or transparent PNG. `null`/omitted (or empty) renders the wordmark fallback instead —
15
+ * a logo cloud never shows an empty cell.
16
+ */
17
+ logo?: ImageMedia | null;
18
+ /** Renders the cell as a link (an `<a>`, or `as` when given). `null`/omitted renders an
19
+ * unlinked, non-focusable cell. */
20
+ href?: string | null;
21
+ /**
22
+ * Visually hidden text appended to the link's accessible name, e.g. "Kiln Street (stockist
23
+ * site)". `null`/omitted falls back to the `stockistSite` message, but only when `href` looks
24
+ * external (an absolute URL) — an on-site stockist page link gets no extra context. Rendered
25
+ * verbatim, so include your own leading space to read naturally after the name.
26
+ */
27
+ linkContext?: string | null;
28
+ /**
29
+ * Render the linked cell as a different tag or component instead of a native `<a>` — a router
30
+ * link component, for example `resolveComponent('NuxtLink')`. Same contract as `Link`'s `as`: a
31
+ * string is used as the tag directly and still receives `href`; a component receives the
32
+ * destination as its `to` prop instead. Ignored when there is no `href`.
33
+ */
34
+ as?: string | Component;
35
+ /** Per-part class overrides, merged with `tailwind-merge`. */
36
+ classes?: Partial<Record<LogoItemPart, string>>;
37
+ }
@@ -0,0 +1,15 @@
1
+ import { PaginationProps } from './types.js';
2
+ declare const __VLS_export: import('vue').DefineComponent<PaginationProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
3
+ "update:page": (page: number) => any;
4
+ }, string, import('vue').PublicProps, Readonly<PaginationProps> & Readonly<{
5
+ "onUpdate:page"?: ((page: number) => any) | undefined;
6
+ }>, {
7
+ classes: Partial<Record<import('./types.js').PaginationPart, string>>;
8
+ linkAs: string | import('vue').Component;
9
+ ariaLabel: string;
10
+ compact: boolean;
11
+ siblings: number;
12
+ hrefForPage: (page: number) => string;
13
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
@@ -0,0 +1,51 @@
1
+ import { Component } from 'vue';
2
+ /**
3
+ * The parts a consumer can restyle through `classes`, named as the spec's anatomy names them
4
+ * (spec "Pagination" → Anatomy, numbered 1–4 plus the shared wrapper parts). `item` is the `<li>`
5
+ * that wraps exactly one of `prev`/`page`/`current`/`ellipsis`/`next` — one wrapper name for every
6
+ * row rather than a `pageItem`/`prevItem`/… pair per row, since the wrapper itself carries no
7
+ * visual role of its own beyond spacing. The compact form's own status text ("Page 2 of 12") has
8
+ * no part of its own: it is generated content with no independent styling hook, the same shape
9
+ * `Tooltip`'s hover bridge or `Skeleton`'s shimmer are drawn without one (see the README's
10
+ * Deviations entry).
11
+ */
12
+ export type PaginationPart = 'root' | 'list' | 'item' | 'page' | 'current' | 'ellipsis' | 'prev' | 'next';
13
+ export interface PaginationProps {
14
+ /** Current page, 1-based. */
15
+ page: number;
16
+ /** Total pages. Nothing renders when it's 1 (or fewer). */
17
+ totalPages: number;
18
+ /** Pages shown on each side of the current one. First and last always show; the rest collapse
19
+ * to "…". Defaults to `1`. */
20
+ siblings?: number;
21
+ /**
22
+ * Builds each link's URL from a page number. Given, every page/previous/next control renders as
23
+ * a real `<a href>` (or the `linkAs` component, receiving the destination as `to` — the same
24
+ * contract `Link`'s own `as` uses). **Without it, the controls render as `<button type="button">`
25
+ * elements that emit `update:page` instead** — a controller decision recorded under the README's
26
+ * Deviations entry, since a consumer driving pagination from in-memory state has no URL to build.
27
+ */
28
+ hrefForPage?: (page: number) => string;
29
+ /** Forces the compact "Page 2 of 12" form regardless of width. By default the numbered form
30
+ * shows from 48rem of the pagination's own width (a `@container` query, not the viewport) and
31
+ * the compact form shows below it — both driven by the same `page`/`totalPages` data. */
32
+ compact?: boolean;
33
+ /**
34
+ * Render the link controls (page/previous/next) as a different tag or component instead of a
35
+ * native `<a>` — a router link component, matching `Link`'s own `as` contract. Named `linkAs`,
36
+ * not `as`: this component's root is spec-fixed (`<nav>`), so `as` — which everywhere else in
37
+ * this package renames the *root* element — would be ambiguous here, the same reason
38
+ * `ContentCard`/`FeatureCard`/`ProductCard` use `linkAs` for their own nested title link instead
39
+ * of `as`. Ignored without `hrefForPage`: without a destination, the controls are `<button>`s,
40
+ * the same rule `Button`/`Link`'s own `as` follows.
41
+ */
42
+ linkAs?: string | Component;
43
+ /**
44
+ * The `<nav>`'s accessible name. Package convention: an accessible-name-only prop is named
45
+ * `ariaLabel`, never `label` — there is no visible text this component could name instead.
46
+ * Defaults to the `pagination` message ("Pagination").
47
+ */
48
+ ariaLabel?: string;
49
+ /** Per-part class overrides, merged with `tailwind-merge`. */
50
+ classes?: Partial<Record<PaginationPart, string>>;
51
+ }
@@ -0,0 +1,31 @@
1
+ import { PopoverProps } from './types.js';
2
+ declare var __VLS_12: {
3
+ close: () => void;
4
+ };
5
+ type __VLS_Slots = {} & {
6
+ default?: (props: typeof __VLS_12) => any;
7
+ };
8
+ declare const __VLS_base: import('vue').DefineComponent<PopoverProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
9
+ "update:modelValue": (value: boolean) => any;
10
+ open: () => any;
11
+ close: () => any;
12
+ }, string, import('vue').PublicProps, Readonly<PopoverProps> & Readonly<{
13
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
14
+ onOpen?: (() => any) | undefined;
15
+ onClose?: (() => any) | undefined;
16
+ }>, {
17
+ classes: Partial<Record<import('./types.js').PopoverPart, string>>;
18
+ modelValue: boolean;
19
+ ariaLabel: string;
20
+ placement: import('../../index.js').FloatingPlacement;
21
+ teleport: boolean;
22
+ matchWidth: boolean | "exact";
23
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
24
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
25
+ declare const _default: typeof __VLS_export;
26
+ export default _default;
27
+ type __VLS_WithSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };
@@ -0,0 +1,53 @@
1
+ import { FloatingPlacement } from '../../composables/useFloating.js';
2
+ /**
3
+ * The parts a consumer can restyle through `classes`.
4
+ *
5
+ * `root` is a `display: contents` wrapper around the `trigger` slot's own element and the
6
+ * (conditionally teleported) `panel` — it never draws a box of its own, so it exists only as a
7
+ * `data-part`/`classes` hook and a mount point, never as a layout parent a consumer needs to work
8
+ * around. `trigger` draws nothing here at all: the trigger is the consumer's own element, rendered
9
+ * through the `trigger` slot, and `classes.trigger` reaches it only because the `attrs` slot prop
10
+ * carries a `class` built from it (see `Popover.vue`'s own doc comment) for the consumer to spread.
11
+ */
12
+ export type PopoverPart = 'root' | 'trigger' | 'panel';
13
+ export interface PopoverProps {
14
+ /** Whether the panel is open (two-way). Self-managing when not bound, like every stateful
15
+ * component in this package. */
16
+ modelValue?: boolean;
17
+ /**
18
+ * Where the panel opens, in `useFloating`'s own vocabulary: `auto` (default) below, flipping
19
+ * above when there is no room; `above` always above; or an explicit `@floating-ui/dom` placement
20
+ * for a menu that should hang off a corner (`bottom-end`, for a trigger near the inline-end edge).
21
+ * Read once, like every `useFloating` placement — a popover that has to change it at runtime
22
+ * re-keys the component instead.
23
+ */
24
+ placement?: FloatingPlacement;
25
+ /**
26
+ * Tie the panel's width to the trigger's: `true` for a floor (a filter panel that should never
27
+ * be narrower than its control), `'exact'` for a floor *and* a ceiling (a menu that should match
28
+ * the trigger exactly, the way a native `<select>`'s popup does). Unset by default — most menus
29
+ * and filter panels are their own width, sized to their content.
30
+ */
31
+ matchWidth?: boolean | 'exact';
32
+ /**
33
+ * The panel's accessible name (`aria-label`), for a panel with no visible heading of its own.
34
+ * Popover renders no default `role` on the panel — it is a plain region, and a consumer wires
35
+ * whatever semantics its content actually has (`role="menu"` on the panel itself via a plain
36
+ * attribute, `role="menu"`/`"listbox"` on an inner element, or nothing at all for a filter form
37
+ * that is already self-describing) — see `Popover.vue`'s own doc comment for why.
38
+ */
39
+ ariaLabel?: string;
40
+ /**
41
+ * Where the panel is rendered: `true` (default) teleports it to `document.body` — or to the open
42
+ * native `<dialog>` the trigger sits in, which renders in the browser's top layer and would
43
+ * otherwise cover it. `false` keeps the panel inside `root`, positioned `absolute`ly, which is
44
+ * only right when nothing above it clips or stacks over it. Read once, like `placement`.
45
+ *
46
+ * A plain `boolean` rather than `Select`'s `boolean | string` — a custom CSS-selector target is
47
+ * not part of this addition's contract; `usePopover`'s own option still takes one, so a future
48
+ * consumer that needs it is a one-line, non-breaking widening of this type.
49
+ */
50
+ teleport?: boolean;
51
+ /** Per-part class overrides, merged with `tailwind-merge`. */
52
+ classes?: Partial<Record<PopoverPart, string>>;
53
+ }
@@ -0,0 +1,25 @@
1
+ import { PriceProps, PriceSize } from './types.js';
2
+ declare const __VLS_export: import('vue').DefineComponent<PriceProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<PriceProps> & Readonly<{}>, {
3
+ size: PriceSize;
4
+ classes: Partial<Record<import('./types.js').PricePart, string>>;
5
+ loading: boolean;
6
+ from: boolean;
7
+ locale: string;
8
+ currency: string;
9
+ narrowSymbol: boolean;
10
+ compareAt: number | null;
11
+ unitPrice: {
12
+ amount: number;
13
+ per: string;
14
+ } | null;
15
+ labels: Partial<{
16
+ sale: string;
17
+ regular: string;
18
+ from: string;
19
+ }>;
20
+ lang: string | null;
21
+ revalidating: boolean;
22
+ announce: boolean;
23
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
24
+ declare const _default: typeof __VLS_export;
25
+ export default _default;