@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
@@ -3,48 +3,367 @@ import { t as trackComponent } from './tracking-a7efdbcd.js';
3
3
  import { i as isNestedInIfxComponent } from './dom-utils-1988cdf1.js';
4
4
  import { c as classNames } from './index-72ac5051.js';
5
5
 
6
- const searchFieldCss = ":root{--ifx-font-family:\"Source Sans 3\", \"Arial, sans-serif\"}:host{display:flex}.search-field{box-sizing:border-box;background-color:#FFFFFF;width:100%;font-family:var(--ifx-font-family)}.search-field .search-field__wrapper{box-sizing:border-box;height:40px;display:flex;align-items:center;border:1px solid #8D8786;border-radius:1px;padding:8px 16px;gap:12px;flex:none;order:0;align-self:stretch;flex-grow:0;position:relative;width:100%;outline:none;color:#8D8786}.search-field .search-field__wrapper.focused{border:1px solid #0A8276}.search-field .search-field__wrapper.focused ifx-icon{color:#575352}.search-field .search-field__wrapper.search-field__wrapper-s{height:36px}.search-field .search-field__wrapper:hover:not(.focused,:focus){border:1px solid #3C3A39}.search-field .search-field__wrapper:focus{outline:none;border:1px solid #0A8276}.search-field .search-field__wrapper .delete-icon{right:12px;cursor:pointer}.search-field .search-field__wrapper input[type=text]{font-style:normal;font-weight:400;font-size:16px;color:#8D8786;border:none;width:100%;outline:none;height:16px}.search-field .search-field__wrapper input[type=text]:focus{outline:none;color:#1d1d1d}.search-field .search-field__wrapper input[type=text]:disabled{background-color:#EEEDED}.search-field .search-field__wrapper:has(input[disabled]){background-color:#EEEDED}";
6
+ 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}";
7
7
  const IfxSearchFieldStyle0 = searchFieldCss;
8
8
 
