@eui/components 18.0.0-rc.4 → 18.0.0-rc.5

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.
Files changed (56) hide show
  1. package/docs/components/EuiAppTopMessageComponent.html +1 -1
  2. package/docs/components/EuiBreadcrumbItemComponent.html +1 -1
  3. package/docs/components/EuiChipComponent.html +1 -1
  4. package/docs/components/EuiIconButtonComponent.html +54 -0
  5. package/docs/components/EuiTableV2SelectableHeaderComponent.html +40 -39
  6. package/docs/components/EuiTableV2SelectableRowComponent.html +1 -1
  7. package/docs/components/EuiTabsComponent.html +1 -1
  8. package/docs/components/EuiTreeComponent.html +1 -1
  9. package/docs/dependencies.html +3 -3
  10. package/docs/js/menu-wc.js +15 -15
  11. package/docs/js/menu-wc_es5.js +1 -1
  12. package/docs/js/search/search_index.js +2 -2
  13. package/docs/modules/EuiTabsModule.html +3 -0
  14. package/esm2022/eui-breadcrumb/item/breadcrumb-item.component.mjs +5 -6
  15. package/esm2022/eui-chip/eui-chip.component.mjs +3 -5
  16. package/esm2022/eui-growl/eui-growl.component.mjs +1 -1
  17. package/esm2022/eui-icon-button/eui-icon-button.component.mjs +18 -3
  18. package/esm2022/eui-table-v2/eui-table-v2.module.mjs +5 -2
  19. package/esm2022/eui-table-v2/selectable-header/eui-table-v2-selectable-header.component.mjs +18 -10
  20. package/esm2022/eui-table-v2/selectable-row/eui-table-v2-selectable-row.component.mjs +6 -8
  21. package/esm2022/eui-tabs/eui-tab/eui-tab.component.mjs +2 -2
  22. package/esm2022/eui-tabs/eui-tabs.component.mjs +7 -6
  23. package/esm2022/eui-tabs/eui-tabs.module.mjs +5 -4
  24. package/esm2022/eui-tree/eui-tree.component.mjs +3 -3
  25. package/esm2022/layout/eui-app/eui-app-top-message/top-message.component.mjs +3 -3
  26. package/esm2022/layout/eui-notifications/eui-notifications.component.mjs +1 -1
  27. package/esm2022/layout/eui-notifications-v2/eui-notifications.component.mjs +1 -1
  28. package/esm2022/layout/eui-sidebar-toggle/sidebar-toggle.component.mjs +1 -1
  29. package/eui-chip/eui-chip.component.d.ts +1 -1
  30. package/eui-chip/eui-chip.component.d.ts.map +1 -1
  31. package/eui-icon-button/eui-icon-button.component.d.ts +8 -3
  32. package/eui-icon-button/eui-icon-button.component.d.ts.map +1 -1
  33. package/eui-table-v2/eui-table-v2.module.d.ts +1 -1
  34. package/eui-table-v2/eui-table-v2.module.d.ts.map +1 -1
  35. package/eui-table-v2/selectable-header/eui-table-v2-selectable-header.component.d.ts +3 -3
  36. package/eui-table-v2/selectable-header/eui-table-v2-selectable-header.component.d.ts.map +1 -1
  37. package/eui-table-v2/selectable-row/eui-table-v2-selectable-row.component.d.ts.map +1 -1
  38. package/eui-tabs/eui-tabs.module.d.ts +5 -4
  39. package/eui-tabs/eui-tabs.module.d.ts.map +1 -1
  40. package/fesm2022/eui-components-eui-breadcrumb.mjs +4 -5
  41. package/fesm2022/eui-components-eui-breadcrumb.mjs.map +1 -1
  42. package/fesm2022/eui-components-eui-chip.mjs +2 -4
  43. package/fesm2022/eui-components-eui-chip.mjs.map +1 -1
  44. package/fesm2022/eui-components-eui-growl.mjs +1 -1
  45. package/fesm2022/eui-components-eui-growl.mjs.map +1 -1
  46. package/fesm2022/eui-components-eui-icon-button.mjs +17 -2
  47. package/fesm2022/eui-components-eui-icon-button.mjs.map +1 -1
  48. package/fesm2022/eui-components-eui-table-v2.mjs +24 -16
  49. package/fesm2022/eui-components-eui-table-v2.mjs.map +1 -1
  50. package/fesm2022/eui-components-eui-tabs.mjs +12 -10
  51. package/fesm2022/eui-components-eui-tabs.mjs.map +1 -1
  52. package/fesm2022/eui-components-eui-tree.mjs +2 -2
  53. package/fesm2022/eui-components-eui-tree.mjs.map +1 -1
  54. package/fesm2022/eui-components-layout.mjs +5 -5
  55. package/fesm2022/eui-components-layout.mjs.map +1 -1
  56. package/package.json +3 -3
