@vsn-ux/ngx-gaia 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -131,7 +131,7 @@ class GaIconButtonDirective {
131
131
  alias: 'gaIconButtonVariant',
132
132
  });
133
133
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaIconButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Component });
134
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.1.5", type: GaIconButtonDirective, isStandalone: true, selector: "button[gaIconButton], a[gaIconButton]", inputs: { icon: { classPropertyName: "icon", publicName: "gaIconButton", isSignal: true, isRequired: true, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "gaIconButtonVariant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.ga-button--primary": "variant() === 'primary'", "class.ga-button--secondary": "variant() === 'secondary'", "class.ga-button--ghost": "variant() === 'ghost'" }, classAttribute: "ga-button ga-button--icon-only" }, ngImport: i0, template: `
134
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.1.5", type: GaIconButtonDirective, isStandalone: true, selector: "button[gaIconButton], a[gaIconButton]", inputs: { icon: { classPropertyName: "icon", publicName: "gaIconButton", isSignal: true, isRequired: true, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "gaIconButtonVariant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.ga-button--primary": "variant() === 'primary'", "class.ga-button--secondary": "variant() === 'secondary'", "class.ga-button--ghost": "variant() === 'ghost'", "class.ga-button--transparent": "variant() === 'transparent'" }, classAttribute: "ga-button ga-button--icon-only" }, ngImport: i0, template: `
135
135
  <ga-icon [icon]="icon()" />
136
136
  <span class="ga-button__icon-label"><ng-content /></span>
