@infineon/infineon-design-system-stencil 39.5.3--canary.2143.df790fabdc350922c24a2831c6694c57d6d12352.0 → 39.5.3--canary.2144.4d6adbdd15b2843a11fb5f8cf503f6424f864373.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.
Files changed (57) hide show
  1. package/dist/cjs/ifx-checkbox.cjs.entry.js +12 -12
  2. package/dist/cjs/ifx-checkbox.cjs.entry.js.map +1 -1
  3. package/dist/cjs/ifx-checkbox.entry.cjs.js.map +1 -1
  4. package/dist/cjs/ifx-search-field.cjs.entry.js +7 -22
  5. package/dist/cjs/ifx-search-field.cjs.entry.js.map +1 -1
  6. package/dist/cjs/ifx-search-field.entry.cjs.js.map +1 -1
  7. package/dist/cjs/infineon-design-system-stencil.cjs.js +1 -1
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/collection/components/checkbox/checkbox.js +15 -14
  10. package/dist/collection/components/checkbox/checkbox.js.map +1 -1
  11. package/dist/collection/components/search-field/search-field.js +7 -22
  12. package/dist/collection/components/search-field/search-field.js.map +1 -1
  13. package/dist/collection/components/table-advanced-version/table.stories.js +71 -71
  14. package/dist/collection/components/table-advanced-version/table.stories.js.map +1 -1
  15. package/dist/collection/components/table-basic-version/table.stories.js +15 -15
  16. package/dist/collection/components/table-basic-version/table.stories.js.map +1 -1
  17. package/dist/components/ifx-checkbox.js +1 -1
  18. package/dist/components/ifx-chip-item.js +1 -1
  19. package/dist/components/ifx-filter-search.js +1 -1
  20. package/dist/components/ifx-icons-preview.js +1 -1
  21. package/dist/components/ifx-list-entry.js +1 -1
  22. package/dist/components/ifx-multiselect-option.js +1 -1
  23. package/dist/components/ifx-multiselect.js +1 -1
  24. package/dist/components/ifx-search-bar.js +1 -1
  25. package/dist/components/ifx-search-field.js +1 -1
  26. package/dist/components/ifx-set-filter.js +4 -4
  27. package/dist/components/ifx-table.js +2 -2
  28. package/dist/components/ifx-tree-view-item.js +1 -1
  29. package/dist/components/{p-CG8WUF7S.js → p-B-I2VhI5.js} +4 -4
  30. package/dist/components/{p-CG8WUF7S.js.map → p-B-I2VhI5.js.map} +1 -1
  31. package/dist/components/{p-WVpEOqoG.js → p-BG2S8rtL.js} +3 -3
  32. package/dist/components/{p-WVpEOqoG.js.map → p-BG2S8rtL.js.map} +1 -1
  33. package/dist/components/{p-Cmd43Oxg.js → p-Bc_ZM813.js} +3 -3
  34. package/dist/components/{p-Cmd43Oxg.js.map → p-Bc_ZM813.js.map} +1 -1
  35. package/dist/components/{p-CtzLf4yZ.js → p-CROLVxZq.js} +16 -15
  36. package/dist/components/p-CROLVxZq.js.map +1 -0
  37. package/dist/components/{p-dwBbLAVm.js → p-ZCLJED5S.js} +9 -24
  38. package/dist/components/p-ZCLJED5S.js.map +1 -0
  39. package/dist/esm/ifx-checkbox.entry.js +12 -12
  40. package/dist/esm/ifx-checkbox.entry.js.map +1 -1
  41. package/dist/esm/ifx-search-field.entry.js +7 -22
  42. package/dist/esm/ifx-search-field.entry.js.map +1 -1
  43. package/dist/esm/infineon-design-system-stencil.js +1 -1
  44. package/dist/esm/loader.js +1 -1
  45. package/dist/infineon-design-system-stencil/ifx-checkbox.entry.esm.js.map +1 -1
  46. package/dist/infineon-design-system-stencil/ifx-search-field.entry.esm.js.map +1 -1
  47. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
  48. package/dist/infineon-design-system-stencil/{p-36758398.entry.js → p-b23596f4.entry.js} +2 -2
  49. package/dist/infineon-design-system-stencil/p-b23596f4.entry.js.map +1 -0
  50. package/dist/infineon-design-system-stencil/{p-49eb8d14.entry.js → p-f63ba4a3.entry.js} +2 -2
  51. package/dist/infineon-design-system-stencil/p-f63ba4a3.entry.js.map +1 -0
  52. package/dist/types/components/checkbox/checkbox.d.ts +1 -0
  53. package/package.json +2 -2
  54. package/dist/components/p-CtzLf4yZ.js.map +0 -1
  55. package/dist/components/p-dwBbLAVm.js.map +0 -1
  56. package/dist/infineon-design-system-stencil/p-36758398.entry.js.map +0 -1
  57. package/dist/infineon-design-system-stencil/p-49eb8d14.entry.js.map +0 -1
@@ -21,21 +21,21 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
21
21
  handleCheckbox() {
22
22
  if (!this.disabled) {
23
23
  if (!this.inputElement.indeterminate) {
24
- this.checked = !this.checked;
24
+ this.internalChecked = !this.internalChecked;
25
25
  }
26
- this.ifxChange.emit(this.checked);
26
+ this.ifxChange.emit(this.internalChecked);
27
27
  }
28
28
  }
29
29
  async isChecked() {
30
- return this.checked;
30
+ return this.internalChecked;
31
31
  }
32
32
  async toggleCheckedState(newVal) {
33
- this.checked = newVal;
33
+ this.internalChecked = newVal;
34
34
  }
35
35
  valueChanged(newValue, oldValue) {
36
36
  if (newValue !== oldValue) {
37
- this.checked = newValue;
38
- this.inputElement.checked = this.checked; // update the checkbox's checked property
37
+ this.internalChecked = newValue;
38
+ this.inputElement.checked = this.internalChecked; // update the checkbox's checked property
39
39
  }
40
40
  }
41
41
  errorChanged(newValue, oldValue) {
@@ -57,7 +57,7 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
57
57
  }
58
58
  }
59
59
  componentWillLoad() {
60
- this.checked = this.checked;
60
+ this.internalChecked = this.checked;
61
61
  this.internalIndeterminate = this.indeterminate;
62
62
  }
