@eldrajs/ui 0.2.9 → 0.3.0

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 (120) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +113 -122
  3. package/dist/{VariantPicker-Da41_oGA.js → VariantPicker-C-9sMXGI.js} +1188 -798
  4. package/dist/components/accordion/Accordion.vue.d.ts +1 -2
  5. package/dist/components/accordion/AccordionItem.vue.d.ts +1 -1
  6. package/dist/components/accordion/types.d.ts +6 -7
  7. package/dist/components/avatar/Avatar.vue.d.ts +1 -1
  8. package/dist/components/avatar/types.d.ts +6 -4
  9. package/dist/components/badge/types.d.ts +6 -4
  10. package/dist/components/breadcrumb/types.d.ts +5 -2
  11. package/dist/components/button/Button.vue.d.ts +3 -3
  12. package/dist/components/button/ButtonGroup.vue.d.ts +0 -1
  13. package/dist/components/button/types.d.ts +7 -6
  14. package/dist/components/card/ContentCard.vue.d.ts +1 -1
  15. package/dist/components/card/FeatureCard.vue.d.ts +1 -1
  16. package/dist/components/card/stretchedLink.d.ts +3 -3
  17. package/dist/components/card/types.d.ts +6 -4
  18. package/dist/components/carousel/types.d.ts +7 -3
  19. package/dist/components/checkbox/Checkbox.vue.d.ts +3 -3
  20. package/dist/components/checkbox/CheckboxGroup.vue.d.ts +1 -1
  21. package/dist/components/checkbox/types.d.ts +10 -4
  22. package/dist/components/chip/Chip.vue.d.ts +1 -1
  23. package/dist/components/chip/ChipGroup.vue.d.ts +0 -1
  24. package/dist/components/chip/types.d.ts +5 -6
  25. package/dist/components/container/Container.vue.d.ts +0 -1
  26. package/dist/components/container/types.d.ts +0 -4
  27. package/dist/components/dialog/Dialog.vue.d.ts +2 -2
  28. package/dist/components/dialog/types.d.ts +5 -2
  29. package/dist/components/drawer/Drawer.vue.d.ts +1 -1
  30. package/dist/components/drawer/types.d.ts +5 -2
  31. package/dist/components/empty-state/EmptyState.vue.d.ts +1 -1
  32. package/dist/components/empty-state/types.d.ts +7 -6
  33. package/dist/components/field-wrapper/FieldWrapper.vue.d.ts +1 -1
  34. package/dist/components/field-wrapper/types.d.ts +5 -2
  35. package/dist/components/filter-panel/FilterPanel.vue.d.ts +4 -4
  36. package/dist/components/filter-panel/facets/shared.d.ts +4 -4
  37. package/dist/components/filter-panel/types.d.ts +5 -2
  38. package/dist/components/form-layout/FormLayout.vue.d.ts +1 -1
  39. package/dist/components/form-layout/types.d.ts +5 -2
  40. package/dist/components/icon/Icon.vue.d.ts +1 -2
  41. package/dist/components/icon/types.d.ts +0 -4
  42. package/dist/components/image/types.d.ts +3 -2
  43. package/dist/components/input/Input.vue.d.ts +6 -6
  44. package/dist/components/input/classes.d.ts +25 -19
  45. package/dist/components/input/types.d.ts +5 -2
  46. package/dist/components/lightbox/Lightbox.vue.d.ts +1 -1
  47. package/dist/components/lightbox/types.d.ts +5 -2
  48. package/dist/components/link/Link.vue.d.ts +1 -1
  49. package/dist/components/link/types.d.ts +5 -2
  50. package/dist/components/load-more/types.d.ts +4 -3
  51. package/dist/components/logo-item/LogoItem.vue.d.ts +1 -1
  52. package/dist/components/logo-item/types.d.ts +2 -1
  53. package/dist/components/nav-menu/NavMenu.vue.d.ts +1 -1
  54. package/dist/components/nav-menu/navLinks.d.ts +1 -1
  55. package/dist/components/nav-menu/types.d.ts +3 -3
  56. package/dist/components/pagination/types.d.ts +5 -2
  57. package/dist/components/popover/Popover.vue.d.ts +1 -1
  58. package/dist/components/popover/types.d.ts +5 -6
  59. package/dist/components/price/types.d.ts +3 -2
  60. package/dist/components/product-card/ProductCard.vue.d.ts +1 -1
  61. package/dist/components/product-card/types.d.ts +3 -2
  62. package/dist/components/quantity-stepper/QuantityStepper.vue.d.ts +4 -4
  63. package/dist/components/quantity-stepper/types.d.ts +5 -2
  64. package/dist/components/radio/Radio.vue.d.ts +3 -3
  65. package/dist/components/radio/RadioGroup.vue.d.ts +3 -3
  66. package/dist/components/radio/recipes.d.ts +11 -7
  67. package/dist/components/radio/types.d.ts +11 -5
  68. package/dist/components/range-slider/RangeSlider.vue.d.ts +1 -1
  69. package/dist/components/range-slider/types.d.ts +5 -2
  70. package/dist/components/rating/Rating.vue.d.ts +1 -1
  71. package/dist/components/rating/types.d.ts +3 -2
  72. package/dist/components/search-bar/SearchBar.vue.d.ts +3 -3
  73. package/dist/components/search-bar/SearchResultsPanel.vue.d.ts +1 -1
  74. package/dist/components/search-bar/types.d.ts +5 -2
  75. package/dist/components/search-modal/SearchModal.vue.d.ts +2 -2
  76. package/dist/components/search-modal/types.d.ts +7 -4
  77. package/dist/components/section/Section.vue.d.ts +0 -1
  78. package/dist/components/section/types.d.ts +0 -4
  79. package/dist/components/select/MultiSelect.vue.d.ts +5 -5
  80. package/dist/components/select/Select.vue.d.ts +4 -4
  81. package/dist/components/select/SelectPanel.vue.d.ts +2 -2
  82. package/dist/components/select/panelParts.d.ts +21 -20
  83. package/dist/components/select/types.d.ts +10 -4
  84. package/dist/components/site-form/SiteForm.vue.d.ts +1 -1
  85. package/dist/components/site-form/types.d.ts +6 -2
  86. package/dist/components/skeleton/Skeleton.vue.d.ts +2 -2
  87. package/dist/components/skeleton/types.d.ts +4 -4
  88. package/dist/components/switch/Switch.vue.d.ts +2 -2
  89. package/dist/components/switch/types.d.ts +5 -2
  90. package/dist/components/tabler-icon/TablerIcon.vue.d.ts +2 -3
  91. package/dist/components/tabler-icon/types.d.ts +0 -4
  92. package/dist/components/tabs/Tab.vue.d.ts +1 -1
  93. package/dist/components/tabs/TabPanel.vue.d.ts +1 -3
  94. package/dist/components/tabs/Tabs.vue.d.ts +1 -1
  95. package/dist/components/tabs/types.d.ts +13 -11
  96. package/dist/components/textarea/Textarea.vue.d.ts +4 -4
  97. package/dist/components/textarea/types.d.ts +5 -2
  98. package/dist/components/toast/types.d.ts +9 -3
  99. package/dist/components/tooltip/types.d.ts +4 -3
  100. package/dist/components/unit-input/UnitInput.vue.d.ts +7 -7
  101. package/dist/components/unit-input/types.d.ts +5 -2
  102. package/dist/components/variant-picker/VariantPicker.vue.d.ts +1 -1
  103. package/dist/components/variant-picker/types.d.ts +3 -2
  104. package/dist/components/visually-hidden/VisuallyHidden.vue.d.ts +0 -1
  105. package/dist/components/visually-hidden/types.d.ts +0 -4
  106. package/dist/components.css +1422 -2310
  107. package/dist/composables/useEldraScope.d.ts +7 -9
  108. package/dist/index.d.ts +5 -6
  109. package/dist/index.js +1357 -880
  110. package/dist/style.css +1427 -2315
  111. package/dist/tailwind.css +11 -2234
  112. package/dist/theme.css +108 -0
  113. package/dist/tokens.css +1 -0
  114. package/dist/utilities.css +2160 -0
  115. package/dist/utils/mergeClass.d.ts +3 -0
  116. package/dist/utils/tagRecipe.d.ts +3 -3
  117. package/dist/vee-validate.js +1 -1
  118. package/package.json +4 -3
  119. package/dist/scoped.css +0 -4623
  120. package/dist/utils/cx.d.ts +0 -31
@@ -6,9 +6,8 @@ declare const __VLS_template: () => {
6
6
  };
7
7
  type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
8
8
  declare const __VLS_base: import('vue').DefineComponent<AccordionProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AccordionProps> & Readonly<{}>, {
9
- name: string;
10
9
  multiple: boolean;
11
- classes: Partial<Record<"root", string>>;
10
+ name: string;
12
11
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
12
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
13
  declare const _default: typeof __VLS_export;
@@ -13,10 +13,10 @@ declare const __VLS_base: import('vue').DefineComponent<AccordionItemProps, {},
13
13
  onToggle?: ((open: boolean) => any) | undefined;
14
14
  }>, {
15
15
  help: string;
16
- classes: Partial<Record<import('./types.js').AccordionItemPart, string>>;
17
16
  modelValue: boolean;
18
17
  headingLevel: import('./types.js').AccordionItemHeadingLevel;
19
18
  href: string;
19
+ classes: Partial<Record<import('./types.js').AccordionItemPart, string>>;
20
20
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
21
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
22
22
  declare const _default: typeof __VLS_export;
@@ -1,5 +1,5 @@
1
- /** The one part a consumer can restyle through `Accordion`'s `classes`. */
2
- export type AccordionPart = 'root';
1
+ /** `Accordion` has no inner parts: style the list itself with `class`. */
2
+ export type AccordionPart = never;
3
3
  export interface AccordionProps {
4
4
  /**
5
5
  * `true` (default): any number of items open at once, each an independent `<details>`. `false`:
@@ -9,8 +9,6 @@ export interface AccordionProps {
9
9
  multiple?: boolean;
10
10
  /** The shared `name` used while `multiple` is `false`. Generated when not given. */
11
11
  name?: string;
12
- /** Per-part class overrides, merged with `tailwind-merge`. */
13
- classes?: Partial<Record<AccordionPart, string>>;
14
12
  }
15
13
  /** The heading levels `AccordionItem`'s `title` can wrap in, when the page outline needs one
16
14
  * (spec "Accordion" → Properties, `headingLevel` row). Undefined by default: plain text. */
@@ -18,9 +16,10 @@ export type AccordionItemHeadingLevel = 2 | 3 | 4;
18
16
  /**
19
17
  * The parts a consumer can restyle through `classes`, named after the spec's own anatomy. A link
20
18
  * 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.
19
+ * disclosure trigger distinct from its own root and no panel. The root (`<details>`, or the link
20
+ * row's `<a>`) takes `class`.
22
21
  */
23
- export type AccordionItemPart = 'root' | 'summary' | 'title' | 'help' | 'chevron' | 'panel';
22
+ export type AccordionItemPart = 'summary' | 'title' | 'help' | 'chevron' | 'panel';
24
23
  export interface AccordionItemProps {
25
24
  /** The row's label. Also part of the accessible name. */
26
25
  title: string;
@@ -35,6 +34,6 @@ export interface AccordionItemProps {
35
34
  /** Renders a plain `<a>` styled as a trigger instead of `<details>`/`<summary>` plus panel — a
36
35
  * menu entry with no children (spec "Accordion" → Variants, "Link row"). No panel, no chevron. */
37
36
  href?: string;
38
- /** Per-part class overrides, merged with `tailwind-merge`. */
37
+ /** Per-part classes, appended to the part's own (they win by cascade layer). */
39
38
  classes?: Partial<Record<AccordionItemPart, string>>;
40
39
  }
@@ -1,7 +1,7 @@
1
1
  import { AvatarProps, AvatarSize } from './types.js';
2
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
3
  name: string | null;
4
+ size: AvatarSize;
5
5
  classes: Partial<Record<import('./types.js').AvatarPart, string>>;
6
6
  src: string | import('../../index.js').ImageMedia | null;
7
7
  decorative: boolean;
@@ -2,7 +2,7 @@ import { ImageMedia } from '../image/types.js';
2
2
  /** The design spec's four sizes (spec "Avatar" → Sizes): 2rem, 2.5rem, 3.5rem, 6rem diameter. */
3
3
  export type AvatarSize = 'sm' | 'md' | 'lg' | 'xl';
4
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';
5
+ export type AvatarPart = 'image' | 'initials' | 'icon';
6
6
  export interface AvatarProps {
7
7
  /**
8
8
  * The person's photo. A bare `string` is treated as the asset URL directly (the same shorthand
@@ -26,7 +26,8 @@ export interface AvatarProps {
26
26
  * instead (spec "Avatar" → Properties, `decorative` row; → Accessibility, 1.1.1/4.1.2).
27
27
  */
28
28
  decorative?: boolean;
29
- /** Per-part class overrides, merged with `tailwind-merge`. */
29
+ /** Per-part classes, appended to the kit's own (they win by cascade layer). The root is styled
30
+ * with `class`. */
30
31
  classes?: Partial<Record<AvatarPart, string>>;
31
32
  }
32
33
  /** One person in an `AvatarGroup` (spec "Avatar" → Properties, Avatar group `people` row). */
@@ -41,7 +42,7 @@ export interface AvatarGroupPerson {
41
42
  * plus `srText` — the visually hidden element that carries the group's one accessible sentence
42
43
  * (spec "Avatar" → Accessibility: "A group gets one name … the individual avatars and '+4' are
43
44
  * hidden"). */
44
- export type AvatarGroupPart = 'root' | 'item' | 'more' | 'srText';
45
+ export type AvatarGroupPart = 'item' | 'more' | 'srText';
45
46
  export interface AvatarGroupProps {
46
47
  /** The people to show, in the order they stack. */
47
48
  people: AvatarGroupPerson[];
@@ -56,6 +57,7 @@ export interface AvatarGroupProps {
56
57
  /** The group's own label, e.g. `"Makers"` — prefixes the accessible sentence: `"Makers: Ingrid,
57
58
  * Tomas, Maya and 4 more"` (spec "Avatar" → Properties, Avatar group `label` row). */
58
59
  label: string;
59
- /** Per-part class overrides, merged with `tailwind-merge`. */
60
+ /** Per-part classes, appended to the kit's own (they win by cascade layer). The root is styled
61
+ * with `class`. */
60
62
  classes?: Partial<Record<AvatarGroupPart, string>>;
61
63
  }
@@ -10,7 +10,7 @@ export type BadgeTone = 'neutral' | 'primary' | 'accent' | 'success' | 'warning'
10
10
  */
11
11
  export type BadgeVariant = 'none' | 'sale' | 'new';
12
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';
13
+ export type BadgePart = 'icon' | 'label' | 'hiddenSuffix';
14
14
  export interface BadgeProps {
15
15
  /** Visible text (content). Sentence case. Also the fallback for the default slot. */
16
16
  label?: string;
@@ -34,7 +34,8 @@ export interface BadgeProps {
34
34
  hiddenSuffix?: string | null;
35
35
  /** Render a different root element than the default `<span>`. */
36
36
  as?: string;
37
- /** Per-part class overrides, merged with `tailwind-merge`. */
37
+ /** Per-part classes, appended to the kit's own (they win by cascade layer). The root is styled
38
+ * with `class`. */
38
39
  classes?: Partial<Record<BadgePart, string>>;
39
40
  }
40
41
  /**
@@ -47,7 +48,7 @@ export type StockLevel = 'in' | 'low' | 'out' | 'preorder';
47
48
  * words inside `label`: it exists so the refresh dim (on `label`) and the fade a changed stock
48
49
  * line plays (on the span) are not one element fighting over `opacity`. It adds no box of its
49
50
  * own. */
50
- export type StockBadgePart = 'root' | 'icon' | 'label' | 'labelValue' | 'spinner' | 'srStatus';
51
+ export type StockBadgePart = 'icon' | 'label' | 'labelValue' | 'spinner' | 'srStatus';
51
52
  export interface StockBadgeProps {
52
53
  /** Picks the colour, icon and default message. */
53
54
  level: StockLevel;
@@ -74,6 +75,7 @@ export interface StockBadgeProps {
74
75
  * region per card. `aria-busy`, the dim and the spinner are unaffected; only the region goes.
75
76
  */
76
77
  announce?: boolean;
77
- /** Per-part class overrides, merged with `tailwind-merge`. */
78
+ /** Per-part classes, appended to the kit's own (they win by cascade layer). The root is styled
79
+ * with `class`. */
78
80
  classes?: Partial<Record<StockBadgePart, string>>;
79
81
  }
@@ -21,7 +21,7 @@ export interface BreadcrumbItem {
21
21
  href?: string;
22
22
  }
23
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';
24
+ export type BreadcrumbPart = 'list' | 'item' | 'link' | 'current' | 'separator' | 'ellipsis';
25
25
  export interface BreadcrumbProps {
26
26
  /** The trail, root first. The last entry is always rendered as the current page — see
27
27
  * `BreadcrumbItem`'s own comment. */
@@ -54,6 +54,9 @@ export interface BreadcrumbProps {
54
54
  * page-level structured data), because two `BreadcrumbList`s on one page are duplicate markup.
55
55
  */
56
56
  structuredData?: boolean;
57
- /** Per-part class overrides, merged with `tailwind-merge`. */
57
+ /**
58
+ * Per-part classes, appended to the part's own (they win by cascade layer). Style the `<nav>`
59
+ * itself with `class`.
60
+ */
58
61
  classes?: Partial<Record<BreadcrumbPart, string>>;
59
62
  }
@@ -14,11 +14,11 @@ declare const __VLS_base: import('vue').DefineComponent<ButtonProps, {}, {}, {},
14
14
  }, string, import('vue').PublicProps, Readonly<ButtonProps> & Readonly<{
15
15
  onClick?: ((event: MouseEvent) => any) | undefined;
16
16
  }>, {
17
- size: ButtonSize;
18
- label: string;
19
- classes: Partial<Record<import('./types.js').ButtonPart, string>>;
20
17
  type: "button" | "submit" | "reset";
18
+ label: string;
19
+ size: ButtonSize;
21
20
  href: string;
21
+ classes: Partial<Record<import('./types.js').ButtonPart, string>>;
22
22
  icon: import('../../index.js').IconComponent;
23
23
  to: string | Record<string, unknown>;
24
24
  loading: boolean;
@@ -6,7 +6,6 @@ declare const __VLS_template: () => {
6
6
  };
7
7
  type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
8
8
  declare const __VLS_base: import('vue').DefineComponent<ButtonGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ButtonGroupProps> & Readonly<{}>, {
9
- classes: Partial<Record<"root", string>>;
10
9
  attached: boolean;
11
10
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
12
11
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -13,7 +13,7 @@ export type ButtonSize = 'sm' | 'md' | 'lg';
13
13
  /** Where `Button`'s loading spinner is drawn. */
14
14
  export type ButtonSpinnerPlacement = 'overlay' | 'start';
15
15
  /** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
16
- export type ButtonPart = 'container' | 'leadingIcon' | 'label' | 'trailingIcon' | 'spinner';
16
+ export type ButtonPart = 'leadingIcon' | 'label' | 'trailingIcon' | 'spinner';
17
17
  export interface ButtonProps {
18
18
  /** Visual weight and meaning. Required: there is no neutral default in the spec. */
19
19
  variant: ButtonVariant;
@@ -81,17 +81,18 @@ export interface ButtonProps {
81
81
  pressed?: boolean;
82
82
  /** Native `disabled`. A disabled link button loses its `href` so it is not focusable either. */
83
83
  disabled?: boolean;
84
- /** Per-part class overrides, merged with `tailwind-merge`. */
84
+ /**
85
+ * Per-part classes, appended to the part's own (they win by cascade layer). Style the button
86
+ * itself with `class`.
87
+ */
85
88
  classes?: Partial<Record<ButtonPart, string>>;
86
89
  }
87
- /** The one part of a ButtonGroup a consumer can restyle. */
88
- export type ButtonGroupPart = 'root';
90
+ /** ButtonGroup has no inner parts: style the group itself with `class`. */
91
+ export type ButtonGroupPart = never;
89
92
  export interface ButtonGroupProps {
90
93
  /**
91
94
  * Renders the group as a segmented control: no gap, square inner corners, neighbours overlapping
92
95
  * by 1px and `role="group"`. Give it an `aria-label` ("View"), which falls through to the root.
93
96
  */
94
97
  attached?: boolean;
95
- /** Per-part class overrides, merged with `tailwind-merge`. */
96
- classes?: Partial<Record<ButtonGroupPart, string>>;
97
98
  }
@@ -14,10 +14,10 @@ declare const __VLS_template: () => {
14
14
  };
15
15
  type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
16
16
  declare const __VLS_base: import('vue').DefineComponent<ContentCardProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ContentCardProps> & Readonly<{}>, {
17
- classes: Partial<Record<import('./types.js').ContentCardPart, string>>;
18
17
  meta: string | null;
19
18
  image: import('../../index.js').ImageMedia | null;
20
19
  headingLevel: import('../../index.js').HeadingLevel;
20
+ classes: Partial<Record<import('./types.js').ContentCardPart, string>>;
21
21
  loading: boolean;
22
22
  variant: ContentCardVariant;
23
23
  linkAs: string | import('vue').Component;
@@ -12,9 +12,9 @@ declare const __VLS_template: () => {
12
12
  };
13
13
  type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
14
14
  declare const __VLS_base: import('vue').DefineComponent<FeatureCardProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FeatureCardProps> & Readonly<{}>, {
15
- classes: Partial<Record<import('./types.js').FeatureCardPart, string>>;
16
15
  headingLevel: import('../../index.js').HeadingLevel;
17
16
  href: string | null;
17
+ classes: Partial<Record<import('./types.js').FeatureCardPart, string>>;
18
18
  variant: FeatureCardVariant;
19
19
  linkAs: string | import('vue').Component;
20
20
  cue: string;
@@ -40,6 +40,6 @@
40
40
  * title, `group-hover:translate-x-0.5` on a cue arrow) from the root's `group` rather than from the
41
41
  * `<a>` directly: a cue is a sibling of the `<a>`, not a descendant of it.
42
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";
43
+ export declare const CARD_FOCUS_PROXY = "eldra:group eldra:relative eldra:rounded-lg eldra:eldra-focus eldra:eldra-focus-proxy";
44
+ export declare const STRETCHED_LINK = "eldra:after:absolute eldra:after:inset-0";
45
+ export declare const STRETCHED_LINK_OUTLINE = "eldra:outline-none";
@@ -15,7 +15,7 @@ export type ContentCardVariant = 'plain' | 'surface' | 'outlined';
15
15
  /** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them:
16
16
  * the media frame (1), the body wrapper (2) and its eyebrow/title/titleLink/excerpt/meta, the
17
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';
18
+ export type ContentCardPart = 'media' | 'body' | 'eyebrow' | 'title' | 'titleLink' | 'excerpt' | 'meta' | 'cue';
19
19
  export interface ContentCardProps {
20
20
  /** Card title; also the link text (spec → Properties). */
21
21
  title: string;
@@ -57,7 +57,8 @@ export interface ContentCardProps {
57
57
  * README "as vs linkAs" note.
58
58
  */
59
59
  linkAs?: string | Component;
60
- /** Per-part class overrides, merged with `tailwind-merge`. */
60
+ /** Per-part classes, appended to the kit's own (they win by cascade layer). The root is styled
61
+ * with `class`. */
61
62
  classes?: Partial<Record<ContentCardPart, string>>;
62
63
  }
63
64
  /** `plain` (the default, no padding/border/container), `surface` (`surface` fill, padding, a
@@ -67,7 +68,7 @@ export type FeatureCardVariant = 'plain' | 'surface' | 'outlined';
67
68
  /** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them:
68
69
  * the icon tile (1), the title (2) and its titleLink when linked, the body (3), and the linked-only
69
70
  * link cue (4). */
70
- export type FeatureCardPart = 'root' | 'iconTile' | 'title' | 'titleLink' | 'body' | 'cue';
71
+ export type FeatureCardPart = 'iconTile' | 'title' | 'titleLink' | 'body' | 'cue';
71
72
  export interface FeatureCardProps {
72
73
  /** A decorative icon component (e.g. `import { IconTruck } from '@tabler/icons-vue'`). */
73
74
  icon: IconComponent;
@@ -87,6 +88,7 @@ export interface FeatureCardProps {
87
88
  /** Render the title link through a different element/component than the default `<a>` — see
88
89
  * `ContentCardProps.linkAs`. Linked only. */
89
90
  linkAs?: string | Component;
90
- /** Per-part class overrides, merged with `tailwind-merge`. */
91
+ /** Per-part classes, appended to the kit's own (they win by cascade layer). The root is styled
92
+ * with `class`. */
91
93
  classes?: Partial<Record<FeatureCardPart, string>>;
92
94
  }
@@ -20,7 +20,8 @@ export interface CarouselPerViewBreakpoints {
20
20
  export type CarouselControls = 'header' | 'below';
21
21
  /**
22
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
23
+ * anatomy (`track`, `slide`, `prev`, `next`, `dots`, `dot`, `counter`, `pause`; the root takes
24
+ * `class`), plus
24
25
  * `header` — the row `controls: 'header'` renders for the arrows and the `header` slot, which the
25
26
  * spec's own numbered anatomy does not name but this component does render and style through the
26
27
  * same prop as everything else. `slide` is not an element `Carousel` renders itself: it is applied
@@ -32,7 +33,7 @@ export type CarouselControls = 'header' | 'below';
32
33
  * either, and restyling it is almost always a mistake, but a consumer replacing the sentence's own
33
34
  * `sr-only` treatment (a visible instruction line, say) should not have to fork the component.
34
35
  */
35
- export type CarouselPart = 'root' | 'header' | 'instructions' | 'track' | 'slide' | 'prev' | 'next' | 'dots' | 'dot' | 'counter' | 'pause';
36
+ export type CarouselPart = 'header' | 'instructions' | 'track' | 'slide' | 'prev' | 'next' | 'dots' | 'dot' | 'counter' | 'pause';
36
37
  export interface CarouselProps {
37
38
  /**
38
39
  * The carousel's accessible name (spec "Carousel" → Properties, `label` row: "Accessible name
@@ -70,6 +71,9 @@ export interface CarouselProps {
70
71
  * `useCarousel`'s own drag state machine for the mechanics.
71
72
  */
72
73
  draggable?: boolean;
73
- /** Per-part class overrides, merged with `tailwind-merge`. */
74
+ /**
75
+ * Per-part classes, appended to the part's own (they win by cascade layer). Style the root
76
+ * itself with `class`.
77
+ */
74
78
  classes?: Partial<Record<CarouselPart, string>>;
75
79
  }
@@ -14,11 +14,11 @@ declare const __VLS_base: import('vue').DefineComponent<CheckboxProps, {}, {}, {
14
14
  "onUpdate:modelValue"?: ((checked: boolean) => any) | undefined;
15
15
  onChange?: ((checked: boolean) => any) | undefined;
16
16
  }>, {
17
- size: CheckboxSize;
18
- name: string;
19
17
  value: string;
20
- classes: Partial<Record<import('./types.js').CheckboxPart, string>>;
18
+ name: string;
19
+ size: CheckboxSize;
21
20
  modelValue: boolean;
21
+ classes: Partial<Record<import('./types.js').CheckboxPart, string>>;
22
22
  required: boolean;
23
23
  error: string;
24
24
  id: string;
@@ -7,8 +7,8 @@ declare const __VLS_export: import('vue').DefineComponent<CheckboxGroupProps, {}
7
7
  onChange?: ((values: string[]) => any) | undefined;
8
8
  }>, {
9
9
  name: string;
10
- classes: Partial<Record<import('./types.js').CheckboxGroupPart, string>>;
11
10
  modelValue: string[];
11
+ classes: Partial<Record<import('./types.js').CheckboxGroupPart, string>>;
12
12
  error: string;
13
13
  layout: import('./types.js').CheckboxGroupLayout;
14
14
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -1,5 +1,5 @@
1
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' | 'requiredMark' | 'field' | 'error' | 'errorIcon';
2
+ export type CheckboxPart = 'box' | 'check' | 'label' | 'hint' | 'requiredMark' | 'field' | 'error' | 'errorIcon';
3
3
  /** The spec's two box sizes: 1.125rem and 1.5rem. */
4
4
  export type CheckboxSize = 'md' | 'lg';
5
5
  export interface CheckboxProps {
@@ -47,11 +47,14 @@ export interface CheckboxProps {
47
47
  * notes). Comes from the `FieldWrapper` otherwise.
48
48
  */
49
49
  describedBy?: string;
50
- /** Per-part class overrides, merged with `tailwind-merge`. */
50
+ /**
51
+ * Per-part classes, appended to the part's own (a consumer class wins by cascade layer). The
52
+ * root (the `<label>`) is styled with `class`.
53
+ */
51
54
  classes?: Partial<Record<CheckboxPart, string>>;
52
55
  }
53
56
  /** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
54
- export type CheckboxGroupPart = 'root' | 'legend' | 'options' | 'error' | 'errorIcon';
57
+ export type CheckboxGroupPart = 'legend' | 'options' | 'error' | 'errorIcon';
55
58
  /** Vertical is the default; a row is for short labels (sizes) and wraps. */
56
59
  export type CheckboxGroupLayout = 'vertical' | 'row';
57
60
  /** One option of a checkbox group. */
@@ -84,6 +87,9 @@ export interface CheckboxGroupProps {
84
87
  error?: string;
85
88
  /** The native form field name every option shares. */
86
89
  name?: string;
87
- /** Per-part class overrides, merged with `tailwind-merge`. */
90
+ /**
91
+ * Per-part classes, appended to the part's own (a consumer class wins by cascade layer). The
92
+ * root (the `<fieldset>`) is styled with `class`.
93
+ */
88
94
  classes?: Partial<Record<CheckboxGroupPart, string>>;
89
95
  }
@@ -18,8 +18,8 @@ declare const __VLS_base: import('vue').DefineComponent<ChipProps, {}, {}, {}, {
18
18
  onRemove?: (() => any) | undefined;
19
19
  "onUpdate:selected"?: ((selected: boolean) => any) | undefined;
20
20
  }>, {
21
- size: ChipSize;
22
21
  value: string;
22
+ size: ChipSize;
23
23
  classes: Partial<Record<import('./types.js').ChipPart, string>>;
24
24
  icon: import('../../index.js').IconComponent;
25
25
  selected: boolean;
@@ -10,7 +10,6 @@ declare const __VLS_base: import('vue').DefineComponent<ChipGroupProps, {}, {},
10
10
  }, string, import('vue').PublicProps, Readonly<ChipGroupProps> & Readonly<{
11
11
  "onUpdate:modelValue"?: ((values: string[]) => any) | undefined;
12
12
  }>, {
13
- classes: Partial<Record<"root", string>>;
14
13
  disabled: boolean;
15
14
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
16
15
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -8,7 +8,7 @@ import { ImageMedia } from '../image/types.js';
8
8
  * row (`## Multi-select` → Sizes, Tags row), which is also where `Chip`'s `sm` size and its remove
9
9
  * button come from directly — see `src/utils/tagRecipe.ts`, shared with `MultiSelect.vue`.
10
10
  */
11
- export type ChipPart = 'root' | 'icon' | 'avatar' | 'label' | 'removeButton';
11
+ export type ChipPart = 'icon' | 'avatar' | 'label' | 'removeButton';
12
12
  /**
13
13
  * `sm` is the exact "small chip" `MultiSelect`'s own tag row draws (1.75rem min height, 0.8125rem
14
14
  * text). `md` is this component's own, larger recipe: 2.25rem min height, 0.875rem text — a chip
@@ -53,7 +53,8 @@ export interface ChipProps {
53
53
  avatar?: ImageMedia | string | null;
54
54
  /** This chip's value inside a `ChipGroup` — see `selected` and `ChipGroup`'s own docs. */
55
55
  value?: string;
56
- /** Per-part class overrides, merged with `tailwind-merge`. */
56
+ /** Per-part classes, appended to the kit's own (they win by cascade layer). The root is styled
57
+ * with `class`. */
57
58
  classes?: Partial<Record<ChipPart, string>>;
58
59
  /**
59
60
  * Overrides for the one string this component renders itself: `removeTag`, the remove button's
@@ -66,8 +67,8 @@ export interface ChipProps {
66
67
  */
67
68
  messages?: Partial<UiMessages>;
68
69
  }
69
- /** The one part a consumer can restyle through `ChipGroup`'s `classes`. */
70
- export type ChipGroupPart = 'root';
70
+ /** ChipGroup has no inner parts: style the group itself with `class`. */
71
+ export type ChipGroupPart = never;
71
72
  export interface ChipGroupProps {
72
73
  /** The selected chips' values (two-way, `update:modelValue`). */
73
74
  modelValue: string[];
@@ -79,6 +80,4 @@ export interface ChipGroupProps {
79
80
  ariaLabel: string;
80
81
  /** Disables every member `Chip`, in addition to whatever each one says on its own. */
81
82
  disabled?: boolean;
82
- /** Per-part class overrides, merged with `tailwind-merge`. */
83
- classes?: Partial<Record<ChipGroupPart, string>>;
84
83
  }
@@ -6,7 +6,6 @@ declare const __VLS_template: () => {
6
6
  };
7
7
  type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
8
8
  declare const __VLS_base: import('vue').DefineComponent<ContainerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ContainerProps> & Readonly<{}>, {
9
- classes: Partial<Record<"root", string>>;
10
9
  as: string;
11
10
  width: ContainerWidth;
12
11
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -1,7 +1,5 @@
1
1
  /** The spec's four content widths (spec "Container and section" → Sizes). */
2
2
  export type ContainerWidth = 'narrow' | 'content' | 'wide' | 'full';
3
- /** The parts a consumer can restyle through `classes`. Container has only the one. */
4
- export type ContainerPart = 'root';
5
3
  export interface ContainerProps {
6
4
  /**
7
5
  * Maximum content width. `narrow` (40rem: FAQ, rich text, newsletter, quote), `content` (64rem:
@@ -10,8 +8,6 @@ export interface ContainerProps {
10
8
  * carousel). Defaults to `content`.
11
9
  */
12
10
  width?: ContainerWidth;
13
- /** Per-part class overrides, merged with `tailwind-merge`. */
14
- classes?: Partial<Record<ContainerPart, string>>;
15
11
  /** Render as a different tag instead of a native `<div>` — a `<figure>` around full-bleed media. */
16
12
  as?: string;
17
13
  }
@@ -20,10 +20,10 @@ declare const __VLS_base: import('vue').DefineComponent<DialogProps, {
20
20
  onClose?: ((reason: string) => any) | undefined;
21
21
  onCancel?: (() => any) | undefined;
22
22
  }>, {
23
- size: import('./types.js').DialogSize;
24
23
  title: string;
25
- classes: Partial<Record<import('./types.js').DialogPart, string>>;
24
+ size: import('./types.js').DialogSize;
26
25
  modelValue: boolean;
26
+ classes: Partial<Record<import('./types.js').DialogPart, string>>;
27
27
  messages: Partial<{
28
28
  clear: string;
29
29
  close: string;
@@ -1,6 +1,6 @@
1
1
  import { UiMessages } from '../../composables/useMessages.js';
2
2
  /** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
3
- export type DialogPart = 'root' | 'panel' | 'header' | 'title' | 'close' | 'description' | 'body' | 'footer';
3
+ export type DialogPart = 'panel' | 'header' | 'title' | 'close' | 'description' | 'body' | 'footer';
4
4
  /** The spec's two panel widths: `sm` 24rem, `md` (the default) 32rem — both capped at the
5
5
  * viewport width minus 2rem. */
6
6
  export type DialogSize = 'sm' | 'md';
@@ -29,6 +29,9 @@ export interface DialogProps {
29
29
  closeOnEscape?: boolean;
30
30
  /** Message overrides (only `close` applies here). See `useMessages`. */
31
31
  messages?: Partial<UiMessages>;
32
- /** Per-part class overrides, merged with `tailwind-merge`. */
32
+ /**
33
+ * Per-part classes, appended to the part's own (they win by cascade layer). Style the
34
+ * `<dialog>` itself with `class`.
35
+ */
33
36
  classes?: Partial<Record<DialogPart, string>>;
34
37
  }
@@ -22,8 +22,8 @@ declare const __VLS_base: import('vue').DefineComponent<DrawerProps, {
22
22
  onCancel?: (() => any) | undefined;
23
23
  }>, {
24
24
  title: string;
25
- classes: Partial<Record<import('./types.js').DrawerPart, string>>;
26
25
  modelValue: boolean;
26
+ classes: Partial<Record<import('./types.js').DrawerPart, string>>;
27
27
  ariaLabel: string;
28
28
  count: number;
29
29
  messages: Partial<{
@@ -1,6 +1,6 @@
1
1
  import { UiMessages } from '../../composables/useMessages.js';
2
2
  /** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
3
- export type DrawerPart = 'root' | 'panel' | 'header' | 'title' | 'count' | 'close' | 'body' | 'footer';
3
+ export type DrawerPart = 'panel' | 'header' | 'title' | 'count' | 'close' | 'body' | 'footer';
4
4
  /** The edge the sheet slides in from. `left` is for the mobile menu; everything else (cart,
5
5
  * filters, quick view) is `right`, the default. */
6
6
  export type DrawerSide = 'right' | 'left';
@@ -25,6 +25,9 @@ export interface DrawerProps {
25
25
  /** Message overrides (only `close` applies here, unless a name is available — see
26
26
  * `closeDrawer`). See `useMessages`. */
27
27
  messages?: Partial<UiMessages>;
28
- /** Per-part class overrides, merged with `tailwind-merge`. */
28
+ /**
29
+ * Per-part classes, appended to the part's own (they win by cascade layer). Style the drawer's
30
+ * `<dialog>` itself with `class`.
31
+ */
29
32
  classes?: Partial<Record<DrawerPart, string>>;
30
33
  }
@@ -13,8 +13,8 @@ declare const __VLS_base: import('vue').DefineComponent<EmptyStateProps, {}, {},
13
13
  onRetry?: (() => any) | undefined;
14
14
  }>, {
15
15
  text: string | null;
16
- classes: Partial<Record<import('./types.js').EmptyStatePart, string>>;
17
16
  headingLevel: import('../../index.js').HeadingLevel;
17
+ classes: Partial<Record<import('./types.js').EmptyStatePart, string>>;
18
18
  icon: import('../../index.js').IconComponent;
19
19
  variant: EmptyStateVariant;
20
20
  plain: boolean;
@@ -8,8 +8,8 @@ import { IconComponent } from '../icon/types.js';
8
8
  */
9
9
  export type EmptyStateVariant = 'empty' | 'noResults' | 'error';
10
10
  /** The parts a consumer can restyle through `classes`, named after the spec's anatomy: the icon
11
- * circle (1), the title (2), the text (3) and the actions row (4). */
12
- export type EmptyStatePart = 'root' | 'icon' | 'title' | 'text' | 'actions';
11
+ * circle (1), the title (2), the text (3) and the actions row (4). The root is styled with `class`. */
12
+ export type EmptyStatePart = 'icon' | 'title' | 'text' | 'actions';
13
13
  export interface EmptyStateProps {
14
14
  /** Which state this is (spec "Empty and error states" → Variants). Defaults to `empty`. */
15
15
  variant?: EmptyStateVariant;
@@ -36,14 +36,15 @@ export interface EmptyStateProps {
36
36
  * from the slot's own scope instead (see the `actions` slot below).
37
37
  */
38
38
  retrying?: boolean;
39
- /** Per-part class overrides, merged with `tailwind-merge`. */
39
+ /** Per-part classes, appended to the part's own (they win by cascade layer). */
40
40
  classes?: Partial<Record<EmptyStatePart, string>>;
41
41
  }
42
42
  /**
43
43
  * The parts a consumer can restyle through `classes`: the icon (optional), the action label
44
- * (strong) and the guidance text, named after the spec's own editor-hint anatomy.
44
+ * (strong) and the guidance text, named after the spec's own editor-hint anatomy. The root is
45
+ * styled with `class`.
45
46
  */
46
- export type EditorPlaceholderPart = 'root' | 'icon' | 'label' | 'help';
47
+ export type EditorPlaceholderPart = 'icon' | 'label' | 'help';
47
48
  export interface EditorPlaceholderProps {
48
49
  /** E.g. `plus`, `photo`. `null` (the default) renders no icon. */
49
50
  icon?: IconComponent | null;
@@ -54,6 +55,6 @@ export interface EditorPlaceholderProps {
54
55
  help?: string | null;
55
56
  /** Compact padding, for an empty inline field (e.g. an empty heading). Defaults to `false`. */
56
57
  inline?: boolean;
57
- /** Per-part class overrides, merged with `tailwind-merge`. */
58
+ /** Per-part classes, appended to the part's own (they win by cascade layer). */
58
59
  classes?: Partial<Record<EditorPlaceholderPart, string>>;
59
60
  }
@@ -14,9 +14,9 @@ declare const __VLS_template: () => {
14
14
  };
15
15
  type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
16
16
  declare const __VLS_base: import('vue').DefineComponent<FieldWrapperProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldWrapperProps> & Readonly<{}>, {
17
+ help: string;
17
18
  label: string;
18
19
  counter: import('./types.js').FieldWrapperCounter;
19
- help: string;
20
20
  classes: Partial<Record<import('./types.js').FieldWrapperPart, string>>;
21
21
  required: boolean;
22
22
  optional: boolean;