diff --git a/angular-workspace/projects/ni/nimble-angular/CHANGELOG.json b/angular-workspace/projects/ni/nimble-angular/CHANGELOG.json index 7fb9104a39..fc72ae7a4e 100644 --- a/angular-workspace/projects/ni/nimble-angular/CHANGELOG.json +++ b/angular-workspace/projects/ni/nimble-angular/CHANGELOG.json @@ -1,6 +1,42 @@ { "name": "@ni/nimble-angular", "entries": [ + { + "date": "Thu, 14 Mar 2024 14:48:16 GMT", + "version": "20.4.1", + "tag": "@ni/nimble-angular_v20.4.1", + "comments": { + "patch": [ + { + "author": "beachball", + "package": "@ni/nimble-angular", + "comment": "Bump @ni/nimble-components to v22.0.1", + "commit": "not available" + } + ] + } + }, + { + "date": "Wed, 13 Mar 2024 23:07:24 GMT", + "version": "20.4.0", + "tag": "@ni/nimble-angular_v20.4.0", + "comments": { + "minor": [ + { + "author": "jattasNI@users.noreply.github.com", + "package": "@ni/nimble-angular", + "commit": "518c229b964d2c4a2e77210692f5d367f2937ff4", + "comment": "Update default values in label provider directives and expose additional label provider properties" + }, + { + "author": "beachball", + "package": "@ni/nimble-angular", + "comment": "Bump @ni/nimble-components to v22.0.0", + "commit": "not available" + } + ] + } + }, { "date": "Tue, 12 Mar 2024 22:17:11 GMT", "version": "20.3.0", diff --git a/angular-workspace/projects/ni/nimble-angular/CHANGELOG.md b/angular-workspace/projects/ni/nimble-angular/CHANGELOG.md index 4d6d629248..4668075987 100644 --- a/angular-workspace/projects/ni/nimble-angular/CHANGELOG.md +++ b/angular-workspace/projects/ni/nimble-angular/CHANGELOG.md @@ -1,9 +1,26 @@ # Change Log - @ni/nimble-angular -This log was last generated on Tue, 12 Mar 2024 22:17:11 GMT and should not be manually modified. +This log was last generated on Thu, 14 Mar 2024 14:48:16 GMT and should not be manually modified. +## 20.4.1 + +Thu, 14 Mar 2024 14:48:16 GMT + +### Patches + +- Bump @ni/nimble-components to v22.0.1 + +## 20.4.0 + +Wed, 13 Mar 2024 23:07:24 GMT + +### Minor changes + +- Update default values in label provider directives and expose additional label provider properties ([ni/nimble@518c229](https://github.com/ni/nimble/commit/518c229b964d2c4a2e77210692f5d367f2937ff4)) +- Bump @ni/nimble-components to v22.0.0 + ## 20.3.0 Tue, 12 Mar 2024 22:17:11 GMT diff --git a/angular-workspace/projects/ni/nimble-angular/label-provider/core/nimble-label-provider-core-with-defaults.directive.ts b/angular-workspace/projects/ni/nimble-angular/label-provider/core/nimble-label-provider-core-with-defaults.directive.ts index bff9c0e24a..63d82cdbfb 100644 --- a/angular-workspace/projects/ni/nimble-angular/label-provider/core/nimble-label-provider-core-with-defaults.directive.ts +++ b/angular-workspace/projects/ni/nimble-angular/label-provider/core/nimble-label-provider-core-with-defaults.directive.ts @@ -15,5 +15,10 @@ export class NimbleLabelProviderCoreWithDefaultsDirective { this.elementRef.nativeElement.popupDismiss = $localize`:Nimble popup - dismiss|:Close`; this.elementRef.nativeElement.numericDecrement = $localize`:Nimble numeric - decrement|:Decrement`; this.elementRef.nativeElement.numericIncrement = $localize`:Nimble numeric - increment|:Increment`; + this.elementRef.nativeElement.popupIconError = $localize`:Nimble popup icon - error|:Error`; + this.elementRef.nativeElement.popupIconWarning = $localize`:Nimble popup icon - warning|:Warning`; + this.elementRef.nativeElement.popupIconInformation = $localize`:Nimble popup icon - information|:Information`; + this.elementRef.nativeElement.filterSearch = $localize`:Nimble select - search items|:Search`; + this.elementRef.nativeElement.filterNoResults = $localize`:Nimble select - no items|:No items found`; } } \ No newline at end of file diff --git a/angular-workspace/projects/ni/nimble-angular/label-provider/core/nimble-label-provider-core.directive.ts b/angular-workspace/projects/ni/nimble-angular/label-provider/core/nimble-label-provider-core.directive.ts index 6c6276d7bd..17fa20a4a7 100644 --- a/angular-workspace/projects/ni/nimble-angular/label-provider/core/nimble-label-provider-core.directive.ts +++ b/angular-workspace/projects/ni/nimble-angular/label-provider/core/nimble-label-provider-core.directive.ts @@ -37,4 +37,44 @@ export class NimbleLabelProviderCoreDirective { @Input('numeric-increment') public set numericIncrement(value: string | undefined) { this.renderer.setProperty(this.elementRef.nativeElement, 'numericIncrement', value); } + + public get popupIconError(): string | undefined { + return this.elementRef.nativeElement.popupIconError; + } + + @Input('popup-icon-error') public set popupIconError(value: string | undefined) { + this.renderer.setProperty(this.elementRef.nativeElement, 'popupIconError', value); + } + + public get popupIconWarning(): string | undefined { + return this.elementRef.nativeElement.popupIconWarning; + } + + @Input('popup-icon-warning') public set popupIconWarning(value: string | undefined) { + this.renderer.setProperty(this.elementRef.nativeElement, 'popupIconWarning', value); + } + + public get popupIconInformation(): string | undefined { + return this.elementRef.nativeElement.popupIconInformation; + } + + @Input('popup-icon-information') public set popupIconInformation(value: string | undefined) { + this.renderer.setProperty(this.elementRef.nativeElement, 'popupIconInformation', value); + } + + public get filterSearch(): string | undefined { + return this.elementRef.nativeElement.filterSearch; + } + + @Input('filter-search') public set filterSearch(value: string | undefined) { + this.renderer.setProperty(this.elementRef.nativeElement, 'filterSearch', value); + } + + public get filterNoResults(): string | undefined { + return this.elementRef.nativeElement.filterNoResults; + } + + @Input('filter-no-results') public set filterNoResults(value: string | undefined) { + this.renderer.setProperty(this.elementRef.nativeElement, 'filterNoResults', value); + } } \ No newline at end of file diff --git a/angular-workspace/projects/ni/nimble-angular/label-provider/core/tests/nimble-label-provider-core-with-defaults.directive.spec.ts b/angular-workspace/projects/ni/nimble-angular/label-provider/core/tests/nimble-label-provider-core-with-defaults.directive.spec.ts index 0b74b5a736..50a4b6bade 100644 --- a/angular-workspace/projects/ni/nimble-angular/label-provider/core/tests/nimble-label-provider-core-with-defaults.directive.spec.ts +++ b/angular-workspace/projects/ni/nimble-angular/label-provider/core/tests/nimble-label-provider-core-with-defaults.directive.spec.ts @@ -30,7 +30,12 @@ describe('Nimble LabelProviderCore withDefaults directive', () => { loadTranslations({ [computeMsgId('Close', 'Nimble popup - dismiss')]: 'Translated close', [computeMsgId('Decrement', 'Nimble numeric - decrement')]: 'Translated decrement', - [computeMsgId('Increment', 'Nimble numeric - increment')]: 'Translated increment' + [computeMsgId('Increment', 'Nimble numeric - increment')]: 'Translated increment', + [computeMsgId('Error', 'Nimble popup icon - error')]: 'Translated error', + [computeMsgId('Warning', 'Nimble popup icon - warning')]: 'Translated warning', + [computeMsgId('Information', 'Nimble popup icon - information')]: 'Translated information', + [computeMsgId('Search', 'Nimble select - search items')]: 'Translated search', + [computeMsgId('No items found', 'Nimble select - no items')]: 'Translated no items found' }); const fixture = TestBed.createComponent(TestHostComponent); const testHostComponent = fixture.componentInstance; @@ -42,5 +47,10 @@ describe('Nimble LabelProviderCore withDefaults directive', () => { expect(labelProvider.popupDismiss).toBe('Translated close'); expect(labelProvider.numericDecrement).toBe('Translated decrement'); expect(labelProvider.numericIncrement).toBe('Translated increment'); + expect(labelProvider.popupIconError).toBe('Translated error'); + expect(labelProvider.popupIconWarning).toBe('Translated warning'); + expect(labelProvider.popupIconInformation).toBe('Translated information'); + expect(labelProvider.filterSearch).toBe('Translated search'); + expect(labelProvider.filterNoResults).toBe('Translated no items found'); }); }); diff --git a/angular-workspace/projects/ni/nimble-angular/label-provider/core/tests/nimble-label-provider-core.directive.spec.ts b/angular-workspace/projects/ni/nimble-angular/label-provider/core/tests/nimble-label-provider-core.directive.spec.ts index 7a276c1b41..3249e7e4e4 100644 --- a/angular-workspace/projects/ni/nimble-angular/label-provider/core/tests/nimble-label-provider-core.directive.spec.ts +++ b/angular-workspace/projects/ni/nimble-angular/label-provider/core/tests/nimble-label-provider-core.directive.spec.ts @@ -7,6 +7,11 @@ describe('Nimble Label Provider Core', () => { const label1 = 'String 1'; const label2 = 'String 2'; const label3 = 'String 3'; + const label4 = 'String 4'; + const label5 = 'String 5'; + const label6 = 'String 6'; + const label7 = 'String 7'; + const label8 = 'String 8'; beforeEach(() => { TestBed.configureTestingModule({ @@ -58,6 +63,31 @@ describe('Nimble Label Provider Core', () => { expect(directive.numericIncrement).toBeUndefined(); expect(nativeElement.numericIncrement).toBeUndefined(); }); + + it('has expected defaults for popupIconError', () => { + expect(directive.popupIconError).toBeUndefined(); + expect(nativeElement.popupIconError).toBeUndefined(); + }); + + it('has expected defaults for popupIconWarning', () => { + expect(directive.popupIconWarning).toBeUndefined(); + expect(nativeElement.popupIconWarning).toBeUndefined(); + }); + + it('has expected defaults for popupIconInformation', () => { + expect(directive.popupIconInformation).toBeUndefined(); + expect(nativeElement.popupIconInformation).toBeUndefined(); + }); + + it('has expected defaults for filterSearch', () => { + expect(directive.filterSearch).toBeUndefined(); + expect(nativeElement.filterSearch).toBeUndefined(); + }); + + it('has expected defaults for filterNoResults', () => { + expect(directive.filterNoResults).toBeUndefined(); + expect(nativeElement.filterNoResults).toBeUndefined(); + }); }); describe('with template string values', () => { @@ -67,6 +97,11 @@ describe('Nimble Label Provider Core', () => { popup-dismiss="${label1}" numeric-decrement="${label2}" numeric-increment="${label3}" + popup-icon-error="${label4}" + popup-icon-warning="${label5}" + popup-icon-information="${label6}" + filter-search="${label7}" + filter-no-results="${label8}" > ` @@ -105,6 +140,31 @@ describe('Nimble Label Provider Core', () => { expect(directive.numericIncrement).toBe(label3); expect(nativeElement.numericIncrement).toBe(label3); }); + + it('will use template string values for popupIconError', () => { + expect(directive.popupIconError).toBe(label4); + expect(nativeElement.popupIconError).toBe(label4); + }); + + it('will use template string values for popupIconWarning', () => { + expect(directive.popupIconWarning).toBe(label5); + expect(nativeElement.popupIconWarning).toBe(label5); + }); + + it('will use template string values for popupIconInformation', () => { + expect(directive.popupIconInformation).toBe(label6); + expect(nativeElement.popupIconInformation).toBe(label6); + }); + + it('will use template string values for filterSearch', () => { + expect(directive.filterSearch).toBe(label7); + expect(nativeElement.filterSearch).toBe(label7); + }); + + it('will use template string values for filterNoResults', () => { + expect(directive.filterNoResults).toBe(label8); + expect(nativeElement.filterNoResults).toBe(label8); + }); }); describe('with property bound values', () => { @@ -114,6 +174,11 @@ describe('Nimble Label Provider Core', () => { [popupDismiss]="popupDismiss" [numericDecrement]="numericDecrement" [numericIncrement]="numericIncrement" + [popupIconError]="popupIconError" + [popupIconWarning]="popupIconWarning" + [popupIconInformation]="popupIconInformation" + [filterSearch]="filterSearch" + [filterNoResults]="filterNoResults" > ` @@ -124,6 +189,11 @@ describe('Nimble Label Provider Core', () => { public popupDismiss = label1; public numericDecrement = label1; public numericIncrement = label1; + public popupIconError = label1; + public popupIconWarning = label1; + public popupIconInformation = label1; + public filterSearch = label1; + public filterNoResults = label1; } let fixture: ComponentFixture; @@ -173,6 +243,61 @@ describe('Nimble Label Provider Core', () => { expect(directive.numericIncrement).toBe(label2); expect(nativeElement.numericIncrement).toBe(label2); }); + + it('can be configured with property binding for popupIconError', () => { + expect(directive.popupIconError).toBe(label1); + expect(nativeElement.popupIconError).toBe(label1); + + fixture.componentInstance.popupIconError = label2; + fixture.detectChanges(); + + expect(directive.popupIconError).toBe(label2); + expect(nativeElement.popupIconError).toBe(label2); + }); + + it('can be configured with property binding for popupIconWarning', () => { + expect(directive.popupIconWarning).toBe(label1); + expect(nativeElement.popupIconWarning).toBe(label1); + + fixture.componentInstance.popupIconWarning = label2; + fixture.detectChanges(); + + expect(directive.popupIconWarning).toBe(label2); + expect(nativeElement.popupIconWarning).toBe(label2); + }); + + it('can be configured with property binding for popupIconInformation', () => { + expect(directive.popupIconInformation).toBe(label1); + expect(nativeElement.popupIconInformation).toBe(label1); + + fixture.componentInstance.popupIconInformation = label2; + fixture.detectChanges(); + + expect(directive.popupIconInformation).toBe(label2); + expect(nativeElement.popupIconInformation).toBe(label2); + }); + + it('can be configured with property binding for filterSearch', () => { + expect(directive.filterSearch).toBe(label1); + expect(nativeElement.filterSearch).toBe(label1); + + fixture.componentInstance.filterSearch = label2; + fixture.detectChanges(); + + expect(directive.filterSearch).toBe(label2); + expect(nativeElement.filterSearch).toBe(label2); + }); + + it('can be configured with property binding for filterNoResults', () => { + expect(directive.filterNoResults).toBe(label1); + expect(nativeElement.filterNoResults).toBe(label1); + + fixture.componentInstance.filterNoResults = label2; + fixture.detectChanges(); + + expect(directive.filterNoResults).toBe(label2); + expect(nativeElement.filterNoResults).toBe(label2); + }); }); describe('with attribute bound values', () => { @@ -182,6 +307,11 @@ describe('Nimble Label Provider Core', () => { [attr.popup-dismiss]="popupDismiss" [attr.numeric-decrement]="numericDecrement" [attr.numeric-increment]="numericIncrement" + [attr.popup-icon-error]="popupIconError" + [attr.popup-icon-warning]="popupIconWarning" + [attr.popup-icon-information]="popupIconInformation" + [attr.filter-search]="filterSearch" + [attr.filter-no-results]="filterNoResults" > ` @@ -192,6 +322,11 @@ describe('Nimble Label Provider Core', () => { public popupDismiss = label1; public numericDecrement = label1; public numericIncrement = label1; + public popupIconError = label1; + public popupIconWarning = label1; + public popupIconInformation = label1; + public filterSearch = label1; + public filterNoResults = label1; } let fixture: ComponentFixture; @@ -241,5 +376,60 @@ describe('Nimble Label Provider Core', () => { expect(directive.numericIncrement).toBe(label2); expect(nativeElement.numericIncrement).toBe(label2); }); + + it('can be configured with attribute binding for popupIconError', () => { + expect(directive.popupIconError).toBe(label1); + expect(nativeElement.popupIconError).toBe(label1); + + fixture.componentInstance.popupIconError = label2; + fixture.detectChanges(); + + expect(directive.popupIconError).toBe(label2); + expect(nativeElement.popupIconError).toBe(label2); + }); + + it('can be configured with attribute binding for popupIconWarning', () => { + expect(directive.popupIconWarning).toBe(label1); + expect(nativeElement.popupIconWarning).toBe(label1); + + fixture.componentInstance.popupIconWarning = label2; + fixture.detectChanges(); + + expect(directive.popupIconWarning).toBe(label2); + expect(nativeElement.popupIconWarning).toBe(label2); + }); + + it('can be configured with attribute binding for popupIconInformation', () => { + expect(directive.popupIconInformation).toBe(label1); + expect(nativeElement.popupIconInformation).toBe(label1); + + fixture.componentInstance.popupIconInformation = label2; + fixture.detectChanges(); + + expect(directive.popupIconInformation).toBe(label2); + expect(nativeElement.popupIconInformation).toBe(label2); + }); + + it('can be configured with attribute binding for filterSearch', () => { + expect(directive.filterSearch).toBe(label1); + expect(nativeElement.filterSearch).toBe(label1); + + fixture.componentInstance.filterSearch = label2; + fixture.detectChanges(); + + expect(directive.filterSearch).toBe(label2); + expect(nativeElement.filterSearch).toBe(label2); + }); + + it('can be configured with attribute binding for filterNoResults', () => { + expect(directive.filterNoResults).toBe(label1); + expect(nativeElement.filterNoResults).toBe(label1); + + fixture.componentInstance.filterNoResults = label2; + fixture.detectChanges(); + + expect(directive.filterNoResults).toBe(label2); + expect(nativeElement.filterNoResults).toBe(label2); + }); }); }); diff --git a/angular-workspace/projects/ni/nimble-angular/label-provider/table/nimble-label-provider-table-with-defaults.directive.ts b/angular-workspace/projects/ni/nimble-angular/label-provider/table/nimble-label-provider-table-with-defaults.directive.ts index cbee2fcd95..4c4d2977b6 100644 --- a/angular-workspace/projects/ni/nimble-angular/label-provider/table/nimble-label-provider-table-with-defaults.directive.ts +++ b/angular-workspace/projects/ni/nimble-angular/label-provider/table/nimble-label-provider-table-with-defaults.directive.ts @@ -14,6 +14,8 @@ export class NimbleLabelProviderTableWithDefaultsDirective { public constructor(protected readonly renderer: Renderer2, protected readonly elementRef: ElementRef) { this.elementRef.nativeElement.groupCollapse = $localize`:Nimble table - collapse group|:Collapse group`; this.elementRef.nativeElement.groupExpand = $localize`:Nimble table - expand group|:Expand group`; + this.elementRef.nativeElement.rowCollapse = $localize`:Nimble table - collapse row|:Collapse row`; + this.elementRef.nativeElement.rowExpand = $localize`:Nimble table - expand row|:Expand row`; this.elementRef.nativeElement.collapseAll = $localize`:Nimble table - collapse all|:Collapse all`; this.elementRef.nativeElement.cellActionMenu = $localize`:Nimble table - cell action menu|:Options`; this.elementRef.nativeElement.columnHeaderGrouped = $localize`:Nimble table - column header grouped|:Grouped`; diff --git a/angular-workspace/projects/ni/nimble-angular/label-provider/table/nimble-label-provider-table.directive.ts b/angular-workspace/projects/ni/nimble-angular/label-provider/table/nimble-label-provider-table.directive.ts index 7f68fe9cb5..ebf09e6e20 100644 --- a/angular-workspace/projects/ni/nimble-angular/label-provider/table/nimble-label-provider-table.directive.ts +++ b/angular-workspace/projects/ni/nimble-angular/label-provider/table/nimble-label-provider-table.directive.ts @@ -30,6 +30,22 @@ export class NimbleLabelProviderTableDirective { this.renderer.setProperty(this.elementRef.nativeElement, 'groupExpand', value); } + public get rowCollapse(): string | undefined { + return this.elementRef.nativeElement.rowCollapse; + } + + @Input('row-collapse') public set rowCollapse(value: string | undefined) { + this.renderer.setProperty(this.elementRef.nativeElement, 'rowCollapse', value); + } + + public get rowExpand(): string | undefined { + return this.elementRef.nativeElement.rowExpand; + } + + @Input('row-expand') public set rowExpand(value: string | undefined) { + this.renderer.setProperty(this.elementRef.nativeElement, 'rowExpand', value); + } + public get collapseAll(): string | undefined { return this.elementRef.nativeElement.collapseAll; } diff --git a/angular-workspace/projects/ni/nimble-angular/label-provider/table/tests/nimble-label-provider-table-with-defaults.directive.spec.ts b/angular-workspace/projects/ni/nimble-angular/label-provider/table/tests/nimble-label-provider-table-with-defaults.directive.spec.ts index 6f62cb10b9..1f72c8079a 100644 --- a/angular-workspace/projects/ni/nimble-angular/label-provider/table/tests/nimble-label-provider-table-with-defaults.directive.spec.ts +++ b/angular-workspace/projects/ni/nimble-angular/label-provider/table/tests/nimble-label-provider-table-with-defaults.directive.spec.ts @@ -30,6 +30,8 @@ describe('Nimble LabelProviderTable withDefaults directive', () => { loadTranslations({ [computeMsgId('Collapse group', 'Nimble table - collapse group')]: 'Translated collapse group', [computeMsgId('Expand group', 'Nimble table - expand group')]: 'Translated expand group', + [computeMsgId('Collapse row', 'Nimble table - collapse row')]: 'Translated collapse row', + [computeMsgId('Expand row', 'Nimble table - expand row')]: 'Translated expand row', [computeMsgId('Collapse all', 'Nimble table - collapse all')]: 'Translated collapse all', [computeMsgId('Options', 'Nimble table - cell action menu')]: 'Translated options', [computeMsgId('Grouped', 'Nimble table - column header grouped')]: 'Translated grouped', @@ -50,6 +52,8 @@ describe('Nimble LabelProviderTable withDefaults directive', () => { it('applies translated values for each label', () => { expect(labelProvider.groupCollapse).toBe('Translated collapse group'); expect(labelProvider.groupExpand).toBe('Translated expand group'); + expect(labelProvider.rowCollapse).toBe('Translated collapse row'); + expect(labelProvider.rowExpand).toBe('Translated expand row'); expect(labelProvider.collapseAll).toBe('Translated collapse all'); expect(labelProvider.cellActionMenu).toBe('Translated options'); expect(labelProvider.columnHeaderGrouped).toBe('Translated grouped'); diff --git a/angular-workspace/projects/ni/nimble-angular/label-provider/table/tests/nimble-label-provider-table.directive.spec.ts b/angular-workspace/projects/ni/nimble-angular/label-provider/table/tests/nimble-label-provider-table.directive.spec.ts index 87f25ad84c..e0b96f47c4 100644 --- a/angular-workspace/projects/ni/nimble-angular/label-provider/table/tests/nimble-label-provider-table.directive.spec.ts +++ b/angular-workspace/projects/ni/nimble-angular/label-provider/table/tests/nimble-label-provider-table.directive.spec.ts @@ -16,6 +16,8 @@ describe('Nimble Label Provider Table', () => { const label10 = 'String 10'; const label11 = 'String 11'; const label12 = 'String 12'; + const label13 = 'String 13'; + const label14 = 'String 14'; beforeEach(() => { TestBed.configureTestingModule({ @@ -73,6 +75,16 @@ describe('Nimble Label Provider Table', () => { expect(nativeElement.groupExpand).toBeUndefined(); }); + it('has expected defaults for rowCollapse', () => { + expect(directive.rowCollapse).toBeUndefined(); + expect(nativeElement.rowCollapse).toBeUndefined(); + }); + + it('has expected defaults for rowExpand', () => { + expect(directive.rowExpand).toBeUndefined(); + expect(nativeElement.rowExpand).toBeUndefined(); + }); + it('has expected defaults for collapseAll', () => { expect(directive.collapseAll).toBeUndefined(); expect(nativeElement.collapseAll).toBeUndefined(); @@ -122,14 +134,16 @@ describe('Nimble Label Provider Table', () => { column-header-grouped="${label2}" group-collapse="${label3}" group-expand="${label4}" - collapse-all="${label5}" - column-header-sorted-ascending="${label6}" - column-header-sorted-descending="${label7}" - select-all="${label8}" - group-select-all="${label9}" - row-select="${label10}" - row-operation-column="${label11}" - row-loading="${label12}" + row-collapse="${label5}" + row-expand="${label6}" + collapse-all="${label7}" + column-header-sorted-ascending="${label8}" + column-header-sorted-descending="${label9}" + select-all="${label10}" + group-select-all="${label11}" + row-select="${label12}" + row-operation-column="${label13}" + row-loading="${label14}" > ` @@ -174,44 +188,54 @@ describe('Nimble Label Provider Table', () => { expect(nativeElement.groupExpand).toBe(label4); }); + it('will use template string values for rowCollapse', () => { + expect(directive.rowCollapse).toBe(label5); + expect(nativeElement.rowCollapse).toBe(label5); + }); + + it('will use template string values for rowExpand', () => { + expect(directive.rowExpand).toBe(label6); + expect(nativeElement.rowExpand).toBe(label6); + }); + it('will use template string values for collapseAll', () => { - expect(directive.collapseAll).toBe(label5); - expect(nativeElement.collapseAll).toBe(label5); + expect(directive.collapseAll).toBe(label7); + expect(nativeElement.collapseAll).toBe(label7); }); it('will use template string values for columnHeaderSortedAscending', () => { - expect(directive.columnHeaderSortedAscending).toBe(label6); - expect(nativeElement.columnHeaderSortedAscending).toBe(label6); + expect(directive.columnHeaderSortedAscending).toBe(label8); + expect(nativeElement.columnHeaderSortedAscending).toBe(label8); }); it('will use template string values for columnHeaderSortedDescending', () => { - expect(directive.columnHeaderSortedDescending).toBe(label7); - expect(nativeElement.columnHeaderSortedDescending).toBe(label7); + expect(directive.columnHeaderSortedDescending).toBe(label9); + expect(nativeElement.columnHeaderSortedDescending).toBe(label9); }); it('will use template string values for selectAll', () => { - expect(directive.selectAll).toBe(label8); - expect(nativeElement.selectAll).toBe(label8); + expect(directive.selectAll).toBe(label10); + expect(nativeElement.selectAll).toBe(label10); }); it('will use template string values for groupSelectAll', () => { - expect(directive.groupSelectAll).toBe(label9); - expect(nativeElement.groupSelectAll).toBe(label9); + expect(directive.groupSelectAll).toBe(label11); + expect(nativeElement.groupSelectAll).toBe(label11); }); it('will use template string values for rowSelect', () => { - expect(directive.rowSelect).toBe(label10); - expect(nativeElement.rowSelect).toBe(label10); + expect(directive.rowSelect).toBe(label12); + expect(nativeElement.rowSelect).toBe(label12); }); it('will use template string values for rowOperationColumn', () => { - expect(directive.rowOperationColumn).toBe(label11); - expect(nativeElement.rowOperationColumn).toBe(label11); + expect(directive.rowOperationColumn).toBe(label13); + expect(nativeElement.rowOperationColumn).toBe(label13); }); it('will use template string values for rowLoading', () => { - expect(directive.rowLoading).toBe(label12); - expect(nativeElement.rowLoading).toBe(label12); + expect(directive.rowLoading).toBe(label14); + expect(nativeElement.rowLoading).toBe(label14); }); }); @@ -223,6 +247,8 @@ describe('Nimble Label Provider Table', () => { [columnHeaderGrouped]="columnHeaderGrouped" [groupCollapse]="groupCollapse" [groupExpand]="groupExpand" + [rowCollapse]="rowCollapse" + [rowExpand]="rowExpand" [collapseAll]="collapseAll" [columnHeaderSortedAscending]="columnHeaderSortedAscending" [columnHeaderSortedDescending]="columnHeaderSortedDescending" @@ -242,6 +268,8 @@ describe('Nimble Label Provider Table', () => { public columnHeaderGrouped = label1; public groupCollapse = label1; public groupExpand = label1; + public rowCollapse = label1; + public rowExpand = label1; public collapseAll = label1; public columnHeaderSortedAscending = label1; public columnHeaderSortedDescending = label1; @@ -311,6 +339,28 @@ describe('Nimble Label Provider Table', () => { expect(nativeElement.groupExpand).toBe(label2); }); + it('can be configured with property binding for rowCollapse', () => { + expect(directive.rowCollapse).toBe(label1); + expect(nativeElement.rowCollapse).toBe(label1); + + fixture.componentInstance.rowCollapse = label2; + fixture.detectChanges(); + + expect(directive.rowCollapse).toBe(label2); + expect(nativeElement.rowCollapse).toBe(label2); + }); + + it('can be configured with property binding for rowExpand', () => { + expect(directive.rowExpand).toBe(label1); + expect(nativeElement.rowExpand).toBe(label1); + + fixture.componentInstance.rowExpand = label2; + fixture.detectChanges(); + + expect(directive.rowExpand).toBe(label2); + expect(nativeElement.rowExpand).toBe(label2); + }); + it('can be configured with property binding for collapseAll', () => { expect(directive.collapseAll).toBe(label1); expect(nativeElement.collapseAll).toBe(label1); @@ -408,6 +458,8 @@ describe('Nimble Label Provider Table', () => { [attr.column-header-grouped]="columnHeaderGrouped" [attr.group-collapse]="groupCollapse" [attr.group-expand]="groupExpand" + [attr.row-collapse]="rowCollapse" + [attr.row-expand]="rowExpand" [attr.collapse-all]="collapseAll" [attr.column-header-sorted-ascending]="columnHeaderSortedAscending" [attr.column-header-sorted-descending]="columnHeaderSortedDescending" @@ -427,6 +479,8 @@ describe('Nimble Label Provider Table', () => { public columnHeaderGrouped = label1; public groupCollapse = label1; public groupExpand = label1; + public rowCollapse = label1; + public rowExpand = label1; public collapseAll = label1; public columnHeaderSortedAscending = label1; public columnHeaderSortedDescending = label1; @@ -496,6 +550,28 @@ describe('Nimble Label Provider Table', () => { expect(nativeElement.groupExpand).toBe(label2); }); + it('can be configured with attribute binding for rowCollapse', () => { + expect(directive.rowCollapse).toBe(label1); + expect(nativeElement.rowCollapse).toBe(label1); + + fixture.componentInstance.rowCollapse = label2; + fixture.detectChanges(); + + expect(directive.rowCollapse).toBe(label2); + expect(nativeElement.rowCollapse).toBe(label2); + }); + + it('can be configured with attribute binding for rowExpand', () => { + expect(directive.rowExpand).toBe(label1); + expect(nativeElement.rowExpand).toBe(label1); + + fixture.componentInstance.rowExpand = label2; + fixture.detectChanges(); + + expect(directive.rowExpand).toBe(label2); + expect(nativeElement.rowExpand).toBe(label2); + }); + it('can be configured with attribute binding for collapseAll', () => { expect(directive.collapseAll).toBe(label1); expect(nativeElement.collapseAll).toBe(label1); diff --git a/angular-workspace/projects/ni/nimble-angular/package.json b/angular-workspace/projects/ni/nimble-angular/package.json index df7247214d..27fb5bfdf7 100644 --- a/angular-workspace/projects/ni/nimble-angular/package.json +++ b/angular-workspace/projects/ni/nimble-angular/package.json @@ -1,6 +1,6 @@ { "name": "@ni/nimble-angular", - "version": "20.3.0", + "version": "20.4.1", "description": "Angular components for the NI Nimble Design System", "scripts": { "invoke-publish": "cd ../../../ && npm run build:library && cd dist/ni/nimble-angular && npm publish" @@ -31,7 +31,7 @@ "@angular/forms": "^15.2.10", "@angular/localize": "^15.2.10", "@angular/router": "^15.2.10", - "@ni/nimble-components": "^21.10.2" + "@ni/nimble-components": "^22.0.1" }, "dependencies": { "tslib": "^2.2.0" diff --git a/package-lock.json b/package-lock.json index 3b1259fd35..61914ea73d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -74,7 +74,7 @@ }, "angular-workspace/projects/ni/nimble-angular": { "name": "@ni/nimble-angular", - "version": "20.3.0", + "version": "20.4.1", "license": "MIT", "dependencies": { "tslib": "^2.2.0" @@ -85,7 +85,7 @@ "@angular/forms": "^15.2.10", "@angular/localize": "^15.2.10", "@angular/router": "^15.2.10", - "@ni/nimble-components": "^21.10.2" + "@ni/nimble-components": "^22.0.1" } }, "node_modules/@11ty/dependency-tree": { @@ -33939,7 +33939,7 @@ }, "packages/nimble-blazor": { "name": "@ni/nimble-blazor", - "version": "14.3.20", + "version": "14.4.1", "hasInstallScript": true, "license": "MIT", "devDependencies": { @@ -33975,7 +33975,7 @@ }, "packages/nimble-components": { "name": "@ni/nimble-components", - "version": "21.10.2", + "version": "22.0.1", "license": "MIT", "dependencies": { "@microsoft/fast-colors": "^5.3.1", diff --git a/packages/nimble-blazor/CHANGELOG.json b/packages/nimble-blazor/CHANGELOG.json index 58bd153016..8beb296a92 100644 --- a/packages/nimble-blazor/CHANGELOG.json +++ b/packages/nimble-blazor/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@ni/nimble-blazor", "entries": [ + { + "date": "Wed, 13 Mar 2024 23:07:24 GMT", + "version": "14.4.0", + "tag": "@ni/nimble-blazor_v14.4.0", + "comments": { + "minor": [ + { + "author": "jattasNI@users.noreply.github.com", + "package": "@ni/nimble-blazor", + "commit": "518c229b964d2c4a2e77210692f5d367f2937ff4", + "comment": "Expose additional label provider properties" + } + ] + } + }, { "date": "Wed, 06 Mar 2024 17:56:10 GMT", "version": "14.3.17", diff --git a/packages/nimble-blazor/CHANGELOG.md b/packages/nimble-blazor/CHANGELOG.md index 182cfce82c..fce7a6df3e 100644 --- a/packages/nimble-blazor/CHANGELOG.md +++ b/packages/nimble-blazor/CHANGELOG.md @@ -1,9 +1,17 @@ # Change Log - @ni/nimble-blazor -This log was last generated on Tue, 05 Mar 2024 21:15:27 GMT and should not be manually modified. +This log was last generated on Wed, 13 Mar 2024 23:07:24 GMT and should not be manually modified. +## 14.4.0 + +Wed, 13 Mar 2024 23:07:24 GMT + +### Minor changes + +- Expose additional label provider properties ([ni/nimble@518c229](https://github.com/ni/nimble/commit/518c229b964d2c4a2e77210692f5d367f2937ff4)) + ## 14.3.15 Tue, 05 Mar 2024 21:15:27 GMT diff --git a/packages/nimble-blazor/NimbleBlazor/Components/NimbleLabelProviderCore.razor b/packages/nimble-blazor/NimbleBlazor/Components/NimbleLabelProviderCore.razor index 4d7f99c505..f5a2274346 100644 --- a/packages/nimble-blazor/NimbleBlazor/Components/NimbleLabelProviderCore.razor +++ b/packages/nimble-blazor/NimbleBlazor/Components/NimbleLabelProviderCore.razor @@ -3,5 +3,10 @@ popup-dismiss="@PopupDismiss" numeric-decrement="@NumericDecrement" numeric-increment="@NumericIncrement" + popup-icon-error="@PopupIconError" + popup-icon-warning="@PopupIconWarning" + popup-icon-information="@PopupIconInformation" + filter-search="@FilterSearch" + filter-no-results="@FilterNoResults" @attributes="AdditionalAttributes"> diff --git a/packages/nimble-blazor/NimbleBlazor/Components/NimbleLabelProviderCore.razor.cs b/packages/nimble-blazor/NimbleBlazor/Components/NimbleLabelProviderCore.razor.cs index e2e23abe27..eeb080d23a 100644 --- a/packages/nimble-blazor/NimbleBlazor/Components/NimbleLabelProviderCore.razor.cs +++ b/packages/nimble-blazor/NimbleBlazor/Components/NimbleLabelProviderCore.razor.cs @@ -16,6 +16,21 @@ public partial class NimbleLabelProviderCore : ComponentBase [Parameter] public string? NumericDecrement { get; set; } + [Parameter] + public string? PopupIconError { get; set; } + + [Parameter] + public string? PopupIconWarning { get; set; } + + [Parameter] + public string? PopupIconInformation { get; set; } + + [Parameter] + public string? FilterSearch { get; set; } + + [Parameter] + public string? FilterNoResults { get; set; } + /// /// Gets or sets a collection of additional attributes that will be applied to the created element. /// diff --git a/packages/nimble-blazor/NimbleBlazor/Components/NimbleLabelProviderTable.razor b/packages/nimble-blazor/NimbleBlazor/Components/NimbleLabelProviderTable.razor index 50351dc8bc..a71b904408 100644 --- a/packages/nimble-blazor/NimbleBlazor/Components/NimbleLabelProviderTable.razor +++ b/packages/nimble-blazor/NimbleBlazor/Components/NimbleLabelProviderTable.razor @@ -2,6 +2,8 @@ +## 22.0.1 + +Thu, 14 Mar 2024 14:48:16 GMT + +### Patches + +- Fix bug where an anchor element's link couldn't be dragged correctly ([ni/nimble@a1eebb0](https://github.com/ni/nimble/commit/a1eebb02b4fb66ca77e0e32bb52497b2da1cb4cf)) + +## 22.0.0 + +Wed, 13 Mar 2024 23:07:24 GMT + +### Major changes + +- Rename icon labels to follow naming convention ([ni/nimble@518c229](https://github.com/ni/nimble/commit/518c229b964d2c4a2e77210692f5d367f2937ff4)) + ## 21.10.2 Tue, 12 Mar 2024 22:17:11 GMT diff --git a/packages/nimble-components/package.json b/packages/nimble-components/package.json index 1fb3d19ebf..20bf058f61 100644 --- a/packages/nimble-components/package.json +++ b/packages/nimble-components/package.json @@ -1,6 +1,6 @@ { "name": "@ni/nimble-components", - "version": "21.10.2", + "version": "22.0.1", "description": "Styled web components for the NI Nimble Design System", "scripts": { "build": "npm run generate-icons && npm run generate-workers && npm run build-components && npm run bundle-components && npm run generate-scss && npm run build-storybook", diff --git a/packages/nimble-components/rollup.config.js b/packages/nimble-components/rollup.config.js index 787b48dd43..3c594bea3a 100644 --- a/packages/nimble-components/rollup.config.js +++ b/packages/nimble-components/rollup.config.js @@ -16,17 +16,21 @@ const umdProductionPlugin = () => replace({ preventAssignment: true }); -// d3 has circular dependencies it won't remove: -// https://github.com/d3/d3-selection/issues/168 -// So ignore just d3's circular dependencies following the pattern from: -// https://github.com/rollup/rollup/issues/1089#issuecomment-635564942 -// Updated to use current onwarn api: +// Custom onwarn handler for ignoring specific warnings: // https://rollupjs.org/configuration-options/#onwarn const onwarn = (warning, defaultHandler) => { const ignoredWarnings = [ + // d3 has circular dependencies it won't remove: + // See https://github.com/d3/d3-selection/issues/168 { code: 'CIRCULAR_DEPENDENCY', file: 'node_modules/d3-' + }, + // apache-arrow has circular dependencies: + // See https://github.com/apache/arrow/issues/40516 + { + code: 'CIRCULAR_DEPENDENCY', + file: 'node_modules/apache-arrow' } ]; diff --git a/packages/nimble-components/src/anchor-button/styles.ts b/packages/nimble-components/src/anchor-button/styles.ts index f57265ea8d..1393bd4360 100644 --- a/packages/nimble-components/src/anchor-button/styles.ts +++ b/packages/nimble-components/src/anchor-button/styles.ts @@ -11,4 +11,16 @@ export const styles = css` .control { text-decoration: none; } + + [part='start'] { + pointer-events: none; + } + + .content { + pointer-events: none; + } + + [part='end'] { + pointer-events: none; + } `; diff --git a/packages/nimble-components/src/anchor-menu-item/styles.ts b/packages/nimble-components/src/anchor-menu-item/styles.ts index d108f5dad6..fb5e5d8fe2 100644 --- a/packages/nimble-components/src/anchor-menu-item/styles.ts +++ b/packages/nimble-components/src/anchor-menu-item/styles.ts @@ -69,6 +69,7 @@ export const styles = css` [part='start'] { display: contents; + pointer-events: none; } slot[name='start']::slotted(*) { @@ -81,6 +82,10 @@ export const styles = css` grid-column: 1; } + .content { + pointer-events: none; + } + :host(.indent-1) .content { grid-column: 2; } diff --git a/packages/nimble-components/src/anchor-tab/styles.ts b/packages/nimble-components/src/anchor-tab/styles.ts index 467ce518dc..979e65b672 100644 --- a/packages/nimble-components/src/anchor-tab/styles.ts +++ b/packages/nimble-components/src/anchor-tab/styles.ts @@ -52,6 +52,7 @@ export const styles = css` } slot:not([name]) { + pointer-events: none; display: block; padding: ${mediumPadding} ${standardPadding} calc(${mediumPadding} - ${borderWidth}); diff --git a/packages/nimble-components/src/anchor-tabs/tests/anchor-tabs.mdx b/packages/nimble-components/src/anchor-tabs/tests/anchor-tabs.mdx index f176c47ade..89ff9ce3c8 100644 --- a/packages/nimble-components/src/anchor-tabs/tests/anchor-tabs.mdx +++ b/packages/nimble-components/src/anchor-tabs/tests/anchor-tabs.mdx @@ -29,7 +29,7 @@ tab panels hosted on the same page. ## Angular Usage In an Angular application, it is common to integrate with the router by setting `nimbleRouterLink` (rather than `href`) -on each element. In those cases, it is recommended to also set `replaceUrl="true"` so that switching +on each element. In those cases, it is recommended to also set `replaceUrl="true"` so that switching between tabs does not add to the browser history. {/* ## Accessibility */} diff --git a/packages/nimble-components/src/anchor-tree-item/styles.ts b/packages/nimble-components/src/anchor-tree-item/styles.ts index bf91df7fcc..f1b66ff96c 100644 --- a/packages/nimble-components/src/anchor-tree-item/styles.ts +++ b/packages/nimble-components/src/anchor-tree-item/styles.ts @@ -100,6 +100,7 @@ export const styles = css` } [part="start"] { width: ${iconSize}; + pointer-events: none; } ${/* the start class is applied when the corresponding slot is filled */ ''} @@ -115,6 +116,10 @@ export const styles = css` height: ${iconSize}; } + .content { + pointer-events: none; + } + [part='end'] { display: none; } diff --git a/packages/nimble-components/src/anchor/styles.ts b/packages/nimble-components/src/anchor/styles.ts index 9d1f1a9c0e..3e5ed018a9 100644 --- a/packages/nimble-components/src/anchor/styles.ts +++ b/packages/nimble-components/src/anchor/styles.ts @@ -93,6 +93,10 @@ export const styles = css` color: ${linkProminentDisabledFontColor}; } + .content { + pointer-events: none; + } + [part='end'] { display: none; } diff --git a/packages/nimble-components/src/banner/template.ts b/packages/nimble-components/src/banner/template.ts index 889b0025d8..c2568336d9 100644 --- a/packages/nimble-components/src/banner/template.ts +++ b/packages/nimble-components/src/banner/template.ts @@ -7,10 +7,10 @@ import { iconTriangleFilledTag } from '../icons/triangle-filled'; import { iconXmarkTag } from '../icons/xmark'; import { BannerSeverity } from './types'; import { - errorIconLabel, - informationIconLabel, + popupIconErrorLabel, + popupIconInformationLabel, popupDismissLabel, - warningIconLabel + popupIconWarningLabel } from '../label-provider/core/label-tokens'; // prettier-ignore @@ -40,13 +40,13 @@ export const template = html` >
${when(x => x.severity === BannerSeverity.error, html` - <${iconExclamationMarkTag} role="img" aria-label="${x => errorIconLabel.getValueFor(x)}"> + <${iconExclamationMarkTag} role="img" aria-label="${x => popupIconErrorLabel.getValueFor(x)}"> `)} ${when(x => x.severity === BannerSeverity.warning, html` - <${iconTriangleFilledTag} role="img" aria-label="${x => warningIconLabel.getValueFor(x)}"> + <${iconTriangleFilledTag} role="img" aria-label="${x => popupIconWarningLabel.getValueFor(x)}"> `)} ${when(x => x.severity === BannerSeverity.information, html` - <${iconInfoTag} role="img" aria-label="${x => informationIconLabel.getValueFor(x)}"> + <${iconInfoTag} role="img" aria-label="${x => popupIconInformationLabel.getValueFor(x)}"> `)}
diff --git a/packages/nimble-components/src/breadcrumb-item/styles.ts b/packages/nimble-components/src/breadcrumb-item/styles.ts index f65b78859d..091265edf3 100644 --- a/packages/nimble-components/src/breadcrumb-item/styles.ts +++ b/packages/nimble-components/src/breadcrumb-item/styles.ts @@ -61,6 +61,10 @@ export const styles = css` display: none; } + .content { + pointer-events: none; + } + [part='end'] { display: none; } diff --git a/packages/nimble-components/src/card/tests/card.mdx b/packages/nimble-components/src/card/tests/card.mdx index 4113b8eb7d..a5c8085597 100644 --- a/packages/nimble-components/src/card/tests/card.mdx +++ b/packages/nimble-components/src/card/tests/card.mdx @@ -6,8 +6,8 @@ import * as cardStories from './card.stories'; -The <Tag of={cardTag} /> is a container that is designed to contain arbitrary content that is specified by a client -application. The <Tag of={cardTag} /> is intended for grouping related content. +The <Tag name={cardTag} /> is a container that is designed to contain arbitrary content that is specified by a client +application. The <Tag name={cardTag} /> is intended for grouping related content. <Canvas of={cardStories.card} /> <Controls of={cardStories.card} /> diff --git a/packages/nimble-components/src/combobox/tests/combobox.mdx b/packages/nimble-components/src/combobox/tests/combobox.mdx index 254ea40c8e..0870896932 100644 --- a/packages/nimble-components/src/combobox/tests/combobox.mdx +++ b/packages/nimble-components/src/combobox/tests/combobox.mdx @@ -19,11 +19,11 @@ import { listOptionTag } from '../../list-option/'; ### Native element and Blazor -The value of the combobox comes from the text content of the selected autocomplete <Tag of={listOptionTag} />, or, if no matching autocomplete is found, the value is the user-entered text. +The value of the combobox comes from the text content of the selected autocomplete <Tag name={listOptionTag} />, or, if no matching autocomplete is found, the value is the user-entered text. ### Angular -In Angular, an autocomplete <Tag of={listOptionTag} /> can be created with an `ngValue`. In that case the `ngModel` of the combobox will be the `ngValue` of the matched autocomplete option. +In Angular, an autocomplete <Tag name={listOptionTag} /> can be created with an `ngValue`. In that case the `ngModel` of the combobox will be the `ngValue` of the matched autocomplete option. If no matching autocomplete option is found, the `ngModel` of the combobox will be set to `OPTION_NOT_FOUND`, and if the application needs to access the user-entered text, that should be done through the `value` property on the `NimbleComboboxDirective`. diff --git a/packages/nimble-components/src/label-provider/core/index.ts b/packages/nimble-components/src/label-provider/core/index.ts index f7c901dc12..b0a872a5e7 100644 --- a/packages/nimble-components/src/label-provider/core/index.ts +++ b/packages/nimble-components/src/label-provider/core/index.ts @@ -5,9 +5,9 @@ import { popupDismissLabel, numericDecrementLabel, numericIncrementLabel, - errorIconLabel, - warningIconLabel, - informationIconLabel, + popupIconErrorLabel, + popupIconWarningLabel, + popupIconInformationLabel, filterSearchLabel, filterNoResultsLabel } from './label-tokens'; @@ -22,9 +22,9 @@ const supportedLabels = { popupDismiss: popupDismissLabel, numericDecrement: numericDecrementLabel, numericIncrement: numericIncrementLabel, - errorIcon: errorIconLabel, - warningIcon: warningIconLabel, - informationIcon: informationIconLabel, + popupIconError: popupIconErrorLabel, + popupIconWarning: popupIconWarningLabel, + popupIconInformation: popupIconInformationLabel, filterSearch: filterSearchLabel, filterNoResults: filterNoResultsLabel } as const; @@ -44,14 +44,14 @@ export class LabelProviderCore @attr({ attribute: 'numeric-increment' }) public numericIncrement: string | undefined; - @attr({ attribute: 'error-icon' }) - public errorIcon: string | undefined; + @attr({ attribute: 'popup-icon-error' }) + public popupIconError: string | undefined; - @attr({ attribute: 'warning-icon' }) - public warningIcon: string | undefined; + @attr({ attribute: 'popup-icon-warning' }) + public popupIconWarning: string | undefined; - @attr({ attribute: 'information-icon' }) - public informationIcon: string | undefined; + @attr({ attribute: 'popup-icon-information' }) + public popupIconInformation: string | undefined; @attr({ attribute: 'filter-search' }) public filterSearch: string | undefined; diff --git a/packages/nimble-components/src/label-provider/core/label-token-defaults.ts b/packages/nimble-components/src/label-provider/core/label-token-defaults.ts index 91ed6e5993..b555c28f27 100644 --- a/packages/nimble-components/src/label-provider/core/label-token-defaults.ts +++ b/packages/nimble-components/src/label-provider/core/label-token-defaults.ts @@ -6,9 +6,9 @@ export const coreLabelDefaults: { readonly [key in TokenName]: string } = { popupDismissLabel: 'Close', numericIncrementLabel: 'Increment', numericDecrementLabel: 'Decrement', - errorIconLabel: 'Error', - warningIconLabel: 'Warning', - informationIconLabel: 'Information', + popupIconErrorLabel: 'Error', + popupIconWarningLabel: 'Warning', + popupIconInformationLabel: 'Information', filterSearchLabel: 'Search', filterNoResultsLabel: 'No items found' }; diff --git a/packages/nimble-components/src/label-provider/core/label-tokens.ts b/packages/nimble-components/src/label-provider/core/label-tokens.ts index 2cfe2debce..2f6f518ec5 100644 --- a/packages/nimble-components/src/label-provider/core/label-tokens.ts +++ b/packages/nimble-components/src/label-provider/core/label-tokens.ts @@ -16,20 +16,20 @@ export const numericIncrementLabel = DesignToken.create<string>({ cssCustomPropertyName: null }).withDefault(coreLabelDefaults.numericIncrementLabel); -export const errorIconLabel = DesignToken.create<string>({ - name: 'error-icon-label', +export const popupIconErrorLabel = DesignToken.create<string>({ + name: 'popup-icon-error-label', cssCustomPropertyName: null -}).withDefault(coreLabelDefaults.errorIconLabel); +}).withDefault(coreLabelDefaults.popupIconErrorLabel); -export const warningIconLabel = DesignToken.create<string>({ - name: 'warning-icon-label', +export const popupIconWarningLabel = DesignToken.create<string>({ + name: 'popup-icon-warning-label', cssCustomPropertyName: null -}).withDefault(coreLabelDefaults.warningIconLabel); +}).withDefault(coreLabelDefaults.popupIconWarningLabel); -export const informationIconLabel = DesignToken.create<string>({ - name: 'information-icon-label', +export const popupIconInformationLabel = DesignToken.create<string>({ + name: 'popup-icon-information-label', cssCustomPropertyName: null -}).withDefault(coreLabelDefaults.informationIconLabel); +}).withDefault(coreLabelDefaults.popupIconInformationLabel); export const filterSearchLabel = DesignToken.create<string>({ name: 'filter-search-label', diff --git a/packages/performance/.eslintrc.js b/packages/performance/.eslintrc.cjs similarity index 75% rename from packages/performance/.eslintrc.js rename to packages/performance/.eslintrc.cjs index 3e1be2eb59..f7f5374ae5 100644 --- a/packages/performance/.eslintrc.js +++ b/packages/performance/.eslintrc.cjs @@ -27,5 +27,11 @@ module.exports = { // Rules enabled due to strictNullChecks '@typescript-eslint/no-non-null-assertion': 'off', } + }, { + files: ['vite.config.js'], + rules: { + // Configuration scripts will not be in published package and are allowed to use devDependencies + 'import/no-extraneous-dependencies': ['error', { devDependencies: true }], + } }] }; diff --git a/packages/performance/lighthouserc.js b/packages/performance/lighthouserc.cjs similarity index 100% rename from packages/performance/lighthouserc.js rename to packages/performance/lighthouserc.cjs diff --git a/packages/performance/package.json b/packages/performance/package.json index b8041f3be2..a2b5b6af64 100644 --- a/packages/performance/package.json +++ b/packages/performance/package.json @@ -2,6 +2,7 @@ "name": "@ni-private/performance", "version": "1.0.0", "private": true, + "type": "module", "description": "A package to measure the performance of the Nimble Components", "scripts": { "build": "tsc && vite build src", diff --git a/packages/performance/src/vite.config.js b/packages/performance/src/vite.config.js index 2a8b74e794..8f5bec56a9 100644 --- a/packages/performance/src/vite.config.js +++ b/packages/performance/src/vite.config.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/no-extraneous-dependencies import { defineConfig } from 'vite'; import { resolve } from 'path';