9
9
  const SearchField = class {
10
10
  constructor(hostRef) {
11
11
  registerInstance(this, hostRef);
12
12
  this.ifxInput = createEvent(this, "ifxInput", 7);
13
+ this.ifxSuggestionRequested = createEvent(this, "ifxSuggestionRequested", 7);
14
+ this.ifxSuggestionSelected = createEvent(this, "ifxSuggestionSelected", 7);
15
+ this.ifxFocus = createEvent(this, "ifxFocus", 7);
16
+ this.ifxBlur = createEvent(this, "ifxBlur", 7);
13
17
  this.value = '';
14
- this.insideDropdown = false;
18
+ this.suggestions = [];
19
+ this.showSuggestions = false;
20
+ this.maxSuggestions = 10;
21
+ this.maxHistoryItems = 5;
22
+ this.enableHistory = true;
23
+ this.historyKey = 'ifx-search-history';
24
+ this.historyHeaderText = 'Recent Searches';
25
+ // ARIA Labels and Accessibility Props
26
+ this.ariaLabel = 'Search field';
27
+ this.deleteIconAriaLabel = 'Clear search';
28
+ this.historyDeleteAriaLabel = 'Remove from history';
29
+ this.dropdownAriaLabel = 'Search suggestions and history';
30
+ this.suggestionAriaLabel = 'Search suggestion';
31
+ this.historyItemAriaLabel = 'Search history item';
32
+ this.showDropdown = false;
33
+ this.filteredSuggestions = [];
34
+ this.selectedSuggestionIndex = -1;
35
+ this.searchHistory = [];
15
36
  this.showDeleteIcon = false;
16
37
  this.showDeleteIconInternalState = false;
17
38
  this.disabled = false;
18
39
  this.size = 'l';
19
40
  this.isFocused = false;
20
41
  this.placeholder = "Search...";
21
- this.autocomplete = "on";
42
+ this.autocomplete = "off";
22
43
  this.maxlength = null;
44
+ this.focusEmitted = false;
23
45
  this.handleInput = () => {
24
46
  const query = this.inputElement.value;
25
- this.value = query; // update the value property when input changes
47
+ this.value = query;
26
48
  this.ifxInput.emit(this.value);
49
+ if (this.showSuggestions) {
50
+ this.showDropdown = true;
51
+ this.selectedSuggestionIndex = -1;
52
+ this.requestSuggestions(query);
53
+ }
27
54
  };
28
55
  this.handleDelete = () => {
29
56
  this.inputElement.value = '';
30
57
  this.value = "";
31
58
  this.ifxInput.emit(this.value);
59
+ this.hideDropdown();
32
60
  };
61
+ this.handleSearch = () => {
62
+ if (this.value.trim() && this.enableHistory) {
63
+ // Only add to history if there are actual results
64
+ if (this.filteredSuggestions.length > 0) {
65
+ this.addToHistory(this.value);
66
+ }
67
+ }
68
+ this.hideDropdown();
69
+ };
70
+ // Handle click on history delete button
71
+ this.handleHistoryDelete = (event, term) => {
72
+ event.stopPropagation(); // Prevent selection of the entry
73
+ this.removeFromHistory(term);
74
+ };
75
+ }
76
+ componentDidLoad() {
77
+ this.loadSearchHistory();
33
78
  }
34
79
  handleOutsideClick(event) {
35
80
  const path = event.composedPath();
36
- if (!path.includes(this.inputElement)) {
37
- this.isFocused = false;
81
+ if (!path.includes(this.inputElement) && !path.includes(this.dropdownElement)) {
82
+ this.hideDropdown();
83
+ }
84
+ }
85
+ handleKeyDown(event) {
86
+ if (!this.showDropdown)
87
+ return;
88
+ switch (event.key) {
89
+ case 'ArrowDown':
90
+ event.preventDefault();
91
+ this.navigateSuggestions(1);
92
+ break;
93
+ case 'ArrowUp':
94
+ event.preventDefault();
95
+ this.navigateSuggestions(-1);
96
+ break;
97
+ case 'Enter':
98
+ event.preventDefault();
99
+ if (this.selectedSuggestionIndex >= 0) {
100
+ this.selectSuggestion(this.filteredSuggestions[this.selectedSuggestionIndex]);
101
+ }
102
+ else {
103
+ this.handleSearch();
104
+ }
105
+ break;
106
+ case 'Escape':
107
+ this.hideDropdown();
108
+ break;
38
109
  }
39
110
  }
40
111
  valueWatcher(newValue) {
41
- if (newValue !== this.inputElement.value) {
112
+ if (this.inputElement && newValue !== this.inputElement.value) {
42
113
  this.inputElement.value = newValue;
43
114
  }
115
+ this.updateSuggestions();
116
+ }
117
+ suggestionsWatcher() {
118
+ this.updateSuggestions();
44
119
  }
45
120
  focusInput() {
46
- this.inputElement.focus();
47
- this.isFocused = true;
121
+ // Don't call focus() if the input is already focused to prevent unnecessary operations
122
+ if (document.activeElement !== this.inputElement) {
123
+ this.inputElement.focus();
124
+ }
125
+ // Only emit focus event if it hasn't been emitted already
126
+ if (!this.focusEmitted) {
127
+ this.focusEmitted = true;
128
+ this.isFocused = true;
129
+ this.ifxFocus.emit();
130
+ }
131
+ if (this.showSuggestions) {
132
+ // On focus without input: Show only history
133
+ if (this.value.length === 0) {
134
+ this.showHistoryDropdown();
135
+ // Only show dropdown if history is actually present
136
+ this.showDropdown = this.enableHistory && this.searchHistory.length > 0;
137
+ }
138
+ else {
139
+ // With existing input: Normal suggestion logic
140
+ this.updateSuggestions();
141
+ this.showDropdown = this.filteredSuggestions.length > 0;
142
+ }
143
+ }
144
+ }
145
+ blurInput() {
146
+ setTimeout(() => {
147
+ this.isFocused = false;
148
+ this.focusEmitted = false; // Reset focus flag when blur occurs
149
+ this.ifxBlur.emit();
150
+ }, 150);
151
+ }
152
+ // Public method to update history from external sources
153
+ loadSearchHistory() {
154
+ if (this.enableHistory && typeof localStorage !== 'undefined') {
155
+ const stored = localStorage.getItem(this.historyKey);
156
+ this.searchHistory = stored ? JSON.parse(stored) : [];
157
+ // Update suggestions when history is loaded
158
+ this.updateSuggestions();
159
+ // If no input and no history left, close dropdown
160
+ if (this.value.length === 0 && this.searchHistory.length === 0) {
161
+ this.showDropdown = false;
162
+ }
163
+ }
164
+ }
165
+ // Public method to completely clear history
166
+ clearSearchHistory() {
167
+ if (this.enableHistory && typeof localStorage !== 'undefined') {
168
+ // Clear from localStorage
169
+ localStorage.removeItem(this.historyKey);
170
+ // Clear internal history
171
+ this.searchHistory = [];
172
+ // Reset all dropdown-relevant states
173
+ this.filteredSuggestions = [];
174
+ this.selectedSuggestionIndex = -1;
175
+ this.showDropdown = false;
176
+ // Update suggestions after reset
177
+ this.updateSuggestions();
178
+ }
179
+ }
180
+ // Suggestion Management Methods
181
+ addToHistory(term) {
182
+ if (!this.enableHistory || !term.trim())
183
+ return;
184
+ const history = [...this.searchHistory];
185
+ const existingIndex = history.indexOf(term);
186
+ if (existingIndex > -1) {
187
+ history.splice(existingIndex, 1);
188
+ }
189
+ history.unshift(term);
190
+ // Limit history to maxHistoryItems (default 5)
191
+ this.searchHistory = history.slice(0, this.maxHistoryItems);
192
+ if (typeof localStorage !== 'undefined') {
193
+ localStorage.setItem(this.historyKey, JSON.stringify(this.searchHistory));
194
+ }
195
+ }
196
+ // Remove individual history entry
197
+ removeFromHistory(term) {
198
+ if (!this.enableHistory)
199
+ return;
200
+ const history = [...this.searchHistory];
201
+ const index = history.indexOf(term);
202
+ if (index > -1) {
203
+ history.splice(index, 1);
204
+ this.searchHistory = history;
205
+ // Update localStorage
206
+ if (typeof localStorage !== 'undefined') {
207
+ localStorage.setItem(this.historyKey, JSON.stringify(this.searchHistory));
208
+ }
209
+ // Update suggestions after removal
210
+ this.updateSuggestions();
211
+ // Close dropdown if no history remains
212
+ if (this.searchHistory.length === 0 && this.value.length === 0) {
213
+ this.showDropdown = false;
214
+ }
215
+ }
216
+ }
217
+ requestSuggestions(query) {
218
+ this.ifxSuggestionRequested.emit(query);
219
+ this.updateSuggestions();
220
+ }
221
+ updateSuggestions() {
222
+ const query = this.value.toLowerCase();
223
+ let suggestions = [];
224
+ if (query.length > 0) {
225
+ // For text input: Mix external suggestions and relevant history
226
+ // 1. Filter external suggestions
227
+ if (this.suggestions && this.suggestions.length > 0) {
228
+ const filteredExternal = this.suggestions.filter(s => s.text.toLowerCase().includes(query));
229
+ suggestions = [...suggestions, ...filteredExternal];
230
+ }
231
+ // 2. Filter relevant history entries
232
+ if (this.enableHistory && this.searchHistory.length > 0) {
233
+ const filteredHistory = this.searchHistory
234
+ .filter(term => term.toLowerCase().includes(query))
235
+ .map((term, index) => ({
236
+ id: `history-${index}`,
237
+ text: term,
238
+ type: 'history'
239
+ }));
240
+ suggestions = [...suggestions, ...filteredHistory];
241
+ }
242
+ // 3. Sort by relevance (exact matches first, then prefix matches)
243
+ suggestions.sort((a, b) => {
244
+ const aText = a.text.toLowerCase();
245
+ const bText = b.text.toLowerCase();
246
+ // Exact match has highest priority
247
+ if (aText === query && bText !== query)
248
+ return -1;
249
+ if (bText === query && aText !== query)
250
+ return 1;
251
+ // Prefix match has second highest priority
252
+ const aStartsWith = aText.startsWith(query);
253
+ const bStartsWith = bText.startsWith(query);
254
+ if (aStartsWith && !bStartsWith)
255
+ return -1;
256
+ if (bStartsWith && !aStartsWith)
257
+ return 1;
258
+ // With equal relevance: external suggestions before history
259
+ if (a.type === 'suggestion' && b.type === 'history')
260
+ return -1;
261
+ if (a.type === 'history' && b.type === 'suggestion')
262
+ return 1;
263
+ // Alphabetical sorting as last criterion
264
+ return aText.localeCompare(bText);
265
+ });
266
+ }
267
+ else {
268
+ // For empty query: Show only history (no external suggestions)
269
+ if (this.enableHistory && this.searchHistory.length > 0) {
270
+ const historySuggestions = this.searchHistory.map((term, index) => ({
271
+ id: `history-${index}`,
272
+ text: term,
273
+ type: 'history'
274
+ }));
275
+ suggestions = historySuggestions;
276
+ }
277
+ // For empty query DO NOT show external suggestions
278
+ }
279
+ // Remove duplicates based on text and scope combination (history takes precedence over external)
280
+ const uniqueSuggestions = suggestions.reduce((unique, current) => {
281
+ const existingIndex = unique.findIndex(item => item.text.toLowerCase() === current.text.toLowerCase() &&
282
+ item.scope === current.scope);
283
+ if (existingIndex === -1) {
284
+ unique.push(current);
285
+ }
286
+ else {
287
+ // If already exists, prefer history over external suggestions
288
+ if (current.type === 'history' && unique[existingIndex].type !== 'history') {
289
+ unique[existingIndex] = current;
290
+ }
291
+ }
292
+ return unique;
293
+ }, []);
294
+ this.filteredSuggestions = uniqueSuggestions.slice(0, this.maxSuggestions);
295
+ this.selectedSuggestionIndex = -1;
296
+ }
297
+ navigateSuggestions(direction) {
298
+ const maxIndex = this.filteredSuggestions.length - 1;
299
+ if (direction > 0) {
300
+ this.selectedSuggestionIndex = this.selectedSuggestionIndex < maxIndex
301
+ ? this.selectedSuggestionIndex + 1
302
+ : 0;
303
+ }
304
+ else {
305
+ this.selectedSuggestionIndex = this.selectedSuggestionIndex > 0
306
+ ? this.selectedSuggestionIndex - 1
307
+ : maxIndex;
308
+ }
309
+ }
310
+ selectSuggestion(suggestion) {
311
+ this.value = suggestion.text;
312
+ this.inputElement.value = suggestion.text;
313
+ this.ifxSuggestionSelected.emit(suggestion);
314
+ this.ifxInput.emit(this.value);
315
+ if (this.enableHistory) {
316
+ // Always add selected suggestions to history since they are valid results
317
+ this.addToHistory(suggestion.text);
318
+ }
319
+ this.hideDropdown();
320
+ }
321
+ hideDropdown() {
322
+ this.showDropdown = false;
323
+ this.selectedSuggestionIndex = -1;
324
+ this.isFocused = false;
325
+ }
326
+ // Show only history in dropdown (e.g. on focus without input)
327
+ showHistoryDropdown() {
328
+ if (this.enableHistory && this.searchHistory.length > 0) {
329
+ // Show only history entries
330
+ const historySuggestions = this.searchHistory.map((term, index) => ({
331
+ id: `history-${index}`,
332
+ text: term,
333
+ type: 'history'
334
+ }));
335
+ this.filteredSuggestions = historySuggestions.slice(0, this.maxSuggestions);
336
+ this.selectedSuggestionIndex = -1;
337
+ }
338
+ else {
339
+ this.filteredSuggestions = [];
340
+ }
341
+ }
342
+ // Check if only history entries are displayed (without text input)
343
+ isShowingOnlyHistory() {
344
+ return this.value.length === 0 &&
345
+ this.filteredSuggestions.length > 0 &&
346
+ this.filteredSuggestions.every(s => s.type === 'history');
347
+ }
348
+ // Render text with highlighted matches
349
+ renderHighlightedText(text, query) {
350
+ if (!query || query.length === 0) {
351
+ return text;
352
+ }
353
+ const lowerText = text.toLowerCase();
354
+ const lowerQuery = query.toLowerCase();
355
+ const index = lowerText.indexOf(lowerQuery);
356
+ if (index === -1) {
357
+ return text;
358
+ }
359
+ const before = text.substring(0, index);
360
+ const match = text.substring(index, index + query.length);
361
+ const after = text.substring(index + query.length);
362
+ return [
363
+ before,
364
+ h("strong", null, match),
365
+ after
366
+ ];
48
367
  }
49
368
  componentWillLoad() {
50
369
  if (!isNestedInIfxComponent(this.el)) {
@@ -59,7 +378,17 @@ const SearchField = class {
59
378
  this.showDeleteIconInternalState = false;
60
379
  }
61
380
  render() {
62
- return (h("div", { key: '751f042d0ec4d4a532d77de87b022c9eb1c47e7c', "aria-label": "a search field for user input", "aria-disabled": this.disabled, "aria-value": this.value, class: 'search-field' }, h("div", { key: '48e4b6518cdd4fd66fc6d4f24459fd729bd6d3a7', class: this.getWrapperClassNames(), tabindex: 1, onFocus: () => this.focusInput(), onClick: () => this.focusInput() }, h("ifx-icon", { key: '71353ae1d54505b0e50d248695f20059c0d0a44d', icon: "search-16", class: "search-icon" }), h("input", { key: 'c8d3c24435218e4219be7cb2bc7ee14ab314a728', ref: (el) => (this.inputElement = el), type: "text", autocomplete: this.autocomplete, onInput: () => this.handleInput(), placeholder: this.placeholder, disabled: this.disabled, maxlength: this.maxlength, value: this.value }), this.showDeleteIcon && this.showDeleteIconInternalState ? (h("ifx-icon", { icon: "cRemove16", class: "delete-icon", onClick: this.handleDelete })) : null)));
381
+ 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) => {
382
+ if (event.key === 'Enter' || event.key === ' ') {
383
+ event.preventDefault();
384
+ this.handleDelete();
385
+ }
386
+ } })) : 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) => {
387
+ if (event.key === 'Enter' || event.key === ' ') {
388
+ event.preventDefault();
389
+ this.handleHistoryDelete(event, suggestion.text);
390
+ }
391
+ } }))))))))));
63
392
  }