@@ -15,7 +15,7 @@ import { style, animate } from '@angular/animations';
15
15
  import * as i2 from '@eui/components/eui-input-checkbox';
16
16
  import { EuiInputCheckboxModule } from '@eui/components/eui-input-checkbox';
17
17
  import * as i1$1 from '@angular/forms';
18
- import { FormGroup, FormControl, ReactiveFormsModule } from '@angular/forms';
18
+ import { FormGroup, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
19
19
  import * as i2$1 from '@eui/components/eui-icon';
20
20
  import { EuiIconModule } from '@eui/components/eui-icon';
21
21
  import * as i3$1 from '@eui/components/eui-input-text';
@@ -783,8 +783,19 @@ class EuiTableV2SelectableHeaderComponent {
783
783
  this.destroy$.next(true);
784
784
  this.destroy$.unsubscribe();
785
785
  }
786
- toggleCheckedState(value) {
787
- this.isChecked = value;
786
+ get ariaLabel() {
787
+ if (!this.isChecked && !this.isCheckedIndeterminate) {
788
+ return 'Unchecked';
789
+ }
790
+ if (this.isCheckedIndeterminate) {
791
+ return 'Indeterminate';
792
+ }
793
+ if (this.isChecked && !this.isCheckedIndeterminate) {
794
+ return 'Checked';
795
+ }
796
+ }
797
+ toggleCheckedState(e) {
798
+ this.isChecked = e.target.checked;
788
799
  if (this.isChecked) {
789
800
  this.euiDataTableSelectableRowService.selectAllRows();
790
801
  }
@@ -793,15 +804,12 @@ class EuiTableV2SelectableHeaderComponent {
793
804
  }
794
805
  }
795
806
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: EuiTableV2SelectableHeaderComponent, deps: [{ token: EuiTableV2SelectableRowService }], target: i0.ɵɵFactoryTarget.Component }); }
796
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.0", type: EuiTableV2SelectableHeaderComponent, selector: "tr[isHeaderSelectable]", inputs: { isHeaderSelectable: ["isHeaderSelectable", "isHeaderSelectable", booleanAttribute] }, viewQueries: [{ propertyName: "checkbox", first: true, predicate: ["checkbox"], descendants: true }], ngImport: i0, template: "@if (isHeaderSelectable) {\n <th class=\"eui-table__cell-select\">\n <div class=\"eui-table__cell-select-checkbox-container\">\n @if (!isChecked && !isCheckedIndeterminate) {\n <input aria-label=\"Unchecked\" euiInputCheckBox checked=\"false\" (click)=\"toggleCheckedState(true)\" />\n }\n @if (isCheckedIndeterminate) {\n <input aria-label=\"Indeterminate\" euiInputCheckBox indeterminate (click)=\"toggleCheckedState(false)\" />\n }\n @if (isChecked && !isCheckedIndeterminate) {\n <input aria-label=\"Checked\" euiInputCheckBox checked=\"true\" (click)=\"toggleCheckedState(false)\" />\n }\n </div>\n </th>\n}\n<ng-content></ng-content>\n", dependencies: [{ kind: "component", type: i2.EuiInputCheckboxComponent, selector: "input[euiInputCheckBox]", inputs: ["indeterminate", "isInvalid", "checked"], outputs: ["indeterminateChange"] }] }); }
807
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.0", type: EuiTableV2SelectableHeaderComponent, selector: "tr[isHeaderSelectable]", inputs: { isHeaderSelectable: ["isHeaderSelectable", "isHeaderSelectable", booleanAttribute] }, ngImport: i0, template: "@if (isHeaderSelectable) {\n <th class=\"eui-table__cell-select\">\n <div class=\"eui-table__cell-select-checkbox-container\">\n <input [attr.aria-label]=\"ariaLabel\" euiInputCheckBox [checked]=\"isChecked ? 'checked' : null\" [indeterminate]=\"isCheckedIndeterminate\" (click)=\"toggleCheckedState($event)\" />\n </div>\n </th>\n}\n<ng-content></ng-content>\n", dependencies: [{ kind: "component", type: i2.EuiInputCheckboxComponent, selector: "input[euiInputCheckBox]", inputs: ["indeterminate", "isInvalid", "checked"], outputs: ["indeterminateChange"] }] }); }
797
808
  }