63
63
  async componentDidLoad() {
@@ -78,14 +78,14 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
78
78
  // }
79
79
  getCheckedClassName() {
80
80
  if (this.error) {
81
- if (this.checked) {
81
+ if (this.internalChecked) {
82
82
  return "checked error";
83
83
  }
84
84
  else {
85
85
  return "error";
86
86
  }
87
87
  }
88
- else if (this.checked) {
88
+ else if (this.internalChecked) {
89
89
  return "checked";
90
90
  }
91
91
  else
@@ -97,12 +97,12 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
97
97
  if (slot) {
98
98
  hasSlot = true;
99
99
  }
100
- return (h("div", { key: 'd9c936d5f0500623a3f0307dd590a4ac2123a19a', class: "checkbox__container" }, h("input", { key: '2117b8dc34ec289901cadd51fb761ca3543b5705', type: "checkbox", hidden: true, ref: (el) => (this.inputElement = el), checked: this.checked, onChange: this.handleCheckbox.bind(this), id: 'checkbox', value: `${this.value}`, disabled: this.disabled ? true : undefined }), h("div", { key: '16297e2911b9fb6220a11f19f601224bde8afece', tabindex: "0", onClick: this.handleCheckbox.bind(this), onKeyDown: this.handleKeydown.bind(this), role: "checkbox", "aria-checked": this.indeterminate ? 'mixed' : this.checked.toString(), "aria-disabled": this.disabled, "aria-labelledby": "label", class: `checkbox__wrapper
100
+ return (h("div", { key: '6605cecca0fc9ea377620c93c411747c6103d0fc', class: "checkbox__container" }, h("input", { key: 'e28753294d821fdc066f64e99295bb6ead4be86d', type: "checkbox", hidden: true, ref: (el) => (this.inputElement = el), checked: this.internalChecked, onChange: this.handleCheckbox.bind(this), id: 'checkbox', value: `${this.value}`, disabled: this.disabled ? true : undefined }), h("div", { key: 'ff14245dcd1ff6285ec153591b52ffa3c3f06358', tabindex: "0", onClick: this.handleCheckbox.bind(this), onKeyDown: this.handleKeydown.bind(this), role: "checkbox", "aria-checked": this.indeterminate ? 'mixed' : this.internalChecked.toString(), "aria-disabled": this.disabled, "aria-labelledby": "label", class: `checkbox__wrapper
101
101
  ${this.getCheckedClassName()}
102
102
  ${this.size === "m" ? "checkbox-m" : ""}
103
103
  ${this.indeterminate ? 'indeterminate' : ""}
104
- ${this.disabled ? 'disabled' : ""}` }, this.checked && !this.internalIndeterminate && h("ifx-icon", { key: '80877be3f4eac9d49cfbfe3c34770fbfc794d7fc', icon: "check-16", "aria-hidden": "true" })), hasSlot &&
105
- h("div", { key: '8da41207fe96fdb7208cc9a9762c28307872835a', id: "label", class: `label ${this.size === "m" ? "label-m" : ""} ${this.disabled ? 'disabled' : ""} `, onClick: this.handleCheckbox.bind(this) }, h("slot", { key: '6899a7387127c70b8199ec53642261462facc127' }))));
104
+ ${this.disabled ? 'disabled' : ""}` }, this.internalChecked && !this.internalIndeterminate && h("ifx-icon", { key: '13e9e197e4375548b34a597c007ddf6866ad5e05', icon: "check-16", "aria-hidden": "true" })), hasSlot &&
105
+ h("div", { key: '8161ca9223da4df88bc82eb9d26989df68cedc19', id: "label", class: `label ${this.size === "m" ? "label-m" : ""} ${this.disabled ? 'disabled' : ""} `, onClick: this.handleCheckbox.bind(this) }, h("slot", { key: '29856bf622df0289f8803eb3c4a33f4738f50863' }))));
106
106
  }
107
107
  get el() { return this; }
108
108
  static get watchers() { return {
@@ -113,11 +113,12 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends H {
113
113
  static get style() { return checkboxCss; }
114
114
  }, [257, "ifx-checkbox", {
115
115
  "disabled": [4],
116
- "checked": [1028],
116
+ "checked": [4],
117
117
  "error": [4],
118
118
  "size": [1],
119
119
  "indeterminate": [4],
120
120
  "value": [1],
121
+ "internalChecked": [32],
121
122
  "internalIndeterminate": [32],
122
123
  "isChecked": [64],
123
124
  "toggleCheckedState": [64]
@@ -146,6 +147,6 @@ function defineCustomElement() {
146
147
  }
147
148
 
148
149
  export { Checkbox as C, defineCustomElement as d };
149
- //# sourceMappingURL=p-CtzLf4yZ.js.map
150
+ //# sourceMappingURL=p-CROLVxZq.js.map
150
151
 
151
- //# sourceMappingURL=p-CtzLf4yZ.js.map
152
+ //# sourceMappingURL=p-CROLVxZq.js.map
@@ -0,0 +1 @@
1
+ {"file":"p-CROLVxZq.js","mappings":";;;;AAAA,MAAM,WAAW,GAAG,m1EAAm1E;;MCY11E,QAAQ,iBAAAA,kBAAA,CAAA,MAAA,QAAA,SAAAC,CAAA,CAAA;AAPrB,IAAA,WAAA,GAAA;;;;;;;AAWU,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AACzB,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;AACxB,QAAA,IAAK,CAAA,KAAA,GAAY,KAAK;AACtB,QAAA,IAAI,CA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CAAA,CAAA,EAAE,OAAO,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAA,EAC/I,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACJ,CACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/checkbox/checkbox.scss?tag=ifx-checkbox&encapsulation=shadow","src/components/checkbox/checkbox.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n\n:host {\n display: inline-flex;\n vertical-align: top;\n}\n\n.checkbox__container {\n box-sizing: border-box;\n display: inline-flex;\n flex-direction: row;\n align-items: top;\n padding: 0px;\n gap: tokens.$ifxSpace100;\n font-family: tokens.$ifxFontFamilyBody;\n vertical-align: bottom;\n\n & .checkbox__wrapper {\n box-sizing: border-box;\n display: flex;\n position: relative; //needs to be added for the indeterminate state of the checkbox\n justify-content: center;\n align-items: center;\n width: tokens.$ifxSize250;\n height: tokens.$ifxSize250;\n background-color: tokens.$ifxColorBaseWhite;\n border: 1px solid tokens.$ifxColorEngineering500;\n border-radius: tokens.$ifxBorderRadius12;\n flex: none;\n order: 0;\n flex-grow: 0;\n align-self: flex-start;\n\n &.checkbox-m {\n height: tokens.$ifxSize300;\n width: tokens.$ifxSize300;\n }\n\n &.error {\n border-color: tokens.$ifxColorRed500;\n }\n\n &:focus-visible {\n border: 1px solid tokens.$ifxColorEngineering500;\n outline: 2px solid tokens.$ifxColorOcean500;\n outline-offset: 2px;\n }\n\n &:hover {\n background-color: tokens.$ifxColorEngineering200;\n border: 1px solid tokens.$ifxColorEngineering500;\n border-radius: tokens.$ifxBorderRadius12;\n flex: none;\n order: 0;\n flex-grow: 0;\n }\n\n &.disabled {\n background-color: tokens.$ifxColorEngineering300;;\n border-color: tokens.$ifxColorEngineering300;;\n border-radius: tokens.$ifxBorderRadius12;\n flex: none;\n order: 0;\n flex-grow: 0;\n }\n\n &.checked:not(.indeterminate) {\n background-color: tokens.$ifxColorOcean500;\n border-radius: tokens.$ifxBorderRadius12;\n border-color: tokens.$ifxColorBaseTransparent;\n flex: none;\n order: 0;\n flex-grow: 0;\n color: tokens.$ifxColorBaseWhite;\n\n &.error {\n background-color: tokens.$ifxColorRed500;\n }\n\n &:focus-visible {\n border: 1px solid transparent;\n outline: 2px solid #0A8276;\n outline-offset: 2px;\n }\n\n &:hover {\n background-color: tokens.$ifxColorOcean500;\n border-radius: tokens.$ifxBorderRadius12;\n flex: none;\n order: 0;\n flex-grow: 0;\n }\n\n &.disabled {\n background: tokens.$ifxColorEngineering300;;\n border-radius: tokens.$ifxBorderRadius12;\n flex: none;\n order: 0;\n flex-grow: 0;\n }\n }\n\n &.indeterminate {\n &:before {\n content: \"\";\n display: block;\n width: 70%; // Adjust as needed for the width of the minus sign\n height: 2px; // Adjust for thickness of the minus sign\n background-color: tokens.$ifxColorOcean600; // Color of the minus sign\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n\n }\n\n & .label {\n font-style: normal;\n font-weight: 400;\n font-size: tokens.$ifxFontSizeS;\n line-height: tokens.$ifxLineHeightS;\n color: tokens.$ifxColorBaseBlack;\n overflow-wrap: break-word;\n word-wrap: break-word;\n word-break: break-all;\n max-width: 100%;\n\n &.label-m {\n font-size: tokens.$ifxFontSizeM;\n line-height: tokens.$ifxLineHeightM;\n }\n\n &.disabled {\n color: tokens.$ifxColorEngineering300;\n }\n }\n\n & .checkbox__wrapper,\n & .label {\n &:hover {\n cursor: pointer;\n }\n }\n}","import { Component, h, Prop, Element, State, Event, EventEmitter, Watch, Method, AttachInternals } from '@stencil/core';\nimport { trackComponent } from '../../global/utils/tracking';\nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\n\n@Component({\n tag: 'ifx-checkbox',\n styleUrl: 'checkbox.scss',\n shadow: true,\n // formAssociated: true\n})\n\nexport class Checkbox {\n private inputElement: HTMLInputElement;\n\n @Element() el;\n @Prop() disabled: boolean = false;\n @Prop() checked: boolean = false;\n @Prop() error: boolean = false;\n @Prop() size: string = 'm';\n @Prop() indeterminate: boolean = false;\n @Prop() value: string;\n @State() internalChecked: boolean;\n @State() internalIndeterminate: boolean;\n\n @AttachInternals() internals: ElementInternals;\n\n @Event({ bubbles: true, composed: true }) ifxChange: EventEmitter;\n @Event({ bubbles: true, composed: true }) ifxError: EventEmitter;\n\n handleCheckbox() {\n if (!this.disabled) {\n if (!this.inputElement.indeterminate) {\n this.internalChecked = !this.internalChecked;\n } \n if (this.internalChecked && !this.internalIndeterminate) {\n if (this.value !== undefined) {\n //this.internals.setFormValue(this.value);\n } else {\n //this.internals.setFormValue(\"on\")\n }\n } else {\n //this.internals.setFormValue(null)\n }\n this.ifxChange.emit(this.internalChecked);\n }\n }\n\n @Method()\n async isChecked(): Promise<boolean> {\n return this.internalChecked;\n }\n\n @Method()\n async toggleCheckedState(newVal: boolean) {\n this.internalChecked = newVal;\n }\n\n @Watch('checked')\n valueChanged(newValue: boolean, oldValue: boolean) {\n if (newValue !== oldValue) {\n this.internalChecked = newValue;\n this.inputElement.checked = this.internalChecked; // update the checkbox's checked property\n }\n }\n\n @Watch('error')\n errorChanged(newValue: boolean, oldValue: boolean) {\n if (newValue !== oldValue) {\n this.ifxError.emit(newValue);\n }\n }\n\n @Watch('indeterminate')\n indeterminateChanged(newValue: boolean, oldValue: boolean) {\n if (newValue !== oldValue) {\n this.internalIndeterminate = newValue;\n this.inputElement.indeterminate = this.internalIndeterminate; // update the checkbox's indeterminate property\n }\n }\n\n handleKeydown(event) {\n // Keycode 32 corresponds to the Space key, 13 corresponds to the Enter key\n if (event.keyCode === 32 || event.keyCode === 13) {\n this.handleCheckbox();\n event.preventDefault(); // prevent the default action when space or enter is pressed\n }\n }\n\n componentWillLoad() {\n this.internalChecked = this.checked;\n this.internalIndeterminate = this.indeterminate;\n }\n\n async componentDidLoad() { \n if(!isNestedInIfxComponent(this.el)) { \n const framework = detectFramework();\n trackComponent('ifx-checkbox', await framework)\n }\n }\n\n componentDidRender() {\n this.inputElement.indeterminate = this.internalIndeterminate;\n }\n\n /**\n * Callback for form association.\n * Called whenever the form is reset.\n */\n // formResetCallback() {\n // this.internals.setFormValue(null);\n // }\n\n getCheckedClassName() {\n if (this.error) {\n if (this.internalChecked) {\n return \"checked error\"\n } else {\n return \"error\"\n }\n } else if (this.internalChecked) {\n return \"checked\";\n } else return \"\"\n }\n\n render() {\n const slot = this.el.innerHTML;\n let hasSlot = false;\n if (slot) {\n hasSlot = true;\n }\n return (\n <div class=\"checkbox__container\">\n <input\n type=\"checkbox\"\n hidden\n ref={(el) => (this.inputElement = el)}\n checked={this.internalChecked}\n onChange={this.handleCheckbox.bind(this)} // Listen for changes here\n id='checkbox'\n value={`${this.value}`}\n disabled={this.disabled ? true : undefined}\n />\n <div\n tabindex=\"0\"\n onClick={this.handleCheckbox.bind(this)}\n onKeyDown={this.handleKeydown.bind(this)}\n role=\"checkbox\"\n aria-checked={this.indeterminate ? 'mixed' : this.internalChecked.toString()}\n aria-disabled={this.disabled}\n aria-labelledby=\"label\"\n class={`checkbox__wrapper \n ${this.getCheckedClassName()}\n ${this.size === \"m\" ? \"checkbox-m\" : \"\"}\n ${this.indeterminate ? 'indeterminate' : \"\"}\n ${this.disabled ? 'disabled' : \"\"}`}\n >\n {this.internalChecked && !this.internalIndeterminate && <ifx-icon icon=\"check-16\" aria-hidden=\"true\"></ifx-icon>}\n </div>\n {hasSlot &&\n <div id=\"label\" class={`label ${this.size === \"m\" ? \"label-m\" : \"\"} ${this.disabled ? 'disabled' : \"\"} `} onClick={this.handleCheckbox.bind(this)}>\n <slot />\n </div>}\n </div>\n );\n }\n}"],"version":3}
@@ -378,32 +378,17 @@ const SearchField = /*@__PURE__*/ proxyCustomElement(class SearchField extends H
378
378
  this.showDeleteIconInternalState = false;
379
379
  }
380
380
  render() {
381
- // Debug: Check for Symbol values in suggestions
382
- this.filteredSuggestions.forEach((suggestion, index) => {
383
- if (typeof suggestion.id === 'symbol' || typeof suggestion.text === 'symbol' || typeof suggestion.scope === 'symbol') {
384
- // eslint-disable-next-line no-console
385
- console.warn('Symbol value detected in suggestion', { suggestion, index });
386
- }
387
- });
388
- return (h("div", { key: 'fa449752baf4a06c3160069d720db1bc4f63b69f', "aria-disabled": this.disabled, class: "search-field" }, h("div", { key: '91abbdb324e0f5d10a9916360b2576ddbe2073cc', class: this.getWrapperClassNames(), tabIndex: 1, onClick: () => this.focusInput() }, h("ifx-icon", { key: '80a75c095e19a85e03ea4d4cce872748079e43c8', icon: "search-16", class: "search-icon" }), h("input", { key: 'c9a56734a3056e581d88fe887f05bfd3f32ff566', ref: (el) => (this.inputElement = el), type: "text", autocomplete: String(this.autocomplete), onInput: () => this.handleInput(), onFocus: () => this.focusInput(), onBlur: () => this.blurInput(), placeholder: String(this.placeholder), disabled: this.disabled, maxlength: this.maxlength, value: String(this.value), role: "combobox", "aria-controls": this.showDropdown ? 'suggestions-dropdown' : undefined, "aria-expanded": this.showDropdown, "aria-autocomplete": "list", "aria-haspopup": "listbox", "aria-label": this.ariaLabel ? String(this.ariaLabel) : undefined, "aria-labelledby": this.ariaLabelledBy ? String(this.ariaLabelledBy) : undefined, "aria-describedby": this.ariaDescribedBy ? String(this.ariaDescribedBy) : undefined, "aria-owns": this.showDropdown ? 'suggestions-dropdown' : undefined, "aria-activedescendant": this.selectedSuggestionIndex >= 0 ? `suggestion-${this.selectedSuggestionIndex}` : undefined }), this.showDeleteIcon && this.showDeleteIconInternalState ? (h("ifx-icon", { icon: "cRemove16", class: "delete-icon", onClick: this.handleDelete, role: "button", tabIndex: 0, "aria-label": this.deleteIconAriaLabel ? String(this.deleteIconAriaLabel) : undefined, onKeyDown: (event) => {
381
+ return (h("div", { key: 'd355ec7cdbe980ea99e4238cf02d907ddd76d59b', "aria-disabled": this.disabled, "aria-value": this.value, class: 'search-field' }, h("div", { key: '2aa3d943caab35213ca10f071586c80358515f1c', class: this.getWrapperClassNames(), tabindex: 1, onClick: () => this.focusInput() }, h("ifx-icon", { key: 'eaa300dd0f8466a2396c55f3f2fffe9dcf5bbf44', icon: "search-16", class: "search-icon" }), h("input", { key: 'cce86ee892ec624fe8671d7567434ae5433b8702', ref: (el) => (this.inputElement = el), type: "text", autocomplete: this.autocomplete, onInput: () => this.handleInput(), onFocus: () => this.focusInput(), onBlur: () => this.blurInput(), placeholder: this.placeholder, disabled: this.disabled, maxlength: this.maxlength, value: this.value, role: "combobox", "aria-controls": this.showDropdown ? 'suggestions-dropdown' : undefined, "aria-expanded": this.showDropdown, "aria-autocomplete": "list", "aria-haspopup": "listbox", "aria-label": this.ariaLabel, "aria-labelledby": this.ariaLabelledBy, "aria-describedby": this.ariaDescribedBy, "aria-owns": this.showDropdown ? 'suggestions-dropdown' : undefined, "aria-activedescendant": this.selectedSuggestionIndex >= 0 ? `suggestion-${this.selectedSuggestionIndex}` : undefined }), this.showDeleteIcon && this.showDeleteIconInternalState ? (h("ifx-icon", { icon: "cRemove16", class: "delete-icon", onClick: this.handleDelete, role: "button", tabindex: "0", "aria-label": this.deleteIconAriaLabel, onKeyDown: (event) => {
389
382
  if (event.key === 'Enter' || event.key === ' ') {
390
383
  event.preventDefault();
391
384
  this.handleDelete();
392
385
  }
393
- } })) : null), this.showDropdown && this.filteredSuggestions.length > 0 && (h("div", { key: 'b8bad4f2efa77404ad6cb7d07530698befe103fd', ref: (el) => (this.dropdownElement = el), id: "suggestions-dropdown", class: "suggestions-dropdown", role: "listbox", "aria-label": this.dropdownAriaLabel ? String(this.dropdownAriaLabel) : undefined }, this.isShowingOnlyHistory() && (h("div", { key: 'fdc557afa120253e3d6765b16320eb6fee838a6c', class: "suggestions-header" }, this.historyHeaderText)), this.filteredSuggestions.map((suggestion, index) => {
394
- // Defensive string conversion for all dynamic attributes
395
- const suggestionId = typeof suggestion.id === 'symbol' ? String(suggestion.id) : String(suggestion.id);
396
- const suggestionText = typeof suggestion.text === 'symbol' ? String(suggestion.text) : String(suggestion.text);
397
- const suggestionScope = suggestion.scope !== undefined && suggestion.scope !== null ? String(suggestion.scope) : '';
398
- const suggestionResultCount = suggestion.resultCount !== undefined && suggestion.resultCount !== null ? String(suggestion.resultCount) : '';
399
- const ariaLabel = `${suggestion.type === 'history' ? this.historyItemAriaLabel : this.suggestionAriaLabel}: ${suggestionText}${suggestion.scope ? `, ${suggestionScope}` : ''}${suggestion.resultCount ? `, ${suggestionResultCount} results` : ''}`;
400
- return (h("div", { key: suggestionId, id: `suggestion-${index}`, class: this.getSuggestionClassNames(index), role: "option", "aria-selected": index === this.selectedSuggestionIndex, "aria-label": ariaLabel, onClick: () => this.selectSuggestion(suggestion), onMouseEnter: () => this.selectedSuggestionIndex = index }, h("div", { class: "suggestion-content" }, suggestion.type === 'history' && (h("ifx-icon", { icon: "history-16", class: "suggestion-icon suggestion-icon--history" })), suggestion.type === 'suggestion' && (h("ifx-icon", { icon: "search-16", class: "suggestion-icon suggestion-icon--suggestion" })), h("span", { class: "suggestion-text" }, h("span", { class: "suggestion-main-text" }, this.renderHighlightedText(suggestionText, this.value)), suggestion.scope && (h("span", { class: "suggestion-scope" }, "\u2013 ", suggestionScope))), suggestion.resultCount !== undefined && suggestion.scope && (h("span", { class: "suggestion-count" }, suggestionResultCount)), suggestion.type === 'history' && (h("ifx-icon", { icon: "cross16", class: "suggestion-delete-icon", role: "button", tabIndex: 0, "aria-label": `${this.historyDeleteAriaLabel ? String(this.historyDeleteAriaLabel) : ''}: ${suggestionText}`, onClick: (event) => this.handleHistoryDelete(event, suggestion.text), onKeyDown: (event) => {
401
- if (event.key === 'Enter' || event.key === ' ') {
402
- event.preventDefault();
403
- this.handleHistoryDelete(event, suggestion.text);
404
- }
405
- } })))));
406
- })))));
386
+ } })) : null), this.showDropdown && this.filteredSuggestions.length > 0 && (h("div", { key: 'd447e63087ac5b41d2109a16b8db37df4c9db860', ref: (el) => (this.dropdownElement = el), id: "suggestions-dropdown", class: "suggestions-dropdown", role: "listbox", "aria-label": this.dropdownAriaLabel }, this.isShowingOnlyHistory() && (h("div", { key: '6a4662d31fd8c755ec1ec9da4bb871750aa63a57', class: "suggestions-header" }, this.historyHeaderText)), this.filteredSuggestions.map((suggestion, index) => (h("div", { key: suggestion.id, id: `suggestion-${index}`, class: this.getSuggestionClassNames(index), role: "option", "aria-selected": index === this.selectedSuggestionIndex, "aria-label": `${suggestion.type === 'history' ? this.historyItemAriaLabel : this.suggestionAriaLabel}: ${suggestion.text}${suggestion.scope ? `, ${suggestion.scope}` : ''}${suggestion.resultCount ? `, ${suggestion.resultCount} results` : ''}`, onClick: () => this.selectSuggestion(suggestion), onMouseEnter: () => this.selectedSuggestionIndex = index }, h("div", { class: "suggestion-content" }, suggestion.type === 'history' && (h("ifx-icon", { icon: "history-16", class: "suggestion-icon suggestion-icon--history" })), suggestion.type === 'suggestion' && (h("ifx-icon", { icon: "search-16", class: "suggestion-icon suggestion-icon--suggestion" })), h("span", { class: "suggestion-text" }, h("span", { class: "suggestion-main-text" }, this.renderHighlightedText(suggestion.text, this.value)), suggestion.scope && (h("span", { class: "suggestion-scope" }, "\u2013 ", suggestion.scope))), suggestion.resultCount !== undefined && suggestion.scope && (h("span", { class: "suggestion-count" }, suggestion.resultCount)), suggestion.type === 'history' && (h("ifx-icon", { icon: "cross16", class: "suggestion-delete-icon", role: "button", tabindex: "0", "aria-label": `${this.historyDeleteAriaLabel}: ${suggestion.text}`, onClick: (event) => this.handleHistoryDelete(event, suggestion.text), onKeyDown: (event) => {
387
+ if (event.key === 'Enter' || event.key === ' ') {
388
+ event.preventDefault();
389
+ this.handleHistoryDelete(event, suggestion.text);
390
+ }
391
+ } }))))))))));
407
392
  }
408
393
  getSizeClass() {
409
394
  return `${this.size}` === "s"
@@ -479,6 +464,6 @@ function defineCustomElement() {
479
464
  }
480
465
 
481
466
  export { SearchField as S, defineCustomElement as d };
482
- //# sourceMappingURL=p-dwBbLAVm.js.map
467
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AI,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE;oBAC9C,KAAK,CAAC,cAAc,EAAE;oBACtB,IAAI,CAAC,mBAAmB,CAAC,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC;;aAEnD,EAAA,CACS,CACb,CACG,CACF,CACP,CAAC,CACE,CACP,CACG;;IAIV,YAAY,GAAA;AACV,QAAA,OAAO,GAAG,IAAI,CAAC,IAAI,CAAA,CAAE,KAAK;AACxB,cAAE;cACA,EAAE;;IAGR,oBAAoB,GAAA;QAClB,OAAO,UAAU,CACf,CAAA,qBAAA,CAAuB,EACvB,CAAA,sBAAA,EAAyB,IAAI,CAAC,YAAY,EAAE,CAAA,CAAE,EAC9C,CAAA,EAAG,IAAI,CAAC,SAAS,GAAG,SAAS,GAAG,EAAE,CAAA,CAAE,EACpC,CAAA,EAAG,IAAI,CAAC,YAAY,GAAG,eAAe,GAAG,EAAE,CAAA,CAAE,EAC7C,CAAA,EAAG,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,EAAE,CAAE,CAAA,CACrC;;AAGH,IAAA,uBAAuB,CAAC,KAAa,EAAA;;QACnC,OAAO,UAAU,CACf,iBAAiB,EACjB;AACE,YAAA,2BAA2B,EAAE,KAAK,KAAK,IAAI,CAAC,uBAAuB;AACnE,YAAA,0BAA0B,EAAE,CAAA,CAAA,EAAA,GAAA,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,IAAI,MAAK;AACvE,SAAA,CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/search-field/search-field.scss?tag=ifx-search-field&encapsulation=shadow","src/components/search-field/search-field.tsx"],"sourcesContent":["@use '~@infineon/design-system-tokens/dist/tokens';\n@use '../../global/font.scss';\n\n:host {\n display: flex;\n}\n\n.search-field {\n box-sizing: border-box;\n background-color: tokens.$ifxColorBaseWhite;\n width: 100%;\n font-family: var(--ifx-font-family);\n position: relative; // Wichtig für absolute positioning des Dropdowns\n\n .search-field__wrapper {\n box-sizing: border-box;\n height: tokens.$ifxSize500;\n display: flex;\n align-items: center;\n border: 1px solid #8d8786;\n border-radius: tokens.$ifxBorderRadius12;\n padding: tokens.$ifxSpace100 tokens.$ifxSpace200;\n gap: tokens.$ifxSpace150;\n flex: none;\n order: 0;\n align-self: stretch;\n flex-grow: 0;\n position: relative;\n width: 100%;\n outline: none;\n\n &:focus-visible:not(.disabled) {\n outline: 2px solid tokens.$ifxColorOcean500;\n outline-offset: 2px;\n }\n\n &.search-field__wrapper-s {\n height: 36px;\n }\n\n &:hover:not(.focused, :focus) {\n border: 1px solid #3c3a39;\n }\n\n & .delete-icon {\n outline: 1px solid transparent;\n right: 12px;\n cursor: pointer;\n &:focus-visible {\n outline: 2px solid tokens.$ifxColorOcean500;\n outline-offset: 1px;\n }\n }\n\n input[type='text'] {\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n //line-height: 24px;\n color: #8d8786;\n border: none;\n width: 100%;\n outline: none;\n //height: 100%;\n height: 16px;\n\n &:focus {\n outline: none;\n color: #1d1d1d;\n }\n\n &:disabled {\n background: tokens.$ifxColorEngineering300;\n color: tokens.$ifxColorBaseWhite;\n\n &::placeholder {\n color: tokens.$ifxColorBaseWhite;\n }\n }\n }\n\n &.disabled {\n background: tokens.$ifxColorEngineering300;\n border: none;\n color: tokens.$ifxColorBaseWhite;\n\n &:hover {\n border: none;\n outline: none;\n }\n\n & .delete-icon { \n cursor: default;\n &:focus-visible { \n outline: 1px solid transparent;\n }\n }\n }\n }\n\n // Suggestions Dropdown Styles\n .suggestions-dropdown {\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n background: tokens.$ifxColorBaseWhite;\n margin-top: tokens.$ifxSpace50;\n border: 1px solid tokens.$ifxColorEngineering200;\n box-shadow: 0px 6px 9px 0px rgba(29, 29, 29, 0.1);\n z-index: 1000;\n max-height: 300px;\n overflow-y: auto;\n container-type: inline-size; // Enable container queries\n\n .suggestions-header {\n // font: tokens.$ifxEyebrowEyebrow02; TODO\n font-family: Source Sans 3;\n font-size: 0.8125rem;\n font-weight: 600;\n line-height: 1.25rem;\n\n letter-spacing: 0.25em;\n text-transform: uppercase;\n color: tokens.$ifxColorEngineering500;\n border-bottom: 1px solid tokens.$ifxColorEngineering200;\n padding: tokens.$ifxSpace150 tokens.$ifxSpace200;\n }\n\n .suggestion-item {\n padding: tokens.$ifxSpace150 tokens.$ifxSpace200;\n cursor: pointer;\n transition: background-color 0.2s ease;\n\n &:last-child {\n border-bottom: none;\n }\n\n &:hover,\n &--selected {\n background-color: tokens.$ifxColorEngineering200;\n }\n\n .suggestion-content {\n display: flex;\n align-items: center;\n gap: tokens.$ifxSpace150;\n\n .suggestion-icon {\n color: tokens.$ifxColorEngineering500;\n flex-shrink: 0;\n\n &--history {\n color: tokens.$ifxColorEngineering500;\n }\n }\n\n .suggestion-text {\n flex: 1;\n display: flex;\n align-items: center;\n min-width: 0; // Important for flexbox truncation\n\n .suggestion-main-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex-shrink: 1;\n min-width: 0;\n }\n\n .suggestion-scope {\n color: tokens.$ifxColorEngineering400;\n flex-shrink: 0; // Never truncate the scope\n white-space: nowrap;\n margin-left: tokens.$ifxSpace25; // Add space before the scope\n font-weight: tokens.$ifxFontWeightSemibold;\n font-size: tokens.$ifxFontSizeXs;\n }\n\n // When container is narrow, stack scope below main text\n @container (max-width: 320px) {\n flex-direction: column;\n align-items: flex-start;\n\n .suggestion-main-text {\n width: 100%;\n max-width: 100%;\n }\n\n .suggestion-scope {\n margin-left: 0;\n margin-top: 0;\n width: 100%;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n flex-shrink: 1; // Allow truncation when narrow\n }\n }\n }\n\n .suggestion-count {\n color: tokens.$ifxColorEngineering400;\n margin-left: auto;\n flex-shrink: 0;\n }\n\n .suggestion-delete-icon {\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.2s ease, visibility 0.2s ease;\n cursor: pointer;\n margin-left: auto;\n flex-shrink: 0;\n color: tokens.$ifxColorEngineering500;\n\n &:hover {\n color: tokens.$ifxColorEngineering600;\n }\n }\n }\n\n &:hover {\n .suggestion-delete-icon {\n opacity: 1;\n visibility: visible;\n }\n }\n }\n }\n\n // Wrapper modifications when dropdown is open\n .search-field__wrapper.dropdown-open {\n border-radius: tokens.$ifxBorderRadius12 tokens.$ifxBorderRadius12 0 0;\n border-color: tokens.$ifxColorOcean500;\n }\n}\n","import { Component, EventEmitter, h, Event, Prop, Watch, State, Listen, Element } from '@stencil/core';\nimport { trackComponent } from '../../global/utils/tracking';\nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\nimport classNames from 'classnames';\n\nexport interface SuggestionItem {\n id: string;\n text: string;\n type?: 'suggestion' | 'history';\n scope?: string;\n resultCount?: number;\n metadata?: any;\n}\n\n@Component({\n tag: 'ifx-search-field',\n styleUrl: 'search-field.scss',\n shadow: true\n})\n\nexport class SearchField {\n @Element() el;\n private inputElement: HTMLInputElement;\n private dropdownElement: HTMLDivElement;\n\n @Prop({ mutable: true }) value: string = '';\n @Prop() suggestions: SuggestionItem[] = [];\n @Prop() showSuggestions: boolean = false;\n @Prop() maxSuggestions: number = 10;\n @Prop() maxHistoryItems: number = 5;\n @Prop() enableHistory: boolean = true;\n @Prop() historyKey: string = 'ifx-search-history';\n @Prop() historyHeaderText: string = 'Recent Searches';\n\n // ARIA Labels and Accessibility Props\n @Prop() ariaLabel: string | null = \"Search Field\"\n @Prop() ariaLabelledBy?: string | null;\n @Prop() ariaDescribedBy?: string | null;\n @Prop() deleteIconAriaLabel: string = 'Clear search';\n @Prop() historyDeleteAriaLabel: string = 'Remove from history';\n @Prop() dropdownAriaLabel: string = 'Search suggestions and history';\n @Prop() suggestionAriaLabel: string = 'Search suggestion';\n @Prop() historyItemAriaLabel: string = 'Search history item';\n\n @Event() ifxInput: EventEmitter<string>;\n @Event() ifxSuggestionRequested: EventEmitter<string>;\n @Event() ifxSuggestionSelected: EventEmitter<SuggestionItem>;\n @Event() ifxFocus: EventEmitter<void>;\n @Event() ifxBlur: EventEmitter<void>;\n\n @State() showDropdown: boolean = false;\n @State() filteredSuggestions: SuggestionItem[] = [];\n @State() selectedSuggestionIndex: number = -1;\n @State() searchHistory: string[] = [];\n\n @Prop() showDeleteIcon: boolean = false;\n @State() showDeleteIconInternalState: boolean = false;\n @Prop() disabled: boolean = false;\n @Prop() size: string = 'l';\n @State() isFocused: boolean = false;\n @Prop() placeholder: string = \"Search...\";\n @Prop() autocomplete: string = \"off\";\n @Prop() maxlength?: number = null;\n\n private focusEmitted: boolean = false;\n\n @Listen('mousedown', { target: 'document' })\n handleOutsideClick(event: MouseEvent) {\n const path = event.composedPath();\n if (!path.includes(this.inputElement) && !path.includes(this.dropdownElement)) {\n this.hideDropdown();\n }\n }\n\n @Listen('keydown')\n handleKeyDown(event: KeyboardEvent) {\n if (!this.showDropdown) return;\n\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n this.navigateSuggestions(1);\n break;\n case 'ArrowUp':\n event.preventDefault();\n this.navigateSuggestions(-1);\n break;\n case 'Enter':\n event.preventDefault();\n if (this.selectedSuggestionIndex >= 0) {\n this.selectSuggestion(this.filteredSuggestions[this.selectedSuggestionIndex]);\n } else {\n this.handleSearch();\n }\n break;\n case 'Escape':\n this.hideDropdown();\n break;\n }\n }\n\n @Watch('value')\n valueWatcher(newValue: string) {\n if (this.inputElement && newValue !== this.inputElement.value) {\n this.inputElement.value = newValue;\n }\n this.updateSuggestions();\n }\n\n @Watch('suggestions')\n suggestionsWatcher() {\n this.updateSuggestions();\n }\n\n\n handleInput = () => {\n const query = this.inputElement.value;\n this.value = query;\n this.ifxInput.emit(this.value);\n\n if (this.showSuggestions) {\n this.showDropdown = true;\n this.selectedSuggestionIndex = -1;\n this.requestSuggestions(query);\n }\n };\n\n handleDelete = () => {\n if(!this.disabled) { \n this.inputElement.value = '';\n this.value = \"\";\n this.ifxInput.emit(this.value);\n this.hideDropdown();\n }\n }\n\n handleSearch = () => {\n if (this.value.trim() && this.enableHistory) {\n // Only add to history if there are actual results\n if (this.filteredSuggestions.length > 0) {\n this.addToHistory(this.value);\n }\n }\n this.hideDropdown();\n }\n\n focusInput() {\n // Only emit focus event if it hasn't been emitted already\n if (!this.focusEmitted) {\n this.focusEmitted = true;\n this.isFocused = true;\n this.ifxFocus.emit();\n }\n\n if (this.showSuggestions) {\n // On focus without input: Show only history\n if (this.value.length === 0) {\n this.showHistoryDropdown();\n // Only show dropdown if history is actually present\n this.showDropdown = this.enableHistory && this.searchHistory.length > 0;\n } else {\n // With existing input: Normal suggestion logic\n this.updateSuggestions();\n this.showDropdown = this.filteredSuggestions.length > 0;\n }\n }\n }\n\n blurInput() {\n setTimeout(() => {\n this.isFocused = false;\n this.focusEmitted = false; // Reset focus flag when blur occurs\n this.ifxBlur.emit();\n }, 150);\n }\n\n // Public method to update history from external sources\n public loadSearchHistory() {\n if (this.enableHistory && typeof localStorage !== 'undefined') {\n const stored = localStorage.getItem(this.historyKey);\n this.searchHistory = stored ? JSON.parse(stored) : [];\n\n // Update suggestions when history is loaded\n this.updateSuggestions();\n\n // If no input and no history left, close dropdown\n if (this.value.length === 0 && this.searchHistory.length === 0) {\n this.showDropdown = false;\n }\n }\n }\n\n // Public method to completely clear history\n public clearSearchHistory() {\n if (this.enableHistory && typeof localStorage !== 'undefined') {\n // Clear from localStorage\n localStorage.removeItem(this.historyKey);\n\n // Clear internal history\n this.searchHistory = [];\n\n // Reset all dropdown-relevant states\n this.filteredSuggestions = [];\n this.selectedSuggestionIndex = -1;\n this.showDropdown = false;\n\n // Update suggestions after reset\n this.updateSuggestions();\n }\n }\n\n // Suggestion Management Methods\n private addToHistory(term: string) {\n if (!this.enableHistory || !term.trim()) return;\n\n const history = [...this.searchHistory];\n const existingIndex = history.indexOf(term);\n\n if (existingIndex > -1) {\n history.splice(existingIndex, 1);\n }\n\n history.unshift(term);\n // Limit history to maxHistoryItems (default 5)\n this.searchHistory = history.slice(0, this.maxHistoryItems);\n\n if (typeof localStorage !== 'undefined') {\n localStorage.setItem(this.historyKey, JSON.stringify(this.searchHistory));\n }\n }\n\n // Remove individual history entry\n private removeFromHistory(term: string) {\n if (!this.enableHistory) return;\n\n const history = [...this.searchHistory];\n const index = history.indexOf(term);\n\n if (index > -1) {\n history.splice(index, 1);\n this.searchHistory = history;\n\n // Update localStorage\n if (typeof localStorage !== 'undefined') {\n localStorage.setItem(this.historyKey, JSON.stringify(this.searchHistory));\n }\n\n // Update suggestions after removal\n this.updateSuggestions();\n\n // Close dropdown if no history remains\n if (this.searchHistory.length === 0 && this.value.length === 0) {\n this.showDropdown = false;\n }\n }\n }\n\n // Handle click on history delete button\n private handleHistoryDelete = (event: Event, term: string) => {\n event.stopPropagation(); // Prevent selection of the entry\n this.removeFromHistory(term);\n }\n\n private requestSuggestions(query: string) {\n this.ifxSuggestionRequested.emit(query);\n this.updateSuggestions();\n }\n\n private updateSuggestions() {\n const query = this.value.toLowerCase();\n let suggestions: SuggestionItem[] = [];\n\n if (query.length > 0) {\n // For text input: Mix external suggestions and relevant history\n\n // 1. Filter external suggestions\n if (this.suggestions && this.suggestions.length > 0) {\n const filteredExternal = this.suggestions.filter(s =>\n s.text.toLowerCase().includes(query)\n );\n suggestions = [...suggestions, ...filteredExternal];\n }\n\n // 2. Filter relevant history entries\n if (this.enableHistory && this.searchHistory.length > 0) {\n const filteredHistory = this.searchHistory\n .filter(term => term.toLowerCase().includes(query))\n .map((term, index) => ({\n id: `history-${index}`,\n text: term,\n type: 'history' as const\n }));\n suggestions = [...suggestions, ...filteredHistory];\n }\n\n // 3. Sort by relevance (exact matches first, then prefix matches)\n suggestions.sort((a, b) => {\n const aText = a.text.toLowerCase();\n const bText = b.text.toLowerCase();\n\n // Exact match has highest priority\n if (aText === query && bText !== query) return -1;\n if (bText === query && aText !== query) return 1;\n\n // Prefix match has second highest priority\n const aStartsWith = aText.startsWith(query);\n const bStartsWith = bText.startsWith(query);\n\n if (aStartsWith && !bStartsWith) return -1;\n if (bStartsWith && !aStartsWith) return 1;\n\n // With equal relevance: external suggestions before history\n if (a.type === 'suggestion' && b.type === 'history') return -1;\n if (a.type === 'history' && b.type === 'suggestion') return 1;\n\n // Alphabetical sorting as last criterion\n return aText.localeCompare(bText);\n });\n\n } else {\n // For empty query: Show only history (no external suggestions)\n if (this.enableHistory && this.searchHistory.length > 0) {\n const historySuggestions = this.searchHistory.map((term, index) => ({\n id: `history-${index}`,\n text: term,\n type: 'history' as const\n }));\n\n suggestions = historySuggestions;\n }\n // For empty query DO NOT show external suggestions\n }\n\n // Remove duplicates based on text and scope combination (history takes precedence over external)\n const uniqueSuggestions = suggestions.reduce((unique: SuggestionItem[], current) => {\n const existingIndex = unique.findIndex(item =>\n item.text.toLowerCase() === current.text.toLowerCase() &&\n item.scope === current.scope\n );\n if (existingIndex === -1) {\n unique.push(current);\n } else {\n // If already exists, prefer history over external suggestions\n if (current.type === 'history' && unique[existingIndex].type !== 'history') {\n unique[existingIndex] = current;\n }\n }\n return unique;\n }, []);\n\n this.filteredSuggestions = uniqueSuggestions.slice(0, this.maxSuggestions);\n this.selectedSuggestionIndex = -1;\n }\n\n private navigateSuggestions(direction: number) {\n const maxIndex = this.filteredSuggestions.length - 1;\n\n if (direction > 0) {\n this.selectedSuggestionIndex = this.selectedSuggestionIndex < maxIndex\n ? this.selectedSuggestionIndex + 1\n : 0;\n } else {\n this.selectedSuggestionIndex = this.selectedSuggestionIndex > 0\n ? this.selectedSuggestionIndex - 1\n : maxIndex;\n }\n }\n\n private selectSuggestion(suggestion: SuggestionItem) {\n this.value = suggestion.text;\n this.inputElement.value = suggestion.text;\n this.ifxSuggestionSelected.emit(suggestion);\n this.ifxInput.emit(this.value);\n\n if (this.enableHistory) {\n // Always add selected suggestions to history since they are valid results\n this.addToHistory(suggestion.text);\n }\n\n this.hideDropdown();\n }\n\n private hideDropdown() {\n this.showDropdown = false;\n this.selectedSuggestionIndex = -1;\n this.isFocused = false;\n }\n\n // Show only history in dropdown (e.g. on focus without input)\n private showHistoryDropdown() {\n if (this.enableHistory && this.searchHistory.length > 0) {\n // Show only history entries\n const historySuggestions = this.searchHistory.map((term, index) => ({\n id: `history-${index}`,\n text: term,\n type: 'history' as const\n }));\n\n this.filteredSuggestions = historySuggestions.slice(0, this.maxSuggestions);\n this.selectedSuggestionIndex = -1;\n } else {\n this.filteredSuggestions = [];\n }\n }\n\n // Check if only history entries are displayed (without text input)\n private isShowingOnlyHistory(): boolean {\n return this.value.length === 0 &&\n this.filteredSuggestions.length > 0 &&\n this.filteredSuggestions.every(s => s.type === 'history');\n }\n\n // Render text with highlighted matches\n private renderHighlightedText(text: string, query: string) {\n if (!query || query.length === 0) {\n return text;\n }\n\n const lowerText = text.toLowerCase();\n const lowerQuery = query.toLowerCase();\n const index = lowerText.indexOf(lowerQuery);\n\n if (index === -1) {\n return text;\n }\n\n const before = text.substring(0, index);\n const match = text.substring(index, index + query.length);\n const after = text.substring(index + query.length);\n\n return [\n before,\n <strong>{match}</strong>,\n after\n ];\n }\n\n componentWillLoad() {\n this.loadSearchHistory();\n }\n\n async componentDidLoad() { \n if(!isNestedInIfxComponent(this.el)) {\n const framework = detectFramework()\n trackComponent('ifx-search-field', await framework)\n }\n }\n\n componentWillUpdate() {\n if (this.value !== \"\") {\n this.showDeleteIconInternalState = true;\n } else this.showDeleteIconInternalState = false;\n }\n\n render() {\n return (\n <div\n aria-disabled={this.disabled}\n aria-value={this.value}\n class='search-field'\n >\n <div\n class={this.getWrapperClassNames()}\n tabindex={1}\n onClick={() => this.focusInput()}\n >\n <ifx-icon icon=\"search-16\" class=\"search-icon\"></ifx-icon>\n <input\n ref={(el) => (this.inputElement = el)}\n type=\"text\"\n autocomplete={this.autocomplete}\n onInput={() => this.handleInput()}\n onFocus={() => this.focusInput()}\n onBlur={() => this.blurInput()}\n placeholder={this.placeholder}\n disabled={this.disabled}\n maxlength={this.maxlength}\n value={this.value}\n role=\"combobox\"\n aria-controls={this.showDropdown ? 'suggestions-dropdown' : undefined}\n aria-expanded={this.showDropdown}\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n aria-label={this.ariaLabel}\n aria-labelledby={this.ariaLabelledBy}\n aria-describedby={this.ariaDescribedBy}\n aria-owns={this.showDropdown ? 'suggestions-dropdown' : undefined}\n aria-activedescendant={this.selectedSuggestionIndex >= 0 ? `suggestion-${this.selectedSuggestionIndex}` : undefined}\n />\n {this.showDeleteIcon && this.showDeleteIconInternalState ? (\n <ifx-icon\n icon=\"cRemove16\"\n class=\"delete-icon\"\n onClick={this.handleDelete}\n role=\"button\"\n tabindex=\"0\"\n aria-label={this.deleteIconAriaLabel}\n onKeyDown={(event) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.handleDelete();\n }\n }}>\n </ifx-icon>\n ) : null}\n </div>\n\n {/* Suggestions Dropdown */}\n {this.showDropdown && this.filteredSuggestions.length > 0 && (\n <div\n ref={(el) => (this.dropdownElement = el)}\n id=\"suggestions-dropdown\"\n class=\"suggestions-dropdown\"\n role=\"listbox\"\n aria-label={this.dropdownAriaLabel}\n >\n {/* History Header - only show when exclusively showing history entries */}\n {this.isShowingOnlyHistory() && (\n <div class=\"suggestions-header\">\n {this.historyHeaderText}\n </div>\n )}\n\n {this.filteredSuggestions.map((suggestion, index) => (\n <div\n key={suggestion.id}\n id={`suggestion-${index}`}\n class={this.getSuggestionClassNames(index)}\n role=\"option\"\n aria-selected={index === this.selectedSuggestionIndex}\n aria-label={`${suggestion.type === 'history' ? this.historyItemAriaLabel : this.suggestionAriaLabel}: ${suggestion.text}${suggestion.scope ? `, ${suggestion.scope}` : ''}${suggestion.resultCount ? `, ${suggestion.resultCount} results` : ''}`}\n onClick={() => this.selectSuggestion(suggestion)}\n onMouseEnter={() => this.selectedSuggestionIndex = index}\n >\n <div class=\"suggestion-content\">\n {suggestion.type === 'history' && (\n <ifx-icon icon=\"history-16\" class=\"suggestion-icon suggestion-icon--history\"></ifx-icon>\n )}\n {suggestion.type === 'suggestion' && (\n <ifx-icon icon=\"search-16\" class=\"suggestion-icon suggestion-icon--suggestion\"></ifx-icon>\n )}\n <span class=\"suggestion-text\">\n <span class=\"suggestion-main-text\">\n {this.renderHighlightedText(suggestion.text, this.value)}\n </span>\n {suggestion.scope && (\n <span class=\"suggestion-scope\">– {suggestion.scope}</span>\n )}\n </span>\n\n {suggestion.resultCount !== undefined && suggestion.scope && (\n <span class=\"suggestion-count\">{suggestion.resultCount}</span>\n )}\n\n {/* Delete Button only for history entries */}\n {suggestion.type === 'history' && (\n <ifx-icon\n icon=\"cross16\"\n class=\"suggestion-delete-icon\"\n role=\"button\"\n tabindex=\"0\"\n aria-label={`${this.historyDeleteAriaLabel}: ${suggestion.text}`}\n onClick={(event) => this.handleHistoryDelete(event, suggestion.text)}\n onKeyDown={(event) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.handleHistoryDelete(event, suggestion.text);\n }\n }}\n ></ifx-icon>\n )}\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n );\n }\n\n getSizeClass() {\n return `${this.size}` === \"s\"\n ? \"search-field__wrapper-s\"\n : \"\";\n }\n\n getWrapperClassNames() {\n return classNames(\n `search-field__wrapper`,\n `search-field__wrapper ${this.getSizeClass()}`,\n `${this.isFocused ? 'focused' : \"\"}`,\n `${this.showDropdown ? 'dropdown-open' : \"\"}`,\n `${this.disabled ? 'disabled' : \"\"}`\n );\n }\n\n getSuggestionClassNames(index: number) {\n return classNames(\n 'suggestion-item',\n {\n 'suggestion-item--selected': index === this.selectedSuggestionIndex,\n 'suggestion-item--history': this.filteredSuggestions[index]?.type === 'history'\n }\n );\n }\n}\n"],"version":3}
@@ -25,21 +25,21 @@ const Checkbox = class {
25
25
  handleCheckbox() {
26
26
  if (!this.disabled) {
27
27
  if (!this.inputElement.indeterminate) {
28
- this.checked = !this.checked;
28
+ this.internalChecked = !this.internalChecked;
29
29
  }
30
- this.ifxChange.emit(this.checked);
30
+ this.ifxChange.emit(this.internalChecked);
31
31
  }
32
32
  }
33
33
  async isChecked() {
34
- return this.checked;
34
+ return this.internalChecked;
35
35
  }
36
36
  async toggleCheckedState(newVal) {
37
- this.checked = newVal;
37
+ this.internalChecked = newVal;
38
38
  }
39
39
  valueChanged(newValue, oldValue) {
40
40
  if (newValue !== oldValue) {
41
- this.checked = newValue;
42
- this.inputElement.checked = this.checked; // update the checkbox's checked property
41
+ this.internalChecked = newValue;
42
+ this.inputElement.checked = this.internalChecked; // update the checkbox's checked property
43
43
  }
44
44
  }
45
45
  errorChanged(newValue, oldValue) {
@@ -61,7 +61,7 @@ const Checkbox = class {
61
61
  }
62
62
  }
63
63
  componentWillLoad() {
64
- this.checked = this.checked;
64
+ this.internalChecked = this.checked;
65
65
  this.internalIndeterminate = this.indeterminate;
66
66
  }
67
67
  async componentDidLoad() {
@@ -82,14 +82,14 @@ const Checkbox = class {
82
82
  // }
83
83
  getCheckedClassName() {
84
84
  if (this.error) {
85
- if (this.checked) {
85
+ if (this.internalChecked) {
86
86
  return "checked error";
87
87
  }
88
88
  else {
89
89
  return "error";
90
90
  }
91
91
  }
92
- else if (this.checked) {
92
+ else if (this.internalChecked) {
93
93
  return "checked";
94
94
  }
95
95
  else
@@ -101,12 +101,12 @@ const Checkbox = class {
101
101
  if (slot) {
102
102
  hasSlot = true;
103
103
  }
104
- return (h("div", { key: 'd9c936d5f0500623a3f0307dd590a4ac2123a19a', class: "checkbox__container" }, h("input", { key: '2117b8dc34ec289901cadd51fb761ca3543b5705', type: "checkbox", hidden: true, ref: (el) => (this.inputElement = el), checked: this.checked, onChange: this.handleCheckbox.bind(this), id: 'checkbox', value: `${this.value}`, disabled: this.disabled ? true : undefined }), h("div", { key: '16297e2911b9fb6220a11f19f601224bde8afece', tabindex: "0", onClick: this.handleCheckbox.bind(this), onKeyDown: this.handleKeydown.bind(this), role: "checkbox", "aria-checked": this.indeterminate ? 'mixed' : this.checked.toString(), "aria-disabled": this.disabled, "aria-labelledby": "label", class: `checkbox__wrapper
104
+ return (h("div", { key: '6605cecca0fc9ea377620c93c411747c6103d0fc', class: "checkbox__container" }, h("input", { key: 'e28753294d821fdc066f64e99295bb6ead4be86d', type: "checkbox", hidden: true, ref: (el) => (this.inputElement = el), checked: this.internalChecked, onChange: this.handleCheckbox.bind(this), id: 'checkbox', value: `${this.value}`, disabled: this.disabled ? true : undefined }), h("div", { key: 'ff14245dcd1ff6285ec153591b52ffa3c3f06358', tabindex: "0", onClick: this.handleCheckbox.bind(this), onKeyDown: this.handleKeydown.bind(this), role: "checkbox", "aria-checked": this.indeterminate ? 'mixed' : this.internalChecked.toString(), "aria-disabled": this.disabled, "aria-labelledby": "label", class: `checkbox__wrapper
105
105
  ${this.getCheckedClassName()}
106
106
  ${this.size === "m" ? "checkbox-m" : ""}
107
107
  ${this.indeterminate ? 'indeterminate' : ""}
108
- ${this.disabled ? 'disabled' : ""}` }, this.checked && !this.internalIndeterminate && h("ifx-icon", { key: '80877be3f4eac9d49cfbfe3c34770fbfc794d7fc', icon: "check-16", "aria-hidden": "true" })), hasSlot &&
109
- h("div", { key: '8da41207fe96fdb7208cc9a9762c28307872835a', id: "label", class: `label ${this.size === "m" ? "label-m" : ""} ${this.disabled ? 'disabled' : ""} `, onClick: this.handleCheckbox.bind(this) }, h("slot", { key: '6899a7387127c70b8199ec53642261462facc127' }))));
108
+ ${this.disabled ? 'disabled' : ""}` }, this.internalChecked && !this.internalIndeterminate && h("ifx-icon", { key: '13e9e197e4375548b34a597c007ddf6866ad5e05', icon: "check-16", "aria-hidden": "true" })), hasSlot &&
109
+ h("div", { key: '8161ca9223da4df88bc82eb9d26989df68cedc19', id: "label", class: `label ${this.size === "m" ? "label-m" : ""} ${this.disabled ? 'disabled' : ""} `, onClick: this.handleCheckbox.bind(this) }, h("slot", { key: '29856bf622df0289f8803eb3c4a33f4738f50863' }))));
110
110
  }
111
111
  get el() { return getElement(this); }
112
112
  static get watchers() { return {
@@ -1 +1 @@
1
- {"version":3,"file":"ifx-checkbox.entry.js","sources":["src/components/checkbox/checkbox.scss?tag=ifx-checkbox&encapsulation=shadow","src/components/checkbox/checkbox.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n\n:host {\n display: inline-flex;\n vertical-align: top;\n}\n\n.checkbox__container {\n box-sizing: border-box;\n display: inline-flex;\n flex-direction: row;\n align-items: top;\n padding: 0px;\n gap: tokens.$ifxSpace100;\n font-family: tokens.$ifxFontFamilyBody;\n vertical-align: bottom;\n\n & .checkbox__wrapper {\n box-sizing: border-box;\n display: flex;\n position: relative; //needs to be added for the indeterminate state of the checkbox\n justify-content: center;\n align-items: center;\n width: tokens.$ifxSize250;\n height: tokens.$ifxSize250;\n background-color: tokens.$ifxColorBaseWhite;\n border: 1px solid tokens.$ifxColorEngineering500;\n border-radius: tokens.$ifxBorderRadius12;\n flex: none;\n order: 0;\n flex-grow: 0;\n align-self: flex-start;\n\n &.checkbox-m {\n height: tokens.$ifxSize300;\n width: tokens.$ifxSize300;\n }\n\n &.error {\n border-color: tokens.$ifxColorRed500;\n }\n\n &:focus-visible {\n border: 1px solid tokens.$ifxColorEngineering500;\n outline: 2px solid tokens.$ifxColorOcean500;\n outline-offset: 2px;\n }\n\n &:hover {\n background-color: tokens.$ifxColorEngineering200;\n border: 1px solid tokens.$ifxColorEngineering500;\n border-radius: tokens.$ifxBorderRadius12;\n flex: none;\n order: 0;\n flex-grow: 0;\n }\n\n &.disabled {\n background-color: tokens.$ifxColorEngineering300;;\n border-color: tokens.$ifxColorEngineering300;;\n border-radius: tokens.$ifxBorderRadius12;\n flex: none;\n order: 0;\n flex-grow: 0;\n }\n\n &.checked:not(.indeterminate) {\n background-color: tokens.$ifxColorOcean500;\n border-radius: tokens.$ifxBorderRadius12;\n border-color: tokens.$ifxColorBaseTransparent;\n flex: none;\n order: 0;\n flex-grow: 0;\n color: tokens.$ifxColorBaseWhite;\n\n &.error {\n background-color: tokens.$ifxColorRed500;\n }\n\n &:focus-visible {\n border: 1px solid transparent;\n outline: 2px solid #0A8276;\n outline-offset: 2px;\n }\n\n &:hover {\n background-color: tokens.$ifxColorOcean500;\n border-radius: tokens.$ifxBorderRadius12;\n flex: none;\n order: 0;\n flex-grow: 0;\n }\n\n &.disabled {\n background: tokens.$ifxColorEngineering300;;\n border-radius: tokens.$ifxBorderRadius12;\n flex: none;\n order: 0;\n flex-grow: 0;\n }\n }\n\n &.indeterminate {\n &:before {\n content: \"\";\n display: block;\n width: 70%; // Adjust as needed for the width of the minus sign\n height: 2px; // Adjust for thickness of the minus sign\n background-color: tokens.$ifxColorOcean600; // Color of the minus sign\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n\n }\n\n & .label {\n font-style: normal;\n font-weight: 400;\n font-size: tokens.$ifxFontSizeS;\n line-height: tokens.$ifxLineHeightS;\n color: tokens.$ifxColorBaseBlack;\n overflow-wrap: break-word;\n word-wrap: break-word;\n word-break: break-all;\n max-width: 100%;\n\n &.label-m {\n font-size: tokens.$ifxFontSizeM;\n line-height: tokens.$ifxLineHeightM;\n }\n\n &.disabled {\n color: tokens.$ifxColorEngineering300;\n }\n }\n\n & .checkbox__wrapper,\n & .label {\n &:hover {\n cursor: pointer;\n }\n }\n}","import { Component, h, Prop, Element, State, Event, EventEmitter, Watch, Method, AttachInternals } from '@stencil/core';\nimport { trackComponent } from '../../global/utils/tracking';\nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\n\n@Component({\n tag: 'ifx-checkbox',\n styleUrl: 'checkbox.scss',\n shadow: true,\n // formAssociated: true\n})\n\nexport class Checkbox {\n private inputElement: HTMLInputElement;\n\n @Element() el;\n @Prop() disabled: boolean = false;\n @Prop({ mutable: true }) checked: boolean = false;\n @Prop() error: boolean = false;\n @Prop() size: string = 'm';\n @Prop() indeterminate: boolean = false;\n @Prop() value: string;\n @State() internalIndeterminate: boolean;\n\n @AttachInternals() internals: ElementInternals;\n\n @Event() ifxChange: EventEmitter;\n @Event({ bubbles: true, composed: true }) ifxError: EventEmitter;\n\n handleCheckbox() {\n if (!this.disabled) {\n if (!this.inputElement.indeterminate) {\n this.checked = !this.checked;\n } \n if (this.checked && !this.internalIndeterminate) {\n if (this.value !== undefined) {\n //this.internals.setFormValue(this.value);\n } else {\n //this.internals.setFormValue(\"on\")\n }\n } else {\n //this.internals.setFormValue(null)\n }\n this.ifxChange.emit(this.checked);\n }\n }\n\n @Method()\n async isChecked(): Promise<boolean> {\n return this.checked;\n }\n\n @Method()\n async toggleCheckedState(newVal: boolean) {\n this.checked = newVal;\n }\n\n @Watch('checked')\n valueChanged(newValue: boolean, oldValue: boolean) {\n if (newValue !== oldValue) {\n this.checked = newValue;\n this.inputElement.checked = this.checked; // update the checkbox's checked property\n }\n }\n\n @Watch('error')\n errorChanged(newValue: boolean, oldValue: boolean) {\n if (newValue !== oldValue) {\n this.ifxError.emit(newValue);\n }\n }\n\n @Watch('indeterminate')\n indeterminateChanged(newValue: boolean, oldValue: boolean) {\n if (newValue !== oldValue) {\n this.internalIndeterminate = newValue;\n this.inputElement.indeterminate = this.internalIndeterminate; // update the checkbox's indeterminate property\n }\n }\n\n handleKeydown(event) {\n // Keycode 32 corresponds to the Space key, 13 corresponds to the Enter key\n if (event.keyCode === 32 || event.keyCode === 13) {\n this.handleCheckbox();\n event.preventDefault(); // prevent the default action when space or enter is pressed\n }\n }\n\n componentWillLoad() {\n this.checked = this.checked;\n this.internalIndeterminate = this.indeterminate;\n }\n\n async componentDidLoad() { \n if(!isNestedInIfxComponent(this.el)) { \n const framework = detectFramework();\n trackComponent('ifx-checkbox', await framework)\n }\n }\n\n componentDidRender() {\n this.inputElement.indeterminate = this.internalIndeterminate;\n }\n\n /**\n * Callback for form association.\n * Called whenever the form is reset.\n */\n // formResetCallback() {\n // this.internals.setFormValue(null);\n // }\n\n getCheckedClassName() {\n if (this.error) {\n if (this.checked) {\n return \"checked error\"\n } else {\n return \"error\"\n }\n } else if (this.checked) {\n return \"checked\";\n } else return \"\"\n }\n\n render() {\n const slot = this.el.innerHTML;\n let hasSlot = false;\n if (slot) {\n hasSlot = true;\n }\n return (\n <div class=\"checkbox__container\">\n <input\n type=\"checkbox\"\n hidden\n ref={(el) => (this.inputElement = el)}\n checked={this.checked}\n onChange={this.handleCheckbox.bind(this)} // Listen for changes here\n id='checkbox'\n value={`${this.value}`}\n disabled={this.disabled ? true : undefined}\n />\n <div\n tabindex=\"0\"\n onClick={this.handleCheckbox.bind(this)}\n onKeyDown={this.handleKeydown.bind(this)}\n role=\"checkbox\"\n aria-checked={this.indeterminate ? 'mixed' : this.checked.toString()}\n aria-disabled={this.disabled}\n aria-labelledby=\"label\"\n class={`checkbox__wrapper \n ${this.getCheckedClassName()}\n ${this.size === \"m\" ? \"checkbox-m\" : \"\"}\n ${this.indeterminate ? 'indeterminate' : \"\"}\n ${this.disabled ? 'disabled' : \"\"}`}\n >\n {this.checked && !this.internalIndeterminate && <ifx-icon icon=\"check-16\" aria-hidden=\"true\"></ifx-icon>}\n </div>\n {hasSlot &&\n <div id=\"label\" class={`label ${this.size === \"m\" ? \"label-m\" : \"\"} ${this.disabled ? 'disabled' : \"\"} `} onClick={this.handleCheckbox.bind(this)}>\n <slot />\n </div>}\n </div>\n );\n }\n}"],"names":[],"mappings":";;;;AAAA,MAAM,WAAW,GAAG,m1EAAm1E;;MCY11E,QAAQ,GAAA,MAAA;AAPrB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;;;;;AAWU,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AACR,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;AACzC,QAAA,IAAK,CAAA,KAAA,GAAY,KAAK;AACtB,QAAA,IAAI,CAAA,IAAA,GAAW,G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O,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAA,EAC/I,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACJ,CACJ;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ifx-checkbox.entry.js","sources":["src/components/checkbox/checkbox.scss?tag=ifx-checkbox&encapsulation=shadow","src/components/checkbox/checkbox.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n\n:host {\n display: inline-flex;\n vertical-align: top;\n}\n\n.checkbox__container {\n box-sizing: border-box;\n display: inline-flex;\n flex-direction: row;\n align-items: top;\n padding: 0px;\n gap: tokens.$ifxSpace100;\n font-family: tokens.$ifxFontFamilyBody;\n vertical-align: bottom;\n\n & .checkbox__wrapper {\n box-sizing: border-box;\n display: flex;\n position: relative; //needs to be added for the indeterminate state of the checkbox\n justify-content: center;\n align-items: center;\n width: tokens.$ifxSize250;\n height: tokens.$ifxSize250;\n background-color: tokens.$ifxColorBaseWhite;\n border: 1px solid tokens.$ifxColorEngineering500;\n border-radius: tokens.$ifxBorderRadius12;\n flex: none;\n order: 0;\n flex-grow: 0;\n align-self: flex-start;\n\n &.checkbox-m {\n height: tokens.$ifxSize300;\n width: tokens.$ifxSize300;\n }\n\n &.error {\n border-color: tokens.$ifxColorRed500;\n }\n\n &:focus-visible {\n border: 1px solid tokens.$ifxColorEngineering500;\n outline: 2px solid tokens.$ifxColorOcean500;\n outline-offset: 2px;\n }\n\n &:hover {\n background-color: tokens.$ifxColorEngineering200;\n border: 1px solid tokens.$ifxColorEngineering500;\n border-radius: tokens.$ifxBorderRadius12;\n flex: none;\n order: 0;\n flex-grow: 0;\n }\n\n &.disabled {\n background-color: tokens.$ifxColorEngineering300;;\n border-color: tokens.$ifxColorEngineering300;;\n border-radius: tokens.$ifxBorderRadius12;\n flex: none;\n order: 0;\n flex-grow: 0;\n }\n\n &.checked:not(.indeterminate) {\n background-color: tokens.$ifxColorOcean500;\n border-radius: tokens.$ifxBorderRadius12;\n border-color: tokens.$ifxColorBaseTransparent;\n flex: none;\n order: 0;\n flex-grow: 0;\n color: tokens.$ifxColorBaseWhite;\n\n &.error {\n background-color: tokens.$ifxColorRed500;\n }\n\n &:focus-visible {\n border: 1px solid transparent;\n outline: 2px solid #0A8276;\n outline-offset: 2px;\n }\n\n &:hover {\n background-color: tokens.$ifxColorOcean500;\n border-radius: tokens.$ifxBorderRadius12;\n flex: none;\n order: 0;\n flex-grow: 0;\n }\n\n &.disabled {\n background: tokens.$ifxColorEngineering300;;\n border-radius: tokens.$ifxBorderRadius12;\n flex: none;\n order: 0;\n flex-grow: 0;\n }\n }\n\n &.indeterminate {\n &:before {\n content: \"\";\n display: block;\n width: 70%; // Adjust as needed for the width of the minus sign\n height: 2px; // Adjust for thickness of the minus sign\n background-color: tokens.$ifxColorOcean600; // Color of the minus sign\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n\n }\n\n & .label {\n font-style: normal;\n font-weight: 400;\n font-size: tokens.$ifxFontSizeS;\n line-height: tokens.$ifxLineHeightS;\n color: tokens.$ifxColorBaseBlack;\n overflow-wrap: break-word;\n word-wrap: break-word;\n word-break: break-all;\n max-width: 100%;\n\n &.label-m {\n font-size: tokens.$ifxFontSizeM;\n line-height: tokens.$ifxLineHeightM;\n }\n\n &.disabled {\n color: tokens.$ifxColorEngineering300;\n }\n }\n\n & .checkbox__wrapper,\n & .label {\n &:hover {\n cursor: pointer;\n }\n }\n}","import { Component, h, Prop, Element, State, Event, EventEmitter, Watch, Method, AttachInternals } from '@stencil/core';\nimport { trackComponent } from '../../global/utils/tracking';\nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\n\n@Component({\n tag: 'ifx-checkbox',\n styleUrl: 'checkbox.scss',\n shadow: true,\n // formAssociated: true\n})\n\nexport class Checkbox {\n private inputElement: HTMLInputElement;\n\n @Element() el;\n @Prop() disabled: boolean = false;\n @Prop() checked: boolean = false;\n @Prop() error: boolean = false;\n @Prop() size: string = 'm';\n @Prop() indeterminate: boolean = false;\n @Prop() value: string;\n @State() internalChecked: boolean;\n @State() internalIndeterminate: boolean;\n\n @AttachInternals() internals: ElementInternals;\n\n @Event({ bubbles: true, composed: true }) ifxChange: EventEmitter;\n @Event({ bubbles: true, composed: true }) ifxError: EventEmitter;\n\n handleCheckbox() {\n if (!this.disabled) {\n if (!this.inputElement.indeterminate) {\n this.internalChecked = !this.internalChecked;\n } \n if (this.internalChecked && !this.internalIndeterminate) {\n if (this.value !== undefined) {\n //this.internals.setFormValue(this.value);\n } else {\n //this.internals.setFormValue(\"on\")\n }\n } else {\n //this.internals.setFormValue(null)\n }\n this.ifxChange.emit(this.internalChecked);\n }\n }\n\n @Method()\n async isChecked(): Promise<boolean> {\n return this.internalChecked;\n }\n\n @Method()\n async toggleCheckedState(newVal: boolean) {\n this.internalChecked = newVal;\n }\n\n @Watch('checked')\n valueChanged(newValue: boolean, oldValue: boolean) {\n if (newValue !== oldValue) {\n this.internalChecked = newValue;\n this.inputElement.checked = this.internalChecked; // update the checkbox's checked property\n }\n }\n\n @Watch('error')\n errorChanged(newValue: boolean, oldValue: boolean) {\n if (newValue !== oldValue) {\n this.ifxError.emit(newValue);\n }\n }\n\n @Watch('indeterminate')\n indeterminateChanged(newValue: boolean, oldValue: boolean) {\n if (newValue !== oldValue) {\n this.internalIndeterminate = newValue;\n this.inputElement.indeterminate = this.internalIndeterminate; // update the checkbox's indeterminate property\n }\n }\n\n handleKeydown(event) {\n // Keycode 32 corresponds to the Space key, 13 corresponds to the Enter key\n if (event.keyCode === 32 || event.keyCode === 13) {\n this.handleCheckbox();\n event.preventDefault(); // prevent the default action when space or enter is pressed\n }\n }\n\n componentWillLoad() {\n this.internalChecked = this.checked;\n this.internalIndeterminate = this.indeterminate;\n }\n\n async componentDidLoad() { \n if(!isNestedInIfxComponent(this.el)) { \n const framework = detectFramework();\n trackComponent('ifx-checkbox', await framework)\n }\n }\n\n componentDidRender() {\n this.inputElement.indeterminate = this.internalIndeterminate;\n }\n\n /**\n * Callback for form association.\n * Called whenever the form is reset.\n */\n // formResetCallback() {\n // this.internals.setFormValue(null);\n // }\n\n getCheckedClassName() {\n if (this.error) {\n if (this.internalChecked) {\n return \"checked error\"\n } else {\n return \"error\"\n }\n } else if (this.internalChecked) {\n return \"checked\";\n } else return \"\"\n }\n\n render() {\n const slot = this.el.innerHTML;\n let hasSlot = false;\n if (slot) {\n hasSlot = true;\n }\n return (\n <div class=\"checkbox__container\">\n <input\n type=\"checkbox\"\n hidden\n ref={(el) => (this.inputElement = el)}\n checked={this.internalChecked}\n onChange={this.handleCheckbox.bind(this)} // Listen for changes here\n id='checkbox'\n value={`${this.value}`}\n disabled={this.disabled ? true : undefined}\n />\n <div\n tabindex=\"0\"\n onClick={this.handleCheckbox.bind(this)}\n onKeyDown={this.handleKeydown.bind(this)}\n role=\"checkbox\"\n aria-checked={this.indeterminate ? 'mixed' : this.internalChecked.toString()}\n aria-disabled={this.disabled}\n aria-labelledby=\"label\"\n class={`checkbox__wrapper \n ${this.getCheckedClassName()}\n ${this.size === \"m\" ? \"checkbox-m\" : \"\"}\n ${this.indeterminate ? 'indeterminate' : \"\"}\n ${this.disabled ? 'disabled' : \"\"}`}\n >\n {this.internalChecked && !this.internalIndeterminate && <ifx-icon icon=\"check-16\" aria-hidden=\"true\"></ifx-icon>}\n </div>\n {hasSlot &&\n <div id=\"label\" class={`label ${this.size === \"m\" ? \"label-m\" : \"\"} ${this.disabled ? 'disabled' : \"\"} `} onClick={this.handleCheckbox.bind(this)}>\n <slot />\n </div>}\n </div>\n );\n }\n}"],"names":[],"mappings":";;;;AAAA,MAAM,WAAW,GAAG,m1EAAm1E;;MCY11E,QAAQ,GAAA,MAAA;AAPrB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;;;;;AAWU,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AACzB,Q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GAAG,GAAG,SAAS,GAAG,EAAE,CAAI,CAAA,EAAA,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,EAAE,CAAG,CAAA,CAAA,EAAE,OAAO,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAA,EAC/I,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACJ,CACJ;;;;;;;;;;;;;"}
@@ -377,32 +377,17 @@ const SearchField = class {
377
377
  this.showDeleteIconInternalState = false;
378
378
  }
379
379
  render() {
380
- // Debug: Check for Symbol values in suggestions
381
- this.filteredSuggestions.forEach((suggestion, index) => {
382
- if (typeof suggestion.id === 'symbol' || typeof suggestion.text === 'symbol' || typeof suggestion.scope === 'symbol') {
383
- // eslint-disable-next-line no-console
384
- console.warn('Symbol value detected in suggestion', { suggestion, index });
385
- }
386
- });
387
- return (h("div", { key: 'fa449752baf4a06c3160069d720db1bc4f63b69f', "aria-disabled": this.disabled, class: "search-field" }, h("div", { key: '91abbdb324e0f5d10a9916360b2576ddbe2073cc', class: this.getWrapperClassNames(), tabIndex: 1, onClick: () => this.focusInput() }, h("ifx-icon", { key: '80a75c095e19a85e03ea4d4cce872748079e43c8', icon: "search-16", class: "search-icon" }), h("input", { key: 'c9a56734a3056e581d88fe887f05bfd3f32ff566', ref: (el) => (this.inputElement = el), type: "text", autocomplete: String(this.autocomplete), onInput: () => this.handleInput(), onFocus: () => this.focusInput(), onBlur: () => this.blurInput(), placeholder: String(this.placeholder), disabled: this.disabled, maxlength: this.maxlength, value: String(this.value), role: "combobox", "aria-controls": this.showDropdown ? 'suggestions-dropdown' : undefined, "aria-expanded": this.showDropdown, "aria-autocomplete": "list", "aria-haspopup": "listbox", "aria-label": this.ariaLabel ? String(this.ariaLabel) : undefined, "aria-labelledby": this.ariaLabelledBy ? String(this.ariaLabelledBy) : undefined, "aria-describedby": this.ariaDescribedBy ? String(this.ariaDescribedBy) : undefined, "aria-owns": this.showDropdown ? 'suggestions-dropdown' : undefined, "aria-activedescendant": this.selectedSuggestionIndex >= 0 ? `suggestion-${this.selectedSuggestionIndex}` : undefined }), this.showDeleteIcon && this.showDeleteIconInternalState ? (h("ifx-icon", { icon: "cRemove16", class: "delete-icon", onClick: this.handleDelete, role: "button", tabIndex: 0, "aria-label": this.deleteIconAriaLabel ? String(this.deleteIconAriaLabel) : undefined, onKeyDown: (event) => {
380
+ return (h("div", { key: 'd355ec7cdbe980ea99e4238cf02d907ddd76d59b', "aria-disabled": this.disabled, "aria-value": this.value, class: 'search-field' }, h("div", { key: '2aa3d943caab35213ca10f071586c80358515f1c', class: this.getWrapperClassNames(), tabindex: 1, onClick: () => this.focusInput() }, h("ifx-icon", { key: 'eaa300dd0f8466a2396c55f3f2fffe9dcf5bbf44', icon: "search-16", class: "search-icon" }), h("input", { key: 'cce86ee892ec624fe8671d7567434ae5433b8702', ref: (el) => (this.inputElement = el), type: "text", autocomplete: this.autocomplete, onInput: () => this.handleInput(), onFocus: () => this.focusInput(), onBlur: () => this.blurInput(), placeholder: this.placeholder, disabled: this.disabled, maxlength: this.maxlength, value: this.value, role: "combobox", "aria-controls": this.showDropdown ? 'suggestions-dropdown' : undefined, "aria-expanded": this.showDropdown, "aria-autocomplete": "list", "aria-haspopup": "listbox", "aria-label": this.ariaLabel, "aria-labelledby": this.ariaLabelledBy, "aria-describedby": this.ariaDescribedBy, "aria-owns": this.showDropdown ? 'suggestions-dropdown' : undefined, "aria-activedescendant": this.selectedSuggestionIndex >= 0 ? `suggestion-${this.selectedSuggestionIndex}` : undefined }), this.showDeleteIcon && this.showDeleteIconInternalState ? (h("ifx-icon", { icon: "cRemove16", class: "delete-icon", onClick: this.handleDelete, role: "button", tabindex: "0", "aria-label": this.deleteIconAriaLabel, onKeyDown: (event) => {
388
381
  if (event.key === 'Enter' || event.key === ' ') {
389
382
  event.preventDefault();
390
383
  this.handleDelete();
391
384
  }
392
- } })) : null), this.showDropdown && this.filteredSuggestions.length > 0 && (h("div", { key: 'b8bad4f2efa77404ad6cb7d07530698befe103fd', ref: (el) => (this.dropdownElement = el), id: "suggestions-dropdown", class: "suggestions-dropdown", role: "listbox", "aria-label": this.dropdownAriaLabel ? String(this.dropdownAriaLabel) : undefined }, this.isShowingOnlyHistory() && (h("div", { key: 'fdc557afa120253e3d6765b16320eb6fee838a6c', class: "suggestions-header" }, this.historyHeaderText)), this.filteredSuggestions.map((suggestion, index) => {
393
- // Defensive string conversion for all dynamic attributes
394
- const suggestionId = typeof suggestion.id === 'symbol' ? String(suggestion.id) : String(suggestion.id);
395
- const suggestionText = typeof suggestion.text === 'symbol' ? String(suggestion.text) : String(suggestion.text);
396
- const suggestionScope = suggestion.scope !== undefined && suggestion.scope !== null ? String(suggestion.scope) : '';
397
- const suggestionResultCount = suggestion.resultCount !== undefined && suggestion.resultCount !== null ? String(suggestion.resultCount) : '';
398
- const ariaLabel = `${suggestion.type === 'history' ? this.historyItemAriaLabel : this.suggestionAriaLabel}: ${suggestionText}${suggestion.scope ? `, ${suggestionScope}` : ''}${suggestion.resultCount ? `, ${suggestionResultCount} results` : ''}`;
399
- return (h("div", { key: suggestionId, id: `suggestion-${index}`, class: this.getSuggestionClassNames(index), role: "option", "aria-selected": index === this.selectedSuggestionIndex, "aria-label": ariaLabel, onClick: () => this.selectSuggestion(suggestion), onMouseEnter: () => this.selectedSuggestionIndex = index }, h("div", { class: "suggestion-content" }, suggestion.type === 'history' && (h("ifx-icon", { icon: "history-16", class: "suggestion-icon suggestion-icon--history" })), suggestion.type === 'suggestion' && (h("ifx-icon", { icon: "search-16", class: "suggestion-icon suggestion-icon--suggestion" })), h("span", { class: "suggestion-text" }, h("span", { class: "suggestion-main-text" }, this.renderHighlightedText(suggestionText, this.value)), suggestion.scope && (h("span", { class: "suggestion-scope" }, "\u2013 ", suggestionScope))), suggestion.resultCount !== undefined && suggestion.scope && (h("span", { class: "suggestion-count" }, suggestionResultCount)), suggestion.type === 'history' && (h("ifx-icon", { icon: "cross16", class: "suggestion-delete-icon", role: "button", tabIndex: 0, "aria-label": `${this.historyDeleteAriaLabel ? String(this.historyDeleteAriaLabel) : ''}: ${suggestionText}`, onClick: (event) => this.handleHistoryDelete(event, suggestion.text), onKeyDown: (event) => {
400
- if (event.key === 'Enter' || event.key === ' ') {
401
- event.preventDefault();
402
- this.handleHistoryDelete(event, suggestion.text);
403
- }
404
- } })))));
405
- })))));
385
+ } })) : null), this.showDropdown && this.filteredSuggestions.length > 0 && (h("div", { key: 'd447e63087ac5b41d2109a16b8db37df4c9db860', ref: (el) => (this.dropdownElement = el), id: "suggestions-dropdown", class: "suggestions-dropdown", role: "listbox", "aria-label": this.dropdownAriaLabel }, this.isShowingOnlyHistory() && (h("div", { key: '6a4662d31fd8c755ec1ec9da4bb871750aa63a57', class: "suggestions-header" }, this.historyHeaderText)), this.filteredSuggestions.map((suggestion, index) => (h("div", { key: suggestion.id, id: `suggestion-${index}`, class: this.getSuggestionClassNames(index), role: "option", "aria-selected": index === this.selectedSuggestionIndex, "aria-label": `${suggestion.type === 'history' ? this.historyItemAriaLabel : this.suggestionAriaLabel}: ${suggestion.text}${suggestion.scope ? `, ${suggestion.scope}` : ''}${suggestion.resultCount ? `, ${suggestion.resultCount} results` : ''}`, onClick: () => this.selectSuggestion(suggestion), onMouseEnter: () => this.selectedSuggestionIndex = index }, h("div", { class: "suggestion-content" }, suggestion.type === 'history' && (h("ifx-icon", { icon: "history-16", class: "suggestion-icon suggestion-icon--history" })), suggestion.type === 'suggestion' && (h("ifx-icon", { icon: "search-16", class: "suggestion-icon suggestion-icon--suggestion" })), h("span", { class: "suggestion-text" }, h("span", { class: "suggestion-main-text" }, this.renderHighlightedText(suggestion.text, this.value)), suggestion.scope && (h("span", { class: "suggestion-scope" }, "\u2013 ", suggestion.scope))), suggestion.resultCount !== undefined && suggestion.scope && (h("span", { class: "suggestion-count" }, suggestion.resultCount)), suggestion.type === 'history' && (h("ifx-icon", { icon: "cross16", class: "suggestion-delete-icon", role: "button", tabindex: "0", "aria-label": `${this.historyDeleteAriaLabel}: ${suggestion.text}`, onClick: (event) => this.handleHistoryDelete(event, suggestion.text), onKeyDown: (event) => {
386
+ if (event.key === 'Enter' || event.key === ' ') {
387
+ event.preventDefault();
388
+ this.handleHistoryDelete(event, suggestion.text);
389
+ }
390
+ } }))))))))));
406
391
  }
407
392
  getSizeClass() {
408
393
  return `${this.size}` === "s"