@infineon/infineon-design-system-stencil 37.2.0 → 38.0.0--canary.1954.2a8a94657fa3dfa88101a47e26e0cd0e74185867.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 (213) hide show
  1. package/dist/cjs/ifx-alert_2.cjs.entry.js +1 -1
  2. package/dist/cjs/ifx-basic-table.cjs.entry.js +1 -1
  3. package/dist/cjs/ifx-faq.cjs.entry.js +1 -1
  4. package/dist/cjs/ifx-filter-accordion.cjs.entry.js +2 -2
  5. package/dist/cjs/ifx-filter-bar.cjs.entry.js +1 -1
  6. package/dist/cjs/ifx-filter-search.cjs.entry.js +1 -1
  7. package/dist/cjs/ifx-filter-type-group.cjs.entry.js +1 -1
  8. package/dist/cjs/ifx-list-entry.cjs.entry.js +1 -1
  9. package/dist/cjs/ifx-multiselect_2.cjs.entry.js +4 -4
  10. package/dist/cjs/ifx-search-field.cjs.entry.js +349 -12
  11. package/dist/cjs/ifx-search-field.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ifx-segment.cjs.entry.js +1 -1
  13. package/dist/cjs/ifx-segmented-control.cjs.entry.js +2 -2
  14. package/dist/cjs/ifx-select.cjs.entry.js +2 -2
  15. package/dist/cjs/ifx-slider.cjs.entry.js +2 -2
  16. package/dist/cjs/ifx-spinner_2.cjs.entry.js +6 -6
  17. package/dist/cjs/ifx-status.cjs.entry.js +1 -1
  18. package/dist/cjs/ifx-step.cjs.entry.js +4 -4
  19. package/dist/cjs/ifx-stepper.cjs.entry.js +2 -2
  20. package/dist/cjs/ifx-switch.cjs.entry.js +1 -1
  21. package/dist/cjs/ifx-tab.cjs.entry.js +1 -1
  22. package/dist/cjs/ifx-table.cjs.entry.js +2 -2
  23. package/dist/cjs/ifx-tabs.cjs.entry.js +2 -2
  24. package/dist/cjs/ifx-tag.cjs.entry.js +1 -1
  25. package/dist/cjs/ifx-templates-ui.cjs.entry.js +1 -1
  26. package/dist/cjs/ifx-textarea.cjs.entry.js +1 -1
  27. package/dist/cjs/ifx-tooltip.cjs.entry.js +4 -4
  28. package/dist/cjs/ifx-tree-view-item.cjs.entry.js +2 -2
  29. package/dist/cjs/ifx-tree-view.cjs.entry.js +1 -1
  30. package/dist/cjs/infineon-design-system-stencil.cjs.js +1 -1
  31. package/dist/cjs/loader.cjs.js +1 -1
  32. package/dist/collection/components/search-field/search-field.css +114 -0
  33. package/dist/collection/components/search-field/search-field.js +724 -17
  34. package/dist/collection/components/search-field/search-field.js.map +1 -1
  35. package/dist/collection/components/search-field/search-field.stories.js +378 -2
  36. package/dist/collection/components/search-field/search-field.stories.js.map +1 -1
  37. package/dist/collection/components/segmented-control/segment/segment.js +1 -1
  38. package/dist/collection/components/segmented-control/segmented-control.js +2 -2
  39. package/dist/collection/components/select/multi-select/multiselect-option.js +4 -4
  40. package/dist/collection/components/select/single-select/select.js +2 -2
  41. package/dist/collection/components/slider/slider.js +2 -2
  42. package/dist/collection/components/spinner/spinner.js +2 -2
  43. package/dist/collection/components/status/status.js +1 -1
  44. package/dist/collection/components/stepper/step/step.js +4 -4
  45. package/dist/collection/components/stepper/stepper.js +2 -2
  46. package/dist/collection/components/switch/switch.js +1 -1
  47. package/dist/collection/components/table-advanced-version/filter-bar/filter-bar.js +1 -1
  48. package/dist/collection/components/table-advanced-version/filter-type-group/filter-accordion/filter-accordion.js +2 -2
  49. package/dist/collection/components/table-advanced-version/filter-type-group/filter-search/filter-search.js +1 -1
  50. package/dist/collection/components/table-advanced-version/filter-type-group/filter-type-group.js +1 -1
  51. package/dist/collection/components/table-advanced-version/list/list-entry/list-entry.js +1 -1
  52. package/dist/collection/components/table-advanced-version/table.js +2 -2
  53. package/dist/collection/components/table-basic-version/table.js +1 -1
  54. package/dist/collection/components/tabs/tab.js +1 -1
  55. package/dist/collection/components/tabs/tabs.js +2 -2
  56. package/dist/collection/components/tag/tag.js +1 -1
  57. package/dist/collection/components/templates/template/template.js +1 -1
  58. package/dist/collection/components/templates/templates-ui/templates-ui.js +1 -1
  59. package/dist/collection/components/text-field/text-field.js +4 -4
  60. package/dist/collection/components/textarea/textarea.js +1 -1
  61. package/dist/collection/components/tooltip/tooltip.js +4 -4
  62. package/dist/collection/components/tree-view/tree-view-item.js +2 -2
  63. package/dist/collection/components/tree-view/tree-view.js +1 -1
  64. package/dist/collection/stories/setup-and-installation/faq/faq.js +1 -1
  65. package/dist/components/ifx-basic-table.js +1 -1
  66. package/dist/components/ifx-faq.js +1 -1
  67. package/dist/components/ifx-filter-accordion.js +2 -2
  68. package/dist/components/ifx-filter-bar.js +1 -1
  69. package/dist/components/ifx-filter-search.js +2 -2
  70. package/dist/components/ifx-filter-type-group.js +1 -1
  71. package/dist/components/ifx-icons-preview.js +1 -1
  72. package/dist/components/ifx-list-entry.js +1 -1
  73. package/dist/components/ifx-multiselect-option.js +1 -1
  74. package/dist/components/ifx-multiselect.js +1 -1
  75. package/dist/components/ifx-pagination.js +1 -1
  76. package/dist/components/ifx-search-bar.js +1 -1
  77. package/dist/components/ifx-search-field.js +1 -1
  78. package/dist/components/ifx-segment.js +1 -1
  79. package/dist/components/ifx-segmented-control.js +2 -2
  80. package/dist/components/ifx-select.js +1 -1
  81. package/dist/components/ifx-set-filter.js +5 -5
  82. package/dist/components/ifx-slider.js +2 -2
  83. package/dist/components/ifx-spinner.js +1 -1
  84. package/dist/components/ifx-status.js +1 -1
  85. package/dist/components/ifx-step.js +4 -4
  86. package/dist/components/ifx-stepper.js +2 -2
  87. package/dist/components/ifx-switch.js +1 -1
  88. package/dist/components/ifx-tab.js +1 -1
  89. package/dist/components/ifx-table.js +4 -4
  90. package/dist/components/ifx-tabs.js +2 -2
  91. package/dist/components/ifx-tag.js +1 -1
  92. package/dist/components/ifx-template.js +1 -1
  93. package/dist/components/ifx-templates-ui.js +4 -4
  94. package/dist/components/ifx-text-field.js +1 -1
  95. package/dist/components/ifx-textarea.js +1 -1
  96. package/dist/components/ifx-tooltip.js +4 -4
  97. package/dist/components/ifx-tree-view-item.js +2 -2
  98. package/dist/components/ifx-tree-view.js +1 -1
  99. package/dist/components/{p-31696649.js → p-0218abcd.js} +5 -5
  100. package/dist/components/{p-31696649.js.map → p-0218abcd.js.map} +1 -1
  101. package/dist/components/{p-6a9e1fb6.js → p-122e79fc.js} +3 -3
  102. package/dist/components/{p-6a9e1fb6.js.map → p-122e79fc.js.map} +1 -1
  103. package/dist/components/{p-da273970.js → p-43438af8.js} +4 -4
  104. package/dist/components/{p-da273970.js.map → p-43438af8.js.map} +1 -1
  105. package/dist/components/{p-bfc8b82f.js → p-5853a3c8.js} +2 -2
  106. package/dist/components/{p-bfc8b82f.js.map → p-5853a3c8.js.map} +1 -1
  107. package/dist/components/{p-cb92983f.js → p-96237222.js} +3 -3
  108. package/dist/components/{p-cb92983f.js.map → p-96237222.js.map} +1 -1
  109. package/dist/components/{p-8cbf32a7.js → p-c601034d.js} +2 -2
  110. package/dist/components/{p-8cbf32a7.js.map → p-c601034d.js.map} +1 -1
  111. package/dist/components/p-c7297dfd.js +471 -0
  112. package/dist/components/p-c7297dfd.js.map +1 -0
  113. package/dist/components/{p-c5f7a0e2.js → p-f9c7ad2e.js} +5 -5
  114. package/dist/components/{p-c5f7a0e2.js.map → p-f9c7ad2e.js.map} +1 -1
  115. package/dist/esm/ifx-alert_2.entry.js +1 -1
  116. package/dist/esm/ifx-basic-table.entry.js +1 -1
  117. package/dist/esm/ifx-faq.entry.js +1 -1
  118. package/dist/esm/ifx-filter-accordion.entry.js +2 -2
  119. package/dist/esm/ifx-filter-bar.entry.js +1 -1
  120. package/dist/esm/ifx-filter-search.entry.js +1 -1
  121. package/dist/esm/ifx-filter-type-group.entry.js +1 -1
  122. package/dist/esm/ifx-list-entry.entry.js +1 -1
  123. package/dist/esm/ifx-multiselect_2.entry.js +4 -4
  124. package/dist/esm/ifx-search-field.entry.js +349 -12
  125. package/dist/esm/ifx-search-field.entry.js.map +1 -1
  126. package/dist/esm/ifx-segment.entry.js +1 -1
  127. package/dist/esm/ifx-segmented-control.entry.js +2 -2
  128. package/dist/esm/ifx-select.entry.js +2 -2
  129. package/dist/esm/ifx-slider.entry.js +2 -2
  130. package/dist/esm/ifx-spinner_2.entry.js +6 -6
  131. package/dist/esm/ifx-status.entry.js +1 -1
  132. package/dist/esm/ifx-step.entry.js +4 -4
  133. package/dist/esm/ifx-stepper.entry.js +2 -2
  134. package/dist/esm/ifx-switch.entry.js +1 -1
  135. package/dist/esm/ifx-tab.entry.js +1 -1
  136. package/dist/esm/ifx-table.entry.js +2 -2
  137. package/dist/esm/ifx-tabs.entry.js +2 -2
  138. package/dist/esm/ifx-tag.entry.js +1 -1
  139. package/dist/esm/ifx-templates-ui.entry.js +1 -1
  140. package/dist/esm/ifx-textarea.entry.js +1 -1
  141. package/dist/esm/ifx-tooltip.entry.js +4 -4
  142. package/dist/esm/ifx-tree-view-item.entry.js +2 -2
  143. package/dist/esm/ifx-tree-view.entry.js +1 -1
  144. package/dist/esm/infineon-design-system-stencil.js +1 -1
  145. package/dist/esm/loader.js +1 -1
  146. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
  147. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js.map +1 -1
  148. package/dist/infineon-design-system-stencil/{p-7adee2dd.entry.js → p-0cbdafca.entry.js} +2 -2
  149. package/dist/infineon-design-system-stencil/{p-2d7159a9.entry.js → p-10ef115a.entry.js} +2 -2
  150. package/dist/infineon-design-system-stencil/{p-f544fb03.entry.js → p-1e7646b7.entry.js} +2 -2
  151. package/dist/infineon-design-system-stencil/{p-0c1c831c.entry.js → p-253ea47f.entry.js} +2 -2
  152. package/dist/infineon-design-system-stencil/{p-09a8d63d.entry.js → p-273a91b3.entry.js} +2 -2
  153. package/dist/infineon-design-system-stencil/{p-3d037fa4.entry.js → p-33b46161.entry.js} +2 -2
  154. package/dist/infineon-design-system-stencil/{p-a2a44fbe.entry.js → p-37be5d65.entry.js} +2 -2
  155. package/dist/infineon-design-system-stencil/{p-18a81f5f.entry.js → p-3bce1f22.entry.js} +2 -2
  156. package/dist/infineon-design-system-stencil/{p-e5091718.entry.js → p-3dd8bdf4.entry.js} +2 -2
  157. package/dist/infineon-design-system-stencil/{p-6c2698a3.entry.js → p-6ec8258a.entry.js} +2 -2
  158. package/dist/infineon-design-system-stencil/{p-71e34467.entry.js → p-706a8ead.entry.js} +2 -2
  159. package/dist/infineon-design-system-stencil/p-7705c159.entry.js +2 -0
  160. package/dist/infineon-design-system-stencil/{p-1e0d789f.entry.js → p-8e838717.entry.js} +2 -2
  161. package/dist/infineon-design-system-stencil/{p-4eda4ef3.entry.js → p-8eab207b.entry.js} +2 -2
  162. package/dist/infineon-design-system-stencil/{p-8ecae73b.entry.js → p-9be0905e.entry.js} +2 -2
  163. package/dist/infineon-design-system-stencil/{p-90efbef9.entry.js → p-9cfe025d.entry.js} +2 -2
  164. package/dist/infineon-design-system-stencil/{p-bca4f6c8.entry.js → p-b393c1e7.entry.js} +2 -2
  165. package/dist/infineon-design-system-stencil/p-b83380f8.entry.js +2 -0
  166. package/dist/infineon-design-system-stencil/{p-e172e81c.entry.js.map → p-b83380f8.entry.js.map} +1 -1
  167. package/dist/infineon-design-system-stencil/{p-04d8ea38.entry.js → p-caef0e47.entry.js} +2 -2
  168. package/dist/infineon-design-system-stencil/{p-36dcebde.entry.js → p-d3d6a562.entry.js} +2 -2
  169. package/dist/infineon-design-system-stencil/p-d4b4107a.entry.js +2 -0
  170. package/dist/infineon-design-system-stencil/p-d4b4107a.entry.js.map +1 -0
  171. package/dist/infineon-design-system-stencil/{p-c36df3ce.entry.js → p-d660ebea.entry.js} +2 -2
  172. package/dist/infineon-design-system-stencil/{p-59c3ac10.entry.js → p-d8a57524.entry.js} +2 -2
  173. package/dist/infineon-design-system-stencil/{p-84d4d6a1.entry.js → p-e196740d.entry.js} +2 -2
  174. package/dist/infineon-design-system-stencil/{p-2e931b0d.entry.js → p-e45d85fc.entry.js} +2 -2
  175. package/dist/infineon-design-system-stencil/{p-437973f5.entry.js → p-e61d3fc6.entry.js} +2 -2
  176. package/dist/infineon-design-system-stencil/{p-c7e86c7c.entry.js → p-ed30fb98.entry.js} +2 -2
  177. package/dist/infineon-design-system-stencil/{p-05d9aa1f.entry.js → p-f84af2e3.entry.js} +2 -2
  178. package/dist/types/components/search-field/search-field.d.ts +53 -2
  179. package/dist/types/components/search-field/search-field.stories.d.ts +191 -0
  180. package/dist/types/components.d.ts +42 -2
  181. package/package.json +1 -1
  182. package/dist/components/p-c6e5f94d.js +0 -115
  183. package/dist/components/p-c6e5f94d.js.map +0 -1
  184. package/dist/infineon-design-system-stencil/p-c164c83b.entry.js +0 -2
  185. package/dist/infineon-design-system-stencil/p-c164c83b.entry.js.map +0 -1
  186. package/dist/infineon-design-system-stencil/p-e172e81c.entry.js +0 -2
  187. package/dist/infineon-design-system-stencil/p-e571c002.entry.js +0 -2
  188. /package/dist/infineon-design-system-stencil/{p-7adee2dd.entry.js.map → p-0cbdafca.entry.js.map} +0 -0
  189. /package/dist/infineon-design-system-stencil/{p-2d7159a9.entry.js.map → p-10ef115a.entry.js.map} +0 -0
  190. /package/dist/infineon-design-system-stencil/{p-f544fb03.entry.js.map → p-1e7646b7.entry.js.map} +0 -0
  191. /package/dist/infineon-design-system-stencil/{p-0c1c831c.entry.js.map → p-253ea47f.entry.js.map} +0 -0
  192. /package/dist/infineon-design-system-stencil/{p-09a8d63d.entry.js.map → p-273a91b3.entry.js.map} +0 -0
  193. /package/dist/infineon-design-system-stencil/{p-3d037fa4.entry.js.map → p-33b46161.entry.js.map} +0 -0
  194. /package/dist/infineon-design-system-stencil/{p-a2a44fbe.entry.js.map → p-37be5d65.entry.js.map} +0 -0
  195. /package/dist/infineon-design-system-stencil/{p-18a81f5f.entry.js.map → p-3bce1f22.entry.js.map} +0 -0
  196. /package/dist/infineon-design-system-stencil/{p-e5091718.entry.js.map → p-3dd8bdf4.entry.js.map} +0 -0
  197. /package/dist/infineon-design-system-stencil/{p-6c2698a3.entry.js.map → p-6ec8258a.entry.js.map} +0 -0
  198. /package/dist/infineon-design-system-stencil/{p-71e34467.entry.js.map → p-706a8ead.entry.js.map} +0 -0
  199. /package/dist/infineon-design-system-stencil/{p-e571c002.entry.js.map → p-7705c159.entry.js.map} +0 -0
  200. /package/dist/infineon-design-system-stencil/{p-1e0d789f.entry.js.map → p-8e838717.entry.js.map} +0 -0
  201. /package/dist/infineon-design-system-stencil/{p-4eda4ef3.entry.js.map → p-8eab207b.entry.js.map} +0 -0
  202. /package/dist/infineon-design-system-stencil/{p-8ecae73b.entry.js.map → p-9be0905e.entry.js.map} +0 -0
  203. /package/dist/infineon-design-system-stencil/{p-90efbef9.entry.js.map → p-9cfe025d.entry.js.map} +0 -0
  204. /package/dist/infineon-design-system-stencil/{p-bca4f6c8.entry.js.map → p-b393c1e7.entry.js.map} +0 -0
  205. /package/dist/infineon-design-system-stencil/{p-04d8ea38.entry.js.map → p-caef0e47.entry.js.map} +0 -0
  206. /package/dist/infineon-design-system-stencil/{p-36dcebde.entry.js.map → p-d3d6a562.entry.js.map} +0 -0
  207. /package/dist/infineon-design-system-stencil/{p-c36df3ce.entry.js.map → p-d660ebea.entry.js.map} +0 -0
  208. /package/dist/infineon-design-system-stencil/{p-59c3ac10.entry.js.map → p-d8a57524.entry.js.map} +0 -0
  209. /package/dist/infineon-design-system-stencil/{p-84d4d6a1.entry.js.map → p-e196740d.entry.js.map} +0 -0
  210. /package/dist/infineon-design-system-stencil/{p-2e931b0d.entry.js.map → p-e45d85fc.entry.js.map} +0 -0
  211. /package/dist/infineon-design-system-stencil/{p-437973f5.entry.js.map → p-e61d3fc6.entry.js.map} +0 -0
  212. /package/dist/infineon-design-system-stencil/{p-c7e86c7c.entry.js.map → p-ed30fb98.entry.js.map} +0 -0
  213. /package/dist/infineon-design-system-stencil/{p-05d9aa1f.entry.js.map → p-f84af2e3.entry.js.map} +0 -0
