diff --git a/.vscode/cspell.json b/.vscode/cspell.json
index faf1677550..c12ffbb122 100644
--- a/.vscode/cspell.json
+++ b/.vscode/cspell.json
@@ -11,6 +11,7 @@
"aria-valuenow",
"aria-valuetext",
"combobox",
+ "commandfor",
"listbox",
"listitem",
"progressbar",
@@ -32,9 +33,9 @@
"igniteui",
"slotchange",
"stylelint",
- "webcomponents"
- ],
- "ignoreRegExpList": [
- "θ"
+ "webcomponents",
+ "noopener",
+ "noreferrer"
],
+ "ignoreRegExpList": ["θ"]
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bf4c7c603e..357b23a000 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Added `keepOpenOnEscape` property — prevents the drawer from closing when the user presses the **Escape** key (non-relative positions only).
- Added `igcClosing` event — emitted just before the drawer is closed by user interaction. Cancelable.
- Added `igcClosed` event — emitted just after the drawer is closed by user interaction.
+- #### Invoker Commands API
+ - `igc-button` and `igc-icon-button` now support `command` and `commandfor` properties, enabling declarative control of target components without JavaScript.
+ - `igc-banner`, `igc-dialog`, `igc-nav-drawer`, `igc-snackbar`, and `igc-toast` now respond to `--show`, `--hide`, and `--toggle` commands dispatched by an invoker button.
### Changed
- #### Nav Drawer
diff --git a/src/components/banner/banner.spec.ts b/src/components/banner/banner.spec.ts
index f786930da9..fa05bb3f66 100644
--- a/src/components/banner/banner.spec.ts
+++ b/src/components/banner/banner.spec.ts
@@ -4,9 +4,11 @@ import {
fixture,
html,
nextFrame,
+ waitUntil,
} from '@open-wc/testing';
import { spy } from 'sinon';
+import IgcButtonComponent from '../button/button.js';
import { defineComponents } from '../common/definitions/defineComponents.js';
import { finishAnimationsFor, simulateClick } from '../common/utils.spec.js';
import IgcIconComponent from '../icon/icon.js';
@@ -14,7 +16,7 @@ import IgcBannerComponent from './banner.js';
describe('Banner', () => {
before(() => {
- defineComponents(IgcBannerComponent, IgcIconComponent);
+ defineComponents(IgcBannerComponent, IgcButtonComponent, IgcIconComponent);
});
const createDefaultBanner = () => html`
@@ -287,4 +289,163 @@ describe('Banner', () => {
expect(banner.open).to.be.true;
});
});
+
+ describe('Invoker Commands API', () => {
+ afterEach(async () => {
+ if (banner.open) {
+ await banner.hide();
+ }
+ });
+
+ describe('with igc-button', () => {
+ let invoker: IgcButtonComponent;
+
+ beforeEach(async () => {
+ const container = await fixture