798
809
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: EuiTableV2SelectableHeaderComponent, decorators: [{
799
810
  type: Component,
800
- args: [{ selector: 'tr[isHeaderSelectable]', template: "@if (isHeaderSelectable) {\n <th class=\"eui-table__cell-select\">\n <div class=\"eui-table__cell-select-checkbox-container\">\n @if (!isChecked && !isCheckedIndeterminate) {\n <input aria-label=\"Unchecked\" euiInputCheckBox checked=\"false\" (click)=\"toggleCheckedState(true)\" />\n }\n @if (isCheckedIndeterminate) {\n <input aria-label=\"Indeterminate\" euiInputCheckBox indeterminate (click)=\"toggleCheckedState(false)\" />\n }\n @if (isChecked && !isCheckedIndeterminate) {\n <input aria-label=\"Checked\" euiInputCheckBox checked=\"true\" (click)=\"toggleCheckedState(false)\" />\n }\n </div>\n </th>\n}\n<ng-content></ng-content>\n" }]
801
- }], ctorParameters: () => [{ type: EuiTableV2SelectableRowService }], propDecorators: { checkbox: [{
802
- type: ViewChild,
803
- args: ['checkbox']
804
- }], isHeaderSelectable: [{
811
+ args: [{ selector: 'tr[isHeaderSelectable]', template: "@if (isHeaderSelectable) {\n <th class=\"eui-table__cell-select\">\n <div class=\"eui-table__cell-select-checkbox-container\">\n <input [attr.aria-label]=\"ariaLabel\" euiInputCheckBox [checked]=\"isChecked ? 'checked' : null\" [indeterminate]=\"isCheckedIndeterminate\" (click)=\"toggleCheckedState($event)\" />\n </div>\n </th>\n}\n<ng-content></ng-content>\n" }]
812
+ }], ctorParameters: () => [{ type: EuiTableV2SelectableRowService }], propDecorators: { isHeaderSelectable: [{
805
813
  type: Input,
806
814
  args: [{ transform: booleanAttribute }]
807
815
  }] } });
@@ -871,23 +879,20 @@ class EuiTableV2SelectableRowComponent {
871
879
  this.destroy$.unsubscribe();
872
880
  }
