@ifsworld/granite-components 13.2.5 → 13.2.7

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy, Input, HostBinding, ContentChildren, NgModule, InjectionToken, Attribute, Inject, Optional, EventEmitter, QueryList, TemplateRef, Directive, ViewChild, Output, Self, HostListener, ContentChild, Pipe, ElementRef, inject } from '@angular/core';
2
+ import { Component, ChangeDetectionStrategy, Input, HostBinding, ContentChildren, NgModule, InjectionToken, Attribute, Inject, Optional, EventEmitter, QueryList, TemplateRef, Directive, ViewChild, Output, Self, HostListener, ContentChild, Injectable, inject, ElementRef, ViewContainerRef, Pipe } from '@angular/core';
3
3
  import * as i1$1 from '@angular/common';
4
4
  import { CommonModule, DOCUMENT } from '@angular/common';
5
5
  import { coerceNumberProperty, coerceBooleanProperty } from '@angular/cdk/coercion';
@@ -7,20 +7,23 @@ import { Subject, BehaviorSubject, combineLatest, Subscription, merge, of, asapS
7
7
  import { takeUntil, filter, map, startWith, switchMap, take, delay, debounceTime } from 'rxjs/operators';
8
8
  import { ComponentHarness, HarnessPredicate, TestKey } from '@angular/cdk/testing';
9
9
  import * as i1$2 from '@angular/cdk/overlay';
10
- import { OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
10
+ import { OverlayConfig, OverlayModule, Overlay } from '@angular/cdk/overlay';
11
11
  import { TemplatePortal, PortalModule } from '@angular/cdk/portal';
12
12
  import { trigger, state, style, transition, group, query, animate, sequence } from '@angular/animations';
13
13
  import * as i1 from '@angular/cdk/a11y';
14
14
  import { FocusKeyManager, isFakeMousedownFromScreenReader } from '@angular/cdk/a11y';
15
15
  import { hasModifierKey, SPACE, BACKSPACE, DELETE, ENTER, TAB } from '@angular/cdk/keycodes';
16
- import * as i2 from '@angular/cdk/bidi';
16
+ import * as i3 from '@angular/cdk/bidi';
17
+ import { Directionality } from '@angular/cdk/bidi';
17
18
  import { normalizePassiveListenerOptions } from '@angular/cdk/platform';
18
- import * as i2$1 from '@angular/cdk/collections';
19
+ import * as i2 from '@angular/cdk/collections';
19
20
  import { SelectionModel } from '@angular/cdk/collections';
20
- import * as i2$2 from '@angular/forms';
21
+ import * as i2$1 from '@angular/forms';
21
22
  import { FormsModule, ReactiveFormsModule } from '@angular/forms';
22
- import * as i3 from '@ifsworld/granite-components/tooltip';
23
+ import * as i3$1 from '@ifsworld/granite-components/tooltip';
23
24
  import { GraniteTooltipModule } from '@ifsworld/granite-components/tooltip';
25
+ import * as i1$3 from '@angular/cdk/scrolling';
26
+ import { ScrollingModule } from '@angular/cdk/scrolling';
24
27
 
25
28
  class GraniteArrangeGridItemComponent {
26
29
  constructor(element) {
@@ -868,6 +871,7 @@ class _MenuBaseComponent {
868
871
  constructor(_changeDetectorRef) {
869
872
  this._changeDetectorRef = _changeDetectorRef;
870
873
  this.openOnHover = true;
874
+ this.scrollStrategy = 'reposition';
871
875
  /**
872
876
  * Event emitted when the menu is closed
873
877
  */
@@ -1145,7 +1149,7 @@ class _MenuBaseComponent {
1145
1149
  });
1146
1150
  }
1147
1151
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: _MenuBaseComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1148
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.4", type: _MenuBaseComponent, inputs: { xPosition: "xPosition", yPosition: "yPosition", title: "title", closeLabel: "closeLabel", openOnHover: "openOnHover" }, outputs: { closed: "closed", opened: "opened" }, queries: [{ propertyName: "_allItems", predicate: GraniteMenuItemComponent, descendants: true }], viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0 }); }
1152
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.4", type: _MenuBaseComponent, inputs: { xPosition: "xPosition", yPosition: "yPosition", title: "title", closeLabel: "closeLabel", openOnHover: "openOnHover", scrollStrategy: "scrollStrategy" }, outputs: { closed: "closed", opened: "opened" }, queries: [{ propertyName: "_allItems", predicate: GraniteMenuItemComponent, descendants: true }], viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0 }); }
1149
1153
  }
1150
1154
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: _MenuBaseComponent, decorators: [{
1151
1155
  type: Directive
@@ -1159,6 +1163,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
1159
1163
  type: Input
1160
1164
  }], openOnHover: [{
1161
1165
  type: Input
1166
+ }], scrollStrategy: [{
1167
+ type: Input
1162
1168
  }], templateRef: [{
1163
1169
  type: ViewChild,
1164
1170
  args: [TemplateRef]
@@ -1524,9 +1530,8 @@ class GraniteMenuTriggerForDirective {
1524
1530
  if (this._clientOutput.device === 'touch') {
1525
1531
  panelClass.push('granite-overlay-pane-fill-width-bottom');
1526
1532
  }
1527
- const scrollStrategy = this._clientOutput.device !== 'touch'
1528
- ? this._overlay.scrollStrategies.reposition()
1529
- : undefined;
1533
+ // setting scrollStrategy options to overlay
1534
+ const scrollStrategy = this.setScrollStrategyToOverylay(this._clientOutput.device, this.menu.scrollStrategy);
1530
1535
  const hasBackdrop = this._clientOutput.device === 'touch' && !this.triggersSubmenu();
1531
1536
  //#endregion --- Touch device customizations ---
1532
1537
  // Create an overlay to stuff the menu (portal) into below
@@ -1923,7 +1928,30 @@ class GraniteMenuTriggerForDirective {
1923
1928
  ? offset + target
1924
1929
  : target * (-Math.pow(2, (-10 * current) / end) + 1) + offset;
1925
1930
  }
1926
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteMenuTriggerForDirective, deps: [{ token: i1$2.Overlay }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }, { token: GRANITE_MENU_PANEL, optional: true }, { token: GRANITE_CLIENT_INPUT, optional: true }, { token: GRANITE_CLIENT_OUTPUT, optional: true }, { token: GraniteMenuItemComponent, optional: true, self: true }, { token: i2.Directionality, optional: true }, { token: i1.FocusMonitor }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive }); }
1931
+ /**
1932
+ * Sets the scroll strategy for the overlay based on the client output device and menu scroll strategy input.
1933
+ *
1934
+ * @param {OutputDeviceTypes} clientOutputDevice - The type of client output device (e.g., 'touch').
1935
+ * @param {'reposition' | 'close'} menuScrollStrategyInput - The scroll strategy input for the menu.
1936
+ * @returns {ScrollStrategy} The appropriate scroll strategy for the overlay.
1937
+ */
1938
+ setScrollStrategyToOverylay(clientOutputDevice, menuScrollStrategyInput) {
1939
+ if (clientOutputDevice === 'touch') {
1940
+ return undefined;
1941
+ }
1942
+ else {
1943
+ if (menuScrollStrategyInput === 'close') {
1944
+ return this._overlay.scrollStrategies.close();
1945
+ }
1946
+ else if (menuScrollStrategyInput === 'reposition') {
1947
+ return this._overlay.scrollStrategies.reposition();
1948
+ }
1949
+ else {
1950
+ return undefined;
1951
+ }
1952
+ }
1953
+ }
1954
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteMenuTriggerForDirective, deps: [{ token: i1$2.Overlay }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }, { token: GRANITE_MENU_PANEL, optional: true }, { token: GRANITE_CLIENT_INPUT, optional: true }, { token: GRANITE_CLIENT_OUTPUT, optional: true }, { token: GraniteMenuItemComponent, optional: true, self: true }, { token: i3.Directionality, optional: true }, { token: i1.FocusMonitor }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive }); }
1927
1955
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.4", type: GraniteMenuTriggerForDirective, selector: "[graniteMenuTriggerFor]", inputs: { menu: ["graniteMenuTriggerFor", "menu"], openOnClick: "openOnClick" }, host: { attributes: { "aria-haspopup": "true" }, listeners: { "mousedown": "_handleMousedown($event)", "keydown": "_handleKeydown($event)", "click": "_handleClick($event)" }, properties: { "attr.aria-expanded": "isMenuOpened || null", "attr.aria-controls": "isMenuOpened ? menu.panelId : null" }, classAttribute: "granite-menu-trigger" }, exportAs: ["graniteMenuTriggerFor"], usesOnChanges: true, ngImport: i0 }); }
1928
1956
  }