64
393
  getSizeClass() {
65
394
  return `${this.size}` === "s"
@@ -67,11 +396,19 @@ const SearchField = class {
67
396
  : "";
68
397
  }
69
398
  getWrapperClassNames() {
70
- return classNames(`search-field__wrapper`, `search-field__wrapper ${this.getSizeClass()}`, `${this.isFocused ? 'focused' : ""}`);
399
+ return classNames(`search-field__wrapper`, `search-field__wrapper ${this.getSizeClass()}`, `${this.isFocused ? 'focused' : ""}`, `${this.showDropdown ? 'dropdown-open' : ""}`);
400
+ }
401
+ getSuggestionClassNames(index) {
402
+ var _a;
403
+ return classNames('suggestion-item', {
404
+ 'suggestion-item--selected': index === this.selectedSuggestionIndex,
405
+ 'suggestion-item--history': ((_a = this.filteredSuggestions[index]) === null || _a === void 0 ? void 0 : _a.type) === 'history'
406
+ });
71
407
  }
72
408
  get el() { return getElement(this); }
73
409
  static get watchers() { return {
74
- "value": ["valueWatcher"]
410
+ "value": ["valueWatcher"],
411
+ "suggestions": ["suggestionsWatcher"]
75
412
  }; }
76
413
  };