873
881
  toggleCheckedState(e) {
874
- if (!this.isChecked) {
875
- this.isChecked = true;
882
+ this.isChecked = e.target.checked;
883
+ if (this.isChecked) {
876
884
  this.euiDataTableSelectableRowService.selectRow(this.isDataSelectable);
877
885
  }
878
886
  else {
879
- this.isChecked = false;
880
887
  this.euiDataTableSelectableRowService.unselectRow(this.isDataSelectable);
881
888
  }
882
- e.preventDefault();
883
- e.stopPropagation();
884
889
  }
885
890
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: EuiTableV2SelectableRowComponent, deps: [{ token: EuiTableV2SelectableRowService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
886
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.0", type: EuiTableV2SelectableRowComponent, selector: "tr[isDataSelectable]", inputs: { isDataSelectable: "isDataSelectable", isChecked: ["isChecked", "isChecked", booleanAttribute], isKeyboardSelectable: ["isKeyboardSelectable", "isKeyboardSelectable", booleanAttribute] }, host: { properties: { "class": "this.cssClasses" } }, usesOnChanges: true, ngImport: i0, template: "@if (isDataSelectable) {\n <td class=\"eui-table__cell-select\">\n <div class=\"eui-table__cell-select-checkbox-container\">\n @if (isChecked) {\n <input aria-label=\"default checkbox checked\" euiInputCheckBox checked=\"true\" (click)=\"toggleCheckedState($event)\" />\n }\n @if (!isChecked) {\n <input aria-label=\"default checkbox unchecked\" euiInputCheckBox checked=\"false\" (click)=\"toggleCheckedState($event)\" />\n }\n </div>\n </td>\n}\n<ng-content></ng-content>\n", dependencies: [{ kind: "component", type: i2.EuiInputCheckboxComponent, selector: "input[euiInputCheckBox]", inputs: ["indeterminate", "isInvalid", "checked"], outputs: ["indeterminateChange"] }] }); }
891
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.0", type: EuiTableV2SelectableRowComponent, selector: "tr[isDataSelectable]", inputs: { isDataSelectable: "isDataSelectable", isChecked: ["isChecked", "isChecked", booleanAttribute], isKeyboardSelectable: ["isKeyboardSelectable", "isKeyboardSelectable", booleanAttribute] }, host: { properties: { "class": "this.cssClasses" } }, usesOnChanges: true, ngImport: i0, template: "@if (isDataSelectable) {\n <td class=\"eui-table__cell-select\">\n <div class=\"eui-table__cell-select-checkbox-container\">\n <input\n euiInputCheckBox\n [attr.aria-label]=\"isChecked ? 'default checkbox checked' : 'default checkbox unchecked'\"\n [(ngModel)]=\"isChecked\"\n (change)=\"toggleCheckedState($event)\" />\n </div>\n </td>\n}\n<ng-content></ng-content>\n", dependencies: [{ kind: "component", type: i2.EuiInputCheckboxComponent, selector: "input[euiInputCheckBox]", inputs: ["indeterminate", "isInvalid", "checked"], outputs: ["indeterminateChange"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
887
892
  }
888
893
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: EuiTableV2SelectableRowComponent, decorators: [{
889
894
  type: Component,
890
- args: [{ selector: 'tr[isDataSelectable]', template: "@if (isDataSelectable) {\n <td class=\"eui-table__cell-select\">\n <div class=\"eui-table__cell-select-checkbox-container\">\n @if (isChecked) {\n <input aria-label=\"default checkbox checked\" euiInputCheckBox checked=\"true\" (click)=\"toggleCheckedState($event)\" />\n }\n @if (!isChecked) {\n <input aria-label=\"default checkbox unchecked\" euiInputCheckBox checked=\"false\" (click)=\"toggleCheckedState($event)\" />\n }\n </div>\n </td>\n}\n<ng-content></ng-content>\n" }]
895
+ args: [{ selector: 'tr[isDataSelectable]', template: "@if (isDataSelectable) {\n <td class=\"eui-table__cell-select\">\n <div class=\"eui-table__cell-select-checkbox-container\">\n <input\n euiInputCheckBox\n [attr.aria-label]=\"isChecked ? 'default checkbox checked' : 'default checkbox unchecked'\"\n [(ngModel)]=\"isChecked\"\n (change)=\"toggleCheckedState($event)\" />\n </div>\n </td>\n}\n<ng-content></ng-content>\n" }]
891
896
  }], ctorParameters: () => [{ type: EuiTableV2SelectableRowService }, { type: i0.ElementRef }], propDecorators: { isDataSelectable: [{
892
897
  type: Input
893
898
  }], isChecked: [{
@@ -1078,6 +1083,7 @@ class EuiTableV2Module {
1078
1083
  ScrollingModule,
1079
1084
  EuiSkeletonModule,
1080
1085
  EuiInputCheckboxModule,
1086
+ FormsModule,
1081
1087
  ReactiveFormsModule,
1082
1088
  EuiIconModule,
1083
1089
  EuiInputTextModule,
@@ -1097,6 +1103,7 @@ class EuiTableV2Module {
1097
1103
  ScrollingModule,
1098
1104
  EuiSkeletonModule,
1099
1105
  EuiInputCheckboxModule,
1106
+ FormsModule,
1100
1107
  ReactiveFormsModule,
1101
1108
  EuiIconModule,
1102
1109
  EuiInputTextModule,
@@ -1113,6 +1120,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImpor
1113
1120
  ScrollingModule,
1114
1121
  EuiSkeletonModule,
1115
1122
  EuiInputCheckboxModule,
1123
+ FormsModule,
1116
1124
  ReactiveFormsModule,
1117
1125
  EuiIconModule,
1118
1126
  EuiInputTextModule,