@testgorilla/tgo-ui 11.7.0 → 11.9.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": "@testgorilla/tgo-ui",
3
- "version": "11.7.0",
3
+ "version": "11.9.0",
4
4
  "license": "proprietary-license",
5
5
  "lint-staged": {
6
6
  "{projects,components}/**/*.ts": [
@@ -4,13 +4,14 @@ import * as i5 from '@testgorilla/tgo-ui/components/core';
4
4
  import { ApplicationTheme, AlertBarType, AlertVariant, Color } from '@testgorilla/tgo-ui/components/core';
5
5
  export { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';
6
6
  import * as i3 from '@testgorilla/tgo-ui/components/icon';
7
- import { IconName } from '@testgorilla/tgo-ui/components/icon';
7
+ import { IconSize, IconName } from '@testgorilla/tgo-ui/components/icon';
8
8
  import * as i2 from '@testgorilla/tgo-ui/components/button';
9
9
  import { ButtonColor, ButtonSize } from '@testgorilla/tgo-ui/components/button';
10
10
  import * as i1 from '@angular/common';
11
11
  import * as i4 from '@testgorilla/tgo-ui/components/spinner';
12
12
 
13
13
  type LinkTargetType = '' | '_self' | '_blank' | '_parent' | '_top';
14
+ type AlertBannerSize = 'default' | 'small';
14
15
  interface AlertBannerAction {
15
16
  label: string;
16
17
  onClick: ($event: Event) => void;
@@ -96,6 +97,14 @@ declare class AlertBannerComponent implements OnInit, OnChanges {
96
97
  * @memberof AlertBannerComponent
97
98
  */
98
99
  applicationTheme: ApplicationTheme;
100
+ /**
101
+ * Alert density
102
+ *
103
+ * @type {AlertBannerSize}
104
+ * @default 'default'
105
+ * @memberof AlertBannerComponent
106
+ */
107
+ size: AlertBannerSize;
99
108
  /**
100
109
  * Sets the full width
101
110
  *
@@ -150,6 +159,7 @@ declare class AlertBannerComponent implements OnInit, OnChanges {
150
159
  */
151
160
  dismiss: EventEmitter<void>;
152
161
  get isDismissed(): boolean;
162
+ get iconSize(): IconSize;
153
163
  iconName: IconName;
154
164
  iconColor: Color;
155
165
  visible: boolean;
@@ -162,7 +172,7 @@ declare class AlertBannerComponent implements OnInit, OnChanges {
162
172
  private updateBanner;
163
173
  dismissClick(): void;
164
174
  static ɵfac: i0.ɵɵFactoryDeclaration<AlertBannerComponent, [{ optional: true; }]>;
165
- static ɵcmp: i0.ɵɵComponentDeclaration<AlertBannerComponent, "ui-alert-banner", never, { "alertType": { "alias": "alertType"; "required": false; }; "alertVariant": { "alias": "alertVariant"; "required": false; }; "message": { "alias": "message"; "required": false; }; "includeDismissButton": { "alias": "includeDismissButton"; "required": false; }; "shadow": { "alias": "shadow"; "required": false; }; "linkText": { "alias": "linkText"; "required": false; }; "linkUrl": { "alias": "linkUrl"; "required": false; }; "linkTarget": { "alias": "linkTarget"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "isFullWidth": { "alias": "isFullWidth"; "required": false; }; "closeButtonTooltip": { "alias": "closeButtonTooltip"; "required": false; }; "hasIcon": { "alias": "hasIcon"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; "fixed": { "alias": "fixed"; "required": false; }; "ariaDescribedby": { "alias": "ariaDescribedby"; "required": false; }; "secondaryAlerts": { "alias": "secondaryAlerts"; "required": false; }; }, { "dismiss": "dismiss"; }, never, ["*"], true, never>;
175
+ static ɵcmp: i0.ɵɵComponentDeclaration<AlertBannerComponent, "ui-alert-banner", never, { "alertType": { "alias": "alertType"; "required": false; }; "alertVariant": { "alias": "alertVariant"; "required": false; }; "message": { "alias": "message"; "required": false; }; "includeDismissButton": { "alias": "includeDismissButton"; "required": false; }; "shadow": { "alias": "shadow"; "required": false; }; "linkText": { "alias": "linkText"; "required": false; }; "linkUrl": { "alias": "linkUrl"; "required": false; }; "linkTarget": { "alias": "linkTarget"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "size": { "alias": "size"; "required": false; }; "isFullWidth": { "alias": "isFullWidth"; "required": false; }; "closeButtonTooltip": { "alias": "closeButtonTooltip"; "required": false; }; "hasIcon": { "alias": "hasIcon"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; "fixed": { "alias": "fixed"; "required": false; }; "ariaDescribedby": { "alias": "ariaDescribedby"; "required": false; }; "secondaryAlerts": { "alias": "secondaryAlerts"; "required": false; }; }, { "dismiss": "dismiss"; }, never, ["*"], true, never>;
166
176
  }
167
177
 
168
178
  declare class AlertBannerComponentModule {
@@ -172,4 +182,4 @@ declare class AlertBannerComponentModule {
172
182
  }
173
183
 
174
184
  export { AlertBannerComponent, AlertBannerComponentModule };
175
- export type { AlertBannerAction, LinkTargetType };
185
+ export type { AlertBannerAction, AlertBannerSize, LinkTargetType };
@@ -9,6 +9,7 @@ import * as i1 from '@angular/common';
9
9
  type CardSize = 'small' | 'medium' | 'large';
10
10
  type CardSizeVariant = 'regular' | 'condensed';
11
11
  type CardVariant = 'default' | 'shadow' | 'state' | 'error' | 'educative' | 'premium' | 'ai' | 'actionDriver' | 'neutral' | 'neutral-state';
12
+ declare const NON_SELECTABLE_CARD_VARIANTS: readonly CardVariant[];
12
13
 
13
14
  declare class CardComponent implements OnChanges, OnInit {
14
15
  private readonly defaultAppTheme;
@@ -88,9 +89,20 @@ declare class CardComponent implements OnChanges, OnInit {
88
89
  get cardVariant(): CardVariant;
89
90
  get errorIconSize(): IconSize;
90
91
  get isSelected(): boolean;
91
- selectCard(): void;
92
+ /**
93
+ * Whether activating the card does anything. Drives `tabindex`, `role` and `aria-pressed`.
94
+ *
95
+ * @type {boolean}
96
+ * @memberof CardComponent
97
+ */
98
+ get isActionable(): boolean;
99
+ /**
100
+ * @param event The originating DOM event. Events raised inside the projected footer are ignored.
101
+ */
102
+ selectCard(event?: Event): void;
103
+ private isFromProjectedFooter;
92
104
  static ɵfac: i0.ɵɵFactoryDeclaration<CardComponent, [{ optional: true; }]>;
93
- static ɵcmp: i0.ɵɵComponentDeclaration<CardComponent, "ui-card", never, { "size": { "alias": "size"; "required": false; }; "sizeVariant": { "alias": "sizeVariant"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "errors": { "alias": "errors"; "required": false; }; "errorsSize": { "alias": "errorsSize"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "allowSelect": { "alias": "allowSelect"; "required": false; }; "allowFocus": { "alias": "allowFocus"; "required": false; }; }, { "cardSelected": "cardSelected"; }, never, ["*"], true, never>;
105
+ static ɵcmp: i0.ɵɵComponentDeclaration<CardComponent, "ui-card", never, { "size": { "alias": "size"; "required": false; }; "sizeVariant": { "alias": "sizeVariant"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "errors": { "alias": "errors"; "required": false; }; "errorsSize": { "alias": "errorsSize"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "allowSelect": { "alias": "allowSelect"; "required": false; }; "allowFocus": { "alias": "allowFocus"; "required": false; }; }, { "cardSelected": "cardSelected"; }, never, ["*", "[cardFooter]"], true, never>;
94
106
  }
95
107
 
96
108
  declare class CardComponentModule {
@@ -99,5 +111,5 @@ declare class CardComponentModule {
99
111
  static ɵinj: i0.ɵɵInjectorDeclaration<CardComponentModule>;
100
112
  }
101
113
 
102
- export { CardComponent, CardComponentModule };
114
+ export { CardComponent, CardComponentModule, NON_SELECTABLE_CARD_VARIANTS };
103
115
  export type { CardSize, CardSizeVariant, CardVariant };
@@ -93,7 +93,10 @@ declare class PromptComponent implements ControlValueAccessor, OnInit, AfterView
93
93
  private compositionEndedAt;
94
94
  filteredDropdownItems: _angular_core.Signal<PromptDropdownItem[]>;
95
95
  itemsDropdownVisible: _angular_core.Signal<boolean>;
96
+ /** True while focus sits anywhere inside the prompt. */
97
+ isContainerFocused: _angular_core.WritableSignal<boolean>;
96
98
  isHighlighted: _angular_core.Signal<boolean>;
99
+ readonly showFocusRing: _angular_core.Signal<boolean>;
97
100
  fileInputAccept: _angular_core.Signal<string>;
98
101
  isLocked: _angular_core.Signal<boolean>;
99
102
  private readonly hasContent;
@@ -121,6 +124,8 @@ declare class PromptComponent implements ControlValueAccessor, OnInit, AfterView
121
124
  onTextareaEnter(event: Event): void;
122
125
  dropdownOutsideClick(): void;
123
126
  onFieldBlur(): void;
127
+ onContainerFocusIn(): void;
128
+ onContainerFocusOut(event: FocusEvent): void;
124
129
  itemsDropdownOutsideClick(event: MouseEvent): void;
125
130
  closeItemsDropdown(): void;
126
131
  onTextareaEscape(event: Event): void;
@@ -142,7 +147,7 @@ declare class PromptComponent implements ControlValueAccessor, OnInit, AfterView
142
147
  private handleActionTagFile;
143
148
  private emitValue;
144
149
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<PromptComponent, never>;
145
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<PromptComponent, "ui-prompt", never, { "tags": { "alias": "tags"; "required": false; "isSignal": true; }; "actionTag": { "alias": "actionTag"; "required": false; "isSignal": true; }; "maxCharacters": { "alias": "maxCharacters"; "required": false; "isSignal": true; }; "supportedFileTypes": { "alias": "supportedFileTypes"; "required": false; "isSignal": true; }; "autoClear": { "alias": "autoClear"; "required": false; "isSignal": true; }; "showSendButton": { "alias": "showSendButton"; "required": false; "isSignal": true; }; "sendButtonDisabled": { "alias": "sendButtonDisabled"; "required": false; "isSignal": true; }; "enableFileUpload": { "alias": "enableFileUpload"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "dropdownItems": { "alias": "dropdownItems"; "required": false; "isSignal": true; }; "dropdownHeading": { "alias": "dropdownHeading"; "required": false; "isSignal": true; }; "showDropdownClose": { "alias": "showDropdownClose"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "promptData": "promptData"; "actionTagFileSelected": "actionTagFileSelected"; "dropdownItemSelected": "dropdownItemSelected"; "dropdownClosed": "dropdownClosed"; }, never, never, true, never>;
150
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<PromptComponent, "ui-prompt", never, { "tags": { "alias": "tags"; "required": false; "isSignal": true; }; "actionTag": { "alias": "actionTag"; "required": false; "isSignal": true; }; "maxCharacters": { "alias": "maxCharacters"; "required": false; "isSignal": true; }; "supportedFileTypes": { "alias": "supportedFileTypes"; "required": false; "isSignal": true; }; "autoClear": { "alias": "autoClear"; "required": false; "isSignal": true; }; "showSendButton": { "alias": "showSendButton"; "required": false; "isSignal": true; }; "sendButtonDisabled": { "alias": "sendButtonDisabled"; "required": false; "isSignal": true; }; "enableFileUpload": { "alias": "enableFileUpload"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "dropdownItems": { "alias": "dropdownItems"; "required": false; "isSignal": true; }; "dropdownHeading": { "alias": "dropdownHeading"; "required": false; "isSignal": true; }; "showDropdownClose": { "alias": "showDropdownClose"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "promptData": "promptData"; "actionTagFileSelected": "actionTagFileSelected"; "dropdownItemSelected": "dropdownItemSelected"; "dropdownClosed": "dropdownClosed"; }, never, ["[promptFooter]"], true, never>;
146
151
  static ngAcceptInputType_disabled: unknown;
147
152
  }
148
153
 
@@ -2,6 +2,7 @@ import * as _angular_core from '@angular/core';
2
2
  import { EventEmitter, ChangeDetectorRef } from '@angular/core';
3
3
  import { DecimalPipe } from '@angular/common';
4
4
  import { Validator, AbstractControl, ValidationErrors } from '@angular/forms';
5
+ import { MatSliderDragEvent } from '@angular/material/slider';
5
6
  import { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';
6
7
  export { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';
7
8
 
@@ -108,7 +109,33 @@ declare class SliderComponent implements Validator {
108
109
  minLabel: _angular_core.InputSignal<string | undefined>;
109
110
  maxLabel: _angular_core.InputSignal<string | undefined>;
110
111
  inputWidth: _angular_core.InputSignal<number>;
112
+ /**
113
+ * Controls whether the value bubble pops above the thumb on hover and while dragging.
114
+ * Set it to false for scrubber-style sliders whose designs do not show one.
115
+ * Applies to both the basic and the range variant.
116
+ */
117
+ showValueBubble: _angular_core.InputSignalWithTransform<boolean, unknown>;
111
118
  sliderValueChange: EventEmitter<SliderValue>;
119
+ /**
120
+ * Emitted with the current value when the user starts dragging the thumb.
121
+ * Basic variant only, and never emitted for programmatic value writes, so a consumer
122
+ * that also drives the slider on a timer can tell a user drag apart from its own write.
123
+ */
124
+ dragStart: _angular_core.OutputEmitterRef<number>;
125
+ /**
126
+ * Emitted with the released value when the user stops dragging the thumb.
127
+ * Basic variant only. See {@link dragStart}.
128
+ */
129
+ dragEnd: _angular_core.OutputEmitterRef<number>;
130
+ /**
131
+ * Tracks hover, so the value bubble markup is only mounted while the pointer is over the slider.
132
+ * Starts true to keep the at-rest markup identical to what the component shipped before
133
+ * `showValueBubble` existed: Material leaves the bubble invisible until the thumb is active, and
134
+ * unmounting it changes how the disabled slider's opacity layer rasterises its text.
135
+ */
136
+ private readonly isHovered;
137
+ /** Material renders the value bubble only while `discrete` is set, so gate it on both hover and the input. */
138
+ protected readonly isDiscrete: _angular_core.Signal<boolean>;
112
139
  cdr: ChangeDetectorRef;
113
140
  decimalPipe: DecimalPipe;
114
141
  private control?;
@@ -123,6 +150,9 @@ declare class SliderComponent implements Validator {
123
150
  setDisabledState(isDisabled: boolean): void;
124
151
  writeValue(value: SliderValue): void;
125
152
  protected onValueChange(ev?: number): void;
153
+ protected onSliderHover(isHovered: boolean): void;
154
+ protected onDragStart(event: MatSliderDragEvent): void;
155
+ protected onDragEnd(event: MatSliderDragEvent): void;
126
156
  protected onInputBlur(inputName: string): void;
127
157
  protected onInputFocus(): void;
128
158
  private isValueChanged;
@@ -131,7 +161,7 @@ declare class SliderComponent implements Validator {
131
161
  formatLabel(value: number): string;
132
162
  validate(control: AbstractControl): ValidationErrors | null;
133
163
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SliderComponent, [{ optional: true; }]>;
134
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SliderComponent, "ui-slider", never, { "max": { "alias": "max"; "required": false; }; "min": { "alias": "min"; "required": false; }; "percentage": { "alias": "percentage"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "sliderStart": { "alias": "sliderStart"; "required": false; }; "sliderEnd": { "alias": "sliderEnd"; "required": false; }; "label": { "alias": "label"; "required": false; }; "showInputs": { "alias": "showInputs"; "required": false; }; "step": { "alias": "step"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "useDecimal": { "alias": "useDecimal"; "required": false; "isSignal": true; }; "useThousandsSeparator": { "alias": "useThousandsSeparator"; "required": false; "isSignal": true; }; "minLabel": { "alias": "minLabel"; "required": false; "isSignal": true; }; "maxLabel": { "alias": "maxLabel"; "required": false; "isSignal": true; }; "inputWidth": { "alias": "inputWidth"; "required": false; "isSignal": true; }; }, { "sliderValueChange": "sliderValueChange"; }, never, never, true, never>;
164
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SliderComponent, "ui-slider", never, { "max": { "alias": "max"; "required": false; }; "min": { "alias": "min"; "required": false; }; "percentage": { "alias": "percentage"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "sliderStart": { "alias": "sliderStart"; "required": false; }; "sliderEnd": { "alias": "sliderEnd"; "required": false; }; "label": { "alias": "label"; "required": false; }; "showInputs": { "alias": "showInputs"; "required": false; }; "step": { "alias": "step"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "useDecimal": { "alias": "useDecimal"; "required": false; "isSignal": true; }; "useThousandsSeparator": { "alias": "useThousandsSeparator"; "required": false; "isSignal": true; }; "minLabel": { "alias": "minLabel"; "required": false; "isSignal": true; }; "maxLabel": { "alias": "maxLabel"; "required": false; "isSignal": true; }; "inputWidth": { "alias": "inputWidth"; "required": false; "isSignal": true; }; "showValueBubble": { "alias": "showValueBubble"; "required": false; "isSignal": true; }; }, { "sliderValueChange": "sliderValueChange"; "dragStart": "dragStart"; "dragEnd": "dragEnd"; }, never, never, true, never>;
135
165
  }
136
166
 
137
167
  declare class SliderComponentModule {