matcha-components 20.149.0 → 20.151.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.
package/index.d.ts CHANGED
@@ -589,8 +589,9 @@ declare class MatchaToolbarCustomButtonComponent {
589
589
  static ɵcmp: i0.ɵɵComponentDeclaration<MatchaToolbarCustomButtonComponent, "matcha-toolbar-custom-button", never, {}, {}, never, ["*"], false, never>;
590
590
  }
591
591
 
592
- declare class MatchaFormFieldComponent implements AfterViewInit {
592
+ declare class MatchaFormFieldComponent implements AfterViewInit, OnDestroy {
593
593
  private elementRef;
594
+ private cdr;
594
595
  color: 'red' | 'pink' | 'purple' | 'deep-purple' | 'indigo' | 'blue' | 'light-blue' | 'cyan' | 'teal' | 'green' | 'light-green' | 'lime' | 'yellow' | 'amber' | 'orange' | 'deep-orange' | 'primary' | 'accent' | 'warn' | 'brown' | 'grey' | 'blue-grey' | 'primary' | 'accent' | 'warn';
595
596
  size: string | null | undefined | 'tiny' | 'small' | 'medium' | 'large' | 'huge';
596
597
  sizeXs: string | null;
@@ -599,14 +600,26 @@ declare class MatchaFormFieldComponent implements AfterViewInit {
599
600
  sizeLg: string | null;
600
601
  sizeXl: string | null;
601
602
  controlDir?: FormControlName;
602
- constructor(elementRef: ElementRef);
603
+ isDisabled: boolean;
604
+ private mutationObserver?;
605
+ private controlSubscription?;
606
+ constructor(elementRef: ElementRef, cdr: ChangeDetectorRef);
603
607
  ngAfterViewInit(): void;
608
+ ngOnDestroy(): void;
604
609
  private generateDataCy;
605
610
  private convertToKebabCase;
606
611
  get control(): i3.FormControl<any> | undefined;
607
612
  get showError(): boolean;
613
+ /**
614
+ * Verifica se algum input filho está disabled
615
+ */
616
+ private checkDisabledState;
617
+ /**
618
+ * Configura observadores para detectar mudanças no estado disabled
619
+ */
620
+ private setupDisabledObserver;
608
621
  static ɵfac: i0.ɵɵFactoryDeclaration<MatchaFormFieldComponent, never>;
609
- static ɵcmp: i0.ɵɵComponentDeclaration<MatchaFormFieldComponent, "matcha-form-field", never, { "color": { "alias": "color"; "required": false; }; "size": { "alias": "size"; "required": false; }; "sizeXs": { "alias": "size-xs"; "required": false; }; "sizeSm": { "alias": "size-sm"; "required": false; }; "sizeMd": { "alias": "size-md"; "required": false; }; "sizeLg": { "alias": "size-lg"; "required": false; }; "sizeXl": { "alias": "size-xl"; "required": false; }; }, {}, ["controlDir"], ["matcha-label", "*", "matcha-error", "matcha-autocomplete", "matcha-hint-text"], false, never>;
622
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatchaFormFieldComponent, "matcha-form-field", never, { "color": { "alias": "color"; "required": false; }; "size": { "alias": "size"; "required": false; }; "sizeXs": { "alias": "size-xs"; "required": false; }; "sizeSm": { "alias": "size-sm"; "required": false; }; "sizeMd": { "alias": "size-md"; "required": false; }; "sizeLg": { "alias": "size-lg"; "required": false; }; "sizeXl": { "alias": "size-xl"; "required": false; }; }, {}, ["controlDir"], ["matcha-label", "*", "matcha-autocomplete", "matcha-error", "matcha-hint-text"], false, never>;
610
623
  }
611
624
 
612
625
  declare class MatchaLabelComponent implements AfterViewInit {
@@ -1352,7 +1365,22 @@ declare class MatchaSelectComponent implements AfterContentInit, AfterViewInit,
1352
1365
  private activeIndex;
1353
1366
  private onChange;
1354
1367
  private onTouched;
1355
- isDisabled: boolean;
1368
+ private isDisabledByForm;
1369
+ /**
1370
+ * Getter consolidado para verificar se o componente está disabled
1371
+ * Combina o estado do @Input disabled com o estado do FormControl
1372
+ */
1373
+ get isCurrentlyDisabled(): boolean;
1374
+ /**
1375
+ * HostBinding para adicionar classe disabled no elemento raiz do componente
1376
+ * Isso permite que o matcha-form-field detecte o estado disabled
1377
+ */
1378
+ get hostDisabledClass(): boolean;
1379
+ /**
1380
+ * HostBinding para adicionar atributo disabled no elemento raiz do componente
1381
+ * Isso permite que o matcha-form-field detecte o estado disabled
1382
+ */
1383
+ get hostDisabledAttr(): string | null;
1356
1384
  constructor(elRef: ElementRef, renderer: Renderer2, cdr: ChangeDetectorRef);
1357
1385
  ngAfterContentInit(): void;
1358
1386
  ngAfterViewInit(): void;
@@ -1385,6 +1413,13 @@ declare class MatchaSelectComponent implements AfterContentInit, AfterViewInit,
1385
1413
  writeValue(value: any): void;
1386
1414
  registerOnChange(fn: (value: any) => void): void;
1387
1415
  registerOnTouched(fn: () => void): void;
1416
+ /**
1417
+ * Garante que o painel está fechado quando o componente está disabled
1418
+ */
1419
+ private ensurePanelClosed;
1420
+ /**
1421
+ * ControlValueAccessor: Define o estado disabled do FormControl
1422
+ */
1388
1423
  setDisabledState(isDisabled: boolean): void;
1389
1424
  static ɵfac: i0.ɵɵFactoryDeclaration<MatchaSelectComponent, never>;
1390
1425
  static ɵcmp: i0.ɵɵComponentDeclaration<MatchaSelectComponent, "matcha-select", never, { "placement": { "alias": "placement"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "minWidth": { "alias": "minWidth"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "opened": "opened"; "closed": "closed"; "selectionChange": "selectionChange"; }, ["options"], ["*"], false, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matcha-components",
3
- "version": "20.149.0",
3
+ "version": "20.151.0",
4
4
  "peerDependencies": {},
5
5
  "dependencies": {
6
6
  "tslib": "^2.3.0"