77
414
  SearchField.style = IfxSearchFieldStyle0;
@@ -1 +1 @@
1
- {"file":"ifx-search-field.entry.js","mappings":";;;;;AAAA,MAAM,cAAc,GAAG,s0CAAs0C,CAAC;AAC91C,6BAAe,cAAc;;MCWhB,WAAW;IAPxB;;;QAU2B,UAAK,GAAW,EAAE,CAAC;QAGnC,mBAAc,GAAY,KAAK,CAAC;QAEjC,mBAAc,GAAY,KAAK,CAAC;QAC/B,gCAA2B,GAAY,KAAK,CAAC;QAC9C,aAAQ,GAAY,KAAK,CAAC;QAC1B,SAAI,GAAW,GAAG,CAAC;QAClB,cAAS,GAAY,KAAK,CAAC;QAC5B,gBAA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ow","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); // tokens.$ifxFontFamilyBody;\n\n\n\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}","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\n@Component({\n tag: 'ifx-search-field',\n styleUrl: 'search-field.scss',\n shadow: true\n})\n\n\nexport class SearchField {\n @Element() el;\n private inputElement: HTMLInputElement;\n @Prop({ mutable: true }) value: string = '';\n\n @Event() ifxInput: EventEmitter<String>;\n @State() insideDropdown: boolean = false;\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 = \"on\";\n @Prop() maxlength?: number = null; \n\n @Listen('mousedown', { target: 'document' })\n handleOutsideClick(event: MouseEvent) {\n const path = event.composedPath();\n if (!path.includes(this.inputElement)) {\n this.isFocused = false;\n }\n }\n\n @Watch('value')\n valueWatcher(newValue: string) {\n if (newValue !== this.inputElement.value) {\n this.inputElement.value = newValue;\n }\n }\n\n\n handleInput = () => {\n const query = this.inputElement.value;\n this.value = query; // update the value property when input changes\n this.ifxInput.emit(this.value);\n };\n\n handleDelete = () => {\n this.inputElement.value = '';\n this.value = \"\";\n this.ifxInput.emit(this.value);\n }\n\n focusInput() {\n this.inputElement.focus();\n this.isFocused = true;\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 aria-label=\"a search field for user input\" aria-disabled={this.disabled} aria-value={this.value} class='search-field'>\n <div class={this.getWrapperClassNames()}\n tabindex={1}\n onFocus={() => this.focusInput()}\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 placeholder={this.placeholder}\n disabled={this.disabled}\n maxlength={this.maxlength}\n value={this.value} // bind the value property to input element\n />\n {this.showDeleteIcon && this.showDeleteIconInternalState ? (\n <ifx-icon icon=\"cRemove16\" class=\"delete-icon\" onClick={this.handleDelete}>\n </ifx-icon>\n ) : null}\n </div>\n </div>\n );\n }\n\n getSizeClass() {\n return `${this.size}` === \"s\"\n ? \"search-field__wrapper-s\"\n : \"\";\n }\n\n\n getWrapperClassNames() {\n return classNames(\n `search-field__wrapper`,\n `search-field__wrapper ${this.getSizeClass()}`,\n `${this.isFocused ? 'focused' : \"\"}`\n );\n }\n}"],"version":3}
1
+ {"file":"ifx-search-field.entry.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,CAAC;QACvD,sBAAiB,GAAW,gCAAgC,CAAC;QAC7D,wBAAmB,GAAW,mBAAmB,CAAC;QAClD,yBAAoB,GAAW,qBAAqB,CAAC;QAQpD,iBAAY,GAAY,KAAK,CAAC;QAC9B,wBAAmB,GAAqB,EAAE,CAAC;QAC3C,4BAAuB,GAAW,CAAC,CAAC,CAAC;QACrC,kBAAa,GAAa,EAAE,CAAC;QAE9B,mBAAc,GAAY,KAAK,CAAC;QAC/B,gCAA2B,GAAY,KAAK,CAAC;QAC9C,aAAQ,GAAY,KAAK,CAAC;QAC1B,SAAI,GAAW,GAAG,CAAC;QAClB,cAAS,GAAY,KAAK,CAAC;QAC5B,gBAAW,GAAW,WAAW,CAAC;QAClC,iBAAY,GAAW,KAAK,CAAC;QAC7B,cAAS,GAAY,IAAI,CAAC;QAE1B,iBAAY,GAAY,KAAK,CAAC;Q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AU,CAAC,IAAI,EAAE,EAChE,OAAO,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,mBAAmB,CAAC,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,EACpE,SAAS,EAAE,CAAC,KAAK;gBACf,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE;oBAC9C,KAAK,CAAC,cAAc,EAAE,CAAC;oBACvB,IAAI,CAAC,mBAAmB,CAAC,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;iBAClD;aACF,GACS,CACb,CACG,CACF,CACP,CAAC,CACE,CACP,CACG,EACN;KACH;IAED,YAAY;QACV,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,KAAK,GAAG;cACzB,yBAAyB;cACzB,EAAE,CAAC;KACR;IAED,oBAAoB;QAClB,OAAO,UAAU,CACf,uBAAuB,EACvB,yBAAyB,IAAI,CAAC,YAAY,EAAE,EAAE,EAC9C,GAAG,IAAI,CAAC,SAAS,GAAG,SAAS,GAAG,EAAE,EAAE,EACpC,GAAG,IAAI,CAAC,YAAY,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}
@@ -24,7 +24,7 @@ const Segment = class {
24
24
  }
25
25
  }