1929
1957
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteMenuTriggerForDirective, decorators: [{
@@ -1960,7 +1988,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
1960
1988
  type: Optional
1961
1989
  }, {
1962
1990
  type: Self
1963
- }] }, { type: i2.Directionality, decorators: [{
1991
+ }] }, { type: i3.Directionality, decorators: [{
1964
1992
  type: Optional
1965
1993
  }] }, { type: i1.FocusMonitor }, { type: undefined, decorators: [{
1966
1994
  type: Inject,
@@ -2348,7 +2376,7 @@ class GraniteRadioButtonComponent {
2348
2376
  _getInputElement() {
2349
2377
  return this._inputElement.nativeElement;
2350
2378
  }
2351
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteRadioButtonComponent, deps: [{ token: i1.FocusMonitor }, { token: i2$1.UniqueSelectionDispatcher }], target: i0.ɵɵFactoryTarget.Component }); }
2379
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteRadioButtonComponent, deps: [{ token: i1.FocusMonitor }, { token: i2.UniqueSelectionDispatcher }], target: i0.ɵɵFactoryTarget.Component }); }
2352
2380
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: GraniteRadioButtonComponent, selector: "granite-radio-button", inputs: { value: "value", id: "id", name: "name", checked: "checked", required: "required", disabled: "disabled", readonly: "readonly", labelPosition: "labelPosition", ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"] }, outputs: { radioChange: "radioChange", radioBlur: "radioBlur" }, host: { properties: { "class.granite-radio-button-disabled": "disabled", "class.granite-radio-button-label-before": "_positionBefore", "class.granite-radio-button-checked": "checked", "class.granite-radio-button-readonly": "readonly" }, classAttribute: "granite-radio-button" }, viewQueries: [{ propertyName: "_inputElement", first: true, predicate: ["input"], descendants: true }], exportAs: ["graniteRadioButton"], usesOnChanges: true, ngImport: i0, template: "<label class=\"granite-radio-button-label\">\n <div class=\"granite-radio-button-outer-circle\">\n <input\n #input\n [id]=\"id\"\n class=\"granite-radio-button-input cdk-visually-hidden\"\n type=\"radio\"\n [attr.name]=\"name\"\n [disabled]=\"_radioDisabled\"\n [checked]=\"checked\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-checked]=\"checked.toString()\"\n [value]=\"value\"\n (change)=\"_radioChange($event.target)\"\n (blur)=\"_onBlur()\"\n />\n <div class=\"granite-radio-button-inner-circle\"></div>\n </div>\n <span class=\"granite-radio-button-text\">\n <ng-content></ng-content>\n </span>\n</label>\n", styles: [".cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-outer-circle:focus-within{border:.0625rem solid var(--granite-color-focus)}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-outer-circle .granite-radio-button-label:hover{cursor:pointer}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-outer-circle .granite-radio-button-label:hover .granite-radio-button-outer-circle{border-color:var(--granite-color-background-active-hover)}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-outer-circle .granite-radio-button-label:hover .granite-radio-button-inner-circle{background-color:var(--granite-color-background-active-hover)}:host(.granite-radio-button-label-before) .granite-radio-button-label{flex-direction:row-reverse}:host(.granite-radio-button-label-before) .granite-radio-button-text{padding-inline-start:0;padding-inline-end:var(--granite-spacing-8)}:host(.granite-radio-button-checked) .granite-radio-button-inner-circle{visibility:visible;animation:grow-animation .1s}:host(.granite-radio-button-checked) .granite-radio-button-outer-circle{border-color:var(--granite-color-background-active)}:host(.granite-radio-button-checked).granite-radio-button-disabled .granite-radio-button-inner-circle{background-color:var(--granite-color-text)}:host(.granite-radio-button-checked).granite-radio-button-disabled .granite-radio-button-outer-circle{border:.0625rem solid var(--granite-color-text);background-color:transparent}:host(.granite-radio-button-checked).granite-radio-button-readonly .granite-radio-button-inner-circle{background-color:var(--granite-color-text)}:host(.granite-radio-button-checked).granite-radio-button-readonly .granite-radio-button-outer-circle{border:.0625rem solid var(--granite-color-text)}.granite-radio-button-text{padding-inline-start:var(--granite-spacing-8);color:var(--granite-color-text);font-size:var(--granite-font-size-body-small)}.granite-radio-button-text:empty{display:none}.granite-radio-button-label{display:flex;align-items:center;width:max-content;margin-inline-end:var(--granite-spacing-32);margin-block-end:var(--granite-spacing-4)}:host(.granite-radio-button-disabled) .granite-radio-button-text{opacity:.6}:host(.granite-radio-button-disabled) .granite-radio-button-outer-circle{opacity:.3;background-color:var(--granite-color-border-soft)}.granite-radio-button-outer-circle{height:1rem;width:1rem;border-radius:50%;box-sizing:border-box;border:.0625rem solid var(--granite-color-border-hard);display:flex;justify-content:center;position:relative;align-items:center}.granite-radio-button-inner-circle{width:.625rem;height:.625rem;visibility:hidden;position:absolute;border-radius:50%;background-color:var(--granite-color-background-active);margin:auto}@keyframes grow-animation{0%{transform:scale(0)}to{transform:scale(1)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2353
2381
  }
2354
2382
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteRadioButtonComponent, decorators: [{
@@ -2360,7 +2388,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
2360
2388
  '[class.granite-radio-button-checked]': 'checked',
2361
2389
  '[class.granite-radio-button-readonly]': 'readonly',
2362
2390
  }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<label class=\"granite-radio-button-label\">\n <div class=\"granite-radio-button-outer-circle\">\n <input\n #input\n [id]=\"id\"\n class=\"granite-radio-button-input cdk-visually-hidden\"\n type=\"radio\"\n [attr.name]=\"name\"\n [disabled]=\"_radioDisabled\"\n [checked]=\"checked\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-checked]=\"checked.toString()\"\n [value]=\"value\"\n (change)=\"_radioChange($event.target)\"\n (blur)=\"_onBlur()\"\n />\n <div class=\"granite-radio-button-inner-circle\"></div>\n </div>\n <span class=\"granite-radio-button-text\">\n <ng-content></ng-content>\n </span>\n</label>\n", styles: [".cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-outer-circle:focus-within{border:.0625rem solid var(--granite-color-focus)}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-outer-circle .granite-radio-button-label:hover{cursor:pointer}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-outer-circle .granite-radio-button-label:hover .granite-radio-button-outer-circle{border-color:var(--granite-color-background-active-hover)}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-outer-circle .granite-radio-button-label:hover .granite-radio-button-inner-circle{background-color:var(--granite-color-background-active-hover)}:host(.granite-radio-button-label-before) .granite-radio-button-label{flex-direction:row-reverse}:host(.granite-radio-button-label-before) .granite-radio-button-text{padding-inline-start:0;padding-inline-end:var(--granite-spacing-8)}:host(.granite-radio-button-checked) .granite-radio-button-inner-circle{visibility:visible;animation:grow-animation .1s}:host(.granite-radio-button-checked) .granite-radio-button-outer-circle{border-color:var(--granite-color-background-active)}:host(.granite-radio-button-checked).granite-radio-button-disabled .granite-radio-button-inner-circle{background-color:var(--granite-color-text)}:host(.granite-radio-button-checked).granite-radio-button-disabled .granite-radio-button-outer-circle{border:.0625rem solid var(--granite-color-text);background-color:transparent}:host(.granite-radio-button-checked).granite-radio-button-readonly .granite-radio-button-inner-circle{background-color:var(--granite-color-text)}:host(.granite-radio-button-checked).granite-radio-button-readonly .granite-radio-button-outer-circle{border:.0625rem solid var(--granite-color-text)}.granite-radio-button-text{padding-inline-start:var(--granite-spacing-8);color:var(--granite-color-text);font-size:var(--granite-font-size-body-small)}.granite-radio-button-text:empty{display:none}.granite-radio-button-label{display:flex;align-items:center;width:max-content;margin-inline-end:var(--granite-spacing-32);margin-block-end:var(--granite-spacing-4)}:host(.granite-radio-button-disabled) .granite-radio-button-text{opacity:.6}:host(.granite-radio-button-disabled) .granite-radio-button-outer-circle{opacity:.3;background-color:var(--granite-color-border-soft)}.granite-radio-button-outer-circle{height:1rem;width:1rem;border-radius:50%;box-sizing:border-box;border:.0625rem solid var(--granite-color-border-hard);display:flex;justify-content:center;position:relative;align-items:center}.granite-radio-button-inner-circle{width:.625rem;height:.625rem;visibility:hidden;position:absolute;border-radius:50%;background-color:var(--granite-color-background-active);margin:auto}@keyframes grow-animation{0%{transform:scale(0)}to{transform:scale(1)}}\n"] }]
