@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,27 @@
1
+ import { FeatureCardProps, FeatureCardVariant } from './types.js';
2
+ declare var __VLS_18: {}, __VLS_20: {}, __VLS_22: {}, __VLS_24: {};
3
+ type __VLS_Slots = {} & {
4
+ title?: (props: typeof __VLS_18) => any;
5
+ } & {
6
+ title?: (props: typeof __VLS_20) => any;
7
+ } & {
8
+ body?: (props: typeof __VLS_22) => any;
9
+ } & {
10
+ cue?: (props: typeof __VLS_24) => any;
11
+ };
12
+ declare const __VLS_base: import('vue').DefineComponent<FeatureCardProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FeatureCardProps> & Readonly<{}>, {
13
+ classes: Partial<Record<import('./types.js').FeatureCardPart, string>>;
14
+ headingLevel: import('../../index.js').HeadingLevel;
15
+ href: string | null;
16
+ variant: FeatureCardVariant;
17
+ linkAs: string | import('vue').Component;
18
+ cue: string;
19
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
20
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
21
+ declare const _default: typeof __VLS_export;
22
+ export default _default;
23
+ type __VLS_WithSlots<T, S> = T & {
24
+ new (): {
25
+ $slots: S;
26
+ };
27
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The link cue's arrow (spec "Content card"/"Feature card" → States, Hover: "cue arrow moves 2px
3
+ * right (`duration-fast`)"), shared by `ContentCard.vue` and `FeatureCard.vue` — both draw the
4
+ * exact same 1.125rem Tabler `arrow-right`, geometry and hover nudge, so the class string and path
5
+ * data live here once rather than twice. Each component still renders its own `<svg>` (a tiny
6
+ * internal component would cost a render-function indirection for markup this small), reading
7
+ * `CUE_ARROW_CLASS`/`CUE_ARROW_PATHS` instead of redeclaring them.
8
+ */
9
+ export declare const CUE_ARROW_CLASS: string;
10
+ export declare const CUE_ARROW_PATHS: string[];
@@ -0,0 +1,45 @@
1
+ /**
2
+ * The "whole card is one link" pattern shared by every card whose entire surface is a single tab
3
+ * stop: `ContentCard` and `FeatureCard` here, and `ProductCard` (built in the same wave, and
4
+ * consuming these same three constants rather than duplicating the pattern — see
5
+ * `ProductCard.vue`'s own `rootClass`/`linkClass` comments).
6
+ *
7
+ * The card's real focusable element is the title's `<a>` (or its `as` substitute) — a normal,
8
+ * visible piece of text, unlike `Checkbox`'s visually hidden input. Two class lists make the whole
9
+ * card behave like one link:
10
+ *
11
+ * - `STRETCHED_LINK`, on the title `<a>` itself: `after:absolute after:inset-0` extends its hit
12
+ * area to the nearest *positioned* ancestor — the card root, which carries `CARD_FOCUS_PROXY`'s
13
+ * `relative` — covering the whole card for pointer and hit-testing purposes, without the `<a>`
14
+ * itself growing to fill it (it stays inline, sized to its own text, wrapping normally). The
15
+ * `<a>` is deliberately left `static` (no `relative` of its own): an absolutely positioned
16
+ * pseudo-element resolves against the nearest positioned ancestor, and if the anchor itself were
17
+ * `relative` the stretch would cover only the anchor's own text-sized box instead of the card.
18
+ * Positioned elements paint above normal in-flow siblings regardless of DOM order, so the
19
+ * pseudo-element's hit area sits above an image that comes earlier in the markup without needing
20
+ * its own `z-index`.
21
+ * - `CARD_FOCUS_PROXY`, on the card root, only while the card is actually linked: `relative` (the
22
+ * positioning context the pseudo-element above needs), `rounded-lg` (spec acceptance: "the
23
+ * standard focus ring around the whole card with `radius-lg` corners"), `group` (the hover scope
24
+ * below) and `eldra-focus eldra-focus-proxy` — the same shape `Checkbox` gives its drawn box (see
25
+ * that component's own comment): the ring and its transition live in `eldra-focus`;
26
+ * `eldra-focus-proxy` is the modifier that turns it on from `:has(:focus-visible)` rather than
27
+ * the root's own focus, because the root itself is never in the tab order.
28
+ *
29
+ * The title `<a>` needs `outline-none` of its own (`STRETCHED_LINK_OUTLINE`) — not `outline-hidden`
30
+ * (`Rating.vue`'s own linked variant, which *wants* its own forced-colours ring because it is not
31
+ * part of a stretched-card root). Here the ring belongs solely to the card, and
32
+ * `eldra-focus-proxy`'s own forced-colours rule already draws it on the root; if the `<a>` kept a
33
+ * visible forced-colours outline of its own, a keyboard user would see two rings at once — one
34
+ * hugging the title text and one around the card — which the spec's own acceptance criteria rule
35
+ * out ("the link shows no separate ring").
36
+ *
37
+ * Hover reads the same way: the pseudo-element is generated *inside* the `<a>`'s box in the render
38
+ * tree, so hovering anywhere over it counts as hovering the `<a>` and every real ancestor of it,
39
+ * root included — which is why a card drives every hover effect (`group-hover:underline` on the
40
+ * title, `group-hover:translate-x-0.5` on a cue arrow) from the root's `group` rather than from the
41
+ * `<a>` directly: a cue is a sibling of the `<a>`, not a descendant of it.
42
+ */
43
+ export declare const CARD_FOCUS_PROXY = "group relative rounded-lg eldra-focus eldra-focus-proxy";
44
+ export declare const STRETCHED_LINK = "after:absolute after:inset-0";
45
+ export declare const STRETCHED_LINK_OUTLINE = "outline-none";
@@ -0,0 +1,92 @@
1
+ import { Component } from 'vue';
2
+ import { HeadingLevel } from '../../composables/useHeadingTag.js';
3
+ import { IconComponent } from '../icon/types.js';
4
+ import { ImageMedia } from '../image/types.js';
5
+ /** The design spec's three fixed media ratios for a Content card (spec "Content card" →
6
+ * Properties, `ratio` row) — a subset of `ImageRatio`, `Image`'s own type. */
7
+ export type ContentCardRatio = '3x2' | '4x3' | '16x9';
8
+ /**
9
+ * `plain` (the default, media on top, no padding), `surface` (no image, `surface` fill and
10
+ * padding, optional link cue) or `outlined` (1px border, padding, count meta) — spec "Content
11
+ * card" → Variants. `plain` with no image renders as `surface` automatically (spec → Properties,
12
+ * `variant` row); see `resolvedVariant` in `ContentCard.vue`.
13
+ */
14
+ export type ContentCardVariant = 'plain' | 'surface' | 'outlined';
15
+ /** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them:
16
+ * the media frame (1), the body wrapper (2) and its eyebrow/title/titleLink/excerpt/meta, the
17
+ * surface variant's link cue (3) and the outlined variant's count meta, which reuses `meta`. */
18
+ export type ContentCardPart = 'root' | 'media' | 'body' | 'eyebrow' | 'title' | 'titleLink' | 'excerpt' | 'meta' | 'cue';
19
+ export interface ContentCardProps {
20
+ /** Card title; also the link text (spec → Properties). */
21
+ title: string;
22
+ /** Destination. The whole card links here. */
23
+ href: string;
24
+ /** With `alt`; usually `alt=""` because the image repeats the title. `null`/omitted renders no
25
+ * media at all (not `Image`'s own placeholder — see `ContentCard.vue`'s own comment). */
26
+ image?: ImageMedia | null;
27
+ /** The media frame's aspect preset. Defaults to `'3x2'`. */
28
+ ratio?: ContentCardRatio;
29
+ /** Sentence case; displayed uppercase via `text-overline`. `null` (the default) renders none. */
30
+ eyebrow?: string | null;
31
+ /** About 160 characters maximum, clamped to three lines. `null` (the default) renders none. */
32
+ excerpt?: string | null;
33
+ /** An ISO date (`YYYY-MM-DD`), rendered as `<time datetime>` through `src/utils/date.ts`. `null`
34
+ * (the default) renders no date. */
35
+ date?: string | null;
36
+ /** Extra meta after the date ("4 min read") or, alone in the `outlined` variant, the count
37
+ * ("24 products"). `null` (the default) renders none. */
38
+ meta?: string | null;
39
+ /** Defaults to `'plain'`. `plain` with no `image` renders as `surface` automatically. */
40
+ variant?: ContentCardVariant;
41
+ /** Link cue text for the `surface` variant ("Read the update"), e.g. before the arrow. `null`
42
+ * (the default) renders no cue; ignored outside the resolved `surface` variant. */
43
+ cue?: string | null;
44
+ /** The title's heading level. Follows the block. Defaults to `3`. */
45
+ headingLevel?: HeadingLevel;
46
+ /** Renders a skeleton media frame and three skeleton text lines instead of real content.
47
+ * Defaults to `false`. */
48
+ loading?: boolean;
49
+ /** The locale `date` formats in. Defaults to the ambient `useEldraUiLocale()` value. */
50
+ locale?: string;
51
+ /**
52
+ * Render the title link through a different element/component than the default `<a>` — the
53
+ * same contract as `Button`/`Link`'s own `as` (see `Link.vue`): a string tag still takes `href`;
54
+ * a component takes the destination as `to`, matching Vue Router / NuxtLink. Named `linkAs`, not
55
+ * `as`: this card's own root is spec-fixed (`<article>`/`<div>`), so `as` would be ambiguous with
56
+ * `Badge`/`Container`/`Section`'s `as`, which *does* pick the root tag — see this package's
57
+ * README "as vs linkAs" note.
58
+ */
59
+ linkAs?: string | Component;
60
+ /** Per-part class overrides, merged with `tailwind-merge`. */
61
+ classes?: Partial<Record<ContentCardPart, string>>;
62
+ }
63
+ /** `plain` (the default, no padding/border/container), `surface` (`surface` fill, padding, a
64
+ * `background` icon tile) or `outlined` (1px border, padding) — spec "Feature card" → Variants.
65
+ * Every card in a row should use the same variant. */
66
+ export type FeatureCardVariant = 'plain' | 'surface' | 'outlined';
67
+ /** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them:
68
+ * the icon tile (1), the title (2) and its titleLink when linked, the body (3), and the linked-only
69
+ * link cue (4). */
70
+ export type FeatureCardPart = 'root' | 'iconTile' | 'title' | 'titleLink' | 'body' | 'cue';
71
+ export interface FeatureCardProps {
72
+ /** A decorative icon component (e.g. `import { IconTruck } from '@tabler/icons-vue'`). */
73
+ icon: IconComponent;
74
+ /** A concrete fact ("Free shipping over $80"); also the link text when linked. */
75
+ title: string;
76
+ /** One or two sentences, `muted`. */
77
+ body: string;
78
+ /** Makes the card linked: the title wraps a stretched link and the cue shows. `null`/omitted
79
+ * (the default) renders an unlinked card with no tab stop. */
80
+ href?: string | null;
81
+ /** Link cue text (linked only). Defaults to the `learnMore` message ("Learn more"). */
82
+ cue?: string;
83
+ /** Defaults to `'plain'`. */
84
+ variant?: FeatureCardVariant;
85
+ /** The title's heading level. Follows the block. Defaults to `3`. */
86
+ headingLevel?: HeadingLevel;
87
+ /** Render the title link through a different element/component than the default `<a>` — see
88
+ * `ContentCardProps.linkAs`. Linked only. */
89
+ linkAs?: string | Component;
90
+ /** Per-part class overrides, merged with `tailwind-merge`. */
91
+ classes?: Partial<Record<FeatureCardPart, string>>;
92
+ }
@@ -0,0 +1,39 @@
1
+ import { CarouselProps } from './types.js';
2
+ declare var __VLS_1: {}, __VLS_3: {};
3
+ type __VLS_Slots = {} & {
4
+ header?: (props: typeof __VLS_1) => any;
5
+ } & {
6
+ default?: (props: typeof __VLS_3) => any;
7
+ };
8
+ declare const __VLS_base: import('vue').DefineComponent<CarouselProps, {
9
+ pause: () => void;
10
+ resume: () => void;
11
+ toggle: () => void;
12
+ playing: import('vue').Ref<boolean, boolean>;
13
+ index: import('vue').Ref<number, number>;
14
+ count: import('vue').Ref<number, number>;
15
+ goTo: (target: number) => void;
16
+ next: () => void;
17
+ prev: () => void;
18
+ focusItem: (target: number) => void;
19
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
20
+ change: (index: number) => any;
21
+ }, string, import('vue').PublicProps, Readonly<CarouselProps> & Readonly<{
22
+ onChange?: ((index: number) => any) | undefined;
23
+ }>, {
24
+ counter: boolean;
25
+ classes: Partial<Record<import('./types.js').CarouselPart, string>>;
26
+ dots: boolean;
27
+ perView: number | import('./types.js').CarouselPerViewBreakpoints;
28
+ controls: import('./types.js').CarouselControls;
29
+ autoplay: number;
30
+ draggable: boolean;
31
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
32
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
33
+ declare const _default: typeof __VLS_export;
34
+ export default _default;
35
+ type __VLS_WithSlots<T, S> = T & {
36
+ new (): {
37
+ $slots: S;
38
+ };
39
+ };
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Slides per view at each breakpoint (spec "Carousel" → Properties, `perView` row: "Product rows:
3
+ * `{ base: 1.25, md: 3, lg: 4 }` so mobile shows a peek of the next card"). `md` is the 48rem edge
4
+ * — the same one `Container`'s own gutter step reads as `@tablet` — and `lg` is the 64rem edge
5
+ * `Container` reads as `@content` (the desktop block width the spec's own product-row formula,
6
+ * `(100% − 3 × 1rem) / 4`, is written against). Either may be omitted to keep the narrower
7
+ * breakpoint's own value at that width.
8
+ */
9
+ export interface CarouselPerViewBreakpoints {
10
+ base: number;
11
+ md?: number;
12
+ lg?: number;
13
+ }
14
+ /**
15
+ * `header` (default): arrows sit in the block header, beside the `header` slot's own heading —
16
+ * the product-row variant. `below`: a control bar under the track holds Pause/Play, dots, then
17
+ * the arrows with the counter between them — the single-slide gallery variant (spec "Carousel" →
18
+ * Variants).
19
+ */
20
+ export type CarouselControls = 'header' | 'below';
21
+ /**
22
+ * The parts a consumer can restyle through `Carousel`'s `classes`, named after the spec's own
23
+ * anatomy (`root`, `track`, `slide`, `prev`, `next`, `dots`, `dot`, `counter`, `pause`), plus
24
+ * `header` — the row `controls: 'header'` renders for the arrows and the `header` slot, which the
25
+ * spec's own numbered anatomy does not name but this component does render and style through the
26
+ * same prop as everything else. `slide` is not an element `Carousel` renders itself: it is applied
27
+ * to each of the default slot's own top-level children (see `Carousel.vue`'s own comment), so a
28
+ * `classes.slide` override reaches them the same way `data-part="slide"` and `aria-roledescription`
29
+ * do. `instructions` is the visually hidden keyboard hint the root's own `aria-describedby` points
30
+ * at, rendered only while the slides hold something focusable and the roving keyboard is therefore
31
+ * live (see `Carousel.vue`'s own `instructionsId` comment) — it is not in the spec's anatomy
32
+ * either, and restyling it is almost always a mistake, but a consumer replacing the sentence's own
33
+ * `sr-only` treatment (a visible instruction line, say) should not have to fork the component.
34
+ */
35
+ export type CarouselPart = 'root' | 'header' | 'instructions' | 'track' | 'slide' | 'prev' | 'next' | 'dots' | 'dot' | 'counter' | 'pause';
36
+ export interface CarouselProps {
37
+ /**
38
+ * The carousel's accessible name (spec "Carousel" → Properties, `label` row: "Accessible name
39
+ * of the carousel (or it's labelled by the visible heading)"), put on the
40
+ * `<section aria-roledescription="carousel">` wrapper as `aria-label`. Package convention: an
41
+ * accessible-name-only prop is named `ariaLabel`, never `label` — the block's own visible
42
+ * heading is the `header` slot's content, not a prop this component owns.
43
+ */
44
+ ariaLabel: string;
45
+ /**
46
+ * Slides per view — a single number for every breakpoint, or `{ base, md, lg }`. Default `1.25`
47
+ * (a peek of the next slide, ~80% width). Product rows: `{ base: 1.25, md: 3, lg: 4 }`. Never
48
+ * reactive to viewport width in JavaScript: `Carousel.vue` turns this into container-query
49
+ * classes once, so resizing costs nothing.
50
+ */
51
+ perView?: number | CarouselPerViewBreakpoints;
52
+ /** `header` (default) or `below`. See `CarouselControls`. */
53
+ controls?: CarouselControls;
54
+ /** Shows dots, one per slide. Spec: "Use only for single-slide galleries." Default `false`. */
55
+ dots?: boolean;
56
+ /** Shows the "n / total" counter between the arrows. Default `false`. */
57
+ counter?: boolean;
58
+ /**
59
+ * Milliseconds between automatic advances; `0` (default) is off. Any non-zero value always
60
+ * renders the Pause/Play button (WCAG 2.2.2), regardless of `controls`/`dots`/`counter`, and
61
+ * never starts under `prefers-reduced-motion: reduce` (spec "Carousel" → Behaviour & motion).
62
+ * Spec Do/Don't: "Don't autoplay product rows" — never set this alongside `controls: 'header'`.
63
+ */
64
+ autoplay?: number;
65
+ /**
66
+ * Enables mouse/pen pointer drag on the track — grab the track and drag it, released with a
67
+ * snap to the nearest slide (operator decision: "the carousel should be
68
+ * draggable/swipeable"). Default `true`. Touch already swipes for free through native
69
+ * scroll-snap regardless of this prop; it only governs the added pointer-drag behaviour. See
70
+ * `useCarousel`'s own drag state machine for the mechanics.
71
+ */
72
+ draggable?: boolean;
73
+ /** Per-part class overrides, merged with `tailwind-merge`. */
74
+ classes?: Partial<Record<CarouselPart, string>>;
75
+ }
@@ -0,0 +1,152 @@
1
+ import { ComputedRef, MaybeRefOrGetter, Ref } from 'vue';
2
+ import { CarouselPerViewBreakpoints } from './types.js';
3
+ /**
4
+ * `true` under `prefers-reduced-motion: reduce`. Defined in `src/utils/cssTiming.ts` and
5
+ * re-exported here, which is where this package's public entry has always taken it from: three
6
+ * independent things in this module's own family read it (`useCarousel` below, to keep autoplay
7
+ * from ever starting; `Carousel.vue`, to scroll instantly instead of smoothly; `Lightbox`, which
8
+ * reuses this whole module, for its own `←`/`→` stepping), and the package's two JavaScript
9
+ * animations read it from the util directly.
10
+ */
11
+ export { prefersReducedMotion } from '../../utils/cssTiming.js';
12
+ /**
13
+ * Normalises `CarouselProps['perView']` into the three breakpoint slots, `base` always present.
14
+ * Exported so `Carousel.vue` and a future `Lightbox` share one reading of the prop rather than
15
+ * two — a `Lightbox` slide is always full width regardless of container size, i.e. `{ base: 1 }`,
16
+ * still expressed through the same shape.
17
+ */
18
+ export declare function resolveCarouselPerView(perView: number | CarouselPerViewBreakpoints | undefined): CarouselPerViewBreakpoints;
19
+ /**
20
+ * The three custom properties that carry a resolved `perView` to the CSS, bound as an **inline
21
+ * style** on the track: `--eldra-carousel-per-view-base`, `-md` and `-lg`. The `eldra-carousel-
22
+ * track` utility (`tailwind.css`, "Carousel") is what reads them and picks one per container-query
23
+ * breakpoint into `--eldra-carousel-per-view`, which `eldra-carousel-slide`'s width formula reads.
24
+ *
25
+ * **Why a style and not a class (bug, fixed 2026-09-27 — see the README's Deviations entry and the
26
+ * CHANGELOG).** This used to return interpolated Tailwind arbitrary-property classes
27
+ * (`` `[--eldra-carousel-per-view:${resolved.base}]` ``, plus `@tablet:`/`@content:` steps). Those
28
+ * work in this package's own Storybook only by accident: Tailwind has no runtime: it *scans source
29
+ * text* for class names, and a template literal's interpolated value is never in the text it
30
+ * scans. A consumer's build (`@import '@eldrajs/ui/tailwind.css'`, whose `@source './'` scans
31
+ * `dist/*.js`) therefore emitted no rule for any of them, so `--eldra-carousel-per-view` was never
32
+ * set at all, `eldra-carousel-slide` fell back to its own `1`, and every carousel in the built
33
+ * starter rendered one full-width slide — testimonials, product-carousel, the `split-carousel` hero
34
+ * and the `carousel` gallery all at once. An inline style needs no scanner, so the compiled CSS
35
+ * stays entirely static (three literal container-query rules in `tailwind.css`) while the numbers
36
+ * stay fully dynamic.
37
+ *
38
+ * Every slot is always written, resolved narrowest-first (`md` falls back to `base`, `lg` to `md`),
39
+ * so the breakpoint steps hold even for a caller that gives only some of them — the `var()`
40
+ * fallback chain in `eldra-carousel-track` says the same thing a second time, for a consumer who
41
+ * sets one of these properties by hand.
42
+ *
43
+ * The breakpoints themselves are the package's own 48rem/64rem container-query edges
44
+ * (`Container`'s own gutter step reads the same two), measured against the nearest `@container`
45
+ * ancestor — the `Carousel` root — never the viewport, so a `Carousel` inside a narrow
46
+ * page-builder column keeps its mobile `perView` even on a wide screen.
47
+ */
48
+ export declare function carouselPerViewStyle(perView: number | CarouselPerViewBreakpoints | undefined): Record<string, string>;
49
+ export interface UseCarouselOptions {
50
+ /** The carousel's own outer element, declared and bound to the template (`ref="rootRef"`) by
51
+ * the caller — the same shape `useDialog`'s own `dialog` option takes, so `<script setup>`'s
52
+ * template-ref detection (a local top-level `const x = ref(...)`) sees a real binding rather
53
+ * than a destructured one it cannot always type-check as "used". Hover, focus-within and
54
+ * tab-visibility pause autoplay while any of them hold, per spec "Carousel" → Behaviour &
55
+ * motion. */
56
+ rootRef: Ref<HTMLElement | null>;
57
+ /** The scrolling track, declared and bound the same way as `rootRef`. Its children are read
58
+ * directly (not through Vue's slot vnodes, which this composable never touches) so `count`,
59
+ * the per-slide `aria-label`s and the scroll math all agree with what the browser actually
60
+ * laid out. */
61
+ trackRef: Ref<HTMLElement | null>;
62
+ /** Milliseconds between automatic advances; `0`/`undefined` disables autoplay. */
63
+ autoplay?: MaybeRefOrGetter<number | undefined>;
64
+ /**
65
+ * Formats a slide's accessible label from its 1-based position and the total (spec "Carousel" →
66
+ * Accessibility: `aria-label="2 of 4"`). Defaults to that exact English shape so a caller with no
67
+ * locale of its own still gets a real label; `Carousel.vue` passes `messages.value.slideOf`.
68
+ */
69
+ slideLabel?: MaybeRefOrGetter<(position: number, total: number) => string>;
70
+ /** Extra class name(s) added to every slide alongside `eldra-carousel-slide` — `Carousel.vue`
71
+ * passes its own `classes.slide` here, so a consumer's per-part override reaches slides the
72
+ * same way `data-part="slide"` does, without this composable knowing about `classes` objects
73
+ * at all. */
74
+ slideClass?: MaybeRefOrGetter<string | undefined>;
75
+ /**
76
+ * Enables mouse/pen pointer drag on the track (operator decision: "the carousel should
77
+ * be draggable/swipeable"). Touch already swipes for free through native scroll-snap — this
78
+ * only adds the equivalent for a pointer type that has no native swipe gesture of its own.
79
+ * Defaults to `true` when omitted, which is what `Lightbox` relies on: it passes no option of
80
+ * its own and still drags, per the same decision ("Lightbox inherits it through `useCarousel`").
81
+ * `Carousel.vue` exposes this as its own `draggable` prop, default `true`.
82
+ */
83
+ draggable?: MaybeRefOrGetter<boolean | undefined>;
84
+ /** Called after the current slide actually changes, with the new index — `Carousel`'s own
85
+ * `change` event. */
86
+ onChange?: (index: number) => void;
87
+ }
88
+ export interface UseCarouselReturn {
89
+ /** The current slide, 0-based — the slide whose start is closest to the track's scroll
90
+ * position, re-synced ~60ms after the last scroll event settles. */
91
+ index: Ref<number>;
92
+ /** The track's current child count, read from the live DOM. */
93
+ count: Ref<number>;
94
+ /** `false` at the track's start. */
95
+ canPrev: ComputedRef<boolean>;
96
+ /** `false` when the track's end is visible (including when nothing overflows at all). */
97
+ canNext: ComputedRef<boolean>;
98
+ /** Scrolls to a slide, clamped to `[0, count - 1]`. Instant under reduced motion. */
99
+ goTo: (target: number) => void;
100
+ next: () => void;
101
+ prev: () => void;
102
+ /**
103
+ * `true` while **no** slide holds anything focusable, which is the one case where the track
104
+ * itself is the carousel's single tab stop (`tabindex="0"`) and `ArrowLeft`/`ArrowRight` step
105
+ * it: a single-slide image gallery, or a `Lightbox` stage (spec "Lightbox" → Anatomy, part 5:
106
+ * "Stage / track … focusable"). `false` as soon as any slide holds a link, a button or anything
107
+ * else focusable — then the roving model below owns the keyboard and the track must not be a tab
108
+ * stop of its own, or `Tab` would stop twice in a row for one carousel. Bind the track's
109
+ * `tabindex` to it; `syncFocusModel` carries the whole rule.
110
+ */
111
+ trackFocusable: ComputedRef<boolean>;
112
+ /**
113
+ * The keyboard for both models — bind it to the **track's** own `keydown` and nothing else: a
114
+ * key pressed on a slide, or on a link inside a slide, bubbles to the track, so one listener
115
+ * serves slide content this composable never renders. See the function's own comment for which
116
+ * branch handles what, and which targets it deliberately keeps its hands off.
117
+ */
118
+ onTrackKeydown: (event: KeyboardEvent) => void;
119
+ /**
120
+ * Makes a slide the active one — moving the carousel's single entry point onto it, focusing
121
+ * that entry point (the slide's first tab-stop candidate, or the slide element itself when it
122
+ * holds none) and scrolling it into view, clamped to `[0, count - 1]`. The arrow keys call it;
123
+ * exposed for a caller driving the same move from a control of its own.
124
+ *
125
+ * Under the track-focusable model it behaves exactly like `goTo` — index, scroll, edges and the
126
+ * change callback all happen — and only the `focus()` is inert, because a slide carries no
127
+ * `tabindex` in that model and so cannot take focus.
128
+ */
129
+ focusItem: (target: number) => void;
130
+ /** The user's own toggle state — `true` unless `autoplay` is off, reduced motion is on, or the
131
+ * Pause button was pressed. Hovering/focusing the carousel halts the timer without flipping
132
+ * this (the button's own label reflects intent, not the momentary pause — see `Carousel.vue`). */
133
+ playing: Ref<boolean>;
134
+ pause: () => void;
135
+ resume: () => void;
136
+ toggle: () => void;
137
+ }
138
+ /**
139
+ * The scroll-snap carousel's behaviour: index tracking, previous/next/goTo, edge detection for
140
+ * disabling the arrows, and autoplay with the spec's pause rules. `Carousel.vue` renders the
141
+ * arrows/dots/counter/Pause markup around it; `Lightbox` reuses this file unchanged for its own
142
+ * track.
143
+ *
144
+ * Deliberately DOM-first rather than slot-first: this package's other multi-child components
145
+ * (`Tabs`, `Accordion`) read their children through Vue's own slot/registration mechanisms, but a
146
+ * carousel's whole job is scroll geometry — `scrollLeft`, `offsetLeft`, `scrollWidth` — which only
147
+ * exists once the browser has actually laid the slides out. Reading `trackRef.value.children`
148
+ * directly means `count`, the index-from-scroll math and the per-slide labelling below all agree
149
+ * with what is really on screen, however the slide markup got there (a plain `v-for`, a
150
+ * conditionally rendered slide, a slide added by a parent that re-renders on its own schedule).
151
+ */
152
+ export declare function useCarousel(options: UseCarouselOptions): UseCarouselReturn;
@@ -0,0 +1,36 @@
1
+ import { CheckboxProps, CheckboxSize } from './types.js';
2
+ declare var __VLS_8: {}, __VLS_10: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_8) => any;
5
+ } & {
6
+ hint?: (props: typeof __VLS_10) => any;
7
+ };
8
+ declare const __VLS_base: import('vue').DefineComponent<CheckboxProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
9
+ "update:modelValue": (checked: boolean) => any;
10
+ change: (checked: boolean) => any;
11
+ }, string, import('vue').PublicProps, Readonly<CheckboxProps> & Readonly<{
12
+ "onUpdate:modelValue"?: ((checked: boolean) => any) | undefined;
13
+ onChange?: ((checked: boolean) => any) | undefined;
14
+ }>, {
15
+ size: CheckboxSize;
16
+ name: string;
17
+ value: string;
18
+ classes: Partial<Record<import('./types.js').CheckboxPart, string>>;
19
+ modelValue: boolean;
20
+ required: boolean;
21
+ id: string;
22
+ disabled: boolean;
23
+ invalid: boolean;
24
+ controls: string;
25
+ hint: string;
26
+ indeterminate: boolean;
27
+ describedBy: 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
+ };
@@ -0,0 +1,16 @@
1
+ import { CheckboxGroupProps } from './types.js';
2
+ declare const __VLS_export: import('vue').DefineComponent<CheckboxGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
3
+ "update:modelValue": (values: string[]) => any;
4
+ change: (values: string[]) => any;
5
+ }, string, import('vue').PublicProps, Readonly<CheckboxGroupProps> & Readonly<{
6
+ "onUpdate:modelValue"?: ((values: string[]) => any) | undefined;
7
+ onChange?: ((values: string[]) => any) | undefined;
8
+ }>, {
9
+ name: string;
10
+ classes: Partial<Record<import('./types.js').CheckboxGroupPart, string>>;
11
+ modelValue: string[];
12
+ error: string;
13
+ layout: import('./types.js').CheckboxGroupLayout;
14
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
@@ -0,0 +1,78 @@
1
+ /** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
2
+ export type CheckboxPart = 'root' | 'box' | 'check' | 'label' | 'hint';
3
+ /** The spec's two box sizes: 1.125rem and 1.5rem. */
4
+ export type CheckboxSize = 'md' | 'lg';
5
+ export interface CheckboxProps {
6
+ /** Checked state (two-way). */
7
+ modelValue?: boolean;
8
+ /**
9
+ * Shows the dash and exposes "mixed". For a parent whose children are only partly checked; the
10
+ * caller owns what activating it does to those children and recomputes this from them after
11
+ * every change.
12
+ */
13
+ indeterminate?: boolean;
14
+ /** Native form value, posted when the box is checked. */
15
+ value?: string;
16
+ /** Native form field name. In a group, every option shares one. */
17
+ name?: string;
18
+ /** Box 1.125rem (`md`, the default) or 1.5rem (`lg`). */
19
+ size?: CheckboxSize;
20
+ /** A secondary line under the label, inside the label. */
21
+ hint?: string;
22
+ /** Sets `aria-invalid="true"` and the 2px `danger` boundary. From the `FieldWrapper` otherwise. */
23
+ invalid?: boolean;
24
+ /** Native `required`. Comes from the `FieldWrapper` otherwise. */
25
+ required?: boolean;
26
+ /** Native `disabled`. */
27
+ disabled?: boolean;
28
+ /**
29
+ * For an indeterminate parent: the ids of the children it controls (`aria-controls`).
30
+ */
31
+ controls?: string;
32
+ /** The control's id. Comes from the `FieldWrapper` when there is one; this wins over it. */
33
+ id?: string;
34
+ /**
35
+ * `aria-describedby` ids — the error a required consent box points at (spec's Accessibility
36
+ * notes). Comes from the `FieldWrapper` otherwise.
37
+ */
38
+ describedBy?: string;
39
+ /** Per-part class overrides, merged with `tailwind-merge`. */
40
+ classes?: Partial<Record<CheckboxPart, string>>;
41
+ }
42
+ /** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
43
+ export type CheckboxGroupPart = 'root' | 'legend' | 'options' | 'error' | 'errorIcon';
44
+ /** Vertical is the default; a row is for short labels (sizes) and wraps. */
45
+ export type CheckboxGroupLayout = 'vertical' | 'row';
46
+ /** One option of a checkbox group. */
47
+ export interface CheckboxGroupOption {
48
+ /** The value posted, and the one that appears in the group's array. */
49
+ value: string;
50
+ /** The label text. */
51
+ label: string;
52
+ /** A secondary line under the label. */
53
+ hint?: string;
54
+ /** Native `disabled` for this option alone. */
55
+ disabled?: boolean;
56
+ }
57
+ export interface CheckboxGroupProps {
58
+ /**
59
+ * The checked values (two-way). Defaults to an empty array.
60
+ *
61
+ * The order is **check order**, not option order: a value is appended when its box is ticked and
62
+ * filtered out when it is cleared, so the array reads as the sequence the customer chose in. Sort
63
+ * it against `options` if a stable order matters to what you do with it.
64
+ */
65
+ modelValue?: string[];
66
+ /** The group question ("Material"), rendered as the fieldset's `<legend>`. */
67
+ legend: string;
68
+ /** The options. */
69
+ options: CheckboxGroupOption[];
70
+ /** `vertical` (default) or `row`, which wraps. */
71
+ layout?: CheckboxGroupLayout;
72
+ /** The group's error message, linked to the fieldset by `aria-describedby`. */
73
+ error?: string;
74
+ /** The native form field name every option shares. */
75
+ name?: string;
76
+ /** Per-part class overrides, merged with `tailwind-merge`. */
77
+ classes?: Partial<Record<CheckboxGroupPart, string>>;
78
+ }
@@ -0,0 +1,37 @@
1
+ import { ChipProps, ChipSize } from './types.js';
2
+ declare var __VLS_11: {}, __VLS_18: {}, __VLS_25: {};
3
+ type __VLS_Slots = {} & {
4
+ avatar?: (props: typeof __VLS_11) => any;
5
+ } & {
6
+ icon?: (props: typeof __VLS_18) => any;
7
+ } & {
8
+ default?: (props: typeof __VLS_25) => any;
9
+ };
10
+ declare const __VLS_base: import('vue').DefineComponent<ChipProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
+ select: (selected: boolean) => any;
12
+ remove: () => any;
13
+ "update:selected": (selected: boolean) => any;
14
+ }, string, import('vue').PublicProps, Readonly<ChipProps> & Readonly<{
15
+ onSelect?: ((selected: boolean) => any) | undefined;
16
+ onRemove?: (() => any) | undefined;
17
+ "onUpdate:selected"?: ((selected: boolean) => any) | undefined;
18
+ }>, {
19
+ size: ChipSize;
20
+ value: string;
21
+ classes: Partial<Record<import('./types.js').ChipPart, string>>;
22
+ icon: import('../../index.js').IconComponent;
23
+ selected: boolean;
24
+ disabled: boolean;
25
+ messages: Partial<import('../../index.js').UiMessages>;
26
+ avatar: import('../../index.js').ImageMedia | string | null;
27
+ removable: boolean;
28
+ selectable: 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,21 @@
1
+ import { ChipGroupProps } 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<ChipGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
+ "update:modelValue": (values: string[]) => any;
8
+ }, string, import('vue').PublicProps, Readonly<ChipGroupProps> & Readonly<{
9
+ "onUpdate:modelValue"?: ((values: string[]) => any) | undefined;
10
+ }>, {
11
+ classes: Partial<Record<import('./types.js').ChipGroupPart, string>>;
12
+ disabled: boolean;
13
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_WithSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };