@eldrajs/ui 0.2.9 → 0.3.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.
- package/CHANGELOG.md +13 -0
- package/README.md +171 -151
- package/dist/{VariantPicker-Da41_oGA.js → VariantPicker-DDFlMvgJ.js} +1222 -833
- package/dist/components/accordion/Accordion.vue.d.ts +1 -2
- package/dist/components/accordion/AccordionItem.vue.d.ts +1 -1
- package/dist/components/accordion/types.d.ts +6 -7
- package/dist/components/avatar/Avatar.vue.d.ts +1 -1
- package/dist/components/avatar/types.d.ts +6 -4
- package/dist/components/badge/types.d.ts +6 -4
- package/dist/components/breadcrumb/types.d.ts +5 -2
- package/dist/components/button/Button.vue.d.ts +3 -3
- package/dist/components/button/ButtonGroup.vue.d.ts +0 -1
- package/dist/components/button/types.d.ts +7 -6
- package/dist/components/card/ContentCard.vue.d.ts +1 -1
- package/dist/components/card/FeatureCard.vue.d.ts +1 -1
- package/dist/components/card/stretchedLink.d.ts +3 -3
- package/dist/components/card/types.d.ts +6 -4
- package/dist/components/carousel/types.d.ts +7 -3
- package/dist/components/checkbox/Checkbox.vue.d.ts +3 -3
- package/dist/components/checkbox/CheckboxGroup.vue.d.ts +1 -1
- package/dist/components/checkbox/types.d.ts +10 -4
- package/dist/components/chip/Chip.vue.d.ts +1 -1
- package/dist/components/chip/ChipGroup.vue.d.ts +0 -1
- package/dist/components/chip/types.d.ts +5 -6
- package/dist/components/container/Container.vue.d.ts +0 -1
- package/dist/components/container/types.d.ts +0 -4
- package/dist/components/dialog/Dialog.vue.d.ts +2 -2
- package/dist/components/dialog/types.d.ts +5 -2
- package/dist/components/drawer/Drawer.vue.d.ts +1 -1
- package/dist/components/drawer/types.d.ts +5 -2
- package/dist/components/empty-state/EmptyState.vue.d.ts +1 -1
- package/dist/components/empty-state/types.d.ts +7 -6
- package/dist/components/field-wrapper/FieldWrapper.vue.d.ts +1 -1
- package/dist/components/field-wrapper/types.d.ts +5 -2
- package/dist/components/filter-panel/FilterPanel.vue.d.ts +4 -4
- package/dist/components/filter-panel/facets/shared.d.ts +4 -4
- package/dist/components/filter-panel/types.d.ts +5 -2
- package/dist/components/form-layout/FormLayout.vue.d.ts +1 -1
- package/dist/components/form-layout/types.d.ts +5 -2
- package/dist/components/icon/Icon.vue.d.ts +1 -2
- package/dist/components/icon/types.d.ts +0 -4
- package/dist/components/image/types.d.ts +3 -2
- package/dist/components/input/Input.vue.d.ts +6 -6
- package/dist/components/input/classes.d.ts +25 -19
- package/dist/components/input/types.d.ts +5 -2
- package/dist/components/lightbox/Lightbox.vue.d.ts +1 -1
- package/dist/components/lightbox/types.d.ts +5 -2
- package/dist/components/link/Link.vue.d.ts +1 -1
- package/dist/components/link/types.d.ts +5 -2
- package/dist/components/load-more/types.d.ts +4 -3
- package/dist/components/logo-item/LogoItem.vue.d.ts +1 -1
- package/dist/components/logo-item/types.d.ts +2 -1
- package/dist/components/nav-menu/NavMenu.vue.d.ts +1 -1
- package/dist/components/nav-menu/navLinks.d.ts +1 -1
- package/dist/components/nav-menu/types.d.ts +3 -3
- package/dist/components/pagination/types.d.ts +5 -2
- package/dist/components/popover/Popover.vue.d.ts +1 -1
- package/dist/components/popover/types.d.ts +5 -6
- package/dist/components/price/types.d.ts +3 -2
- package/dist/components/product-card/ProductCard.vue.d.ts +1 -1
- package/dist/components/product-card/types.d.ts +3 -2
- package/dist/components/quantity-stepper/QuantityStepper.vue.d.ts +4 -4
- package/dist/components/quantity-stepper/types.d.ts +5 -2
- package/dist/components/radio/Radio.vue.d.ts +3 -3
- package/dist/components/radio/RadioGroup.vue.d.ts +3 -3
- package/dist/components/radio/recipes.d.ts +11 -7
- package/dist/components/radio/types.d.ts +11 -5
- package/dist/components/range-slider/RangeSlider.vue.d.ts +1 -1
- package/dist/components/range-slider/types.d.ts +5 -2
- package/dist/components/rating/Rating.vue.d.ts +1 -1
- package/dist/components/rating/types.d.ts +3 -2
- package/dist/components/search-bar/SearchBar.vue.d.ts +3 -3
- package/dist/components/search-bar/SearchResultsPanel.vue.d.ts +1 -1
- package/dist/components/search-bar/types.d.ts +5 -2
- package/dist/components/search-modal/SearchModal.vue.d.ts +2 -2
- package/dist/components/search-modal/types.d.ts +7 -4
- package/dist/components/section/Section.vue.d.ts +0 -1
- package/dist/components/section/types.d.ts +0 -4
- package/dist/components/select/MultiSelect.vue.d.ts +5 -5
- package/dist/components/select/Select.vue.d.ts +4 -4
- package/dist/components/select/SelectPanel.vue.d.ts +2 -2
- package/dist/components/select/panelParts.d.ts +21 -20
- package/dist/components/select/types.d.ts +10 -4
- package/dist/components/site-form/SiteForm.vue.d.ts +1 -1
- package/dist/components/site-form/types.d.ts +6 -2
- package/dist/components/skeleton/Skeleton.vue.d.ts +3 -2
- package/dist/components/skeleton/types.d.ts +16 -6
- package/dist/components/switch/Switch.vue.d.ts +2 -2
- package/dist/components/switch/types.d.ts +5 -2
- package/dist/components/tabler-icon/TablerIcon.vue.d.ts +2 -3
- package/dist/components/tabler-icon/types.d.ts +0 -4
- package/dist/components/tabs/Tab.vue.d.ts +1 -1
- package/dist/components/tabs/TabPanel.vue.d.ts +1 -3
- package/dist/components/tabs/Tabs.vue.d.ts +1 -1
- package/dist/components/tabs/types.d.ts +13 -11
- package/dist/components/textarea/Textarea.vue.d.ts +4 -4
- package/dist/components/textarea/types.d.ts +5 -2
- package/dist/components/toast/types.d.ts +9 -3
- package/dist/components/tooltip/types.d.ts +4 -3
- package/dist/components/unit-input/UnitInput.vue.d.ts +7 -7
- package/dist/components/unit-input/types.d.ts +5 -2
- package/dist/components/variant-picker/VariantPicker.vue.d.ts +1 -1
- package/dist/components/variant-picker/types.d.ts +3 -2
- package/dist/components/visually-hidden/VisuallyHidden.vue.d.ts +0 -1
- package/dist/components/visually-hidden/types.d.ts +0 -4
- package/dist/components.css +1481 -2342
- package/dist/composables/useDialog.d.ts +9 -1
- package/dist/composables/useEldraScope.d.ts +7 -9
- package/dist/index.d.ts +5 -6
- package/dist/index.js +1380 -884
- package/dist/style.css +1487 -2348
- package/dist/tailwind.css +11 -2234
- package/dist/theme.css +108 -0
- package/dist/tokens.css +1 -0
- package/dist/utilities.css +2228 -0
- package/dist/utils/mergeClass.d.ts +3 -0
- package/dist/utils/tagRecipe.d.ts +3 -3
- package/dist/vee-validate.js +1 -1
- package/package.json +4 -3
- package/dist/scoped.css +0 -4623
- package/dist/utils/cx.d.ts +0 -31
package/README.md
CHANGED
|
@@ -27,47 +27,24 @@ entry needs it, and nothing else in the package imports it.
|
|
|
27
27
|
|
|
28
28
|
## Styles
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
The components come **prebuilt**: an app never compiles this package's styles and needs no Tailwind
|
|
31
|
+
of its own to use them. Every class a component renders is `eldra:`-prefixed (`eldra:px-4`,
|
|
32
|
+
`eldra:hover:bg-primary`), compiled with Tailwind's `prefix(eldra)`, and every theme variable it
|
|
33
|
+
reads is `--eldra-*`. Nothing in the package's CSS uses a name an app's own Tailwind build uses, so
|
|
34
|
+
the two never restyle each other's markup.
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
the spec's defaults, plus a
|
|
37
|
-
`@media (prefers-reduced-motion: reduce)` rule that zeroes every duration variable.
|
|
38
|
-
- **`@eldrajs/ui/tailwind.css`** — `tokens.css`, then a Tailwind v4 `@theme` block mapping its own
|
|
39
|
-
namespaces onto those variables (`--color-primary: var(--eldra-color-primary)`, `--radius-md`,
|
|
40
|
-
`--font-heading`, `--spacing-*`, `--shadow-*`, `--ease-*`) plus the package's custom utilities
|
|
41
|
-
(control heights, the `eldra-focus` ring, the type styles, motion and layer utilities) and a
|
|
42
|
-
`@source "../dist"` so a consumer's own Tailwind build scans the package's _compiled_ components.
|
|
43
|
-
For a project that already runs Tailwind v4, `main.css` (or equivalent) becomes:
|
|
36
|
+
Five CSS entries ship. Every one starts from the same `--eldra-*` variables, so none is a different
|
|
37
|
+
theme, only a different delivery shape.
|
|
44
38
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
@import '@eldrajs/ui/tailwind.css';
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
The type styles (`text-body`, `text-h2`, …) set longhands, never the `font` shorthand, and read
|
|
51
|
-
their weight as `var(--tw-font-weight, <token>)`, the declaration Tailwind writes for its own
|
|
52
|
-
`--text-*--font-weight`. So a `font-medium`/`font-semibold` beside one wins whatever order the two
|
|
53
|
-
compile in, and a `tabular-nums` beside one is no longer reset. A base-layer
|
|
54
|
-
`@apply font-*` sets `--tw-font-weight` as well, so it reaches a type style on the same element.
|
|
55
|
-
Line height and tracking are plain longhands on purpose: the starter's own base rule
|
|
56
|
-
(`h1`–`h4` `@apply leading-[1.1] tracking-tight`) would otherwise override every heading's type
|
|
57
|
-
style.
|
|
58
|
-
|
|
59
|
-
- **`@eldrajs/ui/style.css`** — the package's own compiled build of `tailwind.css` plus every
|
|
60
|
-
component's utilities, for a consumer with no Tailwind build of their own:
|
|
39
|
+
- **`@eldrajs/ui/style.css`** — the tokens, Tailwind's preflight and every component's styles, for
|
|
40
|
+
a page built from this package:
|
|
61
41
|
|
|
62
42
|
```css
|
|
63
43
|
@import '@eldrajs/ui/style.css';
|
|
64
44
|
```
|
|
65
45
|
|
|
66
|
-
This is also what a project whose own Tailwind build cannot share this package's utility prefix
|
|
67
|
-
(a `ui:`-prefixed theme, for example) reaches for.
|
|
68
|
-
|
|
69
46
|
- **`@eldrajs/ui/components.css`** — `style.css` without Tailwind's preflight, for a site that has
|
|
70
|
-
its own stylesheet
|
|
47
|
+
its own stylesheet (or its own Tailwind) and adds components to it:
|
|
71
48
|
|
|
72
49
|
```css
|
|
73
50
|
@import '@eldrajs/ui/components.css';
|
|
@@ -85,77 +62,91 @@ delivery shape.
|
|
|
85
62
|
`src/styles/__tests__/componentsCss.browser.spec.ts` renders every component family under both,
|
|
86
63
|
the overlays open, and requires identical pixels.
|
|
87
64
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
elements inside them, `:where([data-eldra-ui], [data-eldra-ui] [data-part])`, at zero
|
|
93
|
-
specificity. `data-part` alone is not enough, because it is not this package's name: a site's
|
|
94
|
-
own `<h2 data-part="title">`, or any Ark UI or Zag component (which put `data-part` on every
|
|
95
|
-
element they render), keeps the browser's defaults. The attribute is public and stable, so a
|
|
96
|
-
site can use it as a hook too (`a:not([data-eldra-ui], [data-eldra-ui] *)` keeps a site's global
|
|
97
|
-
link rule out of the components). One case stays inside the scope: an element carrying its own
|
|
98
|
-
`data-part` that the site passes into a component's slot (an Ark UI widget inside a `Dialog`,
|
|
99
|
-
say) is a `data-part` element inside a marked root, so it gets the reset as well.
|
|
100
|
-
|
|
101
|
-
Either way, the package's rules are in cascade layers and a site's **unlayered** rules beat them
|
|
102
|
-
regardless of specificity: a global `a { color: … }` or `button { font: … }` in the site's own CSS
|
|
103
|
-
restyles those elements inside the components too. Scope such rules (`.prose a`) or put the
|
|
104
|
-
site's stylesheet in a layer declared before the package's.
|
|
105
|
-
|
|
106
|
-
- **`@eldrajs/ui/scoped.css`** — for embedding the components in another Tailwind app, or in a
|
|
107
|
-
page that already has this package's components of its own. See the next section.
|
|
108
|
-
|
|
109
|
-
### Embedding in another Tailwind app
|
|
110
|
-
|
|
111
|
-
The other entries compile to the same names any Tailwind build uses: theme variables
|
|
112
|
-
(`--color-text`, `--spacing`, `--radius-md`) and utility classes (`p-4`, `text-text`). Next to an
|
|
113
|
-
app's own Tailwind the two themes overwrite each other, and the app's markup inside a component's
|
|
114
|
-
slot picks up this package's theme. `scoped.css` is `components.css` rewritten so it shares nothing
|
|
115
|
-
with the page:
|
|
65
|
+
- **`@eldrajs/ui/tokens.css`** — the `--eldra-*` variables only (colours, radii, spacing, type,
|
|
66
|
+
motion, z-index, and the one opacity — `--eldra-revalidating-opacity`), declared on `:root` with
|
|
67
|
+
the spec's defaults, plus a `@media (prefers-reduced-motion: reduce)` rule that zeroes every
|
|
68
|
+
duration variable.
|
|
116
69
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
70
|
+
- **`@eldrajs/ui/tailwind.css`** — for an app that runs Tailwind v4 and wants its **own** markup
|
|
71
|
+
on the same design tokens: `tokens.css`, then a `@theme` block mapping Tailwind's namespaces
|
|
72
|
+
onto those variables (`--color-primary: var(--eldra-color-primary)`, `--radius-md`,
|
|
73
|
+
`--font-heading`, `--spacing-*`, `--shadow-*`, `--ease-*`) and the package's custom utilities
|
|
74
|
+
(control heights, the `eldra-focus` ring, the type styles, motion and layer utilities). It builds
|
|
75
|
+
none of the components; import the prebuilt ones beside it. `theme.css` (the `@theme` block) and
|
|
76
|
+
`utilities.css` (the utilities) ship on their own too.
|
|
77
|
+
|
|
78
|
+
```css
|
|
79
|
+
@import 'tailwindcss';
|
|
80
|
+
@import '@eldrajs/ui/tailwind.css';
|
|
81
|
+
@import '@eldrajs/ui/components.css';
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The type styles (`text-body`, `text-h2`, …) set longhands, never the `font` shorthand, and read
|
|
85
|
+
their weight as `var(--tw-font-weight, <token>)`, the declaration Tailwind writes for its own
|
|
86
|
+
`--text-*--font-weight`. So a `font-medium`/`font-semibold` beside one wins whatever order the two
|
|
87
|
+
compile in, and a `tabular-nums` beside one is no longer reset. A base-layer
|
|
88
|
+
`@apply font-*` sets `--tw-font-weight` as well, so it reaches a type style on the same element.
|
|
89
|
+
Line height and tracking are plain longhands on purpose: the starter's own base rule
|
|
90
|
+
(`h1`–`h4` `@apply leading-[1.1] tracking-tight`) would otherwise override every heading's type
|
|
91
|
+
style.
|
|
92
|
+
|
|
93
|
+
### Overriding a component's classes
|
|
94
|
+
|
|
95
|
+
The components' styles sit in `@layer components`, below Tailwind's `@layer utilities`, and both
|
|
96
|
+
`style.css` and `components.css` declare the standard order (`properties, theme, base, components,
|
|
97
|
+
utilities`), so it holds whichever stylesheet loads first. A class you put on a component, with
|
|
98
|
+
`class` (its outermost element) or a part of `classes` (an element inside it), is not prefixed and
|
|
99
|
+
is added to the component's own classes; it wins by layer, whatever its specificity. Nothing is
|
|
100
|
+
merged or removed at runtime: the components bind their classes the plain Vue way, one class per
|
|
101
|
+
concern on each element.
|
|
102
|
+
|
|
103
|
+
```vue
|
|
104
|
+
<Button class="px-8">Checkout</Button>
|
|
105
|
+
<!-- renders class="eldra:control-h eldra:px-4.5 … px-8": px-8 wins -->
|
|
121
106
|
```
|
|
122
107
|
|
|
123
|
-
|
|
124
|
-
|
|
108
|
+
- It wins in every state: a plain `bg-red-600` on a `Button` replaces its hover and active fills
|
|
109
|
+
too, because a utilities-layer rule beats any components-layer one. Write the states you want
|
|
110
|
+
(`bg-red-600 hover:bg-red-700`).
|
|
111
|
+
- Your app's own Tailwind must generate the class (it is in your source, so it does). Without a
|
|
112
|
+
Tailwind of your own, any CSS of yours that is unlayered or in a layer declared after
|
|
113
|
+
`components` wins the same way.
|
|
114
|
+
|
|
115
|
+
### The `data-eldra-ui` marker
|
|
116
|
+
|
|
117
|
+
Every component's outermost element carries `data-eldra-ui`, and so does every element a component
|
|
118
|
+
renders outside it: a `Select` or `MultiSelect` panel, a `SearchBar` results panel, a `Popover`
|
|
119
|
+
panel, a `Tooltip` bubble and the `Toaster` region, each teleported out of its component.
|
|
120
|
+
`components.css`'s reset reaches exactly those elements and the `data-part` elements inside them,
|
|
121
|
+
`:where([data-eldra-ui], [data-eldra-ui] [data-part])`, at zero specificity. `data-part` alone is
|
|
122
|
+
not enough, because it is not this package's name: a site's own `<h2 data-part="title">`, or any
|
|
123
|
+
Ark UI or Zag component (which put `data-part` on every element they render), keeps the browser's
|
|
124
|
+
defaults. The attribute is public and stable, so a site can use it as a hook too
|
|
125
|
+
(`a:not([data-eldra-ui], [data-eldra-ui] *)` keeps a site's global link rule out of the
|
|
126
|
+
components). One case stays inside the scope: an element carrying its own `data-part` that the site
|
|
127
|
+
passes into a component's slot (an Ark UI widget inside a `Dialog`, say) is a `data-part` element
|
|
128
|
+
inside a marked root, so it gets the reset as well.
|
|
129
|
+
|
|
130
|
+
A site's **unlayered** element rules beat the package's layered ones regardless of specificity: a
|
|
131
|
+
global `a { color: … }` or `button { font: … }` restyles those elements inside the components too.
|
|
132
|
+
Scope such rules (`.prose a`) or put them in a layer.
|
|
133
|
+
|
|
134
|
+
### Theming a subtree
|
|
135
|
+
|
|
136
|
+
`provideEldraScope(name)`, called in the `setup()` of a wrapper or an app root, makes every
|
|
137
|
+
component below it render `data-eldra-scope="<name>"` on its root and on every part it teleports
|
|
138
|
+
(panels, bubbles, dialogs, toasts), so the `--eldra-*` variables can be set for those components
|
|
139
|
+
alone, teleported parts included:
|
|
125
140
|
|
|
126
|
-
|
|
141
|
+
```css
|
|
127
142
|
[data-eldra-scope='studio'] {
|
|
128
143
|
--eldra-color-primary: #0b5cad;
|
|
129
144
|
}
|
|
130
145
|
```
|
|
131
146
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
- **Scope.** Every component below `provideEldraScope` renders `data-eldra-scope="<name>"` on its
|
|
136
|
-
root and on every part it teleports (panels, bubbles, dialogs, toasts), and every rule in
|
|
137
|
-
`scoped.css` matches only inside `[data-eldra-scope]`. A page's own components of this package
|
|
138
|
-
(unscoped, on `components.css` or `style.css`) are never matched, and the token defaults sit on
|
|
139
|
-
the outermost scope root, not on `:root`, so neither side re-themes the other.
|
|
140
|
-
- **Slots.** Every element holding slot content you passed in carries `data-eldra-slot` (a
|
|
141
|
-
`Button`'s label, a `Dialog`'s title, body and footer, a `Popover` panel, a `Popover` or
|
|
142
|
-
`Tooltip` root holding your trigger, a `Chip` label, a select option…), and the scope ends at its children: your markup there is styled by your own
|
|
143
|
-
CSS only, so a `class="text-text"` in a button label is your `text-text`. The package's own
|
|
144
|
-
elements beside your content carry `data-eldra-scope` and stay styled. The attribute renders
|
|
145
|
-
whenever the slot has content, with or without a provider, and never for a fallback.
|
|
146
|
-
- **Cascade.** The file is unlayered, so it beats your layered preflight and utilities on the
|
|
147
|
-
components' own elements; your classes on a component still win through `classes`/`class`, which
|
|
148
|
-
`tailwind-merge` puts in place of the component's own. Your **unlayered** global rules still
|
|
149
|
-
reach the components' elements, as with the other entries.
|
|
150
|
-
- **Limits.** A class of yours that has the same name as one of this package's (`p-4`) and is set
|
|
151
|
-
on a component's own element through `classes` resolves to this package's definition. Layout
|
|
152
|
-
rules a component gives its direct children (`ButtonGroup`'s joined corners, `FormLayout`'s
|
|
153
|
-
full-width and first-link actions) reach a child that is one of this package's components, not
|
|
154
|
-
an element of yours. It needs CSS `@scope`: Chrome 118 and Safari 17.4 or newer, and a Firefox that ships it.
|
|
155
|
-
|
|
156
|
-
`scripts/scoped-css.mjs` is the transform; `src/styles/__tests__/componentsCss.browser.spec.ts`
|
|
157
|
-
draws every component family, the overlays open, under `scoped.css` beside a Tailwind build whose
|
|
158
|
-
theme disagrees on every shared name, and requires the same pixels as `style.css` alone.
|
|
147
|
+
Every element holding slot content you passed in also carries `data-eldra-slot` (a `Button`'s
|
|
148
|
+
label, a `Dialog`'s title, body and footer, a `Popover` panel…), whenever the slot has content and
|
|
149
|
+
never for a fallback, as a hook for your own CSS.
|
|
159
150
|
|
|
160
151
|
## Fonts
|
|
161
152
|
|
|
@@ -190,7 +181,7 @@ Every component supports all five of these; none hard-codes anything a store mig
|
|
|
190
181
|
| `AvatarGroup` | none — the overlap and stack order are plain Tailwind, no per-component variable |
|
|
191
182
|
| `Badge` | `--eldra-badge-line-height` (default `1`) — the badge text's line ratio, no token of its own |
|
|
192
183
|
| `Breadcrumb` | none — the collapse threshold reads `--container-tablet` (`Container`'s own 48rem gutter breakpoint), and the link/ellipsis boxes reuse `target-min`/`eldra-link-radius`/`radius-sm`, no per-component variable of its own |
|
|
193
|
-
| `Button` | `--eldra-button-radius` (default `var(--eldra-radius-md)`), `--eldra-button-line-height` (default `1.2`), `--eldra-button-font-size-lg` (default `1.0625rem`, the one button size with no type token of its own)
|
|
184
|
+
| `Button` | `--eldra-button-radius` (default `var(--eldra-radius-md)`), `--eldra-button-border-width` (default `1px`; the height stays the same, and an attached `ButtonGroup` overlaps by this width), `--eldra-button-line-height` (default `1.2`), `--eldra-button-font-size-lg` (default `1.0625rem`, the one button size with no type token of its own) |
|
|
194
185
|
| `ButtonGroup` | none — reads only the shared tokens from layer 1 |
|
|
195
186
|
| `Carousel` | `--eldra-carousel-per-view-base`/`-md`/`-lg` (bound as an inline style on the track by `carouselPerViewStyle`, resolved into `--eldra-carousel-per-view` per container-query breakpoint by the `eldra-carousel-track` utility, no default of its own — a slide with none set stays full width) and `--eldra-carousel-gap` (default `var(--eldra-space-4)`), both read by the `eldra-carousel-slide` utility's width formula; `--eldra-carousel-dot-size` (default `0.5rem`) and `--eldra-carousel-dot-ring` (default `1.5px`), read by `eldra-carousel-dot`; `--eldra-carousel-bleed` (default `0px`) — the inline gutter the track bleeds out to, as its own padding, the negative margin that cancels that padding and its scroll padding at once, each `max()`-ed with the focus ring's reach so a bleed never costs the ring the room the track reserves for it (set it per breakpoint through `classes.track`, never a `px-*`/`-mx-*`/`scroll-px-*` utility of your own — those replace the reservation on that axis instead of composing with it) |
|
|
196
187
|
| `Checkbox` | `--eldra-checkbox-radius` (default `var(--eldra-radius-sm)`), `--eldra-checkbox-border-width` (default `1.5px`), `--eldra-checkbox-border-width-invalid` (default `2px`) |
|
|
@@ -200,7 +191,7 @@ Every component supports all five of these; none hard-codes anything a store mig
|
|
|
200
191
|
| `Container` | none — the gutter widths (`--eldra-gutter-{mobile,tablet,desktop}`) are shared tokens, also read by `Section`; the three finite `width` values likewise read the shared `--eldra-container-{narrow,content,wide}` tokens directly, through `Container`'s own `eldra-container-{narrow,content,wide}` utilities rather than Tailwind's `max-w-narrow`/`-content`/`-wide` — see the Deviations entry below |
|
|
201
192
|
| `ContentCard` | `--eldra-content-card-title-size` (default `1.25rem`) and `--eldra-content-card-title-line` (default `1.3`) — the title's own size and line ratio, no token of its own; `--eldra-content-card-excerpt-size` (default `0.9375rem`) and `--eldra-content-card-excerpt-line` (default `1.5`) — the excerpt's own size and line ratio, shared by `FeatureCard`'s `body` (`text-content-card-excerpt` in `tailwind.css`), since both read the same spec number |
|
|
202
193
|
| `CurrencyInput` | `UnitInput`'s exactly (it renders a `UnitInput` with `isCurrency` always on) — see the `UnitInput` row |
|
|
203
|
-
| `Dialog` | `--eldra-dialog-title-size` (default `1.25rem`), `--eldra-dialog-title-line` (default `1.3`) — the title's own size/line, no token of its own; `--eldra-dialog-width` (default `32rem`), `--eldra-dialog-width-sm` (default `24rem`) — the panel's own width, always capped at `100vw - 2rem` inside the utility itself; `--eldra-dialog-max-height` (default `calc(100vh - 4rem)`); `--eldra-dialog-background` (default `var(--color-background)`), `--eldra-dialog-border` (default `var(--color-border)`), `--eldra-dialog-text` (default `var(--color-text)`, also the close button's hover and press tint), `--eldra-dialog-muted` (default `var(--color-muted)`, the description) and `--eldra-dialog-backdrop` (default `var(--color-overlay)`) — the chrome's own colours, read by the dialog's parts only, so setting them on the `<dialog>` (`
|
|
194
|
+
| `Dialog` | `--eldra-dialog-title-size` (default `1.25rem`), `--eldra-dialog-title-line` (default `1.3`) — the title's own size/line, no token of its own; `--eldra-dialog-width` (default `32rem`), `--eldra-dialog-width-sm` (default `24rem`) — the panel's own width, always capped at `100vw - 2rem` inside the utility itself; `--eldra-dialog-max-height` (default `calc(100vh - 4rem)`); `--eldra-dialog-background` (default `var(--color-background)`), `--eldra-dialog-border` (default `var(--color-border)`), `--eldra-dialog-text` (default `var(--color-text)`, also the close button's hover and press tint), `--eldra-dialog-muted` (default `var(--color-muted)`, the description) and `--eldra-dialog-backdrop` (default `var(--color-overlay)`) — the chrome's own colours, read by the dialog's parts only, so setting them on the `<dialog>` (`class`) recolours it without re-theming the slotted content the way redefining `--eldra-color-*` there would |
|
|
204
195
|
| `Drawer` | `--eldra-drawer-title-size` (default `1.25rem`), `--eldra-drawer-title-line` (default `1.3`) — the title's own size/line, no token of its own (the same numbers as `Dialog`'s, but its own variable pair); `--eldra-drawer-width` (default `28rem`) — the panel's own maximum width, capped at the viewport inside the utility itself, which also carries the full-screen-below-a-48rem-_viewport_ media query; `--eldra-drawer-header-height` (default `4rem`) — the header row's least height, with `--eldra-drawer-header-padding` (default `var(--eldra-space-4)`) — its top and bottom padding, `0px` to centre the row's content in exactly that height, such as a site header's; `--eldra-drawer-gutter` (default `1.5rem`) — the header's, body's and footer's side padding. The device's safe areas (`env(safe-area-inset-*)`) are added around both, so a full-screen drawer clears a notch and the home indicator on a page with `viewport-fit=cover` |
|
|
205
196
|
| `EditorPlaceholder` | `--eldra-editor-placeholder-border-width` (default `1.5px`) — the dashed boundary's width, distinct from `EmptyState`'s own stock `border` (1px) |
|
|
206
197
|
| `EmptyState` | `--eldra-empty-state-title-size` (default `1.25rem`) and `--eldra-empty-state-title-line` (default `1.3`) — the title's own size and line ratio, no token of its own |
|
|
@@ -231,7 +222,7 @@ Every component supports all five of these; none hard-codes anything a store mig
|
|
|
231
222
|
| `Section` | none — the vertical rhythm (`--eldra-section-{sm,md,lg}`) and the gutters it shares with `Container` are shared tokens |
|
|
232
223
|
| `Select` | `--eldra-select-panel-max-height` (default `20rem`), `--eldra-select-panel-max-width` (default `22rem`, clamped to `90vw`), `--eldra-z-popover` (default `30`), `--eldra-field-radius`, `--eldra-field-border-width`, `--eldra-select-group-tracking`, `--eldra-select-option-line`, `--eldra-select-swatch-edge`, the `--eldra-select-match-*` trio, and `--eldra-popover-origin` (`top left` / `bottom left`, set by the panel from the placement it resolved to); and the panel chrome's own colours, the `--eldra-select-panel-*` family `MultiSelect` and `SearchBar` read too: `--eldra-select-panel-background` (default `var(--color-background)`; the panel, `MultiSelect`'s footer and an unchosen option box), `--eldra-select-panel-border` (default `var(--color-border)`; the panel's edge, the search field's divider, group and create-row hairlines, the footer's top line), `--eldra-select-panel-text` (default `var(--color-text)` on the search field, the option and create rows; unset, the panel itself inherits its colour as before), `--eldra-select-panel-muted` (default `var(--color-muted)`; the search icon and placeholder, group headings, disabled rows, hints, untoned meta, the empty and loading rows, the footer count), `--eldra-select-panel-active` (default `var(--color-surface-strong)`; the active row's fill), `--eldra-select-panel-check` (the selected mark: default `var(--color-text)` for `Select`'s check, `var(--color-primary)` for `MultiSelect`'s filled box), `--eldra-select-panel-check-contrast` (default `var(--color-primary-contrast)`, `MultiSelect`'s tick) and `--eldra-select-panel-check-border` (default `var(--color-border-strong)`, an unchosen box's edge) — read by the panel's parts only, so setting them on `:root` or the teleport target recolours the panel without re-theming slotted option content the way redefining `--eldra-color-*` there would |
|
|
233
224
|
| `SiteForm` | none of its own: it composes `FormLayout`, `FieldWrapper`, `Input`, `Textarea`, `Select`, `Checkbox` and `Button`, each restyled through its own row; its `classes` reach their parts (see [Site forms](#site-forms)) |
|
|
234
|
-
| `Skeleton` |
|
|
225
|
+
| `Skeleton` | `--eldra-skeleton-line-height` (default `0.875rem`) and `--eldra-skeleton-line-gap` (default `0.3rem`, above and below) for `text` rows, `--eldra-skeleton-title-height` (default `1.5rem`), `--eldra-skeleton-box-height` (default `1rem`, an unsized `box`), `--eldra-skeleton-color` (default `surface-strong`, the shape's fill), `--eldra-skeleton-highlight` (default `background` at 60%, the glare) and `--eldra-skeleton-duration` (default `3s`, one sweep and its rest; the sweep is its first 60%); `width` still sets an inline style (see the Deviations entry) |
|
|
235
226
|
| `StockBadge` | `--eldra-stock-status-line` (default `1.4`) — the status line text's line ratio, no token of its own |
|
|
236
227
|
| `Switch` | `--eldra-switch-radius` (default `var(--eldra-radius-full)`), `--eldra-switch-track-border-width` (default `1.5px`), `--eldra-switch-thumb-offset` (default `0.1875rem`, the thumb's rest inset from the track's start edge) |
|
|
237
228
|
| `Tab` | none — reads only the shared tokens from layer 1, plus `VariantPicker`'s `text-variant-pill` type style (no per-component variable of its own; see that component's row) |
|
|
@@ -250,25 +241,23 @@ Every component supports all five of these; none hard-codes anything a store mig
|
|
|
250
241
|
fails the build if `src/componentNames.ts` gains a name this table has not. "None" means the
|
|
251
242
|
component reads only the shared tokens from layer 1 above, with no CSS variable of its own.
|
|
252
243
|
|
|
253
|
-
|
|
254
|
-
by the `eldra-field-invalid` utility on the
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
244
|
+
Four variables are **derived, not knobs**: `--eldra-focus-rest-width`, `-color` and `-forced`
|
|
245
|
+
are declared by the `eldra-field-invalid` utility on the control that carries the 2px error
|
|
246
|
+
boundary (`Input`, `UnitInput`, `Select`, `MultiSelect`, `Textarea`, `SearchBar`), from
|
|
247
|
+
`--eldra-field-border-width` and `--eldra-color-danger`, and `--eldra-focus-rest-offset` (0px)
|
|
248
|
+
is the resting band's offset on every control; the focus ring reads all four (see the
|
|
249
|
+
Deviations entries on the ring and the error line). They do not inherit. Set
|
|
250
|
+
`--eldra-field-border-width`, `--eldra-color-danger` and the ring's own `--eldra-focus-width` /
|
|
251
|
+
`--eldra-focus-offset` instead.
|
|
261
252
|
|
|
262
253
|
3. **A `classes` prop**, typed `Partial<Record<Part, string>>` where `Part` is the union of that
|
|
263
254
|
component's `data-part` names from the design spec's anatomy (`container`, `label`,
|
|
264
255
|
`leadingIcon`, `trailingIcon`, `spinner` for `Button`; see each component's exported
|
|
265
|
-
`<Name>Part` type and its Storybook docs page for the exact list).
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
`eldra-button-radius
|
|
269
|
-
|
|
270
|
-
same way, and a weight is never a conflict with a type style: `classes.label: 'font-bold'` keeps
|
|
271
|
-
`text-body-sm` and changes only the weight.
|
|
256
|
+
`<Name>Part` type and its Storybook docs page for the exact list). The outermost element has no
|
|
257
|
+
key: style it with `class`. A part's value is added to that part's own classes and wins by layer
|
|
258
|
+
(see "Overriding a component's classes"), so `class="rounded-full"` on a `Button` beats
|
|
259
|
+
`eldra-button-radius`, and `classes.label: 'font-bold'` keeps `text-body-sm` and changes only
|
|
260
|
+
the weight.
|
|
272
261
|
4. **A slot for every part that holds content** (`label`, `description`, `error`, `leading`,
|
|
273
262
|
`trailing`, `empty`, `header`, `footer`, `item`, …), named after the part it replaces.
|
|
274
263
|
5. **`as`**, on the components whose spec allows a different rendered _root_ element (`Button`,
|
|
@@ -663,7 +652,7 @@ spec's own non-negotiable 2):
|
|
|
663
652
|
tree, and `provide`/`inject` cannot connect two siblings, so the hand-off is a plain shared
|
|
664
653
|
reference both sides read and write, exactly the same reasoning `usePopover`'s `topLayerDialog()`
|
|
665
654
|
already uses to teleport a panel into a dialog it did not render;
|
|
666
|
-
- **initial focus** — `initialFocus`, else a reachable `[autofocus]` control, else the first focusable that is not `[data-part="close"]`
|
|
655
|
+
- **initial focus** — `initialFocus`, else a reachable `[autofocus]` control, else (with `focusFirstControl: false`, which `Dialog` sets, the dialog itself) the first focusable that is not `[data-part="close"]`
|
|
667
656
|
(this package's own "every part carries `data-part`" convention doubling as the composable's
|
|
668
657
|
exclusion rule, so any modal built on this contract needs no second constant to stay in sync),
|
|
669
658
|
else the close button itself, applied a tick after `showModal()` so slot content mounted alongside
|
|
@@ -1307,7 +1296,7 @@ aria-pressed>` that fills `primary`/`primary-contrast` when `selected`, the same
|
|
|
1307
1296
|
`remove`; `Enter`/`Space` toggle a selectable chip through the native `<button>`'s own behaviour,
|
|
1308
1297
|
with no separate keydown handler that could double-toggle. `icon` draws directly (Badge's own
|
|
1309
1298
|
reasoning: neither chip size's icon dimension or stroke is one of `Icon.vue`'s four); `avatar`
|
|
1310
|
-
draws through `Avatar` at the chip's own icon size via `
|
|
1299
|
+
draws through `Avatar` at the chip's own icon size via `class` — no built-in `Avatar` size
|
|
1311
1300
|
is small enough to sit inside either chip size, so it is drawn undersized rather than left at
|
|
1312
1301
|
`Avatar`'s own smallest, `sm`.
|
|
1313
1302
|
|
|
@@ -1505,7 +1494,7 @@ aria-pressed>` that fills `primary`/`primary-contrast` when `selected`, the same
|
|
|
1505
1494
|
order, and a modified key or a key typed into a field is left alone. `Enter`/`Space` stay the
|
|
1506
1495
|
button's own. Panels are never teleported:
|
|
1507
1496
|
a `dropdown` hangs under its own item, a `mega` panel spans the menu's root, and a site whose
|
|
1508
|
-
header should be the panel's width makes the root `static` (`
|
|
1497
|
+
header should be the panel's width makes the root `static` (`class`) and its header
|
|
1509
1498
|
`relative` (or `contents`, which makes the bar and the menu button cells of the header's own
|
|
1510
1499
|
grid). A closing panel fades out over `--eldra-duration-fast`, unclickable while it does.
|
|
1511
1500
|
`openOnHover` adds a resting mouse pointer to the ways of opening: a panel opens after the
|
|
@@ -1743,6 +1732,18 @@ children?, layout?, groups? }`, one level of children. Children sharing a `group
|
|
|
1743
1732
|
|
|
1744
1733
|
Additions and departures from the design spec, and why.
|
|
1745
1734
|
|
|
1735
|
+
- **Colour changes fade over `duration-base` with `ease-in-out`, not `duration-fast` `ease-out`**
|
|
1736
|
+
(operator decision, 2026-11-10). At 150ms on an ease-out curve a hover colour is 85% of the way
|
|
1737
|
+
there after 67ms and reads as a switch. `eldra-focus` and `eldra-focus-inset` now give colour,
|
|
1738
|
+
background, border and underline changes 200ms eased at both ends (`--eldra-ease-in-out`); the
|
|
1739
|
+
press scale and translate stay `duration-fast` `ease-out`, so a press still feels immediate.
|
|
1740
|
+
Elements with no focus utility that change colour on hover (card title links, a facet row, a
|
|
1741
|
+
radio card) carry `eldra-transition-colors`, the same timing. `Switch` keeps `duration-fast`, so
|
|
1742
|
+
its track fills in step with the thumb.
|
|
1743
|
+
- **A `Button` fits its content (`w-fit`)**, also as a flex-column or grid item, where it used to
|
|
1744
|
+
stretch to the full width. `block` is the full-width form; a `w-full` (or any width) in `class`
|
|
1745
|
+
wins over `w-fit` by layer.
|
|
1746
|
+
|
|
1746
1747
|
- **A `Select`/`MultiSelect` panel's search field draws no focus ring** (operator decision,
|
|
1747
1748
|
2026-11-09). The spec asks for the inset ring, but the field holds focus for as long as the panel
|
|
1748
1749
|
is open, so the ring framed it permanently and read as a stray border. The caret, the divider
|
|
@@ -1808,6 +1809,18 @@ Additions and departures from the design spec, and why.
|
|
|
1808
1809
|
— so `<Skeleton width="12rem" variant="title" />` still renders a 12rem-wide bar, just sized from
|
|
1809
1810
|
the root down rather than the shape up, and works inside a shrink-to-fit container the literal
|
|
1810
1811
|
reading would not fix.
|
|
1812
|
+
- **`Skeleton` has a sixth variant, `box`** (operator request, 2026-11-10), beside the spec's five
|
|
1813
|
+
shape primitives: one plain shape that is the component's root itself, with no lines inside, for
|
|
1814
|
+
a placeholder of any size (a chart, a table cell, a thumbnail). `width` and the new `height` prop
|
|
1815
|
+
set inline sizes, and classes on the component (`h-24`, `rounded-full`) size and round it
|
|
1816
|
+
directly; unsized it is `--eldra-skeleton-box-height` tall (default `1rem`) and full width.
|
|
1817
|
+
`classes.line` applies to it, as the one shape it draws.
|
|
1818
|
+
- **`Skeleton`'s shimmer sweeps for 1.8s of a 3s cycle, eased at both ends, then rests** (operator
|
|
1819
|
+
review, 2026-11-10). The spec's Behaviour & motion row asks for a 1.4s `ease-out` sweep, repeated
|
|
1820
|
+
back to back; in Storybook and Studio that lunged across the shape, slowed, and jumped straight
|
|
1821
|
+
back to the start, which read as fast and mechanical. The glare is also a soft band across the
|
|
1822
|
+
middle of the sweep rather than a wash the width of the shape. `--eldra-skeleton-duration` sets
|
|
1823
|
+
the cycle.
|
|
1811
1824
|
- **`Skeleton`'s `btn` variant takes `--eldra-control-height` (2.5rem), not the spec's literal
|
|
1812
1825
|
2.75rem.** The Sizes table gives `btn` a fixed `2.75rem` — the same figure as `target-touch`,
|
|
1813
1826
|
which `Button`'s own `md` size only grows to below a 48rem **container** (a container query this
|
|
@@ -1851,7 +1864,7 @@ aria-busy aria-label="Loading product"`, `ContentCard`'s loading root now matche
|
|
|
1851
1864
|
sibling selector) zeroes a `Section`'s own top padding whenever the **previous** sibling
|
|
1852
1865
|
`Section` shares its background, and wins over _any_ layered `pt-*`/`py-*` class regardless of
|
|
1853
1866
|
specificity or source order (CSS Cascade Layers) — not only `spacing`'s own default, but a
|
|
1854
|
-
consumer's `
|
|
1867
|
+
consumer's `class="pt-12"` too, since a class from any source still compiles into the
|
|
1855
1868
|
same layered `@layer utilities`. The escape hatch is one of the two things this rule does not
|
|
1856
1869
|
touch: give the two `Section`s different `background` values (the rule only fires on a match), or
|
|
1857
1870
|
reach for an unlayered override of your own (`!pt-12`, which Tailwind never puts in a layer).
|
|
@@ -1991,25 +2004,43 @@ aria-busy aria-label="Loading product"`, `ContentCard`'s loading root now matche
|
|
|
1991
2004
|
in sync and closing fades the ring back out over the transition `eldra-focus` already owns. The
|
|
1992
2005
|
`SearchBar` never needed it: its trigger is a text field, and text fields carry
|
|
1993
2006
|
`eldra-focus-always`.
|
|
1994
|
-
- **
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2007
|
+
- **A field's error line is the focus ring at rest, outside the border, not an inset line.** The
|
|
2008
|
+
spec's Error row reads "2px `danger` (1px border + 1px inset line)". The inset line was a
|
|
2009
|
+
pseudo-element on the field's root, inset by the border width; a browser snaps a border's width
|
|
2010
|
+
to whole device pixels but not that offset, so at 90%, 110% and 125% zoom a sliver of background
|
|
2011
|
+
showed between the two lines. Now the ring's own resting band (a `box-shadow` spread, see the
|
|
2012
|
+
next entry) is `danger`, as wide as the border, against its outer edge: both start from the one
|
|
2013
|
+
edge the border is drawn from, so they stay one 2px line at every zoom (checked in Chromium at
|
|
2014
|
+
90/100/110/125%). The boundary is 1px wider outward than the spec's. On focus the band travels out
|
|
2015
|
+
past the `focus-inner` infill to become the ring, the border reading 1px `danger` inside it.
|
|
2016
|
+
- **`Dialog` focuses itself when it opens, not its first control** (operator decision,
|
|
2017
|
+
2026-11-10). The shared modal rule focuses the first meaningful control from the keyboard; on a
|
|
2018
|
+
form dialog that put the caret in the first field, and leaving it ran that field's blur
|
|
2019
|
+
validation before the user had reached it. `Dialog` now focuses the `<dialog>` (which draws no
|
|
2020
|
+
ring), however it opened; `Tab` reaches the first control. Mark a field `autofocus` (or pass
|
|
2021
|
+
`initialFocus` to a `useDialog` of your own) to focus it instead. `Drawer`, `Lightbox` and
|
|
2022
|
+
`SearchModal` keep the shared rule.
|
|
2023
|
+
- **The focus ring moves out from the border as it fades in.** The design spec's Focus ring
|
|
2024
|
+
section says the ring and its infill "grow from 0 to 2px over `duration-base`". This package
|
|
2025
|
+
first shipped that as an animated `outline-width` and `box-shadow` spread and it read as a 1 fps
|
|
2026
|
+
stagger, then drew the ring at full size and faded only its opacity. The stagger was the outline:
|
|
2027
|
+
a browser draws an outline's width and offset only at whole device pixels (3 distinct frames
|
|
2028
|
+
across a 2px move at 2x in Chromium), while a `box-shadow` spread renders at any fraction (9 of 9).
|
|
2029
|
+
So the ring is two spreads off the border edge, both driven by the one animated
|
|
2030
|
+
`--eldra-focus-alpha`: at rest a 1px band against the border (transparent, or `danger` on an
|
|
2031
|
+
invalid field), on focus a 2px `focus-inner` infill with a 2px ring outside it, the band moving
|
|
2032
|
+
out and widening while its colour fades to `focus`. The end state, the thing every contrast
|
|
2033
|
+
requirement in the spec is about, is unchanged.
|
|
2004
2034
|
|
|
2005
2035
|
Mechanically: `--eldra-focus-alpha` is registered with `@property` (`syntax: '<number>'`) so the
|
|
2006
|
-
engine can interpolate it
|
|
2007
|
-
`color-mix(in srgb,
|
|
2008
|
-
keep it safe rather than clever — an engine without `color-mix` gets the whole ring at
|
|
2009
|
-
through an `@supports not` rule, an engine without `@property` switches the alpha 0 → 1 with
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
full size; only the
|
|
2036
|
+
engine can interpolate it; the spreads are `calc()`s of it and the colours
|
|
2037
|
+
`color-mix(in srgb, <resting colour>, <role> calc(var(--eldra-focus-alpha) * 100%))`. Two
|
|
2038
|
+
fallbacks keep it safe rather than clever — an engine without `color-mix` gets the whole ring at
|
|
2039
|
+
once through an `@supports not` rule, an engine without `@property` switches the alpha 0 → 1 with
|
|
2040
|
+
no motion, and forced-colours mode gets a static `outline` in the system `Highlight` colour (and
|
|
2041
|
+
a field's error line in `CanvasText`), because `box-shadow` is dropped there by the UA. In every
|
|
2042
|
+
one of those paths the ring is present at full size; only the motion is lost, which is exactly
|
|
2043
|
+
what `prefers-reduced-motion` asks for anyway.
|
|
2013
2044
|
|
|
2014
2045
|
- **`Button` `text-button-{sm,md,lg}` utilities, and the `lg` font size as a per-component
|
|
2015
2046
|
variable.** The spec's Sizes table gives `lg` a 1.0625rem font, between `body` (1rem) and
|
|
@@ -2212,8 +2243,7 @@ aria-busy aria-label="Loading product"`, `ContentCard`'s loading root now matche
|
|
|
2212
2243
|
numbers (1.5px, 2px in error) as the Checkbox box, so `eldra-checkbox-border`/`-invalid` are
|
|
2213
2244
|
shared rather than duplicated as `eldra-radio-*`. The **card** itself is a different element with
|
|
2214
2245
|
its own 1px number, so it gets `eldra-radio-card-border` of its own.
|
|
2215
|
-
- **A card's selected boundary is a real border plus an inset line
|
|
2216
|
-
`eldra-field-invalid` uses for a field's error state: the spec spells it out ("2px `primary` (1px
|
|
2246
|
+
- **A card's selected boundary is a real border plus an inset line**: the spec spells it out ("2px `primary` (1px
|
|
2217
2247
|
border + 1px inset line)"), so growing the real border to 2px — which would shift the card's
|
|
2218
2248
|
neighbours — is not what it asks for. `eldra-radio-card-selected` reads
|
|
2219
2249
|
`--eldra-radio-card-selected-color` so the same utility draws the `danger` version too, for a
|
|
@@ -2467,7 +2497,7 @@ aria-busy aria-label="Loading product"`, `ContentCard`'s loading root now matche
|
|
|
2467
2497
|
bare `/` and is `aria-hidden`, so the full sentence ("Press / to search") has nowhere to be
|
|
2468
2498
|
announced; it is the chip's tooltip, and the field carries `aria-keyshortcuts="/"`.
|
|
2469
2499
|
- **A row's active arrow is not animated.** The spec's Sizes table only says "visible only on the
|
|
2470
|
-
active row"; the package's own Motion conventions give hover/colour changes `duration-
|
|
2500
|
+
active row"; the package's own Motion conventions give hover/colour changes `duration-base`, and
|
|
2471
2501
|
other components carry their own `transition-*` for a similarly momentary reveal (Link's arrow,
|
|
2472
2502
|
Switch's thumb and track) — but here `itemArrow` is a plain `v-if="isActive(row)"`, so the arrow
|
|
2473
2503
|
appears and disappears with the row's active state, not a fade. Nothing in the spec's own text
|
|
@@ -2635,7 +2665,7 @@ aria-busy aria-label="Loading product"`, `ContentCard`'s loading root now matche
|
|
|
2635
2665
|
- **`rounded`** (`'none' | 'lg' | 'xl'`, default `'none'`) forwards straight to `Image`'s own
|
|
2636
2666
|
`rounded` prop.
|
|
2637
2667
|
- **`fill`** (`boolean`, default `false`) is for a background image that has to cover its
|
|
2638
|
-
positioned ancestor: `ratio="auto"` plus `absolute inset-0 h-full w-full` on
|
|
2668
|
+
positioned ancestor: `ratio="auto"` plus `absolute inset-0 h-full w-full` on the root (`class`) and
|
|
2639
2669
|
`h-full w-full` on `classes.frame`, so the frame's height comes from the ancestor via the
|
|
2640
2670
|
`inset-0`/`h-full` chain instead of needing `media.width`/`height` (which this wrapper never
|
|
2641
2671
|
has). Used by the hero block's `image-background` variant.
|
|
@@ -2686,7 +2716,7 @@ more"` — has no comma before "and". Icelandic's own pattern already has no suc
|
|
|
2686
2716
|
cell's own box. Linked, the box (and the `eldra-focus` ring — 2.5.8 needs the _target_ itself at
|
|
2687
2717
|
least 4rem tall, not just a gutter around it) moves to the `<a>`/`as` cell, and the outer `<li>`
|
|
2688
2718
|
is bare — no class list, no `data-part`, nothing `classes` can reach, because it carries nothing
|
|
2689
|
-
visual to restyle. `
|
|
2719
|
+
visual to restyle. `class` always reaches the one element that is actually the cell,
|
|
2690
2720
|
whichever tag that turns out to be.
|
|
2691
2721
|
- **No `external` prop; whether the hidden link context appears is judged from `href` itself.**
|
|
2692
2722
|
`LogoItemProps` (the API contract) has no `external` boolean the way `LinkProps` does, but the spec's
|
|
@@ -3567,7 +3597,7 @@ flex items-center target-min` frame `linkClass` gives its sibling, so a non-wrap
|
|
|
3567
3597
|
(`eldra-search-modal-width`/`-max-height`/`-position`), the same technique `eldra-drawer-width`
|
|
3568
3598
|
already documents**, rather than one utility or a class-level arbitrary value — width, max-height
|
|
3569
3599
|
and position are three different CSS properties a consumer can restyle independently through
|
|
3570
|
-
`
|
|
3600
|
+
`class`, but each one's own desktop number and its full-screen override must travel
|
|
3571
3601
|
together, the same reasoning `eldra-drawer-width` gives for its own single bundled rule.
|
|
3572
3602
|
- **The radius/border/shadow removed below 48rem is plain `max-md:rounded-none`/`border-0`/
|
|
3573
3603
|
`shadow-none` on the root, not a fourth bundled utility.** Unlike the three geometry numbers
|
|
@@ -3589,7 +3619,7 @@ flex items-center target-min` frame `linkClass` gives its sibling, so a non-wrap
|
|
|
3589
3619
|
(2026-09-27). The component used to build interpolated arbitrary-property classes
|
|
3590
3620
|
(`` `[--eldra-carousel-per-view:${n}]` ``, plus `@tablet:`/`@content:` steps), and Tailwind has no
|
|
3591
3621
|
runtime: it scans source _text_ for class names, and an interpolated value is never in that text.
|
|
3592
|
-
A consumer's build (
|
|
3622
|
+
A consumer's build (which then compiled the components from `dist/*.js`; they ship prebuilt now)
|
|
3593
3623
|
therefore emitted no rule for any of the three, `eldra-carousel-slide`'s width formula fell back
|
|
3594
3624
|
to its own `1`, and every carousel rendered one full-width slide — the starter's testimonials,
|
|
3595
3625
|
product row, `split-carousel` hero and `carousel` gallery all at once. The package's own Storybook
|
|
@@ -3608,16 +3638,6 @@ flex items-center target-min` frame `linkClass` gives its sibling, so a non-wrap
|
|
|
3608
3638
|
rather than a throw. Before this (fixed 2026-09-27) the ref was cast straight to `HTMLElement`,
|
|
3609
3639
|
which reached a component's `focus` only when that component happened to expose one and did
|
|
3610
3640
|
nothing at all otherwise: the guarantee was silently the consumer's, not the package's.
|
|
3611
|
-
- **A `classes` part given an array is flattened, and warned about once per component and part in
|
|
3612
|
-
dev.** `classes` is one class string per part, and TypeScript says so — but a JavaScript consumer,
|
|
3613
|
-
a `v-bind` of an untyped object and a value out of JSON all reach `partClass` anyway, and
|
|
3614
|
-
`Object.entries(['flex', 'gap-4'])` reads an array's _indices_, so an array used to render
|
|
3615
|
-
`class="0 1"`: two classes that style nothing, in place of the two that were written. `cx` now
|
|
3616
|
-
flattens one the way Vue's own `:class` array syntax does, and `partClass` names the component and
|
|
3617
|
-
the part in a single dev `console.warn` (`import.meta.env.DEV`, so production carries neither the
|
|
3618
|
-
message nor the check). The component name comes from `getCurrentInstance()`, which is set while a
|
|
3619
|
-
component renders — where every `classes` computed is first evaluated — so no call site had to
|
|
3620
|
-
change.
|
|
3621
3641
|
- **`formatDate` takes an `Intl.DateTimeFormatOptions` subset as a third argument**
|
|
3622
3642
|
(`FormatDateOptions`: `day`, `month`, `year`, `weekday`), with every omitted key keeping the
|
|
3623
3643
|
spec's own `12 Sep 2026` default rather than dropping that part from the output — so
|