2363
- }], ctorParameters: () => [{ type: i1.FocusMonitor }, { type: i2$1.UniqueSelectionDispatcher }], propDecorators: { value: [{
2391
+ }], ctorParameters: () => [{ type: i1.FocusMonitor }, { type: i2.UniqueSelectionDispatcher }], propDecorators: { value: [{
2364
2392
  type: Input
2365
2393
  }], id: [{
2366
2394
  type: Input
@@ -3618,7 +3646,7 @@ class GraniteChipListComponent extends GraniteChipListBase {
3618
3646
  });
3619
3647
  }
3620
3648
  }
3621
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteChipListComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i2.Directionality, optional: true }, { token: i2$2.NgForm, optional: true }, { token: i2$2.FormGroupDirective, optional: true }, { token: i2$2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
3649
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteChipListComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i3.Directionality, optional: true }, { token: i2$1.NgForm, optional: true }, { token: i2$1.FormGroupDirective, optional: true }, { token: i2$1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
3622
3650
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: GraniteChipListComponent, selector: "granite-chip-list", inputs: { ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"], ariaOrientation: ["aria-orientation", "ariaOrientation"], role: "role", multiselect: "multiselect", disabled: "disabled", selectable: "selectable", tabindex: "tabindex" }, host: { listeners: { "focus": "focus()", "blur": "_blur()", "keydown": "_keydown($event)" }, properties: { "class.granite-chip-list-disabled": "disabled", "attr.tabindex": "disabled ? null : _tabIndex", "attr.role": "role", "attr.aria-label": "ariaLabel", "attr.aria-labelledby": "ariaLabelledby", "attr.aria-disabled": "disabled.toString()", "attr.aria-multiselectable": "multiselect", "attr.aria-orientation": "ariaOrientation", "id": "_uid" }, classAttribute: "granite-chip-list" }, queries: [{ propertyName: "chips", predicate: GraniteChipComponent, descendants: true }], exportAs: ["graniteChipList"], usesInheritance: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, styles: [":host.granite-chip-list{display:flex;flex-direction:row;flex-wrap:wrap;place-content:center flex-start;align-items:center;font-weight:400;font-size:var(--granite-font-size-body-small);line-height:var(--granite-line-height-regular);overflow:auto;padding:0;margin:0}:host ::ng-deep input.granite-chip-input{outline:none;border:none;background-color:transparent;color:var(--granite-color-text);margin:var(--granite-spacing-4)}:host ::ng-deep granite-icon{color:var(--granite-color-text);background-color:transparent}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3623
3651
  }
3624
3652
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteChipListComponent, decorators: [{
@@ -3638,13 +3666,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
3638
3666
  '(blur)': '_blur()',
3639
3667
  '(keydown)': '_keydown($event)',
3640
3668
  }, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host.granite-chip-list{display:flex;flex-direction:row;flex-wrap:wrap;place-content:center flex-start;align-items:center;font-weight:400;font-size:var(--granite-font-size-body-small);line-height:var(--granite-line-height-regular);overflow:auto;padding:0;margin:0}:host ::ng-deep input.granite-chip-input{outline:none;border:none;background-color:transparent;color:var(--granite-color-text);margin:var(--granite-spacing-4)}:host ::ng-deep granite-icon{color:var(--granite-color-text);background-color:transparent}\n"] }]
3641
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i2.Directionality, decorators: [{
3669
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i3.Directionality, decorators: [{
3642
3670
  type: Optional
3643
- }] }, { type: i2$2.NgForm, decorators: [{
3671
+ }] }, { type: i2$1.NgForm, decorators: [{
3644
3672
  type: Optional
3645
- }] }, { type: i2$2.FormGroupDirective, decorators: [{
3673
+ }] }, { type: i2$1.FormGroupDirective, decorators: [{
3646
3674
  type: Optional
3647
- }] }, { type: i2$2.NgControl, decorators: [{
3675
+ }] }, { type: i2$1.NgControl, decorators: [{
3648
3676
  type: Optional
3649
3677
  }, {
3650
3678
  type: Self
@@ -4447,7 +4475,7 @@ class GraniteContactsTriggerForDirective {
4447
4475
  _touchPositionStrategy() {
4448
4476
  return this._overlay.position().global();
4449
4477
  }
4450
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteContactsTriggerForDirective, deps: [{ token: i1$2.Overlay }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i1$2.OverlayOutsideClickDispatcher }, { token: GRANITE_CLIENT_INPUT, optional: true }, { token: GRANITE_CLIENT_OUTPUT, optional: true }, { token: i2.Directionality, optional: true }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Directive }); }
4478
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteContactsTriggerForDirective, deps: [{ token: i1$2.Overlay }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i1$2.OverlayOutsideClickDispatcher }, { token: GRANITE_CLIENT_INPUT, optional: true }, { token: GRANITE_CLIENT_OUTPUT, optional: true }, { token: i3.Directionality, optional: true }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Directive }); }
4451
4479
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.4", type: GraniteContactsTriggerForDirective, selector: "[graniteContactsTriggerFor]", inputs: { contacts: ["graniteContactsTriggerFor", "contacts"] }, host: { attributes: { "aria-haspopup": "true" }, listeners: { "keydown": "_handleKeydown($event)", "click": "_handleClick($event)" }, properties: { "attr.aria-expanded": "_isContactsOpen || null", "attr.aria-controls": "_isContactsOpen ? contacts.panelId : null" }, classAttribute: "granite-contacts-trigger" }, ngImport: i0 }); }
4452
4480
  }
4453
4481
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteContactsTriggerForDirective, decorators: [{
@@ -4473,7 +4501,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
4473
4501
  args: [GRANITE_CLIENT_OUTPUT]
4474
4502
  }, {
4475
4503
  type: Optional
4476
- }] }, { type: i2.Directionality, decorators: [{
4504
+ }] }, { type: i3.Directionality, decorators: [{
4477
4505
  type: Optional
4478
4506
  }] }, { type: i1.FocusMonitor }], propDecorators: { contacts: [{
4479
4507
  type: Input,
@@ -4629,17 +4657,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
4629
4657
  }]
4630
4658
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }] });
4631
4659
 