26
26
  render() {
27
- return (h("div", { key: 'cd32486a1eaf991cdbf4717728d09c19fc16322e', class: `segment ${this.selected ? 'segment--selected' : ''}`, tabIndex: 0, onClick: () => { this.handleSegmentClick(); }, onKeyDown: (e) => { this.handleSegmentKeyDown(e); } }, h("ifx-icon", { key: 'eaeb02f3099d9e7d0274927e9260107735a22a32', icon: this.icon }), " ", h("slot", { key: 'b61db9f42bc7f29bb7f2c2e889578dcc5326d7fb' })));
27
+ return (h("div", { key: 'cd801960a7ce5e8112b0d544a0122ded889cfc1f', class: `segment ${this.selected ? 'segment--selected' : ''}`, tabIndex: 0, onClick: () => { this.handleSegmentClick(); }, onKeyDown: (e) => { this.handleSegmentKeyDown(e); } }, h("ifx-icon", { key: 'c81cddf4a652f00324cbc0b8a31c3598c1b62a08', icon: this.icon }), " ", h("slot", { key: '7b9786b4b20e69eaf30b5a6d140decff95e04423' })));
28
28
  }
29
29
  };
30
30
  Segment.style = IfxSegmentStyle0;
@@ -71,8 +71,8 @@ const SegmentedControl = class {
71
71
  this.setActiveSegment();
72
72
  }
