@vsn-ux/ngx-gaia 0.5.1 → 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.
@@ -344,11 +344,11 @@ const CHECKBOX_CONTROL_VALUE_ACCESSOR = {
344
344
  };
345
345
  // Increasing integer for generating unique ids for checkbox components.
346
346
  // Inspired by @angular/components
347
- let nextUniqueId$5 = 0;
347
+ let nextUniqueId$6 = 0;
348
348
  class GaCheckboxComponent {
349
349
  tabindex;
350
350
  /** @ignore */
351
- _uniqueId = `ga-checkbox-${++nextUniqueId$5}`;
351
+ _uniqueId = `ga-checkbox-${++nextUniqueId$6}`;
352
352
  /** @ignore */
353
353
  injector = inject(Injector);
354
354
  icons = { Minus, Check };
@@ -404,7 +404,7 @@ class GaCheckboxComponent {
404
404
  this.tabindex = tabindex;
405
405
  }
406
406
  ngDoCheck() {
407
- const ngControl = this.injector.get(NgControl, null);
407
+ const ngControl = this.injector.get(NgControl, null, { self: true });
408
408
  if (ngControl) {
409
409
  this._invalidNgModel.set(!!ngControl.invalid);
410
410
  this._ngModelName.set(ngControl.name);
@@ -683,9 +683,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
683
683
  }]
684
684
  }] });
685
685
 
686
- let nextUniqueId$4 = 0;
686
+ let nextUniqueId$5 = 0;
687
687
  class GaInputDirective {
688
- uniqueId = `ga-input-${++nextUniqueId$4}`;
688
+ uniqueId = `ga-input-${++nextUniqueId$5}`;
689
689
  implicitNgControl = inject(NgControl, {
690
690
  optional: true,
691
691
  self: true,
@@ -754,9 +754,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
754
754
  }]
755
755
  }] });
756
756
 