4632
- let legendPanelUid = 0;
4633
- class LegendBaseComponent {
4660
+ class OverlayBaseComponent {
4634
4661
  constructor() {
4635
- this.xPosition = 'before';
4662
+ this.xPosition = 'after';
4636
4663
  this.yPosition = 'below';
4637
- this.panelId = `granite-progress-bar-legend-panel-${legendPanelUid++}`;
4638
4664
  }
4639
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: LegendBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4640
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.4", type: LegendBaseComponent, viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0 }); }
4665
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: OverlayBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4666
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.4", type: OverlayBaseComponent, viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0 }); }
4641
4667
  }
4642
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: LegendBaseComponent, decorators: [{
4668
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: OverlayBaseComponent, decorators: [{
4643
4669
  type: Directive,
4644
4670
  args: [{}]
4645
4671
  }], propDecorators: { templateRef: [{
@@ -4647,134 +4673,73 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
4647
4673
  args: [TemplateRef]
4648
4674
  }] } });
4649
4675
 
4676
+ let legendPanelUid = 0;
4677
+ class LegendBaseComponent extends OverlayBaseComponent {
4678
+ constructor() {
4679
+ super(...arguments);
4680
+ this.panelId = `granite-progress-bar-legend-panel-${legendPanelUid++}`;
4681
+ this.xPosition = 'before';
4682
+ }
4683
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: LegendBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
4684
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.4", type: LegendBaseComponent, usesInheritance: true, ngImport: i0 }); }
4685
+ }
4686
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: LegendBaseComponent, decorators: [{
4687
+ type: Directive
4688
+ }] });
4689
+
4650
4690
  class GraniteProgressBarLegendComponent extends LegendBaseComponent {
4651
4691
  constructor() {
4652
4692
  super(...arguments);
4653
4693
  this.legendItems = [];
4654
4694
  }
4655
4695
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteProgressBarLegendComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4656
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: GraniteProgressBarLegendComponent, selector: "granite-progress-bar-legend", inputs: { legendItems: "legendItems" }, usesInheritance: true, ngImport: i0, template: "<ng-template>\n <div class=\"legend\" data-fnd=\"legend\">\n <div\n *ngFor=\"let item of legendItems\"\n class=\"legend-item\"\n data-fnd=\"legend-item\"\n >\n <div class=\"legend-label-text\">{{ item.label }}</div>\n <div\n [style.background-color]=\"item.backgroundColor\"\n class=\"color-box\"\n ></div>\n </div>\n </div>\n</ng-template>\n", styles: [".legend{display:flex;flex-direction:column;align-items:flex-start;padding:var(--granite-spacing-8);gap:var(--granite-spacing-8);background-color:var(--granite-color-background-page);border:solid var(--granite-border-width-regular) var(--granite-color-border-contrast);border-radius:var(--granite-radius-s)}.legend-item{display:flex;align-items:center;justify-content:space-between;align-self:stretch;flex-wrap:wrap;padding:0 var(--granite-spacing-4);gap:var(--granite-spacing-8)}.legend-label-text{font-size:var(--granite-font-size-body-small);line-height:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);color:var(--granite-color-text);width:max-content}.color-box{width:8px;height:8px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4696
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: GraniteProgressBarLegendComponent, selector: "granite-progress-bar-legend", inputs: { legendItems: "legendItems" }, usesInheritance: true, ngImport: i0, template: "<ng-template>\n <div class=\"legend\" data-fnd=\"legend\">\n <div\n *ngFor=\"let item of legendItems\"\n class=\"legend-item\"\n data-fnd=\"legend-item\"\n >\n <div class=\"legend-label-text\">{{ item.label }}</div>\n <div\n [style.background-color]=\"item.backgroundColor\"\n class=\"color-box\"\n ></div>\n </div>\n </div>\n</ng-template>\n", styles: [".legend{display:flex;flex-direction:column;align-items:flex-start;padding:var(--granite-spacing-8);gap:var(--granite-spacing-8);background-color:var(--granite-color-background-page);border:solid var(--granite-border-width-regular) var(--granite-color-border-contrast);border-radius:var(--granite-radius-s);height:-moz-fit-content;height:fit-content}.legend-item{display:flex;align-items:center;justify-content:space-between;align-self:stretch;flex-wrap:wrap;padding:0 var(--granite-spacing-4);gap:var(--granite-spacing-8)}.legend-label-text{font-size:var(--granite-font-size-body-small);line-height:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);color:var(--granite-color-text);width:max-content}.color-box{width:8px;height:8px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4657
4697
  }
4658
4698
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteProgressBarLegendComponent, decorators: [{
4659
4699
  type: Component,
4660
- args: [{ selector: 'granite-progress-bar-legend', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template>\n <div class=\"legend\" data-fnd=\"legend\">\n <div\n *ngFor=\"let item of legendItems\"\n class=\"legend-item\"\n data-fnd=\"legend-item\"\n >\n <div class=\"legend-label-text\">{{ item.label }}</div>\n <div\n [style.background-color]=\"item.backgroundColor\"\n class=\"color-box\"\n ></div>\n </div>\n </div>\n</ng-template>\n", styles: [".legend{display:flex;flex-direction:column;align-items:flex-start;padding:var(--granite-spacing-8);gap:var(--granite-spacing-8);background-color:var(--granite-color-background-page);border:solid var(--granite-border-width-regular) var(--granite-color-border-contrast);border-radius:var(--granite-radius-s)}.legend-item{display:flex;align-items:center;justify-content:space-between;align-self:stretch;flex-wrap:wrap;padding:0 var(--granite-spacing-4);gap:var(--granite-spacing-8)}.legend-label-text{font-size:var(--granite-font-size-body-small);line-height:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);color:var(--granite-color-text);width:max-content}.color-box{width:8px;height:8px}\n"] }]
4700
+ args: [{ selector: 'granite-progress-bar-legend', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template>\n <div class=\"legend\" data-fnd=\"legend\">\n <div\n *ngFor=\"let item of legendItems\"\n class=\"legend-item\"\n data-fnd=\"legend-item\"\n >\n <div class=\"legend-label-text\">{{ item.label }}</div>\n <div\n [style.background-color]=\"item.backgroundColor\"\n class=\"color-box\"\n ></div>\n </div>\n </div>\n</ng-template>\n", styles: [".legend{display:flex;flex-direction:column;align-items:flex-start;padding:var(--granite-spacing-8);gap:var(--granite-spacing-8);background-color:var(--granite-color-background-page);border:solid var(--granite-border-width-regular) var(--granite-color-border-contrast);border-radius:var(--granite-radius-s);height:-moz-fit-content;height:fit-content}.legend-item{display:flex;align-items:center;justify-content:space-between;align-self:stretch;flex-wrap:wrap;padding:0 var(--granite-spacing-4);gap:var(--granite-spacing-8)}.legend-label-text{font-size:var(--granite-font-size-body-small);line-height:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);color:var(--granite-color-text);width:max-content}.color-box{width:8px;height:8px}\n"] }]
4661
4701
  }], propDecorators: { legendItems: [{
4662
4702
  type: Input
4663
4703
  }] } });
4664
4704
 