73
73
  render() {
74
- return (h("div", { key: '8c1780af344dffffc19c77d792e9042e78fcc593', "aria-value": this.selectedValue, "aria-label": 'segmented control', class: 'group' }, h("div", { key: '46e02cd87e4e8405b9f56d528825ababece67ab4', class: 'group__label' }, this.label.trim()), h("div", { key: '6f22bad779bf49b1c529f0a0819b7d376d0fcabd', class: 'group__controls' }, h("slot", { key: '709e389aa809f791f742877e4340e39ac9823237' })), this.caption.trim() &&
75
- h("div", { key: '5867e46759016aa105c33e1801d564012dd4fdf4', class: 'group__caption' }, h("ifx-icon", { key: '34810bb0525a3bcfe63e0fa061d36dbb86277c64', icon: 'c-info-16' }), " ", this.caption.trim())));
74
+ return (h("div", { key: 'bc2036a6790cae8615960507499ad5f1b64b853e', "aria-value": this.selectedValue, "aria-label": 'segmented control', class: 'group' }, h("div", { key: 'ea2ae4f080c3df4ebf40347e744fe18b5f9dbb4f', class: 'group__label' }, this.label.trim()), h("div", { key: 'b1caeb01aff705bfba7edca4dcc79ad17e8a3db4', class: 'group__controls' }, h("slot", { key: '07bd91c190848509a903f040c0d3f388805d5909' })), this.caption.trim() &&
75
+ h("div", { key: '13564a2949a7c0eae1670c03748b5483fc3183ff', class: 'group__caption' }, h("ifx-icon", { key: 'c96889c4d84e1982f906ac9a85c67dcbbb1bcee9', icon: 'c-info-16' }), " ", this.caption.trim())));
76
76
  }
