@infineon/infineon-design-system-stencil 32.2.0 → 32.3.0--canary.1735.caab07de0687d0c12e1cd3ff61f282de3445523b.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.
@@ -7038,6 +7038,15 @@ const Choices = class {
7038
7038
  this.resizeObserver = null;
7039
7039
  }
7040
7040
  }
7041
+ handleWrapperClick(event) {
7042
+ const target = event.target;
7043
+ const isSearchInput = target.classList.contains('choices__input') || target.closest('.choices__input');
7044
+ const isDropdownItem = target.closest('.choices__list--dropdown .choices__item');
7045
+ // Only toggle dropdown if clicking on wrapper itself
7046
+ if (!isSearchInput && !isDropdownItem) {
7047
+ this.toggleDropdown();
7048
+ }
7049
+ }
7041
7050
  render() {
7042
7051
  const attributes = {
7043
7052
  'data-selector': 'root',
@@ -7048,9 +7057,9 @@ const Choices = class {
7048
7057
  // destroy choices element to restore previous dom structure
7049
7058
  // so vdom can replace the element correctly
7050
7059
  this.destroy();
7051
- return (index.h("div", { key: 'fea26b0d75050a64b85be4a9d60c5353e64c28a6', class: `ifx-select-container` }, this.label ? (index.h("div", { class: "ifx-label-wrapper" }, index.h("span", null, this.label))) : null, index.h("div", { key: '122cdbeb12cd1c268a274971a0d0619d95fcc0a2', class: `${choicesWrapperClass}
7060
+ return (index.h("div", { key: '21623bb2329c6fbe07fdaf7a13ed1c7ced0f76c6', class: `ifx-select-container` }, this.label ? (index.h("div", { class: "ifx-label-wrapper" }, index.h("span", null, this.label))) : null, index.h("div", { key: '733439a9d0fc293e2338423cc4dfd2b2f4596fd4', class: `${choicesWrapperClass}
7052
7061
  ${this.disabled ? 'disabled' : ''}
7053
- ${this.error ? 'error' : ''}`, onClick: this.disabled ? undefined : () => this.toggleDropdown(), onKeyDown: event => this.handleKeyDown(event) }, index.h("select", Object.assign({ key: 'c138c46ae14722f0629b89649824a6414e19fcaf', class: 'single__select-input-field', disabled: this.disabled }, attributes, { "data-trigger": true, onChange: () => this.handleChange() }), this.createSelectOptions(this.options)), index.h("div", { key: '3999f9e02015fecc4758b269c43d2f0c3ba2ba69', class: "single__select-icon-container" }, this.optionIsSelected && (index.h("div", { key: 'd91f27712ff0febb0a6186b0dec1f41eff67c5d4', class: "ifx-choices__icon-wrapper-delete" }, index.h("ifx-icon", { key: '580986c3a71f9210c1a48caa6ee5f02d46531aa3', icon: "cremove16", onClick: () => this.handleDeleteSelection() }))), index.h("div", { key: '002e77d28f1e5c75c7e6df46680120a7e7061727', class: "ifx-choices__icon-wrapper-up" }, index.h("ifx-icon", { key: "icon-up", icon: "chevronup-16" })), index.h("div", { key: '0cf642c93a5daed04a01e7229573c06c45ab843d', class: "ifx-choices__icon-wrapper-down" }, index.h("ifx-icon", { key: "icon-down", icon: "chevron-down-16" })))), this.error ? (index.h("div", { class: "ifx-error-message-wrapper" }, index.h("span", null, this.errorMessage))) : null));
7062
+ ${this.error ? 'error' : ''}`, onClick: this.disabled ? undefined : (e) => this.handleWrapperClick(e), onKeyDown: event => this.handleKeyDown(event) }, index.h("select", Object.assign({ key: '781e8a7567c660c5e896f32be84a3704ea34f43a', class: 'single__select-input-field', disabled: this.disabled }, attributes, { "data-trigger": true, onChange: () => this.handleChange() }), this.createSelectOptions(this.options)), index.h("div", { key: 'c7600e164145027a85ff2e4370825868b5290229', class: "single__select-icon-container" }, this.optionIsSelected && (index.h("div", { key: '5ebb1b1f69c7879ace354e63c814063c5ea4c6e5', class: "ifx-choices__icon-wrapper-delete" }, index.h("ifx-icon", { key: 'ce160e99cdf0bcf02a005d4ec8287a7f47cf9dcd', icon: "cremove16", onClick: () => this.handleDeleteSelection() }))), index.h("div", { key: 'f1ff0fde3fe57b61b90d19b835011338bfe62ea1', class: "ifx-choices__icon-wrapper-up" }, index.h("ifx-icon", { key: "icon-up", icon: "chevronup-16" })), index.h("div", { key: '2e1fa631b36b6fd12ce01a1b8f798b820f0b2c90', class: "ifx-choices__icon-wrapper-down" }, index.h("ifx-icon", { key: "icon-down", icon: "chevron-down-16" })))), this.error ? (index.h("div", { class: "ifx-error-message-wrapper" }, index.h("span", null, this.errorMessage))) : null));
7054
7063
  }
7055
7064
  toggleDropdown() {
7056
7065
  const div = this.root.querySelector('.ifx-choices__wrapper');