4665
- class GraniteProgressBarLegendTriggerForDirective {
4666
- constructor(_overlay, _element, _viewContainerRef, _outsideClickDispatcher,
4667
- /** Client input device information */
4668
- _clientInput,
4669
- /** Client output device information */
4670
- _clientOutput, _dir, _focusMonitor) {
4705
+ class OverlayService {
4706
+ constructor(_overlay, _focusMonitor, _outsideClickDispatcher) {
4671
4707
  this._overlay = _overlay;
4672
- this._element = _element;
4673
- this._viewContainerRef = _viewContainerRef;
4674
- this._outsideClickDispatcher = _outsideClickDispatcher;
4675
- this._clientInput = _clientInput;
4676
- this._clientOutput = _clientOutput;
4677
- this._dir = _dir;
4678
4708
  this._focusMonitor = _focusMonitor;
4679
- this._isLegendOpen = false;
4680
- this._portal = null;
4681
- this._overlayRef = null;
4682
- }
4683
- ngOnDestroy() {
4684
- if (this._overlayRef) {
4685
- this._overlayRef.dispose();
4686
- this._overlayRef = null;
4687
- }
4688
- }
4689
- openLegend() {
4690
- if (this._isLegendOpen) {
4691
- return;
4692
- }
4693
- this.legend.direction = this._dir.value === 'rtl' ? 'rtl' : 'ltr';
4694
- this.legend.clientInput = this._clientInput;
4695
- this.legend.clientOutput = this._clientOutput;
4696
- const panelClass = [];
4697
- if (this._clientOutput?.device === 'touch') {
4698
- panelClass.push('granite-overlay-pane-center');
4699
- }
4700
- const scrollStrategy = this._clientOutput?.device !== 'touch'
4701
- ? this._overlay.scrollStrategies.reposition()
4702
- : this._overlay.scrollStrategies.block();
4703
- const hasBackdrop = this._clientOutput?.device === 'touch';
4704
- if (!this._overlayRef) {
4705
- const config = new OverlayConfig({
4706
- positionStrategy: this._positionStrategy(),
4707
- backdropClass: 'granite-overlay-dark-glass-backdrop',
4708
- scrollStrategy,
4709
- direction: this._dir,
4710
- panelClass,
4711
- hasBackdrop,
4712
- });
4713
- this._overlayRef = this._overlay.create(config);
4714
- }
4715
- if (!this._portal || this._portal.templateRef !== this.legend.templateRef) {
4716
- this._portal = new TemplatePortal(this.legend.templateRef, this._viewContainerRef);
4717
- }
4718
- this._overlayRef.attach(this._portal);
4719
- this._outsideClickDispatcher.add(this._overlayRef);
4720
- this._overlayRef.outsidePointerEvents().subscribe((event) => {
4721
- event.stopPropagation();
4722
- this.closeLegend();
4723
- });
4724
- this._isLegendOpen = true;
4725
- }
4726
- toggleLegend() {
4727
- if (this._isLegendOpen) {
4728
- this.closeLegend();
4729
- }
4730
- else {
4731
- this.openLegend();
4732
- }
4733
- }
4734
- closeLegend() {
4735
- if (!this._overlayRef || !this._isLegendOpen) {
4736
- return;
4737
- }
4738
- this._outsideClickDispatcher.remove(this._overlayRef);
4739
- this._overlayRef.detach();
4740
- this._restoreFocus();
4741
- this._isLegendOpen = false;
4709
+ this._outsideClickDispatcher = _outsideClickDispatcher;
4742
4710
  }
4743
- _handleKeydown(event) {
4744
- if (event.key === 'Enter') {
4745
- event.preventDefault();
4746
- this.toggleLegend();
4747
- }
4711
+ createOverlay(config, component, viewContainerRef) {
4712
+ const overlayRef = this._overlay.create(config);
4713
+ const portal = new TemplatePortal(component.templateRef, viewContainerRef);
4714
+ overlayRef.attach(portal);
4715
+ return overlayRef;
4748
4716
  }
4749
- _handleClick() {
4750
- this.toggleLegend();
4717
+ closeOverlay(overlayRef, element) {
4718
+ this._outsideClickDispatcher.remove(overlayRef);
4719
+ overlayRef.detach();
4720
+ this.restoreFocus(element);
4751
4721
  }
4752
- _restoreFocus(origin = 'program', options) {
4722
+ restoreFocus(element, origin = 'program', options) {
4753
4723
  if (this._focusMonitor) {
4754
- this._focusMonitor.focusVia(this._element, origin, options);
4724
+ this._focusMonitor.focusVia(element, origin, options);
4755
4725
  }
4756
4726
  else {
4757
- this._element.nativeElement.focus(options);
4727
+ element.nativeElement.focus(options);
4758
4728
  }
4759
4729
  }
4760
- _desktopPositionStrategy() {
4761
- const positionStrategy = this._overlay
4730
+ desktopPositionStrategy(element, selector) {
4731
+ return this._overlay
4762
4732
  .position()
4763
- .flexibleConnectedTo(this._element)
4733
+ .flexibleConnectedTo(element)
4764
4734
  .withLockedPosition()
4765
- .withTransformOriginOn('.granite-progress-bar-legend')
4735
+ .withTransformOriginOn(selector)
4766
4736
  .withPush(false);
4767
- this._setPosition(positionStrategy);
4768
- return positionStrategy;
4769
4737
  }
4770
- _setPosition(positionStrategy) {
4771
- const [originX, originFallbackX] = this.legend.xPosition === 'before' ? ['end', 'start'] : ['start', 'end'];
4772
- const [overlayY, overlayFallbackY] = this.legend.yPosition === 'above' ? ['bottom', 'top'] : ['top', 'bottom'];
4773
- let [originY, originFallbackY] = [overlayY, overlayFallbackY];
4774
- const [overlayX, overlayFallbackX] = [originX, originFallbackX];
4775
- const offsetY = 4;
4776
- originY = overlayY === 'top' ? 'bottom' : 'top';
4777
- originFallbackY = overlayFallbackY === 'top' ? 'bottom' : 'top';
4738
+ touchPositionStrategy() {
4739
+ return this._overlay.position().global();
4740
+ }
4741
+ setPosition(positionStrategy, positionConfig) {
4742
+ const { originX, originFallbackX, originY, originFallbackY, overlayX, overlayFallbackX, overlayY, overlayFallbackY, offsetX, offsetY, } = positionConfig;
4778
4743
  positionStrategy.withPositions([
4779
4744
  { originX, originY, overlayX, overlayY, offsetY },
4780
4745
  {
@@ -4799,18 +4764,173 @@ class GraniteProgressBarLegendTriggerForDirective {
4799
4764
  offsetY: -offsetY,
4800
4765
  },
4801
4766
  ]);
4767
+ return positionStrategy;
4802
4768
  }
4803
- _positionStrategy() {
4804
- if (this._clientOutput?.device !== 'touch') {
4805
- return this._desktopPositionStrategy();
4769
+ subscribeOutsideClick(overlayRef, callback) {
4770
+ this._outsideClickDispatcher.add(overlayRef);
4771
+ overlayRef.outsidePointerEvents().subscribe((event) => {
4772
+ event.stopPropagation();
4773
+ if (callback) {
4774
+ callback();
4775
+ }
4776
+ });
4777
+ }
4778
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: OverlayService, deps: [{ token: i1$2.Overlay }, { token: i1.FocusMonitor }, { token: i1$2.OverlayOutsideClickDispatcher }], target: i0.ɵɵFactoryTarget.Injectable }); }
4779
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: OverlayService, providedIn: 'root' }); }
4780
+ }
4781
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: OverlayService, decorators: [{
4782
+ type: Injectable,
4783
+ args: [{
4784
+ providedIn: 'root',
4785
+ }]
4786
+ }], ctorParameters: () => [{ type: i1$2.Overlay }, { type: i1.FocusMonitor }, { type: i1$2.OverlayOutsideClickDispatcher }] });
4787
+
4788
+ class GraniteOverlayTriggerForBaseDirective {
4789
+ constructor() {
4790
+ /** Client output device information */
4791
+ this._clientOutput = inject(GRANITE_CLIENT_OUTPUT);
4792
+ /** Client input device information */
4793
+ this._clientInput = inject(GRANITE_CLIENT_INPUT);
4794
+ this._dir = inject(Directionality);
4795
+ this.offsetX = 0;
4796
+ this.offsetY = 0;
4797
+ this._overlayRef = null;
4798
+ this._overlay = inject(Overlay);
4799
+ this._element = inject((ElementRef));
4800
+ this._viewContainerRef = inject(ViewContainerRef);
4801
+ this._overlayService = inject(OverlayService);
4802
+ }
4803
+ ngOnDestroy() {
4804
+ if (this._overlayRef) {
4805
+ this._overlayRef.dispose();
4806
+ this._overlayRef = null;
4806
4807
  }
4807
- return this._touchPositionStrategy();
4808
4808
  }
4809
- _touchPositionStrategy() {
4810
- return this._overlay.position().global();
4809
+ getPositionConfig() {
4810
+ const [originX, originFallbackX] = this.componentRef.xPosition === 'before'
4811
+ ? ['end', 'start']
4812
+ : ['start', 'end'];
4813
+ const [overlayY, overlayFallbackY] = this.componentRef.yPosition === 'above'
4814
+ ? ['bottom', 'top']
4815
+ : ['top', 'bottom'];
4816
+ let [originY, originFallbackY] = [overlayY, overlayFallbackY];
4817
+ const [overlayX, overlayFallbackX] = [originX, originFallbackX];
4818
+ originY = overlayY === 'top' ? 'bottom' : 'top';
4819
+ originFallbackY = overlayFallbackY === 'top' ? 'bottom' : 'top';
4820
+ return {
4821
+ originX,
4822
+ originFallbackX,
4823
+ originY,
4824
+ originFallbackY,
4825
+ overlayX,
4826
+ overlayFallbackX,
4827
+ overlayY,
4828
+ overlayFallbackY,
4829
+ offsetX: this.offsetX,
4830
+ offsetY: this.offsetY,
4831
+ };
4832
+ }
4833
+ getPositionStrategy() {
4834
+ let positionStrategy = this._overlayService.desktopPositionStrategy(this._element, this.selector);
4835
+ const positionConfig = this.getPositionConfig();
4836
+ positionStrategy = this._overlayService.setPosition(positionStrategy, positionConfig);
4837
+ return positionStrategy;
4838
+ }
4839
+ getScrollStrategy() {
4840
+ return this.setScrollStrategy('close');
4841
+ }
4842
+ setScrollStrategy(scrollStrategy) {
4843
+ switch (scrollStrategy) {
4844
+ case 'reposition':
4845
+ return this._overlay.scrollStrategies.reposition();
4846
+ case 'block':
4847
+ return this._overlay.scrollStrategies.block();
4848
+ case 'close':
4849
+ return this._overlay.scrollStrategies.close();
4850
+ default:
4851
+ return this._overlay.scrollStrategies.close();
4852
+ }
4853
+ }
4854
+ toggleOverlay(isOpen) {
4855
+ isOpen ? this._closeOverlay() : this._openOverlay();
4856
+ return !isOpen;
4857
+ }
4858
+ onOutsideClick() {
4859
+ this._closeOverlay();
4860
+ }
4861
+ _openOverlay() {
4862
+ this.componentRef.direction = this._dir.value === 'rtl' ? 'rtl' : 'ltr';
4863
+ this.componentRef.clientInput = this._clientInput;
4864
+ this.componentRef.clientOutput = this._clientOutput;
4865
+ const panelClass = [];
4866
+ if (this._clientOutput?.device === 'touch') {
4867
+ panelClass.push('granite-overlay-pane-center');
4868
+ }
4869
+ const hasBackdrop = this._clientOutput?.device === 'touch';
4870
+ const config = new OverlayConfig({
4871
+ positionStrategy: this.getPositionStrategy(),
4872
+ backdropClass: 'granite-overlay-dark-glass-backdrop',
4873
+ scrollStrategy: this.getScrollStrategy(),
4874
+ direction: this._dir,
4875
+ panelClass,
4876
+ hasBackdrop,
4877
+ });
4878
+ this._overlayRef = this._overlayService.createOverlay(config, this.componentRef, this._viewContainerRef);
4879
+ this._overlayService.subscribeOutsideClick(this._overlayRef, () => this.onOutsideClick());
4880
+ }
4881
+ _closeOverlay() {
4882
+ if (!this._overlayRef) {
4883
+ return;
4884
+ }
4885
+ this._overlayService.closeOverlay(this._overlayRef, this._element);
4811
4886
  }
4812
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteProgressBarLegendTriggerForDirective, deps: [{ token: i1$2.Overlay }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i1$2.OverlayOutsideClickDispatcher }, { token: GRANITE_CLIENT_INPUT, optional: true }, { token: GRANITE_CLIENT_OUTPUT, optional: true }, { token: i2.Directionality, optional: true }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Directive }); }
4813
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.4", type: GraniteProgressBarLegendTriggerForDirective, selector: "[graniteProgressBarLegendTriggerFor]", inputs: { legend: ["graniteProgressBarLegendTriggerFor", "legend"] }, host: { attributes: { "aria-haspopup": "true" }, listeners: { "keydown": "_handleKeydown($event)", "click": "_handleClick($event)" }, properties: { "attr.aria-expanded": "_isLegendOpen || null", "attr.aria-controls": "_isLegendOpen ? legend.panelId : null" }, classAttribute: "granite-progress-bar-legend-trigger" }, ngImport: i0 }); }
4887
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteOverlayTriggerForBaseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4888
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.4", type: GraniteOverlayTriggerForBaseDirective, selector: "[graniteOverlayTriggerForBase]", ngImport: i0 }); }
4889
+ }
4890
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteOverlayTriggerForBaseDirective, decorators: [{
4891
+ type: Directive,
4892
+ args: [{
4893
+ selector: '[graniteOverlayTriggerForBase]',
4894
+ }]
4895
+ }], propDecorators: { _clientOutput: [{
4896
+ type: Optional
4897
+ }], _clientInput: [{
4898
+ type: Optional
4899
+ }], _dir: [{
4900
+ type: Optional
4901
+ }] } });
4902
+
4903
+ class GraniteProgressBarLegendTriggerForDirective extends GraniteOverlayTriggerForBaseDirective {
4904
+ constructor() {
4905
+ super(...arguments);
4906
+ this.isLegendOpen = false;
4907
+ this.selector = '.granite-progress-bar-legend';
4908
+ this.offsetY = 4;
4909
+ }
4910
+ get legend() {
4911
+ return this.componentRef;
4912
+ }
4913
+ set legend(value) {
4914
+ this.componentRef = value;
4915
+ }
4916
+ handleKeydown(event) {
4917
+ if (event.key === 'Enter') {
4918
+ event.preventDefault();
4919
+ this.isLegendOpen = this.toggleOverlay(this.isLegendOpen);
4920
+ }
4921
+ }
4922
+ handleClick() {
4923
+ this.isLegendOpen = this.toggleOverlay(this.isLegendOpen);
4924
+ }
4925
+ onOutsideClick() {
4926
+ super.onOutsideClick();
4927
+ this.isLegendOpen = false;
4928
+ }
4929
+ getScrollStrategy() {
4930
+ return this.setScrollStrategy('reposition');
4931
+ }
4932
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteProgressBarLegendTriggerForDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
4933
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.4", type: GraniteProgressBarLegendTriggerForDirective, selector: "[graniteProgressBarLegendTriggerFor]", inputs: { legend: ["graniteProgressBarLegendTriggerFor", "legend"] }, host: { attributes: { "aria-haspopup": "true" }, listeners: { "keydown": "handleKeydown($event)", "click": "handleClick($event)" }, properties: { "attr.aria-expanded": "isLegendOpen || null", "attr.aria-controls": "isLegendOpen ? legend.panelId : null" }, classAttribute: "granite-progress-bar-legend-trigger" }, usesInheritance: true, ngImport: i0 }); }
4814
4934
  }