77
77
  componentDidRender() {
78
78
  this.setSegmentSize();
@@ -7059,9 +7059,9 @@ const Choices = class {
7059
7059
  // destroy choices element to restore previous dom structure
7060
7060
  // so vdom can replace the element correctly
7061
7061
  this.destroy();
7062
- return (h("div", { key: '2ccf501c56c78fd356fed117b4bb44fe77be8829', class: `ifx-select-container` }, this.label ? (h("div", { class: "ifx-label-wrapper" }, h("span", null, this.label))) : null, h("div", { key: '53bbb98f0883c7f8fb8cc116b38c44cb34741d5c', class: `${choicesWrapperClass}
7062
+ return (h("div", { key: '989f8686bda2308405dbb4e52cf093f2b0a09236', class: `ifx-select-container` }, this.label ? (h("div", { class: "ifx-label-wrapper" }, h("span", null, this.label))) : null, h("div", { key: '64446bc72f5809652435b13a8f750e462651b5f0', class: `${choicesWrapperClass}
7063
7063
  ${this.disabled ? 'disabled' : ''}
7064
- ${this.error ? 'error' : ''}`, onClick: this.disabled ? undefined : (e) => this.handleWrapperClick(e), onKeyDown: event => this.handleKeyDown(event) }, h("select", Object.assign({ key: '34d375bc3a7600508cf3d93d16b63f96d6fb7ebc', class: 'single__select-input-field', disabled: this.disabled }, attributes, { "data-trigger": true, onChange: () => this.handleChange() }), this.createSelectOptions(this.options)), h("div", { key: '97242805e3de170150e08c593414be2d8d089fcf', class: 'single__select-icon-container' }, this.optionIsSelected && (h("div", { key: 'c482d68cb5191866f9b62775e395a4f9277f873f', class: `ifx-choices__icon-wrapper-delete ${!this.showClearButton ? 'hide' : ''}` }, h("ifx-icon", { key: '077025751a43219ae3f0a84c81405de3f06e04b6', icon: "cRemove16", onClick: () => this.clearSelection() }))), h("div", { key: '515d5c8b0e692d93f1375a53be5b4e68bb837751', class: "ifx-choices__icon-wrapper-up" }, h("ifx-icon", { key: "icon-up", icon: "chevron-up-16" })), h("div", { key: '80dcd0cba4e22caf8548813e9aee2875055de382', class: "ifx-choices__icon-wrapper-down" }, h("ifx-icon", { key: "icon-down", icon: "chevron-down-16" })))), this.error ? (h("div", { class: "ifx-error-message-wrapper" }, h("span", null, this.errorMessage))) : null));
7064
+ ${this.error ? 'error' : ''}`, onClick: this.disabled ? undefined : (e) => this.handleWrapperClick(e), onKeyDown: event => this.handleKeyDown(event) }, h("select", Object.assign({ key: 'c340fa8536a38af2f087eb73cf8f96440d9db1e5', class: 'single__select-input-field', disabled: this.disabled }, attributes, { "data-trigger": true, onChange: () => this.handleChange() }), this.createSelectOptions(this.options)), h("div", { key: '8142a8181ad6298bcb519964e36b07d46be71de8', class: 'single__select-icon-container' }, this.optionIsSelected && (h("div", { key: 'a433cf815bff57a8fce8e985d9ec2b54f60bcd09', class: `ifx-choices__icon-wrapper-delete ${!this.showClearButton ? 'hide' : ''}` }, h("ifx-icon", { key: '203248c741de33f77d00dc1ec452d0fb8ae44985', icon: "cRemove16", onClick: () => this.clearSelection() }))), h("div", { key: '740c40db8702f422e0b615793914d22835f1567b', class: "ifx-choices__icon-wrapper-up" }, h("ifx-icon", { key: "icon-up", icon: "chevron-up-16" })), h("div", { key: '18f9457f4fb864e4f71a990b4f63ed293bb5dc82', class: "ifx-choices__icon-wrapper-down" }, h("ifx-icon", { key: "icon-down", icon: "chevron-down-16" })))), this.error ? (h("div", { class: "ifx-error-message-wrapper" }, h("span", null, this.errorMessage))) : null));
7065
7065
  }
7066
7066
  toggleDropdown() {
7067
7067
  const div = this.root.querySelector('.ifx-choices__wrapper');
@@ -147,10 +147,10 @@ const IfxSlider = class {
147
147
  this.updateValuePercent();
148
148
  }
149
149
  render() {
150
- return (h("div", { key: 'b0fb157c18dad8390958bda3f1578082b28a85df', class: "ifx-slider" }, this.leftText && (h("span", { key: '952fef0d00d49f93cf0481d13152fb5927d4944b', class: `left-text` }, this.leftText)), this.leftIcon && (h("ifx-icon", { key: '7fd0379e54ba8e4d74c01305a808850f85278988', icon: this.leftIcon, class: `left-icon${this.disabled ? ' disabled' : ''}` })), (this.type !== 'double') ?
150
+ return (h("div", { key: 'fcb669f490ff98494a358cf66cc9d1ef41aca2cc', class: "ifx-slider" }, this.leftText && (h("span", { key: '51f087894230659c820e5fad5d6ba3e7c723416c', class: `left-text` }, this.leftText)), this.leftIcon && (h("ifx-icon", { key: '5131d0c3cccc58f1a4f1aa9be977fda0901d1ca0', icon: this.leftIcon, class: `left-icon${this.disabled ? ' disabled' : ''}` })), (this.type !== 'double') ?
151
151
  h("input", { type: "range", min: this.min, max: this.max, step: this.step, value: this.internalValue, disabled: this.disabled, ref: (el) => (this.inputRef = el), onInput: (event) => this.handleInputChange(event), "aria-label": 'a slider', "aria-value": this.value, "aria-disabled": this.disabled })
152
152
  :
153
- h("div", { class: 'range-slider__wrapper', "aria-label": 'a range slider', "aria-value": this.value, "aria-disabled": this.disabled }, h("input", { id: 'min-slider', type: 'range', min: this.min, max: this.max, step: this.step, value: this.internalMinValue, disabled: this.disabled, ref: (el) => (this.minInputRef = el), onInput: (event) => this.handleInputChangeOfRangeSlider(event), onMouseUp: (event) => this.handleOnMouseLeaveOfRangeSlider(event) }), h("input", { id: 'max-slider', type: 'range', min: this.min, max: this.max, step: this.step, value: this.internalMaxValue, disabled: this.disabled, ref: (el) => (this.maxInputRef = el), onInput: (event) => this.handleInputChangeOfRangeSlider(event), onMouseUp: (event) => this.handleOnMouseLeaveOfRangeSlider(event) })), this.rightIcon && (h("ifx-icon", { key: '620761fefb91d14646333196e8fdbe26bfbffea8', icon: this.rightIcon, class: `right-icon${this.disabled ? ' disabled' : ''}` })), this.rightText && (h("span", { key: '6c83f7ab6a2f55dafab518e99113a983cc3ebfbf', class: `right-text${this.disabled ? ' disabled' : ''}` }, this.rightText)), this.showPercentage && (this.type !== "double") && (h("span", { key: '5e5b5df15316e3c41534555ff94bde9c4c0385d2', class: `percentage-display${this.disabled ? ' disabled' : ''}` }, this.percentage, "%"))));
153
+ h("div", { class: 'range-slider__wrapper', "aria-label": 'a range slider', "aria-value": this.value, "aria-disabled": this.disabled }, h("input", { id: 'min-slider', type: 'range', min: this.min, max: this.max, step: this.step, value: this.internalMinValue, disabled: this.disabled, ref: (el) => (this.minInputRef = el), onInput: (event) => this.handleInputChangeOfRangeSlider(event), onMouseUp: (event) => this.handleOnMouseLeaveOfRangeSlider(event) }), h("input", { id: 'max-slider', type: 'range', min: this.min, max: this.max, step: this.step, value: this.internalMaxValue, disabled: this.disabled, ref: (el) => (this.maxInputRef = el), onInput: (event) => this.handleInputChangeOfRangeSlider(event), onMouseUp: (event) => this.handleOnMouseLeaveOfRangeSlider(event) })), this.rightIcon && (h("ifx-icon", { key: '2462b04f95055a00322dde99289445a275cf52c2', icon: this.rightIcon, class: `right-icon${this.disabled ? ' disabled' : ''}` })), this.rightText && (h("span", { key: '834eac1450738b63d611818b079a7124f9e4b26a', class: `right-text${this.disabled ? ' disabled' : ''}` }, this.rightText)), this.showPercentage && (this.type !== "double") && (h("span", { key: '7d9265c3ad19d6585984da7c432ab2eddfb0e51f', class: `percentage-display${this.disabled ? ' disabled' : ''}` }, this.percentage, "%"))));
154
154
  }
155
155
  get el() { return getElement(this); }
156
156
  static get watchers() { return {