757
- let nextUniqueId$3 = 0;
757
+ let nextUniqueId$4 = 0;
758
758
  class GaFormFieldComponent {
759
- uniqueId = `ga-form-field-${++nextUniqueId$3}`;
759
+ uniqueId = `ga-form-field-${++nextUniqueId$4}`;
760
760
  formControl = contentChild(GA_FORM_CONTROL, { descendants: true });
761
761
  controlId = computed(() => {
762
762
  return this.formControl()?._formControlId() ?? this.uniqueId;
@@ -1380,10 +1380,10 @@ const RADIO_CONTROL_VALUE_ACCESSOR = {
1380
1380
  multi: true,
1381
1381
  };
1382
1382
  // Increasing integer for generating unique ids for radio components.
1383
- let nextUniqueId$2 = 0;
1383
+ let nextUniqueId$3 = 0;
1384
1384
  class GaRadioGroupComponent {
1385
1385
  /** Name of the radio button group. All radio buttons inside this group will use this name. */
1386
- name = input(`ga-radio-group-${nextUniqueId$2++}`);
1386
+ name = input(`ga-radio-group-${nextUniqueId$3++}`);
1387
1387
  /**
1388
1388
  * Value for the radio-group. Should equal the value of the selected radio button if there is
1389
1389
  * a corresponding radio button with a matching value. If there is not such a corresponding
@@ -1442,13 +1442,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
1442
1442
  }] });
1443
1443
 
1444
1444
  // Increasing integer for generating unique ids for radio button components.
1445
- let nextUniqueId$1 = 0;
1445
+ let nextUniqueId$2 = 0;
1446
1446
  class GaRadioButtonComponent {
1447
1447
  tabindex;
1448
1448
  radioGroup = inject(GaRadioGroupComponent, {
1449
1449
  optional: true,
1450
1450
  });
1451
- _uniqueId = `ga-radio-button-${++nextUniqueId$1}`;
1451
+ _uniqueId = `ga-radio-button-${++nextUniqueId$2}`;
1452
1452
  /** The value attribute of the native input element */
1453
1453
  value = input(null);
1454
1454
  inputId = input(null, { alias: 'id' });
@@ -1538,18 +1538,22 @@ class GaOptionComponent {
1538
1538
  cdkOption = inject(CdkOption, { self: true });
1539
1539
  value = input(null);
1540
1540
  disabled = input(false, { transform: booleanAttribute });
1541
- withInput = input(false, { transform: booleanAttribute });
1541
+ withInput = input(this.selectComponent.multiple(), {
1542
+ transform: booleanAttribute,
1543
+ });
1542
1544
  selected = computed(() => this._isSelected() &&
1543
1545
  this.cdkOption.value !== undefined &&
1544
1546
  this.cdkOption.value !== null &&
1545
1547
  this.cdkOption.value !== '');
1546
1548
  active = this._isActive.asReadonly();
1547
1549
  constructor() {
1548
- afterRender(() => {
1549
- // NOTE: currently there is no other reliable way to track the selected state,
1550
- // refactor once cdk will be based on signals or more appropriate events introduced
1551
- this._isSelected.set(this.cdkOption.isSelected());
1552
- 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
+ },
1553
1557
  });
1554
1558
  }
1555
1559
  onClick() {
@@ -1594,29 +1598,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
1594
1598
 
1595
1599
  class GaSelectDefaultValueComponent {
1596
1600
  selectComponent = inject(GaSelectComponent);
1597
- optionViewValue = computed(() => {
1601
+ icons = { X };
1602
+ singleViewValue = computed(() => {
1598
1603
  const options = this.selectComponent.selectedOptions();
1599
1604
  if (!options.length) {
1600
- return null;
1605
+ return '';
1601
1606
  }
1602
- return options
1603
- .map((option) => option.cdkOption.element.textContent?.trim() ?? '')
1604
- .join(', ');
1607
+ return options[0].cdkOption.getLabel();
1605
1608
  });
1609
+ deselectOption(option) {
1610
+ this.selectComponent.deselectValue(option.cdkOption.value);
1611
+ }
1606
1612
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaSelectDefaultValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1607
- 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"] }] });
1608
1614
  }
1609
1615
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaSelectDefaultValueComponent, decorators: [{
1610
1616
  type: Component,
1611
- args: [{
1612
- selector: 'ga-select-default-value',
1613
- template: `{{ optionViewValue() }}`,
1614
- }]
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" }]
1615
1620
  }] });
1616
1621
 
1617
- let nextUniqueId = 0;
1622
+ let nextUniqueId$1 = 0;
1618
1623
  class GaSelectComponent {
1619
- _uniqueId = `ga-select-${++nextUniqueId}`;
1624
+ _uniqueId = `ga-select-${++nextUniqueId$1}`;
1620
1625
  focusedTriggerElement = null;
1621
1626
  _onTouched;
1622
1627
  _onModelChanged;
@@ -1737,7 +1742,9 @@ class GaSelectComponent {
1737
1742
  });
1738
1743
  }
1739
1744
  ngDoCheck() {
1740
- const implicitNgControl = this.injector.get(NgControl, null);
1745
+ const implicitNgControl = this.injector.get(NgControl, null, {
1746
+ self: true,
1747
+ });
1741
1748
  // we can rely on computed because `ivalid` of NgControl is not a signal, yet
1742
1749
  if (implicitNgControl) {
1743
1750
  this.implicitInvalid.set(!!implicitNgControl.invalid && !!implicitNgControl.dirty);
@@ -1799,11 +1806,7 @@ class GaSelectComponent {
1799
1806
  if (activeOption) {
1800
1807
  const { cdkOption } = activeOption;
1801
1808
  this.cdkListbox().toggle(cdkOption);
1802
- let { value } = this.cdkListbox();
1803
- if (!this.multiple()) {
1804
- [value] = value;
1805
- }
1806
- this.value.set(value);
1809
+ this.syncValue();
1807
1810
  }
1808
1811
  }
1809
1812
  onInputKeyDown(event) {
@@ -1842,11 +1845,24 @@ class GaSelectComponent {
1842
1845
  }
1843
1846
  onOverlayDetach() {
1844
1847
  this._isOpen.set(false);
1845
- this.focusedTriggerElement?.focus();
1848
+ if (this.inputSearch()?.nativeElement !== this.focusedTriggerElement) {
1849
+ this.focusedTriggerElement?.focus();
1850
+ }
1846
1851
  this.textValue.set('');
1847
1852
  this._onTouched?.();
1848
1853
  this.closed.emit();
1849
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
+ }
1850
1866
  setItemActive(direction) {
1851
1867
  const options = this.gaOptions();
1852
1868
  const currentIndex = options.findIndex(({ cdkOption }) => cdkOption.isActive());
@@ -1867,7 +1883,7 @@ class GaSelectComponent {
1867
1883
  }
1868
1884
  }
1869
1885
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1870
- 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: [
1871
1887
  {
1872
1888
  provide: NG_VALUE_ACCESSOR,
1873
1889
  useExisting: forwardRef(() => GaSelectComponent),
@@ -1877,7 +1893,7 @@ class GaSelectComponent {
1877
1893
  provide: GA_FORM_CONTROL,
1878
1894
  useExisting: forwardRef(() => GaSelectComponent),
1879
1895
  },
1880
- ], 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" }] });
1881
1897
  }
1882
1898
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: GaSelectComponent, decorators: [{
1883
1899
  type: Component,
@@ -1900,6 +1916,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
1900
1916
  role: 'combobox',
1901
1917
  '[attr.id]': 'id()',
1902
1918
  class: 'ga-select',
1919
+ '[class.ga-select--multi]': 'multiple()',
1903
1920
  '[class.ga-select--expanded]': 'isOpen()',
1904
1921
  '[class.ga-select--disabled]': 'disabled()',
1905
1922
  '[class.ga-select--invalid]': 'invalid()',
@@ -1916,7 +1933,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
1916
1933
  '(keydown.arrowdown)': 'open(); $event.preventDefault()',
1917
1934
  '(keydown.space)': 'open(); $event.preventDefault()',
1918
1935
  '(keydown.enter)': 'open(); $event.preventDefault()',
1919
- }, 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" }]
1920
1937
  }], ctorParameters: () => [] });
1921
1938
 
1922
1939
  class GaOptgroupComponent {
@@ -2204,6 +2221,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
2204
2221
  }]
2205
2222
  }] });
2206
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
+
2207
2272
  /*
2208
2273
  * Public API Surface of ngx-gaia
2209
2274
  */
@@ -2212,5 +2277,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
2212
2277
  * Generated bundle index. Do not edit.
2213
2278
  */
2214
2279
 
2215
- 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 };
2216
2281
  //# sourceMappingURL=vsn-ux-ngx-gaia.mjs.map