4815
4935
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteProgressBarLegendTriggerForDirective, decorators: [{
4816
4936
  type: Directive,
@@ -4819,25 +4939,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
4819
4939
  host: {
4820
4940
  class: 'granite-progress-bar-legend-trigger',
4821
4941
  'aria-haspopup': 'true',
4822
- '[attr.aria-expanded]': '_isLegendOpen || null',
4823
- '[attr.aria-controls]': '_isLegendOpen ? legend.panelId : null',
4824
- '(keydown)': '_handleKeydown($event)',
4825
- '(click)': '_handleClick($event)',
4942
+ '[attr.aria-expanded]': 'isLegendOpen || null',
4943
+ '[attr.aria-controls]': 'isLegendOpen ? legend.panelId : null',
4944
+ '(keydown)': 'handleKeydown($event)',
4945
+ '(click)': 'handleClick($event)',
4826
4946
  },
4827
4947
  }]
4828
- }], ctorParameters: () => [{ type: i1$2.Overlay }, { type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i1$2.OverlayOutsideClickDispatcher }, { type: undefined, decorators: [{
4829
- type: Inject,
4830
- args: [GRANITE_CLIENT_INPUT]
4831
- }, {
4832
- type: Optional
4833
- }] }, { type: undefined, decorators: [{
4834
- type: Inject,
4835
- args: [GRANITE_CLIENT_OUTPUT]
4836
- }, {
4837
- type: Optional
4838
- }] }, { type: i2.Directionality, decorators: [{
4839
- type: Optional
4840
- }] }, { type: i1.FocusMonitor }], propDecorators: { legend: [{
4948
+ }], propDecorators: { legend: [{
4841
4949
  type: Input,
4842
4950
  args: ['graniteProgressBarLegendTriggerFor']
4843
4951
  }] } });
@@ -4908,7 +5016,7 @@ class GraniteProgressBarComponent {
4908
5016
  }
4909
5017
  }
