matcha-components 20.68.0 → 20.70.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.
@@ -9612,6 +9612,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImpor
9612
9612
  }] } });
9613
9613
 
9614
9614
  class MatchaChipComponent {
9615
+ get hostClasses() {
9616
+ return 'matcha-chip radius-full d-flex align-items-center gap-8 px-14 py-10 h-20';
9617
+ }
9615
9618
  /** Se o chip está selecionado */
9616
9619
  get selected() {
9617
9620
  return this._selected;
@@ -9627,9 +9630,6 @@ class MatchaChipComponent {
9627
9630
  set disabled(value) {
9628
9631
  this._disabled = value;
9629
9632
  }
9630
- get hostClasses() {
9631
- return 'matcha-chip radius-full d-flex align-items-center gap-8 px-14 py-10 h-20';
9632
- }
9633
9633
  constructor(_elementRef) {
9634
9634
  this._elementRef = _elementRef;
9635
9635
  /** Cor do chip (primary, accent, warn) */
@@ -9649,6 +9649,11 @@ class MatchaChipComponent {
9649
9649
  /** Evento emitido quando o chip é destruído */
9650
9650
  this.destroyed = new EventEmitter();
9651
9651
  }
9652
+ ngOnInit() {
9653
+ // Aplica as classes CSS diretamente no elemento
9654
+ const element = this._elementRef.nativeElement;
9655
+ element.classList.add('matcha-chip', 'radius-full', 'd-flex', 'align-items-center', 'gap-8', 'px-14', 'py-10', 'h-20');
9656
+ }
9652
9657
  ngAfterViewInit() {
9653
9658
  this._setupChipRemoveDirective();
9654
9659
  }
@@ -9728,7 +9733,10 @@ class MatchaChipComponent {
9728
9733
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: MatchaChipComponent, decorators: [{
9729
9734
  type: Component,
9730
9735
  args: [{ selector: 'matcha-chip', standalone: false, template: "<span class=\"matcha-chip-content fs-14 fw-700 lh-20 color-label\">\n <ng-content></ng-content>\n</span>\n<ng-container *ngIf=\"removable && !hasCustomRemoveIcon()\">\n <matcha-divider direction=\"vertical\" gap=\"0\"></matcha-divider>\n <button \n type=\"button\"\n class=\"matcha-chip-remove d-flex align-items-center justify-content-center w-20 h-20 min-w-20 radius-full cursor-pointer border-0 background-transparent p-0 m-0\"\n [disabled]=\"disabled\"\n (click)=\"remove(); $event.stopPropagation()\"\n tabindex=\"-1\"\n aria-label=\"Remove\"\n matchaChipRemove>\n <matcha-icon name=\"close\" class=\"fs-14\" color=\"label\"></matcha-icon>\n </button>\n</ng-container>\n" }]
9731
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { color: [{
9736
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { hostClasses: [{
9737
+ type: HostBinding,
9738
+ args: ['class']
9739
+ }], color: [{
9732
9740
  type: Input
9733
9741
  }], selected: [{
9734
9742
  type: Input
@@ -9746,9 +9754,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImpor
9746
9754
  type: Output
9747
9755
  }], destroyed: [{
9748
9756
  type: Output
9749
- }], hostClasses: [{
9750
- type: HostBinding,
9751
- args: ['class']
9752
9757
  }], _handleClick: [{
9753
9758
  type: HostListener,
9754
9759
  args: ['click', ['$event']]
@@ -9758,7 +9763,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImpor
9758
9763
  }] } });
9759
9764
 
9760
9765
  class MatchaChipListComponent {
9761
- constructor() {
9766
+ /** Se a chip list está desabilitada */
9767
+ get disabled() {
9768
+ return this._disabled;
9769
+ }
9770
+ set disabled(value) {
9771
+ this._disabled = value;
9772
+ this._updateChipsDisabledState();
9773
+ }
9774
+ /** Valor(es) selecionado(s) */
9775
+ get value() {
9776
+ return this._value;
9777
+ }
9778
+ set value(newValue) {
9779
+ this._value = newValue;
9780
+ this._updateChipsSelectionState();
9781
+ }
9782
+ get isDisabled() { return this.disabled; }
9783
+ get ariaMultiselectable() { return this.multiple ? 'true' : null; }
9784
+ get ariaDisabled() { return this.disabled.toString(); }
9785
+ constructor(_elementRef) {
9786
+ this._elementRef = _elementRef;
9762
9787
  /** Se múltiplos chips podem ser selecionados */
9763
9788
  this.multiple = false;
9764
9789
  /** Se os chips podem ser selecionados */
@@ -9778,25 +9803,11 @@ class MatchaChipListComponent {
9778
9803
  this.onChange = () => { };
9779
9804
  this.onTouched = () => { };
9780
9805
  }
9781
- /** Se a chip list está desabilitada */
9782
- get disabled() {
9783
- return this._disabled;
9784
- }
9785
- set disabled(value) {
9786
- this._disabled = value;
9787
- this._updateChipsDisabledState();
9788
- }
9789
- /** Valor(es) selecionado(s) */
9790
- get value() {
9791
- return this._value;
9792
- }
9793
- set value(newValue) {
9794
- this._value = newValue;
9795
- this._updateChipsSelectionState();
9806
+ ngOnInit() {
9807
+ // Aplica as classes CSS diretamente no elemento
9808
+ const element = this._elementRef.nativeElement;
9809
+ element.classList.add('matcha-chip-list');
9796
9810
  }
9797
- get isDisabled() { return this.disabled; }
9798
- get ariaMultiselectable() { return this.multiple ? 'true' : null; }
9799
- get ariaDisabled() { return this.disabled.toString(); }
9800
9811
  ngAfterContentInit() {
9801
9812
  this._setupChipListeners();
9802
9813
  this._updateChipsSelectionState();
@@ -9975,7 +9986,7 @@ class MatchaChipListComponent {
9975
9986
  setDisabledState(isDisabled) {
9976
9987
  this.disabled = isDisabled;
9977
9988
  }
9978
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: MatchaChipListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
9989
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: MatchaChipListComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
9979
9990
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.7", type: MatchaChipListComponent, isStandalone: false, selector: "matcha-chip-list", inputs: { multiple: "multiple", selectable: "selectable", disabled: "disabled", value: "value", orientation: "orientation" }, outputs: { change: "change", removed: "removed" }, host: { listeners: { "keydown": "_handleKeydown($event)" }, properties: { "class.matcha-chip-list": "this.chipListClass", "class.matcha-chip-list-disabled": "this.isDisabled", "attr.role": "this.role", "attr.aria-multiselectable": "this.ariaMultiselectable", "attr.aria-disabled": "this.ariaDisabled" } }, providers: [
9980
9991
  {
9981
9992
  provide: NG_VALUE_ACCESSOR,
@@ -9993,7 +10004,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImpor
9993
10004
  multi: true
9994
10005
  }
9995
10006
  ], template: "<div class=\"matcha-chip-list-wrapper\" [class.matcha-chip-list-vertical]=\"orientation === 'vertical'\">\n <ng-content></ng-content>\n</div>" }]
9996
- }], propDecorators: { multiple: [{
10007
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { multiple: [{
9997
10008
  type: Input
9998
10009
  }], selectable: [{
9999
10010
  type: Input