@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
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The components `src/index.ts` exports from its root entry, unprefixed, exactly as `Object.keys`
3
+ * would read them at runtime. Hand-maintained rather than generated: a generator would need its
4
+ * own build step ahead of `vite build` (see `packages/ui/package.json`'s `build` script) for a
5
+ * list of names that changes at most once per component, ever — `src/__tests__/componentNames.spec.ts`
6
+ * guards this list against drift by importing `src/index.ts` and comparing its component keys
7
+ * against this array, so an added or renamed component fails a test here rather than silently
8
+ * missing the resolver.
9
+ *
10
+ * `src/resolver.ts` is the reader: `EldraUiResolver` resolves `<prefix><Name>` for every name here.
11
+ *
12
+ * The `./vee-validate` entry's `Form` and `Field*` components are deliberately **not** here, and
13
+ * `FieldWrapper` — which is a root-entry layout component, not one of them — is the only name
14
+ * beginning with "Field" that belongs in this list. Resolving `<EldraFieldInput>` would auto-import
15
+ * it from `@eldrajs/ui`, where it does not exist, and would pull an optional peer into a project
16
+ * that never installed it. `src/__tests__/veeValidateIsolation.spec.ts` asserts both halves.
17
+ */
18
+ export declare const componentNames: readonly ["Accordion", "AccordionItem", "Avatar", "AvatarGroup", "Badge", "Breadcrumb", "Button", "ButtonGroup", "Carousel", "Checkbox", "CheckboxGroup", "Chip", "ChipGroup", "Container", "ContentCard", "CurrencyInput", "Dialog", "Drawer", "EditorPlaceholder", "EmptyState", "FeatureCard", "FieldWrapper", "FilterPanel", "FormLayout", "Icon", "Image", "Input", "Lightbox", "Link", "LoadMore", "LogoItem", "MultiSelect", "Pagination", "Popover", "Price", "ProductCard", "QuantityStepper", "RadioGroup", "RangeSlider", "Rating", "SearchBar", "SearchModal", "Section", "Select", "Skeleton", "StockBadge", "Switch", "Tab", "TabPanel", "Tabs", "Textarea", "Toast", "Toaster", "Tooltip", "UnitInput", "VariantPicker", "VisuallyHidden"];
19
+ export type ComponentName = (typeof componentNames)[number];
@@ -0,0 +1,18 @@
1
+ import { AccordionProps } from './types.js';
2
+ declare var __VLS_1: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_1) => any;
5
+ };
6
+ declare const __VLS_base: import('vue').DefineComponent<AccordionProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AccordionProps> & Readonly<{}>, {
7
+ name: string;
8
+ multiple: boolean;
9
+ classes: Partial<Record<import('./types.js').AccordionPart, string>>;
10
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -0,0 +1,26 @@
1
+ import { AccordionItemProps } from './types.js';
2
+ declare var __VLS_13: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_13) => any;
5
+ };
6
+ declare const __VLS_base: import('vue').DefineComponent<AccordionItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
+ "update:modelValue": (open: boolean) => any;
8
+ toggle: (open: boolean) => any;
9
+ }, string, import('vue').PublicProps, Readonly<AccordionItemProps> & Readonly<{
10
+ "onUpdate:modelValue"?: ((open: boolean) => any) | undefined;
11
+ onToggle?: ((open: boolean) => any) | undefined;
12
+ }>, {
13
+ help: string;
14
+ classes: Partial<Record<import('./types.js').AccordionItemPart, string>>;
15
+ modelValue: boolean;
16
+ headingLevel: import('./types.js').AccordionItemHeadingLevel;
17
+ href: string;
18
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
19
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,20 @@
1
+ import { ComputedRef, InjectionKey } from 'vue';
2
+ /**
3
+ * What an `Accordion` tells the `AccordionItem`s inside it.
4
+ *
5
+ * An `Accordion` does not render its children — a consumer places `<AccordionItem>`s in its
6
+ * default slot, the same shape as `ButtonGroup`/`ChipGroup` — so the shared `name` a single-open
7
+ * group's `<details>` elements all need (spec "Accordion" → Properties, `name` row: "the shared
8
+ * `name` used when `multiple` is false") has to reach every item some other way. Every
9
+ * `AccordionItem` injects this optionally (`inject(ACCORDION_KEY, null)`); a standalone item with
10
+ * no `Accordion` above it gets no shared name at all, which is correct — exclusivity is a group
11
+ * behaviour, not something a lone `<details>` needs.
12
+ */
13
+ export interface AccordionContext {
14
+ /** `false`: every item in the group shares `name`, so opening one closes its native siblings. */
15
+ multiple: boolean;
16
+ /** The shared `name`, meaningful only while `multiple` is `false`. */
17
+ name: string | undefined;
18
+ }
19
+ /** The key an `Accordion` provides its `AccordionContext` on. */
20
+ export declare const ACCORDION_KEY: InjectionKey<ComputedRef<AccordionContext>>;
@@ -0,0 +1,3 @@
1
+ export declare function supportsExclusiveDetailsGroups(): boolean;
2
+ /** Test-only: clears the cached probe result so a spec can exercise both branches deliberately. */
3
+ export declare function resetExclusiveDetailsProbeForTests(): void;
@@ -0,0 +1,59 @@
1
+ /**
2
+ * The Web Animations API height animation `AccordionItem.vue` plays on its panel element (spec
3
+ * "Accordion" → Behaviour & motion, operator override 2026-09-26: "the accordion should have some
4
+ * expand transition" — see the README's Deviations entry for the full decision and why a CSS-only
5
+ * height animation was rejected here the same way it was for the original fade). Isolated in its
6
+ * own file for the same reason `detailsExclusivity.ts` is: a runtime DOM capability that needs
7
+ * feature detection and reads better tested on its own than inlined into the component.
8
+ *
9
+ * Duration and easing are read from the animated element's own computed style at animation time —
10
+ * `--eldra-duration-base` and `--eldra-ease-out`/`--eldra-ease-in`, the exact tokens
11
+ * `eldra-accordion-chevron`/`eldra-accordion-panel` already key their own CSS transitions off —
12
+ * rather than a literal duration/easing baked into this file. A consumer overriding those tokens,
13
+ * or `tokens.css` zeroing `--eldra-duration-base` under `prefers-reduced-motion`, changes this
14
+ * animation too with no extra prop. There is deliberately no literal fallback for either: when a
15
+ * variable does not resolve to a usable value at all (no stylesheet loaded — a unit test mounting
16
+ * the component with no CSS pipeline, most likely, since a real consumer of this package always
17
+ * ships `tokens.css`), the animation is skipped outright rather than guessing a number that could
18
+ * silently disagree with whatever the page's real tokens turn out to say.
19
+ */
20
+ export interface PanelHeightAnimator {
21
+ /** Animates the panel open: `0 → scrollHeight`, `--eldra-ease-out`. Reverses a close still in
22
+ * flight instead, if there is one (see the factory's own comment). Resolves once settled — or
23
+ * immediately, in effect synchronously, whenever no real animation could run at all. */
24
+ open(): Promise<void>;
25
+ /** Animates the panel closed: `scrollHeight → 0`, `--eldra-ease-in`. Reverses an open still in
26
+ * flight instead, if there is one. Resolves once settled, same contract as `open()`. */
27
+ close(): Promise<void>;
28
+ }
29
+ /**
30
+ * Creates a stateful height-animation controller for one `AccordionItem`'s panel — one instance
31
+ * per item, reused for that panel's whole lifetime (see `AccordionItem.vue`'s own lazily-created,
32
+ * memoized instance). Stateful rather than a bare per-call function because a request can arrive
33
+ * for the *opposite* direction while the previous request's animation is still running — a click
34
+ * during the opening animation, or a second click while closing (`AccordionItem.vue`'s own
35
+ * `onSummaryClick` covers exactly when each happens).
36
+ *
37
+ * Fixes an early review finding (2026-09-26): "one animation owner per item." The original shape (a bare
38
+ * `animatePanelHeight(panel, from, to, ...)` call per direction, each independently capturing and
39
+ * restoring `panel.style.overflow` around its own `Element.animate()` call) let two overlapping
40
+ * calls race: a click during the opening animation started a *second*, independent call before the
41
+ * first's `overflow` cleanup had run. Whichever cleanup ran *last* reset `overflow` to whatever
42
+ * *that* call had captured as "before" — which, because the two calls overlapped, was the *other*
43
+ * call's already-`'hidden'` value, not the panel's real original style — leaving `overflow: hidden`
44
+ * permanently stuck (reproduced with a plain double-click against the built Storybook `Multiple`
45
+ * story). This version keeps exactly one `Animation` handle and one saved "original" `overflow`
46
+ * value alive across however many direction-reversals happen before something actually settles:
47
+ *
48
+ * - A fresh request (nothing currently animating) captures the panel's real pre-animation
49
+ * `overflow` once, and animates from the natural starting point for that direction (`0` opening,
50
+ * the panel's own `scrollHeight` closing).
51
+ * - A request that arrives while an animation is already running **reverses** it: reads the
52
+ * panel's *currently rendered* height (`getBoundingClientRect()`, not either call's own start
53
+ * value) before cancelling the running `Animation`, then starts a new one from that live height
54
+ * to the new target — the box changes direction from wherever it visually was, never jumping.
55
+ * The `overflow` captured by the *first* request in the sequence is carried forward untouched
56
+ * through as many reversals as happen; only the animation that finally settles without itself
57
+ * being superseded restores it.
58
+ */
59
+ export declare function createPanelHeightAnimator(panel: HTMLElement): PanelHeightAnimator;
@@ -0,0 +1,40 @@
1
+ /** The one part a consumer can restyle through `Accordion`'s `classes`. */
2
+ export type AccordionPart = 'root';
3
+ export interface AccordionProps {
4
+ /**
5
+ * `true` (default): any number of items open at once, each an independent `<details>`. `false`:
6
+ * single-open — every `AccordionItem` inside shares the same native `name`, so the browser
7
+ * closes the previously open sibling itself.
8
+ */
9
+ multiple?: boolean;
10
+ /** The shared `name` used while `multiple` is `false`. Generated when not given. */
11
+ name?: string;
12
+ /** Per-part class overrides, merged with `tailwind-merge`. */
13
+ classes?: Partial<Record<AccordionPart, string>>;
14
+ }
15
+ /** The heading levels `AccordionItem`'s `title` can wrap in, when the page outline needs one
16
+ * (spec "Accordion" → Properties, `headingLevel` row). Undefined by default: plain text. */
17
+ export type AccordionItemHeadingLevel = 2 | 3 | 4;
18
+ /**
19
+ * The parts a consumer can restyle through `classes`, named after the spec's own anatomy. A link
20
+ * row (`href` set) renders none of `summary`, `chevron` or `panel`: a plain `<a>` has no
21
+ * disclosure trigger distinct from its own root and no panel.
22
+ */
23
+ export type AccordionItemPart = 'root' | 'summary' | 'title' | 'help' | 'chevron' | 'panel';
24
+ export interface AccordionItemProps {
25
+ /** The row's label. Also part of the accessible name. */
26
+ title: string;
27
+ /** An optional second line under the label. Also part of the accessible name. */
28
+ help?: string;
29
+ /** Open state (two-way, `update:modelValue`), mirroring the native `<details>` `open` attribute.
30
+ * Ignored, along with the default slot, on a link row. */
31
+ modelValue?: boolean;
32
+ /** Wraps `title` in a heading of this level. Plain text (no default) unless the page outline
33
+ * needs one. */
34
+ headingLevel?: AccordionItemHeadingLevel;
35
+ /** Renders a plain `<a>` styled as a trigger instead of `<details>`/`<summary>` plus panel — a
36
+ * menu entry with no children (spec "Accordion" → Variants, "Link row"). No panel, no chevron. */
37
+ href?: string;
38
+ /** Per-part class overrides, merged with `tailwind-merge`. */
39
+ classes?: Partial<Record<AccordionItemPart, string>>;
40
+ }
@@ -0,0 +1,10 @@
1
+ import { AvatarProps, AvatarSize } from './types.js';
2
+ declare const __VLS_export: import('vue').DefineComponent<AvatarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AvatarProps> & Readonly<{}>, {
3
+ size: AvatarSize;
4
+ name: string | null;
5
+ classes: Partial<Record<import('./types.js').AvatarPart, string>>;
6
+ src: import('../../index.js').ImageMedia | string | null;
7
+ decorative: boolean;
8
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { AvatarGroupProps } from './types.js';
2
+ declare const __VLS_export: import('vue').DefineComponent<AvatarGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AvatarGroupProps> & Readonly<{}>, {
3
+ classes: Partial<Record<import('./types.js').AvatarGroupPart, string>>;
4
+ max: number;
5
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,61 @@
1
+ import { ImageMedia } from '../image/types.js';
2
+ /** The design spec's four sizes (spec "Avatar" → Sizes): 2rem, 2.5rem, 3.5rem, 6rem diameter. */
3
+ export type AvatarSize = 'sm' | 'md' | 'lg' | 'xl';
4
+ /** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
5
+ export type AvatarPart = 'root' | 'image' | 'initials' | 'icon';
6
+ export interface AvatarProps {
7
+ /**
8
+ * The person's photo. A bare `string` is treated as the asset URL directly (the same shorthand
9
+ * `ImageMedia['src']` would be); either way, falls back to initials, then to the user icon, on
10
+ * a missing/empty value or a failed image load (spec "Avatar" → Properties, `src` row).
11
+ */
12
+ src?: ImageMedia | string | null;
13
+ /**
14
+ * The person's name. Feeds the initials fallback (first letter of the given and family name,
15
+ * uppercase — see `src/utils/avatar.ts#initialsFromName`) and, when `decorative` is `false`,
16
+ * the accessible name itself.
17
+ */
18
+ name?: string | null;
19
+ /** Diameter. Defaults to `md` (2.5rem). See `AvatarSize`. */
20
+ size?: AvatarSize;
21
+ /**
22
+ * `true` (the default) when the name is printed next to the avatar — a review byline, a
23
+ * journal post's author card — so the avatar itself is hidden from assistive technology
24
+ * (`aria-hidden="true"`) rather than announced a second time. `false` for a standalone avatar
25
+ * with nothing else naming the person: it gets `role="img"` and `aria-label` set to `name`
26
+ * instead (spec "Avatar" → Properties, `decorative` row; → Accessibility, 1.1.1/4.1.2).
27
+ */
28
+ decorative?: boolean;
29
+ /** Per-part class overrides, merged with `tailwind-merge`. */
30
+ classes?: Partial<Record<AvatarPart, string>>;
31
+ }
32
+ /** One person in an `AvatarGroup` (spec "Avatar" → Properties, Avatar group `people` row). */
33
+ export interface AvatarGroupPerson {
34
+ /** See `AvatarProps.src`. */
35
+ src?: ImageMedia | string | null;
36
+ /** Required here (unlike `AvatarProps.name`): every group member's accessible sentence names
37
+ * them, so there is no standalone-vs-decorative choice to make per person. */
38
+ name: string;
39
+ }
40
+ /** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them,
41
+ * plus `srText` — the visually hidden element that carries the group's one accessible sentence
42
+ * (spec "Avatar" → Accessibility: "A group gets one name … the individual avatars and '+4' are
43
+ * hidden"). */
44
+ export type AvatarGroupPart = 'root' | 'item' | 'more' | 'srText';
45
+ export interface AvatarGroupProps {
46
+ /** The people to show, in the order they stack. */
47
+ people: AvatarGroupPerson[];
48
+ /**
49
+ * Avatars shown before the "+N" counter. Defaults to `3`. Clamped to `0`–`3` regardless of what
50
+ * is passed — the spec's own anatomy caps a group at "up to three avatars plus a '+N' counter
51
+ * avatar" and its acceptance criteria say a group "never" shows more than four circles in
52
+ * total, so this is enforced rather than merely documented (see `AvatarGroup.vue`'s own
53
+ * comment).
54
+ */
55
+ max?: number;
56
+ /** The group's own label, e.g. `"Makers"` — prefixes the accessible sentence: `"Makers: Ingrid,
57
+ * Tomas, Maya and 4 more"` (spec "Avatar" → Properties, Avatar group `label` row). */
58
+ label: string;
59
+ /** Per-part class overrides, merged with `tailwind-merge`. */
60
+ classes?: Partial<Record<AvatarGroupPart, string>>;
61
+ }
@@ -0,0 +1,24 @@
1
+ import { BadgeProps, BadgeTone } from './types.js';
2
+ declare var __VLS_13: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_13) => any;
5
+ };
6
+ declare const __VLS_base: import('vue').DefineComponent<BadgeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BadgeProps> & Readonly<{}>, {
7
+ label: string;
8
+ classes: Partial<Record<import('./types.js').BadgePart, string>>;
9
+ icon: import('../../index.js').IconComponent | null;
10
+ hiddenSuffix: string | null;
11
+ tone: BadgeTone;
12
+ variant: import('./types.js').BadgeVariant;
13
+ outline: boolean;
14
+ pill: boolean;
15
+ as: string;
16
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
17
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
20
+ type __VLS_WithSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
@@ -0,0 +1,10 @@
1
+ import { StockBadgeProps } from './types.js';
2
+ declare const __VLS_export: import('vue').DefineComponent<StockBadgeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<StockBadgeProps> & Readonly<{}>, {
3
+ classes: Partial<Record<import('./types.js').StockBadgePart, string>>;
4
+ quantity: number | null;
5
+ message: string;
6
+ revalidating: boolean;
7
+ announce: boolean;
8
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,79 @@
1
+ import { IconComponent } from '../icon/types.js';
2
+ /**
3
+ * The design spec's six fill colours (spec "Badge" → Properties). `variant` overrides this:
4
+ * `sale` always renders like `accent`, `new` always like `primary`.
5
+ */
6
+ export type BadgeTone = 'neutral' | 'primary' | 'accent' | 'success' | 'warning' | 'danger';
7
+ /**
8
+ * The two product flags with a fixed tone, plus `none` for an ordinary tag (spec "Badge" →
9
+ * Properties): "`sale` renders like `accent`, `new` like `primary`. Overrides `tone`."
10
+ */
11
+ export type BadgeVariant = 'none' | 'sale' | 'new';
12
+ /** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
13
+ export type BadgePart = 'root' | 'icon' | 'label' | 'hiddenSuffix';
14
+ export interface BadgeProps {
15
+ /** Visible text (content). Sentence case. Also the fallback for the default slot. */
16
+ label?: string;
17
+ /** Fill colour. `success`/`warning`/`danger` require an `icon`: a dev warning when missing. */
18
+ tone?: BadgeTone;
19
+ /** Product flags. `sale` renders like `accent`, `new` like `primary`. Overrides `tone`. */
20
+ variant?: BadgeVariant;
21
+ /**
22
+ * `background` fill with a 1px inset `border-strong` boundary, replacing the tone's own fill.
23
+ * Used for "Sold out" on media and low-emphasis tags.
24
+ */
25
+ outline?: boolean;
26
+ /** Fully rounded ends, wider padding. Category chips in content, filter summaries. */
27
+ pill?: boolean;
28
+ /** A decorative leading icon, hidden from assistive technology. */
29
+ icon?: IconComponent | null;
30
+ /**
31
+ * Visually hidden text appended to the label, e.g. `" off"` after "−20%" — include any leading
32
+ * space the spoken sentence needs; the component renders the value verbatim.
33
+ */
34
+ hiddenSuffix?: string | null;
35
+ /** Render a different root element than the default `<span>`. */
36
+ as?: string;
37
+ /** Per-part class overrides, merged with `tailwind-merge`. */
38
+ classes?: Partial<Record<BadgePart, string>>;
39
+ }
40
+ /**
41
+ * The stock status line's four levels (spec "Badge" → Stock status line → Properties): each picks
42
+ * a fixed colour and icon — `in` success + circle-check, `low` warning + alert-triangle, `out`
43
+ * danger + circle-x, `preorder` muted + clock.
44
+ */
45
+ export type StockLevel = 'in' | 'low' | 'out' | 'preorder';
46
+ /** The parts a consumer can restyle through `classes`. `labelValue` is the inner span holding the
47
+ * words inside `label`: it exists so the refresh dim (on `label`) and the fade a changed stock
48
+ * line plays (on the span) are not one element fighting over `opacity`. It adds no box of its
49
+ * own. */
50
+ export type StockBadgePart = 'root' | 'icon' | 'label' | 'labelValue' | 'spinner' | 'srStatus';
51
+ export interface StockBadgeProps {
52
+ /** Picks the colour, icon and default message. */
53
+ level: StockLevel;
54
+ /** Shown in the default `low` copy ("only 3 left"). Ignored by every other level. */
55
+ quantity?: number | null;
56
+ /** Overrides the level's default message entirely. */
57
+ message?: string;
58
+ /**
59
+ * The stock line is on screen but a fresher one is on its way — a prerendered level being
60
+ * refreshed after load, say. The level stays exactly where it is and keeps its words, dimmed to
61
+ * `--eldra-revalidating-opacity`, with a small spinner beside it (drawn outside the root's own
62
+ * box, so nothing moves) and `aria-busy="true"` on the root; a visually hidden live region says
63
+ * `messages.updatingStock`.
64
+ *
65
+ * Independently of this flag, changed wording (`level`/`message`) fades in over
66
+ * `--eldra-duration-base` rather than simply appearing — enter only, on the element that already
67
+ * holds the new words; instantly, with no animation at all, under
68
+ * `prefers-reduced-motion: reduce`.
69
+ */
70
+ revalidating?: boolean;
71
+ /**
72
+ * Whether this stock line announces its own refresh. `true` by default. Set it to `false` when
73
+ * the page announces the refresh once itself — a refreshing grid would otherwise hold one polite
74
+ * region per card. `aria-busy`, the dim and the spinner are unaffected; only the region goes.
75
+ */
76
+ announce?: boolean;
77
+ /** Per-part class overrides, merged with `tailwind-merge`. */
78
+ classes?: Partial<Record<StockBadgePart, string>>;
79
+ }
@@ -0,0 +1,10 @@
1
+ import { Component } from 'vue';
2
+ import { BreadcrumbProps } from './types.js';
3
+ declare const __VLS_export: import('vue').DefineComponent<BreadcrumbProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BreadcrumbProps> & Readonly<{}>, {
4
+ classes: Partial<Record<import('./types.js').BreadcrumbPart, string>>;
5
+ collapseAfter: number;
6
+ keepLast: number;
7
+ linkAs: string | Component;
8
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,53 @@
1
+ import { Component } from 'vue';
2
+ /**
3
+ * One level of the trail. Spec "Breadcrumb" → Properties, `items` row: "the last item is the
4
+ * current page and has no `href`" — that is a convention for callers, not something this
5
+ * component trusts: whichever entry is last in the array is always rendered as the current page
6
+ * (a `<span aria-current="page">`, never a link), regardless of whether it happens to carry an
7
+ * `href`. See `Breadcrumb.vue`'s own comment on `endItems`.
8
+ */
9
+ export interface BreadcrumbItem {
10
+ /**
11
+ * The visible level name. Spec "Breadcrumb" → Global Constraints / Behaviour & motion: "Product
12
+ * titles are never truncated; the trail wraps" — binding over an earlier draft of this
13
+ * component's contract that would have truncated a long label at a fixed character count. There
14
+ * is deliberately no CSS `truncate`/`line-clamp` anywhere in this component: a long label wraps
15
+ * inside its own `<li>` instead, at every container width including the collapsed one (spec's
16
+ * own acceptance criterion: "At 320px and 200% zoom the trail wraps without horizontal scroll
17
+ * and titles are not truncated").
18
+ */
19
+ label: string;
20
+ /** The level's destination. Omit on the last item — see this interface's own comment. */
21
+ href?: string;
22
+ }
23
+ /** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
24
+ export type BreadcrumbPart = 'root' | 'list' | 'item' | 'link' | 'current' | 'separator' | 'ellipsis';
25
+ export interface BreadcrumbProps {
26
+ /** The trail, root first. The last entry is always rendered as the current page — see
27
+ * `BreadcrumbItem`'s own comment. */
28
+ items: BreadcrumbItem[];
29
+ /** Levels kept visible at the start when collapsed (spec "Breadcrumb" → Properties: "Home").
30
+ * Defaults to `1`. */
31
+ collapseAfter?: number;
32
+ /**
33
+ * Levels kept visible at the end when collapsed (spec "Breadcrumb" → Properties: "the parent
34
+ * and the current page"). Defaults to `2`. Clamped up to a minimum of `1`: the trail's last
35
+ * item is always the current page (see `BreadcrumbItem`'s own comment) and can never be
36
+ * collapsed away, so `0` behaves the same as `1` rather than swallowing the current page into
37
+ * the collapsible middle.
38
+ */
39
+ keepLast?: number;
40
+ /**
41
+ * Render every level link as a different tag or component instead of a native `<a>` — a router
42
+ * link component, for example `resolveComponent('NuxtLink')`. Same contract as `Link`'s and
43
+ * `LogoItem`'s own `as`: a string is used as the tag directly and still receives `href`; a
44
+ * component receives the destination as its `to` prop instead. Applies to every link in the
45
+ * trail alike — there is no per-item override, the same way `LogoItem` takes one `as` for its
46
+ * one link rather than one per logo. Named `linkAs`, not `as`: this component's own root is
47
+ * spec-fixed (`<nav>`), so `as` would be ambiguous with `Badge`/`Container`/`Section`'s `as`,
48
+ * which *does* pick the root tag — see this package's README "as vs linkAs" note.
49
+ */
50
+ linkAs?: string | Component;
51
+ /** Per-part class overrides, merged with `tailwind-merge`. */
52
+ classes?: Partial<Record<BreadcrumbPart, string>>;
53
+ }
@@ -0,0 +1,37 @@
1
+ import { ButtonProps, ButtonSize } from './types.js';
2
+ declare var __VLS_10: {}, __VLS_17: {}, __VLS_19: {};
3
+ type __VLS_Slots = {} & {
4
+ leadingIcon?: (props: typeof __VLS_10) => any;
5
+ } & {
6
+ default?: (props: typeof __VLS_17) => any;
7
+ } & {
8
+ trailingIcon?: (props: typeof __VLS_19) => any;
9
+ };
10
+ declare const __VLS_base: import('vue').DefineComponent<ButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
+ click: (event: MouseEvent) => any;
12
+ }, string, import('vue').PublicProps, Readonly<ButtonProps> & Readonly<{
13
+ onClick?: ((event: MouseEvent) => any) | undefined;
14
+ }>, {
15
+ size: ButtonSize;
16
+ label: string;
17
+ classes: Partial<Record<import('./types.js').ButtonPart, string>>;
18
+ type: "button" | "submit" | "reset";
19
+ href: string;
20
+ icon: import('../../index.js').IconComponent;
21
+ loading: boolean;
22
+ as: string | import('vue').Component;
23
+ iconLeft: import('../../index.js').IconComponent;
24
+ iconRight: import('../../index.js').IconComponent;
25
+ iconOnly: boolean;
26
+ block: boolean;
27
+ pressed: boolean;
28
+ disabled: boolean;
29
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
30
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
31
+ declare const _default: typeof __VLS_export;
32
+ export default _default;
33
+ type __VLS_WithSlots<T, S> = T & {
34
+ new (): {
35
+ $slots: S;
36
+ };
37
+ };
@@ -0,0 +1,17 @@
1
+ import { ButtonGroupProps } from './types.js';
2
+ declare var __VLS_1: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_1) => any;
5
+ };
6
+ declare const __VLS_base: import('vue').DefineComponent<ButtonGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ButtonGroupProps> & Readonly<{}>, {
7
+ classes: Partial<Record<import('./types.js').ButtonGroupPart, string>>;
8
+ attached: boolean;
9
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,68 @@
1
+ import { Component } from 'vue';
2
+ import { IconComponent } from '../icon/types.js';
3
+ /**
4
+ * The six variants of the design spec's Button: visual weight and meaning.
5
+ *
6
+ * `secondary` is the accent fill and is for promotions only; `link` is an
7
+ * action that should read like text ("Size guide", "Clear all"), which is a
8
+ * Button, not a Link.
9
+ */
10
+ export type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'link' | 'danger';
11
+ /** The spec's three button heights: 2rem, 2.5rem and 3rem. */
12
+ export type ButtonSize = 'sm' | 'md' | 'lg';
13
+ /** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
14
+ export type ButtonPart = 'container' | 'leadingIcon' | 'label' | 'trailingIcon' | 'spinner';
15
+ export interface ButtonProps {
16
+ /** Visual weight and meaning. Required: there is no neutral default in the spec. */
17
+ variant: ButtonVariant;
18
+ /** One of the spec's three sizes. Defaults to `md`. */
19
+ size?: ButtonSize;
20
+ /** The native button type. Ignored when `href` is set. */
21
+ type?: 'button' | 'submit' | 'reset';
22
+ /** When set, renders an `<a href>` styled as a button. Use it only for navigation. */
23
+ href?: string;
24
+ /**
25
+ * Render the link form as a different tag or component instead of a native `<a>` — a router
26
+ * link component, for example `resolveComponent('NuxtLink')`, so an in-app destination routes
27
+ * instead of reloading the document. A string is used as the tag directly and still receives
28
+ * `href`; a component receives the destination as its `to` prop instead, matching Vue Router /
29
+ * NuxtLink's own contract. Ignored when there is no `href`: without a destination this is a
30
+ * `<button>`, and the same rule as `Link`'s `as`.
31
+ */
32
+ as?: string | Component;
33
+ /** Leading icon component, for example `IconShoppingBag`. */
34
+ iconLeft?: IconComponent;
35
+ /** Trailing icon component, for example `IconArrowRight` on "Continue to checkout". */
36
+ iconRight?: IconComponent;
37
+ /** A square button with only an icon. `label` is required and becomes the accessible name. */
38
+ iconOnly?: boolean;
39
+ /** The icon for `iconOnly`. */
40
+ icon?: IconComponent;
41
+ /**
42
+ * The accessible name. Required with `iconOnly` ("Add Merino crew sweater to wishlist"), and
43
+ * used as the name while `loading` ("Adding to cart"). With no default slot it is also the
44
+ * visible label.
45
+ */
46
+ label?: string;
47
+ /** Shows the spinner, sets `aria-busy="true"` and keeps the button's width and focus. */
48
+ loading?: boolean;
49
+ /** Full width of its container. */
50
+ block?: boolean;
51
+ /** Toggle buttons only: sets `aria-pressed`. Leave it undefined for ordinary buttons. */
52
+ pressed?: boolean;
53
+ /** Native `disabled`. A disabled link button loses its `href` so it is not focusable either. */
54
+ disabled?: boolean;
55
+ /** Per-part class overrides, merged with `tailwind-merge`. */
56
+ classes?: Partial<Record<ButtonPart, string>>;
57
+ }
58
+ /** The one part of a ButtonGroup a consumer can restyle. */
59
+ export type ButtonGroupPart = 'root';
60
+ export interface ButtonGroupProps {
61
+ /**
62
+ * Renders the group as a segmented control: no gap, square inner corners, neighbours overlapping
63
+ * by 1px and `role="group"`. Give it an `aria-label` ("View"), which falls through to the root.
64
+ */
65
+ attached?: boolean;
66
+ /** Per-part class overrides, merged with `tailwind-merge`. */
67
+ classes?: Partial<Record<ButtonGroupPart, string>>;
68
+ }
@@ -0,0 +1,36 @@
1
+ import { ContentCardProps, ContentCardVariant } from './types.js';
2
+ declare var __VLS_16: {}, __VLS_30: {}, __VLS_32: {}, __VLS_34: {}, __VLS_36: {};
3
+ type __VLS_Slots = {} & {
4
+ eyebrow?: (props: typeof __VLS_16) => any;
5
+ } & {
6
+ title?: (props: typeof __VLS_30) => any;
7
+ } & {
8
+ excerpt?: (props: typeof __VLS_32) => any;
9
+ } & {
10
+ meta?: (props: typeof __VLS_34) => any;
11
+ } & {
12
+ cue?: (props: typeof __VLS_36) => any;
13
+ };
14
+ declare const __VLS_base: import('vue').DefineComponent<ContentCardProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ContentCardProps> & Readonly<{}>, {
15
+ classes: Partial<Record<import('./types.js').ContentCardPart, string>>;
16
+ meta: string | null;
17
+ image: import('../../index.js').ImageMedia | null;
18
+ headingLevel: import('../../index.js').HeadingLevel;
19
+ loading: boolean;
20
+ variant: ContentCardVariant;
21
+ linkAs: string | import('vue').Component;
22
+ date: string | null;
23
+ ratio: import('./types.js').ContentCardRatio;
24
+ eyebrow: string | null;
25
+ excerpt: string | null;
26
+ cue: string | null;
27
+ locale: string;
28
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
29
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
30
+ declare const _default: typeof __VLS_export;
31
+ export default _default;
32
+ type __VLS_WithSlots<T, S> = T & {
33
+ new (): {
34
+ $slots: S;
35
+ };
36
+ };