@ascentgl/ads-ui 22.1.0 → 22.8.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": "@ascentgl/ads-ui",
3
- "version": "22.1.0",
3
+ "version": "22.8.0",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": ">=22.0.0",
6
6
  "date-fns": ">=4.1.0",
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { OnChanges, SimpleChanges, ElementRef, OnInit, AfterContentInit, OnDestroy, Renderer2, AfterViewInit, ChangeDetectorRef, SimpleChange, EventEmitter, TemplateRef, DoCheck, AfterViewChecked, NgZone, QueryList } from '@angular/core';
3
3
  import { AdsIconRegistry, IconThemes } from '@ascentgl/ads-icons';
4
- import { adsIcon } from '@ascentgl/ads-icons/icons';
4
+ import { adsIcon, AdsIcon } from '@ascentgl/ads-icons/icons';
5
5
  import { MatMenuPanel, MatMenuTrigger, MatMenu } from '@angular/material/menu';
6
6
  import { ScrollStrategy, ConnectedPosition } from '@angular/cdk/overlay';
7
7
  import { Subject, Subscription, Observable } from 'rxjs';
@@ -96,7 +96,7 @@ declare class AdsNumericBadgeComponent extends AdsIconHoverComponent {
96
96
  /** provide icon name. NOTE: the icon must be registered in icon registry **/
97
97
  name: i0.InputSignal<adsIcon>;
98
98
  /** choose ads icon theme **/
99
- theme: i0.InputSignal<"primary" | "iconPrimary" | "success" | "warn" | "white">;
99
+ theme: i0.InputSignal<"iconPrimary" | "primary" | "success" | "warn" | "white">;
100
100
  /** set badge value as number **/
101
101
  value: i0.InputSignal<number>;
102
102
  /** @ignore **/
@@ -271,6 +271,76 @@ declare class AscentCardComponent {
271
271
  static ɵcmp: i0.ɵɵComponentDeclaration<AscentCardComponent, "ascent-card", never, { "borderColor": { "alias": "borderColor"; "required": false; }; "borderWidth": { "alias": "borderWidth"; "required": false; }; "borderRadius": { "alias": "borderRadius"; "required": false; }; }, {}, never, ["*"], true, never>;
272
272
  }
273
273
 
274
+ /**
275
+ * Configuration for the optional tag rendered next to the card heading.
276
+ */
277
+ interface RateOptionCardTag {
278
+ /** Text shown inside the tag */
279
+ label: string;
280
+ /** Background color of the tag (Colors enum value or any CSS color string) */
281
+ color?: Colors | string;
282
+ /** Optional text color override */
283
+ textColor?: Colors | string;
284
+ /** Optional leading icon rendered inside the tag. Pass the icon object so it
285
+ * can be registered automatically (e.g. `adsIconCheckCircle`). */
286
+ icon?: AdsIcon;
287
+ /** Icon stroke color — maps to `ads-icon [stroke]`. Defaults to `white`.
288
+ * Forced to `dark` while the card is disabled. */
289
+ iconStroke?: keyof IconThemes;
290
+ /** Icon fill/theme color — maps to `ads-icon [theme]`. Left unset by default.
291
+ * Forced to `dark` while the card is disabled. */
292
+ iconTheme?: keyof IconThemes;
293
+ }
294
+
295
+ /**
296
+ * A selectable rate/quote option card (ADS-328/329/330).
297
+ *
298
+ * Presentational and domain-agnostic: the heading, sub-heading, price and tag
299
+ * are inputs, and the lower details line is projected via `<ng-content>`.
300
+ *
301
+ * Supports the five design states — default, hover, pressed (`:active`),
302
+ * active (`selected`) and `disabled`. On the disabled state the tag switches to
303
+ * a muted treatment and its icon color changes accordingly.
304
+ */
305
+ declare class AdsRateOptionCardComponent {
306
+ private registry;
307
+ constructor(registry: AdsIconRegistry);
308
+ /** Primary heading (e.g. the carrier name) */
309
+ readonly heading: i0.InputSignal<string>;
310
+ /** Secondary line under the heading (e.g. the service mode) */
311
+ readonly subheading: i0.InputSignal<string | undefined>;
312
+ /** Formatted price string shown on the right (e.g. `"$487.50"`) */
313
+ readonly price: i0.InputSignal<string | undefined>;
314
+ /** Show the selection check indicator after the price */
315
+ readonly showCheckIcon: i0.InputSignal<boolean>;
316
+ /** Optional tag rendered next to the heading */
317
+ readonly tag: i0.InputSignal<RateOptionCardTag | null>;
318
+ /** Marks the card as the active/selected option */
319
+ readonly selected: i0.InputSignal<boolean>;
320
+ /** Disables interaction and mutes the card (including the tag icon color) */
321
+ readonly disabled: i0.InputSignal<boolean>;
322
+ /** Stable id echoed back on activation and used to build child element ids */
323
+ readonly cardId: i0.InputSignal<string>;
324
+ /** Emitted with the `cardId` when the card is activated by click or keyboard */
325
+ readonly activate: i0.OutputEmitterRef<string>;
326
+ /** Border color of the tag (only visible in the disabled treatment). */
327
+ readonly tagBorderColor = Colors.Light;
328
+ /** Tag background — flips to a neutral surface when disabled. */
329
+ readonly tagBackground: i0.Signal<string>;
330
+ /** Tag text color — flips to dark when disabled. */
331
+ readonly tagTextColor: i0.Signal<string>;
332
+ /** Tag border width — only drawn in the disabled treatment. */
333
+ readonly tagBorderWidth: i0.Signal<number>;
334
+ /** Tag icon stroke color — `dark` when disabled, otherwise the tag's `iconStroke` (default `white`). */
335
+ readonly tagIconStroke: i0.Signal<keyof IconThemes>;
336
+ /** Tag icon theme/fill color — `dark` when disabled, otherwise the tag's `iconTheme` (unset by default). */
337
+ readonly tagIconTheme: i0.Signal<keyof IconThemes | undefined>;
338
+ /** @ignore */
339
+ onActivate(event?: Event): void;
340
+ static ɵfac: i0.ɵɵFactoryDeclaration<AdsRateOptionCardComponent, never>;
341
+ static ɵcmp: i0.ɵɵComponentDeclaration<AdsRateOptionCardComponent, "ads-rate-option-card", never, { "heading": { "alias": "heading"; "required": true; "isSignal": true; }; "subheading": { "alias": "subheading"; "required": false; "isSignal": true; }; "price": { "alias": "price"; "required": false; "isSignal": true; }; "showCheckIcon": { "alias": "showCheckIcon"; "required": false; "isSignal": true; }; "tag": { "alias": "tag"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "cardId": { "alias": "cardId"; "required": false; "isSignal": true; }; }, { "activate": "activate"; }, never, ["*"], true, never>;
342
+ }
343
+
274
344
  type Tag = {
275
345
  id: string;
276
346
  tag: string;
@@ -2249,6 +2319,12 @@ interface AdsMenuDropDownItem {
2249
2319
  icon?: adsIcon;
2250
2320
  /** Whether the item is disabled (skipped during keyboard navigation and not selectable) */
2251
2321
  disabled?: boolean;
2322
+ /**
2323
+ * When true, a horizontal divider is rendered directly above this item (unless it is the
2324
+ * first item). Use to visually group actions — e.g. separating a "Set as default" action
2325
+ * from the rest of the menu. Purely presentational; does not affect keyboard navigation.
2326
+ */
2327
+ separatorBefore?: boolean;
2252
2328
  }
2253
2329
 
2254
2330
  declare class AdsMenuDropDownComponent implements AfterViewInit {
@@ -3327,11 +3403,18 @@ type AdsNavItemV2 = {
3327
3403
  href?: string;
3328
3404
  subItems?: AdsNavSubItemV2[];
3329
3405
  showDividerAfterItem?: boolean;
3406
+ /** Force the item highlighted regardless of the router (for click-driven, non-route items). */
3407
+ active?: boolean;
3330
3408
  };
3331
3409
  type AdsNavSubItemV2 = {
3332
3410
  label: string;
3333
3411
  icon?: adsIcon;
3334
- href: string;
3412
+ /** Optional: omit for click-driven items that are not routes (emit `itemSelect` instead). */
3413
+ href?: string;
3414
+ /** Caller context carried through `itemSelect` (e.g. a tab index). */
3415
+ id?: string;
3416
+ /** Force the item highlighted regardless of the router (for click-driven, non-route items). */
3417
+ active?: boolean;
3335
3418
  };
3336
3419
 
3337
3420
  declare class AdsSideNavBarV2Component implements OnInit, OnDestroy {
@@ -3347,6 +3430,8 @@ declare class AdsSideNavBarV2Component implements OnInit, OnDestroy {
3347
3430
  collapsed: i0.InputSignal<boolean | undefined>;
3348
3431
  /** Emits when collapsed state changes */
3349
3432
  collapsedChange: i0.OutputEmitterRef<boolean>;
3433
+ /** Emits when a click-driven sub-item (one without an `href`) is selected. */
3434
+ itemSelect: i0.OutputEmitterRef<AdsNavSubItemV2>;
3350
3435
  /** @ignore */
3351
3436
  isMobile: i0.WritableSignal<boolean>;
3352
3437
  /** @ignore */
@@ -3365,16 +3450,18 @@ declare class AdsSideNavBarV2Component implements OnInit, OnDestroy {
3365
3450
  toggleCollapsed(): void;
3366
3451
  /** @ignore */
3367
3452
  onNavItemClick(): void;
3453
+ /** @ignore Click handler for sub-items; emits `itemSelect` for non-route (hrefless) items. */
3454
+ onSubItemClick(item: AdsNavSubItemV2): void;
3368
3455
  /** @ignore */
3369
3456
  private checkMobile;
3370
3457
  /** @ignore */
3371
3458
  hasActiveLink(item: AdsNavItemV2): boolean;
3372
- /** @ignore */
3459
+ /** @ignore Explicit `active` flag wins; falls back to a router match when `href` is set. */
3373
3460
  hasActiveSubLink(item: AdsNavSubItemV2): boolean;
3374
3461
  /** @ignore */
3375
3462
  private isActive;
3376
3463
  static ɵfac: i0.ɵɵFactoryDeclaration<AdsSideNavBarV2Component, never>;
3377
- static ɵcmp: i0.ɵɵComponentDeclaration<AdsSideNavBarV2Component, "ads-side-nav-bar-v2", never, { "navItems": { "alias": "navItems"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; }, { "collapsedChange": "collapsedChange"; }, never, never, true, never>;
3464
+ static ɵcmp: i0.ɵɵComponentDeclaration<AdsSideNavBarV2Component, "ads-side-nav-bar-v2", never, { "navItems": { "alias": "navItems"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; }, { "collapsedChange": "collapsedChange"; "itemSelect": "itemSelect"; }, never, never, true, never>;
3378
3465
  }
3379
3466
 
3380
3467
  type MainMenuItem = {
@@ -3857,6 +3944,12 @@ interface Tab {
3857
3944
  disabled?: boolean;
3858
3945
  template?: TemplateRef<unknown>;
3859
3946
  headerTemplate?: TemplateRef<unknown>;
3947
+ /** CSS class applied to the tab's header element (mat-tab `labelClass`). */
3948
+ labelClass?: string;
3949
+ /** Context object passed to `headerTemplate` and `template` so one template can render per-tab data. */
3950
+ templateContext?: unknown;
3951
+ /** When `true`, the tab content renders lazily via `matTabContent` (only while the tab is active). */
3952
+ lazy?: boolean;
3860
3953
  }
3861
3954
  declare class AdsTabsComponent implements AfterViewInit {
3862
3955
  tabGroup: i0.Signal<MatTabGroup>;
@@ -3868,6 +3961,10 @@ declare class AdsTabsComponent implements AfterViewInit {
3868
3961
  activeColor: Colors | undefined;
3869
3962
  /** When `true`, the border-bottom on inactive (non-active, non-disabled) tabs is hidden. Defaults to `false`. */
3870
3963
  hideInactiveBorder: boolean;
3964
+ /** When `false`, tab headers size to their content instead of stretching to fill the width. Defaults to `true`. */
3965
+ stretchTabs: boolean;
3966
+ /** Tab change animation duration forwarded to `mat-tab-group` (e.g. `'500ms'`). When `undefined`, Material's default is used. */
3967
+ animationDuration: string | number | undefined;
3871
3968
  selectedIndexChange: EventEmitter<number>;
3872
3969
  tabChange: EventEmitter<{
3873
3970
  index: number;
@@ -3877,7 +3974,7 @@ declare class AdsTabsComponent implements AfterViewInit {
3877
3974
  get _activeColorVar(): string | null;
3878
3975
  ngAfterViewInit(): void;
3879
3976
  static ɵfac: i0.ɵɵFactoryDeclaration<AdsTabsComponent, never>;
3880
- static ɵcmp: i0.ɵɵComponentDeclaration<AdsTabsComponent, "ads-tabs", never, { "tabs": { "alias": "tabs"; "required": false; }; "selectedIndex": { "alias": "selectedIndex"; "required": false; }; "tabWidth": { "alias": "tabWidth"; "required": false; }; "activeColor": { "alias": "activeColor"; "required": false; }; "hideInactiveBorder": { "alias": "hideInactiveBorder"; "required": false; }; }, { "selectedIndexChange": "selectedIndexChange"; "tabChange": "tabChange"; }, never, never, true, never>;
3977
+ static ɵcmp: i0.ɵɵComponentDeclaration<AdsTabsComponent, "ads-tabs", never, { "tabs": { "alias": "tabs"; "required": false; }; "selectedIndex": { "alias": "selectedIndex"; "required": false; }; "tabWidth": { "alias": "tabWidth"; "required": false; }; "activeColor": { "alias": "activeColor"; "required": false; }; "hideInactiveBorder": { "alias": "hideInactiveBorder"; "required": false; }; "stretchTabs": { "alias": "stretchTabs"; "required": false; }; "animationDuration": { "alias": "animationDuration"; "required": false; }; }, { "selectedIndexChange": "selectedIndexChange"; "tabChange": "tabChange"; }, never, never, true, never>;
3881
3978
  }
3882
3979
 
3883
3980
  declare enum CountryCode {
@@ -4043,5 +4140,5 @@ declare function provideAdsUi(config: AdsUiConfig): {
4043
4140
  useValue: AdsUiConfig;
4044
4141
  }[];
4045
4142
 
4046
- export { AdsArchitectureLogoComponent, AdsAscentLogoComponent, AdsAvatarComponent, AdsBaselineWidgetComponent, AdsBreadcrumbComponent, AdsBubbleComponent, AdsButtonComponent, AdsButtonContainerComponent, AdsCardComponent, AdsCheckboxComponent, AdsChipComponent, AdsColumnSortFilterMenuComponent, AdsCreateTagComponent, AdsCurrencyFieldComponent, AdsCustomHeaderComponent, AdsCustomerPortalLogoComponent, AdsCxaLogoComponent, AdsDatepickerComponent, AdsDatetimepickerComponent, AdsDragAndDropListComponent, AdsDropdownComponent, AdsErrorPageCodeComponent, AdsErrorPageComponent, AdsExpansionPanelComponent, AdsFilterMenuComponent, AdsFooterComponent, AdsFooterContainerComponent, AdsGenericLogoComponent, AdsHeaderComponent, AdsHeaderContainerComponent, AdsHistoryStepperComponent, AdsHorizontalNavBarComponent, AdsHorizontalStepperComponent, AdsIconButtonComponent, AdsIconHoverComponent, AdsInputComponent, AdsInputDropdownComponent, AdsInternationalPhoneFieldComponent, AdsLinkButtonComponent, AdsMainMenuComponent, AdsMenuDropDownComponent, AdsMenuDropDownTriggerDirective, AdsModalComponent, AdsMultiSelectDropdownComponent, AdsNavMenuComponent, AdsNavigationCollapseHandleComponent, AdsNavigationComponent, AdsNavigationHeaderComponent, AdsNavigationItemComponent, AdsNavigationItemsContainerComponent, AdsNumericBadgeComponent, AdsNumericStepperComponent, AdsOrgDisplayTextComponent, AdsPeakEssentialsLogoComponent, AdsPeakMarketplaceLogoComponent, AdsPeakOrderManagementLogoComponent, AdsPhoneFieldComponent, AdsPilotPayLogoComponent, AdsPrimaryLogoComponent, AdsProgressBarComponent, AdsProgressIndicatorSpinnerComponent, AdsProgressSpinnerComponent, AdsProgressStepperComponent, AdsRadioButtonComponent, AdsScmsLogoComponent, AdsScmsSideNavBarComponent, AdsSearchDropdownComponent, AdsSearchInputComponent, AdsShipmentHorizontalStepperComponent, AdsSideNavBarComponent, AdsSideNavBarV2Component, AdsSlideToggleComponent, AdsSliderComponent, AdsSnackbarComponent, AdsSortMenuComponent, AdsSplashPageComponent, AdsStepperComponent, AdsSubNavigationButtonComponent, AdsTableComponent, AdsTabsComponent, AdsTagComponent, AdsTagContainerComponent, AdsTextareaComponent, AdsTimeFieldComponent, AdsTimepickerComponent, AdsVerticalSideNavigationStepperComponent, AdsWizardStepperComponent, AscentCardComponent, BadgeColor, Colors, CountryCode, CustomDatetimeAdapter, DividerComponent, ErrorPageDefault, HistoryAction, HorizontalStepStatus, MainMenuService, ModalActionType, ModalPanelClass, PanelClass, ShellLayoutComponent, SpinnerSize, StepStatus, TableBreakpoint, ViewportService, WindowService, WizardStepStatus, provideAdsUi };
4047
- export type { ActiveFilter, ActiveSort, AdsMenuDropDownItem, AdsMenuDropDownPosition, AdsModalData, AdsNavItemV2, AdsNavSubItemV2, AdsUiConfig, Breadcrumb, ColumnFilterOption, ColumnSortFilterConfig, ColumnSortOption, ColumnVisibilityControl, Copyright, CustomHeaderParams, DROP_CALLBACK_INDEXES, DividerStyle, ErrorPageConfig, ErrorPageInfoColumn, FilterOptionsSortComparator, FilterValueFormatter, HistoryContextTag, HistoryEvent, HistoryGroup, HorizontalNavLink, HorizontalStep, IconButtonSize, Link, MainMenuItem, NavItem, NavMenuItem, NumericStep, ProgressStep, ScmsNavItem, ScmsNavSubItem, SearchDropdownComponentOptions, SearchDropdownDisplayControlValue, SearchDropdownStaticOption, SearchDropdownStaticOptionTemplateContext, ShipmentStep, Size, SnackBarData, SortComparator, SortMenuChangeEvent, SortType, Step, Tab, Tag, UNSUBSCRIBE_FUNCTIONS_COLLECTION, Variant, VerticalSideNavigationStep, WizardStep };
4143
+ export { AdsArchitectureLogoComponent, AdsAscentLogoComponent, AdsAvatarComponent, AdsBaselineWidgetComponent, AdsBreadcrumbComponent, AdsBubbleComponent, AdsButtonComponent, AdsButtonContainerComponent, AdsCardComponent, AdsCheckboxComponent, AdsChipComponent, AdsColumnSortFilterMenuComponent, AdsCreateTagComponent, AdsCurrencyFieldComponent, AdsCustomHeaderComponent, AdsCustomerPortalLogoComponent, AdsCxaLogoComponent, AdsDatepickerComponent, AdsDatetimepickerComponent, AdsDragAndDropListComponent, AdsDropdownComponent, AdsErrorPageCodeComponent, AdsErrorPageComponent, AdsExpansionPanelComponent, AdsFilterMenuComponent, AdsFooterComponent, AdsFooterContainerComponent, AdsGenericLogoComponent, AdsHeaderComponent, AdsHeaderContainerComponent, AdsHistoryStepperComponent, AdsHorizontalNavBarComponent, AdsHorizontalStepperComponent, AdsIconButtonComponent, AdsIconHoverComponent, AdsInputComponent, AdsInputDropdownComponent, AdsInternationalPhoneFieldComponent, AdsLinkButtonComponent, AdsMainMenuComponent, AdsMenuDropDownComponent, AdsMenuDropDownTriggerDirective, AdsModalComponent, AdsMultiSelectDropdownComponent, AdsNavMenuComponent, AdsNavigationCollapseHandleComponent, AdsNavigationComponent, AdsNavigationHeaderComponent, AdsNavigationItemComponent, AdsNavigationItemsContainerComponent, AdsNumericBadgeComponent, AdsNumericStepperComponent, AdsOrgDisplayTextComponent, AdsPeakEssentialsLogoComponent, AdsPeakMarketplaceLogoComponent, AdsPeakOrderManagementLogoComponent, AdsPhoneFieldComponent, AdsPilotPayLogoComponent, AdsPrimaryLogoComponent, AdsProgressBarComponent, AdsProgressIndicatorSpinnerComponent, AdsProgressSpinnerComponent, AdsProgressStepperComponent, AdsRadioButtonComponent, AdsRateOptionCardComponent, AdsScmsLogoComponent, AdsScmsSideNavBarComponent, AdsSearchDropdownComponent, AdsSearchInputComponent, AdsShipmentHorizontalStepperComponent, AdsSideNavBarComponent, AdsSideNavBarV2Component, AdsSlideToggleComponent, AdsSliderComponent, AdsSnackbarComponent, AdsSortMenuComponent, AdsSplashPageComponent, AdsStepperComponent, AdsSubNavigationButtonComponent, AdsTableComponent, AdsTabsComponent, AdsTagComponent, AdsTagContainerComponent, AdsTextareaComponent, AdsTimeFieldComponent, AdsTimepickerComponent, AdsVerticalSideNavigationStepperComponent, AdsWizardStepperComponent, AscentCardComponent, BadgeColor, Colors, CountryCode, CustomDatetimeAdapter, DividerComponent, ErrorPageDefault, HistoryAction, HorizontalStepStatus, MainMenuService, ModalActionType, ModalPanelClass, PanelClass, ShellLayoutComponent, SpinnerSize, StepStatus, TableBreakpoint, ViewportService, WindowService, WizardStepStatus, provideAdsUi };
4144
+ export type { ActiveFilter, ActiveSort, AdsMenuDropDownItem, AdsMenuDropDownPosition, AdsModalData, AdsNavItemV2, AdsNavSubItemV2, AdsUiConfig, Breadcrumb, ColumnFilterOption, ColumnSortFilterConfig, ColumnSortOption, ColumnVisibilityControl, Copyright, CustomHeaderParams, DROP_CALLBACK_INDEXES, DividerStyle, ErrorPageConfig, ErrorPageInfoColumn, FilterOptionsSortComparator, FilterValueFormatter, HistoryContextTag, HistoryEvent, HistoryGroup, HorizontalNavLink, HorizontalStep, IconButtonSize, Link, MainMenuItem, NavItem, NavMenuItem, NumericStep, ProgressStep, RateOptionCardTag, ScmsNavItem, ScmsNavSubItem, SearchDropdownComponentOptions, SearchDropdownDisplayControlValue, SearchDropdownStaticOption, SearchDropdownStaticOptionTemplateContext, ShipmentStep, Size, SnackBarData, SortComparator, SortMenuChangeEvent, SortType, Step, Tab, Tag, UNSUBSCRIBE_FUNCTIONS_COLLECTION, Variant, VerticalSideNavigationStep, WizardStep };