137
137
  `, isInline: true, styles: [".ga-button__icon-label{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border-width:0!important}\n"], dependencies: [{ kind: "ngmodule", type: GaIconModule }, { kind: "component", type: GaIconComponent, selector: "ga-icon", inputs: ["icon", "size", "color", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
@@ -146,6 +146,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
146
146
  '[class.ga-button--primary]': `variant() === 'primary'`,
147
147
  '[class.ga-button--secondary]': `variant() === 'secondary'`,
148
148
  '[class.ga-button--ghost]': `variant() === 'ghost'`,
149
+ '[class.ga-button--transparent]': `variant() === 'transparent'`,
149
150
  }, styles: [".ga-button__icon-label{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border-width:0!important}\n"] }]
150
151
  }] });
151
152
 
@@ -343,11 +344,11 @@ const CHECKBOX_CONTROL_VALUE_ACCESSOR = {
343
344
  };
344
345
  // Increasing integer for generating unique ids for checkbox components.
345
346
  // Inspired by @angular/components
346
- let nextUniqueId$5 = 0;
347
+ let nextUniqueId$6 = 0;
347
348
  class GaCheckboxComponent {
348
349
  tabindex;
349
350
  /** @ignore */
350
- _uniqueId = `ga-checkbox-${++nextUniqueId$5}`;
351
+ _uniqueId = `ga-checkbox-${++nextUniqueId$6}`;
351
352
  /** @ignore */
352
353
  injector = inject(Injector);
353
354
  icons = { Minus, Check };
@@ -403,7 +404,7 @@ class GaCheckboxComponent {
403
404
  this.tabindex = tabindex;
404
405
  }
405
406
  ngDoCheck() {
406
- const ngControl = this.injector.get(NgControl, null);
407
+ const ngControl = this.injector.get(NgControl, null, { self: true });
407
408
  if (ngControl) {
408
409
  this._invalidNgModel.set(!!ngControl.invalid);
409
410
  this._ngModelName.set(ngControl.name);
@@ -682,9 +683,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
682
683
  }]
683
684
  }] });
684
685
 
685
- let nextUniqueId$4 = 0;
686
+ let nextUniqueId$5 = 0;
686
687
  class GaInputDirective {
687
- uniqueId = `ga-input-${++nextUniqueId$4}`;
688
+ uniqueId = `ga-input-${++nextUniqueId$5}`;
688
689
  implicitNgControl = inject(NgControl, {
689
690
  optional: true,
690
691
  self: true,
@@ -753,9 +754,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
753
754
  }]
754
755
  }] });
755
756
 
756
- let nextUniqueId$3 = 0;
757
+ let nextUniqueId$4 = 0;
757
758
  class GaFormFieldComponent {
758
- uniqueId = `ga-form-field-${++nextUniqueId$3}`;
759
+ uniqueId = `ga-form-field-${++nextUniqueId$4}`;
759
760
  formControl = contentChild(GA_FORM_CONTROL, { descendants: true });
760
761
  controlId = computed(() => {
761
762
  return this.formControl()?._formControlId() ?? this.uniqueId;
@@ -1379,10 +1380,10 @@ const RADIO_CONTROL_VALUE_ACCESSOR = {
1379
1380
  multi: true,
1380
1381
  };
1381
1382
  // Increasing integer for generating unique ids for radio components.
1382
- let nextUniqueId$2 = 0;
1383
+ let nextUniqueId$3 = 0;
1383
1384
  class GaRadioGroupComponent {
1384
1385
  /** Name of the radio button group. All radio buttons inside this group will use this name. */
1385
- name = input(`ga-radio-group-${nextUniqueId$2++}`);
1386
+ name = input(`ga-radio-group-${nextUniqueId$3++}`);
1386
1387
  /**
1387
1388
  * Value for the radio-group. Should equal the value of the selected radio button if there is
1388
1389
  * a corresponding radio button with a matching value. If there is not such a corresponding
@@ -1441,13 +1442,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
1441
1442
  }] });
1442
1443
 
1443
1444
  // Increasing integer for generating unique ids for radio button components.
1444
- let nextUniqueId$1 = 0;
1445
+ let nextUniqueId$2 = 0;
1445
1446
  class GaRadioButtonComponent {
1446
1447
  tabindex;
1447
1448
  radioGroup = inject(GaRadioGroupComponent, {
1448
1449
  optional: true,
1449
1450
  });
1450
- _uniqueId = `ga-radio-button-${++nextUniqueId$1}`;
1451
+ _uniqueId = `ga-radio-button-${++nextUniqueId$2}`;
1451
1452
  /** The value attribute of the native input element */
1452
1453
  value = input(null);
1453
1454
  inputId = input(null, { alias: 'id' });
@@ -1537,18 +1538,22 @@ class GaOptionComponent {
1537
1538
  cdkOption = inject(CdkOption, { self: true });
1538
1539
  value = input(null);
1539
1540
  disabled = input(false, { transform: booleanAttribute });
1540
- withInput = input(false, { transform: booleanAttribute });
1541
+ withInput = input(this.selectComponent.multiple(), {
1542
+ transform: booleanAttribute,
1543
+ });
1541
1544
  selected = computed(() => this._isSelected() &&
1542
1545
  this.cdkOption.value !== undefined &&
1543
1546
  this.cdkOption.value !== null &&
1544
1547
  this.cdkOption.value !== '');
1545
1548
  active = this._isActive.asReadonly();
1546
1549
  constructor() {
1547
- afterRender(() => {
1548
- // NOTE: currently there is no other reliable way to track the selected state,
1549
- // refactor once cdk will be based on signals or more appropriate events introduced
1550
- this._isSelected.set(this.cdkOption.isSelected());
1551
- this._isActive.set(this.cdkOption.isActive());
1550
+ afterRender({
1551
+ read: () => {
1552
+ // NOTE: currently there is no other reliable way to track the selected state,
1553
+ // refactor once cdk will be based on signals or more appropriate events introduced
1554
+ this._isSelected.set(this.cdkOption.isSelected());
1555
+ this._isActive.set(this.cdkOption.isActive());
1556
+ },
1552
1557
  });
1553
1558
  }
1554
1559
  onClick() {
@@ -1593,29 +1598,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
1593
1598
 
1594
1599
  class GaSelectDefaultValueComponent {
1595
1600
  selectComponent = inject(GaSelectComponent);
1596
- optionViewValue = computed(() => {
1601
+ icons = { X };
1602
+ singleViewValue = computed(() => {
1597
1603
  const options = this.selectComponent.selectedOptions();
1598
1604
  if (!options.length) {
1599
- return null;
1605
+ return '';
1600
1606
  }
1601
- return options
1602
- .map((option) => option.cdkOption.element.textContent?.trim() ?? '')
1603
- .join(', ');
1607
+ return options[0].cdkOption.getLabel();
1604
1608
  });
1609
+ deselectOption(option) {
1610
+ this.selectComponent.deselectValue(option.cdkOption.value);
1611
+ }
1605
1612
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaSelectDefaultValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1606
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type: GaSelectDefaultValueComponent, isStandalone: true, selector: "ga-select-default-value", ngImport: i0, template: `{{ optionViewValue() }}`, isInline: true });
1613
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.5", type: GaSelectDefaultValueComponent, isStandalone: true, selector: "ga-select-default-value", host: { classAttribute: "ga-select__value" }, ngImport: i0, template: "@if (selectComponent.multiple()) {\n @for (option of selectComponent.selectedOptions(); track option) {\n <div class=\"ga-tag ga-tag ga-tag--interactive-selected\">\n <span class=\"ga-tag__label\">{{ option.cdkOption.getLabel() }}</span>\n <div class=\"ga-tag__separator\"></div>\n <ga-icon\n [icon]=\"icons.X\"\n size=\"16\"\n class=\"ga-tag__icon\"\n (click)=\"deselectOption(option); $event.stopPropagation()\"\n />\n </div>\n }\n} @else {\n {{ singleViewValue() }}\n}\n", dependencies: [{ kind: "ngmodule", type: GaIconModule }, { kind: "component", type: GaIconComponent, selector: "ga-icon", inputs: ["icon", "size", "color", "strokeWidth"] }] });
1607
1614
  }
1608
1615
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaSelectDefaultValueComponent, decorators: [{
1609
1616
  type: Component,
1610
- args: [{
1611
- selector: 'ga-select-default-value',
1612
- template: `{{ optionViewValue() }}`,
1613
- }]
1617
+ args: [{ selector: 'ga-select-default-value', imports: [GaIconModule], host: {
1618
+ class: 'ga-select__value',
1619
+ }, template: "@if (selectComponent.multiple()) {\n @for (option of selectComponent.selectedOptions(); track option) {\n <div class=\"ga-tag ga-tag ga-tag--interactive-selected\">\n <span class=\"ga-tag__label\">{{ option.cdkOption.getLabel() }}</span>\n <div class=\"ga-tag__separator\"></div>\n <ga-icon\n [icon]=\"icons.X\"\n size=\"16\"\n class=\"ga-tag__icon\"\n (click)=\"deselectOption(option); $event.stopPropagation()\"\n />\n </div>\n }\n} @else {\n {{ singleViewValue() }}\n}\n" }]
1614
1620
  }] });
1615
1621
 
1616
- let nextUniqueId = 0;
1622
+ let nextUniqueId$1 = 0;
1617
1623
  class GaSelectComponent {
1618
- _uniqueId = `ga-select-${++nextUniqueId}`;
1624
+ _uniqueId = `ga-select-${++nextUniqueId$1}`;
1619
1625
  focusedTriggerElement = null;
1620
1626
  _onTouched;
1621
1627
  _onModelChanged;
@@ -1736,7 +1742,9 @@ class GaSelectComponent {
1736
1742
  });
1737
1743
  }
1738
1744
  ngDoCheck() {
1739
- const implicitNgControl = this.injector.get(NgControl, null);
1745
+ const implicitNgControl = this.injector.get(NgControl, null, {
1746
+ self: true,
1747
+ });
1740
1748
  // we can rely on computed because `ivalid` of NgControl is not a signal, yet
1741
1749
  if (implicitNgControl) {
1742
1750
  this.implicitInvalid.set(!!implicitNgControl.invalid && !!implicitNgControl.dirty);
@@ -1798,11 +1806,7 @@ class GaSelectComponent {
1798
1806
  if (activeOption) {
1799
1807
  const { cdkOption } = activeOption;
1800
1808
  this.cdkListbox().toggle(cdkOption);
1801
- let { value } = this.cdkListbox();
1802
- if (!this.multiple()) {
1803
- [value] = value;
1804
- }
1805
- this.value.set(value);
1809
+ this.syncValue();
1806
1810
  }
1807
1811
  }
1808
1812
  onInputKeyDown(event) {
@@ -1841,11 +1845,24 @@ class GaSelectComponent {
1841
1845
  }
1842
1846
  onOverlayDetach() {
1843
1847
  this._isOpen.set(false);
1844
- this.focusedTriggerElement?.focus();
1848
+ if (this.inputSearch()?.nativeElement !== this.focusedTriggerElement) {
1849
+ this.focusedTriggerElement?.focus();
1850
+ }
1845
1851
  this.textValue.set('');
1846
1852
  this._onTouched?.();
1847
1853
  this.closed.emit();
1848
1854
  }
1855
+ deselectValue(value) {
1856
+ this.cdkListbox().deselectValue(value);
1857
+ this.syncValue();
1858
+ }
1859
+ syncValue() {
1860
+ let { value } = this.cdkListbox();
1861
+ if (!this.multiple()) {
1862
+ [value] = value;
1863
+ }
1864
+ this.value.set(value);
1865
+ }
1849
1866
  setItemActive(direction) {
1850
1867
  const options = this.gaOptions();
1851
1868
  const currentIndex = options.findIndex(({ cdkOption }) => cdkOption.isActive());
@@ -1866,7 +1883,7 @@ class GaSelectComponent {
1866
1883
  }
1867
1884
  }
1868
1885
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1869
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.5", type: GaSelectComponent, isStandalone: true, selector: "ga-select", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalidInput: { classPropertyName: "invalidInput", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, compareWith: { classPropertyName: "compareWith", publicName: "compareWith", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, textValue: { classPropertyName: "textValue", publicName: "textValue", isSignal: true, isRequired: false, transformFunction: null }, leftIcon: { classPropertyName: "leftIcon", publicName: "leftIcon", isSignal: true, isRequired: false, transformFunction: null }, idInput: { classPropertyName: "idInput", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", textValue: "textValueChange", opened: "opened", closed: "closed" }, host: { attributes: { "role": "combobox", "aria-haspopup": "listbox" }, listeners: { "click": "toggle()", "keydown.arrowdown": "open(); $event.preventDefault()", "keydown.space": "open(); $event.preventDefault()", "keydown.enter": "open(); $event.preventDefault()" }, properties: { "attr.id": "id()", "class.ga-select--expanded": "isOpen()", "class.ga-select--disabled": "disabled()", "class.ga-select--invalid": "invalid()", "class.ga-select--empty": "!hasValue()", "attr.aria-expanded": "isOpen()", "attr.aria-controls": "cdkListbox().id", "attr.aria-invalid": "invalid()", "attr.aria-disabled": "disabled()", "attr.aria-owns": "searchable() ? cdkListbox().id : null", "attr.aria-activedescendant": "!searchable() ? activeDescendantId() : null", "attr.tabindex": "disabled() ? -1 : 0" }, classAttribute: "ga-select" }, providers: [
1886
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.5", type: GaSelectComponent, isStandalone: true, selector: "ga-select", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalidInput: { classPropertyName: "invalidInput", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, compareWith: { classPropertyName: "compareWith", publicName: "compareWith", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, textValue: { classPropertyName: "textValue", publicName: "textValue", isSignal: true, isRequired: false, transformFunction: null }, leftIcon: { classPropertyName: "leftIcon", publicName: "leftIcon", isSignal: true, isRequired: false, transformFunction: null }, idInput: { classPropertyName: "idInput", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", textValue: "textValueChange", opened: "opened", closed: "closed" }, host: { attributes: { "role": "combobox", "aria-haspopup": "listbox" }, listeners: { "click": "toggle()", "keydown.arrowdown": "open(); $event.preventDefault()", "keydown.space": "open(); $event.preventDefault()", "keydown.enter": "open(); $event.preventDefault()" }, properties: { "attr.id": "id()", "class.ga-select--multi": "multiple()", "class.ga-select--expanded": "isOpen()", "class.ga-select--disabled": "disabled()", "class.ga-select--invalid": "invalid()", "class.ga-select--empty": "!hasValue()", "attr.aria-expanded": "isOpen()", "attr.aria-controls": "cdkListbox().id", "attr.aria-invalid": "invalid()", "attr.aria-disabled": "disabled()", "attr.aria-owns": "searchable() ? cdkListbox().id : null", "attr.aria-activedescendant": "!searchable() ? activeDescendantId() : null", "attr.tabindex": "disabled() ? -1 : 0" }, classAttribute: "ga-select" }, providers: [
1870
1887
  {
1871
1888
  provide: NG_VALUE_ACCESSOR,
1872
1889
  useExisting: forwardRef(() => GaSelectComponent),
@@ -1876,7 +1893,7 @@ class GaSelectComponent {
1876
1893
  provide: GA_FORM_CONTROL,
1877
1894
  useExisting: forwardRef(() => GaSelectComponent),
1878
1895
  },
1879
- ], 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 }], hostDirectives: [{ directive: i1$3.CdkOverlayOrigin }], ngImport: i0, template: "@if (leftIcon()) {\n <ga-icon [icon]=\"leftIcon()!\" />\n}\n@if (searchable() && isOpen()) {\n <input\n #inputSearch\n type=\"text\"\n class=\"ga-select__input\"\n aria-autocomplete=\"list\"\n [value]=\"textValue()\"\n (input)=\"textValue.set(inputSearch.value)\"\n (click)=\"$event.stopPropagation()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"cdkListbox().id\"\n [attr.aria-activedescendant]=\"activeDescendantId()\"\n [placeholder]=\"placeholder()\"\n (keydown)=\"onInputKeyDown($event)\"\n tabindex=\"-1\"\n />\n} @else if (hasValue()) {\n <div class=\"ga-select__value\">\n @if (customSelectValue()) {\n <ng-content select=\"ga-select-value\" />\n } @else {\n <ga-select-default-value />\n }\n </div>\n} @else {\n <div class=\"ga-select__placeholder\">\n {{ placeholder() }}\n </div>\n}\n<ga-icon [icon]=\"menuStatusIcon()\" />\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayLockPosition\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n (overlayOutsideClick)=\"close()\"\n (attach)=\"onOverlayAttach()\"\n (detach)=\"onOverlayDetach()\"\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$3.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" }] });
1896
+ ], 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 }], hostDirectives: [{ directive: i1$3.CdkOverlayOrigin }], 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-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"cdkListbox().id\"\n [attr.aria-activedescendant]=\"activeDescendantId()\"\n [placeholder]=\"hasValue() ? '' : placeholder()\"\n (keydown)=\"onInputKeyDown($event)\"\n tabindex=\"-1\"\n />\n }\n</div>\n\n<div class=\"ga-select__suffix\">\n <ga-icon [icon]=\"menuStatusIcon()\" class=\"ga-select__action-icon\" />\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayLockPosition\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n (overlayOutsideClick)=\"close()\"\n (attach)=\"onOverlayAttach()\"\n (detach)=\"onOverlayDetach()\"\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$3.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" }] });
1880
1897
  }
1881
1898
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaSelectComponent, decorators: [{
1882
1899
  type: Component,
@@ -1899,6 +1916,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
1899
1916
  role: 'combobox',
1900
1917
  '[attr.id]': 'id()',
1901
1918
  class: 'ga-select',
1919
+ '[class.ga-select--multi]': 'multiple()',
1902
1920
  '[class.ga-select--expanded]': 'isOpen()',
1903
1921
  '[class.ga-select--disabled]': 'disabled()',
1904
1922
  '[class.ga-select--invalid]': 'invalid()',
@@ -1915,7 +1933,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
1915
1933
  '(keydown.arrowdown)': 'open(); $event.preventDefault()',
1916
1934
  '(keydown.space)': 'open(); $event.preventDefault()',
1917
1935
  '(keydown.enter)': 'open(); $event.preventDefault()',
1918
- }, template: "@if (leftIcon()) {\n <ga-icon [icon]=\"leftIcon()!\" />\n}\n@if (searchable() && isOpen()) {\n <input\n #inputSearch\n type=\"text\"\n class=\"ga-select__input\"\n aria-autocomplete=\"list\"\n [value]=\"textValue()\"\n (input)=\"textValue.set(inputSearch.value)\"\n (click)=\"$event.stopPropagation()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"cdkListbox().id\"\n [attr.aria-activedescendant]=\"activeDescendantId()\"\n [placeholder]=\"placeholder()\"\n (keydown)=\"onInputKeyDown($event)\"\n tabindex=\"-1\"\n />\n} @else if (hasValue()) {\n <div class=\"ga-select__value\">\n @if (customSelectValue()) {\n <ng-content select=\"ga-select-value\" />\n } @else {\n <ga-select-default-value />\n }\n </div>\n} @else {\n <div class=\"ga-select__placeholder\">\n {{ placeholder() }}\n </div>\n}\n<ga-icon [icon]=\"menuStatusIcon()\" />\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayLockPosition\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n (overlayOutsideClick)=\"close()\"\n (attach)=\"onOverlayAttach()\"\n (detach)=\"onOverlayDetach()\"\n>\n <ng-content select=\"ga-select-dropdown\" />\n</ng-template>\n" }]
1936
+ }, 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-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"cdkListbox().id\"\n [attr.aria-activedescendant]=\"activeDescendantId()\"\n [placeholder]=\"hasValue() ? '' : placeholder()\"\n (keydown)=\"onInputKeyDown($event)\"\n tabindex=\"-1\"\n />\n }\n</div>\n\n<div class=\"ga-select__suffix\">\n <ga-icon [icon]=\"menuStatusIcon()\" class=\"ga-select__action-icon\" />\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayLockPosition\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n (overlayOutsideClick)=\"close()\"\n (attach)=\"onOverlayAttach()\"\n (detach)=\"onOverlayDetach()\"\n>\n <ng-content select=\"ga-select-dropdown\" />\n</ng-template>\n" }]
1919
1937
  }], ctorParameters: () => [] });
1920
1938
 
1921
1939
  class GaOptgroupComponent {
@@ -2203,6 +2221,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
2203
2221
  }]
2204
2222
  }] });
2205
2223
 
2224
+ let nextUniqueId = 0;
2225
+ class GaTextAreaDirective {
2226
+ id = input(undefined);
2227
+ disabled = input(false, { transform: booleanAttribute });
2228
+ invalid = input(undefined, { transform: booleanAttribute });
2229
+ _formControlId = computed(() => this.uniqueId());
2230
+ _formControlDisabled = computed(() => this.disabledModel());
2231
+ uniqueId = computed(() => this.id() ?? this.generatedUniqueId);
2232
+ invalidInput = computed(() => this.invalid() ?? this.implicitInvalid());
2233
+ generatedUniqueId = `ga-text-area-${++nextUniqueId}`;
2234
+ injector = inject(Injector);
2235
+ implicitInvalid = signal(false);
2236
+ disabledModel = linkedSignal(() => this.disabled());
2237
+ ngDoCheck() {
2238
+ const ngControl = this.injector.get(NgControl, null, { self: true });
2239
+ if (ngControl) {
2240
+ this.implicitInvalid.set(!!ngControl.invalid && !!ngControl.dirty);
2241
+ this.disabledModel.set(!!ngControl.disabled);
2242
+ }
2243
+ }
2244
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaTextAreaDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2245
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.1.5", type: GaTextAreaDirective, isStandalone: true, selector: "[gaTextArea]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.ga-text-area--invalid": "invalidInput()", "attr.id": "uniqueId()" }, classAttribute: "ga-text-area" }, ngImport: i0 });
2246
+ }
2247
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaTextAreaDirective, decorators: [{
2248
+ type: Directive,
2249
+ args: [{
2250
+ selector: '[gaTextArea]',
2251
+ host: {
2252
+ class: 'ga-text-area',
2253
+ '[class.ga-text-area--invalid]': 'invalidInput()',
2254
+ '[attr.id]': 'uniqueId()',
2255
+ },
2256
+ }]
2257
+ }] });
2258
+
2259
+ class GaTextAreaModule {
2260
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaTextAreaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2261
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.5", ngImport: i0, type: GaTextAreaModule, imports: [GaTextAreaDirective], exports: [GaTextAreaDirective] });
2262
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaTextAreaModule });
2263
+ }
2264
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaTextAreaModule, decorators: [{
2265
+ type: NgModule,
2266
+ args: [{
2267
+ imports: [GaTextAreaDirective],
2268
+ exports: [GaTextAreaDirective],
2269
+ }]
2270
+ }] });
2271
+
2206
2272
  /*
2207
2273
  * Public API Surface of ngx-gaia
2208
2274
  */
@@ -2211,5 +2277,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
2211
2277
  * Generated bundle index. Do not edit.
2212
2278
  */
2213
2279
 
2214
- export { CHECKBOX_CONTROL_VALUE_ACCESSOR, GA_ALERT_I18N_FACTORY, GA_BASE_FONT_SIZE, GA_CHECKBOX_REQUIRED_VALIDATOR, GA_FORM_CONTROL, GA_ICON_DEFAULT_SIZE, GA_SELECT_REQUIRED_VALIDATOR, GA_TOOLTIP_DEFAULT_OFFSET, GaAlertComponent, GaAlertI18n, GaAlertI18nDefault, GaAlertModule, GaAlertTitleActionsComponent, GaAlertTitleComponent, GaBadgeComponent, GaBadgeModule, GaButtonDirective, GaButtonModule, GaCardComponent, GaCardModule, GaCheckboxComponent, GaCheckboxModule, GaCheckboxRequiredValidator, GaFieldInfoComponent, GaFieldLabelComponent, GaFormControlDirective, GaFormFieldComponent, GaFormFieldModule, GaIconButtonDirective, GaIconComponent, GaIconModule, GaInputComponent, GaInputDirective, GaInputModule, GaLinkDirective, GaLinkModule, GaMenuComponent, GaMenuItemComponent, GaMenuModule, GaMenuSeparatorComponent, GaMenuTitleComponent, GaMenuTriggerDirective, GaMenuTriggerIconComponent, GaOptgroupComponent, GaOptionComponent, GaRadioButtonComponent, GaRadioGroupComponent, GaRadioModule, GaSegmentedControlButtonDirective, GaSegmentedControlComponent, GaSegmentedControlIconButtonComponent, GaSegmentedControlModule, GaSegmentedControlTextButtonComponent, GaSelectComponent, GaSelectDropdownComponent, GaSelectDropdownSpinnerComponent, GaSelectModule, GaSelectRequiredValidator, GaSelectValueComponent, GaSpinnerComponent, GaSpinnerModule, GaTooltipComponent, GaTooltipDirective, GaTooltipModule, RADIO_CONTROL_VALUE_ACCESSOR, provideGaAlertI18n, provideGaBaseFontSize };
2280
+ export { CHECKBOX_CONTROL_VALUE_ACCESSOR, GA_ALERT_I18N_FACTORY, GA_BASE_FONT_SIZE, GA_CHECKBOX_REQUIRED_VALIDATOR, GA_FORM_CONTROL, GA_ICON_DEFAULT_SIZE, GA_SELECT_REQUIRED_VALIDATOR, GA_TOOLTIP_DEFAULT_OFFSET, GaAlertComponent, GaAlertI18n, GaAlertI18nDefault, GaAlertModule, GaAlertTitleActionsComponent, GaAlertTitleComponent, GaBadgeComponent, GaBadgeModule, GaButtonDirective, GaButtonModule, GaCardComponent, GaCardModule, GaCheckboxComponent, GaCheckboxModule, GaCheckboxRequiredValidator, GaFieldInfoComponent, GaFieldLabelComponent, GaFormControlDirective, GaFormFieldComponent, GaFormFieldModule, GaIconButtonDirective, GaIconComponent, GaIconModule, GaInputComponent, GaInputDirective, GaInputModule, GaLinkDirective, GaLinkModule, GaMenuComponent, GaMenuItemComponent, GaMenuModule, GaMenuSeparatorComponent, GaMenuTitleComponent, GaMenuTriggerDirective, GaMenuTriggerIconComponent, GaOptgroupComponent, GaOptionComponent, GaRadioButtonComponent, GaRadioGroupComponent, GaRadioModule, GaSegmentedControlButtonDirective, GaSegmentedControlComponent, GaSegmentedControlIconButtonComponent, GaSegmentedControlModule, GaSegmentedControlTextButtonComponent, GaSelectComponent, GaSelectDropdownComponent, GaSelectDropdownSpinnerComponent, GaSelectModule, GaSelectRequiredValidator, GaSelectValueComponent, GaSpinnerComponent, GaSpinnerModule, GaTextAreaDirective, GaTextAreaModule, GaTooltipComponent, GaTooltipDirective, GaTooltipModule, RADIO_CONTROL_VALUE_ACCESSOR, provideGaAlertI18n, provideGaBaseFontSize };
2215
2281
  //# sourceMappingURL=vsn-ux-ngx-gaia.mjs.map