4910
5018
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4911
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: GraniteProgressBarComponent, selector: "granite-progress-bar", inputs: { progressBarData: "progressBarData", legendData: "legendData", showLabel: "showLabel", showLegend: "showLegend" }, host: { properties: { "class.label-present": "showLabel" } }, exportAs: ["graniteProgressBar"], usesOnChanges: true, ngImport: i0, template: "<div\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n class=\"progress\"\n [style.background-color]=\"getBackgroundColor()\"\n>\n <div\n *ngFor=\"let bar of progressBarData; let i = index\"\n [style.background-color]=\"getStackColor(bar.backgroundColor)\"\n [style.width]=\"getStringOfWidth(getWidth(bar.value))\"\n [style.color]=\"getFontColor(bar.foregroundColor)\"\n [graniteTooltipTriggerFor]=\"tooltip\"\n class=\"progress-bar\"\n >\n <label *ngIf=\"showLabel\" graniteHideOnOverflow>{{ bar.valueLabel }}</label>\n <granite-tooltip #tooltip> {{ bar.valueLabel }} </granite-tooltip>\n </div>\n</div>\n\n<ng-container *ngIf=\"showLegend\">\n <button\n graniteFlatButton\n [graniteProgressBarLegendTriggerFor]=\"legend\"\n class=\"legend-btn\"\n >\n <granite-icon fontIcon=\"icon-caret-down\"></granite-icon>\n </button>\n</ng-container>\n\n<granite-progress-bar-legend\n #legend\n [legendItems]=\"legendItems\"\n></granite-progress-bar-legend>\n", styles: [":host{width:100%;display:flex;align-items:center;box-sizing:border-box;height:.5rem;border-radius:var(--granite-radius-m);font-size:var(--granite-font-size-body-small);line-height:var(--granite-font-size-body-small)}:host(.label-present){height:auto!important}.progress{display:flex;width:inherit;height:inherit;overflow:hidden;border-radius:inherit;background-color:var(--granite-color-background-selected)}.progress-bar{display:flex;align-items:center;box-sizing:border-box;width:inherit;height:inherit;line-height:inherit;font-size:inherit;vertical-align:middle;text-overflow:ellipsis;white-space:nowrap;color:var(--granite-color-text);overflow:hidden;text-align:center;justify-content:center}.progress-bar label{width:100%;padding:var(--granite-spacing-4) 0}.legend-btn{width:16px;height:16px;margin-inline-start:var(--granite-spacing-16)}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: GraniteHideOnOverflowDirective, selector: "[graniteHideOnOverflow]", exportAs: ["graniteHideOnOverflow"] }, { kind: "component", type: i3.GraniteTooltipComponent, selector: "granite-tooltip" }, { kind: "directive", type: i3.GraniteTooltipTriggerForDirective, selector: "[graniteTooltipTriggerFor]", inputs: ["graniteTooltipTriggerFor", "hideDelay", "showDelay", "showOnKeyboardFocus", "showOnClick"] }, { kind: "component", type: GraniteIconComponent, selector: "granite-icon", inputs: ["fontIcon"] }, { kind: "component", type: GraniteButtonComponent, selector: "button[graniteButton],\n button[granitePrimaryButton],\n button[graniteFlatButton],\n button[graniteToolbarButton]\n ", inputs: ["disabled", "toggled"], exportAs: ["graniteButton"] }, { kind: "component", type: GraniteProgressBarLegendComponent, selector: "granite-progress-bar-legend", inputs: ["legendItems"] }, { kind: "directive", type: GraniteProgressBarLegendTriggerForDirective, selector: "[graniteProgressBarLegendTriggerFor]", inputs: ["graniteProgressBarLegendTriggerFor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5019
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: GraniteProgressBarComponent, selector: "granite-progress-bar", inputs: { progressBarData: "progressBarData", legendData: "legendData", showLabel: "showLabel", showLegend: "showLegend" }, host: { properties: { "class.label-present": "showLabel" } }, exportAs: ["graniteProgressBar"], usesOnChanges: true, ngImport: i0, template: "<div\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n class=\"progress\"\n [style.background-color]=\"getBackgroundColor()\"\n>\n <div\n *ngFor=\"let bar of progressBarData; let i = index\"\n [style.background-color]=\"getStackColor(bar.backgroundColor)\"\n [style.width]=\"getStringOfWidth(getWidth(bar.value))\"\n [style.color]=\"getFontColor(bar.foregroundColor)\"\n [graniteTooltipTriggerFor]=\"tooltip\"\n class=\"progress-bar\"\n >\n <label *ngIf=\"showLabel\" graniteHideOnOverflow>{{ bar.valueLabel }}</label>\n <granite-tooltip #tooltip> {{ bar.valueLabel }} </granite-tooltip>\n </div>\n</div>\n\n<ng-container *ngIf=\"showLegend\">\n <button\n graniteFlatButton\n [graniteProgressBarLegendTriggerFor]=\"legend\"\n class=\"legend-btn\"\n >\n <granite-icon fontIcon=\"icon-caret-down\"></granite-icon>\n </button>\n</ng-container>\n\n<granite-progress-bar-legend\n #legend\n [legendItems]=\"legendItems\"\n></granite-progress-bar-legend>\n", styles: [":host{width:100%;display:flex;align-items:center;box-sizing:border-box;height:.5rem;border-radius:var(--granite-radius-m);font-size:var(--granite-font-size-body-small);line-height:var(--granite-font-size-body-small)}:host(.label-present){height:auto!important}.progress{display:flex;width:inherit;height:inherit;overflow:hidden;border-radius:inherit;background-color:var(--granite-color-background-selected)}.progress-bar{display:flex;align-items:center;box-sizing:border-box;width:inherit;height:inherit;line-height:inherit;font-size:inherit;vertical-align:middle;text-overflow:ellipsis;white-space:nowrap;color:var(--granite-color-text);overflow:hidden;text-align:center;justify-content:center}.progress-bar label{width:100%;padding:var(--granite-spacing-4) 0}.legend-btn{width:16px;height:16px;margin-inline-start:var(--granite-spacing-16)}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: GraniteHideOnOverflowDirective, selector: "[graniteHideOnOverflow]", exportAs: ["graniteHideOnOverflow"] }, { kind: "component", type: i3$1.GraniteTooltipComponent, selector: "granite-tooltip" }, { kind: "directive", type: i3$1.GraniteTooltipTriggerForDirective, selector: "[graniteTooltipTriggerFor]", inputs: ["graniteTooltipTriggerFor", "hideDelay", "showDelay", "showOnKeyboardFocus", "showOnClick"] }, { kind: "component", type: GraniteIconComponent, selector: "granite-icon", inputs: ["fontIcon"] }, { kind: "component", type: GraniteButtonComponent, selector: "button[graniteButton],\n button[granitePrimaryButton],\n button[graniteFlatButton],\n button[graniteToolbarButton]\n ", inputs: ["disabled", "toggled"], exportAs: ["graniteButton"] }, { kind: "component", type: GraniteProgressBarLegendComponent, selector: "granite-progress-bar-legend", inputs: ["legendItems"] }, { kind: "directive", type: GraniteProgressBarLegendTriggerForDirective, selector: "[graniteProgressBarLegendTriggerFor]", inputs: ["graniteProgressBarLegendTriggerFor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4912
5020
  }
4913
5021
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteProgressBarComponent, decorators: [{
4914
5022
  type: Component,
@@ -5036,7 +5144,8 @@ class GraniteCoreModule {
5036
5144
  ClientOutputTouchDirective,
5037
5145
  ClientInputDesktopDirective,
5038
5146
  ClientInputTouchDirective,
5039
- GraniteHideOnOverflowDirective], exports: [ClientOutputDesktopDirective,
5147
+ GraniteHideOnOverflowDirective,
5148
+ GraniteOverlayTriggerForBaseDirective], exports: [ClientOutputDesktopDirective,
5040
5149
  ClientOutputTouchDirective,
5041
5150
  ClientInputDesktopDirective,
5042
5151
  ClientInputTouchDirective,
@@ -5052,6 +5161,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
5052
5161
  ClientInputDesktopDirective,
5053
5162
  ClientInputTouchDirective,
5054
5163
  GraniteHideOnOverflowDirective,
5164
+ GraniteOverlayTriggerForBaseDirective,
5055
5165
  ],
5056
5166
  exports: [
5057
5167
  ClientOutputDesktopDirective,
@@ -5146,11 +5256,11 @@ class GraniteCardListComponent {
5146
5256
  this.gap = 'small';
5147
5257
  }
5148
5258
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteCardListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5149
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: GraniteCardListComponent, selector: "granite-card-list", inputs: { orientation: "orientation", wrap: "wrap", gap: "gap" }, ngImport: i0, template: "<div\n class=\"card-list-wrapper\"\n [class.vertical]=\"orientation === 'vertical'\"\n [class.horizontal]=\"orientation === 'horizontal'\"\n [class.wrap]=\"wrap === 'wrap'\"\n [class.nowrap]=\"wrap === 'nowrap'\"\n [class.small]=\"gap === 'small'\"\n [class.medium]=\"gap === 'medium'\"\n [class.large]=\"gap === 'large'\"\n>\n <ng-content></ng-content>\n</div>\n", styles: [":host{width:100%}.card-list-wrapper{display:flex;flex-direction:row;padding:var(--granite-spacing-4)}.card-list-wrapper.horizontal.nowrap{overflow-x:auto}.card-list-wrapper.horizontal.wrap{overflow-y:auto}.card-list-wrapper.vertical{flex-direction:column}.card-list-wrapper.vertical.nowrap{overflow-y:auto}.card-list-wrapper.vertical.wrap{overflow-x:auto}.card-list-wrapper.small{gap:var(--granite-spacing-2)}.card-list-wrapper.medium{gap:var(--granite-spacing-4)}.card-list-wrapper.large{gap:var(--granite-spacing-8)}.card-list-wrapper.wrap{flex-wrap:wrap}.card-list-wrapper.nowrap{flex-wrap:nowrap}.card-list-wrapper::-webkit-scrollbar{width:calc(var(--granite-size-base-rem) * .25);height:calc(var(--granite-size-base-rem) * .25);border-radius:var(--granite-radius-s)}.card-list-wrapper::-webkit-scrollbar-thumb{background:var(--granite-color-border-hard);border-radius:var(--granite-radius-s)}.card-list-wrapper::-webkit-scrollbar-track{background:var(--granite-color-background-page)}\n"] }); }
5259
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: GraniteCardListComponent, selector: "granite-card-list", inputs: { orientation: "orientation", wrap: "wrap", gap: "gap" }, ngImport: i0, template: "<div\n class=\"card-list-wrapper\"\n [class.vertical]=\"orientation === 'vertical'\"\n [class.horizontal]=\"orientation === 'horizontal'\"\n [class.wrap]=\"wrap === 'wrap'\"\n [class.nowrap]=\"wrap === 'nowrap'\"\n [class.small]=\"gap === 'small'\"\n [class.medium]=\"gap === 'medium'\"\n [class.large]=\"gap === 'large'\"\n cdkScrollable\n>\n <ng-content></ng-content>\n</div>\n", styles: [":host{width:100%}.card-list-wrapper{display:flex;flex-direction:row;padding:var(--granite-spacing-4)}.card-list-wrapper.horizontal.nowrap{overflow-x:auto}.card-list-wrapper.horizontal.wrap{overflow-y:auto}.card-list-wrapper.vertical{flex-direction:column}.card-list-wrapper.vertical.nowrap{overflow-y:auto}.card-list-wrapper.vertical.wrap{overflow-x:auto}.card-list-wrapper.small{gap:var(--granite-spacing-2)}.card-list-wrapper.medium{gap:var(--granite-spacing-4)}.card-list-wrapper.large{gap:var(--granite-spacing-8)}.card-list-wrapper.wrap{flex-wrap:wrap}.card-list-wrapper.nowrap{flex-wrap:nowrap}.card-list-wrapper::-webkit-scrollbar{width:calc(var(--granite-size-base-rem) * .25);height:calc(var(--granite-size-base-rem) * .25);border-radius:var(--granite-radius-s)}.card-list-wrapper::-webkit-scrollbar-thumb{background:var(--granite-color-border-hard);border-radius:var(--granite-radius-s)}.card-list-wrapper::-webkit-scrollbar-track{background:var(--granite-color-background-page)}\n"], dependencies: [{ kind: "directive", type: i1$3.CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }] }); }
5150
5260
  }
