@uni-design-system/uni-angular 10.2.1 → 10.4.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 CHANGED
@@ -1,5 +1,93 @@
1
1
  # @uni-design-system/uni-angular
2
2
 
3
+ ## 10.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`cb5f08f`](https://github.com/uni-design-system/uni/commit/cb5f08f7bc7f73492688d33388c905941762ea0b) Thanks [@gaenglish](https://github.com/gaenglish)! - Give `uni-dialog` the drawer's three-row layout: a pinned `[uni-dialog-header]`, a scrolling body, and pinned `[uni-dialog-buttons]`.
8
+
9
+ The surface is now a flex column that is `overflow: clip` on both axes, so it is never the scroll container — previously a long form scrolled the dialog's own title and action buttons off the screen. Unlike the drawer, the dialog declares no height and stays sized by its content, growing until it reaches `calc(100dvh - 2 × inset)` and only then scrolling its body.
10
+
11
+ New theme options: `dialog.inset` (gap from the viewport edge before the body scrolls, default `lg`), `dialog.bodyPadding` (pads the scrolling row alone; `dialog.padding` still insets all three rows), and `divider` on `dialogHeader` / `dialogButtons` for a border between a pinned row and the body — all off or unchanged by default, so existing dialogs keep their appearance.
12
+
13
+ `[uni-dialog-header]` gains the shorter `[dialog-header]` alias, matching `[dialog-buttons]`; the long form keeps working. The `defaultCloseButton` now actually floats in the corner — its `position: absolute` was being lost to the icon button's own class, which left it inline at the top of the surface.
14
+
15
+ The drawer's overlay scrim now fades in and out with the panel instead of snapping. Its `::backdrop` had a background and no animation at all, so the dimming appeared and vanished instantly around a panel that took 250ms to slide. A new `drawer.motion` option (default `panel`) times the slide, the scrim's fade and the side panel's width transition together, replacing the hardcoded 250ms literals. The global reduced-motion rule now also reaches `::backdrop`, so both the drawer's and the dialog's scrim honour the preference (WCAG 2.3.3).
16
+
17
+ Dialog and drawer scrims now come from one token. `UniTheme` gains a `backdrops` scale — open and named like `shadows` and `motion` — and both components' `backdrop` option points at a name (`'scrim'`) instead of carrying its own CSS. They had drifted: the dialog washed the page white and blurred it while the drawer dimmed it dark, and a theme that dressed the dialog left the drawer on the library default. A raw style object is still accepted on either option, so a theme that states one keeps working.
18
+
19
+ The dialog's fade now reads the theme's `motion` token too (new `dialog.motion` option, default `panel`), replacing a hardcoded `350ms ease-in`. It shared the drawer's scrim but not its timing, so the same surface arrived at two speeds; both are now 250ms and a theme retimes them together.
20
+
21
+ ## 10.3.0
22
+
23
+ ### Minor Changes
24
+
25
+ - [`ab1689a`](https://github.com/uni-design-system/uni/commit/ab1689a8e6ddf26943403ec32e5d4871bc9f0fb6) Thanks [@gaenglish](https://github.com/gaenglish)! - `uni-button`: the focus ring is themed, and the theme now outranks the reset.
26
+
27
+ **Five of the twelve variants had no visible keyboard focus ring.** The ring
28
+ resolved the variant _name_ as a colour token — the pattern 10.2.0 removed from
29
+ checkbox, radio and toggle, missed on the one component where it costs an
30
+ accessibility failure rather than a wrong colour:
31
+
32
+ ```ts
33
+ outline: `2px solid ${this.theme.colors()[this.variant()]}`;
34
+ ```
35
+
36
+ `ghost` resolves to `transparent`, so its ring was drawn invisibly.
37
+ `light`, `onLight`, `dark` and `onDark` have no colour token at all, so the
38
+ declaration became `2px solid undefined` and the parser dropped it — as would
39
+ any intent a consumer registers. In every case `outline-offset` survived, so
40
+ the element still shifted on focus and the missing ring went unnoticed. This
41
+ was live without the registry involved.
42
+
43
+ The colour now comes from the variant's theme entry via `variantOptions`, the
44
+ mechanism the selection controls already use, and falls back to the reserved
45
+ `primary` accent rather than to nothing. Each variant keeps the ring colour it
46
+ had; `ghost` gains a visible one. The ring also routes through the shared
47
+ `focusRingStyle`, so a theme defining `focusRing` primitives restyles the button
48
+ alongside every other control.
49
+
50
+ **A theme could not give a button a border.** `border`, `outline`, `overflow`
51
+ and `transition` were applied _after_ the theme's styles, so a variant
52
+ declaring a border was silently erased and `!important` was the only way
53
+ through — which then spread to every state adjusting that border, since the
54
+ shorthand outranks the longhand.
55
+
56
+ The base theme was caught by its own reset: `secondary` is commented "Hollow"
57
+ and declares `1px solid`, and has been rendering borderless. **It now renders
58
+ its border** — the one visible change here for anyone on the default theme.
59
+
60
+ Those four properties move ahead of the theme's styles, resolving the
61
+ `TODO: Set priority on theme-defined styles` that sat on this line. Structure
62
+ the component genuinely owns — `position` for the ripple, the symbol slots —
63
+ stays after, and the reset still applies to every variant that does not
64
+ override it.
65
+
66
+ **`uni-icon-button`'s hover moved to the theme too.** It branched on
67
+ `variant() === 'ghost'` to choose between a raised shadow and a translucent
68
+ wash, after the theme's own styles. Being a binary partition, every intent a
69
+ consumer registered fell into the not-ghost half and was given a lift whether
70
+ or not it suited — a recessive intent included — and no theme could correct it.
71
+ Both themes in this repo declare a ghost hover and had it silently overridden.
72
+
73
+ Both treatments now live in `iconButton.variants` beside the colours they belong
74
+ with. Rendering is unchanged for the variants the theme styles; a variant it
75
+ does not style no longer receives a hover it never asked for, and the `disabled`
76
+ variant loses one it should never have had, since its block is also spread into
77
+ `&:disabled`.
78
+
79
+ **`uni-icon-button` had no focus indicator at all.** Its structural block cleared
80
+ the user-agent outline and put nothing back, in every variant — so the close
81
+ affordance in every dialog and drawer header was unreachable-looking under
82
+ keyboard navigation. This was not reported; it was found while verifying the
83
+ button fix above.
84
+
85
+ It now draws the shared ring, with its colour read from the same
86
+ `variantOptions.focusColor` the button uses. The indicator is applied last on
87
+ purpose: its appearance is the theme's, through `focusColor` and the `focusRing`
88
+ primitives, but whether one exists is not a style a theme should be able to
89
+ switch off by accident.
90
+
3
91
  ## 10.2.1
4
92
 
5
93
  ## 10.2.0