@testgorilla/tgo-ui 11.13.1 → 11.15.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.
Files changed (65) hide show
  1. package/fesm2022/testgorilla-tgo-ui-components-ai-feedback.mjs +1 -1
  2. package/fesm2022/testgorilla-tgo-ui-components-ai-feedback.mjs.map +1 -1
  3. package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs +1 -1
  4. package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs.map +1 -1
  5. package/fesm2022/testgorilla-tgo-ui-components-autocomplete-v2.mjs +1 -1
  6. package/fesm2022/testgorilla-tgo-ui-components-autocomplete-v2.mjs.map +1 -1
  7. package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs +1 -1
  8. package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs.map +1 -1
  9. package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs +1 -1
  10. package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs.map +1 -1
  11. package/fesm2022/testgorilla-tgo-ui-components-breadcrumb.mjs +1 -1
  12. package/fesm2022/testgorilla-tgo-ui-components-breadcrumb.mjs.map +1 -1
  13. package/fesm2022/testgorilla-tgo-ui-components-button.mjs +32 -3
  14. package/fesm2022/testgorilla-tgo-ui-components-button.mjs.map +1 -1
  15. package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs +1 -1
  16. package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs.map +1 -1
  17. package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs +2 -2
  18. package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs.map +1 -1
  19. package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs +1 -1
  20. package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs.map +1 -1
  21. package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs +1 -1
  22. package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs.map +1 -1
  23. package/fesm2022/testgorilla-tgo-ui-components-field.mjs +1 -1
  24. package/fesm2022/testgorilla-tgo-ui-components-field.mjs.map +1 -1
  25. package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs +1 -1
  26. package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs.map +1 -1
  27. package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs +1 -1
  28. package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs.map +1 -1
  29. package/fesm2022/testgorilla-tgo-ui-components-media-card.mjs +1 -1
  30. package/fesm2022/testgorilla-tgo-ui-components-media-card.mjs.map +1 -1
  31. package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs +1 -1
  32. package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs.map +1 -1
  33. package/fesm2022/testgorilla-tgo-ui-components-navbar.mjs +2 -2
  34. package/fesm2022/testgorilla-tgo-ui-components-navbar.mjs.map +1 -1
  35. package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs +1 -1
  36. package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs.map +1 -1
  37. package/fesm2022/testgorilla-tgo-ui-components-page-header.mjs +1 -1
  38. package/fesm2022/testgorilla-tgo-ui-components-page-header.mjs.map +1 -1
  39. package/fesm2022/testgorilla-tgo-ui-components-popover.mjs +94 -26
  40. package/fesm2022/testgorilla-tgo-ui-components-popover.mjs.map +1 -1
  41. package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs +1 -1
  42. package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs.map +1 -1
  43. package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs +1 -1
  44. package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs.map +1 -1
  45. package/fesm2022/testgorilla-tgo-ui-components-scale-table.mjs +1 -1
  46. package/fesm2022/testgorilla-tgo-ui-components-scale-table.mjs.map +1 -1
  47. package/fesm2022/testgorilla-tgo-ui-components-side-navigation.mjs +1 -1
  48. package/fesm2022/testgorilla-tgo-ui-components-side-navigation.mjs.map +1 -1
  49. package/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs +1 -1
  50. package/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs.map +1 -1
  51. package/fesm2022/testgorilla-tgo-ui-components-side-sheet.mjs +1 -1
  52. package/fesm2022/testgorilla-tgo-ui-components-side-sheet.mjs.map +1 -1
  53. package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs +1 -1
  54. package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs.map +1 -1
  55. package/fesm2022/testgorilla-tgo-ui-components-table.mjs +1 -1
  56. package/fesm2022/testgorilla-tgo-ui-components-table.mjs.map +1 -1
  57. package/fesm2022/testgorilla-tgo-ui-components-tag.mjs +33 -4
  58. package/fesm2022/testgorilla-tgo-ui-components-tag.mjs.map +1 -1
  59. package/fesm2022/testgorilla-tgo-ui-components-write-with-ai.mjs +1 -1
  60. package/fesm2022/testgorilla-tgo-ui-components-write-with-ai.mjs.map +1 -1
  61. package/mcp/catalog.json +1 -1
  62. package/package.json +1 -1
  63. package/types/testgorilla-tgo-ui-components-button.d.ts +21 -1
  64. package/types/testgorilla-tgo-ui-components-popover.d.ts +20 -3
  65. package/types/testgorilla-tgo-ui-components-tag.d.ts +16 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testgorilla/tgo-ui",
