@eagami/ui 5.63.1 → 5.64.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eagami/ui",
3
- "version": "5.63.1",
3
+ "version": "5.64.0",
4
4
  "description": "Lightweight, accessible, themeable Angular UI component library and icon set built on CSS custom properties",
5
5
  "author": "Michal Wiraszka <michal@eagami.com>",
6
6
  "license": "MIT",
@@ -21,11 +21,8 @@
21
21
  color: var(--color-text-primary);
22
22
  transition: var(--transition-colors), var(--transition-shadow);
23
23
 
24
- // `opacity: 1` overrides the Firefox/WebKit default of ~0.54 on placeholders,
25
- // which would wash out the tertiary token and collapse contrast in dark mode
26
24
  &::placeholder {
27
- color: var(--color-text-tertiary);
28
- opacity: 1;
25
+ @include ea.placeholder-text;
29
26
  }
30
27
 
31
28
  &:focus {
@@ -7,13 +7,19 @@
7
7
  // for one of the SC's exceptions (inline, spacing, essential).
8
8
  $target-size-min: 24px;
9
9
 
10
- // Standard focus indicator. The ring is a soft box-shadow halo, but box-shadow
11
- // is dropped in forced-colors (Windows High Contrast) mode, which would leave
12
- // keyboard users with no visible focus. Pair the halo with a real outline that
13
- // only renders in forced-colors so the ring survives there. Pass the full
14
- // box-shadow value to compose the ring with an existing shadow.
15
- @mixin focus-ring($ring: var(--shadow-focus-ring)) {
16
- box-shadow: $ring;
10
+ // Standard focus indicator. The ring is an outline set off by a gap, and the gap is
11
+ // transparent, so it reads the same on any surface, however coloured. Pass a full
12
+ // box-shadow value to draw a halo instead, such as an error ring; box-shadow is
13
+ // dropped in forced-colors (Windows High Contrast) mode, so a real outline stands
14
+ // in for it there.
15
+ @mixin focus-ring($ring: null) {
16
+ @if $ring {
17
+ outline: none;
18
+ box-shadow: $ring;
19
+ } @else {
20
+ outline: var(--border-width-medium) solid var(--color-border-focus);
21
+ outline-offset: 2px;
22
+ }
17
23
 
18
24
  @media (forced-colors: active) {
19
25
  outline: 2px solid Highlight;
@@ -21,6 +27,18 @@ $target-size-min: 24px;
21
27
  }
22
28
  }
23
29
 
30
+ // The focus ring drawn inside the element, for an element that fills a container which
31
+ // clips its overflow, such as a row of a scrolling table. Its gap from the edge mirrors
32
+ // the outer ring's, and keeps its corners clear of a rounded container's curve.
33
+ @mixin focus-ring-inset {
34
+ outline: var(--border-width-medium) solid var(--color-border-focus);
35
+ outline-offset: calc(-2 * var(--border-width-medium));
36
+
37
+ @media (forced-colors: active) {
38
+ outline-color: Highlight;
39
+ }
40
+ }
41
+
24
42
  // Floating surfaces (menus, dialogs, popovers, toasts) lean on elevation shadow
25
43
  // for their boundary, but shadows are dropped in forced-colors mode. Add a
26
44
  // hairline border there so the surface stays separated from the content behind.
@@ -35,6 +53,7 @@ $target-size-min: 24px;
35
53
  // visible, so the border alone picks up the focus colour, without the halo.
36
54
  @mixin readonly-focus-cue {
37
55
  border-color: var(--color-border-focus);
56
+ outline: none;
38
57
  box-shadow: none;
39
58
 
40
59
  // Border colour is unreliable in forced-colors, so the ring's outline stands
@@ -252,3 +271,12 @@ $target-size-min: 24px;
252
271
  width: auto;
253
272
  height: auto;
254
273
  }
274
+
275
+ // Placeholder text, set apart from a value by its italics rather than by fading it, so it
276
+ // keeps the tertiary text's contrast. The opacity is set outright, since browsers dim
277
+ // placeholders by different amounts by default
278
+ @mixin placeholder-text {
279
+ opacity: 1;
280
+ font-style: italic;
281
+ color: var(--color-text-tertiary);
282
+ }
@@ -1395,8 +1395,11 @@ interface NiceScale {
1395
1395
  max: number;
1396
1396
  ticks: number[];
1397
1397
  }
1398
- /** Extends `[min, max]` outward to round tick values, about `maxTicks` of them. */
1399
- declare function niceScale(min: number, max: number, maxTicks?: number): NiceScale;
1398
+ /**
1399
+ * Extends `[min, max]` outward to round tick values, about `maxTicks` of them, or more
1400
+ * where a gap would otherwise exceed `maxStep`.
1401
+ */
1402
+ declare function niceScale(min: number, max: number, maxTicks?: number, maxStep?: number): NiceScale;
1400
1403
  /** Rough rendered width of `text` in px, for reserving axis room without a layout pass. */
1401
1404
  declare function estimateTextWidth(text: string, fontPx: number): number;
1402
1405
  /** Live size of a chart's host, re-measured on resize and whenever `size` changes. */
@@ -5482,6 +5485,8 @@ export declare class LineChartComponent {
5482
5485
  readonly yMin: import("@angular/core").InputSignal<number | undefined>;
5483
5486
  /** Upper bound of the y-axis; derived from the data when unset. */
5484
5487
  readonly yMax: import("@angular/core").InputSignal<number | undefined>;
5488
+ /** Largest gap between y-axis ticks; a wider range gets more ticks instead of wider gaps. */
5489
+ readonly maxYStep: import("@angular/core").InputSignal<number | undefined>;
5485
5490
  /** How the x-axis labels are set; `auto` turns them as they run out of room. */
5486
5491
  readonly xLabelOrientation: import("@angular/core").InputSignal<ChartLabelOrientation>;
5487
5492
  /** Marks the foot of a y-axis that stops short of zero with a break symbol. */
@@ -5684,6 +5689,11 @@ export declare class LineChartComponent {
5684
5689
  "required": false;
5685
5690
  "isSignal": true;
5686
5691
  };
5692
+ "maxYStep": {
5693
+ "alias": "maxYStep";
5694
+ "required": false;
5695
+ "isSignal": true;
5696
+ };
5687
5697
  "xLabelOrientation": {
5688
5698
  "alias": "xLabelOrientation";
5689
5699
  "required": false;