@vsn-ux/ngx-gaia 0.9.10 → 0.9.12

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 Visma Software AS
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -18,7 +18,7 @@ import { CdkTrapFocus } from '@angular/cdk/a11y';
18
18
  import * as i1$4 from '@angular/cdk/scrolling';
19
19
  import { CdkScrollable } from '@angular/cdk/scrolling';
20
20
  import * as i1$5 from '@angular/cdk/listbox';
21
- import { CdkOption, CdkListbox } from '@angular/cdk/listbox';
21
+ import { CdkOption, CdkListbox, CdkListboxModule } from '@angular/cdk/listbox';
22
22
 
23
23
  /**
24
24
  * Injection token that provides the base root font size in pixels.
@@ -1301,6 +1301,9 @@ class GaInputDirective {
1301
1301
  this.renderer.setAttribute(this.elementRef.nativeElement, 'placeholder', '');
1302
1302
  }
1303
1303
  }
1304
+ focus() {
1305
+ this.elementRef.nativeElement.focus();
1306
+ }
1304
1307
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaInputDirective, deps: [{ token: 'placeholder', attribute: true }], target: i0.ɵɵFactoryTarget.Component });
1305
1308
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.4", type: GaInputDirective, isStandalone: true, selector: "[gaInput]", inputs: { invalidInput: { classPropertyName: "invalidInput", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, idInput: { classPropertyName: "idInput", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.id": "id()", "class.ga-input": "!hasWrapper", "class.ga-input--invalid": "!hasWrapper && invalid()", "attr.disabled": "disabled() ? \"\" : null" } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1306
1309
  }
@@ -1326,7 +1329,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
1326
1329
  class GaInputComponent {
1327
1330
  gaInput = contentChild.required(GaInputDirective);
1328
1331
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1329
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.0.4", type: GaInputComponent, isStandalone: true, selector: "ga-input", host: { properties: { "class.ga-input--invalid": "gaInput().invalid()" }, classAttribute: "ga-input" }, queries: [{ propertyName: "gaInput", first: true, predicate: GaInputDirective, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1$1.CdkOverlayOrigin }], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1332
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.0.4", type: GaInputComponent, isStandalone: true, selector: "ga-input", host: { listeners: { "click": "gaInput().focus()" }, properties: { "class.ga-input--invalid": "gaInput().invalid()" }, classAttribute: "ga-input" }, queries: [{ propertyName: "gaInput", first: true, predicate: GaInputDirective, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1$1.CdkOverlayOrigin }], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1330
1333
  }
1331
1334
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaInputComponent, decorators: [{
1332
1335
  type: Component,
@@ -1338,6 +1341,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
1338
1341
  host: {
1339
1342
  class: 'ga-input',
1340
1343
  '[class.ga-input--invalid]': 'gaInput().invalid()',
1344
+ '(click)': 'gaInput().focus()',
1341
1345
  },
1342
1346
  }]
1343
1347
  }] });
@@ -3817,6 +3821,51 @@ function provideGaSelectI18n(value) {
3817
3821
  ]);
3818
3822
  }
3819
3823
 
3824
+ class GaSpinnerModule {
3825
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaSpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3826
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: GaSpinnerModule, imports: [GaSpinnerComponent], exports: [GaSpinnerComponent] });
3827
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaSpinnerModule });
3828
+ }
3829
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaSpinnerModule, decorators: [{
3830
+ type: NgModule,
3831
+ args: [{
3832
+ imports: [GaSpinnerComponent],
3833
+ exports: [GaSpinnerComponent],
3834
+ }]
3835
+ }] });
3836
+
3837
+ class GaSelectDropdownSpinnerComponent {
3838
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaSelectDropdownSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3839
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: GaSelectDropdownSpinnerComponent, isStandalone: true, selector: "ga-select-dropdown-spinner", host: { classAttribute: "ga-dropdown__spinner" }, ngImport: i0, template: `<ga-spinner size="16" />`, isInline: true, dependencies: [{ kind: "ngmodule", type: GaSpinnerModule }, { kind: "component", type: GaSpinnerComponent, selector: "ga-spinner", inputs: ["size"] }] });
3840
+ }
3841
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaSelectDropdownSpinnerComponent, decorators: [{
3842
+ type: Component,
3843
+ args: [{
3844
+ selector: 'ga-select-dropdown-spinner',
3845
+ template: `<ga-spinner size="16" />`,
3846
+ imports: [GaSpinnerModule],
3847
+ host: {
3848
+ class: 'ga-dropdown__spinner',
3849
+ },
3850
+ }]
3851
+ }] });
3852
+
3853
+ class GaSelectDropdownComponent {
3854
+ elementRef = inject(ElementRef);
3855
+ loading = input(false, { transform: booleanAttribute });
3856
+ resetScroll() {
3857
+ this.elementRef.nativeElement.scrollTo(0, 0);
3858
+ }
3859
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaSelectDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3860
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: GaSelectDropdownComponent, isStandalone: true, selector: "ga-select-dropdown", inputs: { loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "ga-dropdown ga-dropdown__content" }, hostDirectives: [{ directive: i1$5.CdkListbox }], ngImport: i0, template: "@if (loading()) {\n <ga-select-dropdown-spinner />\n} @else {\n <ng-content />\n}\n", dependencies: [{ kind: "component", type: GaSelectDropdownSpinnerComponent, selector: "ga-select-dropdown-spinner" }] });
3861
+ }
3862
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaSelectDropdownComponent, decorators: [{
3863
+ type: Component,
3864
+ args: [{ selector: 'ga-select-dropdown', imports: [GaSelectDropdownSpinnerComponent], hostDirectives: [CdkListbox], host: {
3865
+ class: 'ga-dropdown ga-dropdown__content',
3866
+ }, template: "@if (loading()) {\n <ga-select-dropdown-spinner />\n} @else {\n <ng-content />\n}\n" }]
3867
+ }] });
3868
+
3820
3869
  let nextUniqueId$2 = 0;
3821
3870
  class GaSelectComponent {
3822
3871
  _uniqueId = `ga-select-${++nextUniqueId$2}`;
@@ -3893,6 +3942,7 @@ class GaSelectComponent {
3893
3942
  read: GaOptionComponent,
3894
3943
  });
3895
3944
  cdkListbox = contentChild.required(CdkListbox);
3945
+ gaDropdown = contentChild.required(GaSelectDropdownComponent);
3896
3946
  customSelectValue = contentChild(GaSelectValueComponent);
3897
3947
  inputSearch = viewChild('inputSearch');
3898
3948
  content = viewChild('ngContent', { read: ElementRef });
@@ -3940,16 +3990,21 @@ class GaSelectComponent {
3940
3990
  effect(() => formFieldConnector.controlDisabled.set(this.disabled()));
3941
3991
  }
3942
3992
  effect(() => {
3943
- if (!this.isOpen()) {
3944
- return;
3945
- }
3946
3993
  const options = this.visibleOptions();
3947
3994
  untracked(() => {
3948
- const firstOption = options.find((option) => !option.cdkOption.disabled);
3949
- if (firstOption &&
3950
- !options.some((option) => option.cdkOption.isActive())) {
3951
- // if no active option, set the first enabled as active
3952
- this.cdkListbox()._setActiveOption(firstOption.cdkOption);
3995
+ if (!this.isOpen()) {
3996
+ return;
3997
+ }
3998
+ if (!options.some((option) => option.cdkOption.isActive())) {
3999
+ const firstOption = options.find((option) => !option.cdkOption.disabled);
4000
+ const selectedOption = options.find((option) => option.cdkOption.isSelected());
4001
+ if (selectedOption && !this.textValue()) {
4002
+ this.cdkListbox()._setActiveOption(selectedOption.cdkOption);
4003
+ }
4004
+ else if (firstOption) {
4005
+ // if no active option, set the first enabled as active
4006
+ this.cdkListbox()._setActiveOption(firstOption.cdkOption);
4007
+ }
3953
4008
  }
3954
4009
  this.connectedOverlay()?.overlayRef?.updatePosition();
3955
4010
  });
@@ -4146,12 +4201,26 @@ class GaSelectComponent {
4146
4201
  }
4147
4202
  }
4148
4203
  scrollActiveOptionIntoView() {
4204
+ // NOTE: since cdkListbox is not destroyed on close,
4205
+ // we need to reset the active option every time the overlay is opened
4206
+ const firstEnabledOption = this.visibleOptions().find((option) => !option.cdkOption.disabled);
4207
+ const selectedOption = this.visibleOptions().find((option) => option.cdkOption.isSelected());
4208
+ if (selectedOption) {
4209
+ this.cdkListbox()._setActiveOption(selectedOption.cdkOption);
4210
+ }
4211
+ else if (firstEnabledOption) {
4212
+ this.cdkListbox()._setActiveOption(firstEnabledOption.cdkOption);
4213
+ }
4149
4214
  afterNextRender({
4150
4215
  mixedReadWrite: () => {
4151
- const activeOption = this.gaOptions().find((option) => option.cdkOption.isActive());
4216
+ // NOTE: since dropdown is not destroyed on close,
4217
+ // we need to reset scroll position every time the overlay is opened
4218
+ // to ensure consistent scroll position when reopening
4219
+ this.gaDropdown().resetScroll();
4220
+ const activeOption = this.visibleOptions().find((option) => option.cdkOption.isActive());
4152
4221
  if (activeOption) {
4153
4222
  activeOption.cdkOption.element.scrollIntoView({
4154
- block: 'nearest',
4223
+ block: 'center',
4155
4224
  inline: 'nearest',
4156
4225
  });
4157
4226
  }
@@ -4165,7 +4234,7 @@ class GaSelectComponent {
4165
4234
  useExisting: forwardRef(() => GaSelectComponent),
4166
4235
  multi: true,
4167
4236
  },
4168
- ], queries: [{ propertyName: "gaOptions", predicate: GaOptionComponent, descendants: true, read: GaOptionComponent, isSignal: true }, { propertyName: "cdkListbox", first: true, predicate: CdkListbox, descendants: true, isSignal: true }, { propertyName: "customSelectValue", first: true, predicate: GaSelectValueComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "inputSearch", first: true, predicate: ["inputSearch"], descendants: true, isSignal: true }, { propertyName: "content", first: true, predicate: ["ngContent"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "connectedOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1$1.CdkOverlayOrigin }, { directive: GaLabelledByFormFieldDirective, inputs: ["aria-labelledby", "aria-labelledby"] }], ngImport: i0, template: "@if (leftIcon()) {\n <ga-icon [icon]=\"leftIcon()!\" />\n}\n\n<div class=\"ga-select__main-area\">\n @if (hasValue() && (!textValue() || multiple())) {\n @if (customSelectValue()) {\n <div class=\"ga-select__value\">\n <ng-content select=\"ga-select-value\" />\n </div>\n } @else {\n <ga-select-default-value />\n }\n } @else if (!searchable()) {\n <div class=\"ga-select__placeholder\">\n {{ placeholder() }}\n </div>\n }\n\n @if (searchable()) {\n <input\n #inputSearch\n type=\"text\"\n class=\"ga-select__input\"\n aria-autocomplete=\"list\"\n [value]=\"textValue()\"\n (input)=\"open(); textValue.set(inputSearch.value)\"\n (click)=\"open(); $event.stopPropagation()\"\n [attr.aria-controls]=\"isOpen() ? cdkListbox().id : null\"\n [attr.aria-activedescendant]=\"isOpen() ? activeDescendantId() : null\"\n [attr.aria-label]=\"placeholder() || i18n.defaultSearchInputLabel\"\n [placeholder]=\"hasValue() ? '' : placeholder()\"\n (keydown)=\"onInputKeyDown($event)\"\n tabindex=\"-1\"\n [disabled]=\"disabled()\"\n />\n }\n</div>\n\n<div class=\"ga-select__suffix\">\n @if (clearable() && hasValue()) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n (click)=\"clearValue(); $event.stopPropagation()\"\n [attr.aria-label]=\"clearableLabel() ?? i18n.clearLabel\"\n style=\"font-size: 0\"\n >\n <ga-icon [icon]=\"icons.CircleX\" size=\"16\" />\n </button>\n }\n\n <ga-icon [icon]=\"menuStatusIcon()\" class=\"ga-select__action-icon\" />\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayScrollStrategy]=\"repositionScrollStrategy\"\n (overlayOutsideClick)=\"close()\"\n (attach)=\"onOverlayAttach()\"\n (detach)=\"onOverlayDetach()\"\n (overlayKeydown)=\"onOverlayKeydown($event)\"\n>\n <ng-content select=\"ga-select-dropdown\" />\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: GaIconModule }, { kind: "component", type: GaIconComponent, selector: "ga-icon", inputs: ["icon", "size", "color", "strokeWidth"] }, { kind: "ngmodule", type: GaButtonModule }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1$1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "component", type: GaSelectDefaultValueComponent, selector: "ga-select-default-value" }] });
4237
+ ], queries: [{ propertyName: "gaOptions", predicate: GaOptionComponent, descendants: true, read: GaOptionComponent, isSignal: true }, { propertyName: "cdkListbox", first: true, predicate: CdkListbox, descendants: true, isSignal: true }, { propertyName: "gaDropdown", first: true, predicate: GaSelectDropdownComponent, descendants: true, isSignal: true }, { propertyName: "customSelectValue", first: true, predicate: GaSelectValueComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "inputSearch", first: true, predicate: ["inputSearch"], descendants: true, isSignal: true }, { propertyName: "content", first: true, predicate: ["ngContent"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "connectedOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1$1.CdkOverlayOrigin }, { directive: GaLabelledByFormFieldDirective, inputs: ["aria-labelledby", "aria-labelledby"] }], ngImport: i0, template: "@if (leftIcon()) {\n <ga-icon [icon]=\"leftIcon()!\" />\n}\n\n<div class=\"ga-select__main-area\">\n @if (hasValue() && (!textValue() || multiple())) {\n @if (customSelectValue()) {\n <div class=\"ga-select__value\">\n <ng-content select=\"ga-select-value\" />\n </div>\n } @else {\n <ga-select-default-value />\n }\n } @else if (!searchable()) {\n <div class=\"ga-select__placeholder\">\n {{ placeholder() }}\n </div>\n }\n\n @if (searchable()) {\n <input\n #inputSearch\n type=\"text\"\n class=\"ga-select__input\"\n aria-autocomplete=\"list\"\n [value]=\"textValue()\"\n (input)=\"open(); textValue.set(inputSearch.value)\"\n (click)=\"open(); $event.stopPropagation()\"\n [attr.aria-controls]=\"isOpen() ? cdkListbox().id : null\"\n [attr.aria-activedescendant]=\"isOpen() ? activeDescendantId() : null\"\n [attr.aria-label]=\"placeholder() || i18n.defaultSearchInputLabel\"\n [placeholder]=\"hasValue() ? '' : placeholder()\"\n (keydown)=\"onInputKeyDown($event)\"\n tabindex=\"-1\"\n [disabled]=\"disabled()\"\n />\n }\n</div>\n\n<div class=\"ga-select__suffix\">\n @if (clearable() && hasValue()) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n (click)=\"clearValue(); $event.stopPropagation()\"\n [attr.aria-label]=\"clearableLabel() ?? i18n.clearLabel\"\n style=\"font-size: 0\"\n >\n <ga-icon [icon]=\"icons.CircleX\" size=\"16\" />\n </button>\n }\n\n <ga-icon [icon]=\"menuStatusIcon()\" class=\"ga-select__action-icon\" />\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayScrollStrategy]=\"repositionScrollStrategy\"\n (overlayOutsideClick)=\"close()\"\n (attach)=\"onOverlayAttach()\"\n (detach)=\"onOverlayDetach()\"\n (overlayKeydown)=\"onOverlayKeydown($event)\"\n>\n <ng-content select=\"ga-select-dropdown\" />\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: GaIconModule }, { kind: "component", type: GaIconComponent, selector: "ga-icon", inputs: ["icon", "size", "color", "strokeWidth"] }, { kind: "ngmodule", type: GaButtonModule }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1$1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "component", type: GaSelectDefaultValueComponent, selector: "ga-select-default-value" }] });
4169
4238
  }
4170
4239
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaSelectComponent, decorators: [{
4171
4240
  type: Component,
@@ -4237,47 +4306,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
4237
4306
  }]
4238
4307
  }] });
4239
4308
 
4240
- class GaSpinnerModule {
4241
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaSpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4242
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: GaSpinnerModule, imports: [GaSpinnerComponent], exports: [GaSpinnerComponent] });
4243
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaSpinnerModule });
4244
- }
4245
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaSpinnerModule, decorators: [{
4246
- type: NgModule,
4247
- args: [{
4248
- imports: [GaSpinnerComponent],
4249
- exports: [GaSpinnerComponent],
4250
- }]
4251
- }] });
4252
-
4253
- class GaSelectDropdownSpinnerComponent {
4254
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaSelectDropdownSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4255
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: GaSelectDropdownSpinnerComponent, isStandalone: true, selector: "ga-select-dropdown-spinner", host: { classAttribute: "ga-dropdown__spinner" }, ngImport: i0, template: `<ga-spinner size="16" />`, isInline: true, dependencies: [{ kind: "ngmodule", type: GaSpinnerModule }, { kind: "component", type: GaSpinnerComponent, selector: "ga-spinner", inputs: ["size"] }] });
4256
- }
4257
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaSelectDropdownSpinnerComponent, decorators: [{
4258
- type: Component,
4259
- args: [{
4260
- selector: 'ga-select-dropdown-spinner',
4261
- template: `<ga-spinner size="16" />`,
4262
- imports: [GaSpinnerModule],
4263
- host: {
4264
- class: 'ga-dropdown__spinner',
4265
- },
4266
- }]
4267
- }] });
4268
-
4269
- class GaSelectDropdownComponent {
4270
- loading = input(false, { transform: booleanAttribute });
4271
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaSelectDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4272
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: GaSelectDropdownComponent, isStandalone: true, selector: "ga-select-dropdown", inputs: { loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "ga-dropdown ga-dropdown__content" }, hostDirectives: [{ directive: i1$5.CdkListbox }], ngImport: i0, template: "@if (loading()) {\n <ga-select-dropdown-spinner />\n} @else {\n <ng-content />\n}\n", dependencies: [{ kind: "component", type: GaSelectDropdownSpinnerComponent, selector: "ga-select-dropdown-spinner" }] });
4273
- }
4274
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaSelectDropdownComponent, decorators: [{
4275
- type: Component,
4276
- args: [{ selector: 'ga-select-dropdown', imports: [GaSelectDropdownSpinnerComponent], hostDirectives: [CdkListbox], host: {
4277
- class: 'ga-dropdown ga-dropdown__content',
4278
- }, template: "@if (loading()) {\n <ga-select-dropdown-spinner />\n} @else {\n <ng-content />\n}\n" }]
4279
- }] });
4280
-
4281
4309
  /**
4282
4310
  * @internal - Internal validator provider for ga-select required validation
4283
4311
  */