5151
5261
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteCardListComponent, decorators: [{
5152
5262
  type: Component,
5153
- args: [{ selector: 'granite-card-list', template: "<div\n class=\"card-list-wrapper\"\n [class.vertical]=\"orientation === 'vertical'\"\n [class.horizontal]=\"orientation === 'horizontal'\"\n [class.wrap]=\"wrap === 'wrap'\"\n [class.nowrap]=\"wrap === 'nowrap'\"\n [class.small]=\"gap === 'small'\"\n [class.medium]=\"gap === 'medium'\"\n [class.large]=\"gap === 'large'\"\n>\n <ng-content></ng-content>\n</div>\n", styles: [":host{width:100%}.card-list-wrapper{display:flex;flex-direction:row;padding:var(--granite-spacing-4)}.card-list-wrapper.horizontal.nowrap{overflow-x:auto}.card-list-wrapper.horizontal.wrap{overflow-y:auto}.card-list-wrapper.vertical{flex-direction:column}.card-list-wrapper.vertical.nowrap{overflow-y:auto}.card-list-wrapper.vertical.wrap{overflow-x:auto}.card-list-wrapper.small{gap:var(--granite-spacing-2)}.card-list-wrapper.medium{gap:var(--granite-spacing-4)}.card-list-wrapper.large{gap:var(--granite-spacing-8)}.card-list-wrapper.wrap{flex-wrap:wrap}.card-list-wrapper.nowrap{flex-wrap:nowrap}.card-list-wrapper::-webkit-scrollbar{width:calc(var(--granite-size-base-rem) * .25);height:calc(var(--granite-size-base-rem) * .25);border-radius:var(--granite-radius-s)}.card-list-wrapper::-webkit-scrollbar-thumb{background:var(--granite-color-border-hard);border-radius:var(--granite-radius-s)}.card-list-wrapper::-webkit-scrollbar-track{background:var(--granite-color-background-page)}\n"] }]
5263
+ args: [{ selector: 'granite-card-list', template: "<div\n class=\"card-list-wrapper\"\n [class.vertical]=\"orientation === 'vertical'\"\n [class.horizontal]=\"orientation === 'horizontal'\"\n [class.wrap]=\"wrap === 'wrap'\"\n [class.nowrap]=\"wrap === 'nowrap'\"\n [class.small]=\"gap === 'small'\"\n [class.medium]=\"gap === 'medium'\"\n [class.large]=\"gap === 'large'\"\n cdkScrollable\n>\n <ng-content></ng-content>\n</div>\n", styles: [":host{width:100%}.card-list-wrapper{display:flex;flex-direction:row;padding:var(--granite-spacing-4)}.card-list-wrapper.horizontal.nowrap{overflow-x:auto}.card-list-wrapper.horizontal.wrap{overflow-y:auto}.card-list-wrapper.vertical{flex-direction:column}.card-list-wrapper.vertical.nowrap{overflow-y:auto}.card-list-wrapper.vertical.wrap{overflow-x:auto}.card-list-wrapper.small{gap:var(--granite-spacing-2)}.card-list-wrapper.medium{gap:var(--granite-spacing-4)}.card-list-wrapper.large{gap:var(--granite-spacing-8)}.card-list-wrapper.wrap{flex-wrap:wrap}.card-list-wrapper.nowrap{flex-wrap:nowrap}.card-list-wrapper::-webkit-scrollbar{width:calc(var(--granite-size-base-rem) * .25);height:calc(var(--granite-size-base-rem) * .25);border-radius:var(--granite-radius-s)}.card-list-wrapper::-webkit-scrollbar-thumb{background:var(--granite-color-border-hard);border-radius:var(--granite-radius-s)}.card-list-wrapper::-webkit-scrollbar-track{background:var(--granite-color-background-page)}\n"] }]
5154
5264
  }], propDecorators: { orientation: [{
5155
5265
  type: Input
5156
5266
  }], wrap: [{
@@ -5242,7 +5352,7 @@ class GraniteCardListModule {
5242
5352
  GraniteCardFooterComponent,
5243
5353
  GraniteCardAvatarComponent,
5244
5354
  GraniteCardHeaderTitleComponent,
5245
- GraniteCardHeaderSubTitleComponent], imports: [CommonModule], exports: [GraniteCardComponent,
5355
+ GraniteCardHeaderSubTitleComponent], imports: [CommonModule, ScrollingModule], exports: [GraniteCardComponent,
5246
5356
  GraniteCardListComponent,
5247
5357
  GraniteCardContentComponent,
5248
5358
  GraniteCardHeaderComponent,
@@ -5252,7 +5362,7 @@ class GraniteCardListModule {
5252
5362
  GraniteCardAvatarComponent,
5253
5363
  GraniteCardHeaderTitleComponent,
5254
5364
  GraniteCardHeaderSubTitleComponent] }); }
5255
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteCardListModule, imports: [CommonModule] }); }
5365
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteCardListModule, imports: [CommonModule, ScrollingModule] }); }
5256
5366
  }
5257
5367
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: GraniteCardListModule, decorators: [{
5258
5368
  type: NgModule,
@@ -5269,7 +5379,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
5269
5379
  GraniteCardHeaderTitleComponent,
5270
5380
  GraniteCardHeaderSubTitleComponent,
5271
5381
  ],
5272
- imports: [CommonModule],
5382
+ imports: [CommonModule, ScrollingModule],
5273
5383
  exports: [
5274
5384
  GraniteCardComponent,
5275
5385
  GraniteCardListComponent,