3
- "version": "11.13.1",
3
+ "version": "11.15.0",
4
4
  "license": "proprietary-license",
5
5
  "lint-staged": {
6
6
  "{projects,components}/**/*.ts": [
@@ -74,6 +74,20 @@ declare class ButtonComponent implements OnInit, AfterViewInit {
74
74
  * @memberof ButtonComponent
75
75
  */
76
76
  iconName: IconName | undefined;
77
+ /**
78
+ * Name of a second ui-icon rendered after the label, in addition to `iconName`.
79
+ * Pair it with `iconPosition="left"` to show a leading and a trailing icon at once.
80
+ *
81
+ * @type {IconName}
82
+ * @memberof ButtonComponent
83
+ */
84
+ trailingIconName: IconName | undefined;
85
+ /**
86
+ * Renders the trailing icon filled, independently of `iconFilled`.
87
+ *
88
+ * @memberof ButtonComponent
89
+ */
90
+ trailingIconFilled: boolean;
77
91
  /**
78
92
  * Indicator if the button should be disabled
79
93
  *
@@ -260,6 +274,7 @@ declare class ButtonComponent implements OnInit, AfterViewInit {
260
274
  coloredIcons: string[];
261
275
  labelEllipsis: boolean;
262
276
  icon: IconName;
277
+ trailingIcon: IconName;
263
278
  private static nextAriaLabelledId;
264
279
  ariaLabelledbyId: string;
265
280
  get typeIncluded(): boolean;
@@ -289,6 +304,11 @@ declare class ButtonComponent implements OnInit, AfterViewInit {
289
304
  focus(origin?: FocusOrigin): void;
290
305
  get getCompanyColor(): string;
291
306
  get shouldChangeFilledStatus(): boolean;
307
+ /**
308
+ * Whether this specific icon may be swapped to its filled variant on hover. Takes the icon as an
309
+ * argument because a button can render two, and a brand icon in one slot must not freeze the other.
310
+ */
311
+ canToggleFilled(icon: IconName): boolean;
292
312
  onKeydown(event: KeyboardEvent): void;
293
313
  onKeyup(event: KeyboardEvent): void;
294
314
  onLabelEllipsisChange(state: boolean): void;
@@ -296,7 +316,7 @@ declare class ButtonComponent implements OnInit, AfterViewInit {
296
316
  private isKnownIconName;
297
317
  private createAriaLabelledById;
298
318
  static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, [{ optional: true; }]>;
299
- static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "ui-button", never, { "size": { "alias": "size"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "label": { "alias": "label"; "required": false; }; "iconPosition": { "alias": "iconPosition"; "required": false; }; "justIcon": { "alias": "justIcon"; "required": false; }; "iconName": { "alias": "iconName"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "loadingWithLabel": { "alias": "loadingWithLabel"; "required": false; }; "fullWidth": { "alias": "fullWidth"; "required": false; }; "url": { "alias": "url"; "required": false; }; "urlTarget": { "alias": "urlTarget"; "required": false; }; "value": { "alias": "value"; "required": false; }; "tooltip": { "alias": "tooltip"; "required": false; }; "isPremium": { "alias": "isPremium"; "required": false; }; "type": { "alias": "type"; "required": false; }; "companyColor": { "alias": "companyColor"; "required": false; }; "buttonBadgeConfig": { "alias": "buttonBadgeConfig"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "disabledScaleOnClick": { "alias": "disabledScaleOnClick"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaExpanded": { "alias": "ariaExpanded"; "required": false; }; "ariaControls": { "alias": "ariaControls"; "required": false; }; "ariaPressed": { "alias": "ariaPressed"; "required": false; }; "ariaRequired": { "alias": "ariaRequired"; "required": false; }; "ariaLabelledby": { "alias": "ariaLabelledby"; "required": false; }; "ariaDescribedby": { "alias": "ariaDescribedby"; "required": false; }; "preventDefault": { "alias": "preventDefault"; "required": false; }; "hasBackground": { "alias": "hasBackground"; "required": false; }; "tooltipPosition": { "alias": "tooltipPosition"; "required": false; }; "role": { "alias": "role"; "required": false; }; "iconFilled": { "alias": "iconFilled"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; }, { "buttonClickEvent": "buttonClickEvent"; "buttonHoverEvent": "buttonHoverEvent"; }, never, never, true, never>;
319
+ static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "ui-button", never, { "size": { "alias": "size"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "label": { "alias": "label"; "required": false; }; "iconPosition": { "alias": "iconPosition"; "required": false; }; "justIcon": { "alias": "justIcon"; "required": false; }; "iconName": { "alias": "iconName"; "required": false; }; "trailingIconName": { "alias": "trailingIconName"; "required": false; }; "trailingIconFilled": { "alias": "trailingIconFilled"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "loadingWithLabel": { "alias": "loadingWithLabel"; "required": false; }; "fullWidth": { "alias": "fullWidth"; "required": false; }; "url": { "alias": "url"; "required": false; }; "urlTarget": { "alias": "urlTarget"; "required": false; }; "value": { "alias": "value"; "required": false; }; "tooltip": { "alias": "tooltip"; "required": false; }; "isPremium": { "alias": "isPremium"; "required": false; }; "type": { "alias": "type"; "required": false; }; "companyColor": { "alias": "companyColor"; "required": false; }; "buttonBadgeConfig": { "alias": "buttonBadgeConfig"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "disabledScaleOnClick": { "alias": "disabledScaleOnClick"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaExpanded": { "alias": "ariaExpanded"; "required": false; }; "ariaControls": { "alias": "ariaControls"; "required": false; }; "ariaPressed": { "alias": "ariaPressed"; "required": false; }; "ariaRequired": { "alias": "ariaRequired"; "required": false; }; "ariaLabelledby": { "alias": "ariaLabelledby"; "required": false; }; "ariaDescribedby": { "alias": "ariaDescribedby"; "required": false; }; "preventDefault": { "alias": "preventDefault"; "required": false; }; "hasBackground": { "alias": "hasBackground"; "required": false; }; "tooltipPosition": { "alias": "tooltipPosition"; "required": false; }; "role": { "alias": "role"; "required": false; }; "iconFilled": { "alias": "iconFilled"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; }, { "buttonClickEvent": "buttonClickEvent"; "buttonHoverEvent": "buttonHoverEvent"; }, never, never, true, never>;
300
320
  static ngAcceptInputType_preventDefault: unknown;
301
321
  static ngAcceptInputType_hasBackground: unknown;
302
322
  }
@@ -3,6 +3,9 @@ import { OnInit, OnDestroy, TemplateRef } from '@angular/core';
3
3
  import { HorizontalConnectionPos } from '@angular/cdk/overlay';
4
4
  import { CardSize } from '@testgorilla/tgo-ui/components/card';
5
5
 
6
+ /** How the popover is opened: on hover of the anchor, or on click. */
7
+ type PopoverTrigger = 'hover' | 'click';
8
+
6
9
  declare class PopoverDirective implements OnInit, OnDestroy {
7
10
  uiPopover: _angular_core.InputSignal<TemplateRef<unknown>>;
8
11
  popoverOffset: _angular_core.InputSignal<number>;
@@ -10,7 +13,12 @@ declare class PopoverDirective implements OnInit, OnDestroy {
10
13
  popoverOpen: _angular_core.InputSignal<boolean>;
11
14
  popoverCard: _angular_core.InputSignal<boolean>;
12
15
  popoverCardSize: _angular_core.InputSignal<CardSize>;
16
+ popoverTrigger: _angular_core.InputSignal<PopoverTrigger>;
17
+ popoverAriaLabel: _angular_core.InputSignal<string>;
13
18
  uiPopoverDisabled: _angular_core.InputSignal<boolean>;
19
+ private readonly openState;
20
+ /** Whether the popover is currently showing. Read it via `#ref="uiPopover"` or `viewChild(PopoverDirective)`. */
21
+ readonly isOpen: _angular_core.Signal<boolean>;
14
22
  private readonly overlay;
15
23
  private readonly elementRef;
16
24
  private readonly injector;
@@ -19,19 +27,28 @@ declare class PopoverDirective implements OnInit, OnDestroy {
19
27
  private openTimeout;
20
28
  private closeTimeout;
21
29
  private overlayListeners;
30
+ private dismissSubscriptions;
22
31
  onMouseEnter(): void;
23
32
  onMouseLeave(): void;
24
- private open;
33
+ onClick(): void;
34
+ /** Opens the popover. No-op while `uiPopoverDisabled` is `true` or it is already open. */
35
+ open(): void;
36
+ /** Closes the popover. Safe to call when it is already closed. */
37
+ close(): void;
38
+ /** Opens the popover when closed, closes it when open. */
39
+ toggle(): void;
25
40
  private createOverlay;
41
+ /** Click-triggered popovers dismiss on an outside pointer event or on Escape. */
42
+ private listenForDismiss;
26
43
  private scheduleOpen;
27
44
  private cancelOpen;
28
45
  private scheduleClose;
29
46
  private cancelClose;
30
- private close;
31
47
  ngOnInit(): void;
32
48
  ngOnDestroy(): void;
33
49
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<PopoverDirective, never>;
34
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<PopoverDirective, "[uiPopover]", never, { "uiPopover": { "alias": "uiPopover"; "required": true; "isSignal": true; }; "popoverOffset": { "alias": "popoverOffset"; "required": false; "isSignal": true; }; "popoverAlign": { "alias": "popoverAlign"; "required": false; "isSignal": true; }; "popoverOpen": { "alias": "popoverOpen"; "required": false; "isSignal": true; }; "popoverCard": { "alias": "popoverCard"; "required": false; "isSignal": true; }; "popoverCardSize": { "alias": "popoverCardSize"; "required": false; "isSignal": true; }; "uiPopoverDisabled": { "alias": "uiPopoverDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
50
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<PopoverDirective, "[uiPopover]", ["uiPopover"], { "uiPopover": { "alias": "uiPopover"; "required": true; "isSignal": true; }; "popoverOffset": { "alias": "popoverOffset"; "required": false; "isSignal": true; }; "popoverAlign": { "alias": "popoverAlign"; "required": false; "isSignal": true; }; "popoverOpen": { "alias": "popoverOpen"; "required": false; "isSignal": true; }; "popoverCard": { "alias": "popoverCard"; "required": false; "isSignal": true; }; "popoverCardSize": { "alias": "popoverCardSize"; "required": false; "isSignal": true; }; "popoverTrigger": { "alias": "popoverTrigger"; "required": false; "isSignal": true; }; "popoverAriaLabel": { "alias": "popoverAriaLabel"; "required": false; "isSignal": true; }; "uiPopoverDisabled": { "alias": "uiPopoverDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
35
51
  }
36
52
 
37
53
  export { PopoverDirective };
54
+ export type { PopoverTrigger };
@@ -70,6 +70,19 @@ declare class TagComponent {
70
70
  * @memberof TagComponent
71
71
  */
72
72
  pinnedBackground: _angular_core.InputSignalWithTransform<boolean, unknown>;
73
+ /**
74
+ * Clamps the tag to its parent's width, truncating the label, instead of overflowing it.
75
+ *
76
+ * Opt-in: enabling it gives the host a real layout box, so `width`, `height` and vertical
77
+ * margins set on `ui-tag` start applying, bare sibling tags flow inline instead of stacking,
78
+ * and a tag in an `overflow-x` strip shrinks rather than scrolls (`flex: 0 0 auto` opts out).
79
+ * Becomes the default in the next major.
80
+ *
81
+ * @type {boolean}
82
+ * @default false
83
+ * @memberof TagComponent
84
+ */
85
+ constrainWidth: _angular_core.InputSignalWithTransform<boolean, unknown>;
73
86
  /**
74
87
  * Specifies whether the element is disabled.
75
88
  *
@@ -155,6 +168,8 @@ declare class TagComponent {
155
168
  protected iconColor: IconColor;
156
169
  protected closeBtnFocused: _angular_core.WritableSignal<boolean>;
157
170
  protected readonly labelElement: _angular_core.Signal<ElementRef<HTMLElement> | undefined>;
171
+ protected readonly containerElement: _angular_core.Signal<ElementRef<HTMLElement> | undefined>;
172
+ private readonly ngZone;
158
173
  constructor();
159
174
  onPress(): void;
160
175
  setHoverState(state: boolean): void;
@@ -165,7 +180,7 @@ declare class TagComponent {
165
180
  readonly filled: _angular_core.Signal<boolean>;
166
181
  onKeydown($event: KeyboardEvent): void;
167
182
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<TagComponent, never>;
168
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<TagComponent, "ui-tag", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "allowClose": { "alias": "allowClose"; "required": false; "isSignal": true; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "isSelected": { "alias": "isSelected"; "required": false; "isSignal": true; }; "showIconWhenSelected": { "alias": "showIconWhenSelected"; "required": false; "isSignal": true; }; "pinnedBackground": { "alias": "pinnedBackground"; "required": false; "isSignal": true; }; "isDisabled": { "alias": "isDisabled"; "required": false; "isSignal": true; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "testId": { "alias": "testId"; "required": false; "isSignal": true; }; "ariaRequired": { "alias": "ariaRequired"; "required": false; "isSignal": true; }; "showBadge": { "alias": "showBadge"; "required": false; "isSignal": true; }; "notificationsAmount": { "alias": "notificationsAmount"; "required": false; "isSignal": true; }; }, { "isSelected": "isSelectedChange"; "close": "close"; "press": "press"; }, never, never, true, never>;
183
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<TagComponent, "ui-tag", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "allowClose": { "alias": "allowClose"; "required": false; "isSignal": true; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "isSelected": { "alias": "isSelected"; "required": false; "isSignal": true; }; "showIconWhenSelected": { "alias": "showIconWhenSelected"; "required": false; "isSignal": true; }; "pinnedBackground": { "alias": "pinnedBackground"; "required": false; "isSignal": true; }; "constrainWidth": { "alias": "constrainWidth"; "required": false; "isSignal": true; }; "isDisabled": { "alias": "isDisabled"; "required": false; "isSignal": true; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "testId": { "alias": "testId"; "required": false; "isSignal": true; }; "ariaRequired": { "alias": "ariaRequired"; "required": false; "isSignal": true; }; "showBadge": { "alias": "showBadge"; "required": false; "isSignal": true; }; "notificationsAmount": { "alias": "notificationsAmount"; "required": false; "isSignal": true; }; }, { "isSelected": "isSelectedChange"; "close": "close"; "press": "press"; }, never, never, true, never>;
169
184
  }
170
185
 
171
186
  declare class TagComponentModule {