@@ -4612,6 +4640,93 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
4612
4640
  }]
4613
4641
  }] });
4614
4642
 
4643
+ class GaChipListboxComponent {
4644
+ cdkListbox = inject(CdkListbox, { self: true });
4645
+ orientation = input('horizontal');
4646
+ variant = input('default');
4647
+ valueChange = output();
4648
+ disabled = computed(() => this.cdkListbox.disabled);
4649
+ constructor() {
4650
+ effect(() => {
4651
+ this.cdkListbox.orientation = this.orientation();
4652
+ });
4653
+ this.cdkListbox.valueChange
4654
+ .pipe(takeUntilDestroyed())
4655
+ .subscribe((event) => {
4656
+ const value = !this.cdkListbox.multiple ? event.value[0] : event.value;
4657
+ this.valueChange.emit(value);
4658
+ });
4659
+ }
4660
+ focus() {
4661
+ this.cdkListbox.focus();
4662
+ }
4663
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaChipListboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4664
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.4", type: GaChipListboxComponent, isStandalone: true, selector: "ga-chip-listbox", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, host: { classAttribute: "ga-chip-listbox" }, hostDirectives: [{ directive: i1$5.CdkListbox, inputs: ["cdkListboxMultiple", "multiple", "cdkListboxValue", "value", "cdkListboxDisabled", "disabled", "cdkListboxCompareWith", "compareWith"] }], ngImport: i0, template: "<ng-content />\n" });
4665
+ }
4666
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaChipListboxComponent, decorators: [{
4667
+ type: Component,
4668
+ args: [{ selector: 'ga-chip-listbox', hostDirectives: [
4669
+ {
4670
+ directive: CdkListbox,
4671
+ inputs: [
4672
+ 'cdkListboxMultiple: multiple',
4673
+ 'cdkListboxValue: value',
4674
+ 'cdkListboxDisabled: disabled',
4675
+ 'cdkListboxCompareWith: compareWith',
4676
+ ],
4677
+ },
4678
+ ], host: {
4679
+ class: 'ga-chip-listbox',
4680
+ }, template: "<ng-content />\n" }]
4681
+ }], ctorParameters: () => [] });
4682
+
4683
+ class GaChipComponent {
4684
+ cdkOption = inject(CdkOption, { self: true });
4685
+ listbox = inject(GaChipListboxComponent);
4686
+ _isSelected = signal(null);
4687
+ selected = this._isSelected.asReadonly();
4688
+ value = input.required();
4689
+ disabled = input(false, { transform: booleanAttribute });
4690
+ constructor() {
4691
+ afterEveryRender({
4692
+ read: () => {
4693
+ // NOTE: currently there is no other reliable way to track the selected state,
4694
+ // refactor once cdk will be based on signals or more appropriate events introduced
4695
+ this._isSelected.set(this.cdkOption.isSelected());
4696
+ },
4697
+ });
4698
+ }
4699
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4700
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.4", type: GaChipComponent, isStandalone: true, selector: "ga-chip", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.ga-quick-filter-button--transparent": "listbox.variant() === 'transparent'", "class.ga-quick-filter-button--disabled": "disabled() || listbox.disabled()", "class.ga-quick-filter-button--selected": "selected()" }, classAttribute: "ga-quick-filter-button" }, hostDirectives: [{ directive: i1$5.CdkOption, inputs: ["cdkOption", "value", "cdkOptionDisabled", "disabled"] }], ngImport: i0, template: "<ng-content />\n", dependencies: [{ kind: "ngmodule", type: CdkListboxModule }] });
4701
+ }
4702
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaChipComponent, decorators: [{
4703
+ type: Component,
4704
+ args: [{ selector: 'ga-chip', imports: [CdkListboxModule], hostDirectives: [
4705
+ {
4706
+ directive: CdkOption,
4707
+ inputs: ['cdkOption: value', 'cdkOptionDisabled: disabled'],
4708
+ },
4709
+ ], host: {
4710
+ class: 'ga-quick-filter-button',
4711
+ '[class.ga-quick-filter-button--transparent]': "listbox.variant() === 'transparent'",
4712
+ '[class.ga-quick-filter-button--disabled]': 'disabled() || listbox.disabled()',
4713
+ '[class.ga-quick-filter-button--selected]': 'selected()',
4714
+ }, template: "<ng-content />\n" }]
4715
+ }], ctorParameters: () => [] });
4716
+
4717
+ class GaChipModule {
4718
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaChipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4719
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: GaChipModule, imports: [GaChipComponent, GaChipListboxComponent], exports: [GaChipComponent, GaChipListboxComponent] });
4720
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaChipModule, imports: [GaChipComponent] });
4721
+ }
4722
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaChipModule, decorators: [{
4723
+ type: NgModule,
4724
+ args: [{
4725
+ imports: [GaChipComponent, GaChipListboxComponent],
4726
+ exports: [GaChipComponent, GaChipListboxComponent],
4727
+ }]
4728
+ }] });
4729
+
4615
4730
  /*
4616
4731
  * Public API Surface of ngx-gaia
4617
4732
  */
