@uni-design-system/uni-angular 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
ADDED
|
@@ -0,0 +1,989 @@
|
|
|
1
|
+
# @uni-design-system/uni-angular
|
|
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)! - 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.
|
|
8
|
+
|
|
9
|
+
- [`96113ee`](https://github.com/uni-design-system/uni/commit/96113eecc54f6d9a7dcf4d97264a4ee4f4367410) Thanks [@gaenglish](https://github.com/gaenglish)! - `uni-select`: `compareWith` input for object values.
|
|
10
|
+
|
|
11
|
+
The select matched `value` against option values with `===`, so an object value that was structurally but not referentially equal — a saved record matched against options from a fresh fetch — never matched, and the native select silently rendered the first option (or the placeholder) instead of the preselection. The new `compareWith` input, called as `compareWith(optionValue, value)` and defaulting to reference equality, lets object-valued selects pass a key comparison like `(a, b) => a?.id === b?.id`. Primitive values were and remain unaffected.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`57a8c4c`](https://github.com/uni-design-system/uni/commit/57a8c4c73c852a6b14c2e2916cad9bd0a1566787) Thanks [@gaenglish](https://github.com/gaenglish)! - `uni-notification-badge`: a theme that omits the `offset` option no longer breaks badge positioning — the position values serialized as the invalid length `'undefinedpx'` and the badge lost its corner placement. Missing `offset` now falls back to `0`.
|
|
16
|
+
|
|
17
|
+
- [`92e5d5e`](https://github.com/uni-design-system/uni/commit/92e5d5e88787bca796325313e2c07b4f7351afcb) Thanks [@gaenglish](https://github.com/gaenglish)! - `uni-calendar` / `uni-date-input`: a bound `''` now counts as "no value".
|
|
18
|
+
|
|
19
|
+
An empty string — the only typeable empty for a string-typed model, and the natural "no value yet" in consumer code — slipped past the month path's nullish (`??`) guards into the grid math: `viewMonth` became `''`, the month heading threw `RangeError: Invalid time value` from `Intl.format` on every change-detection pass, and the grid rendered zero weeks. This hit on first render (the popup content projects eagerly), not just on open. The guards are now falsy, matching how `displayText`, `splitDateTime`, and the rest of the datetime path already treat `''`, so a calendar or date-input bound to `''` renders the current month exactly like `undefined`. `uni-time-input` and `uni-date-time-input` were already safe. Consumers no longer need to normalize `''` to `undefined` before binding — and note the `value` models were always typed `UniDate | undefined`, so no `$any()` cast is needed for a `string | undefined` draft signal.
|
|
20
|
+
|
|
21
|
+
- [`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`.
|
|
22
|
+
|
|
23
|
+
- [`96113ee`](https://github.com/uni-design-system/uni/commit/96113eecc54f6d9a7dcf4d97264a4ee4f4367410) Thanks [@gaenglish](https://github.com/gaenglish)! - `uni-menu`, `uni-multi-select`, `uni-data-table`: stop tracking loop collections by identity (NG0956).
|
|
24
|
+
|
|
25
|
+
`uni-menu` items, `uni-multi-select` options, and `uni-data-table` records tracked by object identity, so a consumer rebuilding the array each change-detection pass — the natural way to write `[menuItems]="[...]"` or re-fetch table rows — recreated every DOM node and tripped NG0956. They now track by `$index` (none of these collections carries a stable key: menu items may be templates or dividers, option values may be objects, records are arbitrary), and data-table columns track by their unique `columnDef`. Consumers no longer need to memoize a stable array; DOM nodes — including a focused menu item — survive a rebuild.
|
|
26
|
+
|
|
27
|
+
## 8.1.0
|
|
28
|
+
|
|
29
|
+
### Minor Changes
|
|
30
|
+
|
|
31
|
+
- [`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.
|
|
32
|
+
|
|
33
|
+
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>`.
|
|
34
|
+
- **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.
|
|
35
|
+
- **`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.
|
|
36
|
+
- **`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.
|
|
37
|
+
- **`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`.
|
|
38
|
+
- **`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.
|
|
39
|
+
- **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.
|
|
40
|
+
- **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.
|
|
41
|
+
- **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.
|
|
42
|
+
|
|
43
|
+
- [`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.
|
|
44
|
+
|
|
45
|
+
**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.
|
|
46
|
+
|
|
47
|
+
**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.
|
|
48
|
+
|
|
49
|
+
**Also in this release:**
|
|
50
|
+
- 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.
|
|
51
|
+
- The radio's dot grow/retract animation is a token — `radio.options.transitionSpeed` (seconds, default 0.3 preserving the current feel; 0 switches instantly).
|
|
52
|
+
- 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.
|
|
53
|
+
|
|
54
|
+
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.
|
|
55
|
+
|
|
56
|
+
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.
|
|
57
|
+
|
|
58
|
+
## 8.0.0
|
|
59
|
+
|
|
60
|
+
### Major Changes
|
|
61
|
+
|
|
62
|
+
- [`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
|
|
63
|
+
|
|
64
|
+
v1 was a single hardcoded look with the palette welded into its template, an
|
|
65
|
+
unconditional remove button, and no theme entry — a filter chip, a status pill
|
|
66
|
+
and a recipient token all rendered identically. v2 makes the chip a real themed
|
|
67
|
+
component and the building block `uni-tag-input` composes.
|
|
68
|
+
|
|
69
|
+
**Breaking (uni-angular)**
|
|
70
|
+
- **`(close)` is now `(removed)`.** The old name shadowed the native `close`
|
|
71
|
+
event and needed an eslint suppression to compile.
|
|
72
|
+
- **The remove button is opt-in** — set `[removable]="true"`. Previously every
|
|
73
|
+
tag, including a plain category label, shipped a "Remove …" button into the
|
|
74
|
+
accessibility tree.
|
|
75
|
+
- Codemod: rename `(close)` → `(removed)` and add `[removable]="true"` wherever
|
|
76
|
+
a `(close)` handler exists.
|
|
77
|
+
|
|
78
|
+
**Fixed**
|
|
79
|
+
- **A falsy value can now be removed.** `handleClose` guarded with `if (v)`, so
|
|
80
|
+
a tag keyed `''` or `0` silently could not be dismissed. Every defined value
|
|
81
|
+
emits, and a tag with no value emits `undefined`.
|
|
82
|
+
- The remove control now sizes from the chip instead of the icon-button's own
|
|
83
|
+
`sm` size — it was 22px inside a 24px chip, and taller than an `sm` chip
|
|
84
|
+
entirely.
|
|
85
|
+
|
|
86
|
+
**New**
|
|
87
|
+
- **Two orthogonal style axes**: `variant` picks the colour role, `tone` picks
|
|
88
|
+
the archetype (`soft` / `solid` / `outline`). Both resolve from the new `tag`
|
|
89
|
+
theme entry, with tones as nested `&.tone-*` selectors inside each variant so
|
|
90
|
+
a theme author restyles both axes in one place.
|
|
91
|
+
- **`'tag'` joins core's `ComponentName`**, with a `TagTone` type and a full
|
|
92
|
+
theme entry (`options` for radius/typeface/gap/symbols, `variants` per colour
|
|
93
|
+
role, `sizes` carrying geometry only).
|
|
94
|
+
- **`interactive`** turns the chip body into a `<button>` with `selected` mapped
|
|
95
|
+
to `aria-pressed`, keeping the remove control a sibling — nesting them would
|
|
96
|
+
be invalid HTML and would strand the inner control for keyboard users.
|
|
97
|
+
- **Lead slot**: `avatarSrc`, `avatarName` (initials fallback), `iconName`,
|
|
98
|
+
`symbolName` and `dot` convenience inputs, plus a `[tag-lead]` slot for
|
|
99
|
+
anything richer. Lead elements size from the chip height, and all are
|
|
100
|
+
`aria-hidden` so the chip's text stays its accessible name.
|
|
101
|
+
- **Glyphs are theme icon primitives, not Material ligatures.** The remove and
|
|
102
|
+
selected affordances resolve through the new `removeIcon` / `selectedIcon`
|
|
103
|
+
theme options (defaulting to the built-in `close` and `check`), so they mask
|
|
104
|
+
`currentColor`, recolour with the chip's tone, and can be swapped per theme.
|
|
105
|
+
They also contribute no text to the DOM, which a ligature does — one less way
|
|
106
|
+
for an accessible name to be polluted. `symbolName` remains as the escape
|
|
107
|
+
hatch for glyphs the theme's icon set doesn't carry.
|
|
108
|
+
- **`invalid`** sets `aria-invalid` and a dashed underline, so the state does
|
|
109
|
+
not rely on colour alone (WCAG 1.4.1); `disabled`, `maxWidth` truncation with
|
|
110
|
+
a `title`, and `removeLabel` for overriding the remove button's name.
|
|
111
|
+
- The component ships with 21 specs, having previously had none.
|
|
112
|
+
|
|
113
|
+
- [`6a4c7da`](https://github.com/uni-design-system/uni/commit/6a4c7da4c7c3f5758d8c66d1be714319c983e39e) Thanks [@gaenglish](https://github.com/gaenglish)! - `ThemeService`: validated writes, runtime theme registration, live options
|
|
114
|
+
|
|
115
|
+
The theme registry was bootstrap-frozen and nothing validated theme writes —
|
|
116
|
+
and a brand theme applied via `applyPalette` never appeared in
|
|
117
|
+
`uni-theme-switch`, leaving the select on a bogus value with no way back.
|
|
118
|
+
|
|
119
|
+
**Breaking**
|
|
120
|
+
- `ThemeService.theme` is now a **readonly signal**. Direct `theme.set(...)`
|
|
121
|
+
calls (already discouraged in the docs) must move to `setTheme(input)`,
|
|
122
|
+
which validates and returns `ThemeParseResult` — acceptance or the complete
|
|
123
|
+
list of rejection reasons — leaving the active theme untouched on rejection.
|
|
124
|
+
- `selectTheme(name)` now returns `boolean` and, for an unknown name, **does
|
|
125
|
+
nothing** — previously it silently kept the old theme while still recording
|
|
126
|
+
the bad key in `selectedThemeKey` and localStorage.
|
|
127
|
+
- `themeOptions` is now a `computed` (was a once-written writable signal).
|
|
128
|
+
|
|
129
|
+
**New**
|
|
130
|
+
- **`registerTheme(input, { select? })`** validates and adds a theme to the
|
|
131
|
+
live registry — it appears in `themeOptions`/`uni-theme-switch` immediately.
|
|
132
|
+
**`unregisterTheme(id)`** removes it, falling back to the first remaining
|
|
133
|
+
theme when it was active. Themes injected via `UNI_THEMES` are validated at
|
|
134
|
+
startup; malformed entries are excluded with a console warning listing every
|
|
135
|
+
reason.
|
|
136
|
+
- **`applyPalette` registers the generated theme under `CustomTheme`**, so
|
|
137
|
+
"Your Brand" is an ordinary, selectable option: it shows in the switcher,
|
|
138
|
+
survives switching away and back, and `clearCustomPalette` unregisters it.
|
|
139
|
+
- **`uni-select` fix:** a selection pointing at an option added in the same
|
|
140
|
+
change-detection pass now applies (per-option `[selected]` binding; the
|
|
141
|
+
select-level `[value]` write landed before new options existed and was
|
|
142
|
+
ignored by the browser) — any consumer with a growing options list was
|
|
143
|
+
affected.
|
|
144
|
+
|
|
145
|
+
### Minor Changes
|
|
146
|
+
|
|
147
|
+
- [`970c36d`](https://github.com/uni-design-system/uni/commit/970c36d3d2f57e3cc2ad18fc1b5498eb382c45d4) Thanks [@gaenglish](https://github.com/gaenglish)! - `uni-multi-select-dropdown`: a real accessible name, keyboard navigation, debounced filtering — and its first specs
|
|
148
|
+
|
|
149
|
+
This was the weakest component in the library on exactly the axes the roadmap's
|
|
150
|
+
combobox item names, and it had **no spec file at all**, which is why the
|
|
151
|
+
missing accessible name survived since it was written.
|
|
152
|
+
- **New `label` input, and the trigger finally names the field.** Its
|
|
153
|
+
accessible name now reads "Fruits, 2 selected, Apple, Cherry". Previously it
|
|
154
|
+
announced only the current selection — a screen reader user heard
|
|
155
|
+
"Option 1, Option 3" with no way to tell which field it belonged to. The
|
|
156
|
+
selection count comes along, so "how many did I pick" is not left to counting
|
|
157
|
+
commas.
|
|
158
|
+
- **Arrow keys, Home and End walk the options** from anywhere in the panel,
|
|
159
|
+
including the filter box. Reaching the last of thirty options previously
|
|
160
|
+
meant thirty `Tab` presses. Wrapping and the index arithmetic come from the
|
|
161
|
+
CDK's shared `ListboxNavigation`, so the keys behave exactly as they do in
|
|
162
|
+
`uni-search-input` and `uni-tag-input`.
|
|
163
|
+
- **The filter is debounced** (new `debounceTime`, default 200ms) instead of
|
|
164
|
+
re-filtering on every keystroke — the open item in TODO.md.
|
|
165
|
+
- **An empty filter result says so** through `role="status"`, rather than
|
|
166
|
+
leaving the panel blank.
|
|
167
|
+
- **The options are grouped** as a `role="group"` labelled from `label`.
|
|
168
|
+
- **20 specs**, covering the accessible name, selection and toggling, disabled
|
|
169
|
+
behaviour, filtering and debounce, keyboard navigation, and the form-control
|
|
170
|
+
contract.
|
|
171
|
+
|
|
172
|
+
**A deliberate non-change:** the options stay real checkboxes rather than
|
|
173
|
+
becoming a multi-selectable `listbox`. APG notes that multi-select listboxes are
|
|
174
|
+
handled inconsistently across screen readers and suggests a checkbox group
|
|
175
|
+
instead, and real checkboxes keep each option's state announced natively — so
|
|
176
|
+
converting would have traded a well-supported pattern for a fashionable one,
|
|
177
|
+
and duplicated the checkbox's animated visual into this component where it
|
|
178
|
+
would drift.
|
|
179
|
+
|
|
180
|
+
- [`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
|
|
181
|
+
|
|
182
|
+
The type-to-add chip field — recipients, filters, labels. It is the **open-set**
|
|
183
|
+
control: anything typed can become a token, whether or not it matches a
|
|
184
|
+
suggestion. Closed-set picking stays with `uni-select` /
|
|
185
|
+
`uni-multi-select-dropdown`, which is the deliberate split — the two look alike
|
|
186
|
+
but differ on the one thing that decides the value type, so a single component
|
|
187
|
+
would force one of them to carry an API it can never use.
|
|
188
|
+
- **`FormValueControl<UniTagItem[]>`.** `{ value: 'a@b.com' }` is a complete
|
|
189
|
+
item; `label`, `avatarSrc`, `invalid` and `disabled` are optional enrichment.
|
|
190
|
+
- **Invalid entries stay in the value, flagged**, rather than being dropped — a
|
|
191
|
+
field that silently swallows a typo'd address is worse than one that shows it
|
|
192
|
+
in red, and Enter on the chip lifts it back into the input to fix. Duplicates
|
|
193
|
+
and over-`max` entries are refused through `(rejected)` with a reason.
|
|
194
|
+
- **Full keyboard contract**: separators commit, Tab commits without trapping,
|
|
195
|
+
Backspace on an empty field _focuses_ the last chip rather than deleting it
|
|
196
|
+
blind, and on a chip Backspace and Delete both remove but move focus in
|
|
197
|
+
opposite directions — what makes pruning a list feel right.
|
|
198
|
+
- **The whole field is one tab stop.** Chips carry `tabindex="-1"`, so Tab never
|
|
199
|
+
walks through eight recipients to reach the next control.
|
|
200
|
+
- **Announces through a `role="status"` live region** on every add, remove and
|
|
201
|
+
rejection; the removal route is described once per field rather than by every
|
|
202
|
+
chip.
|
|
203
|
+
- **`preset="email"`** wires an address validator, a paste parser that unwraps
|
|
204
|
+
`Name <a@b.com>` and keeps an unterminated tail in the field, and Space as a
|
|
205
|
+
separator.
|
|
206
|
+
- **`'tagInput'` joins core's `ComponentName`** with a theme entry for the chip
|
|
207
|
+
field's own tokens. Field chrome is not duplicated — it comes from `input` via
|
|
208
|
+
`uni-input-box`, so a tag input restyles with every other field.
|
|
209
|
+
|
|
210
|
+
**Also in this release**
|
|
211
|
+
- **`ListboxNavigation` in the CDK** (`createListboxNavigation`) owns the
|
|
212
|
+
combobox bookkeeping every type-ahead control needs: open state, active
|
|
213
|
+
option, wrap-around arithmetic, Home/End, and `aria-activedescendant` wiring
|
|
214
|
+
that can never point at an option a narrowing filter has removed.
|
|
215
|
+
`uni-search-input` now uses it — behaviour unchanged, and it gains Home/End
|
|
216
|
+
for free — and the multi-select combobox upgrade will too. Three hand-rolled
|
|
217
|
+
copies of one keyboard contract is how they drift.
|
|
218
|
+
- **`uni-tag` gains `controlTabIndex`**, so a composite that owns its own roving
|
|
219
|
+
focus can take its chips out of the tab order, and **`selected` is now
|
|
220
|
+
optional**: an interactive chip carries `aria-pressed` only when it is
|
|
221
|
+
genuinely a toggle. Announcing "not pressed" on a recipient chip is worse than
|
|
222
|
+
announcing nothing.
|
|
223
|
+
|
|
224
|
+
- [`5414517`](https://github.com/uni-design-system/uni/commit/5414517d52d17943a4730752ab5d90c304c37062) Thanks [@gaenglish](https://github.com/gaenglish)! - Themes registered from JSON get the built-in icons back
|
|
225
|
+
|
|
226
|
+
`registerTheme` and `setTheme` now hydrate a theme's icons on the way in: the
|
|
227
|
+
built-in set is merged _under_ whatever icons the payload carries, so the
|
|
228
|
+
theme's own icons still win.
|
|
229
|
+
|
|
230
|
+
This is what makes a theme fetched as JSON usable. Transports elide `BaseIcons`
|
|
231
|
+
— roughly 71% of a serialized theme, and bytes the consumer already ships — so
|
|
232
|
+
without hydration a fetched theme would validate cleanly and then render no
|
|
233
|
+
icons at all. The rule is the same one `createTheme` already applies at
|
|
234
|
+
construction (`{...BaseIcons, ...icons}`), so a theme behaves identically
|
|
235
|
+
whether it was built in-process or arrived over the wire.
|
|
236
|
+
|
|
237
|
+
Themes provided through `UNI_THEMES` are unaffected: they already carry the full
|
|
238
|
+
set, so hydration is a no-op.
|
|
239
|
+
|
|
240
|
+
### Patch Changes
|
|
241
|
+
|
|
242
|
+
- [`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
|
|
243
|
+
|
|
244
|
+
Opening a `uni-menu` by click left the first item highlighted before the
|
|
245
|
+
pointer had touched it, reading as a preselected default. Two correct
|
|
246
|
+
behaviours combined badly: `onOpened()` implements ARIA roving focus by calling
|
|
247
|
+
`.focus()` on an item every open, and the item styles deliberately painted
|
|
248
|
+
`:focus` the same as `:hover`. Nothing was wrong with the focus itself — only
|
|
249
|
+
with painting it after a pointer open.
|
|
250
|
+
- **The highlight now keys on `:focus-visible`.** Programmatic focus following a
|
|
251
|
+
click doesn't match it, while keyboard-driven focus does — so mouse users get
|
|
252
|
+
no phantom highlight, and keyboard users keep the focus cursor. Roving-focus
|
|
253
|
+
bookkeeping is untouched: a mouse open still moves focus to the first item, so
|
|
254
|
+
screen readers announce it exactly as before.
|
|
255
|
+
- **New `HOVER_OR_KEYBOARD_FOCUS` constant exported from uni-core**, holding
|
|
256
|
+
that selector. Emotion merges styles by _exact selector text_, so a component's
|
|
257
|
+
base rule and any theme variant restyling it have to agree character for
|
|
258
|
+
character — a variant keyed `'&:hover, &:focus'` would both fail to override
|
|
259
|
+
and reintroduce the phantom highlight. Naming the selector once removes the
|
|
260
|
+
trap; the base theme's `menuItem.warn` tone and the Carbon/Wellsourced
|
|
261
|
+
showcase themes now use it.
|
|
262
|
+
|
|
263
|
+
Themes with their own `menuItem` variants should key the highlight with
|
|
264
|
+
`HOVER_OR_KEYBOARD_FOCUS`. Note that `:focus-visible` is a browser heuristic:
|
|
265
|
+
after a user has been navigating by keyboard, a subsequent click may still show
|
|
266
|
+
the highlight, which is the intended "this person is using the keyboard"
|
|
267
|
+
behaviour rather than a regression.
|
|
268
|
+
|
|
269
|
+
- Updated dependencies [[`3279186`](https://github.com/uni-design-system/uni/commit/3279186e2cee806056cfb446699ab108d30fb608), [`de83fe4`](https://github.com/uni-design-system/uni/commit/de83fe497a2f48569a7c49eea2e7ca640d931254), [`760b761`](https://github.com/uni-design-system/uni/commit/760b761ad77533e7e01f7a56731f74e470bbd948), [`6a4c7da`](https://github.com/uni-design-system/uni/commit/6a4c7da4c7c3f5758d8c66d1be714319c983e39e), [`5414517`](https://github.com/uni-design-system/uni/commit/5414517d52d17943a4730752ab5d90c304c37062)]:
|
|
270
|
+
- @uni-design-system/uni-core@8.0.0
|
|
271
|
+
|
|
272
|
+
## 7.3.0
|
|
273
|
+
|
|
274
|
+
### Minor Changes
|
|
275
|
+
|
|
276
|
+
- [`c828982`](https://github.com/uni-design-system/uni/commit/c828982442e5bdc1d6884551160bbceac8ecf8f7) Thanks [@gaenglish](https://github.com/gaenglish)! - `expand` gains a themable, size-aware speed
|
|
277
|
+
|
|
278
|
+
The reveal/collapse duration was hardcoded at 350ms, so a consumer wanting a
|
|
279
|
+
snappier disclosure — or wanting adjacent styling to fade on the same clock —
|
|
280
|
+
had nothing to reference. A fixed duration also reads differently at different
|
|
281
|
+
sizes: sluggish on a two-line region, rushed on a full-page one.
|
|
282
|
+
- **New `transitionSpeed` option in the `expand` theme options** (seconds,
|
|
283
|
+
default `0.35`, matching alert/card `transitionSpeed`) sets the base
|
|
284
|
+
duration. `'expand'` joins core's `ComponentName` union, so custom and
|
|
285
|
+
derived themes can type an `expand` entry.
|
|
286
|
+
- **Duration scales with content height.** The actual duration is
|
|
287
|
+
`transitionSpeed × √(height ÷ 240px)`, clamped to ~0.15–0.6s at the default
|
|
288
|
+
speed (the envelope scales proportionally with a themed speed), so perceived
|
|
289
|
+
speed stays steady across region sizes. The curve and its constants
|
|
290
|
+
(`expandDuration`, `EXPAND_DEFAULT_SPEED`, `EXPAND_MIN_DURATION`,
|
|
291
|
+
`EXPAND_MAX_DURATION`, `EXPAND_REFERENCE_HEIGHT`) are exported from
|
|
292
|
+
uni-core.
|
|
293
|
+
- **New per-instance `transitionSpeed` input** sets an exact duration for one
|
|
294
|
+
region, bypassing the scaling: `<uni-expand [transitionSpeed]="0.15">`.
|
|
295
|
+
- **The resolved duration is exposed as the public `duration` signal** on
|
|
296
|
+
`uni-expand`, so adjacent styling can move on the reveal's clock with a
|
|
297
|
+
plain binding — `[style.transition-duration]="expand.duration() + 's'"` —
|
|
298
|
+
keeping all timing in the theme/signal pipeline, with no custom CSS.
|
|
299
|
+
- **`expand-toggle` gains a matching `transitionSpeed` input** and otherwise
|
|
300
|
+
follows the theme token instead of its own hardcoded 350ms. Expand Area
|
|
301
|
+
binds the region's resolved `duration` to its toggle, keeping chevron and
|
|
302
|
+
reveal on one clock even when size-scaled or overridden.
|
|
303
|
+
- **Speed is theme-reactive**: swapping themes at runtime retimes regions and
|
|
304
|
+
chevrons live.
|
|
305
|
+
- **Enter/leave easing is now `ease-in-out`** (was `ease-in`), matching the
|
|
306
|
+
chevron rotation so trigger and region decelerate together.
|
|
307
|
+
- **`UniExpandOptions` is exported** from uni-angular for
|
|
308
|
+
`getComponentOptions<UniExpandOptions>('expand')` consumers.
|
|
309
|
+
|
|
310
|
+
- [`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
|
|
311
|
+
|
|
312
|
+
The menu was the only composite component with no theme surface of its own —
|
|
313
|
+
panel chrome came from the shared `dropdown` entry and every item-level knob
|
|
314
|
+
(height 38, `primary-container` hover, `check` active symbol, `label` type
|
|
315
|
+
role) was hardcoded. Every Uni menu therefore looked identical, and the gaps a
|
|
316
|
+
real product hits first (a red Delete, a separator before it, disabled rows)
|
|
317
|
+
were only reachable via `::ng-deep`.
|
|
318
|
+
- **New `menu` theme options** (`'menu'` joins core's `ComponentName` union):
|
|
319
|
+
`minWidth`, panel `color`/`border`/`borderRadius`/`shadow` (each falling
|
|
320
|
+
back to the `dropdown` options when unset, so menus follow generic popovers
|
|
321
|
+
until a theme deliberately splits them), `paddingVertical`/
|
|
322
|
+
`paddingHorizontal` (panel inset — `xs` inset plus item `borderRadius`
|
|
323
|
+
yields the "hover pill" look; `none` yields full-bleed rows), and
|
|
324
|
+
`dividerBorder`/`dividerSpacing` for separators.
|
|
325
|
+
- **New `menuItem` theme options + variants** (`'menuItem'` joins
|
|
326
|
+
`ComponentName`): `height`, `paddingHorizontal`, `gap`, `borderRadius`,
|
|
327
|
+
`typeface`, `textColor`, `hoverColor`, `activeSymbol` (undefined removes the
|
|
328
|
+
trailing check), and `transitionSpeed`. Theme `variants` on `menuItem` carry
|
|
329
|
+
tones — the base theme ships a `warn` tone for destructive actions.
|
|
330
|
+
- **`MenuItem` grows `variant`, `disabled`, and `{ divider: true }`.**
|
|
331
|
+
`variant: 'warn'` routes through the theme's `menuItem` variants; `disabled`
|
|
332
|
+
items render in the disabled color, carry `aria-disabled`, and are skipped
|
|
333
|
+
by keyboard navigation; dividers render as `role="separator"` rules styled
|
|
334
|
+
by the `menu` options. `isDivider` and the `UniMenuOptions`/
|
|
335
|
+
`UniMenuItemOptions` interfaces are exported from uni-angular.
|
|
336
|
+
- **`uni-dropdown` panel chrome is now input-overridable**
|
|
337
|
+
(`border`/`borderRadius`/`shadow`/`color`), falling back to the `dropdown`
|
|
338
|
+
theme options — this is the mechanism `uni-menu` uses; other consumers are
|
|
339
|
+
unchanged.
|
|
340
|
+
- **Default-rendering change:** menus now have `minWidth: 184` from the base
|
|
341
|
+
theme (previously they sized to the widest item). All other defaults
|
|
342
|
+
reproduce the previous look, including the 0.35s hover transition.
|
|
343
|
+
- **The Carbon experiment themes gain menu styling** (sharp full-bleed 40px
|
|
344
|
+
rows, IBM Plex, `$layer-hover`, red danger option, ~110ms motion) with a new
|
|
345
|
+
Carbon Menu story demonstrating that the same component renders both
|
|
346
|
+
aesthetics untouched.
|
|
347
|
+
|
|
348
|
+
### Patch Changes
|
|
349
|
+
|
|
350
|
+
- [`ba4e38d`](https://github.com/uni-design-system/uni/commit/ba4e38d88ad65bbba8badf2b42115acfd4d433e2) Thanks [@gaenglish](https://github.com/gaenglish)! - Tooltip no longer blinks after activating a wrapped control
|
|
351
|
+
|
|
352
|
+
Clicking a button inside `uni-tooltip` used to fall through to the bubble's
|
|
353
|
+
tap-to-toggle handler and then re-show on the still-hovering pointer — a
|
|
354
|
+
state-flipping label ("Expand" → "Collapse") visibly blinked off and back on
|
|
355
|
+
after the click.
|
|
356
|
+
- **Activating an interactive element inside the host now hides the bubble
|
|
357
|
+
and suppresses it** until the pointer leaves and returns (or focus moves
|
|
358
|
+
away). Tap-to-toggle is unchanged for non-interactive hosts (inline text).
|
|
359
|
+
- **`expand-toggle` drops its icon-only tooltip.** The rotating chevron plus
|
|
360
|
+
`aria-expanded` and the button's accessible name already say everything the
|
|
361
|
+
bubble restated; use the `label` input when a disclosure needs a visible
|
|
362
|
+
name.
|
|
363
|
+
|
|
364
|
+
## 7.2.0
|
|
365
|
+
|
|
366
|
+
### Minor Changes
|
|
367
|
+
|
|
368
|
+
- [`8d77ed7`](https://github.com/uni-design-system/uni/commit/8d77ed75af1edf414baa7b9ea52a6982470b0c7c) Thanks [@gaenglish](https://github.com/gaenglish)! - Centre `icon-button`'s glyph, fix `expand-toggle`'s rotation, make `expand`
|
|
369
|
+
block-level and motion-safe, and give `expand-toggle` a label
|
|
370
|
+
|
|
371
|
+
Gaps found while building collapsible sections in a consuming app, where each
|
|
372
|
+
one had to be worked around locally.
|
|
373
|
+
- **`icon-button` centres its glyph.** Sizing `iconName` from the size token
|
|
374
|
+
(shipped in the previous release) made the glyph smaller than the button —
|
|
375
|
+
an `sm` button is a 22px box around an 18px icon — but the button was
|
|
376
|
+
`display: block`, so the glyph sat in the top-left corner with all the slack
|
|
377
|
+
on its right and bottom. It is now a centring flex box; flex is still
|
|
378
|
+
block-level, so the button's own layout is unchanged, and the
|
|
379
|
+
absolutely-positioned accessible-name span stays out of the flex flow.
|
|
380
|
+
**Visual change** for every `icon-button`: glyphs shift to the middle of the
|
|
381
|
+
box. `symbolName` ligatures centre too, which also means the known
|
|
382
|
+
oversized-ligature case (a 24px glyph in a 22px `sm` box) now clips evenly on
|
|
383
|
+
all sides instead of only bottom-right. Covered by a test.
|
|
384
|
+
- **`expand-toggle` rotates the glyph instead of its host.** This is a fix to
|
|
385
|
+
existing behaviour, visible in 7.1.0 and earlier: the 180° turn was applied to
|
|
386
|
+
the component host, which is both the tooltip's positioning box (`uni-tooltip`
|
|
387
|
+
sets `anchor-name` on its own element, nested inside the host) and taller than
|
|
388
|
+
the glyph, since an inline-level box reserves baseline descender space. So the
|
|
389
|
+
bubble bobbed along an arc as the chevron turned, and the chevron itself
|
|
390
|
+
drifted off-centre rather than spinning in place. The transform now lands on
|
|
391
|
+
`uni-icon` — a centred square sized to the glyph, and the only box here that
|
|
392
|
+
rotates symmetrically. The host keeps its `toggled` attribute, so any consumer
|
|
393
|
+
styling keyed on it still works.
|
|
394
|
+
- **`uni-expand` is now `display: block`.** As a custom element it defaulted to
|
|
395
|
+
`display: inline`, so its animated grid laid out as a block-in-inline box and
|
|
396
|
+
the revealed content's spacing came out subtly wrong. Every consumer was
|
|
397
|
+
writing `uni-expand { display: block }` by hand. **Visual change** for anyone
|
|
398
|
+
who was relying on the inline default or already shipping that override — the
|
|
399
|
+
override is now redundant and can be deleted.
|
|
400
|
+
- **The reveal respects `prefers-reduced-motion`** (WCAG 2.3.3). The
|
|
401
|
+
expand/collapse keyframes ran unconditionally; they're now wrapped in
|
|
402
|
+
`motionSafe`, as is `expand-toggle`'s chevron rotation. Under reduced motion
|
|
403
|
+
the region appears and disappears instantly. `overflow: hidden` moved inside
|
|
404
|
+
the guard deliberately: it exists to clip the box mid-animation, and leaving
|
|
405
|
+
it applied at rest would crop decorations that legitimately paint outside the
|
|
406
|
+
region (focus rings, offset outlines). Angular removes a leaving node on the
|
|
407
|
+
next frame when it detects no animation, so nothing hangs.
|
|
408
|
+
- **`expand-toggle` takes `label` and `sublabel`.** It was chevron-only, so any
|
|
409
|
+
disclosure that names its section — most of them — had to hand-roll the whole
|
|
410
|
+
trigger row and its styles, which is how consumers end up with a private
|
|
411
|
+
copy of this component. With `label` set the toggle renders a full-width row
|
|
412
|
+
(chevron, label, muted qualifier) as a single button whose accessible name is
|
|
413
|
+
the label, instead of an icon button sitting next to unrelated text. Only the
|
|
414
|
+
chevron rotates, so the label stays upright. Omit `label` and the icon-only
|
|
415
|
+
shape is unchanged, tooltip and all — `uni-expand-area` is unaffected.
|
|
416
|
+
|
|
417
|
+
- [`c532c95`](https://github.com/uni-design-system/uni/commit/c532c95d4a7adbf7c4015b8b556e3994c70948ed) Thanks [@gaenglish](https://github.com/gaenglish)! - Size `icon-button`'s `iconName` glyph from its size token
|
|
418
|
+
|
|
419
|
+
`icon-button` rendered a `symbolName` ligature at a font size, but an `iconName`
|
|
420
|
+
mask with no size at all — and the base `iconButton` size tokens carry no
|
|
421
|
+
padding, so the icon filled the entire button box edge to edge. That made
|
|
422
|
+
`symbolName` → `iconName` a visual regression rather than a like-for-like swap,
|
|
423
|
+
which matters now that `uni-icon` is the preferred path (a mask paints on the
|
|
424
|
+
first frame, where a ligature waits on the variable font).
|
|
425
|
+
- `iconName` is now sized from the size token's `fontSize` — the same value that
|
|
426
|
+
scales the rest of the control — so the glyph sits inside the button and grows
|
|
427
|
+
with `size`. Concretely, `size="sm"` renders an 18px glyph in a 22px button
|
|
428
|
+
instead of a 22px one.
|
|
429
|
+
- **Visual change** for existing `iconName` call sites: glyphs get slightly
|
|
430
|
+
smaller and gain breathing room. Themes that size icon-buttons with padding
|
|
431
|
+
(e.g. the Carbon example) set a matching `fontSize`, so they land on the same
|
|
432
|
+
glyph size either way and are unaffected.
|
|
433
|
+
- Known gap, now covered by a test that documents rather than blesses it:
|
|
434
|
+
`uni-symbol` takes its size from `opticalSize` (default 24) and ignores the
|
|
435
|
+
button's size token, so a `sm` button renders a 24px ligature in a 22px box.
|
|
436
|
+
Masked icons do not have that problem — one more reason to prefer `iconName`.
|
|
437
|
+
|
|
438
|
+
### Patch Changes
|
|
439
|
+
|
|
440
|
+
- [`c532c95`](https://github.com/uni-design-system/uni/commit/c532c95d4a7adbf7c4015b8b556e3994c70948ed) Thanks [@gaenglish](https://github.com/gaenglish)! - Fix `uni-icon` ignoring `size="24"` written as a static attribute
|
|
441
|
+
|
|
442
|
+
`size` appended `px` only to numbers, but a static template attribute arrives as
|
|
443
|
+
a string — so `<uni-icon name="mail" size="24" />` emitted the invalid
|
|
444
|
+
`width: 24`. Browsers drop an invalid declaration, which silently fell back to
|
|
445
|
+
the stylesheet's `width: 100%; height: 100%`.
|
|
446
|
+
|
|
447
|
+
That failed in two different ways depending on the container, neither of them
|
|
448
|
+
obvious: inside a fixed box the icon quietly filled it (a 16px glyph rendering
|
|
449
|
+
at 30px), and inside a content-sized flex row `height: 100%` collapsed to zero,
|
|
450
|
+
so the icon vanished while still occupying full width and pushing its label
|
|
451
|
+
across the row.
|
|
452
|
+
|
|
453
|
+
A bare numeric string is now treated as px, matching the number form. Genuine
|
|
454
|
+
CSS lengths (`'1.25rem'`, `'50%'`, `calc(…)`) still pass through untouched.
|
|
455
|
+
`[size]="24"` was unaffected throughout, since property binding passes a real
|
|
456
|
+
number.
|
|
457
|
+
|
|
458
|
+
## 7.1.0
|
|
459
|
+
|
|
460
|
+
### Minor Changes
|
|
461
|
+
|
|
462
|
+
- [`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
|
|
463
|
+
|
|
464
|
+
The 34-icon set shipped in 7.0.0 covered the library's own components but not a
|
|
465
|
+
real application — an app migrating off inline `<svg>` (or off `uni-symbol`, in
|
|
466
|
+
Angular) ran out of names almost immediately. Everything here is additive; all
|
|
467
|
+
34 existing names are unchanged.
|
|
468
|
+
- **25 new icons**, same Material Symbols Outlined 300 source and the same
|
|
469
|
+
`0 -960 960 960` grid as the rest of the set: navigation (`link`, `expand`,
|
|
470
|
+
`gridView`, `listView`), actions (`moreHorizontal`, `copy`, `send`,
|
|
471
|
+
`refresh`, `dragHandle`, `qrCode`), feedback (`star`, `verified`) and
|
|
472
|
+
user/system (`group`, `shieldPerson`, `clock`, `mail`, `chat`, `image`,
|
|
473
|
+
`document`, `payment`, `bank`, `trendingUp`, `extension`, `webhook`,
|
|
474
|
+
`logout`).
|
|
475
|
+
- `moreHorizontal` ships alongside `more` because that one is `more_vert` and
|
|
476
|
+
row-aligned menus need the horizontal kebab.
|
|
477
|
+
- `star` is separate from `favorite`, which is the heart.
|
|
478
|
+
- **`uni-icon` gains an optional `size` input** (`CssLength` — bare numbers are
|
|
479
|
+
px, strings pass through, so `20` and `'1.25rem'` both work). Left unset,
|
|
480
|
+
behaviour is unchanged: the icon fills its container, which is what lets a
|
|
481
|
+
themed control size its own glyph through padding. Set, it applies
|
|
482
|
+
width/height as inline styles, so an explicit size wins over the
|
|
483
|
+
fill-the-container rule regardless of style injection order. This removes the
|
|
484
|
+
per-call-site `width`/`height` CSS rule that replacing an inline `<svg>` with
|
|
485
|
+
`<uni-icon>` would otherwise need.
|
|
486
|
+
- The MCP `create-icon-tokens` tool now lists the built-in icon names above the
|
|
487
|
+
token map it returns. Apps routinely hand-draw their own `close`, `check` or
|
|
488
|
+
`plus`; encoding those into theme tokens works but adds redundant artwork on a
|
|
489
|
+
foreign grid when the theme already ships the glyph. The tool cannot recognise
|
|
490
|
+
a shape, so it hands the caller the list to check against before adding
|
|
491
|
+
anything.
|
|
492
|
+
|
|
493
|
+
## 7.0.0
|
|
494
|
+
|
|
495
|
+
### Minor Changes
|
|
496
|
+
|
|
497
|
+
- [`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
|
|
498
|
+
|
|
499
|
+
The built-in icon set was 11 glyphs drawn from four different grids
|
|
500
|
+
(`0 0 24 24`, `0 0 50 50`, `0 0 64 64`, `0 -960 960 960`), so `checkCircle` and
|
|
501
|
+
`xCircle` rendered as solid filled discs next to a hairline `alertCircle` and an
|
|
502
|
+
oversized `close` — three optical weights in one set.
|
|
503
|
+
- `BaseIcons` is now Material Symbols Outlined at weight 300, every glyph on a
|
|
504
|
+
single `0 -960 960 960` grid, grouped by intent: navigation (`menu`,
|
|
505
|
+
`chevronUp/Down/Left/Right`, `arrowLeft/Right`, `home`, `externalLink`),
|
|
506
|
+
actions (`search`, `close`, `plus`, `minus`, `more`, `delete`, `edit`,
|
|
507
|
+
`download`, `upload`, `share`, `filter`), feedback (`check`, `checkCircle`,
|
|
508
|
+
`xCircle`, `alertCircle`, `info`, `warning`, `lock`) and user/system
|
|
509
|
+
(`profile`, `settings`, `notification`, `favorite`, `help`, `calendar`).
|
|
510
|
+
- All 11 previously shipped names are preserved, so existing `<uni-icon>` call
|
|
511
|
+
sites and theme overrides keep working. Their **appearance changes**: the
|
|
512
|
+
filled `checkCircle`/`xCircle` are now outlined, and the set reads lighter
|
|
513
|
+
overall. `spinner` is carried over verbatim, keyframes intact.
|
|
514
|
+
- New `IconName` and `BaseIconName` types. `IconName` is
|
|
515
|
+
`BaseIconName | (string & {})`, so built-ins autocomplete and typos surface
|
|
516
|
+
while themes can still register arbitrary names via `createTheme({ icons })`.
|
|
517
|
+
`uni-icon`'s `name` input is typed with it instead of `keyof Icons`.
|
|
518
|
+
- **Breaking**: removes the unused `IconToken`, `IconStyle`, `ToggleableIcon`
|
|
519
|
+
and `IconConfig` exports. Nothing in the library referenced them and
|
|
520
|
+
`IconToken`'s 60-name union contradicted the actual `BaseIcons` keys. Use
|
|
521
|
+
`IconName` instead.
|
|
522
|
+
- New exported `svgToIconUri(svg, options?)` — the supported way to bring your
|
|
523
|
+
own icons (a brand set, a designer handoff) into a theme. It normalizes the
|
|
524
|
+
source (drops the xml declaration, comments and fixed `width`/`height` so the
|
|
525
|
+
mask scales), percent-encodes it, and **rejects artwork that cannot survive
|
|
526
|
+
masking**: no `viewBox`, an embedded raster `<image>`, an external reference,
|
|
527
|
+
a gradient/pattern fill, or more than one paint color. That last one is the
|
|
528
|
+
trap worth naming — masks use the alpha channel, so a multi-color logo
|
|
529
|
+
flattens to a silhouette in `currentColor`; pass `{ allowMultiColor: true }`
|
|
530
|
+
when that is intended. `createTheme({ icons })` merges the result over
|
|
531
|
+
`BaseIcons` per name, so a built-in name reskins and a new name is added.
|
|
532
|
+
- New MCP tool `create-icon-tokens`, the agent-facing front end to
|
|
533
|
+
`svgToIconUri`: hand it a project's inline `<svg>` (or a brand set) and it
|
|
534
|
+
returns a paste-ready `icons` map for `uni-theme.ts`. It encodes via the same
|
|
535
|
+
helper, so tokens are byte-identical to the built-in set, and adds the
|
|
536
|
+
set-level checks a per-icon helper cannot make — which names override
|
|
537
|
+
built-ins, and whether the artwork mixes viewBox grids. Bad artwork is
|
|
538
|
+
reported per icon rather than failing the batch, and re-running is safe
|
|
539
|
+
(already-encoded URIs pass through). The server instructions now point agents
|
|
540
|
+
at it whenever they encounter inline SVG.
|
|
541
|
+
- `BaseIcons` is generated by `scripts/generate-icons.mjs` (`pnpm icons:generate`),
|
|
542
|
+
which fetches from the canonical Material Symbols source and validates every
|
|
543
|
+
glyph before writing — a malformed path, an off-grid viewBox or geometry
|
|
544
|
+
outside the grid aborts the run. `pnpm icons:check` verifies the committed
|
|
545
|
+
file without writing. Add or change icons in that script's manifest and
|
|
546
|
+
regenerate; the file is not hand-edited. `icon.records.spec.ts` asserts the
|
|
547
|
+
same invariants against the committed output.
|
|
548
|
+
|
|
549
|
+
### Patch Changes
|
|
550
|
+
|
|
551
|
+
- Updated dependencies [[`f7727aa`](https://github.com/uni-design-system/uni/commit/f7727aa8895bd67f285ba4830858f994490bb7f7)]:
|
|
552
|
+
- @uni-design-system/uni-core@7.0.0
|
|
553
|
+
|
|
554
|
+
## 6.1.0
|
|
555
|
+
|
|
556
|
+
## 6.0.1
|
|
557
|
+
|
|
558
|
+
### Patch Changes
|
|
559
|
+
|
|
560
|
+
- [`4bfb057`](https://github.com/uni-design-system/uni/commit/4bfb057c55651c0375e7f35dd6f804e8d5c69e88) Thanks [@gaenglish](https://github.com/gaenglish)! - Canonical MDX docs structure across the entire library
|
|
561
|
+
- Component docs pages now follow one flow (spec in AGENTS.md): imports → Overview →
|
|
562
|
+
Usage (the compact playground: story + source + knobs) → named variation examples →
|
|
563
|
+
**Theme options** → Accessibility → Do/Don't. Property/API/Methods/Events tables are
|
|
564
|
+
retired — the playground's controls are the API reference.
|
|
565
|
+
- New `ThemeOptions` docs block renders a component's per-theme option tokens live from
|
|
566
|
+
the active Storybook theme (with color swatches), distinguishing per-theme options
|
|
567
|
+
from per-instance inputs; data-table's raw `ThemeDataBlock` dump is replaced.
|
|
568
|
+
- All ~55 component pages conform: the 7 form-control pages (200–390 lines of legacy
|
|
569
|
+
API tables) rewritten; empty Overviews authored (card, tag, icon-button, scroll-area,
|
|
570
|
+
expand-area, data-table); accessibility bullets added across navigation, feedback,
|
|
571
|
+
and form components.
|
|
572
|
+
- The MCP index now carries when-to-use guidance for 55 of 70 components (was 41) and
|
|
573
|
+
accessibility guidance for 36 (was 21) — the remainder are subcomponents documented
|
|
574
|
+
on their parent pages and internal directives.
|
|
575
|
+
|
|
576
|
+
## 6.0.0
|
|
577
|
+
|
|
578
|
+
### Major Changes
|
|
579
|
+
|
|
580
|
+
- [`a02afee`](https://github.com/uni-design-system/uni/commit/a02afee3c1c4721ff626445684f41de432443731) Thanks [@gaenglish](https://github.com/gaenglish)! - Layout components are attribute-only, on any element
|
|
581
|
+
|
|
582
|
+
**Breaking:** the shorthand element selectors `Box`, `Stack`, `Row`, `Grid`, `Wrap`,
|
|
583
|
+
and `GridArea` are removed — a concept inherited from another library that conflicted
|
|
584
|
+
with semantic HTML. Migrate to the attribute form: `<Box padding="md">` →
|
|
585
|
+
`<div box-layout padding="md">` (GridArea → `grid-area-layout`).
|
|
586
|
+
|
|
587
|
+
In exchange, the attribute selectors now apply to **any element**, not just `div` —
|
|
588
|
+
layout and semantics compose: `<main box-layout [grow]="1" padding="md">`,
|
|
589
|
+
`<nav stack-layout gap="sm">`, `<section stack-layout>`.
|
|
590
|
+
|
|
591
|
+
Also documented, unchanged in behavior: the sizing convention (number = px via
|
|
592
|
+
binding, `[height]="420"`; plain attribute = CSS length, `height="420px"`) and
|
|
593
|
+
Stack/Row's `fit-content` min-size defaults (set `[minHeight]="0"` / `[minWidth]="0"`
|
|
594
|
+
for scroll containment). All internal usages, stories, and docs are migrated —
|
|
595
|
+
including the Divider story's `<Center>`, which had silently never rendered (Center
|
|
596
|
+
never had an element selector).
|
|
597
|
+
|
|
598
|
+
- [`f1796fb`](https://github.com/uni-design-system/uni/commit/f1796fbb42015dafb3a122f6effe69bc2b07d525) Thanks [@gaenglish](https://github.com/gaenglish)! - Selector unification: one form per component
|
|
599
|
+
|
|
600
|
+
**Breaking:** every PascalCase alias selector is removed (`Card`, `Menu`, `Symbol`,
|
|
601
|
+
`Icon`, `Dialog`, `Button`, `Tabs`, `Snackbar`, `SelectInput`, `Confirmation`, … — a
|
|
602
|
+
concept inherited from another library). Each component now has exactly one canonical
|
|
603
|
+
form, chosen by what the component is:
|
|
604
|
+
- **Widgets and content-renderers** keep their `uni-*` element: `<uni-card>`,
|
|
605
|
+
`<uni-menu>`, `<uni-symbol>`, `<uni-icon>`, `<uni-tabs>`, `<uni-select>`,
|
|
606
|
+
`<uni-confirmation-dialog>`, …
|
|
607
|
+
- **Decorators of native elements** are attribute-only, and their `div`-locks are
|
|
608
|
+
lifted: `[uni-badge]`, `[uni-dialog-header]` (e.g. on `<header>`),
|
|
609
|
+
`[uni-dialog-buttons]`/`[dialog-buttons]` (e.g. on `<footer>`),
|
|
610
|
+
`[uni-scroll-area]`/`[scroll-area]`, `[uni-menu-item]`/`[menu-item]` (e.g. on
|
|
611
|
+
`<li>`).
|
|
612
|
+
- **Host-locked selectors stay host-locked** where the native element carries the
|
|
613
|
+
behavior: `dialog[uni-dialog]`, `button[uni-text-button]`/`button[text-button]`,
|
|
614
|
+
`button[uni-icon-button]`/`button[icon-button]`.
|
|
615
|
+
|
|
616
|
+
Migration is mechanical: `<Card>` → `<uni-card>`, `<Button …>` →
|
|
617
|
+
`<button text-button …>`, `<Dialog …>` → `<dialog uni-dialog …>`, `<Badge …>` →
|
|
618
|
+
`<div uni-badge …>`, `<ScrollArea …>` → `<div scroll-area …>`. All internal usages,
|
|
619
|
+
stories, and docs are migrated; `llms.txt` and the MCP index reflect the canonical
|
|
620
|
+
forms.
|
|
621
|
+
|
|
622
|
+
- [`a62e9b1`](https://github.com/uni-design-system/uni/commit/a62e9b116f0b57cf2a1e647155bc2fbc02b02b87) Thanks [@gaenglish](https://github.com/gaenglish)! - Text is attribute-only, with a value shorthand and element-aware defaults
|
|
623
|
+
|
|
624
|
+
**Breaking:** the `uni-text` and `Text` element selectors are removed. Text is now the
|
|
625
|
+
attribute `[uni-text]` on any element, keeping your HTML semantics:
|
|
626
|
+
- **Value shorthand** — the attribute value is the typeface:
|
|
627
|
+
`<h1 uni-text="display-small">`, `<span uni-text="caption">`, dynamic via
|
|
628
|
+
`[uni-text]="role()"`. The explicit `typeface` input still works (the attribute
|
|
629
|
+
value wins when both are set).
|
|
630
|
+
- **Element-aware defaults** — with no value, the typeface is inferred from the host:
|
|
631
|
+
`h1`→headline-large, `h2`→headline-medium, `h3`→headline-small, `h4`→title-large,
|
|
632
|
+
`p`→body-1-long, `small`/`figcaption`→caption, `blockquote`→quote, `label`→label,
|
|
633
|
+
else title-small. Plain semantic markup is correctly set with zero configuration.
|
|
634
|
+
|
|
635
|
+
Migrate `<uni-text typeface="body-1-long">…</uni-text>` →
|
|
636
|
+
`<p uni-text>…</p>` (or `<span uni-text="body-1-long">` where no semantic element
|
|
637
|
+
fits). All internal usages, stories, and docs are migrated.
|
|
638
|
+
|
|
639
|
+
### Minor Changes
|
|
640
|
+
|
|
641
|
+
- [`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
|
|
642
|
+
- **`uni-debounce-input`** now wears the themed input chrome via `uni-input-box`
|
|
643
|
+
(color, border, typeface, focus ring) and gains `label` (accessible name),
|
|
644
|
+
`placeholder`, `disabled`, `pre-input`/`post-input` attribute slots for adornments,
|
|
645
|
+
ARIA passthroughs (`role`, `ariaExpanded`, `ariaControls`, `ariaActivedescendant`)
|
|
646
|
+
for composite widgets, and `clear()`/`focus()` methods. Debounce behavior unchanged.
|
|
647
|
+
- **`uni-search-input` redesigned**: the opinionated solid-primary pill bar with the
|
|
648
|
+
embedded `title-large` label is gone. It's now a standard themed field — decorative
|
|
649
|
+
leading magnifier, clear button while a query exists (refocusing on clear), Enter
|
|
650
|
+
emits `search`, Escape closes/clears.
|
|
651
|
+
- **Type-ahead added**: pass `suggestions` (refresh from `change`) and the field
|
|
652
|
+
becomes an ARIA combobox — keyboard-navigable listbox (ArrowUp/Down, Enter selects,
|
|
653
|
+
emitting `suggestionSelected` + `search`), `aria-activedescendant` wiring, focus-out
|
|
654
|
+
closing. New `searchInput` theme options: `searchSymbol`, `clearSymbol`, suggestion
|
|
655
|
+
list `listColor`/`listShadow`/`listBorderRadius`, `maxSuggestions`.
|
|
656
|
+
- Visual breaking change for SearchInput consumers (deliberate strip-back); code API
|
|
657
|
+
is compatible (`label`/`width`/`change`/`search` retained; `label` is now the
|
|
658
|
+
accessible name + placeholder fallback rather than displayed text).
|
|
659
|
+
|
|
660
|
+
- [`8953d59`](https://github.com/uni-design-system/uni/commit/8953d59aa5f5eed57801534c7cbf5ff05453c316) Thanks [@gaenglish](https://github.com/gaenglish)! - Checkbox, radio, and toggle conform to theme tokens
|
|
661
|
+
- The last hardcoded control colors (`#FFF`, `#ccc`, `#d0d0d0`, `#e0e0e0`,
|
|
662
|
+
`rgba(0,0,0,0.2)`) are gone. Chrome now resolves from new option tokens —
|
|
663
|
+
checkbox `boxColor: 'surface'`; radio `ringColor: 'outline'` / `fillColor:
|
|
664
|
+
'surface'` (radio gains a theme entry for the first time); toggle `trackColor:
|
|
665
|
+
'surface-variant'` / `knobColor: 'surface'` — so all three finally render
|
|
666
|
+
correctly on dark and brand themes.
|
|
667
|
+
- The checkbox's check/dash strokes wear the variant's paired on-color
|
|
668
|
+
(`on-primary`, `on-warn`, …) instead of assuming white; disabled states use the
|
|
669
|
+
`disabled`/`on-disabled` tokens; the toggle knob's shadow is the theme's
|
|
670
|
+
brand-tinted `raised` stack, and its hover uses the button convention's
|
|
671
|
+
brightness filter instead of a fixed grey.
|
|
672
|
+
|
|
673
|
+
- [`7a6da4f`](https://github.com/uni-design-system/uni/commit/7a6da4f60979795f10e85493d1d13543f6a5a0e1) Thanks [@gaenglish](https://github.com/gaenglish)! - New `uni-stat` KPI tile
|
|
674
|
+
- Muted label + large headline value (numbers auto-compact via
|
|
675
|
+
`Intl.NumberFormat`: `48234` → "48.2K") set in a new `stat` type-scale role
|
|
676
|
+
(32px semibold, proportional figures).
|
|
677
|
+
- Optional signed `delta` whose ink is decided by direction × `upIsGood` — churn
|
|
678
|
+
going down reads green, tickets going up reads red — with the arrow glyph
|
|
679
|
+
accompanied by screen-reader "up"/"down" text so state never rides color alone;
|
|
680
|
+
`caption` names the comparison period.
|
|
681
|
+
- Optional decorative 12-point sparkline (`trend` input): stroke in the outline hue,
|
|
682
|
+
endpoint dotted in the accent, `aria-hidden`.
|
|
683
|
+
- Fully token-driven via `stat.options`: card-recipe frame (`color`/`border`/
|
|
684
|
+
`borderRadius`), `labelTypeface`/`valueTypeface`, `positiveColor`/`negativeColor`
|
|
685
|
+
(the semantic inks, AA-guaranteed on surface), `trendColor`/`trendAccent`, spacing.
|
|
686
|
+
|
|
687
|
+
- [`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
|
|
688
|
+
- **Bug**: `uni-icon` resolves icons from `theme.icons`, but every theme shipped
|
|
689
|
+
`icons: {}` — the icon record was never wired in, so all icons (dialog close, button
|
|
690
|
+
spinner, search/clear affordances) rendered nothing.
|
|
691
|
+
- **Fix + pattern**: the default icon set now lives in core (`BaseIcons`, in
|
|
692
|
+
`concepts/iconography`) and `createTheme` merges a theme's `icons` over it — themes
|
|
693
|
+
can override or add icons under any name (inline SVG data URIs, masked with
|
|
694
|
+
`currentColor` so they recolor with the theme). The angular `icons` record re-exports
|
|
695
|
+
`BaseIcons` (deprecated).
|
|
696
|
+
- `uni-icon` also sets the standard `mask-image` (was webkit-only, so icons were
|
|
697
|
+
invisible in Firefox regardless) and renders nothing for unknown names instead of a
|
|
698
|
+
broken `url("undefined")`.
|
|
699
|
+
- The emitted `uni-theme.ts` gains an editable `icons` section, and the MCP's
|
|
700
|
+
`generate-uni-theme` guidance instructs agents: never inline SVG in components —
|
|
701
|
+
define an icon once in the theme's `icons` map and render it via `<uni-icon>`.
|
|
702
|
+
|
|
703
|
+
### Patch Changes
|
|
704
|
+
|
|
705
|
+
- Updated dependencies [[`5a6fc60`](https://github.com/uni-design-system/uni/commit/5a6fc601952e0cbda80810a1c9062588c675d89f), [`8953d59`](https://github.com/uni-design-system/uni/commit/8953d59aa5f5eed57801534c7cbf5ff05453c316), [`7a6da4f`](https://github.com/uni-design-system/uni/commit/7a6da4f60979795f10e85493d1d13543f6a5a0e1), [`fea0b2e`](https://github.com/uni-design-system/uni/commit/fea0b2e78da327f3acea144958af2d0dbbefb699)]:
|
|
706
|
+
- @uni-design-system/uni-core@6.0.0
|
|
707
|
+
|
|
708
|
+
## 5.2.0
|
|
709
|
+
|
|
710
|
+
### Minor Changes
|
|
711
|
+
|
|
712
|
+
- [`1f5ee1d`](https://github.com/uni-design-system/uni/commit/1f5ee1dce290aceceec628677fdc9e36b5c5031f) Thanks [@gaenglish](https://github.com/gaenglish)! - New `uni-avatar` and `uni-avatar-group` components
|
|
713
|
+
- Graceful fallback chain: image → initials derived from `name` (first + last) →
|
|
714
|
+
themed symbol. Accessible by default: `role="img"` + `aria-label` from the name,
|
|
715
|
+
`aria-hidden` when purely decorative.
|
|
716
|
+
- Fully token-driven: variants color from the role's `*-container` tokens, sizes from
|
|
717
|
+
the theme's `avatar` size records, corner radius from `options.borderRadius`
|
|
718
|
+
(`max` = circles; a `sharp` theme gets square avatars), initials typeface from
|
|
719
|
+
`options.typeface`, fallback symbol from `options.fallbackSymbol`.
|
|
720
|
+
- `uni-avatar-group` stacks avatars with a token-driven overlap (spacing token) and
|
|
721
|
+
separator ring (`ringColor`/`ringWidth` options); `max` collapses the overflow into
|
|
722
|
+
a themed "+N" chip that is itself a `uni-avatar` (verbatim `text` input).
|
|
723
|
+
|
|
724
|
+
- [`dca84b1`](https://github.com/uni-design-system/uni/commit/dca84b1f5a49d56608bac098c26b0e90992ed49d) Thanks [@gaenglish](https://github.com/gaenglish)! - New `uni-breadcrumb` component
|
|
725
|
+
- WAI-ARIA breadcrumb: labelled `nav` landmark wrapping an ordered list, the last item
|
|
726
|
+
marked `aria-current="page"`, separators decorative (`aria-hidden`).
|
|
727
|
+
- Data-driven `items` (root first). Items with `href` render as real anchors; without
|
|
728
|
+
one they render as link-styled buttons emitting `itemClicked` for SPA routing.
|
|
729
|
+
- Token-driven via `breadcrumb.options`: `typeface`, link `color`, `currentColor`,
|
|
730
|
+
`separatorSymbol` (material symbol), and `gap` spacing.
|
|
731
|
+
|
|
732
|
+
- [`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
|
|
733
|
+
- `button` and `iconButton` themes gain `options: { borderRadius: 'max' }`; the hardcoded
|
|
734
|
+
per-size pixel radii (11/13/18/24) and the icon button's inline `borderRadius: 999` are
|
|
735
|
+
removed. Components resolve the token through `theme.radius()`, so the theme's radii
|
|
736
|
+
scale — shape languages (`sharp` → square, `playful` → pill) and custom radii
|
|
737
|
+
primitives — now restyles buttons like every other tokened component.
|
|
738
|
+
- Back-compat: the options radius is applied before theme `sizes`/`fixed` styles, so
|
|
739
|
+
hand-authored themes that still set a size-level `borderRadius` keep winning; icon
|
|
740
|
+
buttons fall back to the legacy circle when a theme predates iconButton options.
|
|
741
|
+
- `button` themes also gain `options: { typeface: 'button' }`: the hardcoded
|
|
742
|
+
`fontFamily: 'Euphemia'` (a font no theme loads) is removed from `fixed` and the sizes;
|
|
743
|
+
labels now render the type scale's `button` role (Red Hat Display, medium, capitalize),
|
|
744
|
+
with per-size `fontSize` still applied by `sizes`. Point the token at any typography
|
|
745
|
+
role — including custom ones — to restyle every button label.
|
|
746
|
+
- New `UniButtonOptions` interface (`borderRadius`, `typeface`) exported from the button
|
|
747
|
+
model.
|
|
748
|
+
|
|
749
|
+
- [`7844dde`](https://github.com/uni-design-system/uni/commit/7844ddec88f40027dafcaed5192f88d3c0cec54f) Thanks [@gaenglish](https://github.com/gaenglish)! - Card frame conforms to token primitives
|
|
750
|
+
- The card theme's hardcoded frame (`borderStyle`/`borderWidth`/`borderRadius: '8px'` in
|
|
751
|
+
`fixed`, `borderColor` per variant) is replaced by tokens: the card resolves its border
|
|
752
|
+
from the **border primitive named by its variant** (`borders.primary` …
|
|
753
|
+
`borders.success`), its corner radius from the radii scale (`options.borderRadius:
|
|
754
|
+
'xs'` — same 8px by default), and an optional `options.elevation` shadow token.
|
|
755
|
+
- `UniCardOptions` gains `border` (pin every card to one primitive — including a custom
|
|
756
|
+
one — instead of variant-following) and documents the existing `borderRadius`/
|
|
757
|
+
`elevation`; redefining a border primitive in a theme now restyles cards and every
|
|
758
|
+
other component sharing that token.
|
|
759
|
+
- Token styles apply under the merged theme style, so hand-authored themes that still
|
|
760
|
+
set card `fixed`/`variants` frame styles keep winning. No visual change for default
|
|
761
|
+
themes — this is pure tokenization.
|
|
762
|
+
|
|
763
|
+
- [`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
|
|
764
|
+
- **`uni-drawer`** has two modes sharing one content slot: `side` renders an in-flow
|
|
765
|
+
`<aside>` that pushes content (width-animated open/close, divider border primitive at
|
|
766
|
+
its edge, `aria-hidden` while closed); `over` renders a native `<dialog>` in the top
|
|
767
|
+
layer — focus trap, Escape, and scrim backdrop come from the platform, sliding in
|
|
768
|
+
from `position` (`start`/`end`). `open` is a two-way `model()`; Escape and backdrop
|
|
769
|
+
clicks keep it in sync. Tokens: `drawer.options` (`color`, `width`, `divider`,
|
|
770
|
+
`elevation`, `padding`, `backdrop`).
|
|
771
|
+
- **`uni-app-bar`**: leading/trailing content projection slots around a `title` (or
|
|
772
|
+
custom center content), trailing pushed to the far edge; optional `sticky`. Tokens:
|
|
773
|
+
`appBar.options` (`color`, `height`, `divider`, `typeface`, `padding`, `gap`,
|
|
774
|
+
optional `elevation`).
|
|
775
|
+
- The Drawer "DashboardShell" story documents the composition recipe: app bar with a
|
|
776
|
+
menu toggle + side drawer + content.
|
|
777
|
+
|
|
778
|
+
- [`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
|
|
779
|
+
|
|
780
|
+
The gauge's track colors were fixed pastel hexes (`#b3d4ea`, `#b3e7c2`, …) that ignored
|
|
781
|
+
the active theme entirely — secondary and success even shared the same green. Tracks now
|
|
782
|
+
use the role's `*-container` token (the palette's soft tint of that role) and arcs the
|
|
783
|
+
role base, so gauges follow any brand palette, in both light and dark modes.
|
|
784
|
+
|
|
785
|
+
- [`4ccf18b`](https://github.com/uni-design-system/uni/commit/4ccf18ba86dc81c344597c7bc3e46f5d92f3c232) Thanks [@gaenglish](https://github.com/gaenglish)! - New `uni-skeleton` loading placeholder
|
|
786
|
+
- Three shapes: `text` (multi-line, ending on a short line like real copy), `rect`,
|
|
787
|
+
and `circle`; explicit `width`/`height` accept CSS strings or px numbers.
|
|
788
|
+
- Painted with surface tokens (`skeleton.options`: `color`, `highlightColor`,
|
|
789
|
+
`borderRadius`, `gap`) so placeholders sit naturally on light and dark themes; the
|
|
790
|
+
shimmer sweep (`animation`/`duration` options) only runs when the user allows motion
|
|
791
|
+
and degrades to static blocks under `prefers-reduced-motion`.
|
|
792
|
+
- `aria-hidden` — placeholders are invisible to assistive tech by design.
|
|
793
|
+
|
|
794
|
+
- [`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
|
|
795
|
+
- Native `<input type="range">` under the hood: platform keyboard interaction
|
|
796
|
+
(arrows, Home/End, Page Up/Down) and ARIA slider semantics for free; Signal Forms
|
|
797
|
+
contract (`FormValueControl<number>`) matching Input/Textarea.
|
|
798
|
+
- `min`/`max`/`step` inputs (fractional steps supported), required accessible `label`.
|
|
799
|
+
- Token-driven via `slider.options`: fill/thumb `color`, `trackColor`, `borderRadius`,
|
|
800
|
+
and geometry (`trackHeight`, `thumbSize`). The fill level rides a CSS custom
|
|
801
|
+
property, so dragging never regenerates Emotion styles; Firefox uses the native
|
|
802
|
+
`::-moz-range-progress`, WebKit a gradient stop.
|
|
803
|
+
|
|
804
|
+
- [`15a8f73`](https://github.com/uni-design-system/uni/commit/15a8f731f70bcd84211b7ff16b9272a2c6f2adc8) Thanks [@gaenglish](https://github.com/gaenglish)! - New `uni-tabs` / `uni-tab` components
|
|
805
|
+
- Full WAI-ARIA tabs pattern: `tablist`/`tab`/`tabpanel` roles with wired
|
|
806
|
+
`aria-selected`/`aria-controls`/`aria-labelledby`, roving tabindex, automatic
|
|
807
|
+
activation on ArrowLeft/ArrowRight (wrapping, disabled tabs skipped), Home/End,
|
|
808
|
+
and motion-safe transitions.
|
|
809
|
+
- `selectedIndex` is a two-way `model()`; selection snaps to the nearest enabled tab.
|
|
810
|
+
Panel content is captured per-tab and only the selected panel is instantiated.
|
|
811
|
+
- Every visual knob is a theme option token (`tabs.options`): `typeface`, `textColor`,
|
|
812
|
+
`activeTextColor`, `indicatorColor`, `indicatorThickness` (thickness token),
|
|
813
|
+
`divider` (border primitive), `gap`/`padding` (spacing tokens), `borderRadius`, and
|
|
814
|
+
optional `activeColor` — the defaults render underline tabs; `borderRadius: 'max'` +
|
|
815
|
+
`activeColor` turns them into segmented pills with no component changes.
|
|
816
|
+
|
|
817
|
+
- [`b04b97b`](https://github.com/uni-design-system/uni/commit/b04b97bd109e36cbb8fcda31c73680d85509ab0a) Thanks [@gaenglish](https://github.com/gaenglish)! - New `uni-textarea` component
|
|
818
|
+
- Multi-line text field with the same Signal Forms contract as `uni-input`
|
|
819
|
+
(`FormValueControl<string>`: `value` model, `disabled`/`invalid`/`dirty`/`required`,
|
|
820
|
+
touched-aware error styling, `aria-*` wiring).
|
|
821
|
+
- Reuses `uni-input-box` for its chrome, so it inherits the input's themed color,
|
|
822
|
+
border, typeface, focus outline, and disabled treatment automatically; the box's
|
|
823
|
+
field selectors now cover `textarea` (with auto height and vertical padding), and
|
|
824
|
+
the box accepts a `height` override.
|
|
825
|
+
- Theme options follow the token pattern: `textarea: { options: { rows: 3, resize:
|
|
826
|
+
'vertical' } }` in the derived component themes; the `rows` input overrides per
|
|
827
|
+
instance.
|
|
828
|
+
|
|
829
|
+
- [`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)
|
|
830
|
+
- **Light & dark side by side**: both palettes generate on every input change,
|
|
831
|
+
independent of the storybook-wide mode toggle, each rendered in its own panel.
|
|
832
|
+
- **Contrast report panel**: live pass/fail matrix over all checked pairs (summary +
|
|
833
|
+
failing rows always visible, full detail on demand). Failures only occur with hard
|
|
834
|
+
brand pins; the panel says so and points at soft targets.
|
|
835
|
+
- **Shape language input** (`sharp`/`modern`/`playful`): applies `ShapeRadii` live via
|
|
836
|
+
the new `radii` pass-through on `BrandPaletteConfig`/`createThemeFromPalette`.
|
|
837
|
+
- **Export paths**: copy the static `uni-theme.ts` (via `emitThemeFile`), copy a
|
|
838
|
+
pre-encoded `ng add` command, or copy W3C DTCG JSON for both modes via the new
|
|
839
|
+
`emitDtcgTokens()` interop emitter in uni-core (Style Dictionary compatible).
|
|
840
|
+
|
|
841
|
+
## 5.1.0
|
|
842
|
+
|
|
843
|
+
### Patch Changes
|
|
844
|
+
|
|
845
|
+
- [`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):
|
|
846
|
+
- The schematic bundle is CJS, but ng-packagr stamps `"type": "module"` into the
|
|
847
|
+
published package.json, so Node loaded it as ESM and the CLI reported "no ng add
|
|
848
|
+
actions". A nested `schematics/package.json` (`"type": "commonjs"`) scopes the
|
|
849
|
+
bundle back to CJS.
|
|
850
|
+
- The emitted `uni-theme.ts` used dot access on `Colors` (which has an index
|
|
851
|
+
signature), failing under `ng new`'s strict `noPropertyAccessFromIndexSignature`.
|
|
852
|
+
The emitter (and the MCP tool's guidance) now uses bracket access throughout.
|
|
853
|
+
- `uni-angular`'s peer range on `uni-core` is now `workspace:^` (publishes as `^5.x`)
|
|
854
|
+
instead of `workspace:*` (published as an exact pin). Alongside changesets'
|
|
855
|
+
`onlyUpdatePeerDependentsWhenOutOfRange`, this stops minor releases from being
|
|
856
|
+
inflated to majors by the peer-dependents rule — the cause of the 4.0.0 and 5.0.0
|
|
857
|
+
version jumps.
|
|
858
|
+
|
|
859
|
+
## 5.0.0
|
|
860
|
+
|
|
861
|
+
### Minor Changes
|
|
862
|
+
|
|
863
|
+
- [`f7f0bdd`](https://github.com/uni-design-system/uni/commit/f7f0bdddfac855955e022a852c2bfdccf8013a7b) Thanks [@gaenglish](https://github.com/gaenglish)! - OKLCH theme generation engine (`concepts/generation`)
|
|
864
|
+
- New `generateThemes(input)` / `generateUniThemes(input)`: brand seed(s) in, complete
|
|
865
|
+
WCAG-AA light+dark `Colors` pair out, with a machine-readable `ContrastReport`
|
|
866
|
+
(110 checked pairs per theme pair). Pure and deterministic.
|
|
867
|
+
- All palette math moved from HSL to perceptual OKLCH: uniform lightness slots across
|
|
868
|
+
hues, per-category chroma model (`CategoryChroma`), dark-mode accent chroma decoupling
|
|
869
|
+
(C ≤ 0.16), and a contrast guard-rail that adjusts lightness only — never hue.
|
|
870
|
+
- Brand colors ride as soft `targets` (kept verbatim when already AA, lightness-adjusted
|
|
871
|
+
when not) alongside the existing hard `brand` pins; accepted by `generatePalette`,
|
|
872
|
+
`createThemeFromPalette`, and Angular's `BrandPaletteConfig`.
|
|
873
|
+
- Semantic inks re-tuned per role: error 27°/C 0.20, warn 55°/C 0.18 (rotated off amber —
|
|
874
|
+
dark yellow reads brown), success 152°/C 0.16.
|
|
875
|
+
- `createTheme` accepts optional `radii`/`shadows` overrides; `ShapeRadii` presets
|
|
876
|
+
(`sharp` / `modern` / `playful`) emitted via the `shape` generation input.
|
|
877
|
+
- Theme Builder ships nine curated AA-clean presets built on soft targets.
|
|
878
|
+
- Deprecated (thin wrappers/tables retained): `uniColor`, `randomRangeValue`,
|
|
879
|
+
`CategorySaturation`, `CategoryLightness`. `schemeHues` moved to `color.utils`.
|
|
880
|
+
- `createTheme` deep-merges optional `borders` and `components` overrides over its
|
|
881
|
+
derived defaults — themes can define custom named primitives and rewire per-component
|
|
882
|
+
options without restating untouched sections.
|
|
883
|
+
- New `emitThemeFile()` renders a static `uni-theme.ts` — literal colors, visible border
|
|
884
|
+
primitives, sparse component overrides — the editable source of truth; the engine
|
|
885
|
+
never ships to the browser.
|
|
886
|
+
- New `ng add @uni-design-system/uni-angular` schematic: installs the peer set, writes
|
|
887
|
+
the generated theme file, registers `UNI_THEMES` in `app.config.ts`, adds typeface
|
|
888
|
+
links, scaffolds a themed smoke test, and prints the contrast summary.
|
|
889
|
+
- New MCP tool `generate-uni-theme`: returns the static theme file content, provider
|
|
890
|
+
snippet, and contrast report, with agent guidance to edit the file for restyling.
|
|
891
|
+
- `uni-core` gains its first Vitest suite, including a 1,080-seed contrast property
|
|
892
|
+
corpus with zero tolerance in both modes; the schematic gets its own spec suite.
|
|
893
|
+
|
|
894
|
+
### Patch Changes
|
|
895
|
+
|
|
896
|
+
- Updated dependencies [[`f7f0bdd`](https://github.com/uni-design-system/uni/commit/f7f0bdddfac855955e022a852c2bfdccf8013a7b)]:
|
|
897
|
+
- @uni-design-system/uni-core@5.0.0
|
|
898
|
+
|
|
899
|
+
## 4.0.0
|
|
900
|
+
|
|
901
|
+
### Minor Changes
|
|
902
|
+
|
|
903
|
+
- [`ef9b3b5`](https://github.com/uni-design-system/uni/commit/ef9b3b5d2c7bc68dc2a114b04b3960a759d631b9) Thanks [@gaenglish](https://github.com/gaenglish)! - Porting Components
|
|
904
|
+
|
|
905
|
+
### Patch Changes
|
|
906
|
+
|
|
907
|
+
- Updated dependencies [[`ef9b3b5`](https://github.com/uni-design-system/uni/commit/ef9b3b5d2c7bc68dc2a114b04b3960a759d631b9)]:
|
|
908
|
+
- @uni-design-system/uni-core@4.0.0
|
|
909
|
+
|
|
910
|
+
## 3.0.2
|
|
911
|
+
|
|
912
|
+
### Patch Changes
|
|
913
|
+
|
|
914
|
+
- [`dcaf166`](https://github.com/uni-design-system/uni/commit/dcaf1668fb94716b192c65137a14f3ea561a0142) Thanks [@gaenglish](https://github.com/gaenglish)! - Extending the Symbol component to support theme options.
|
|
915
|
+
|
|
916
|
+
- Updated dependencies []:
|
|
917
|
+
- @uni-design-system/uni-core@3.0.2
|
|
918
|
+
|
|
919
|
+
## 3.0.1
|
|
920
|
+
|
|
921
|
+
### Patch Changes
|
|
922
|
+
|
|
923
|
+
- [`fabbb73`](https://github.com/uni-design-system/uni/commit/fabbb73e7b2124e14b3cc263b2b8ca43e0cf80bd) Thanks [@gaenglish](https://github.com/gaenglish)! - Exporting new components and formatting.
|
|
924
|
+
|
|
925
|
+
- Updated dependencies []:
|
|
926
|
+
- @uni-design-system/uni-core@3.0.1
|
|
927
|
+
|
|
928
|
+
## 3.0.0
|
|
929
|
+
|
|
930
|
+
### Minor Changes
|
|
931
|
+
|
|
932
|
+
- [`54a945c`](https://github.com/uni-design-system/uni/commit/54a945c51635898acb0c8ec0dd93ee234c580228) Thanks [@gaenglish](https://github.com/gaenglish)! - Exporting Components, Themes, and CDK
|
|
933
|
+
|
|
934
|
+
### Patch Changes
|
|
935
|
+
|
|
936
|
+
- Updated dependencies []:
|
|
937
|
+
- @uni-design-system/uni-core@3.0.0
|
|
938
|
+
|
|
939
|
+
## 2.0.4
|
|
940
|
+
|
|
941
|
+
### Patch Changes
|
|
942
|
+
|
|
943
|
+
- [`ad5dd15`](https://github.com/uni-design-system/uni/commit/ad5dd151d245765b9d24a6ad1370a3e9d0d6b63e) Thanks [@gaenglish](https://github.com/gaenglish)! - Exporting multiple Angular Components
|
|
944
|
+
|
|
945
|
+
- Updated dependencies []:
|
|
946
|
+
- @uni-design-system/uni-core@2.0.4
|
|
947
|
+
|
|
948
|
+
## 2.0.3
|
|
949
|
+
|
|
950
|
+
### Patch Changes
|
|
951
|
+
|
|
952
|
+
- [`eb80cff`](https://github.com/uni-design-system/uni/commit/eb80cffaaba0009c1c30875f93ea7e75dcf92302) Thanks [@gaenglish](https://github.com/gaenglish)! - fix: setting dist directory in publishConfig
|
|
953
|
+
|
|
954
|
+
- Updated dependencies []:
|
|
955
|
+
- @uni-design-system/uni-core@2.0.3
|
|
956
|
+
|
|
957
|
+
## 2.0.2
|
|
958
|
+
|
|
959
|
+
### Patch Changes
|
|
960
|
+
|
|
961
|
+
- Updated dependencies []:
|
|
962
|
+
- @uni-design-system/uni-core@2.0.2
|
|
963
|
+
|
|
964
|
+
## 2.0.1
|
|
965
|
+
|
|
966
|
+
### Patch Changes
|
|
967
|
+
|
|
968
|
+
- [`be0fb26`](https://github.com/uni-design-system/uni/commit/be0fb2626c248fed37c2609d50eb1bfae40269e4) Thanks [@gaenglish](https://github.com/gaenglish)! - Setting Fixed Versioning for all packages.
|
|
969
|
+
|
|
970
|
+
- Updated dependencies [[`e2cad74`](https://github.com/uni-design-system/uni/commit/e2cad74631b3a9d2caf4816bcadedf19db99fec4), [`be0fb26`](https://github.com/uni-design-system/uni/commit/be0fb2626c248fed37c2609d50eb1bfae40269e4)]:
|
|
971
|
+
- @uni-design-system/uni-core@2.0.1
|
|
972
|
+
|
|
973
|
+
## 2.0.0
|
|
974
|
+
|
|
975
|
+
### Patch Changes
|
|
976
|
+
|
|
977
|
+
- Updated dependencies [[`4a049de`](https://github.com/uni-design-system/uni/commit/4a049def689d56d6b6cc1d2da73c9facd93ed515)]:
|
|
978
|
+
- @uni-design-system/uni-core@1.1.0
|
|
979
|
+
|
|
980
|
+
## 1.0.0
|
|
981
|
+
|
|
982
|
+
### Major Changes
|
|
983
|
+
|
|
984
|
+
- [`7d18157`](https://github.com/uni-design-system/uni/commit/7d18157cb131098688b70286513643423c37c756) Thanks [@gaenglish](https://github.com/gaenglish)! - init release
|
|
985
|
+
|
|
986
|
+
### Patch Changes
|
|
987
|
+
|
|
988
|
+
- Updated dependencies [[`7d18157`](https://github.com/uni-design-system/uni/commit/7d18157cb131098688b70286513643423c37c756)]:
|
|
989
|
+
- @uni-design-system/uni-core@1.0.0
|