Skip to content

Commit

Permalink
fix: Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
GZolla authored Jan 15, 2025
2 parents df7011f + cc7b7be commit d5e5ac0
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 15 deletions.
7 changes: 3 additions & 4 deletions d2l-navigation-dropdown-button-custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ class NavigationDropdownButtonCustom extends DropdownOpenerMixin(LitElement) {
`];
}

getOpenerElement() {
return this.shadowRoot && this.shadowRoot.querySelector('button');
}

render() {
return html`
<button type="button">
Expand All @@ -31,6 +27,9 @@ class NavigationDropdownButtonCustom extends DropdownOpenerMixin(LitElement) {
`;
}

getOpenerElement() {
return this.shadowRoot?.querySelector('button');
}
}

customElements.define('d2l-navigation-dropdown-button-custom', NavigationDropdownButtonCustom);
8 changes: 4 additions & 4 deletions d2l-navigation-dropdown-button-icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ class NavigationDropdownButtonIcon extends DropdownOpenerMixin(LitElement) {
this._describedById = getUniqueId();
}

getOpenerElement() {
return this.shadowRoot && this.shadowRoot.querySelector('button');
}

render() {
const { ariaDescribedBy, ariaDescription, contents } = this._getRenderSettings();
const highlightBorder = !this.disabled ? html`<span class="d2l-navigation-highlight-border"></span>` : nothing;
Expand All @@ -65,6 +61,10 @@ class NavigationDropdownButtonIcon extends DropdownOpenerMixin(LitElement) {
`;
}

getOpenerElement() {
return this.shadowRoot?.querySelector('button');
}

_getRenderSettings() {
const icon = html`<d2l-icon icon="${this.icon}"></d2l-icon>`;
if (this.hasNotification) {
Expand Down
8 changes: 8 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { addExtensions, litConfig, setDirectoryConfigs, testingConfig } from 'eslint-config-brightspace';

export default setDirectoryConfigs(
addExtensions(litConfig, ['.js', '.html']),
{
'test': testingConfig
}
);
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"repository": "https://github.com/BrightspaceUILabs/navigation.git",
"scripts": {
"lint": "npm run lint:eslint && npm run lint:style",
"lint:eslint": "eslint . --ext .js,.html",
"lint:eslint": "eslint .",
"lint:style": "stylelint \"**/*.{js,html}\"",
"start": "web-dev-server --node-resolve --watch --open --app-index demo/index.html",
"test": "npm run lint && npm run test:unit",
Expand Down Expand Up @@ -41,12 +41,12 @@
"author": "D2L Corporation",
"license": "Apache-2.0",
"devDependencies": {
"@brightspace-ui/stylelint-config": "^0.8",
"@brightspace-ui/stylelint-config": "^1",
"@brightspace-ui/testing": "^1",
"@web/dev-server": "^0.3",
"eslint": "^8",
"eslint-config-brightspace": "^0.25",
"stylelint": "^15"
"@web/dev-server": "^0.4",
"eslint": "^9",
"eslint-config-brightspace": "^2",
"stylelint": "^16"
},
"dependencies": {
"@brightspace-ui/core": "^3",
Expand Down
2 changes: 1 addition & 1 deletion test/button.vdiff.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import '../../d2l-navigation-button-icon.js';
import '../../d2l-navigation-dropdown-button-custom.js';
import '../../d2l-navigation-dropdown-button-icon.js';
import { expect, fixture, focusElem, hoverElem, html, oneEvent } from '@brightspace-ui/testing';
import { ifDefined } from 'lit-html/directives/if-defined.js';
import { ifDefined } from 'lit/directives/if-defined.js';
import { nothing } from 'lit';

const create = (opts = {}) => {
Expand Down

0 comments on commit d5e5ac0

Please sign in to comment.