@@ -4620,5 +4735,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
4620
4735
  * Generated bundle index. Do not edit.
4621
4736
  */
4622
4737
 
4623
- export { CHECKBOX_CONTROL_VALUE_ACCESSOR, DEFAULT_MODAL_OPTIONS, GA_ALERT_I18N_FACTORY, GA_BASE_FONT_SIZE, GA_BUTTON_I18N_FACTORY, GA_CHECKBOX_REQUIRED_VALIDATOR, GA_DATEPICKER_I18N_FACTORY, GA_DATEPICKER_PARSER_FORMATTER_FACTORY, GA_DATEPICKER_VALUE_ADAPTER_FACTORY, GA_DATE_PARSER_FORMATTER_CONFIG, GA_DEFAULT_DATEPICKER_FORMATS, GA_FORM_CONTROL_ADAPTER, GA_FORM_ERRORS, GA_ICON_DEFAULT_SIZE, GA_MODAL_DATA, GA_MODAL_I18N_FACTORY, GA_SELECT_I18N_FACTORY, GA_SELECT_REQUIRED_VALIDATOR, GA_TOOLTIP_DEFAULT_OFFSET, GaAlertComponent, GaAlertI18n, GaAlertI18nDefault, GaAlertModule, GaAlertTitleActionsComponent, GaAlertTitleComponent, GaBadgeComponent, GaBadgeModule, GaButtonDirective, GaButtonI18n, GaButtonI18nDefault, GaButtonModule, GaCardComponent, GaCardModule, GaCheckboxComponent, GaCheckboxModule, GaCheckboxRequiredValidator, GaDatepickerComponent, GaDatepickerI18n, GaDatepickerI18nDefault, GaDatepickerInputDirective, GaDatepickerModule, GaDatepickerNativeUtcIsoValueAdapter, GaDatepickerNativeUtcValueAdapter, GaDatepickerParserFormatter, GaDatepickerParserFormatterDefault, GaDatepickerStructValueAdapter, GaDatepickerToggleComponent, GaDatepickerValueAdapter, GaFieldErrorDirective, GaFieldInfoComponent, GaFieldLabelComponent, GaFormControlDirective, GaFormControlErrorsDirective, GaFormFieldComponent, GaFormFieldConnector, GaFormFieldModule, GaIconButtonDirective, GaIconComponent, GaIconModule, GaInputComponent, GaInputDirective, GaInputModule, GaLabelledByFormFieldDirective, GaLinkDirective, GaLinkModule, GaMenuComponent, GaMenuItemComponent, GaMenuModule, GaMenuSeparatorComponent, GaMenuTitleComponent, GaMenuTriggerDirective, GaMenuTriggerIconComponent, GaModalActionsComponent, GaModalCloseDirective, GaModalComponent, GaModalContentComponent, GaModalDescriptionComponent, GaModalDescriptionDirective, GaModalHeaderComponent, GaModalI18n, GaModalI18nDefault, GaModalLabelDirective, GaModalModule, GaModalOptions, GaModalRef, GaModalService, GaModalTitleDirective, GaOptgroupComponent, GaOptionComponent, GaRadioButtonComponent, GaRadioGroupComponent, GaRadioModule, GaSegmentedControlButtonDirective, GaSegmentedControlComponent, GaSegmentedControlIconButtonComponent, GaSegmentedControlModule, GaSegmentedControlTextButtonComponent, GaSelectComponent, GaSelectDropdownComponent, GaSelectDropdownSpinnerComponent, GaSelectI18n, GaSelectI18nDefault, GaSelectModule, GaSelectRequiredValidator, GaSelectValueComponent, GaSpinnerComponent, GaSpinnerModule, GaSwitchComponent, GaSwitchModule, GaTextAreaDirective, GaTextAreaModule, GaTooltipComponent, GaTooltipDirective, GaTooltipModule, RADIO_CONTROL_VALUE_ACCESSOR, SWITCH_CONTROL_VALUE_ACCESSOR, compareStructs, extendGaDateParserFormatter, injectNgControlState, provideGaAlertI18n, provideGaBaseFontSize, provideGaButtonI18n, provideGaDatepickerI18n, provideGaDatepickerParserFormatter, provideGaDatepickerValueAdapter, provideGaFormErrors, provideGaModalI18n, provideGaModalOptions, provideGaSelectI18n };
4738
+ export { CHECKBOX_CONTROL_VALUE_ACCESSOR, DEFAULT_MODAL_OPTIONS, GA_ALERT_I18N_FACTORY, GA_BASE_FONT_SIZE, GA_BUTTON_I18N_FACTORY, GA_CHECKBOX_REQUIRED_VALIDATOR, GA_DATEPICKER_I18N_FACTORY, GA_DATEPICKER_PARSER_FORMATTER_FACTORY, GA_DATEPICKER_VALUE_ADAPTER_FACTORY, GA_DATE_PARSER_FORMATTER_CONFIG, GA_DEFAULT_DATEPICKER_FORMATS, GA_FORM_CONTROL_ADAPTER, GA_FORM_ERRORS, GA_ICON_DEFAULT_SIZE, GA_MODAL_DATA, GA_MODAL_I18N_FACTORY, GA_SELECT_I18N_FACTORY, GA_SELECT_REQUIRED_VALIDATOR, GA_TOOLTIP_DEFAULT_OFFSET, GaAlertComponent, GaAlertI18n, GaAlertI18nDefault, GaAlertModule, GaAlertTitleActionsComponent, GaAlertTitleComponent, GaBadgeComponent, GaBadgeModule, GaButtonDirective, GaButtonI18n, GaButtonI18nDefault, GaButtonModule, GaCardComponent, GaCardModule, GaCheckboxComponent, GaCheckboxModule, GaCheckboxRequiredValidator, GaChipComponent, GaChipListboxComponent, GaChipModule, GaDatepickerComponent, GaDatepickerI18n, GaDatepickerI18nDefault, GaDatepickerInputDirective, GaDatepickerModule, GaDatepickerNativeUtcIsoValueAdapter, GaDatepickerNativeUtcValueAdapter, GaDatepickerParserFormatter, GaDatepickerParserFormatterDefault, GaDatepickerStructValueAdapter, GaDatepickerToggleComponent, GaDatepickerValueAdapter, GaFieldErrorDirective, GaFieldInfoComponent, GaFieldLabelComponent, GaFormControlDirective, GaFormControlErrorsDirective, GaFormFieldComponent, GaFormFieldConnector, GaFormFieldModule, GaIconButtonDirective, GaIconComponent, GaIconModule, GaInputComponent, GaInputDirective, GaInputModule, GaLabelledByFormFieldDirective, GaLinkDirective, GaLinkModule, GaMenuComponent, GaMenuItemComponent, GaMenuModule, GaMenuSeparatorComponent, GaMenuTitleComponent, GaMenuTriggerDirective, GaMenuTriggerIconComponent, GaModalActionsComponent, GaModalCloseDirective, GaModalComponent, GaModalContentComponent, GaModalDescriptionComponent, GaModalDescriptionDirective, GaModalHeaderComponent, GaModalI18n, GaModalI18nDefault, GaModalLabelDirective, GaModalModule, GaModalOptions, GaModalRef, GaModalService, GaModalTitleDirective, GaOptgroupComponent, GaOptionComponent, GaRadioButtonComponent, GaRadioGroupComponent, GaRadioModule, GaSegmentedControlButtonDirective, GaSegmentedControlComponent, GaSegmentedControlIconButtonComponent, GaSegmentedControlModule, GaSegmentedControlTextButtonComponent, GaSelectComponent, GaSelectDropdownComponent, GaSelectDropdownSpinnerComponent, GaSelectI18n, GaSelectI18nDefault, GaSelectModule, GaSelectRequiredValidator, GaSelectValueComponent, GaSpinnerComponent, GaSpinnerModule, GaSwitchComponent, GaSwitchModule, GaTextAreaDirective, GaTextAreaModule, GaTooltipComponent, GaTooltipDirective, GaTooltipModule, RADIO_CONTROL_VALUE_ACCESSOR, SWITCH_CONTROL_VALUE_ACCESSOR, compareStructs, extendGaDateParserFormatter, injectNgControlState, provideGaAlertI18n, provideGaBaseFontSize, provideGaButtonI18n, provideGaDatepickerI18n, provideGaDatepickerParserFormatter, provideGaDatepickerValueAdapter, provideGaFormErrors, provideGaModalI18n, provideGaModalOptions, provideGaSelectI18n };
4624
4739
  //# sourceMappingURL=vsn-ux-ngx-gaia.mjs.map