@@ -0,0 +1,471 @@
1
+ import { p as proxyCustomElement, H, c as createEvent, h } from './p-f8e6a4ef.js';
2
+ import { t as trackComponent } from './p-6ecb6a6f.js';
3
+ import { i as isNestedInIfxComponent } from './p-1ecafb97.js';
4
+ import { c as classNames } from './p-5cdc6210.js';
5
+ import { d as defineCustomElement$1 } from './p-0e4632d4.js';
6
+
7
+ const searchFieldCss = ":root {\n --ifx-font-family: \"Source Sans 3\", \"Arial, sans-serif\";\n}\n\n:host {\n display: flex;\n}\n\n.search-field {\n box-sizing: border-box;\n background-color: #FFFFFF;\n width: 100%;\n font-family: var(--ifx-font-family);\n position: relative;\n}\n.search-field .search-field__wrapper {\n box-sizing: border-box;\n height: 40px;\n display: flex;\n align-items: center;\n border: 1px solid #8D8786;\n border-radius: 1px;\n padding: 8px 16px;\n gap: 12px;\n flex: none;\n order: 0;\n align-self: stretch;\n flex-grow: 0;\n position: relative;\n width: 100%;\n outline: none;\n color: #8D8786;\n}\n.search-field .search-field__wrapper.focused {\n border: 1px solid #0A8276;\n}\n.search-field .search-field__wrapper.focused ifx-icon {\n color: #575352;\n}\n.search-field .search-field__wrapper.search-field__wrapper-s {\n height: 36px;\n}\n.search-field .search-field__wrapper:hover:not(.focused, :focus) {\n border: 1px solid #3C3A39;\n}\n.search-field .search-field__wrapper:focus {\n outline: none;\n border: 1px solid #0A8276;\n}\n.search-field .search-field__wrapper .delete-icon {\n right: 12px;\n cursor: pointer;\n}\n.search-field .search-field__wrapper input[type=text] {\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n color: #8D8786;\n border: none;\n width: 100%;\n outline: none;\n height: 16px;\n}\n.search-field .search-field__wrapper input[type=text]:focus {\n outline: none;\n color: #1d1d1d;\n}\n.search-field .search-field__wrapper input[type=text]:disabled {\n background-color: #EEEDED;\n}\n.search-field .search-field__wrapper:has(input[disabled]) {\n background-color: #EEEDED;\n}\n.search-field .suggestions-dropdown {\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n background: #FFFFFF;\n margin-top: 4px;\n border: 1px solid #EEEDED;\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;\n}\n.search-field .suggestions-dropdown .suggestions-header {\n font-family: Source Sans 3;\n font-size: 0.8125rem;\n font-weight: 600;\n line-height: 1.25rem;\n letter-spacing: 0.25em;\n text-transform: uppercase;\n color: #575352;\n border-bottom: 1px solid #EEEDED;\n padding: 12px 16px;\n}\n.search-field .suggestions-dropdown .suggestion-item {\n padding: 12px 16px;\n cursor: pointer;\n transition: background-color 0.2s ease;\n}\n.search-field .suggestions-dropdown .suggestion-item:last-child {\n border-bottom: none;\n}\n.search-field .suggestions-dropdown .suggestion-item:hover, .search-field .suggestions-dropdown .suggestion-item--selected {\n background-color: #EEEDED;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-icon {\n color: #575352;\n flex-shrink: 0;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-icon--history {\n color: #575352;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-text {\n flex: 1;\n display: flex;\n align-items: center;\n min-width: 0;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-text .suggestion-main-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex-shrink: 1;\n min-width: 0;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-text .suggestion-scope {\n color: #8D8786;\n flex-shrink: 0;\n white-space: nowrap;\n margin-left: 2px;\n font-weight: 600;\n font-size: 0.75rem;\n}\n@container (max-width: 320px) {\n .search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-text {\n flex-direction: column;\n align-items: flex-start;\n }\n .search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-text .suggestion-main-text {\n width: 100%;\n max-width: 100%;\n }\n .search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-text .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;\n }\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-count {\n color: #8D8786;\n margin-left: auto;\n flex-shrink: 0;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .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: #575352;\n}\n.search-field .suggestions-dropdown .suggestion-item .suggestion-content .suggestion-delete-icon:hover {\n color: #3C3A39;\n}\n.search-field .suggestions-dropdown .suggestion-item:hover .suggestion-delete-icon {\n opacity: 1;\n visibility: visible;\n}\n.search-field .search-field__wrapper.dropdown-open {\n border-radius: 1px 1px 0 0;\n border-color: #0A8276;\n}";
8
+ const IfxSearchFieldStyle0 = searchFieldCss;
9
+
10
+ const SearchField = /*@__PURE__*/ proxyCustomElement(class SearchField extends H {
11
+ constructor() {
12
+ super();
13
+ this.__registerHost();
14
+ this.__attachShadow();
15
+ this.ifxInput = createEvent(this, "ifxInput", 7);
16
+ this.ifxSuggestionRequested = createEvent(this, "ifxSuggestionRequested", 7);
17
+ this.ifxSuggestionSelected = createEvent(this, "ifxSuggestionSelected", 7);
18
+ this.ifxFocus = createEvent(this, "ifxFocus", 7);
19
+ this.ifxBlur = createEvent(this, "ifxBlur", 7);
20
+ this.value = '';
21
+ this.suggestions = [];
22
+ this.showSuggestions = false;
23
+ this.maxSuggestions = 10;
24
+ this.maxHistoryItems = 5;
25
+ this.enableHistory = true;
26
+ this.historyKey = 'ifx-search-history';
27
+ this.historyHeaderText = 'Recent Searches';
28
+ // ARIA Labels and Accessibility Props
29
+ this.ariaLabel = 'Search field';
30
+ this.deleteIconAriaLabel = 'Clear search';
31
+ this.historyDeleteAriaLabel = 'Remove from history';
32
+ this.dropdownAriaLabel = 'Search suggestions and history';
33
+ this.suggestionAriaLabel = 'Search suggestion';
34
+ this.historyItemAriaLabel = 'Search history item';
35
+ this.showDropdown = false;
36
+ this.filteredSuggestions = [];
37
+ this.selectedSuggestionIndex = -1;
38
+ this.searchHistory = [];
39
+ this.showDeleteIcon = false;
40
+ this.showDeleteIconInternalState = false;
41
+ this.disabled = false;
42
+ this.size = 'l';
43
+ this.isFocused = false;
44
+ this.placeholder = "Search...";
45
+ this.autocomplete = "off";
46
+ this.maxlength = null;
47
+ this.focusEmitted = false;
48
+ this.handleInput = () => {
49
+ const query = this.inputElement.value;
50
+ this.value = query;
51
+ this.ifxInput.emit(this.value);
52
+ if (this.showSuggestions) {
53
+ this.showDropdown = true;
54
+ this.selectedSuggestionIndex = -1;
55
+ this.requestSuggestions(query);
56
+ }
57
+ };
58
+ this.handleDelete = () => {
59
+ this.inputElement.value = '';
60
+ this.value = "";
61
+ this.ifxInput.emit(this.value);
62
+ this.hideDropdown();
63
+ };
64
+ this.handleSearch = () => {
65
+ if (this.value.trim() && this.enableHistory) {
66
+ // Only add to history if there are actual results
67
+ if (this.filteredSuggestions.length > 0) {
68
+ this.addToHistory(this.value);
69
+ }
70
+ }
71
+ this.hideDropdown();
72
+ };
73
+ // Handle click on history delete button
74
+ this.handleHistoryDelete = (event, term) => {
75
+ event.stopPropagation(); // Prevent selection of the entry
76
+ this.removeFromHistory(term);
77
+ };
78
+ }
79
+ componentDidLoad() {
80
+ this.loadSearchHistory();
81
+ }
82
+ handleOutsideClick(event) {
83
+ const path = event.composedPath();
84
+ if (!path.includes(this.inputElement) && !path.includes(this.dropdownElement)) {
85
+ this.hideDropdown();
86
+ }
87
+ }
88
+ handleKeyDown(event) {
89
+ if (!this.showDropdown)
90
+ return;
91
+ switch (event.key) {
92
+ case 'ArrowDown':
93
+ event.preventDefault();
94
+ this.navigateSuggestions(1);
95
+ break;
96
+ case 'ArrowUp':
97
+ event.preventDefault();
98
+ this.navigateSuggestions(-1);
99
+ break;
100
+ case 'Enter':
101
+ event.preventDefault();
102
+ if (this.selectedSuggestionIndex >= 0) {
103
+ this.selectSuggestion(this.filteredSuggestions[this.selectedSuggestionIndex]);
104
+ }
105
+ else {
106
+ this.handleSearch();
107
+ }
108
+ break;
109
+ case 'Escape':
110
+ this.hideDropdown();
111
+ break;
112
+ }
113
+ }
114
+ valueWatcher(newValue) {
115
+ if (this.inputElement && newValue !== this.inputElement.value) {
116
+ this.inputElement.value = newValue;
117
+ }
118
+ this.updateSuggestions();
119
+ }
120
+ suggestionsWatcher() {
121
+ this.updateSuggestions();
122
+ }
123
+ focusInput() {
124
+ // Don't call focus() if the input is already focused to prevent unnecessary operations
125
+ if (document.activeElement !== this.inputElement) {
126
+ this.inputElement.focus();
127
+ }
128
+ // Only emit focus event if it hasn't been emitted already
129
+ if (!this.focusEmitted) {
130
+ this.focusEmitted = true;
131
+ this.isFocused = true;
132
+ this.ifxFocus.emit();
133
+ }
134
+ if (this.showSuggestions) {
135
+ // On focus without input: Show only history
136
+ if (this.value.length === 0) {
137
+ this.showHistoryDropdown();
138
+ // Only show dropdown if history is actually present
139
+ this.showDropdown = this.enableHistory && this.searchHistory.length > 0;
140
+ }
141
+ else {
142
+ // With existing input: Normal suggestion logic
143
+ this.updateSuggestions();
144
+ this.showDropdown = this.filteredSuggestions.length > 0;
145
+ }
146
+ }
147
+ }
148
+ blurInput() {
149
+ setTimeout(() => {
150
+ this.isFocused = false;
151
+ this.focusEmitted = false; // Reset focus flag when blur occurs
152
+ this.ifxBlur.emit();
153
+ }, 150);
154
+ }
155
+ // Public method to update history from external sources
156
+ loadSearchHistory() {
157
+ if (this.enableHistory && typeof localStorage !== 'undefined') {
158
+ const stored = localStorage.getItem(this.historyKey);
159
+ this.searchHistory = stored ? JSON.parse(stored) : [];
160
+ // Update suggestions when history is loaded
161
+ this.updateSuggestions();
162
+ // If no input and no history left, close dropdown
163
+ if (this.value.length === 0 && this.searchHistory.length === 0) {
164
+ this.showDropdown = false;
165
+ }
166
+ }
167
+ }
168
+ // Public method to completely clear history
169
+ clearSearchHistory() {
170
+ if (this.enableHistory && typeof localStorage !== 'undefined') {
171
+ // Clear from localStorage
172
+ localStorage.removeItem(this.historyKey);
173
+ // Clear internal history
174
+ this.searchHistory = [];
175
+ // Reset all dropdown-relevant states
176
+ this.filteredSuggestions = [];
177
+ this.selectedSuggestionIndex = -1;
178
+ this.showDropdown = false;
179
+ // Update suggestions after reset
180
+ this.updateSuggestions();
181
+ }
182
+ }
183
+ // Suggestion Management Methods
184
+ addToHistory(term) {
185
+ if (!this.enableHistory || !term.trim())
186
+ return;
187
+ const history = [...this.searchHistory];
188
+ const existingIndex = history.indexOf(term);
189
+ if (existingIndex > -1) {
190
+ history.splice(existingIndex, 1);
191
+ }
192
+ history.unshift(term);
193
+ // Limit history to maxHistoryItems (default 5)
194
+ this.searchHistory = history.slice(0, this.maxHistoryItems);
195
+ if (typeof localStorage !== 'undefined') {
196
+ localStorage.setItem(this.historyKey, JSON.stringify(this.searchHistory));
197
+ }
198
+ }
199
+ // Remove individual history entry
200
+ removeFromHistory(term) {
201
+ if (!this.enableHistory)
202
+ return;
203
+ const history = [...this.searchHistory];
204
+ const index = history.indexOf(term);
205
+ if (index > -1) {
206
+ history.splice(index, 1);
207
+ this.searchHistory = history;
208
+ // Update localStorage
209
+ if (typeof localStorage !== 'undefined') {
210
+ localStorage.setItem(this.historyKey, JSON.stringify(this.searchHistory));
211
+ }
212
+ // Update suggestions after removal
213
+ this.updateSuggestions();
214
+ // Close dropdown if no history remains
215
+ if (this.searchHistory.length === 0 && this.value.length === 0) {
216
+ this.showDropdown = false;
217
+ }
218
+ }
219
+ }
220
+ requestSuggestions(query) {
221
+ this.ifxSuggestionRequested.emit(query);
222
+ this.updateSuggestions();
223
+ }
224
+ updateSuggestions() {
225
+ const query = this.value.toLowerCase();
226
+ let suggestions = [];
227
+ if (query.length > 0) {
228
+ // For text input: Mix external suggestions and relevant history
229
+ // 1. Filter external suggestions
230
+ if (this.suggestions && this.suggestions.length > 0) {
231
+ const filteredExternal = this.suggestions.filter(s => s.text.toLowerCase().includes(query));
232
+ suggestions = [...suggestions, ...filteredExternal];
233
+ }
234
+ // 2. Filter relevant history entries
235
+ if (this.enableHistory && this.searchHistory.length > 0) {
236
+ const filteredHistory = this.searchHistory
237
+ .filter(term => term.toLowerCase().includes(query))
238
+ .map((term, index) => ({
239
+ id: `history-${index}`,
240
+ text: term,
241
+ type: 'history'
242
+ }));
243
+ suggestions = [...suggestions, ...filteredHistory];
244
+ }
245
+ // 3. Sort by relevance (exact matches first, then prefix matches)
246
+ suggestions.sort((a, b) => {
247
+ const aText = a.text.toLowerCase();
248
+ const bText = b.text.toLowerCase();
249
+ // Exact match has highest priority
250
+ if (aText === query && bText !== query)
251
+ return -1;
252
+ if (bText === query && aText !== query)
253
+ return 1;
254
+ // Prefix match has second highest priority
255
+ const aStartsWith = aText.startsWith(query);
256
+ const bStartsWith = bText.startsWith(query);
257
+ if (aStartsWith && !bStartsWith)
258
+ return -1;
259
+ if (bStartsWith && !aStartsWith)
260
+ return 1;
261
+ // With equal relevance: external suggestions before history
262
+ if (a.type === 'suggestion' && b.type === 'history')
263
+ return -1;
264
+ if (a.type === 'history' && b.type === 'suggestion')
265
+ return 1;
266
+ // Alphabetical sorting as last criterion
267
+ return aText.localeCompare(bText);
268
+ });
269
+ }
270
+ else {
271
+ // For empty query: Show only history (no external suggestions)
272
+ if (this.enableHistory && this.searchHistory.length > 0) {
273
+ const historySuggestions = this.searchHistory.map((term, index) => ({
274
+ id: `history-${index}`,
275
+ text: term,
276
+ type: 'history'
277
+ }));
278
+ suggestions = historySuggestions;
279
+ }
280
+ // For empty query DO NOT show external suggestions
281
+ }
282
+ // Remove duplicates based on text and scope combination (history takes precedence over external)
283
+ const uniqueSuggestions = suggestions.reduce((unique, current) => {
284
+ const existingIndex = unique.findIndex(item => item.text.toLowerCase() === current.text.toLowerCase() &&
285
+ item.scope === current.scope);
286
+ if (existingIndex === -1) {
287
+ unique.push(current);
288
+ }
289
+ else {
290
+ // If already exists, prefer history over external suggestions
291
+ if (current.type === 'history' && unique[existingIndex].type !== 'history') {
292
+ unique[existingIndex] = current;
293
+ }
294
+ }
295
+ return unique;
296
+ }, []);
297
+ this.filteredSuggestions = uniqueSuggestions.slice(0, this.maxSuggestions);
298
+ this.selectedSuggestionIndex = -1;
299
+ }
300
+ navigateSuggestions(direction) {
301
+ const maxIndex = this.filteredSuggestions.length - 1;
302
+ if (direction > 0) {
303
+ this.selectedSuggestionIndex = this.selectedSuggestionIndex < maxIndex
304
+ ? this.selectedSuggestionIndex + 1
305
+ : 0;
306
+ }
307
+ else {
308
+ this.selectedSuggestionIndex = this.selectedSuggestionIndex > 0
309
+ ? this.selectedSuggestionIndex - 1
310
+ : maxIndex;
311
+ }
312
+ }
313
+ selectSuggestion(suggestion) {
314
+ this.value = suggestion.text;
315
+ this.inputElement.value = suggestion.text;
316
+ this.ifxSuggestionSelected.emit(suggestion);
317
+ this.ifxInput.emit(this.value);
318
+ if (this.enableHistory) {
319
+ // Always add selected suggestions to history since they are valid results
320
+ this.addToHistory(suggestion.text);
321
+ }
322
+ this.hideDropdown();
323
+ }
324
+ hideDropdown() {
325
+ this.showDropdown = false;
326
+ this.selectedSuggestionIndex = -1;
327
+ this.isFocused = false;
328
+ }
329
+ // Show only history in dropdown (e.g. on focus without input)
330
+ showHistoryDropdown() {
331
+ if (this.enableHistory && this.searchHistory.length > 0) {
332
+ // Show only history entries
333
+ const historySuggestions = this.searchHistory.map((term, index) => ({
334
+ id: `history-${index}`,
335
+ text: term,
336
+ type: 'history'
337
+ }));
338
+ this.filteredSuggestions = historySuggestions.slice(0, this.maxSuggestions);
339
+ this.selectedSuggestionIndex = -1;
340
+ }
341
+ else {
342
+ this.filteredSuggestions = [];
343
+ }
344
+ }
345
+ // Check if only history entries are displayed (without text input)
346
+ isShowingOnlyHistory() {
347
+ return this.value.length === 0 &&
348
+ this.filteredSuggestions.length > 0 &&
349
+ this.filteredSuggestions.every(s => s.type === 'history');
350
+ }
351
+ // Render text with highlighted matches
352
+ renderHighlightedText(text, query) {
353
+ if (!query || query.length === 0) {
354
+ return text;
355
+ }
356
+ const lowerText = text.toLowerCase();
357
+ const lowerQuery = query.toLowerCase();
358
+ const index = lowerText.indexOf(lowerQuery);
359
+ if (index === -1) {
360
+ return text;
361
+ }
362
+ const before = text.substring(0, index);
363
+ const match = text.substring(index, index + query.length);
364
+ const after = text.substring(index + query.length);
365
+ return [
366
+ before,
367
+ h("strong", null, match),
368
+ after
369
+ ];
370
+ }
371
+ componentWillLoad() {
372
+ if (!isNestedInIfxComponent(this.el)) {
373
+ trackComponent('ifx-search-field');
374
+ }
375
+ }
376
+ componentWillUpdate() {
377
+ if (this.value !== "") {
378
+ this.showDeleteIconInternalState = true;
379
+ }
380
+ else
381
+ this.showDeleteIconInternalState = false;
382
+ }
383
+ render() {
384
+ return (h("div", { key: 'b7cf249b85fdd3b8de6e145e026031b55d689758', "aria-label": this.ariaLabel, "aria-labelledby": this.ariaLabelledBy, "aria-describedby": this.ariaDescribedBy, "aria-disabled": this.disabled, "aria-value": this.value, class: 'search-field' }, h("div", { key: '0e19cb8ecf2bb3c82e0cc835aa66d2c144aac207', class: this.getWrapperClassNames(), tabindex: 1, onClick: () => this.focusInput() }, h("ifx-icon", { key: '2c8f71752ac2c7aa1e520b5de67a31025e66ae5d', icon: "search-16", class: "search-icon" }), h("input", { key: 'f9773fac1622f99251c7ed6c4662170bf7f94460', 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-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) => {
385
+ if (event.key === 'Enter' || event.key === ' ') {
386
+ event.preventDefault();
387
+ this.handleDelete();
388
+ }
389
+ } })) : null), this.showDropdown && this.filteredSuggestions.length > 0 && (h("div", { key: '5c83b7c9655ae7bed7e56c366d77fa400d02a080', ref: (el) => (this.dropdownElement = el), id: "suggestions-dropdown", class: "suggestions-dropdown", role: "listbox", "aria-label": this.dropdownAriaLabel }, this.isShowingOnlyHistory() && (h("div", { key: 'a053469803379f16fff04c053035095bffb7cbdc', 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) => {
390
+ if (event.key === 'Enter' || event.key === ' ') {
391
+ event.preventDefault();
392
+ this.handleHistoryDelete(event, suggestion.text);
393
+ }
394
+ } }))))))))));
395
+ }
396
+ getSizeClass() {
397
+ return `${this.size}` === "s"
398
+ ? "search-field__wrapper-s"
399
+ : "";
400
+ }
401
+ getWrapperClassNames() {
402
+ return classNames(`search-field__wrapper`, `search-field__wrapper ${this.getSizeClass()}`, `${this.isFocused ? 'focused' : ""}`, `${this.showDropdown ? 'dropdown-open' : ""}`);
403
+ }
404
+ getSuggestionClassNames(index) {
405
+ var _a;
406
+ return classNames('suggestion-item', {
407
+ 'suggestion-item--selected': index === this.selectedSuggestionIndex,
408
+ 'suggestion-item--history': ((_a = this.filteredSuggestions[index]) === null || _a === void 0 ? void 0 : _a.type) === 'history'
409
+ });
410
+ }
411
+ get el() { return this; }
412
+ static get watchers() { return {
413
+ "value": ["valueWatcher"],
414
+ "suggestions": ["suggestionsWatcher"]
415
+ }; }
416
+ static get style() { return IfxSearchFieldStyle0; }
417
+ }, [1, "ifx-search-field", {
418
+ "value": [1025],
419
+ "suggestions": [16],
420
+ "showSuggestions": [4, "show-suggestions"],
421
+ "maxSuggestions": [2, "max-suggestions"],
422
+ "maxHistoryItems": [2, "max-history-items"],
423
+ "enableHistory": [4, "enable-history"],
424
+ "historyKey": [1, "history-key"],
425
+ "historyHeaderText": [1, "history-header-text"],
426
+ "ariaLabel": [1, "aria-label"],
427
+ "ariaLabelledBy": [1, "aria-labelled-by"],
428
+ "ariaDescribedBy": [1, "aria-described-by"],
429
+ "deleteIconAriaLabel": [1, "delete-icon-aria-label"],
430
+ "historyDeleteAriaLabel": [1, "history-delete-aria-label"],
431
+ "dropdownAriaLabel": [1, "dropdown-aria-label"],
432
+ "suggestionAriaLabel": [1, "suggestion-aria-label"],
433
+ "historyItemAriaLabel": [1, "history-item-aria-label"],
434
+ "showDeleteIcon": [4, "show-delete-icon"],
435
+ "disabled": [4],
436
+ "size": [1],
437
+ "placeholder": [1],
438
+ "autocomplete": [1],
439
+ "maxlength": [2],
440
+ "showDropdown": [32],
441
+ "filteredSuggestions": [32],
442
+ "selectedSuggestionIndex": [32],
443
+ "searchHistory": [32],
444
+ "showDeleteIconInternalState": [32],
445
+ "isFocused": [32]
446
+ }, [[5, "mousedown", "handleOutsideClick"], [0, "keydown", "handleKeyDown"]], {
447
+ "value": ["valueWatcher"],
448
+ "suggestions": ["suggestionsWatcher"]
449
+ }]);
450
+ function defineCustomElement() {
451
+ if (typeof customElements === "undefined") {
452
+ return;
453
+ }
454
+ const components = ["ifx-search-field", "ifx-icon"];
455
+ components.forEach(tagName => { switch (tagName) {
456
+ case "ifx-search-field":
457
+ if (!customElements.get(tagName)) {
458
+ customElements.define(tagName, SearchField);
459
+ }
460
+ break;
461
+ case "ifx-icon":
462
+ if (!customElements.get(tagName)) {
463
+ defineCustomElement$1();
464
+ }
465
+ break;
466
+ } });
467
+ }
468
+
469
+ export { SearchField as S, defineCustomElement as d };
470
+
471
+ //# sourceMappingURL=p-c7297dfd.js.map
@@ -0,0 +1 @@
1
+ {"file":"p-c7297dfd.js","mappings":";;;;;;AAAA,MAAM,cAAc,GAAG,miKAAmiK,CAAC;AAC3jK,6BAAe,cAAc;;MCmBhB,WAAW;IANxB;;;;;;;;;QAW2B,UAAK,GAAW,EAAE,CAAC;QACpC,gBAAW,GAAqB,EAAE,CAAC;QACnC,oBAAe,GAAY,KAAK,CAAC;QACjC,mBAAc,GAAW,EAAE,CAAC;QAC5B,oBAAe,GAAW,CAAC,CAAC;QAC5B,kBAAa,GAAY,IAAI,CAAC;QAC9B,eAAU,GAAW,oBAAoB,CAAC;QAC1C,sBAAiB,GAAW,iBAAiB,CAAC;;QAG9C,cAAS,GAAW,cAAc,CAAC;QAGnC,wBAAmB,GAAW,cAAc,CAAC;QAC7C,2BAAsB,GAAW,qBAAqB,C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Y,GAAG,eAAe,GAAG,EAAE,EAAE,CAC9C,CAAC;KACH;IAED,uBAAuB,CAAC,KAAa;;QACnC,OAAO,UAAU,CACf,iBAAiB,EACjB;YACE,2BAA2B,EAAE,KAAK,KAAK,IAAI,CAAC,uBAAuB;YACnE,0BAA0B,EAAE,CAAA,MAAA,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,0CAAE,IAAI,MAAK,SAAS;SAChF,CACF,CAAC;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"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 color: tokens.$ifxColorEngineering400;\n\n &.focused {\n border: 1px solid tokens.$ifxColorOcean500;\n\n & ifx-icon {\n color: tokens.$ifxColorEngineering500;\n }\n }\n\n &.search-field__wrapper-s {\n height: 36px;\n }\n\n\n &:hover:not(.focused, :focus) {\n border: 1px solid #3C3A39;\n }\n\n &:focus {\n outline: none;\n border: 1px solid #0A8276;\n }\n\n\n .delete-icon {\n right: 12px;\n cursor: pointer;\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-color: #EEEDED;\n }\n }\n\n &:has(input[disabled]) {\n background-color: #EEEDED;\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.10);\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 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 = 'Search field';\n @Prop() ariaLabelledBy?: string;\n @Prop() ariaDescribedBy?: string;\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 componentDidLoad() {\n this.loadSearchHistory();\n }\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 this.inputElement.value = '';\n this.value = \"\";\n this.ifxInput.emit(this.value);\n this.hideDropdown();\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 // Don't call focus() if the input is already focused to prevent unnecessary operations\n if (document.activeElement !== this.inputElement) {\n this.inputElement.focus();\n }\n\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 if(!isNestedInIfxComponent(this.el)) {\n trackComponent('ifx-search-field')\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-label={this.ariaLabel}\n aria-labelledby={this.ariaLabelledBy}\n aria-describedby={this.ariaDescribedBy}\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-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 );\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}
@@ -369,25 +369,25 @@ const MultiselectOption = /*@__PURE__*/ proxyCustomElement(class MultiselectOpti
369
369
  const additionalPadding = this.hasChildren ? 0 : 28;
370
370
  let totalPadding = basePadding + additionalPadding;
371
371
  const optionItemStyle = isFlatMultiselect ? undefined : { paddingLeft: `${totalPadding}px` };
372
- return (h(Host, { key: 'f836f58884e2e57c4c5fb4953f10d5ff4a34c8da' }, h("div", { key: '9eca6e87bb3c21512a051596b1e92931b707e88f', class: {
372
+ return (h(Host, { key: '53ab714e5bc86c83569b2c1cf6f479405f528880' }, h("div", { key: 'b5597349b4d3ef268b5826047f414dd7ce0c7854', class: {
373
373
  'option': true,
374
374
  'option--has-children': this.hasChildren,
375
375
  'option--expanded': this.isExpanded,
376
376
  'option--disabled': this.disabled,
377
377
  'option--selected': this.selected,
378
- }, role: "option", "aria-expanded": this.hasChildren ? (this.isExpanded ? 'true' : 'false') : undefined, "aria-selected": this.selected ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "data-level": this.depth, "data-value": this.value }, h("div", { key: '41d24ef38470f5f7f8aa36daa33b339b7d8079f3', class: "option-item", style: optionItemStyle }, h("div", { key: '27d33336e7d15ccce1703429b70494fe86808214', class: "chevron-wrapper", tabIndex: this.hasChildren ? 0 : -1, role: this.hasChildren ? "button" : undefined, "aria-label": this.hasChildren ? (this.isExpanded ? "Collapse" : "Expand") : undefined, onClick: (e) => { e.stopPropagation(); this.toggleExpansion(); }, onKeyDown: (e) => {
378
+ }, role: "option", "aria-expanded": this.hasChildren ? (this.isExpanded ? 'true' : 'false') : undefined, "aria-selected": this.selected ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "data-level": this.depth, "data-value": this.value }, h("div", { key: '3052a22b111e61ac0e48ecd64460c35aa2b06fea', class: "option-item", style: optionItemStyle }, h("div", { key: 'a392db43dbb81f06a4cfd4e5faad7672108bc4bb', class: "chevron-wrapper", tabIndex: this.hasChildren ? 0 : -1, role: this.hasChildren ? "button" : undefined, "aria-label": this.hasChildren ? (this.isExpanded ? "Collapse" : "Expand") : undefined, onClick: (e) => { e.stopPropagation(); this.toggleExpansion(); }, onKeyDown: (e) => {
379
379
  if (e.key === 'Enter' || e.key === ' ') {
380
380
  e.preventDefault();
381
381
  e.stopPropagation();
382
382
  this.toggleExpansion();
383
383
  }
384
- } }, this.hasChildren && (h("ifx-icon", { key: '68e975b49b4aa9edf564b80644c5a55809185629', class: `chevron ${this.isExpanded ? 'chevron--expanded' : 'chevron--collapsed'}`, icon: "chevron-right-16" }))), h("div", { key: 'f651aefe4cc30db6056331ffaafd8e6ea17039fc', class: "checkbox-wrapper", onClick: (e) => e.stopPropagation() }, h("ifx-checkbox", { key: 'e8cb2c7a75921a81e0321ff22718d9373cb6f437', size: 's', checked: (this.isSearchActive && this.isSearchDisabled) ? false : (this.indeterminate ? false : this.selected), indeterminate: (this.isSearchActive && this.isSearchDisabled) ? false : this.indeterminate, onClick: this.handleCheckboxClick, disabled: this.disabled || (this.isSearchActive && this.isSearchDisabled), onKeyDown: (e) => {
384
+ } }, this.hasChildren && (h("ifx-icon", { key: '033471dbc46d73d82f0ab44a07a1dfa5fd9625fb', class: `chevron ${this.isExpanded ? 'chevron--expanded' : 'chevron--collapsed'}`, icon: "chevron-right-16" }))), h("div", { key: 'd6fc07097a390e9e29f8c4dcc55c90f755b10fc9', class: "checkbox-wrapper", onClick: (e) => e.stopPropagation() }, h("ifx-checkbox", { key: '7d39f30d45c2f917edd924b3b8ce6c22f4146c19', size: 's', checked: (this.isSearchActive && this.isSearchDisabled) ? false : (this.indeterminate ? false : this.selected), indeterminate: (this.isSearchActive && this.isSearchDisabled) ? false : this.indeterminate, onClick: this.handleCheckboxClick, disabled: this.disabled || (this.isSearchActive && this.isSearchDisabled), onKeyDown: (e) => {
385
385
  if (e.key === 'Enter' || e.key === ' ') {
386
386
  e.preventDefault();
387
387
  e.stopPropagation();
388
388
  this.handleCheckboxClick(e);
389
389
  }
390
- } })), h("div", { key: '4f626380753927d4bedca0f78643e6647eff6356', class: "option-label", onClick: this.handleHeaderClick, tabIndex: -1 }, h("slot", { key: '8207d9f952bff231fda0bf0be43e1c567aa6a6da' }))), this.isExpanded && h("div", { key: '930d611f27451ff393d1403386bb6cd6b4a54980', class: "option-children" }, h("slot", { key: '269eb6381257f82b74b888188646559e6881a9d9', name: "children" })))));
390
+ } })), h("div", { key: 'e09de6a2559a8334553abb9d45b901c1459a2da7', class: "option-label", onClick: this.handleHeaderClick, tabIndex: -1 }, h("slot", { key: '941edb6987ef6add787211833e0e1aad0d5b9066' }))), this.isExpanded && h("div", { key: 'b5248d64937e418587f1c807e434874be4952f48', class: "option-children" }, h("slot", { key: '8e6e69e5000661632c114279a5afc5c80f361b8e', name: "children" })))));
391
391
  }
392
392
  get el() { return this; }
393
393
  static get style() { return IfxMultiselectOptionStyle0; }
@@ -429,4 +429,4 @@ function defineCustomElement() {
429
429
 
430
430
  export { MultiselectOption as M, defineCustomElement as d };
431
431
 
432
- //# sourceMappingURL=p-c5f7a0e2.js.map
432
+ //# sourceMappingURL=p-f9c7ad2e.js.map