Skip to content

Commit

Permalink
perf: update dropdown to latest for bib position fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rmenner committed Dec 19, 2024
1 parent de300d1 commit da752c4
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 12 deletions.
32 changes: 30 additions & 2 deletions demo/api.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -11168,6 +11168,7 @@ class AuroDropdown extends r$2 {
this.isPopoverVisible = false;
this.matchWidth = false;
this.noHideOnThisFocusLoss = false;
this.resizeObserver = undefined;

this.privateDefaults();
}
Expand Down Expand Up @@ -11286,6 +11287,10 @@ class AuroDropdown extends r$2 {

disconnectedCallback() {
super.disconnectedCallback();

if (this.resizeObserver !== undefined) {
this.resizeObserver.unobserve(this.trigger);
}
}

/**
Expand Down Expand Up @@ -11452,6 +11457,8 @@ class AuroDropdown extends r$2 {
});

this.notifyReady();

this.setUpResizeObserver();
}

/**
Expand Down Expand Up @@ -11480,6 +11487,10 @@ class AuroDropdown extends r$2 {
this.triggerChevron.removeAttribute('data-expanded');
}
this.dispatchEventDropdownToggle();

if (this.resizeObserver !== undefined) {
this.resizeObserver.unobserve(this.trigger);
}
}

/**
Expand All @@ -11503,8 +11514,11 @@ class AuroDropdown extends r$2 {
}

this.handleFocusLoss();

this.dispatchEventDropdownToggle();

if (this.resizeObserver !== undefined) {
this.resizeObserver.observe(this.trigger);
}
}
}

Expand Down Expand Up @@ -11554,6 +11568,20 @@ class AuroDropdown extends r$2 {
}
}

/**
* Internal method to set up the resize observer. When an element is resized, we update
* the popper instance.
* @private
* @return {void}
*/
setUpResizeObserver() {
if ('ResizeObserver' in window) {
this.resizeObserver = new ResizeObserver(() => {
this.popper.triggerUpdate();
});
}
}

// function that renders the HTML and CSS into the scope of the component
render() {
return u$2`
Expand Down Expand Up @@ -11607,7 +11635,7 @@ class AuroDropdown extends r$2 {
}
}

var dropdownVersion = '3.2.1';
var dropdownVersion = '3.2.2';

/**
* @license
Expand Down
32 changes: 30 additions & 2 deletions demo/index.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -10923,6 +10923,7 @@ class AuroDropdown extends r$2 {
this.isPopoverVisible = false;
this.matchWidth = false;
this.noHideOnThisFocusLoss = false;
this.resizeObserver = undefined;

this.privateDefaults();
}
Expand Down Expand Up @@ -11041,6 +11042,10 @@ class AuroDropdown extends r$2 {

disconnectedCallback() {
super.disconnectedCallback();

if (this.resizeObserver !== undefined) {
this.resizeObserver.unobserve(this.trigger);
}
}

/**
Expand Down Expand Up @@ -11207,6 +11212,8 @@ class AuroDropdown extends r$2 {
});

this.notifyReady();

this.setUpResizeObserver();
}

/**
Expand Down Expand Up @@ -11235,6 +11242,10 @@ class AuroDropdown extends r$2 {
this.triggerChevron.removeAttribute('data-expanded');
}
this.dispatchEventDropdownToggle();

if (this.resizeObserver !== undefined) {
this.resizeObserver.unobserve(this.trigger);
}
}

/**
Expand All @@ -11258,8 +11269,11 @@ class AuroDropdown extends r$2 {
}

this.handleFocusLoss();

this.dispatchEventDropdownToggle();

if (this.resizeObserver !== undefined) {
this.resizeObserver.observe(this.trigger);
}
}
}

Expand Down Expand Up @@ -11309,6 +11323,20 @@ class AuroDropdown extends r$2 {
}
}

/**
* Internal method to set up the resize observer. When an element is resized, we update
* the popper instance.
* @private
* @return {void}
*/
setUpResizeObserver() {
if ('ResizeObserver' in window) {
this.resizeObserver = new ResizeObserver(() => {
this.popper.triggerUpdate();
});
}
}

// function that renders the HTML and CSS into the scope of the component
render() {
return u$2`
Expand Down Expand Up @@ -11362,7 +11390,7 @@ class AuroDropdown extends r$2 {
}
}

var dropdownVersion = '3.2.1';
var dropdownVersion = '3.2.2';

/**
* @license
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"dependencies": {
"@alaskaairux/icons": "^4.44.1",
"@aurodesignsystem/auro-dropdown": "^3.2.1",
"@aurodesignsystem/auro-dropdown": "^3.2.2",
"@aurodesignsystem/auro-formvalidation": "^1.0.4",
"@aurodesignsystem/auro-input": "^4.3.0",
"@aurodesignsystem/auro-library": "^3.0.2",
Expand Down
2 changes: 1 addition & 1 deletion src/dropdownVersion.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default '3.2.1'
export default '3.2.2'

0 comments on commit da752c4

Please sign in to comment.