@eagami/ui 5.17.0 → 5.17.2

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.17.0",
3
+ "version": "5.17.2",
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",
@@ -82,3 +82,16 @@
82
82
  opacity: 0.5;
83
83
  }
84
84
  }
85
+
86
+ // Strips the geometry the UA stylesheet forces on a `[popover]` element (a
87
+ // centred, viewport-filling, scrollable box) so a surface promoted into the top
88
+ // layer keeps the box it has in the normal layer. Colour and spacing chrome
89
+ // (`padding`, `border`, `background`, `color`) is left alone: a surface that
90
+ // declares its own already wins, and one that does not resets it alongside the
91
+ // include.
92
+ @mixin top-layer-reset {
93
+ inset: auto;
94
+ overflow: visible;
95
+ width: auto;
96
+ height: auto;
97
+ }
@@ -5,7 +5,10 @@
5
5
  // `(hover: hover)`, but if a tooltip ever slips through keep it invisible on touch.
6
6
  .ea-tooltip {
7
7
  z-index: var(--z-index-tooltip);
8
- position: absolute;
8
+ // Viewport-relative, matching the coordinates the shared positioning helper
9
+ // returns. Also keeps the box unambiguous once the bubble is promoted into
10
+ // the top layer, where the containing block is the viewport either way.
11
+ position: fixed;
9
12
  // Template content can contain unbreakable element rows (avatars, icon rows)
10
13
  // that a max-width cannot wrap; let the bubble grow instead of clipping them
11
14
  min-width: min-content;
@@ -29,6 +32,12 @@
29
32
  @media (hover: none) {
30
33
  display: none;
31
34
  }
35
+
36
+ // The bubble already declares its own padding, border, background and color,
37
+ // so only the UA's popover geometry needs undoing once it is promoted.
38
+ &[popover] {
39
+ @include ea.top-layer-reset;
40
+ }
32
41
  }
33
42
 
34
43
  @keyframes ea-tooltip-fade-in {
@@ -2328,7 +2328,7 @@ declare class MenuComponent {
2328
2328
  private focusFirstItem;
2329
2329
  private focusItem;
2330
2330
  onKeydown(event: KeyboardEvent): void;
2331
- onEscape(): void;
2331
+ onEscape(event: Event): void;
2332
2332
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<MenuComponent, never>;
2333
2333
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<MenuComponent, "ea-menu", never, { "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "open": { "alias": "open"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "opened": "opened"; "closed": "closed"; }, never, ["*"], true, never>;
2334
2334
  }
@@ -2805,7 +2805,7 @@ declare class PopoverComponent {
2805
2805
  private reposition;
2806
2806
  onDocumentClick(event: MouseEvent): void;
2807
2807
  onSurfaceKeydown(event: KeyboardEvent): void;
2808
- onEscape(): void;
2808
+ onEscape(event: Event): void;
2809
2809
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<PopoverComponent, never>;
2810
2810
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<PopoverComponent, "ea-popover", never, { "anchor": { "alias": "anchor"; "required": true; "isSignal": true; }; "open": { "alias": "open"; "required": false; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "role": { "alias": "role"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "trapFocus": { "alias": "trapFocus"; "required": false; "isSignal": true; }; "surfaceId": { "alias": "surfaceId"; "required": false; "isSignal": true; }; "offset": { "alias": "offset"; "required": false; "isSignal": true; }; "flip": { "alias": "flip"; "required": false; "isSignal": true; }; "clamp": { "alias": "clamp"; "required": false; "isSignal": true; }; "matchAnchorWidth": { "alias": "matchAnchorWidth"; "required": false; "isSignal": true; }; "closeOnOutsideClick": { "alias": "closeOnOutsideClick"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "scrollBehavior": { "alias": "scrollBehavior"; "required": false; "isSignal": true; }; }, { "closeRequested": "closeRequested"; }, never, ["*"], true, never>;
2811
2811
  }