@infineon/infineon-design-system-stencil 20.10.0 → 20.11.0

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.
@@ -7044,7 +7044,7 @@ const Choices = class {
7044
7044
  }
7045
7045
  toggleDropdown() {
7046
7046
  // console.log("toggling dropdown");
7047
- const div = document.querySelector('.ifx-choices__wrapper');
7047
+ const div = this.root.querySelector('.ifx-choices__wrapper');
7048
7048
  // this.classList.contains('active')
7049
7049
  if (this.choice.dropdown.isActive || div.classList.contains('active')) {
7050
7050
  this.hideDropdown();
@@ -7054,7 +7054,7 @@ const Choices = class {
7054
7054
  this.choice.showDropdown();
7055
7055
  div.classList.add('active');
7056
7056
  }
7057
- const choicesElement = document.querySelector('.choices');
7057
+ const choicesElement = this.root.querySelector('.choices');
7058
7058
  choicesElement.classList.add('is-focused'); // Add the 'is-focused' class, cause a click on the wrapper (and not the embedded select element) doesnt add this automatically to the choices instance
7059
7059
  }
7060
7060
  handleKeyDown(event) {
@@ -7086,7 +7086,7 @@ const Choices = class {
7086
7086
  }
7087
7087
  handleOutsideClick(event) {
7088
7088
  const path = event.composedPath();
7089
- const ifxChoicesContainer = document.querySelector('.ifx-choices__wrapper');
7089
+ const ifxChoicesContainer = this.root.querySelector('.ifx-choices__wrapper');
7090
7090
  if (!path.includes(this.root)) {
7091
7091
  this.closeDropdownMenu();
7092
7092
  this.handleClassList(ifxChoicesContainer, 'remove', 'active');
@@ -7263,7 +7263,7 @@ const Choices = class {
7263
7263
  }
7264
7264
  }
7265
7265
  addEventListenersToHandleCustomFocusAndActiveState() {
7266
- const div = document.querySelector('.ifx-choices__wrapper');
7266
+ const div = this.root.querySelector('.ifx-choices__wrapper');
7267
7267
  if (!div) {
7268
7268
  console.error('.ifx-choices__wrapper not found');
7269
7269
  return;