@uni-design-system/uni-core 8.0.0 → 8.2.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.
- package/CHANGELOG.md +714 -0
- package/dist/cjs/index.cjs +62 -6
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +62 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/types/concepts/component/component.types.d.ts +1 -1
- package/dist/types/concepts/component/component.types.d.ts.map +1 -1
- package/dist/types/concepts/theme/theme.model.d.ts +2 -1
- package/dist/types/concepts/theme/theme.model.d.ts.map +1 -1
- package/dist/types/concepts/theme/themes/base.theme.d.ts +16 -2
- package/dist/types/concepts/theme/themes/base.theme.d.ts.map +1 -1
- package/package.json +3 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,714 @@
|
|
|
1
|
+
# @uni-design-system/uni-core
|
|
2
|
+
|
|
3
|
+
## 8.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`57a8c4c`](https://github.com/uni-design-system/uni/commit/57a8c4c73c852a6b14c2e2916cad9bd0a1566787) Thanks [@gaenglish](https://github.com/gaenglish)! - `createTheme` accepts a sparse `typography` override, deep-merged over the base type scale — restate only the roles (or the individual `TextStyle` fields within a role) that change, and add product-specific roles under any name. Closes the gap where a derived theme (e.g. the Carbon experiment) had to spread `typography` over the created theme by hand.
|
|
8
|
+
|
|
9
|
+
- [`57a8c4c`](https://github.com/uni-design-system/uni/commit/57a8c4c73c852a6b14c2e2916cad9bd0a1566787) Thanks [@gaenglish](https://github.com/gaenglish)! - Input options: `typeFace` → `typeface`, matching the tooltip/button/tabs casing. The base theme now writes `typeface`, and the input box reads the new key with the old one as a deprecated fallback, so themes that still set `typeFace` render unchanged. The `typeFace` key is deprecated and will be removed in the next major.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`e706e38`](https://github.com/uni-design-system/uni/commit/e706e3887f47d8821cc1652410ad37a43d52a428) Thanks [@gaenglish](https://github.com/gaenglish)! - Ship `CHANGELOG.md` in the published packages. The release notes existed only in the repo; an installed package carried no record of what changed, so upgrade questions couldn't be answered from `node_modules`. uni-angular copies it into the ng-packagr `dist` via `assets`; the rest add it to `files`.
|
|
14
|
+
|
|
15
|
+
## 8.1.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- [`71bc74c`](https://github.com/uni-design-system/uni/commit/71bc74c0441d4170dc38312967610eac46788326) Thanks [@gaenglish](https://github.com/gaenglish)! - Calendar, date & time entry: `uni-calendar`, `uni-date-input`, `uni-time-input` and `uni-date-time-input`, plus a pure datetime helper layer in the cdk.
|
|
20
|
+
|
|
21
|
+
The most-requested form control family anywhere, built native-platform-first with zero runtime dependencies: `Intl` does all formatting and parsing (no date library), the popup rides the native popover top layer with CSS anchor positioning, and every day in the grid is a real `<button>`.
|
|
22
|
+
- **Values are plain ISO strings, never `Date`s** — `UniDate` (`'YYYY-MM-DD'`), `UniTime` (`'HH:mm'`, always 24-hour), `UniDateTime` (`'YYYY-MM-DDTHH:mm'`), `UniDateRange` (`{ start, end }`). A `Date` is a timestamp with a timezone problem; a calendar date is a label on a wall calendar. Strings are timezone-free, JSON-serializable and sortable with `<`, and `[value]="'2026-08-20'"` is a complete, correct binding.
|
|
23
|
+
- **`uni-calendar`** is an inline month grid and a form control in its own right: single and range modes in one component (the value shape switches with `mode`), availability **markers** with screen-reader labels, `minDate`/`maxDate` fences, `disabledDates` as a list or predicate, and a two-way `month` model so an app can drive "jump to June". One tab stop with a roving-tabindex `role="grid"`; the full APG keyboard map (arrows, week `Home`/`End`, `PageUp`/`PageDown` with `Shift` for years) crosses month edges, skips disabled days directionally, and stops at fences without wrapping. Range selection paints a live preview band, swaps a backwards commit instead of erroring, and narrates every step through a `role="status"` region.
|
|
24
|
+
- **`uni-date-input`** is free-typed date entry — no input mask (masks fight paste, IMEs and screen-reader echo). The parser accepts ISO, locale-numeric text with the digit order read from `Intl.DateTimeFormat(locale).formatToParts()`, and the locale's own month names; a missing year resolves to the next occurrence and two-digit years are refused rather than guessed. Unreadable, fenced or unavailable text **stays in the field**, flagged, with a `rejected` event. The popup is the same `uni-calendar`, hosted in a `role="dialog"` popover via the shared `uni-dropdown`; `↑`/`↓` on a committed value step ±1 day.
|
|
25
|
+
- **`uni-time-input`** is a combobox over time slots — byte-for-byte the search-input/tag-input listbox contract via the CDK's `ListboxNavigation`. `9` → 09:00, `930` → 09:30, `3p` → 15:00, and a bare `3` leans PM in a 12-hour field (the bias yields when `minTime`/`maxTime` say otherwise). `slots` pins the choices for scheduling, refusing a typed `5pm` as `'unavailable'`; `↑`/`↓` on a committed value step ±`minuteStep`.
|
|
26
|
+
- **`uni-date-time-input`** seats both parts in one `uni-input-box` chrome under one `role="group"` label, emitting one combined value only when both parts are set. `slotsFor` is the scheduling flow in one attribute: the time part stays disabled until a day is chosen, then offers exactly that day's slots, and changing the day clears a slot that no longer exists. The parts gained an `embedded` input so the composer renders one shared box instead of nested chrome.
|
|
27
|
+
- **cdk `datetime` module** (public export): the string-math and `Intl` layer — `addDays`/`addMonths`/`buildMonthGrid`/`parseDateText`/`parseTimeText`/`timeSlots`/`localeWeekStart` and friends — pure functions, unit-tested hard, usable by apps directly.
|
|
28
|
+
- **uni-core**: `'calendar'`, `'dateInput'`, `'timeInput'`, `'dateTimeInput'` join `ComponentName` with base-theme entries (day geometry per size token, `dayBorderRadius: 'xxs'` for the square look, toggle glyphs, popup/list chrome). Selection, range and today colours are deliberately not options — they are the `primary` role pair, so themes restyle them by restyling the palette.
|
|
29
|
+
- **Naming note:** the fences are `minDate`/`maxDate`/`minTime`/`maxTime`/`minDateTime`/`maxDateTime` rather than the platform's `min`/`max`, because Signal Forms' `FormUiControl` reserves `min`/`max` as numeric signals on form controls.
|
|
30
|
+
|
|
31
|
+
- [`1a6b382`](https://github.com/uni-design-system/uni/commit/1a6b38273e5c6daaea6355e1ba8cf01d7e851100) Thanks [@gaenglish](https://github.com/gaenglish)! - Themable focus chrome: a shared `focusRing` primitive for every control, plus `focusBorder`/`focusShadow`/`focusColor` options for input boxes.
|
|
32
|
+
|
|
33
|
+
**Shared focus ring.** A theme can now restyle the keyboard-focus indicator across the whole library by defining `focusRing` **border** and/or **shadow** primitives: `ThemeService.focusRing()` (and the new selector-less `focusRingStyle()`) replaces its default 2px outline with that border — drawn as an outline hugging the control — plus the ring shadow. A `focusRing` **thickness** primitive sets the ring's outline offset (negative values overlay the control's resting border, reading as a border-color change). Checkbox, radio, toggle and slider now route their hand-rolled focus styles through the shared helper (calendar days and tag chips already did), so one primitive trio gives every control the same focus language. Themes without the primitives render exactly as before.
|
|
34
|
+
|
|
35
|
+
**uni-core:** `Thicknesses` is now an open record like `Borders`/`Shadows` (extra named primitives allowed), and `createTheme` accepts a sparse `thicknesses` override merged over the base scale.
|
|
36
|
+
|
|
37
|
+
**Also in this release:**
|
|
38
|
+
- Radio and toggle scope their transitions (border/background/transform) instead of `all`, so the focus ring's outline and shadow apply instantly — `transition: all` interpolated the outline from a stale color, flashing a dark ring before the themed ring color landed.
|
|
39
|
+
- The radio's dot grow/retract animation is a token — `radio.options.transitionSpeed` (seconds, default 0.3 preserving the current feel; 0 switches instantly).
|
|
40
|
+
- The checkbox focus ring rounds proportionally again (box radius plus its gap) and the gap itself is a new `checkbox.options.focusRingGap` option; a `focusRingStyle` call's explicit gap wins over the theme's `focusRing` thickness, then the branch defaults.
|
|
41
|
+
|
|
42
|
+
The `input` component options could previously restyle focus only through `focusOutline`/`focusOutlineOffset`. The new optional trio mirrors the error-state trio (`errorBorder`/`errorShadow`/`errorColor`) and applies while any projected control has focus: `focusBorder` swaps the border primitive, `focusShadow` draws a ring (e.g. a soft `0 0 0 3px` spread), and `focusColor` swaps the background. All three default to `undefined`, so existing themes render exactly as before, and they yield to the error state so a flagged field stays visibly flagged while being corrected.
|
|
43
|
+
|
|
44
|
+
The Wellsourced showcase theme now defines the `focusRing` pair for its app's `.search-input:focus` look — an ochre (`secondary`) 1px border with a 10% ring of the same hue, tinted per palette in light and dark — so text fields (which rest on a canvas tint and snap to the clean surface on focus), checkboxes, radios, toggles, sliders, calendar days and tag chips all share one focus treatment.
|
|
45
|
+
|
|
46
|
+
## 8.0.0
|
|
47
|
+
|
|
48
|
+
### Minor Changes
|
|
49
|
+
|
|
50
|
+
- [`3279186`](https://github.com/uni-design-system/uni/commit/3279186e2cee806056cfb446699ab108d30fb608) Thanks [@gaenglish](https://github.com/gaenglish)! - Menu items no longer look preselected when opened with the mouse
|
|
51
|
+
|
|
52
|
+
Opening a `uni-menu` by click left the first item highlighted before the
|
|
53
|
+
pointer had touched it, reading as a preselected default. Two correct
|
|
54
|
+
behaviours combined badly: `onOpened()` implements ARIA roving focus by calling
|
|
55
|
+
`.focus()` on an item every open, and the item styles deliberately painted
|
|
56
|
+
`:focus` the same as `:hover`. Nothing was wrong with the focus itself — only
|
|
57
|
+
with painting it after a pointer open.
|
|
58
|
+
- **The highlight now keys on `:focus-visible`.** Programmatic focus following a
|
|
59
|
+
click doesn't match it, while keyboard-driven focus does — so mouse users get
|
|
60
|
+
no phantom highlight, and keyboard users keep the focus cursor. Roving-focus
|
|
61
|
+
bookkeeping is untouched: a mouse open still moves focus to the first item, so
|
|
62
|
+
screen readers announce it exactly as before.
|
|
63
|
+
- **New `HOVER_OR_KEYBOARD_FOCUS` constant exported from uni-core**, holding
|
|
64
|
+
that selector. Emotion merges styles by _exact selector text_, so a component's
|
|
65
|
+
base rule and any theme variant restyling it have to agree character for
|
|
66
|
+
character — a variant keyed `'&:hover, &:focus'` would both fail to override
|
|
67
|
+
and reintroduce the phantom highlight. Naming the selector once removes the
|
|
68
|
+
trap; the base theme's `menuItem.warn` tone and the Carbon/Wellsourced
|
|
69
|
+
showcase themes now use it.
|
|
70
|
+
|
|
71
|
+
Themes with their own `menuItem` variants should key the highlight with
|
|
72
|
+
`HOVER_OR_KEYBOARD_FOCUS`. Note that `:focus-visible` is a browser heuristic:
|
|
73
|
+
after a user has been navigating by keyboard, a subsequent click may still show
|
|
74
|
+
the highlight, which is the intended "this person is using the keyboard"
|
|
75
|
+
behaviour rather than a regression.
|
|
76
|
+
|
|
77
|
+
- [`de83fe4`](https://github.com/uni-design-system/uni/commit/de83fe497a2f48569a7c49eea2e7ca640d931254) Thanks [@gaenglish](https://github.com/gaenglish)! - New `uni-tag-input`, plus a shared listbox contract in the CDK
|
|
78
|
+
|
|
79
|
+
The type-to-add chip field — recipients, filters, labels. It is the **open-set**
|
|
80
|
+
control: anything typed can become a token, whether or not it matches a
|
|
81
|
+
suggestion. Closed-set picking stays with `uni-select` /
|
|
82
|
+
`uni-multi-select-dropdown`, which is the deliberate split — the two look alike
|
|
83
|
+
but differ on the one thing that decides the value type, so a single component
|
|
84
|
+
would force one of them to carry an API it can never use.
|
|
85
|
+
- **`FormValueControl<UniTagItem[]>`.** `{ value: 'a@b.com' }` is a complete
|
|
86
|
+
item; `label`, `avatarSrc`, `invalid` and `disabled` are optional enrichment.
|
|
87
|
+
- **Invalid entries stay in the value, flagged**, rather than being dropped — a
|
|
88
|
+
field that silently swallows a typo'd address is worse than one that shows it
|
|
89
|
+
in red, and Enter on the chip lifts it back into the input to fix. Duplicates
|
|
90
|
+
and over-`max` entries are refused through `(rejected)` with a reason.
|
|
91
|
+
- **Full keyboard contract**: separators commit, Tab commits without trapping,
|
|
92
|
+
Backspace on an empty field _focuses_ the last chip rather than deleting it
|
|
93
|
+
blind, and on a chip Backspace and Delete both remove but move focus in
|
|
94
|
+
opposite directions — what makes pruning a list feel right.
|
|
95
|
+
- **The whole field is one tab stop.** Chips carry `tabindex="-1"`, so Tab never
|
|
96
|
+
walks through eight recipients to reach the next control.
|
|
97
|
+
- **Announces through a `role="status"` live region** on every add, remove and
|
|
98
|
+
rejection; the removal route is described once per field rather than by every
|
|
99
|
+
chip.
|
|
100
|
+
- **`preset="email"`** wires an address validator, a paste parser that unwraps
|
|
101
|
+
`Name <a@b.com>` and keeps an unterminated tail in the field, and Space as a
|
|
102
|
+
separator.
|
|
103
|
+
- **`'tagInput'` joins core's `ComponentName`** with a theme entry for the chip
|
|
104
|
+
field's own tokens. Field chrome is not duplicated — it comes from `input` via
|
|
105
|
+
`uni-input-box`, so a tag input restyles with every other field.
|
|
106
|
+
|
|
107
|
+
**Also in this release**
|
|
108
|
+
- **`ListboxNavigation` in the CDK** (`createListboxNavigation`) owns the
|
|
109
|
+
combobox bookkeeping every type-ahead control needs: open state, active
|
|
110
|
+
option, wrap-around arithmetic, Home/End, and `aria-activedescendant` wiring
|
|
111
|
+
that can never point at an option a narrowing filter has removed.
|
|
112
|
+
`uni-search-input` now uses it — behaviour unchanged, and it gains Home/End
|
|
113
|
+
for free — and the multi-select combobox upgrade will too. Three hand-rolled
|
|
114
|
+
copies of one keyboard contract is how they drift.
|
|
115
|
+
- **`uni-tag` gains `controlTabIndex`**, so a composite that owns its own roving
|
|
116
|
+
focus can take its chips out of the tab order, and **`selected` is now
|
|
117
|
+
optional**: an interactive chip carries `aria-pressed` only when it is
|
|
118
|
+
genuinely a toggle. Announcing "not pressed" on a recipient chip is worse than
|
|
119
|
+
announcing nothing.
|
|
120
|
+
|
|
121
|
+
- [`760b761`](https://github.com/uni-design-system/uni/commit/760b761ad77533e7e01f7a56731f74e470bbd948) Thanks [@gaenglish](https://github.com/gaenglish)! - `uni-tag` v2: themable, opt-in removal, two style axes
|
|
122
|
+
|
|
123
|
+
v1 was a single hardcoded look with the palette welded into its template, an
|
|
124
|
+
unconditional remove button, and no theme entry — a filter chip, a status pill
|
|
125
|
+
and a recipient token all rendered identically. v2 makes the chip a real themed
|
|
126
|
+
component and the building block `uni-tag-input` composes.
|
|
127
|
+
|
|
128
|
+
**Breaking (uni-angular)**
|
|
129
|
+
- **`(close)` is now `(removed)`.** The old name shadowed the native `close`
|
|
130
|
+
event and needed an eslint suppression to compile.
|
|
131
|
+
- **The remove button is opt-in** — set `[removable]="true"`. Previously every
|
|
132
|
+
tag, including a plain category label, shipped a "Remove …" button into the
|
|
133
|
+
accessibility tree.
|
|
134
|
+
- Codemod: rename `(close)` → `(removed)` and add `[removable]="true"` wherever
|
|
135
|
+
a `(close)` handler exists.
|
|
136
|
+
|
|
137
|
+
**Fixed**
|
|
138
|
+
- **A falsy value can now be removed.** `handleClose` guarded with `if (v)`, so
|
|
139
|
+
a tag keyed `''` or `0` silently could not be dismissed. Every defined value
|
|
140
|
+
emits, and a tag with no value emits `undefined`.
|
|
141
|
+
- The remove control now sizes from the chip instead of the icon-button's own
|
|
142
|
+
`sm` size — it was 22px inside a 24px chip, and taller than an `sm` chip
|
|
143
|
+
entirely.
|
|
144
|
+
|
|
145
|
+
**New**
|
|
146
|
+
- **Two orthogonal style axes**: `variant` picks the colour role, `tone` picks
|
|
147
|
+
the archetype (`soft` / `solid` / `outline`). Both resolve from the new `tag`
|
|
148
|
+
theme entry, with tones as nested `&.tone-*` selectors inside each variant so
|
|
149
|
+
a theme author restyles both axes in one place.
|
|
150
|
+
- **`'tag'` joins core's `ComponentName`**, with a `TagTone` type and a full
|
|
151
|
+
theme entry (`options` for radius/typeface/gap/symbols, `variants` per colour
|
|
152
|
+
role, `sizes` carrying geometry only).
|
|
153
|
+
- **`interactive`** turns the chip body into a `<button>` with `selected` mapped
|
|
154
|
+
to `aria-pressed`, keeping the remove control a sibling — nesting them would
|
|
155
|
+
be invalid HTML and would strand the inner control for keyboard users.
|
|
156
|
+
- **Lead slot**: `avatarSrc`, `avatarName` (initials fallback), `iconName`,
|
|
157
|
+
`symbolName` and `dot` convenience inputs, plus a `[tag-lead]` slot for
|
|
158
|
+
anything richer. Lead elements size from the chip height, and all are
|
|
159
|
+
`aria-hidden` so the chip's text stays its accessible name.
|
|
160
|
+
- **Glyphs are theme icon primitives, not Material ligatures.** The remove and
|
|
161
|
+
selected affordances resolve through the new `removeIcon` / `selectedIcon`
|
|
162
|
+
theme options (defaulting to the built-in `close` and `check`), so they mask
|
|
163
|
+
`currentColor`, recolour with the chip's tone, and can be swapped per theme.
|
|
164
|
+
They also contribute no text to the DOM, which a ligature does — one less way
|
|
165
|
+
for an accessible name to be polluted. `symbolName` remains as the escape
|
|
166
|
+
hatch for glyphs the theme's icon set doesn't carry.
|
|
167
|
+
- **`invalid`** sets `aria-invalid` and a dashed underline, so the state does
|
|
168
|
+
not rely on colour alone (WCAG 1.4.1); `disabled`, `maxWidth` truncation with
|
|
169
|
+
a `title`, and `removeLabel` for overriding the remove button's name.
|
|
170
|
+
- The component ships with 21 specs, having previously had none.
|
|
171
|
+
|
|
172
|
+
- [`6a4c7da`](https://github.com/uni-design-system/uni/commit/6a4c7da4c7c3f5758d8c66d1be714319c983e39e) Thanks [@gaenglish](https://github.com/gaenglish)! - Theme validation contract: `parseTheme` / `assertTheme` / `isUniTheme`
|
|
173
|
+
|
|
174
|
+
Every theme scale is `Partial<Record<…>>`, so a malformed theme — hand
|
|
175
|
+
written, generated, or fetched as JSON — rendered as silent `undefined` CSS
|
|
176
|
+
with no diagnosis. Core now ships a **dependency-free** structural validator
|
|
177
|
+
(core stays zero-dep; no zod outside the MCP):
|
|
178
|
+
- **`parseTheme(input): ThemeParseResult`** collects every issue rather than
|
|
179
|
+
failing fast: `{ success, theme?, issues: [{ path, message }] }` with dotted
|
|
180
|
+
paths like `colors.primary` or `typography.label.fontSize`. Acceptance /
|
|
181
|
+
rejection **with reasons** is the API.
|
|
182
|
+
- **`assertTheme(input)`** throws with all reasons; **`isUniTheme`** is the
|
|
183
|
+
type-guard form; **`formatThemeIssues`** renders issues for logs.
|
|
184
|
+
- The contract requires what components can't render without: 16
|
|
185
|
+
`REQUIRED_COLOR_TOKENS`, all 22 canonical `REQUIRED_TEXT_ROLES` (with
|
|
186
|
+
`fontFamily`/`fontSize`/`lineHeight`), the spacing/radii/shadow/thickness
|
|
187
|
+
scale keys, and recursively-valid component style expressions. All
|
|
188
|
+
`REQUIRED_*` sets are exported for tooling (MCP, docs, registries). Themes
|
|
189
|
+
remain free to add arbitrary named primitives on every scale.
|
|
190
|
+
- Because a `UniTheme` is plain serializable data, the same contract
|
|
191
|
+
validates JSON round-trips — the foundation for theme distribution and
|
|
192
|
+
runtime theme registries (ROADMAP Track 1).
|
|
193
|
+
|
|
194
|
+
- [`5414517`](https://github.com/uni-design-system/uni/commit/5414517d52d17943a4730752ab5d90c304c37062) Thanks [@gaenglish](https://github.com/gaenglish)! - A wire format for themes: `hydrateTheme` / `dehydrateTheme`
|
|
195
|
+
|
|
196
|
+
A `UniTheme` is plain serializable data, which makes JSON the natural transport
|
|
197
|
+
for distributing themes — but a serialized theme is ~50 KB and **~71% of that is
|
|
198
|
+
the 61 built-in icon data URIs that every uni-core consumer already ships**.
|
|
199
|
+
- **`dehydrateTheme(theme)`** returns the wire form: icons identical to
|
|
200
|
+
`BaseIcons` are dropped, genuine overrides kept. A theme goes from ~50 KB to
|
|
201
|
+
~14 KB, and still passes `parseTheme`.
|
|
202
|
+
- **`hydrateTheme(theme)`** restores the built-in set on the way in, applying
|
|
203
|
+
the same `{...BaseIcons, ...icons}` contract `createTheme` applies at
|
|
204
|
+
construction — the theme's own icons win, built-ins fill the rest.
|
|
205
|
+
- **`generateUniThemes` now returns the `ContrastReport`** alongside the
|
|
206
|
+
light/dark pair, so a caller can generate registration-ready themes and their
|
|
207
|
+
WCAG audit in one call instead of falling back to `emitThemeFile` (which
|
|
208
|
+
returns TypeScript source) just to see the report.
|
|
209
|
+
- **`summarizeContrast(report)`** is extracted and exported, so the generated
|
|
210
|
+
theme file's header and every other consumer word the audit identically.
|
|
211
|
+
|
|
212
|
+
## 7.3.0
|
|
213
|
+
|
|
214
|
+
### Minor Changes
|
|
215
|
+
|
|
216
|
+
- [`c828982`](https://github.com/uni-design-system/uni/commit/c828982442e5bdc1d6884551160bbceac8ecf8f7) Thanks [@gaenglish](https://github.com/gaenglish)! - `expand` gains a themable, size-aware speed
|
|
217
|
+
|
|
218
|
+
The reveal/collapse duration was hardcoded at 350ms, so a consumer wanting a
|
|
219
|
+
snappier disclosure — or wanting adjacent styling to fade on the same clock —
|
|
220
|
+
had nothing to reference. A fixed duration also reads differently at different
|
|
221
|
+
sizes: sluggish on a two-line region, rushed on a full-page one.
|
|
222
|
+
- **New `transitionSpeed` option in the `expand` theme options** (seconds,
|
|
223
|
+
default `0.35`, matching alert/card `transitionSpeed`) sets the base
|
|
224
|
+
duration. `'expand'` joins core's `ComponentName` union, so custom and
|
|
225
|
+
derived themes can type an `expand` entry.
|
|
226
|
+
- **Duration scales with content height.** The actual duration is
|
|
227
|
+
`transitionSpeed × √(height ÷ 240px)`, clamped to ~0.15–0.6s at the default
|
|
228
|
+
speed (the envelope scales proportionally with a themed speed), so perceived
|
|
229
|
+
speed stays steady across region sizes. The curve and its constants
|
|
230
|
+
(`expandDuration`, `EXPAND_DEFAULT_SPEED`, `EXPAND_MIN_DURATION`,
|
|
231
|
+
`EXPAND_MAX_DURATION`, `EXPAND_REFERENCE_HEIGHT`) are exported from
|
|
232
|
+
uni-core.
|
|
233
|
+
- **New per-instance `transitionSpeed` input** sets an exact duration for one
|
|
234
|
+
region, bypassing the scaling: `<uni-expand [transitionSpeed]="0.15">`.
|
|
235
|
+
- **The resolved duration is exposed as the public `duration` signal** on
|
|
236
|
+
`uni-expand`, so adjacent styling can move on the reveal's clock with a
|
|
237
|
+
plain binding — `[style.transition-duration]="expand.duration() + 's'"` —
|
|
238
|
+
keeping all timing in the theme/signal pipeline, with no custom CSS.
|
|
239
|
+
- **`expand-toggle` gains a matching `transitionSpeed` input** and otherwise
|
|
240
|
+
follows the theme token instead of its own hardcoded 350ms. Expand Area
|
|
241
|
+
binds the region's resolved `duration` to its toggle, keeping chevron and
|
|
242
|
+
reveal on one clock even when size-scaled or overridden.
|
|
243
|
+
- **Speed is theme-reactive**: swapping themes at runtime retimes regions and
|
|
244
|
+
chevrons live.
|
|
245
|
+
- **Enter/leave easing is now `ease-in-out`** (was `ease-in`), matching the
|
|
246
|
+
chevron rotation so trigger and region decelerate together.
|
|
247
|
+
- **`UniExpandOptions` is exported** from uni-angular for
|
|
248
|
+
`getComponentOptions<UniExpandOptions>('expand')` consumers.
|
|
249
|
+
|
|
250
|
+
- [`6e8b429`](https://github.com/uni-design-system/uni/commit/6e8b4297190ce6974114d7fc6c52e37866902633) Thanks [@gaenglish](https://github.com/gaenglish)! - Menus join the theme model: `menu` + `menuItem` component options, item tones, and dividers
|
|
251
|
+
|
|
252
|
+
The menu was the only composite component with no theme surface of its own —
|
|
253
|
+
panel chrome came from the shared `dropdown` entry and every item-level knob
|
|
254
|
+
(height 38, `primary-container` hover, `check` active symbol, `label` type
|
|
255
|
+
role) was hardcoded. Every Uni menu therefore looked identical, and the gaps a
|
|
256
|
+
real product hits first (a red Delete, a separator before it, disabled rows)
|
|
257
|
+
were only reachable via `::ng-deep`.
|
|
258
|
+
- **New `menu` theme options** (`'menu'` joins core's `ComponentName` union):
|
|
259
|
+
`minWidth`, panel `color`/`border`/`borderRadius`/`shadow` (each falling
|
|
260
|
+
back to the `dropdown` options when unset, so menus follow generic popovers
|
|
261
|
+
until a theme deliberately splits them), `paddingVertical`/
|
|
262
|
+
`paddingHorizontal` (panel inset — `xs` inset plus item `borderRadius`
|
|
263
|
+
yields the "hover pill" look; `none` yields full-bleed rows), and
|
|
264
|
+
`dividerBorder`/`dividerSpacing` for separators.
|
|
265
|
+
- **New `menuItem` theme options + variants** (`'menuItem'` joins
|
|
266
|
+
`ComponentName`): `height`, `paddingHorizontal`, `gap`, `borderRadius`,
|
|
267
|
+
`typeface`, `textColor`, `hoverColor`, `activeSymbol` (undefined removes the
|
|
268
|
+
trailing check), and `transitionSpeed`. Theme `variants` on `menuItem` carry
|
|
269
|
+
tones — the base theme ships a `warn` tone for destructive actions.
|
|
270
|
+
- **`MenuItem` grows `variant`, `disabled`, and `{ divider: true }`.**
|
|
271
|
+
`variant: 'warn'` routes through the theme's `menuItem` variants; `disabled`
|
|
272
|
+
items render in the disabled color, carry `aria-disabled`, and are skipped
|
|
273
|
+
by keyboard navigation; dividers render as `role="separator"` rules styled
|
|
274
|
+
by the `menu` options. `isDivider` and the `UniMenuOptions`/
|
|
275
|
+
`UniMenuItemOptions` interfaces are exported from uni-angular.
|
|
276
|
+
- **`uni-dropdown` panel chrome is now input-overridable**
|
|
277
|
+
(`border`/`borderRadius`/`shadow`/`color`), falling back to the `dropdown`
|
|
278
|
+
theme options — this is the mechanism `uni-menu` uses; other consumers are
|
|
279
|
+
unchanged.
|
|
280
|
+
- **Default-rendering change:** menus now have `minWidth: 184` from the base
|
|
281
|
+
theme (previously they sized to the widest item). All other defaults
|
|
282
|
+
reproduce the previous look, including the 0.35s hover transition.
|
|
283
|
+
- **The Carbon experiment themes gain menu styling** (sharp full-bleed 40px
|
|
284
|
+
rows, IBM Plex, `$layer-hover`, red danger option, ~110ms motion) with a new
|
|
285
|
+
Carbon Menu story demonstrating that the same component renders both
|
|
286
|
+
aesthetics untouched.
|
|
287
|
+
|
|
288
|
+
## 7.2.0
|
|
289
|
+
|
|
290
|
+
### Minor Changes
|
|
291
|
+
|
|
292
|
+
- [`e72ec94`](https://github.com/uni-design-system/uni/commit/e72ec9410bb12d677c9c9102ccaf3e5bf4e8790e) Thanks [@gaenglish](https://github.com/gaenglish)! - Add `funnel` and `building` icons
|
|
293
|
+
|
|
294
|
+
Two gaps found while migrating a real app off inline SVG — both cases where the
|
|
295
|
+
existing set forced the app to keep hand-drawn artwork.
|
|
296
|
+
- **`funnel`** (`filter_alt`) — `filter` is `filter_list`, the stacked-lines
|
|
297
|
+
metaphor. Apps that name the feature itself a funnel ("Funnel Analytics") draw
|
|
298
|
+
the shape, and substituting stacked lines loses the reference.
|
|
299
|
+
- **`building`** (`apartment`) — pairs with `home` for residential-vs-commercial
|
|
300
|
+
distinctions, which had no built-in counterpart.
|
|
301
|
+
|
|
302
|
+
Both are Material Symbols Outlined 300 on the shared `0 -960 960 960` grid, so
|
|
303
|
+
the set is now 61 icons. Note `building` carries more internal detail than most
|
|
304
|
+
of the set; it reads well from ~14px but goes muddy below ~12px, so prefer a
|
|
305
|
+
larger size or `home`'s simpler silhouette in very small badges.
|
|
306
|
+
|
|
307
|
+
## 7.1.0
|
|
308
|
+
|
|
309
|
+
### Minor Changes
|
|
310
|
+
|
|
311
|
+
- [`c2421c0`](https://github.com/uni-design-system/uni/commit/c2421c04d01f36d74b489613d22997553f256d4f) Thanks [@gaenglish](https://github.com/gaenglish)! - Expand `BaseIcons` to 59 icons and add `uni-icon` sizing
|
|
312
|
+
|
|
313
|
+
The 34-icon set shipped in 7.0.0 covered the library's own components but not a
|
|
314
|
+
real application — an app migrating off inline `<svg>` (or off `uni-symbol`, in
|
|
315
|
+
Angular) ran out of names almost immediately. Everything here is additive; all
|
|
316
|
+
34 existing names are unchanged.
|
|
317
|
+
- **25 new icons**, same Material Symbols Outlined 300 source and the same
|
|
318
|
+
`0 -960 960 960` grid as the rest of the set: navigation (`link`, `expand`,
|
|
319
|
+
`gridView`, `listView`), actions (`moreHorizontal`, `copy`, `send`,
|
|
320
|
+
`refresh`, `dragHandle`, `qrCode`), feedback (`star`, `verified`) and
|
|
321
|
+
user/system (`group`, `shieldPerson`, `clock`, `mail`, `chat`, `image`,
|
|
322
|
+
`document`, `payment`, `bank`, `trendingUp`, `extension`, `webhook`,
|
|
323
|
+
`logout`).
|
|
324
|
+
- `moreHorizontal` ships alongside `more` because that one is `more_vert` and
|
|
325
|
+
row-aligned menus need the horizontal kebab.
|
|
326
|
+
- `star` is separate from `favorite`, which is the heart.
|
|
327
|
+
- **`uni-icon` gains an optional `size` input** (`CssLength` — bare numbers are
|
|
328
|
+
px, strings pass through, so `20` and `'1.25rem'` both work). Left unset,
|
|
329
|
+
behaviour is unchanged: the icon fills its container, which is what lets a
|
|
330
|
+
themed control size its own glyph through padding. Set, it applies
|
|
331
|
+
width/height as inline styles, so an explicit size wins over the
|
|
332
|
+
fill-the-container rule regardless of style injection order. This removes the
|
|
333
|
+
per-call-site `width`/`height` CSS rule that replacing an inline `<svg>` with
|
|
334
|
+
`<uni-icon>` would otherwise need.
|
|
335
|
+
- The MCP `create-icon-tokens` tool now lists the built-in icon names above the
|
|
336
|
+
token map it returns. Apps routinely hand-draw their own `close`, `check` or
|
|
337
|
+
`plus`; encoding those into theme tokens works but adds redundant artwork on a
|
|
338
|
+
foreign grid when the theme already ships the glyph. The tool cannot recognise
|
|
339
|
+
a shape, so it hands the caller the list to check against before adding
|
|
340
|
+
anything.
|
|
341
|
+
|
|
342
|
+
## 7.0.0
|
|
343
|
+
|
|
344
|
+
### Major Changes
|
|
345
|
+
|
|
346
|
+
- [`f7727aa`](https://github.com/uni-design-system/uni/commit/f7727aa8895bd67f285ba4830858f994490bb7f7) Thanks [@gaenglish](https://github.com/gaenglish)! - Replace `BaseIcons` with a normalized 34-icon Material Symbols set
|
|
347
|
+
|
|
348
|
+
The built-in icon set was 11 glyphs drawn from four different grids
|
|
349
|
+
(`0 0 24 24`, `0 0 50 50`, `0 0 64 64`, `0 -960 960 960`), so `checkCircle` and
|
|
350
|
+
`xCircle` rendered as solid filled discs next to a hairline `alertCircle` and an
|
|
351
|
+
oversized `close` — three optical weights in one set.
|
|
352
|
+
- `BaseIcons` is now Material Symbols Outlined at weight 300, every glyph on a
|
|
353
|
+
single `0 -960 960 960` grid, grouped by intent: navigation (`menu`,
|
|
354
|
+
`chevronUp/Down/Left/Right`, `arrowLeft/Right`, `home`, `externalLink`),
|
|
355
|
+
actions (`search`, `close`, `plus`, `minus`, `more`, `delete`, `edit`,
|
|
356
|
+
`download`, `upload`, `share`, `filter`), feedback (`check`, `checkCircle`,
|
|
357
|
+
`xCircle`, `alertCircle`, `info`, `warning`, `lock`) and user/system
|
|
358
|
+
(`profile`, `settings`, `notification`, `favorite`, `help`, `calendar`).
|
|
359
|
+
- All 11 previously shipped names are preserved, so existing `<uni-icon>` call
|
|
360
|
+
sites and theme overrides keep working. Their **appearance changes**: the
|
|
361
|
+
filled `checkCircle`/`xCircle` are now outlined, and the set reads lighter
|
|
362
|
+
overall. `spinner` is carried over verbatim, keyframes intact.
|
|
363
|
+
- New `IconName` and `BaseIconName` types. `IconName` is
|
|
364
|
+
`BaseIconName | (string & {})`, so built-ins autocomplete and typos surface
|
|
365
|
+
while themes can still register arbitrary names via `createTheme({ icons })`.
|
|
366
|
+
`uni-icon`'s `name` input is typed with it instead of `keyof Icons`.
|
|
367
|
+
- **Breaking**: removes the unused `IconToken`, `IconStyle`, `ToggleableIcon`
|
|
368
|
+
and `IconConfig` exports. Nothing in the library referenced them and
|
|
369
|
+
`IconToken`'s 60-name union contradicted the actual `BaseIcons` keys. Use
|
|
370
|
+
`IconName` instead.
|
|
371
|
+
- New exported `svgToIconUri(svg, options?)` — the supported way to bring your
|
|
372
|
+
own icons (a brand set, a designer handoff) into a theme. It normalizes the
|
|
373
|
+
source (drops the xml declaration, comments and fixed `width`/`height` so the
|
|
374
|
+
mask scales), percent-encodes it, and **rejects artwork that cannot survive
|
|
375
|
+
masking**: no `viewBox`, an embedded raster `<image>`, an external reference,
|
|
376
|
+
a gradient/pattern fill, or more than one paint color. That last one is the
|
|
377
|
+
trap worth naming — masks use the alpha channel, so a multi-color logo
|
|
378
|
+
flattens to a silhouette in `currentColor`; pass `{ allowMultiColor: true }`
|
|
379
|
+
when that is intended. `createTheme({ icons })` merges the result over
|
|
380
|
+
`BaseIcons` per name, so a built-in name reskins and a new name is added.
|
|
381
|
+
- New MCP tool `create-icon-tokens`, the agent-facing front end to
|
|
382
|
+
`svgToIconUri`: hand it a project's inline `<svg>` (or a brand set) and it
|
|
383
|
+
returns a paste-ready `icons` map for `uni-theme.ts`. It encodes via the same
|
|
384
|
+
helper, so tokens are byte-identical to the built-in set, and adds the
|
|
385
|
+
set-level checks a per-icon helper cannot make — which names override
|
|
386
|
+
built-ins, and whether the artwork mixes viewBox grids. Bad artwork is
|
|
387
|
+
reported per icon rather than failing the batch, and re-running is safe
|
|
388
|
+
(already-encoded URIs pass through). The server instructions now point agents
|
|
389
|
+
at it whenever they encounter inline SVG.
|
|
390
|
+
- `BaseIcons` is generated by `scripts/generate-icons.mjs` (`pnpm icons:generate`),
|
|
391
|
+
which fetches from the canonical Material Symbols source and validates every
|
|
392
|
+
glyph before writing — a malformed path, an off-grid viewBox or geometry
|
|
393
|
+
outside the grid aborts the run. `pnpm icons:check` verifies the committed
|
|
394
|
+
file without writing. Add or change icons in that script's manifest and
|
|
395
|
+
regenerate; the file is not hand-edited. `icon.records.spec.ts` asserts the
|
|
396
|
+
same invariants against the committed output.
|
|
397
|
+
|
|
398
|
+
## 6.1.0
|
|
399
|
+
|
|
400
|
+
### Minor Changes
|
|
401
|
+
|
|
402
|
+
- [`28323ec`](https://github.com/uni-design-system/uni/commit/28323eca4ff239953de6dee9c34d34704627171e) Thanks [@gaenglish](https://github.com/gaenglish)! - TextStyle now accepts CSS length strings, not just px numbers
|
|
403
|
+
- `fontSize`, `lineHeight`, `letterSpacing`, `textIndent`, and `wordSpacing` on
|
|
404
|
+
`TextStyle` are widened from `number` to the new exported `CssLength`
|
|
405
|
+
(`number | string`). Bare numbers still mean px, matching Emotion's own
|
|
406
|
+
convention; strings pass through verbatim, so any unit the CSS engine accepts
|
|
407
|
+
works — `'1.2rem'`, `'2em'`, `'clamp(1rem, 2vw, 1.5rem)'`, unitless
|
|
408
|
+
line-height multipliers like `'1.5'`, etc.
|
|
409
|
+
- `toTypeface` no longer blindly appends `px`: numbers are converted, strings
|
|
410
|
+
are passed through untouched. Existing numeric themes are unaffected.
|
|
411
|
+
|
|
412
|
+
## 6.0.1
|
|
413
|
+
|
|
414
|
+
## 6.0.0
|
|
415
|
+
|
|
416
|
+
### Minor Changes
|
|
417
|
+
|
|
418
|
+
- [`5a6fc60`](https://github.com/uni-design-system/uni/commit/5a6fc601952e0cbda80810a1c9062588c675d89f) Thanks [@gaenglish](https://github.com/gaenglish)! - Search input stripped back and made generic; debounce input dressed in the shared chrome
|
|
419
|
+
- **`uni-debounce-input`** now wears the themed input chrome via `uni-input-box`
|
|
420
|
+
(color, border, typeface, focus ring) and gains `label` (accessible name),
|
|
421
|
+
`placeholder`, `disabled`, `pre-input`/`post-input` attribute slots for adornments,
|
|
422
|
+
ARIA passthroughs (`role`, `ariaExpanded`, `ariaControls`, `ariaActivedescendant`)
|
|
423
|
+
for composite widgets, and `clear()`/`focus()` methods. Debounce behavior unchanged.
|
|
424
|
+
- **`uni-search-input` redesigned**: the opinionated solid-primary pill bar with the
|
|
425
|
+
embedded `title-large` label is gone. It's now a standard themed field — decorative
|
|
426
|
+
leading magnifier, clear button while a query exists (refocusing on clear), Enter
|
|
427
|
+
emits `search`, Escape closes/clears.
|
|
428
|
+
- **Type-ahead added**: pass `suggestions` (refresh from `change`) and the field
|
|
429
|
+
becomes an ARIA combobox — keyboard-navigable listbox (ArrowUp/Down, Enter selects,
|
|
430
|
+
emitting `suggestionSelected` + `search`), `aria-activedescendant` wiring, focus-out
|
|
431
|
+
closing. New `searchInput` theme options: `searchSymbol`, `clearSymbol`, suggestion
|
|
432
|
+
list `listColor`/`listShadow`/`listBorderRadius`, `maxSuggestions`.
|
|
433
|
+
- Visual breaking change for SearchInput consumers (deliberate strip-back); code API
|
|
434
|
+
is compatible (`label`/`width`/`change`/`search` retained; `label` is now the
|
|
435
|
+
accessible name + placeholder fallback rather than displayed text).
|
|
436
|
+
|
|
437
|
+
- [`8953d59`](https://github.com/uni-design-system/uni/commit/8953d59aa5f5eed57801534c7cbf5ff05453c316) Thanks [@gaenglish](https://github.com/gaenglish)! - Checkbox, radio, and toggle conform to theme tokens
|
|
438
|
+
- The last hardcoded control colors (`#FFF`, `#ccc`, `#d0d0d0`, `#e0e0e0`,
|
|
439
|
+
`rgba(0,0,0,0.2)`) are gone. Chrome now resolves from new option tokens —
|
|
440
|
+
checkbox `boxColor: 'surface'`; radio `ringColor: 'outline'` / `fillColor:
|
|
441
|
+
'surface'` (radio gains a theme entry for the first time); toggle `trackColor:
|
|
442
|
+
'surface-variant'` / `knobColor: 'surface'` — so all three finally render
|
|
443
|
+
correctly on dark and brand themes.
|
|
444
|
+
- The checkbox's check/dash strokes wear the variant's paired on-color
|
|
445
|
+
(`on-primary`, `on-warn`, …) instead of assuming white; disabled states use the
|
|
446
|
+
`disabled`/`on-disabled` tokens; the toggle knob's shadow is the theme's
|
|
447
|
+
brand-tinted `raised` stack, and its hover uses the button convention's
|
|
448
|
+
brightness filter instead of a fixed grey.
|
|
449
|
+
|
|
450
|
+
- [`7a6da4f`](https://github.com/uni-design-system/uni/commit/7a6da4f60979795f10e85493d1d13543f6a5a0e1) Thanks [@gaenglish](https://github.com/gaenglish)! - New `uni-stat` KPI tile
|
|
451
|
+
- Muted label + large headline value (numbers auto-compact via
|
|
452
|
+
`Intl.NumberFormat`: `48234` → "48.2K") set in a new `stat` type-scale role
|
|
453
|
+
(32px semibold, proportional figures).
|
|
454
|
+
- Optional signed `delta` whose ink is decided by direction × `upIsGood` — churn
|
|
455
|
+
going down reads green, tickets going up reads red — with the arrow glyph
|
|
456
|
+
accompanied by screen-reader "up"/"down" text so state never rides color alone;
|
|
457
|
+
`caption` names the comparison period.
|
|
458
|
+
- Optional decorative 12-point sparkline (`trend` input): stroke in the outline hue,
|
|
459
|
+
endpoint dotted in the accent, `aria-hidden`.
|
|
460
|
+
- Fully token-driven via `stat.options`: card-recipe frame (`color`/`border`/
|
|
461
|
+
`borderRadius`), `labelTypeface`/`valueTypeface`, `positiveColor`/`negativeColor`
|
|
462
|
+
(the semantic inks, AA-guaranteed on surface), `trendColor`/`trendAccent`, spacing.
|
|
463
|
+
|
|
464
|
+
- [`fea0b2e`](https://github.com/uni-design-system/uni/commit/fea0b2e78da327f3acea144958af2d0dbbefb699) Thanks [@gaenglish](https://github.com/gaenglish)! - Fix invisible icons; icons become first-class theme primitives
|
|
465
|
+
- **Bug**: `uni-icon` resolves icons from `theme.icons`, but every theme shipped
|
|
466
|
+
`icons: {}` — the icon record was never wired in, so all icons (dialog close, button
|
|
467
|
+
spinner, search/clear affordances) rendered nothing.
|
|
468
|
+
- **Fix + pattern**: the default icon set now lives in core (`BaseIcons`, in
|
|
469
|
+
`concepts/iconography`) and `createTheme` merges a theme's `icons` over it — themes
|
|
470
|
+
can override or add icons under any name (inline SVG data URIs, masked with
|
|
471
|
+
`currentColor` so they recolor with the theme). The angular `icons` record re-exports
|
|
472
|
+
`BaseIcons` (deprecated).
|
|
473
|
+
- `uni-icon` also sets the standard `mask-image` (was webkit-only, so icons were
|
|
474
|
+
invisible in Firefox regardless) and renders nothing for unknown names instead of a
|
|
475
|
+
broken `url("undefined")`.
|
|
476
|
+
- The emitted `uni-theme.ts` gains an editable `icons` section, and the MCP's
|
|
477
|
+
`generate-uni-theme` guidance instructs agents: never inline SVG in components —
|
|
478
|
+
define an icon once in the theme's `icons` map and render it via `<uni-icon>`.
|
|
479
|
+
|
|
480
|
+
## 5.2.0
|
|
481
|
+
|
|
482
|
+
### Minor Changes
|
|
483
|
+
|
|
484
|
+
- [`1f5ee1d`](https://github.com/uni-design-system/uni/commit/1f5ee1dce290aceceec628677fdc9e36b5c5031f) Thanks [@gaenglish](https://github.com/gaenglish)! - New `uni-avatar` and `uni-avatar-group` components
|
|
485
|
+
- Graceful fallback chain: image → initials derived from `name` (first + last) →
|
|
486
|
+
themed symbol. Accessible by default: `role="img"` + `aria-label` from the name,
|
|
487
|
+
`aria-hidden` when purely decorative.
|
|
488
|
+
- Fully token-driven: variants color from the role's `*-container` tokens, sizes from
|
|
489
|
+
the theme's `avatar` size records, corner radius from `options.borderRadius`
|
|
490
|
+
(`max` = circles; a `sharp` theme gets square avatars), initials typeface from
|
|
491
|
+
`options.typeface`, fallback symbol from `options.fallbackSymbol`.
|
|
492
|
+
- `uni-avatar-group` stacks avatars with a token-driven overlap (spacing token) and
|
|
493
|
+
separator ring (`ringColor`/`ringWidth` options); `max` collapses the overflow into
|
|
494
|
+
a themed "+N" chip that is itself a `uni-avatar` (verbatim `text` input).
|
|
495
|
+
|
|
496
|
+
- [`dca84b1`](https://github.com/uni-design-system/uni/commit/dca84b1f5a49d56608bac098c26b0e90992ed49d) Thanks [@gaenglish](https://github.com/gaenglish)! - New `uni-breadcrumb` component
|
|
497
|
+
- WAI-ARIA breadcrumb: labelled `nav` landmark wrapping an ordered list, the last item
|
|
498
|
+
marked `aria-current="page"`, separators decorative (`aria-hidden`).
|
|
499
|
+
- Data-driven `items` (root first). Items with `href` render as real anchors; without
|
|
500
|
+
one they render as link-styled buttons emitting `itemClicked` for SPA routing.
|
|
501
|
+
- Token-driven via `breadcrumb.options`: `typeface`, link `color`, `currentColor`,
|
|
502
|
+
`separatorSymbol` (material symbol), and `gap` spacing.
|
|
503
|
+
|
|
504
|
+
- [`7844dde`](https://github.com/uni-design-system/uni/commit/7844ddec88f40027dafcaed5192f88d3c0cec54f) Thanks [@gaenglish](https://github.com/gaenglish)! - Button corner rounding and typography conform to component-options tokens
|
|
505
|
+
- `button` and `iconButton` themes gain `options: { borderRadius: 'max' }`; the hardcoded
|
|
506
|
+
per-size pixel radii (11/13/18/24) and the icon button's inline `borderRadius: 999` are
|
|
507
|
+
removed. Components resolve the token through `theme.radius()`, so the theme's radii
|
|
508
|
+
scale — shape languages (`sharp` → square, `playful` → pill) and custom radii
|
|
509
|
+
primitives — now restyles buttons like every other tokened component.
|
|
510
|
+
- Back-compat: the options radius is applied before theme `sizes`/`fixed` styles, so
|
|
511
|
+
hand-authored themes that still set a size-level `borderRadius` keep winning; icon
|
|
512
|
+
buttons fall back to the legacy circle when a theme predates iconButton options.
|
|
513
|
+
- `button` themes also gain `options: { typeface: 'button' }`: the hardcoded
|
|
514
|
+
`fontFamily: 'Euphemia'` (a font no theme loads) is removed from `fixed` and the sizes;
|
|
515
|
+
labels now render the type scale's `button` role (Red Hat Display, medium, capitalize),
|
|
516
|
+
with per-size `fontSize` still applied by `sizes`. Point the token at any typography
|
|
517
|
+
role — including custom ones — to restyle every button label.
|
|
518
|
+
- New `UniButtonOptions` interface (`borderRadius`, `typeface`) exported from the button
|
|
519
|
+
model.
|
|
520
|
+
|
|
521
|
+
- [`7844dde`](https://github.com/uni-design-system/uni/commit/7844ddec88f40027dafcaed5192f88d3c0cec54f) Thanks [@gaenglish](https://github.com/gaenglish)! - Card frame conforms to token primitives
|
|
522
|
+
- The card theme's hardcoded frame (`borderStyle`/`borderWidth`/`borderRadius: '8px'` in
|
|
523
|
+
`fixed`, `borderColor` per variant) is replaced by tokens: the card resolves its border
|
|
524
|
+
from the **border primitive named by its variant** (`borders.primary` …
|
|
525
|
+
`borders.success`), its corner radius from the radii scale (`options.borderRadius:
|
|
526
|
+
'xs'` — same 8px by default), and an optional `options.elevation` shadow token.
|
|
527
|
+
- `UniCardOptions` gains `border` (pin every card to one primitive — including a custom
|
|
528
|
+
one — instead of variant-following) and documents the existing `borderRadius`/
|
|
529
|
+
`elevation`; redefining a border primitive in a theme now restyles cards and every
|
|
530
|
+
other component sharing that token.
|
|
531
|
+
- Token styles apply under the merged theme style, so hand-authored themes that still
|
|
532
|
+
set card `fixed`/`variants` frame styles keep winning. No visual change for default
|
|
533
|
+
themes — this is pure tokenization.
|
|
534
|
+
|
|
535
|
+
- [`17cf662`](https://github.com/uni-design-system/uni/commit/17cf6621dd78e4af0c8af3575f6a5d103d9fca53) Thanks [@gaenglish](https://github.com/gaenglish)! - New `uni-drawer` and `uni-app-bar` — the dashboard shell
|
|
536
|
+
- **`uni-drawer`** has two modes sharing one content slot: `side` renders an in-flow
|
|
537
|
+
`<aside>` that pushes content (width-animated open/close, divider border primitive at
|
|
538
|
+
its edge, `aria-hidden` while closed); `over` renders a native `<dialog>` in the top
|
|
539
|
+
layer — focus trap, Escape, and scrim backdrop come from the platform, sliding in
|
|
540
|
+
from `position` (`start`/`end`). `open` is a two-way `model()`; Escape and backdrop
|
|
541
|
+
clicks keep it in sync. Tokens: `drawer.options` (`color`, `width`, `divider`,
|
|
542
|
+
`elevation`, `padding`, `backdrop`).
|
|
543
|
+
- **`uni-app-bar`**: leading/trailing content projection slots around a `title` (or
|
|
544
|
+
custom center content), trailing pushed to the far edge; optional `sticky`. Tokens:
|
|
545
|
+
`appBar.options` (`color`, `height`, `divider`, `typeface`, `padding`, `gap`,
|
|
546
|
+
optional `elevation`).
|
|
547
|
+
- The Drawer "DashboardShell" story documents the composition recipe: app bar with a
|
|
548
|
+
menu toggle + side drawer + content.
|
|
549
|
+
|
|
550
|
+
- [`7844dde`](https://github.com/uni-design-system/uni/commit/7844ddec88f40027dafcaed5192f88d3c0cec54f) Thanks [@gaenglish](https://github.com/gaenglish)! - Progress gauge derives from the palette instead of hardcoded pastels
|
|
551
|
+
|
|
552
|
+
The gauge's track colors were fixed pastel hexes (`#b3d4ea`, `#b3e7c2`, …) that ignored
|
|
553
|
+
the active theme entirely — secondary and success even shared the same green. Tracks now
|
|
554
|
+
use the role's `*-container` token (the palette's soft tint of that role) and arcs the
|
|
555
|
+
role base, so gauges follow any brand palette, in both light and dark modes.
|
|
556
|
+
|
|
557
|
+
- [`4ccf18b`](https://github.com/uni-design-system/uni/commit/4ccf18ba86dc81c344597c7bc3e46f5d92f3c232) Thanks [@gaenglish](https://github.com/gaenglish)! - New `uni-skeleton` loading placeholder
|
|
558
|
+
- Three shapes: `text` (multi-line, ending on a short line like real copy), `rect`,
|
|
559
|
+
and `circle`; explicit `width`/`height` accept CSS strings or px numbers.
|
|
560
|
+
- Painted with surface tokens (`skeleton.options`: `color`, `highlightColor`,
|
|
561
|
+
`borderRadius`, `gap`) so placeholders sit naturally on light and dark themes; the
|
|
562
|
+
shimmer sweep (`animation`/`duration` options) only runs when the user allows motion
|
|
563
|
+
and degrades to static blocks under `prefers-reduced-motion`.
|
|
564
|
+
- `aria-hidden` — placeholders are invisible to assistive tech by design.
|
|
565
|
+
|
|
566
|
+
- [`5d9062a`](https://github.com/uni-design-system/uni/commit/5d9062ac36f782f2ebbc7012367121b0b86baf9c) Thanks [@gaenglish](https://github.com/gaenglish)! - New `uni-slider` component — clears the declared-but-unbuilt `ComponentName` entry
|
|
567
|
+
- Native `<input type="range">` under the hood: platform keyboard interaction
|
|
568
|
+
(arrows, Home/End, Page Up/Down) and ARIA slider semantics for free; Signal Forms
|
|
569
|
+
contract (`FormValueControl<number>`) matching Input/Textarea.
|
|
570
|
+
- `min`/`max`/`step` inputs (fractional steps supported), required accessible `label`.
|
|
571
|
+
- Token-driven via `slider.options`: fill/thumb `color`, `trackColor`, `borderRadius`,
|
|
572
|
+
and geometry (`trackHeight`, `thumbSize`). The fill level rides a CSS custom
|
|
573
|
+
property, so dragging never regenerates Emotion styles; Firefox uses the native
|
|
574
|
+
`::-moz-range-progress`, WebKit a gradient stop.
|
|
575
|
+
|
|
576
|
+
- [`15a8f73`](https://github.com/uni-design-system/uni/commit/15a8f731f70bcd84211b7ff16b9272a2c6f2adc8) Thanks [@gaenglish](https://github.com/gaenglish)! - New `uni-tabs` / `uni-tab` components
|
|
577
|
+
- Full WAI-ARIA tabs pattern: `tablist`/`tab`/`tabpanel` roles with wired
|
|
578
|
+
`aria-selected`/`aria-controls`/`aria-labelledby`, roving tabindex, automatic
|
|
579
|
+
activation on ArrowLeft/ArrowRight (wrapping, disabled tabs skipped), Home/End,
|
|
580
|
+
and motion-safe transitions.
|
|
581
|
+
- `selectedIndex` is a two-way `model()`; selection snaps to the nearest enabled tab.
|
|
582
|
+
Panel content is captured per-tab and only the selected panel is instantiated.
|
|
583
|
+
- Every visual knob is a theme option token (`tabs.options`): `typeface`, `textColor`,
|
|
584
|
+
`activeTextColor`, `indicatorColor`, `indicatorThickness` (thickness token),
|
|
585
|
+
`divider` (border primitive), `gap`/`padding` (spacing tokens), `borderRadius`, and
|
|
586
|
+
optional `activeColor` — the defaults render underline tabs; `borderRadius: 'max'` +
|
|
587
|
+
`activeColor` turns them into segmented pills with no component changes.
|
|
588
|
+
|
|
589
|
+
- [`b04b97b`](https://github.com/uni-design-system/uni/commit/b04b97bd109e36cbb8fcda31c73680d85509ab0a) Thanks [@gaenglish](https://github.com/gaenglish)! - New `uni-textarea` component
|
|
590
|
+
- Multi-line text field with the same Signal Forms contract as `uni-input`
|
|
591
|
+
(`FormValueControl<string>`: `value` model, `disabled`/`invalid`/`dirty`/`required`,
|
|
592
|
+
touched-aware error styling, `aria-*` wiring).
|
|
593
|
+
- Reuses `uni-input-box` for its chrome, so it inherits the input's themed color,
|
|
594
|
+
border, typeface, focus outline, and disabled treatment automatically; the box's
|
|
595
|
+
field selectors now cover `textarea` (with auto height and vertical padding), and
|
|
596
|
+
the box accepts a `height` override.
|
|
597
|
+
- Theme options follow the token pattern: `textarea: { options: { rows: 3, resize:
|
|
598
|
+
'vertical' } }` in the derived component themes; the `rows` input overrides per
|
|
599
|
+
instance.
|
|
600
|
+
|
|
601
|
+
- [`8f55b4c`](https://github.com/uni-design-system/uni/commit/8f55b4ca34bfa7006c5d55c895b323931a3d6a1b) Thanks [@gaenglish](https://github.com/gaenglish)! - Theme Builder becomes the full playground (PRD §5.2)
|
|
602
|
+
- **Light & dark side by side**: both palettes generate on every input change,
|
|
603
|
+
independent of the storybook-wide mode toggle, each rendered in its own panel.
|
|
604
|
+
- **Contrast report panel**: live pass/fail matrix over all checked pairs (summary +
|
|
605
|
+
failing rows always visible, full detail on demand). Failures only occur with hard
|
|
606
|
+
brand pins; the panel says so and points at soft targets.
|
|
607
|
+
- **Shape language input** (`sharp`/`modern`/`playful`): applies `ShapeRadii` live via
|
|
608
|
+
the new `radii` pass-through on `BrandPaletteConfig`/`createThemeFromPalette`.
|
|
609
|
+
- **Export paths**: copy the static `uni-theme.ts` (via `emitThemeFile`), copy a
|
|
610
|
+
pre-encoded `ng add` command, or copy W3C DTCG JSON for both modes via the new
|
|
611
|
+
`emitDtcgTokens()` interop emitter in uni-core (Style Dictionary compatible).
|
|
612
|
+
|
|
613
|
+
## 5.1.0
|
|
614
|
+
|
|
615
|
+
### Minor Changes
|
|
616
|
+
|
|
617
|
+
- [`c1dc853`](https://github.com/uni-design-system/uni/commit/c1dc853f762a27c466b033709ec84876b708995c) Thanks [@gaenglish](https://github.com/gaenglish)! - Brand-tinted, theme-scoped elevation shadows (PRD §3.5.C)
|
|
618
|
+
- New `generateShadows(colors, mode)`: light themes replace the dead-neutral
|
|
619
|
+
`rgba(0,0,0,…)` stacks with a shadow ink pulled toward the brand hue; dark themes go
|
|
620
|
+
near-zero (`raised: none`) with only a faint veil on floating overlays — elevation
|
|
621
|
+
reads from the surface lightness steps instead. The `warn` glow is tinted with the
|
|
622
|
+
theme's own error color in both modes.
|
|
623
|
+
- `generateThemes` now returns `lightShadows`/`darkShadows`; `generateUniThemes`,
|
|
624
|
+
`createThemeFromPalette` (Theme Builder), the emitted `uni-theme.ts`, and the shipped
|
|
625
|
+
stock Light/Dark themes all carry them.
|
|
626
|
+
|
|
627
|
+
### Patch Changes
|
|
628
|
+
|
|
629
|
+
- [`f2951db`](https://github.com/uni-design-system/uni/commit/f2951db7f6267f29b56d127151ff843d445c40a4) Thanks [@gaenglish](https://github.com/gaenglish)! - Fix `ng add` against real published packages (found by fresh `ng new` e2e):
|
|
630
|
+
- The schematic bundle is CJS, but ng-packagr stamps `"type": "module"` into the
|
|
631
|
+
published package.json, so Node loaded it as ESM and the CLI reported "no ng add
|
|
632
|
+
actions". A nested `schematics/package.json` (`"type": "commonjs"`) scopes the
|
|
633
|
+
bundle back to CJS.
|
|
634
|
+
- The emitted `uni-theme.ts` used dot access on `Colors` (which has an index
|
|
635
|
+
signature), failing under `ng new`'s strict `noPropertyAccessFromIndexSignature`.
|
|
636
|
+
The emitter (and the MCP tool's guidance) now uses bracket access throughout.
|
|
637
|
+
- `uni-angular`'s peer range on `uni-core` is now `workspace:^` (publishes as `^5.x`)
|
|
638
|
+
instead of `workspace:*` (published as an exact pin). Alongside changesets'
|
|
639
|
+
`onlyUpdatePeerDependentsWhenOutOfRange`, this stops minor releases from being
|
|
640
|
+
inflated to majors by the peer-dependents rule — the cause of the 4.0.0 and 5.0.0
|
|
641
|
+
version jumps.
|
|
642
|
+
|
|
643
|
+
## 5.0.0
|
|
644
|
+
|
|
645
|
+
### Minor Changes
|
|
646
|
+
|
|
647
|
+
- [`f7f0bdd`](https://github.com/uni-design-system/uni/commit/f7f0bdddfac855955e022a852c2bfdccf8013a7b) Thanks [@gaenglish](https://github.com/gaenglish)! - OKLCH theme generation engine (`concepts/generation`)
|
|
648
|
+
- New `generateThemes(input)` / `generateUniThemes(input)`: brand seed(s) in, complete
|
|
649
|
+
WCAG-AA light+dark `Colors` pair out, with a machine-readable `ContrastReport`
|
|
650
|
+
(110 checked pairs per theme pair). Pure and deterministic.
|
|
651
|
+
- All palette math moved from HSL to perceptual OKLCH: uniform lightness slots across
|
|
652
|
+
hues, per-category chroma model (`CategoryChroma`), dark-mode accent chroma decoupling
|
|
653
|
+
(C ≤ 0.16), and a contrast guard-rail that adjusts lightness only — never hue.
|
|
654
|
+
- Brand colors ride as soft `targets` (kept verbatim when already AA, lightness-adjusted
|
|
655
|
+
when not) alongside the existing hard `brand` pins; accepted by `generatePalette`,
|
|
656
|
+
`createThemeFromPalette`, and Angular's `BrandPaletteConfig`.
|
|
657
|
+
- Semantic inks re-tuned per role: error 27°/C 0.20, warn 55°/C 0.18 (rotated off amber —
|
|
658
|
+
dark yellow reads brown), success 152°/C 0.16.
|
|
659
|
+
- `createTheme` accepts optional `radii`/`shadows` overrides; `ShapeRadii` presets
|
|
660
|
+
(`sharp` / `modern` / `playful`) emitted via the `shape` generation input.
|
|
661
|
+
- Theme Builder ships nine curated AA-clean presets built on soft targets.
|
|
662
|
+
- Deprecated (thin wrappers/tables retained): `uniColor`, `randomRangeValue`,
|
|
663
|
+
`CategorySaturation`, `CategoryLightness`. `schemeHues` moved to `color.utils`.
|
|
664
|
+
- `createTheme` deep-merges optional `borders` and `components` overrides over its
|
|
665
|
+
derived defaults — themes can define custom named primitives and rewire per-component
|
|
666
|
+
options without restating untouched sections.
|
|
667
|
+
- New `emitThemeFile()` renders a static `uni-theme.ts` — literal colors, visible border
|
|
668
|
+
primitives, sparse component overrides — the editable source of truth; the engine
|
|
669
|
+
never ships to the browser.
|
|
670
|
+
- New `ng add @uni-design-system/uni-angular` schematic: installs the peer set, writes
|
|
671
|
+
the generated theme file, registers `UNI_THEMES` in `app.config.ts`, adds typeface
|
|
672
|
+
links, scaffolds a themed smoke test, and prints the contrast summary.
|
|
673
|
+
- New MCP tool `generate-uni-theme`: returns the static theme file content, provider
|
|
674
|
+
snippet, and contrast report, with agent guidance to edit the file for restyling.
|
|
675
|
+
- `uni-core` gains its first Vitest suite, including a 1,080-seed contrast property
|
|
676
|
+
corpus with zero tolerance in both modes; the schematic gets its own spec suite.
|
|
677
|
+
|
|
678
|
+
## 4.0.0
|
|
679
|
+
|
|
680
|
+
### Minor Changes
|
|
681
|
+
|
|
682
|
+
- [`ef9b3b5`](https://github.com/uni-design-system/uni/commit/ef9b3b5d2c7bc68dc2a114b04b3960a759d631b9) Thanks [@gaenglish](https://github.com/gaenglish)! - Porting Components
|
|
683
|
+
|
|
684
|
+
## 3.0.2
|
|
685
|
+
|
|
686
|
+
## 3.0.1
|
|
687
|
+
|
|
688
|
+
## 3.0.0
|
|
689
|
+
|
|
690
|
+
## 2.0.4
|
|
691
|
+
|
|
692
|
+
## 2.0.3
|
|
693
|
+
|
|
694
|
+
## 2.0.2
|
|
695
|
+
|
|
696
|
+
## 2.0.1
|
|
697
|
+
|
|
698
|
+
### Patch Changes
|
|
699
|
+
|
|
700
|
+
- [`e2cad74`](https://github.com/uni-design-system/uni/commit/e2cad74631b3a9d2caf4816bcadedf19db99fec4) Thanks [@gaenglish](https://github.com/gaenglish)! - Fix: switch to bundled dual-package distribution via Vite to resolve strict ESM relative path failures
|
|
701
|
+
|
|
702
|
+
- [`be0fb26`](https://github.com/uni-design-system/uni/commit/be0fb2626c248fed37c2609d50eb1bfae40269e4) Thanks [@gaenglish](https://github.com/gaenglish)! - Setting Fixed Versioning for all packages.
|
|
703
|
+
|
|
704
|
+
## 1.1.0
|
|
705
|
+
|
|
706
|
+
### Minor Changes
|
|
707
|
+
|
|
708
|
+
- [`4a049de`](https://github.com/uni-design-system/uni/commit/4a049def689d56d6b6cc1d2da73c9facd93ed515) Thanks [@gaenglish](https://github.com/gaenglish)! - Adding cjs support
|
|
709
|
+
|
|
710
|
+
## 1.0.0
|
|
711
|
+
|
|
712
|
+
### Major Changes
|
|
713
|
+
|
|
714
|
+
- [`7d18157`](https://github.com/uni-design-system/uni/commit/7d18157cb131098688b70286513643423c37c756) Thanks [@gaenglish](https://github.com/gaenglish)! - init release
|