@infineon/infineon-design-system-stencil 30.9.2--canary.1640.e43988106d4b26dd629292540be9d5e4b6980d07.0 → 30.9.2--canary.1673.aae465494350113a03d5687dfe66c3823dc98f42.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 (291) hide show
  1. package/dist/cjs/ifx-accordion_2.cjs.entry.js +7 -7
  2. package/dist/cjs/ifx-accordion_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/ifx-breadcrumb-item-label.cjs.entry.js +2 -2
  4. package/dist/cjs/ifx-breadcrumb-item-label.cjs.entry.js.map +1 -1
  5. package/dist/cjs/ifx-breadcrumb.cjs.entry.js +3 -3
  6. package/dist/cjs/ifx-breadcrumb.cjs.entry.js.map +1 -1
  7. package/dist/cjs/ifx-chip_3.cjs.entry.js +22 -20
  8. package/dist/cjs/ifx-chip_3.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ifx-modal.cjs.entry.js +8 -8
  10. package/dist/cjs/ifx-modal.cjs.entry.js.map +1 -1
  11. package/dist/cjs/ifx-multiselect_2.cjs.entry.js +5 -5
  12. package/dist/cjs/ifx-multiselect_2.cjs.entry.js.map +1 -1
  13. package/dist/cjs/ifx-navbar.cjs.entry.js +3 -3
  14. package/dist/cjs/ifx-navbar.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ifx-search-bar.cjs.entry.js +5 -5
  16. package/dist/cjs/ifx-search-bar.cjs.entry.js.map +1 -1
  17. package/dist/cjs/ifx-sidebar-item.cjs.entry.js +10 -9
  18. package/dist/cjs/ifx-sidebar-item.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ifx-table.cjs.entry.js +20 -22
  20. package/dist/cjs/ifx-table.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ifx-tabs.cjs.entry.js +6 -6
  22. package/dist/cjs/ifx-tabs.cjs.entry.js.map +1 -1
  23. package/dist/cjs/infineon-design-system-stencil.cjs.js +1 -1
  24. package/dist/cjs/loader.cjs.js +1 -1
  25. package/dist/collection/components/accordion/accordion.js +2 -2
  26. package/dist/collection/components/accordion/accordion.js.map +1 -1
  27. package/dist/collection/components/accordion/accordion.stories.js +7 -81
  28. package/dist/collection/components/accordion/accordion.stories.js.map +1 -1
  29. package/dist/collection/components/accordion/accordionItem.js +10 -10
  30. package/dist/collection/components/accordion/accordionItem.js.map +1 -1
  31. package/dist/collection/components/alert/alert.stories.js +12 -45
  32. package/dist/collection/components/alert/alert.stories.js.map +1 -1
  33. package/dist/collection/components/badge/badge.stories.js +7 -28
  34. package/dist/collection/components/badge/badge.stories.js.map +1 -1
  35. package/dist/collection/components/breadcrumb/breadcrumb-item-label.js +4 -4
  36. package/dist/collection/components/breadcrumb/breadcrumb-item-label.js.map +1 -1
  37. package/dist/collection/components/breadcrumb/breadcrumb.js +3 -3
  38. package/dist/collection/components/breadcrumb/breadcrumb.js.map +1 -1
  39. package/dist/collection/components/breadcrumb/breadcrumb.stories.js +13 -87
  40. package/dist/collection/components/breadcrumb/breadcrumb.stories.js.map +1 -1
  41. package/dist/collection/components/button/button.stories.js +9 -101
  42. package/dist/collection/components/button/button.stories.js.map +1 -1
  43. package/dist/collection/components/card/card.stories.js +3 -84
  44. package/dist/collection/components/card/card.stories.js.map +1 -1
  45. package/dist/collection/components/checkbox/checkbox.stories.js +14 -72
  46. package/dist/collection/components/checkbox/checkbox.stories.js.map +1 -1
  47. package/dist/collection/components/chip/chip-item/chip-item.js +4 -4
  48. package/dist/collection/components/chip/chip-item/chip-item.js.map +1 -1
  49. package/dist/collection/components/chip/chip.js +16 -16
  50. package/dist/collection/components/chip/chip.js.map +1 -1
  51. package/dist/collection/components/chip/chip.stories.js +26 -18
  52. package/dist/collection/components/chip/chip.stories.js.map +1 -1
  53. package/dist/collection/components/chip/interfaces.js.map +1 -1
  54. package/dist/collection/components/content-switcher/content-switcher.stories.js +3 -65
  55. package/dist/collection/components/content-switcher/content-switcher.stories.js.map +1 -1
  56. package/dist/collection/components/date-picker/date-picker.stories.js +7 -95
  57. package/dist/collection/components/date-picker/date-picker.stories.js.map +1 -1
  58. package/dist/collection/components/dropdown/dropdown.stories.js +64 -222
  59. package/dist/collection/components/dropdown/dropdown.stories.js.map +1 -1
  60. package/dist/collection/components/footer/footer.stories.js +1 -7
  61. package/dist/collection/components/footer/footer.stories.js.map +1 -1
  62. package/dist/collection/components/icon/infineonIconStencil.stories.js +2 -7
  63. package/dist/collection/components/icon/infineonIconStencil.stories.js.map +1 -1
  64. package/dist/collection/components/icon-button/icon-button.stories.js +5 -61
  65. package/dist/collection/components/icon-button/icon-button.stories.js.map +1 -1
  66. package/dist/collection/components/link/link.stories.js +4 -53
  67. package/dist/collection/components/link/link.stories.js.map +1 -1
  68. package/dist/collection/components/modal/modal.js +10 -10
  69. package/dist/collection/components/modal/modal.js.map +1 -1
  70. package/dist/collection/components/modal/modal.stories.js +19 -96
  71. package/dist/collection/components/modal/modal.stories.js.map +1 -1
  72. package/dist/collection/components/navigation/navbar/navbar.js +4 -4
  73. package/dist/collection/components/navigation/navbar/navbar.js.map +1 -1
  74. package/dist/collection/components/navigation/navbar/navbar.stories.js +12 -176
  75. package/dist/collection/components/navigation/navbar/navbar.stories.js.map +1 -1
  76. package/dist/collection/components/navigation/sidebar/sidebar-item.js +32 -11
  77. package/dist/collection/components/navigation/sidebar/sidebar-item.js.map +1 -1
  78. package/dist/collection/components/navigation/sidebar/sidebar.stories.js +19 -183
  79. package/dist/collection/components/navigation/sidebar/sidebar.stories.js.map +1 -1
  80. package/dist/collection/components/notification/notification.stories.js +8 -55
  81. package/dist/collection/components/notification/notification.stories.js.map +1 -1
  82. package/dist/collection/components/number-indicator/number-indicator.stories.js +0 -19
  83. package/dist/collection/components/number-indicator/number-indicator.stories.js.map +1 -1
  84. package/dist/collection/components/pagination/pagination.js +31 -1
  85. package/dist/collection/components/pagination/pagination.js.map +1 -1
  86. package/dist/collection/components/pagination/pagination.stories.js +14 -19
  87. package/dist/collection/components/pagination/pagination.stories.js.map +1 -1
  88. package/dist/collection/components/progress-bar/progress-bar.stories.js +8 -31
  89. package/dist/collection/components/progress-bar/progress-bar.stories.js.map +1 -1
  90. package/dist/collection/components/radio-button/radio-button.stories.js +13 -66
  91. package/dist/collection/components/radio-button/radio-button.stories.js.map +1 -1
  92. package/dist/collection/components/search-bar/search-bar.js +6 -6
  93. package/dist/collection/components/search-bar/search-bar.js.map +1 -1
  94. package/dist/collection/components/search-bar/search-bar.stories.js +9 -58
  95. package/dist/collection/components/search-bar/search-bar.stories.js.map +1 -1
  96. package/dist/collection/components/search-field/search-field.stories.js +8 -54
  97. package/dist/collection/components/search-field/search-field.stories.js.map +1 -1
  98. package/dist/collection/components/segmented-control/segmented-control.stories.js +10 -1
  99. package/dist/collection/components/segmented-control/segmented-control.stories.js.map +1 -1
  100. package/dist/collection/components/select/multi-select/multiselect.js +6 -6
  101. package/dist/collection/components/select/multi-select/multiselect.js.map +1 -1
  102. package/dist/collection/components/select/multi-select/multiselect.stories.js +5 -131
  103. package/dist/collection/components/select/multi-select/multiselect.stories.js.map +1 -1
  104. package/dist/collection/components/select/single-select/select.stories.js +26 -83
  105. package/dist/collection/components/select/single-select/select.stories.js.map +1 -1
  106. package/dist/collection/components/slider/slider.stories.js +13 -97
  107. package/dist/collection/components/slider/slider.stories.js.map +1 -1
  108. package/dist/collection/components/spinner/spinner.stories.js +2 -34
  109. package/dist/collection/components/spinner/spinner.stories.js.map +1 -1
  110. package/dist/collection/components/status/status.stories.js +1 -25
  111. package/dist/collection/components/status/status.stories.js.map +1 -1
  112. package/dist/collection/components/stepper/stepper.stories.js +25 -54
  113. package/dist/collection/components/stepper/stepper.stories.js.map +1 -1
  114. package/dist/collection/components/switch/switch.stories.js +4 -51
  115. package/dist/collection/components/switch/switch.stories.js.map +1 -1
  116. package/dist/collection/components/table-advanced-version/table.js +21 -23
  117. package/dist/collection/components/table-advanced-version/table.js.map +1 -1
  118. package/dist/collection/components/table-advanced-version/table.stories.js +39 -124
  119. package/dist/collection/components/table-advanced-version/table.stories.js.map +1 -1
  120. package/dist/collection/components/table-basic-version/table.stories.js +3 -30
  121. package/dist/collection/components/table-basic-version/table.stories.js.map +1 -1
  122. package/dist/collection/components/tabs/tabs.js +7 -7
  123. package/dist/collection/components/tabs/tabs.js.map +1 -1
  124. package/dist/collection/components/tabs/tabs.stories.js +29 -104
  125. package/dist/collection/components/tabs/tabs.stories.js.map +1 -1
  126. package/dist/collection/components/tag/tag.stories.js +0 -18
  127. package/dist/collection/components/tag/tag.stories.js.map +1 -1
  128. package/dist/collection/components/text-field/text-field.stories.js +13 -116
  129. package/dist/collection/components/text-field/text-field.stories.js.map +1 -1
  130. package/dist/collection/components/textarea/textarea.stories.js +3 -1
  131. package/dist/collection/components/textarea/textarea.stories.js.map +1 -1
  132. package/dist/collection/components/tooltip/tooltip.stories.js +4 -48
  133. package/dist/collection/components/tooltip/tooltip.stories.js.map +1 -1
  134. package/dist/components/ifx-accordion-item.js +1 -1
  135. package/dist/components/ifx-accordion.js +1 -1
  136. package/dist/components/ifx-breadcrumb-item-label.js +3 -3
  137. package/dist/components/ifx-breadcrumb-item-label.js.map +1 -1
  138. package/dist/components/ifx-breadcrumb.js +3 -3
  139. package/dist/components/ifx-breadcrumb.js.map +1 -1
  140. package/dist/components/ifx-chip-item.js +1 -1
  141. package/dist/components/ifx-chip.js +1 -1
  142. package/dist/components/ifx-faq.js +2 -2
  143. package/dist/components/ifx-modal.js +8 -8
  144. package/dist/components/ifx-modal.js.map +1 -1
  145. package/dist/components/ifx-multiselect.js +1 -1
  146. package/dist/components/ifx-navbar.js +4 -4
  147. package/dist/components/ifx-navbar.js.map +1 -1
  148. package/dist/components/ifx-pagination.js +1 -1
  149. package/dist/components/ifx-search-bar.js +5 -5
  150. package/dist/components/ifx-search-bar.js.map +1 -1
  151. package/dist/components/ifx-set-filter.js +1 -1
  152. package/dist/components/ifx-sidebar-item.js +13 -11
  153. package/dist/components/ifx-sidebar-item.js.map +1 -1
  154. package/dist/components/ifx-table.js +24 -26
  155. package/dist/components/ifx-table.js.map +1 -1
  156. package/dist/components/ifx-tabs.js +6 -6
  157. package/dist/components/ifx-tabs.js.map +1 -1
  158. package/dist/components/{p-cf8fd0f4.js → p-04b73e62.js} +6 -6
  159. package/dist/components/p-04b73e62.js.map +1 -0
  160. package/dist/components/{p-3baaa460.js → p-094bb435.js} +3 -3
  161. package/dist/components/{p-3baaa460.js.map → p-094bb435.js.map} +1 -1
  162. package/dist/components/{p-7b5e297f.js → p-23cdd5a7.js} +5 -5
  163. package/dist/components/p-23cdd5a7.js.map +1 -0
  164. package/dist/components/{p-b85fba0e.js → p-2f1e7628.js} +4 -2
  165. package/dist/components/p-2f1e7628.js.map +1 -0
  166. package/dist/components/{p-053d42ef.js → p-b2439194.js} +8 -8
  167. package/dist/components/{p-053d42ef.js.map → p-b2439194.js.map} +1 -1
  168. package/dist/components/{p-793d89e7.js → p-c1f3a68c.js} +16 -16
  169. package/dist/components/p-c1f3a68c.js.map +1 -0
  170. package/dist/esm/ifx-accordion_2.entry.js +7 -7
  171. package/dist/esm/ifx-accordion_2.entry.js.map +1 -1
  172. package/dist/esm/ifx-breadcrumb-item-label.entry.js +2 -2
  173. package/dist/esm/ifx-breadcrumb-item-label.entry.js.map +1 -1
  174. package/dist/esm/ifx-breadcrumb.entry.js +3 -3
  175. package/dist/esm/ifx-breadcrumb.entry.js.map +1 -1
  176. package/dist/esm/ifx-chip_3.entry.js +22 -20
  177. package/dist/esm/ifx-chip_3.entry.js.map +1 -1
  178. package/dist/esm/ifx-modal.entry.js +8 -8
  179. package/dist/esm/ifx-modal.entry.js.map +1 -1
  180. package/dist/esm/ifx-multiselect_2.entry.js +5 -5
  181. package/dist/esm/ifx-multiselect_2.entry.js.map +1 -1
  182. package/dist/esm/ifx-navbar.entry.js +3 -3
  183. package/dist/esm/ifx-navbar.entry.js.map +1 -1
  184. package/dist/esm/ifx-search-bar.entry.js +5 -5
  185. package/dist/esm/ifx-search-bar.entry.js.map +1 -1
  186. package/dist/esm/ifx-sidebar-item.entry.js +10 -9
  187. package/dist/esm/ifx-sidebar-item.entry.js.map +1 -1
  188. package/dist/esm/ifx-table.entry.js +20 -22
  189. package/dist/esm/ifx-table.entry.js.map +1 -1
  190. package/dist/esm/ifx-tabs.entry.js +6 -6
  191. package/dist/esm/ifx-tabs.entry.js.map +1 -1
  192. package/dist/esm/infineon-design-system-stencil.js +1 -1
  193. package/dist/esm/loader.js +1 -1
  194. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
  195. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js.map +1 -1
  196. package/dist/infineon-design-system-stencil/{p-602edb1f.entry.js → p-00d6e46e.entry.js} +2 -2
  197. package/dist/infineon-design-system-stencil/p-00d6e46e.entry.js.map +1 -0
  198. package/dist/infineon-design-system-stencil/p-222c1af9.entry.js +2 -0
  199. package/dist/infineon-design-system-stencil/p-222c1af9.entry.js.map +1 -0
  200. package/dist/infineon-design-system-stencil/p-28fb795b.entry.js +2 -0
  201. package/dist/infineon-design-system-stencil/{p-26df4dfe.entry.js.map → p-28fb795b.entry.js.map} +1 -1
  202. package/dist/infineon-design-system-stencil/p-436babb8.entry.js +2 -0
  203. package/dist/infineon-design-system-stencil/p-436babb8.entry.js.map +1 -0
  204. package/dist/infineon-design-system-stencil/p-7bef9272.entry.js +2 -0
  205. package/dist/infineon-design-system-stencil/p-7bef9272.entry.js.map +1 -0
  206. package/dist/infineon-design-system-stencil/p-89c7209f.entry.js +2 -0
  207. package/dist/infineon-design-system-stencil/p-89c7209f.entry.js.map +1 -0
  208. package/dist/infineon-design-system-stencil/{p-df5cd362.entry.js → p-91f91586.entry.js} +2 -2
  209. package/dist/infineon-design-system-stencil/p-91f91586.entry.js.map +1 -0
  210. package/dist/infineon-design-system-stencil/p-9481adc8.entry.js +2 -0
  211. package/dist/infineon-design-system-stencil/p-9481adc8.entry.js.map +1 -0
  212. package/dist/infineon-design-system-stencil/p-ad3db607.entry.js +2 -0
  213. package/dist/infineon-design-system-stencil/p-ad3db607.entry.js.map +1 -0
  214. package/dist/infineon-design-system-stencil/{p-d93eb561.entry.js → p-bc8a4226.entry.js} +2 -2
  215. package/dist/infineon-design-system-stencil/p-bc8a4226.entry.js.map +1 -0
  216. package/dist/infineon-design-system-stencil/p-dc7deb14.entry.js +2 -0
  217. package/dist/infineon-design-system-stencil/p-dc7deb14.entry.js.map +1 -0
  218. package/dist/types/components/accordion/accordion.stories.d.ts +1 -67
  219. package/dist/types/components/accordion/accordionItem.d.ts +3 -3
  220. package/dist/types/components/alert/alert.stories.d.ts +11 -38
  221. package/dist/types/components/badge/badge.stories.d.ts +3 -23
  222. package/dist/types/components/breadcrumb/breadcrumb-item-label.d.ts +1 -1
  223. package/dist/types/components/breadcrumb/breadcrumb.stories.d.ts +1 -83
  224. package/dist/types/components/button/button.stories.d.ts +16 -92
  225. package/dist/types/components/card/card.stories.d.ts +1 -95
  226. package/dist/types/components/checkbox/checkbox.stories.d.ts +10 -65
  227. package/dist/types/components/chip/chip-item/chip-item.d.ts +1 -1
  228. package/dist/types/components/chip/chip.d.ts +1 -1
  229. package/dist/types/components/chip/chip.stories.d.ts +4 -11
  230. package/dist/types/components/chip/interfaces.d.ts +1 -1
  231. package/dist/types/components/content-switcher/content-switcher.stories.d.ts +0 -66
  232. package/dist/types/components/date-picker/date-picker.stories.d.ts +2 -88
  233. package/dist/types/components/dropdown/dropdown.stories.d.ts +33 -90
  234. package/dist/types/components/footer/footer.stories.d.ts +0 -4
  235. package/dist/types/components/icon/infineonIconStencil.stories.d.ts +0 -5
  236. package/dist/types/components/icon-button/icon-button.stories.d.ts +8 -56
  237. package/dist/types/components/link/link.stories.d.ts +6 -49
  238. package/dist/types/components/modal/modal.d.ts +2 -2
  239. package/dist/types/components/modal/modal.stories.d.ts +3 -77
  240. package/dist/types/components/navigation/navbar/navbar.stories.d.ts +6 -222
  241. package/dist/types/components/navigation/sidebar/sidebar-item.d.ts +3 -2
  242. package/dist/types/components/navigation/sidebar/sidebar.stories.d.ts +7 -158
  243. package/dist/types/components/notification/notification.stories.d.ts +2 -46
  244. package/dist/types/components/number-indicator/number-indicator.stories.d.ts +0 -19
  245. package/dist/types/components/pagination/pagination.d.ts +2 -0
  246. package/dist/types/components/pagination/pagination.stories.d.ts +7 -12
  247. package/dist/types/components/progress-bar/progress-bar.stories.d.ts +4 -25
  248. package/dist/types/components/radio-button/radio-button.stories.d.ts +8 -59
  249. package/dist/types/components/search-bar/search-bar.d.ts +1 -1
  250. package/dist/types/components/search-bar/search-bar.stories.d.ts +3 -60
  251. package/dist/types/components/search-field/search-field.stories.d.ts +6 -45
  252. package/dist/types/components/segmented-control/segmented-control.stories.d.ts +3 -0
  253. package/dist/types/components/select/multi-select/multiselect.d.ts +1 -1
  254. package/dist/types/components/select/multi-select/multiselect.stories.d.ts +0 -125
  255. package/dist/types/components/select/single-select/select.stories.d.ts +24 -67
  256. package/dist/types/components/slider/slider.stories.d.ts +0 -110
  257. package/dist/types/components/spinner/spinner.stories.d.ts +0 -32
  258. package/dist/types/components/status/status.stories.d.ts +2 -24
  259. package/dist/types/components/stepper/stepper.stories.d.ts +6 -30
  260. package/dist/types/components/switch/switch.stories.d.ts +1 -47
  261. package/dist/types/components/table-advanced-version/table.stories.d.ts +11 -50
  262. package/dist/types/components/table-basic-version/table.stories.d.ts +1 -21
  263. package/dist/types/components/tabs/tabs.d.ts +1 -1
  264. package/dist/types/components/tabs/tabs.stories.d.ts +9 -88
  265. package/dist/types/components/tag/tag.stories.d.ts +0 -20
  266. package/dist/types/components/text-field/text-field.stories.d.ts +10 -106
  267. package/dist/types/components/tooltip/tooltip.stories.d.ts +6 -41
  268. package/dist/types/components.d.ts +26 -20
  269. package/package.json +1 -1
  270. package/dist/components/p-793d89e7.js.map +0 -1
  271. package/dist/components/p-7b5e297f.js.map +0 -1
  272. package/dist/components/p-b85fba0e.js.map +0 -1
  273. package/dist/components/p-cf8fd0f4.js.map +0 -1
  274. package/dist/infineon-design-system-stencil/p-26df4dfe.entry.js +0 -2
  275. package/dist/infineon-design-system-stencil/p-355cea09.entry.js +0 -2
  276. package/dist/infineon-design-system-stencil/p-355cea09.entry.js.map +0 -1
  277. package/dist/infineon-design-system-stencil/p-602edb1f.entry.js.map +0 -1
  278. package/dist/infineon-design-system-stencil/p-60dcd508.entry.js +0 -2
  279. package/dist/infineon-design-system-stencil/p-60dcd508.entry.js.map +0 -1
  280. package/dist/infineon-design-system-stencil/p-68752789.entry.js +0 -2
  281. package/dist/infineon-design-system-stencil/p-68752789.entry.js.map +0 -1
  282. package/dist/infineon-design-system-stencil/p-6a274db4.entry.js +0 -2
  283. package/dist/infineon-design-system-stencil/p-6a274db4.entry.js.map +0 -1
  284. package/dist/infineon-design-system-stencil/p-71fda335.entry.js +0 -2
  285. package/dist/infineon-design-system-stencil/p-71fda335.entry.js.map +0 -1
  286. package/dist/infineon-design-system-stencil/p-7741e81d.entry.js +0 -2
  287. package/dist/infineon-design-system-stencil/p-7741e81d.entry.js.map +0 -1
  288. package/dist/infineon-design-system-stencil/p-d93eb561.entry.js.map +0 -1
  289. package/dist/infineon-design-system-stencil/p-df5cd362.entry.js.map +0 -1
  290. package/dist/infineon-design-system-stencil/p-df6cadc1.entry.js +0 -2
  291. package/dist/infineon-design-system-stencil/p-df6cadc1.entry.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"names":["navbarCss","IfxNavbarStyle0","Navbar","addEventListenersToHandleCustomFocusState","element","this","el","shadowRoot","firstChild","console","error","tabIndex","aElements","querySelectorAll","i","length","slot","querySelector","assignedNodes","node","nodeName","navbarItem","clearFirstLayerMenu","event","detail","action","leftMenuItems","getMobileMenuTop","isSameNode","component","hideComponent","parent","children","toggleFirstLayerItem","showComponent","getWrappers","searchBarRightWrapper","searchBarLeftWrapper","rightSideSlot","leftSideSlot","rightAssignedNodes","leftAssignedNodes","navbarProfile","rightMenuItems","topRowWrapper","hideNavItems","searchBarIsOpen","l","classList","contains","r","hideOnMobile","showNavItems","undefined","handleSearchBarToggle","toggleClass","className","toggle","handleSidebar","sidebarIconWrapper","currentTarget","closest","sidebarIconOpen","sidebarIconClose","mainContainer","navbarWrapper","sidebarWrapper","handleBodyScroll","body","fixed","style","overflow","handleDropdownMenu","dropdownWrapper","iconWrapper","setItemMenuPosition","navbarItems","itemChildren","forEach","item","setMenuItemPosition","setMenuItemChildrenPosition","hasNestedItems","setItemSideSpecifications","subItem","getMediaQueryList","mediaQueryList","window","matchMedia","componentDidLoad","matches","moveNavItemsToSidebar","handleMobileMenuBottom","e","mobileMenuBottomWrapper","slotElement","target","nodes","add","remove","handleLogoHrefAndTarget","logoHref","trim","internalLogoHref","includes","logoHrefTarget","internalLogoHrefTarget","componentWillLoad","RemoveSpaceOnStorybookSnippet","dropdownMenu","hasLeftMenuItems","addEventListener","getSearchBarLeftWrapper","getMobileMenuBottom","handleBurgerIcon","burgerIconWrapper","crossIcon","searchBarLeft","onNavbarMobile","setAttribute","moveChildComponentsIntoSubLayerMenu","tagName","toUpperCase","showLabel","toggleChildren","leftIsInitial","searchBarRight","moveChildComponentsBackIntoNavbar","navbarProfileItem","showProfileItemLabel","getAttribute","parentElement","storybookWrapper","render","h","key","class","showLogoAndAppname","href","width","height","viewBox","fill","xmlns","d","id","applicationName","name","onClick","bind","icon","onSlotchange"],"sources":["src/components/navigation/navbar/navbar.scss?tag=ifx-navbar&encapsulation=shadow","src/components/navigation/navbar/navbar.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../../global/font.scss\";\n\n:host {\n width: 100%;\n display: block;\n}\n\n\n.navbar__wrapper {\n font-family: var(--ifx-font-family);\n height: 63px;\n position: sticky;\n //overflow: hidden;\n z-index: 1030;\n border-bottom: 1px solid #EEEDED;\n\n &.fixed {\n border-bottom: none;\n }\n\n // border-bottom: 1px solid #EEEDED; //when fixed is false\n}\n\n.navbar__main-container {\n position: absolute;\n top: 0;\n width: 100%;\n //overflow: hidden;\n transition: all 1s;\n z-index: 1020;\n\n &.fixed {\n position: fixed;\n\n & .navbar__container {\n border-bottom: 1px solid #EEEDED;\n }\n }\n\n &.show {\n height: 100vh;\n bottom: 0;\n background-color: tokens.$ifxColorOverlayDark;\n transition: 1s;\n z-index: 1;\n }\n}\n\n.navbar__sidebar {\n box-sizing: border-box;\n position: fixed;\n right: -100%;\n top: 64px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n // padding: 32px;\n width: 375px;\n height: calc(100vh - 64px);\n background-color: tokens.$ifxColorBaseWhite;\n transition: right 1s;\n z-index: 1030;\n\n &.show {\n right: 0;\n transition: right 1s;\n }\n\n & .navbar__sidebar-top-row { \n display: flex;\n padding: var(--borderRadius-none, 0px) var(--space-300, 24px) 30px var(--space-300, 24px);\n flex-direction: column;\n align-items: flex-start;\n gap: var(--space-200, 16px);\n flex: 1 0 0;\n align-self: stretch;\n\n overflow-y: auto;\n\n & .navbar__sidebar-top-row-wrapper { \n display: flex;\n padding-top: var(--space-200, 16px);\n flex-direction: column;\n align-items: flex-start;\n align-self: stretch;\n gap: 16px;\n\n &.expand { \n align-items: initial;\n }\n\n & .navbar__sidebar-top-row-item { \n display: flex;\n padding: var(--space-200, 0px) var(--space-50, 4px) var(--space-200, 0px) 0px;\n align-items: center;\n gap: var(--space-100, 8px);\n align-self: stretch;\n justify-content: space-between;\n\n & .navbar__sidebar-top-row-item-icon-wrapper { \n & ifx-icon { \n vertical-align: middle;\n }\n }\n \n \n &:hover { \n cursor: pointer;\n }\n \n & .navbar__sidebar-top-row-item-label { \n color: var(--color-base-black, #1D1D1D);\n font-family: \"Source Sans 3\";\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 24px; \n }\n \n }\n }\n\n }\n\n & .navbar__sidebar-bottom-row { \n //display: flex;\n display: none;\n padding: var(--space-150, 12px) var(--space-300, 24px) var(--space-150, 12px) var(--space-200, 16px);\n flex-direction: column;\n align-items: flex-start;\n align-self: stretch;\n background: var(--color-engineering-100, #F7F7F7);\n border-top: 1px solid var(--color-engineering-200, #EEEDED);\n gap: 10px;\n\n max-height: 160px;\n overflow-y: auto;\n\n &.show { \n display: flex;\n }\n \n\n & .navbar__sidebar-bottom-row-item { \n display: flex;\n height: 40px;\n padding-right: var(--space-50, 4px);\n align-items: center;\n gap: var(--space-100, 8px);\n flex: 1 0 0;\n \n & .navbar__sidebar-bottom-row-item-label {\n color: var(--color-base-black, #1D1D1D);\n font-family: \"Source Sans 3\";\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 24px; \n }\n\n & .navbar__sidebar-bottom-row-item-icon-wrapper { \n display: flex;\n align-items: center;\n }\n }\n\n }\n\n\n & .navbar__sidebar-content-products,\n & .navbar__sidebar-content-main {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 0px;\n gap: 24px;\n flex: none;\n order: 0;\n align-self: stretch;\n flex-grow: 0;\n\n & .navbar__sidebar-content-products-header,\n & .navbar__sidebar-content-about-header {\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0px;\n gap: 16px;\n flex: none;\n order: 0;\n align-self: stretch;\n flex-grow: 0;\n color: #BFBBBB;\n\n & span {\n color: tokens.$ifxColorBaseBlack;\n font-weight: 600;\n font-size: 18px;\n line-height: 28px;\n display: flex;\n align-items: center;\n }\n }\n\n & .navbar__sidebar-content-products-menu,\n & .navbar__sidebar-content-main-menu {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 0px;\n gap: 16px;\n flex: none;\n order: 1;\n flex-grow: 0;\n width: 100%;\n\n & .navbar__sidebar-content-products-menu-item,\n & .navbar__sidebar-content-main-menu-item {\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0px;\n flex: none;\n order: 0;\n flex-grow: 0;\n\n & a {\n text-decoration: none;\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n line-height: 24px;\n display: flex;\n align-items: center;\n color: tokens.$ifxColorBaseBlack;\n }\n }\n\n & .navbar__sidebar-content-main-menu-item {\n color: tokens.$ifxColorEngineering300;\n\n & a {\n font-style: normal;\n font-weight: 600;\n font-size: 18px;\n line-height: 28px;\n display: flex;\n align-items: center;\n color: tokens.$ifxColorBaseBlack;\n flex: none;\n order: 0;\n flex-grow: 1;\n }\n }\n }\n\n & .navbar__sidebar-content-main-menu {\n align-items: normal;\n }\n }\n}\n\n.navbar__container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 8px 40px;\n gap: 16px;\n background-color: tokens.$ifxColorBaseWhite;\n font-family: var(--ifx-font-family);\n\n &.expanded { \n justify-content: initial;\n }\n\n // &.fixed { \n // border-bottom: 1px solid #EEEDED; //when fixed is true\n // }\n\n & .navbar__container-search-field-wrapper { \n display: none;\n\n &.show { \n display: flex;\n }\n }\n\n & .navbar__container-left {\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0;\n gap: 16px;\n flex: none;\n order: 0;\n flex-grow: 0;\n\n &.hide {\n display: none;\n }\n\n &.expand { \n justify-content: initial;\n flex: 1;\n & .navbar__container-left-content { \n align-items: initial;\n flex: 1;\n & .navbar__container-left-content-navigation-group { \n justify-content: initial;\n flex: 1;\n & .navbar__container-left-content-navigation-item-search-bar { \n flex: 1;\n }\n }\n }\n \n }\n\n & .navbar__container-left-logo {\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0px;\n gap: 16px;\n flex: none;\n order: 0;\n flex-grow: 0;\n\n &.hide { \n display: none;\n }\n\n & h6 {\n position: relative;\n margin: 0;\n padding: 0;\n font-style: normal;\n font-weight: 600;\n font-size: 16px;\n //line-height: 24px;\n display: flex;\n align-items: center;\n color: tokens.$ifxColorBaseBlack;\n flex: none;\n order: 1;\n flex-grow: 0;\n }\n\n & .navbar__container-left-logo-default {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding: 12px 0px;\n flex: none;\n order: 0;\n flex-grow: 0;\n\n & svg {\n width: 91px;\n height: 40px;\n flex: none;\n order: 0;\n flex-grow: 0;\n vertical-align: bottom;\n }\n }\n\n & .navbar__container-left-logo-divider {\n width: 1px;\n height: 32px;\n background: tokens.$ifxColorEngineering200;\n flex: none;\n order: 2;\n flex-grow: 0;\n }\n }\n\n & .navbar__container-left-content {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: flex-start;\n padding: 0px;\n flex: none;\n order: 1;\n flex-grow: 0;\n\n & .navbar__container-left-content-navigation-group {\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0px;\n gap: 4px;\n flex: none;\n order: 0;\n flex-grow: 0;\n\n & .navbar__container-left-content-navigation-item-search-bar {\n display: flex; //none\n flex-direction: row;\n align-items: center;\n padding: 0px 8px;\n flex: none;\n order: 5;\n flex-grow: 0;\n //width: 256px;\n //height: 40px;\n }\n\n & .navbar__container-left-content-navigation-item {\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0px 8px;\n gap: 8px;\n flex: none;\n order: 0;\n flex-grow: 0;\n\n & a {\n display: flex;\n align-items: center;\n font-weight: 400;\n font-size: 16px;\n line-height: 24px;\n color: tokens.$ifxColorBaseBlack;\n text-decoration: none;\n flex: none;\n order: 0;\n flex-grow: 0;\n }\n }\n }\n }\n }\n\n & .navbar__container-right {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-end;\n padding: 0;\n gap: 8px;\n flex: none;\n order: 1;\n flex-grow: 0;\n\n &.hide { \n display: none;\n }\n\n &.expand { \n justify-content: initial;\n flex: 1;\n & .navbar__container-right-content { \n align-items: initial;\n flex: 1;\n & .navbar__container-right-content-navigation-group { \n justify-content: initial;\n flex: 1;\n & .navbar__container-right-content-navigation-item-search-bar { \n flex: 1;\n & .navbar__container-right-content-navigation-item-search-bar-icon-wrapper { \n flex: 1;\n }\n }\n }\n }\n \n }\n\n & .navbar__burger-icon-wrapper {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n padding: 4px 0px 4px 16px;\n border-left: 1px solid tokens.$ifxColorEngineering300;\n gap: 16px;\n flex: none;\n order: 1;\n flex-grow: 0;\n width: 41px;\n height: 40px;\n\n &.hide { \n display: none;\n }\n\n & .navbar__burger-icon {\n display: flex;\n align-items: center;\n\n &:hover { \n cursor: pointer;\n }\n\n &.close {\n display: none;\n }\n }\n\n & .navbar__cross-icon {\n display: none;\n align-items: center;\n\n &.show {\n display: flex;\n\n &:hover { \n cursor: pointer;\n }\n }\n }\n }\n\n & .navbar__container-right-content {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 0px;\n flex: none;\n order: 0;\n flex-grow: 0;\n\n & .navbar__container-right-content-navigation-group {\n position: relative;\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n align-items: center;\n padding: 0px;\n flex: none;\n order: 0;\n flex-grow: 0;\n\n & .navbar__container-right-content-navigation-item,\n & .navbar__container-right-content-navigation-item-profile,\n & .navbar__container-right-content-navigation-item-search-bar {\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0px 8px;\n gap: 4px;\n flex: none;\n order: 0;\n flex-grow: 0;\n\n & .navbar__container-right-content-navigation-item-search-bar-icon-wrapper {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n padding: 0px;\n gap: 8px;\n flex: none;\n order: 0;\n flex-grow: 0;\n //width: 24px;\n //height: 24px;\n //max-width: 200px;\n\n &.isOpen { \n position: absolute;\n top: 10px;\n }\n }\n\n & .navbar__container-right-content-navigation-item-navigation-profile {\n position: relative;\n width: 24px;\n height: 24px;\n background: tokens.$ifxColorOcean500;\n border-radius: 100px;\n flex: none;\n order: 0;\n flex-grow: 0;\n\n & a {\n position: absolute;\n width: 22px;\n height: 20px;\n left: calc(50% - 22px/2);\n top: calc(50% - 20px/2);\n font-style: normal;\n font-weight: 600;\n font-size: 14px;\n line-height: 20px;\n text-decoration: none;\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n color: tokens.$ifxColorBaseWhite;\n }\n }\n\n & .navbar__container-right-content-navigation-item-icon-wrapper {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n padding: 0px;\n gap: 8px;\n flex: none;\n order: 0;\n flex-grow: 0;\n }\n\n & a {\n font-style: normal;\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n color: tokens.$ifxColorBaseBlack;\n text-decoration: none;\n display: flex;\n align-items: center;\n flex: none;\n order: 1;\n flex-grow: 0;\n }\n }\n }\n }\n }\n}\n\n//burger icon exist, and left container is gone\n@media screen and (max-width: 800px) {\n .navbar__container {\n padding: 0px 16px;\n height: 64px;\n gap: initial;\n\n &.expanded { \n & .navbar__container-right {\n & .navbar__burger-icon-wrapper {\n display: none;\n }\n }\n }\n\n & .navbar__container-left {\n & .navbar__container-left-content {\n display: none;\n }\n\n & .navbar__container-left-logo {\n & .navbar__container-left-logo-divider {\n display: none;\n }\n }\n }\n\n & .navbar__container-right {\n flex: 1;\n }\n }\n\n .navbar__sidebar {\n width: 0;\n transition: 1s;\n\n // &.show {\n // width: 100%;\n // }\n\n }\n}\n\n@media screen and (max-width: 500px) {\n .navbar__sidebar {\n &.show {\n width: 100%; // 100% of viewport width\n }\n }\n}\n\n@media screen and (min-width: 500px) {\n .navbar__sidebar {\n &.show {\n width: 50%; // 100% of viewport width\n }\n }\n}\n\n//burger icon disappears\n@media screen and (min-width: 800px) {\n .navbar__wrapper {\n height: 63px;\n }\n\n .navbar__container {\n padding: 0px 16px;\n height: 63px;\n gap: initial;\n\n & .navbar__container-right {\n & .navbar__burger-icon-wrapper {\n display: none;\n }\n }\n }\n\n .navbar__main-container {\n &.show {\n height: auto;\n background-color: inherit;\n transition: none;\n }\n }\n\n .navbar__sidebar {\n width: 0;\n transition: 1s;\n &.show { \n right: -100%;\n }\n }\n\n}\n\n//left container appears\n@media screen and (min-width: 1024px) {\n .navbar__wrapper {\n height: 72px;\n }\n\n .navbar__container {\n padding: 0px 24px;\n height: 72px;\n\n & .navbar__container-left {\n gap: 12px;\n display: flex;\n\n & .navbar__container-left-content {\n display: flex;\n }\n\n & .navbar__container-left-logo-default {\n & svg {\n width: 72.8px;\n height: 32px;\n }\n }\n }\n }\n\n .navbar__main-container {\n &.show {\n height: auto;\n background-color: inherit;\n transition: none;\n }\n }\n}\n\n@media screen and (min-width: 1200px) {\n .navbar__wrapper {\n height: 80px\n }\n\n .navbar__container {\n padding: 0px 32px;\n height: 80px;\n\n & .navbar__container-left {\n & .navbar__container-left-content {\n justify-content: inherit;\n }\n }\n\n & .navbar__container-right {\n & .navbar__container-right-content {\n justify-content: inherit;\n }\n }\n }\n}\n\n@media screen and (min-width: 1440px) {\n .navbar__wrapper {\n height: 80px;\n }\n\n .navbar__container {\n padding: 0px 40px;\n height: 80px;\n\n & .navbar__container-left {\n & .navbar__container-left-content {\n justify-content: center;\n }\n }\n\n & .navbar__container-right {\n & .navbar__container-right-content {\n justify-content: inherit;\n }\n }\n }\n}","import { Component, h, Element, State, Prop, Listen, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'ifx-navbar',\n styleUrl: 'navbar.scss',\n shadow: true,\n})\n\nexport class Navbar {\n @Element() el;\n @State() main: boolean = true\n @State() products: boolean = false\n @State() applications: boolean = false\n @State() design: boolean = false\n @State() support: boolean = false\n @State() about: boolean = false\n @Prop() applicationName: string = \"\"\n @State() hasLeftMenuItems: boolean = true;\n @Prop() fixed: boolean = true;\n @Prop() showLogoAndAppname: boolean = true;\n @State() searchBarIsOpen: string;\n @Prop() logoHref: string = \"\";\n @State() internalLogoHref: string = \"\"\n @Prop() logoHrefTarget: string = '_self';\n @State() internalLogoHrefTarget: string = '_self';\n @Event() ifxNavbarMobileMenuIsOpen: EventEmitter;\n\n private addEventListenersToHandleCustomFocusState() {\n const element = this.el.shadowRoot.firstChild;\n\n if (!element) {\n console.error('element not found');\n return;\n }\n element.tabIndex = -1;\n\n // Select all a elements in the navbar and set their tabIndex to -1 to make them non-focusable\n const aElements = element.querySelectorAll('a');\n for (let i = 0; i < aElements.length; i++) {\n aElements[i].tabIndex = -1;\n }\n\n const slot = element.querySelector('slot');\n if (slot) {\n const assignedNodes = slot.assignedNodes();\n for (let i = 0; i < assignedNodes.length; i++) {\n const node = assignedNodes[i] as HTMLElement;\n if (node.nodeName === 'IFX-NAVBAR-ITEM') {\n const navbarItem = node as HTMLIfxNavbarItemElement;\n\n // Get all navigation items\n const aElements = navbarItem?.shadowRoot.querySelectorAll('a');\n for (let i = 0; i < aElements.length; i++) {\n aElements[i].tabIndex = -1;\n }\n }\n }\n }\n }\n\n @Listen('ifxNavItem') \n clearFirstLayerMenu(event: CustomEvent) { \n if(event.detail.action === 'hideFirstLayer') { \n const leftMenuItems = this.getMobileMenuTop()\n for(let i = 0; i < leftMenuItems.length; i++) { \n if(!leftMenuItems[i].isSameNode(event.detail.component)) {\n leftMenuItems[i].hideComponent()\n }\n }\n }\n\n if(event.detail.action === 'hideSecondLayer') { \n const parent = event.detail.parent;\n const children = parent.children;\n parent.toggleFirstLayerItem('remove', 'add')\n for(let i = 0; i < children.length; i++) { \n if(!children[i].isSameNode(event.detail.component)) {\n children[i].hideComponent()\n }\n }\n }\n\n if(event.detail.action === 'returnToSecondLayer') { \n const parent = event.detail.parent;\n const children = parent.children;\n parent.toggleFirstLayerItem('add', 'remove')\n for(let i = 0; i < children.length; i++) { \n if(!children[i].isSameNode(event.detail.component)) {\n children[i].showComponent()\n }\n }\n }\n\n if(event.detail.action === 'show') { \n const leftMenuItems = this.el.querySelectorAll('[slot=\"left-item\"]')\n for(let i = 0; i < leftMenuItems.length; i++) { \n if(!leftMenuItems[i].isSameNode(event.detail.component)) {\n leftMenuItems[i].showComponent()\n }\n }\n }\n\n if(event.detail.action === 'return') { \n const leftMenuItems = this.getMobileMenuTop()\n for(let i = 0; i < leftMenuItems.length; i++) { \n if(!leftMenuItems[i].isSameNode(event.detail.component)) {\n leftMenuItems[i].showComponent()\n }\n }\n }\n }\n\n getWrappers() {\n const searchBarRightWrapper = this.el.shadowRoot.querySelector('.navbar__container-right-content-navigation-item-search-bar-icon-wrapper')\n const searchBarLeftWrapper = this.el.shadowRoot.querySelector('.navbar__container-left-content-navigation-item-search-bar')\n const rightSideSlot = searchBarRightWrapper.querySelector('slot');\n const leftSideSlot = searchBarLeftWrapper.querySelector('slot');\n const rightAssignedNodes = rightSideSlot.assignedNodes();\n const leftAssignedNodes = leftSideSlot.assignedNodes();\n const navbarProfile = this.el.querySelector('ifx-navbar-profile');\n const leftMenuItems = this.el.querySelectorAll('[slot=\"left-item\"]');\n const rightMenuItems = this.el.querySelectorAll('[slot=\"right-item\"]');\n const topRowWrapper = this.el.shadowRoot.querySelector('.navbar__sidebar-top-row-wrapper')\n \n return {rightSideSlot, leftSideSlot, rightAssignedNodes, leftAssignedNodes, navbarProfile, leftMenuItems, rightMenuItems, topRowWrapper};\n }\n\n hideNavItems() {\n const { rightAssignedNodes, leftAssignedNodes, navbarProfile, leftMenuItems, rightMenuItems, topRowWrapper } = this.getWrappers();\n \n if(rightAssignedNodes.length !== 0) { \n this.searchBarIsOpen = 'right'\n } else if(leftAssignedNodes.length !== 0) {\n this.searchBarIsOpen = 'left'\n }\n\n if(navbarProfile) { \n navbarProfile.hideComponent()\n }\n \n for(let l = 0; l < leftMenuItems.length; l++) { \n if(!topRowWrapper.classList.contains('expand')) {\n leftMenuItems[l].hideComponent()\n }\n }\n \n for(let r = 0; r < rightMenuItems.length; r++) { \n if(topRowWrapper.classList.contains('expand')) {\n if(!rightMenuItems[r].hideOnMobile) { \n rightMenuItems[r].hideComponent()\n }\n } else { \n rightMenuItems[r].hideComponent()\n }\n }\n }\n\n showNavItems() {\n const { navbarProfile, leftMenuItems, rightMenuItems, topRowWrapper } = this.getWrappers();\n this.searchBarIsOpen = undefined;\n \n if(navbarProfile) {\n navbarProfile.showComponent()\n }\n \n for(let l = 0; l < leftMenuItems.length; l++) { \n if(!topRowWrapper.classList.contains('expand')) {\n leftMenuItems[l].showComponent()\n }\n }\n \n for(let r = 0; r < rightMenuItems.length; r++) { \n if(topRowWrapper.classList.contains('expand')) {\n if(!rightMenuItems[r].hideOnMobile) { \n rightMenuItems[r].showComponent()\n }\n } else { \n rightMenuItems[r].showComponent()\n }\n }\n }\n \n \n @Listen('ifxSearchBarIsOpen')\n handleSearchBarToggle(event: CustomEvent) {\n \n if(event.detail) { \n this.hideNavItems();\n } else if(!event.detail) {\n this.showNavItems();\n }\n }\n\n toggleClass(el, className) {\n el.classList.toggle(className)\n }\n\n handleSidebar(el) {\n const sidebarIconWrapper = el.currentTarget.closest('.navbar__burger-icon-wrapper');\n const sidebarIconOpen = sidebarIconWrapper.querySelector('.navbar__burger-icon')\n const sidebarIconClose = sidebarIconWrapper.querySelector('.navbar__cross-icon')\n const mainContainer = el.currentTarget.closest('.navbar__main-container');\n const navbarWrapper = el.currentTarget.closest('.navbar__wrapper')\n const sidebarWrapper = navbarWrapper.querySelector('.navbar__sidebar');\n this.toggleClass(navbarWrapper, 'show')\n this.toggleClass(mainContainer, 'show')\n this.toggleClass(sidebarWrapper, 'show')\n this.toggleClass(sidebarIconOpen, 'close')\n this.toggleClass(sidebarIconClose, 'show')\n\n if(sidebarIconClose.classList.contains('show')) { \n this.handleBodyScroll('hide')\n } else { \n this.handleBodyScroll('show')\n }\n }\n\n handleBodyScroll(action) { \n const body = this.el.closest('body')\n if(!this.fixed && action === 'hide') { \n body.style.overflow = 'hidden'\n } else if(action === 'show') { \n body.style.overflow = 'visible'\n }\n }\n\n handleDropdownMenu(el) {\n const dropdownWrapper = el.currentTarget.querySelector('.navbar__dropdown-wrapper')\n dropdownWrapper.classList.toggle('open')\n const iconWrapper = el.currentTarget.querySelector('a')\n iconWrapper.classList.toggle('open')\n }\n\n async setItemMenuPosition() { \n const navbarItems = this.el.querySelectorAll('ifx-navbar-item')\n const navbarProfile = this.el.querySelector('ifx-navbar-profile')\n\n if(navbarProfile) {\n const itemChildren = navbarProfile.querySelectorAll('ifx-navbar-item')\n if (itemChildren.length !== 0) {\n itemChildren.forEach(item => { \n item.setMenuItemPosition()\n this.setMenuItemChildrenPosition(item)\n })\n }\n }\n \n if(navbarItems.length !== 0) { \n for(let i = 0; i < navbarItems.length; i++) { \n const item = navbarItems[i];\n const itemChildren = item.querySelectorAll('ifx-navbar-item')\n if (itemChildren.length !== 0) {\n const hasNestedItems = await item.setItemSideSpecifications()\n if(hasNestedItems) { \n itemChildren.forEach(item => { \n item.setMenuItemPosition()\n this.setMenuItemChildrenPosition(item)\n })\n }\n }\n }\n }\n }\n\n setMenuItemChildrenPosition(item) {\n const itemChildren = item.querySelectorAll('ifx-navbar-item');\n if (itemChildren.length !== 0) {\n itemChildren.forEach(subItem => { \n subItem.setMenuItemPosition()\n this.setMenuItemChildrenPosition(subItem)\n })\n }\n }\n\n getMediaQueryList() { \n const mediaQueryList = window.matchMedia('(max-width: 800px)');\n return mediaQueryList;\n }\n\n componentDidLoad() {\n this.setItemMenuPosition()\n this.addEventListenersToHandleCustomFocusState();\n\n const mediaQueryList = this.getMediaQueryList()\n\n if (mediaQueryList.matches) {\n this.moveNavItemsToSidebar();\n }\n\n }\n\n handleMobileMenuBottom(e) { \n const mobileMenuBottomWrapper = this.el.shadowRoot.querySelector('.navbar__sidebar-bottom-row')\n const slotElement = e.target;\n const nodes = slotElement.assignedNodes();\n if(nodes.length > 0) { \n mobileMenuBottomWrapper.classList.add('show')\n } else { \n mobileMenuBottomWrapper.classList.remove('show')\n }\n }\n\n handleLogoHrefAndTarget(){\n if(this.logoHref.trim() === \"\") {\n this.internalLogoHref = undefined;\n }else{\n this.internalLogoHref = this.logoHref;\n }\n\n if(['_self', '_blank', '_parent'].includes(this.logoHrefTarget.trim())){\n this.internalLogoHrefTarget = this.logoHrefTarget;\n }else{\n this.internalLogoHrefTarget = '_self';\n }\n }\n\n \n componentWillLoad() {\n this.RemoveSpaceOnStorybookSnippet()\n const dropdownMenu = this.el.querySelector('ifx-navbar-menu')\n const leftMenuItems = this.el.querySelectorAll('[slot=\"left-item\"]')\n if (!leftMenuItems.length && !dropdownMenu) {\n this.hasLeftMenuItems = false;\n }\n this.handleLogoHrefAndTarget();\n\n const mediaQueryList = window.matchMedia('(max-width: 800px)');\n mediaQueryList.addEventListener('change', (e) => this.moveNavItemsToSidebar(e));\n }\n\n \n\n getSearchBarLeftWrapper() { \n const searchBarLeftWrapper = this.el.shadowRoot.querySelector('.navbar__container-left-content-navigation-item-search-bar')\n return searchBarLeftWrapper;\n }\n\n getMobileMenuTop() { \n const leftMenuItems = this.el.querySelectorAll('[slot=\"mobile-menu-top\"]');\n return leftMenuItems;\n }\n\n getMobileMenuBottom() { \n const rightMenuItems = this.el.querySelectorAll('[slot=\"mobile-menu-bottom\"]');\n return rightMenuItems;\n }\n\n handleBurgerIcon() { \n const leftMenuItems = this.getMobileMenuTop()\n const rightMenuItems = this.getMobileMenuBottom()\n if(!leftMenuItems.length && !rightMenuItems.length) { \n const burgerIconWrapper = this.el.shadowRoot.querySelector('.navbar__burger-icon-wrapper')\n this.toggleClass(burgerIconWrapper, 'hide')\n }\n }\n \n moveNavItemsToSidebar(e?: MediaQueryListEvent) {\n const topRowWrapper = this.el.shadowRoot.querySelector('.navbar__sidebar-top-row-wrapper')\n const mediaQueryList = this.getMediaQueryList();\n const matches = e ? e.matches : mediaQueryList.matches;\n \n if (matches) {\n /* The viewport is 800px wide or less */\n topRowWrapper.classList.add('expand')\n \n //hide body scroll if sidebar was opened\n const crossIcon = this.el.shadowRoot.querySelector('.navbar__cross-icon')\n if(crossIcon.classList.contains('show')) { \n this.handleBodyScroll('hide')\n }\n \n //move search bar to right-side\n const searchBarLeft = this.el.querySelector('[slot=\"search-bar-left\"]')\n if(searchBarLeft) { \n if(this.searchBarIsOpen) { \n searchBarLeft.onNavbarMobile()\n }\n const searchBarLeftWrapper = this.getSearchBarLeftWrapper()\n searchBarLeftWrapper.classList.add('initial')\n searchBarLeft.setAttribute('slot', 'search-bar-right')\n }\n \n //left-side\n const leftMenuItems = this.el.querySelectorAll('[slot=\"left-item\"]')\n for(let i = 0; i < leftMenuItems.length; i++) { \n leftMenuItems[i].setAttribute('slot', 'mobile-menu-top')\n leftMenuItems[i].moveChildComponentsIntoSubLayerMenu()\n if(this.searchBarIsOpen) { \n leftMenuItems[i].showComponent()\n }\n }\n \n //right-side\n const rightMenuItems = this.el.querySelectorAll('[slot=\"right-item\"]')\n for(let i = 0; i < rightMenuItems.length; i++) { \n if(rightMenuItems[i].tagName.toUpperCase() === 'IFX-NAVBAR-PROFILE') { \n rightMenuItems[i].showLabel = false;\n } else { \n if(rightMenuItems[i].hideOnMobile) { \n rightMenuItems[i].setAttribute('slot', 'mobile-menu-bottom')\n \n rightMenuItems[i].toggleChildren('add')\n \n rightMenuItems[i].showLabel = true;\n if(this.searchBarIsOpen) { \n rightMenuItems[i].showComponent()\n }\n }\n }\n }\n \n this.handleBurgerIcon()\n\n } else {\n /* The viewport is more than 800px wide */\n topRowWrapper.classList.remove('expand')\n\n //show body scroll \n this.handleBodyScroll('show')\n\n //return search bar to its original position\n const searchBarLeftWrapper = this.getSearchBarLeftWrapper()\n const leftIsInitial = searchBarLeftWrapper.classList.contains('initial')\n const searchBarRight = this.el.querySelector('[slot=\"search-bar-right\"]')\n if(leftIsInitial) { \n if(this.searchBarIsOpen) { \n searchBarRight.onNavbarMobile()\n }\n if(searchBarRight) { \n searchBarRight.setAttribute('slot', 'search-bar-left')\n }\n }\n\n //left-side\n const leftMenuItems = this.getMobileMenuTop()\n for(let i = 0; i < leftMenuItems.length; i++) { \n leftMenuItems[i].setAttribute('slot', 'left-item')\n leftMenuItems[i].moveChildComponentsBackIntoNavbar()\n }\n\n //right-side\n const rightMenuItems = this.getMobileMenuBottom()\n const navbarProfileItem = this.el.querySelector('ifx-navbar-profile')\n if(navbarProfileItem) { \n const showProfileItemLabel = navbarProfileItem.getAttribute('show-label');\n navbarProfileItem.setAttribute('show-label', showProfileItemLabel)\n }\n\n for(let i = 0; i < rightMenuItems.length; i++) { \n rightMenuItems[i].setAttribute('slot', 'right-item')\n\n rightMenuItems[i].toggleChildren('remove')\n \n const showLabel = rightMenuItems[i].getAttribute('show-label');\n rightMenuItems[i].setAttribute('show-label', showLabel)\n if(this.searchBarIsOpen) { \n rightMenuItems[i].hideComponent()\n }\n }\n }\n }\n\n RemoveSpaceOnStorybookSnippet() { \n let parent = this.el.parentElement;\n if(parent) { \n let storybookWrapper = parent.closest('.css-xzp052');\n if(storybookWrapper) { \n storybookWrapper.style.overflow = 'visible'\n }\n }\n }\n\n\n \n render() {\n return (\n <div aria-label='a navigation navbar' class={`navbar__wrapper ${this.fixed ? 'fixed' : \"\"}`}>\n <div class={`navbar__main-container ${this.fixed ? 'fixed' : \"\"}`}>\n <div class={`navbar__container ${this.searchBarIsOpen ? \"expanded\" : \"\"}`}>\n <div class={`navbar__container-left ${this.searchBarIsOpen === 'left' ? \"expand\" : this.searchBarIsOpen === 'right' ? 'hide' : \"\"}`}>\n {this.showLogoAndAppname &&\n <div class={`navbar__container-left-logo ${this.searchBarIsOpen === 'left' ? 'hide' : \"\"}`}>\n <div class=\"navbar__container-left-logo-default\">\n <a href={this.internalLogoHref} target = {this.internalLogoHrefTarget}>\n <svg width=\"91\" height=\"40\" viewBox=\"0 0 91 40\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_2396_2480)\">\n <path d=\"M67.691 26.7766C71.0884 26.7766 72.1461 23.1841 72.1461 19.8802C72.1461 15.4536 70.2871 13.1441 67.691 13.1441C64.4219 13.1441 63.2681 16.7367 63.3001 19.9443C63.3322 23.1199 64.2296 26.7766 67.691 26.7766ZM66.0244 19.8481C66.0244 18.533 66.0244 15.4536 67.691 15.4536C69.4859 15.4536 69.4218 18.5009 69.4218 19.9123C69.4218 21.2595 69.4218 24.5313 67.7551 24.5313C65.9603 24.4992 66.0244 21.2274 66.0244 19.8481ZM57.8195 26.7766C59.1976 26.7766 60.3835 26.2313 61.5053 25.0445L60.5117 23.1841C59.7425 24.018 58.9733 24.4671 58.0438 24.4671C57.2746 24.4671 56.6336 24.018 56.249 23.2482C55.9285 22.5746 55.8644 21.8048 55.8644 20.9708V20.7142H61.6335V20.1368C61.6335 17.282 61.2809 15.7102 60.3835 14.5234C59.7104 13.6253 58.7169 13.1441 57.499 13.1441C56.2169 13.1441 55.1593 13.7215 54.39 14.8442C53.5567 16.0631 53.2042 17.699 53.2042 19.9443C53.1721 24.2426 54.8708 26.7766 57.8195 26.7766ZM57.531 15.2612C58.172 15.2612 58.5566 15.614 58.813 16.1914C59.0053 16.7046 59.1015 17.5707 59.1015 18.5971H55.8644C55.8964 16.3197 56.3772 15.2612 57.531 15.2612ZM74.2614 26.4559H76.7614V16.8329C77.3703 16.0952 78.0754 15.6782 78.5882 15.6782C78.9087 15.6782 79.2292 15.7423 79.4215 15.9989C79.6138 16.2876 79.71 16.7046 79.71 17.699V26.4559H82.21V16.5442C82.21 15.6782 82.1138 14.8121 81.601 14.1706C81.1523 13.5932 80.4472 13.2404 79.5497 13.2404C78.3959 13.2404 77.2101 13.914 76.569 14.6838C76.537 14.0102 76.3126 13.3687 76.2485 13.1441L73.9089 13.7536C74.0371 14.4593 74.2294 15.3253 74.2294 16.8971V26.4559H74.2614ZM45.2236 14.6838C45.1915 14.0102 44.9672 13.3687 44.9031 13.1441L42.5634 13.7536C42.6916 14.4593 42.8839 15.3253 42.8839 16.8971V26.4238H45.3838V16.8008C45.9928 16.0631 46.6979 15.6461 47.2107 15.6461C47.5312 15.6461 47.8517 15.7102 48.044 15.9669C48.2363 16.2555 48.3325 16.6725 48.3325 17.6669V26.4238H50.8324V16.5442C50.8324 15.6782 50.7363 14.8121 50.2235 14.1706C49.7748 13.5932 49.0696 13.2404 48.1722 13.2404C47.0505 13.2404 45.8646 13.914 45.2236 14.6838ZM14.6473 9.07042C16.1216 9.07042 17.3075 7.88359 17.3075 6.40807C17.3075 4.93256 16.1216 3.74573 14.6473 3.74573C13.173 3.74573 11.9871 4.93256 11.9871 6.40807C11.9871 7.88359 13.173 9.07042 14.6473 9.07042ZM26.9227 26.4559V16.5442C26.9227 15.6782 26.8265 14.8121 26.3137 14.1706C25.865 13.5932 25.1599 13.2404 24.2625 13.2404C23.1087 13.2404 21.9228 13.914 21.2818 14.6838C21.2497 14.0102 21.0254 13.3687 20.9613 13.1441L18.6536 13.7857C18.7818 14.4913 18.9741 15.3574 18.9741 16.9291V26.4559H21.4741V16.8329C22.0831 16.0952 22.7882 15.6782 23.301 15.6782C23.6215 15.6782 23.942 15.7423 24.1343 15.9989C24.3266 16.2876 24.4227 16.7046 24.4227 17.699V26.4559H26.9227ZM38.4289 8.36474C37.4994 8.36474 36.7622 9.10249 36.7622 10.0327C36.7622 10.9629 37.4994 11.7007 38.3968 11.7007C39.3263 11.7007 40.0634 10.9629 40.0634 10.0327C40.0634 9.10249 39.3263 8.36474 38.4289 8.36474ZM13.4614 26.4559H15.9614V10.8346L13.4614 11.1554V26.4559ZM33.8777 9.90441C34.3264 9.90441 34.7751 10.0648 35.0635 10.2893L35.7687 8.33266C35.0956 7.85151 34.3584 7.62698 33.429 7.62698C32.788 7.62698 32.1149 7.78736 31.5059 8.26851C30.897 8.78173 30.256 9.80818 30.256 11.7328C30.256 12.5667 30.288 13.4328 30.288 13.4328H29.4226V15.6461H30.288V26.4238H32.8521V15.6782H34.743L35.2238 13.4649H32.8841V11.4762C32.8841 10.5139 33.2687 9.90441 33.8777 9.90441ZM37.1468 26.4559H39.6788V13.2404L37.1468 13.5611V26.4559Z\" fill=\"#005DA9\" />\n <path d=\"M77.0816 33.5126C68.6203 36.0146 58.3321 37.1052 48.2682 37.1052C22.7239 37.1052 6.24986 29.5993 5.09604 19.6877C4.67938 15.9668 7.59599 12.3422 12.4677 9.26285C11.6023 8.62132 11.0575 7.59488 11.0254 6.44012C3.97427 10.161 0 15.0366 0 19.9764C0 30.9145 19.5188 40.1525 48.5246 39.7676C58.6205 39.6393 67.0498 38.1958 74.6778 35.6939C83.7482 32.7428 89.4532 28.5087 90.8313 26.6483C89.1968 28.1238 85.3186 31.0748 77.0816 33.5126ZM23.2687 4.38723C24.9674 3.80985 27.3712 3.0721 27.3712 3.0721C34.1339 1.21166 41.6017 0.121063 48.5566 0.185215C40.544 -0.295931 33.2365 0.185215 26.8584 1.33997C26.8584 1.33997 24.743 1.69281 22.4675 2.27018C22.4675 2.27018 21.3777 2.55887 20.7047 2.75133C20.0316 2.94379 19.1021 3.2004 19.1021 3.2004C18.4611 3.39286 17.8201 3.6174 17.1791 3.84193C17.8201 4.48346 18.2047 5.31745 18.2368 6.27974C19.3586 5.76652 21.5059 4.99668 23.2687 4.38723Z\" fill=\"#E30034\" />\n </g>\n <defs>\n <clipPath id=\"clip0_2396_2480\">\n <rect width=\"91\" height=\"40\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n </a>\n </div>\n {this.applicationName && <h6>{this.applicationName}</h6>}\n {this.applicationName && this.hasLeftMenuItems &&\n <div class=\"navbar__container-left-logo-divider\"></div>}\n </div>}\n <div class=\"navbar__container-left-content\">\n <div class=\"navbar__container-left-content-navigation-group\">\n <slot name='left-item' />\n <div class=\"navbar__container-left-content-navigation-item-search-bar\">\n <slot name='search-bar-left' />\n </div>\n </div>\n </div>\n </div>\n <div class={`navbar__container-right ${this.searchBarIsOpen === 'right' ? \"expand\" : this.searchBarIsOpen === 'left' ? 'hide' : \"\"}`}>\n <div class=\"navbar__container-right-content\">\n <div class=\"navbar__container-right-content-navigation-group\">\n <div class=\"navbar__container-right-content-navigation-item-search-bar\">\n <div class={`navbar__container-right-content-navigation-item-search-bar-icon-wrapper`}>\n <slot name='search-bar-right' />\n </div>\n </div>\n <slot name='right-item' />\n </div>\n </div>\n\n {/* MOBILE MENU BUTTON */}\n <div class={`navbar__burger-icon-wrapper`} onClick={this.handleSidebar.bind(this)}>\n <div class=\"navbar__burger-icon\">\n <ifx-icon icon=\"menu-right-24\"></ifx-icon>\n </div>\n <div class=\"navbar__cross-icon\">\n <ifx-icon icon=\"cross-24\"></ifx-icon>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n {/* SIDEBAR */}\n <div class=\"navbar__sidebar\">\n {/* left side ifx-navbar-item */}\n <div class=\"navbar__sidebar-top-row\">\n <div class=\"navbar__sidebar-top-row-wrapper\">\n <slot name='mobile-menu-top' />\n </div>\n </div>\n\n {/* right side ifx-navbar-item */}\n <div class=\"navbar__sidebar-bottom-row\">\n <slot name='mobile-menu-bottom' onSlotchange={(e) => this.handleMobileMenuBottom(e)} />\n </div>\n \n </div>\n </div>\n );\n }\n}"],"mappings":"yDAAA,MAAMA,EAAY,gnsBAClB,MAAAC,EAAeD,E,MCOFE,EAAM,M,wGAEQ,K,cACI,M,kBACI,M,YACN,M,aACC,M,WACF,M,qBACQ,G,sBACG,K,WACZ,K,wBACa,K,6CAEX,G,sBACS,G,oBACH,Q,4BACS,O,CAGlC,yCAAAC,GACN,MAAMC,EAAUC,KAAKC,GAAGC,WAAWC,WAEnC,IAAKJ,EAAS,CACZK,QAAQC,MAAM,qBACd,M,CAEFN,EAAQO,UAAY,EAGpB,MAAMC,EAAYR,EAAQS,iBAAiB,KAC3C,IAAK,IAAIC,EAAI,EAAGA,EAAIF,EAAUG,OAAQD,IAAK,CACzCF,EAAUE,GAAGH,UAAY,C,CAG3B,MAAMK,EAAOZ,EAAQa,cAAc,QACnC,GAAID,EAAM,CACR,MAAME,EAAgBF,EAAKE,gBAC3B,IAAK,IAAIJ,EAAI,EAAGA,EAAII,EAAcH,OAAQD,IAAK,CAC7C,MAAMK,EAAOD,EAAcJ,GAC3B,GAAIK,EAAKC,WAAa,kBAAmB,CACvC,MAAMC,EAAaF,EAGnB,MAAMP,EAAYS,IAAU,MAAVA,SAAU,SAAVA,EAAYd,WAAWM,iBAAiB,KAC1D,IAAK,IAAIC,EAAI,EAAGA,EAAIF,EAAUG,OAAQD,IAAK,CACzCF,EAAUE,GAAGH,UAAY,C,KAQnC,mBAAAW,CAAoBC,GAClB,GAAGA,EAAMC,OAAOC,SAAW,iBAAkB,CAC3C,MAAMC,EAAgBrB,KAAKsB,mBAC3B,IAAI,IAAIb,EAAI,EAAGA,EAAIY,EAAcX,OAAQD,IAAK,CAC5C,IAAIY,EAAcZ,GAAGc,WAAWL,EAAMC,O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AC,IAAA,2CAAKC,MAAM,mCACTF,EAAA,OAAAC,IAAA,2CAAKC,MAAM,oDACTF,EAAA,OAAAC,IAAA,2CAAKC,MAAM,8DACXF,EAAA,OAAAC,IAAA,2CAAKC,MAAO,2EACRF,EAAA,QAAAC,IAAA,2CAAMY,KAAK,uBAGfb,EAAA,QAAAC,IAAA,2CAAMY,KAAK,iBAKfb,EAAA,OAAAC,IAAA,2CAAKC,MAAO,8BAA+BY,QAAS/I,KAAKqD,cAAc2F,KAAKhJ,OAC1EiI,EAAA,OAAAC,IAAA,2CAAKC,MAAM,uBACTF,EAAA,YAAAC,IAAA,2CAAUe,KAAK,mBAEjBhB,EAAA,OAAAC,IAAA,2CAAKC,MAAM,sBACTF,EAAA,YAAAC,IAAA,2CAAUe,KAAK,kBAQzBhB,EAAA,OAAAC,IAAA,2CAAKC,MAAM,mBAETF,EAAA,OAAAC,IAAA,2CAAKC,MAAM,2BACTF,EAAA,OAAAC,IAAA,2CAAKC,MAAM,mCACTF,EAAA,QAAAC,IAAA,2CAAMY,KAAK,sBAKfb,EAAA,OAAAC,IAAA,2CAAKC,MAAM,8BACTF,EAAA,QAAAC,IAAA,2CAAMY,KAAK,qBAAqBI,aAAe1D,GAAMxF,KAAKuF,uBAAuBC,O","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as a,c as e,h as i,g as s}from"./p-6b122987.js";const r=':root{--ifx-font-family:"Source Sans 3";font-family:var(--ifx-font-family, sans-serif)}:host{width:100%;display:flex}.search-bar{box-sizing:border-box;height:40px;background-color:#FFFFFF;display:flex;flex-direction:row;align-items:center;width:100%;font-family:var(--ifx-font-family)}.search-bar.closed{display:flex;width:auto;justify-content:flex-start}.search-bar .search-bar-wrapper{display:flex;align-items:center;gap:16px;width:100%}.search-bar .search-bar-wrapper a{text-decoration:none;font-size:1rem;font-style:normal;font-weight:600;line-height:1.5rem;color:#0A8276;cursor:pointer}.search-bar .search-bar-wrapper ifx-search-field{width:100%}.search-bar .search-bar__icon-wrapper{display:none;flex-direction:row;align-items:center}.search-bar .search-bar__icon-wrapper ifx-icon:hover{cursor:pointer}.search-bar.closed .search-bar__icon-wrapper{display:flex}.search-bar.closed .search-bar-wrapper{display:none}';const t=r;const h=class{constructor(i){a(this,i);this.ifxInput=e(this,"ifxInput",7);this.ifxSearchBarIsOpen=e(this,"ifxSearchBarIsOpen",7);this.handleCloseButton=()=>{this.internalState=!this.internalState;this.ifxSearchBarIsOpen.emit(this.internalState)};this.handleFocus=()=>{this.internalState=true};this.isOpen=true;this.disabled=false;this.internalState=undefined;this.value=undefined;this.maxlength=undefined}async onNavbarMobile(){this.ifxSearchBarIsOpen.emit(false);this.internalState=false}handlePropChange(){this.internalState=this.isOpen}setInitialState(){this.internalState=this.isOpen}componentWillLoad(){this.setInitialState();this.ifxSearchBarIsOpen.emit(this.internalState)}handleInput(a){this.value=a.detail}render(){return i("div",{key:"80312faf68e6b0af2260c977d53f23b42067813f","aria-label":"a search bar","aria-disabled":this.disabled,class:`search-bar ${this.internalState?"open":"closed"}`},this.internalState?i("div",{class:"search-bar-wrapper"},i("ifx-search-field",{disabled:this.disabled,value:this.value,maxlength:this.maxlength,onIfxInput:this.handleInput.bind(this)},i("ifx-icon",{icon:"search-16",slot:"search-icon"})),i("a",{tabindex:"-1",href:"javascript:void(0)",onClick:this.handleCloseButton},"Close")):i("div",{class:"search-bar__icon-wrapper",onClick:this.handleCloseButton},i("ifx-icon",{icon:"search-16"})))}get el(){return s(this)}static get watchers(){return{isOpen:["handlePropChange"]}}};h.style=t;export{h as ifx_search_bar};
2
+ //# sourceMappingURL=p-9481adc8.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["searchBarCss","IfxSearchBarStyle0","SearchBar","this","handleCloseButton","internalState","ifxSearchBarIsOpen","emit","handleFocus","onNavbarMobile","handlePropChange","isOpen","setInitialState","componentWillLoad","handleInput","event","value","detail","render","h","key","disabled","class","maxlength","onIfxInput","bind","icon","slot","tabindex","href","onClick"],"sources":["src/components/search-bar/search-bar.scss?tag=ifx-search-bar&encapsulation=shadow","src/components/search-bar/search-bar.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n:host {\n width: 100%; //revert\n display: flex;\n}\n\n.search-bar {\n box-sizing: border-box;\n height: tokens.$ifxSize500;\n background-color: tokens.$ifxColorBaseWhite;\n display: flex;\n flex-direction: row;\n align-items: center;\n width: 100%;\n font-family: var(--ifx-font-family);\n\n &.closed {\n display: flex;\n width: auto;\n justify-content: flex-start;\n }\n\n & .search-bar-wrapper {\n display: flex;\n align-items: center;\n gap: tokens.$ifxSpace200;\n width: 100%;\n\n & a {\n text-decoration: none;\n font-size: tokens.$ifxFontSizeM;\n font-style: normal;\n font-weight: tokens.$ifxFontWeightSemibold;\n line-height: tokens.$ifxLineHeightM;\n color: tokens.$ifxColorOcean500;\n cursor: pointer;\n }\n\n & ifx-search-field {\n width: 100%;\n }\n }\n\n .search-bar__icon-wrapper {\n display: none;\n flex-direction: row;\n align-items: center;\n\n & ifx-icon:hover {\n cursor: pointer;\n }\n }\n\n &.closed {\n .search-bar__icon-wrapper {\n display: flex;\n }\n\n .search-bar-wrapper {\n display: none;\n }\n }\n}","import { Component, h, Prop, Event, EventEmitter, State, Watch, Element, Method } from '@stencil/core';\n \n\n@Component({\n tag: 'ifx-search-bar',\n styleUrl: 'search-bar.scss',\n shadow: true,\n})\nexport class SearchBar {\n @Prop() isOpen: boolean = true;\n @Prop() disabled: boolean = false;\n @State() internalState: boolean;\n @Prop({ mutable: true }) value: string;\n @Prop() maxlength?: number;\n @Event() ifxInput: EventEmitter;\n @Event() ifxSearchBarIsOpen: EventEmitter;\n @Element() el;\n\n @Method()\n async onNavbarMobile() {\n this.ifxSearchBarIsOpen.emit(false)\n this.internalState = false;\n }\n\n @Watch('isOpen')\n handlePropChange() {\n this.internalState = this.isOpen;\n }\n\n handleCloseButton = () => {\n this.internalState = !this.internalState;\n this.ifxSearchBarIsOpen.emit(this.internalState)\n }\n\n setInitialState() {\n this.internalState = this.isOpen;\n }\n\n \n\n componentWillLoad() {\n this.setInitialState();\n this.ifxSearchBarIsOpen.emit(this.internalState)\n }\n\n\n handleInput(event: CustomEvent) {\n this.value = event.detail;\n }\n\n handleFocus = () => {\n this.internalState = true;\n }\n\n\n render() {\n return (\n <div aria-label='a search bar' aria-disabled={this.disabled} class={`search-bar ${this.internalState ? 'open' : 'closed'}`}>\n {this.internalState ? (\n <div class=\"search-bar-wrapper\">\n <ifx-search-field disabled={this.disabled} value={this.value} maxlength={this.maxlength} onIfxInput={this.handleInput.bind(this)}>\n <ifx-icon icon=\"search-16\" slot=\"search-icon\"></ifx-icon>\n </ifx-search-field>\n\n <a tabindex=\"-1\" href='javascript:void(0)' onClick={this.handleCloseButton}>Close</a>\n </div>\n ) : (\n <div class=\"search-bar__icon-wrapper\" onClick={this.handleCloseButton}>\n <ifx-icon icon=\"search-16\"></ifx-icon>\n </div>\n )}\n </div>\n );\n }\n}\n"],"mappings":"yDAAA,MAAMA,EAAe,y5BACrB,MAAAC,EAAeD,E,MCOFE,EAAS,M,mHAqBpBC,KAAAC,kBAAoB,KAClBD,KAAKE,eAAiBF,KAAKE,cAC3BF,KAAKG,mBAAmBC,KAAKJ,KAAKE,cAAc,EAmBlDF,KAAAK,YAAc,KACZL,KAAKE,cAAgB,IAAI,E,YA1CD,K,cACE,M,2EAS5B,oBAAMI,GACJN,KAAKG,mBAAmBC,KAAK,OAC7BJ,KAAKE,cAAgB,K,CAIvB,gBAAAK,GACEP,KAAKE,cAAgBF,KAAKQ,M,CAQ5B,eAAAC,GACET,KAAKE,cAAgBF,KAAKQ,M,CAK5B,iBAAAE,GACEV,KAAKS,kBACLT,KAAKG,mBAAmBC,KAAKJ,KAAKE,c,CAIpC,WAAAS,CAAYC,GACVZ,KAAKa,MAAQD,EAAME,M,CAQrB,MAAAC,GACE,OACEC,EAAA,OAAAC,IAAA,wDAAgB,eAAc,gBAAgBjB,KAAKkB,SAAUC,MAAO,cAAcnB,KAAKE,cAAgB,OAAS,YAC7GF,KAAKE,cACJc,EAAA,OAAKG,MAAM,sBACTH,EAAA,oBAAkBE,SAAUlB,KAAKkB,SAAUL,MAAOb,KAAKa,MAAOO,UAAWpB,KAAKoB,UAAWC,WAAYrB,KAAKW,YAAYW,KAAKtB,OACzHgB,EAAA,YAAUO,KAAK,YAAYC,KAAK,iBAGlCR,EAAA,KAAGS,SAAS,KAAKC,KAAK,qBAAqBC,QAAS3B,KAAKC,mBAAiB,UAG5Ee,EAAA,OAAKG,MAAM,2BAA2BQ,QAAS3B,KAAKC,mBAClDe,EAAA,YAAUO,KAAK,e","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as e,c as i,h as t,g as a}from"./p-6b122987.js";const s=':root{--ifx-font-family:"Source Sans 3";font-family:var(--ifx-font-family, sans-serif)}:host{display:inline-block}.chip{position:relative}.chip__wrapper{display:inline-flex;align-items:center;justify-content:center;gap:8px;box-sizing:border-box;border:1px solid #BFBBBB;border-radius:9999px;background:#FFFFFF;cursor:pointer;transition:border 100ms ease;font:400 0.875rem/1.25rem "Source Sans 3"}.chip__wrapper:hover,.chip__wrapper:focus-visible{outline:none;border:1px solid #575352}.chip__wrapper:focus{border:1px solid #0A8276}.chip__wrapper.chip__wrapper--small{padding:4px 12px}.chip__wrapper.chip__wrapper--large{padding:8px 16px}.chip__wrapper.chip__wrapper--opened{border:1px solid #0A8276}.chip__wrapper.chip__wrapper--opened .wrapper__open-button{transform:rotate(-180deg)}.chip__wrapper.chip__wrapper--selected{outline:3px solid #0A8276;outline-offset:-3px;color:#0A8276}.chip__wrapper.chip__wrapper--selected:hover,.chip__wrapper.chip__wrapper--selected:focus-visible{outline:3px solid #08665C;color:#08665C}.wrapper__label{display:inline-flex;align-items:center;gap:4px;font:400 0.875rem/1.25rem "Source Sans 3"}.wrapper__label .label__selected-options{font:600 0.875rem/1.25rem "Source Sans 3"}.wrapper__open-button{display:flex;align-items:center;transition:all 300ms ease}.wrapper__unselect-button{display:flex;align-items:center}.chip__dropdown{position:absolute;z-index:1;box-shadow:0px 6px 9px 0px rgba(29, 29, 29, 0.1019607843);border:1px solid #EEEDED;border-radius:1px;padding:8px 0;min-width:222px;background-color:#FFFFFF}';const l=s;const n=class{constructor(t){e(this,t);this.ifxChipChange=i(this,"ifxChipChange",7);this.placeholder="";this.size="large";this.value=undefined;this.variant="single";this.readOnly=false;this.AriaLabel=undefined;this.opened=false;this.selectedOptions=[]}handleValueChange(e){this.syncSelectedOptionsWithProp(e)}handleReadOnlyChange(e){if(e){this.opened=false}}closeDropdownOnOutsideClick(e){const i=e.composedPath();const t=this.chip.shadowRoot.querySelector(".chip__wrapper");const a=this.chip.shadowRoot.querySelector(".chip__dropdown");if(!i.includes(a)&&!i.includes(t)&&this.opened){this.toggleDropdownMenu()}}handleKeyDown(e){if(e.code!=="Tab"){e.preventDefault()}if(e.target.tagName==="IFX-CHIP"){this.handleWrapperKeyDown(e)}else if(e.target.tagName==="IFX-CHIP-ITEM"){this.handleDropdownKeyDown(e)}}updateSelectedOptions(e){const i=e.detail;const t=[...this.selectedOptions];if(this.variant!=="multi"){if(i.selected){this.opened=false;const t=this.getChipItems();t.forEach((i=>{if(i.selected&&i!==e.target){i.chipState=Object.assign(Object.assign({},i.chipState),{emitIfxChipItemSelect:false});i.selected=false}}));this.selectedOptions=[i]}else{this.selectedOptions=[]}this.value=this.selectedOptions[0]?this.selectedOptions[0].value:undefined}else{if(i.selected){if(!this.selectedOptions.find((e=>e.value===i.value))){this.selectedOptions=[...this.selectedOptions,i]}}else{this.selectedOptions=this.selectedOptions.filter((e=>e.value!==i.value))}this.value=this.selectedOptions.map((e=>e.value))}if(i.emitIfxChipChange){this.ifxChipChange.emit({previousSelection:t,currentSelection:this.selectedOptions,name:this.placeholder})}}getChipItems(){return this.chip.querySelectorAll("ifx-chip-item")}getSelectedOptions(){if(this.variant!=="multi"){return this.selectedOptions.map((e=>e.label)).join("")}return this.selectedOptions.slice(0,2).map((e=>e.label)).join(", ")}toggleDropdownMenu(){if(this.readOnly)return;this.opened=!this.opened}focusChipItemAt(e=0){this.opened=true;const i=this.getChipItems();let t;if(e===-1){t=i.item(i.length-1)}else if(e>=0&&e<i.length){t=i.item(e)}else{console.error(`Invalid index: ${e}`);return}const a=t.shadowRoot.querySelector(".chip-item");if(a){setTimeout((()=>{a.focus()}),1)}}focusChip(){const e=this.chip.shadowRoot.querySelector(".chip__wrapper");e.focus()}handleUnselectButtonClick(e){e.stopPropagation();this.opened=false;let i=false;const t=this.getChipItems();t.forEach((e=>{if(e.selected){i=true;e.chipState=Object.assign(Object.assign({},e.chipState),{emitIfxChipItemSelect:false});e.selected=false}}));if(i){const e=this.selectedOptions;this.selectedOptions=[];this.value=[];this.ifxChipChange.emit({previousSelection:e,currentSelection:[],name:this.placeholder})}}handleWrapperClick(){if(!this.readOnly){this.toggleDropdownMenu()}}handleWrapperKeyDown(e){if(this.readOnly)return;if(!this.opened){switch(e.code){case"Space":case"Enter":case"ArrowDown":this.focusChipItemAt(0);break;case"ArrowUp":this.focusChipItemAt(-1);break}}else{switch(e.code){case"Escape":this.opened=false;this.focusChip();break}}}handleDropdownKeyDown(e){let i=this.getChipItems();let t=Array.from(i).indexOf(e.target);if(t===-1){console.error("Target not found in chip items");return}switch(e.code){case"ArrowDown":if(t===i.length-1)break;this.focusChipItemAt(t+1);break;case"ArrowUp":if(t===0)break;this.focusChipItemAt(t-1);break;case"Escape":this.opened=false;this.focusChip();break;case"Space":if(this.variant==="single"){this.opened=false;this.focusChip()}break;case"Enter":this.opened=false;this.focusChip();break}}syncChipState(){const e=this.getChipItems();let i=0;e.forEach((e=>{e.chipState={emitIfxChipItemSelect:true,size:this.size==="small"?"small":"large",variant:this.variant==="multi"?"multi":"single",key:i++}}))}syncSelectedOptionsWithProp(e){this.selectedOptions=[];const i=(()=>{let e=0;return()=>e++})();if(Array.isArray(e)){this.selectedOptions=e.map((e=>({value:e,label:e,selected:true,key:i(),emitIfxChipChange:true})))}else if(typeof e==="string"){this.selectedOptions=[{value:e,label:e,selected:true,key:i(),emitIfxChipChange:true}]}this.syncChipState()}componentWillLoad(){this.syncSelectedOptionsWithProp(this.value)}render(){return t("div",{key:"eaa08fdd3283cb90fa18cb810cd02681d0ae531d",class:"chip"},t("div",{key:"d4dfd0e6cf40d1acc32426c56c7d3e1ff0f18f85",class:`chip__wrapper chip__wrapper--${this.size==="small"?"small":"large"}\n chip__wrapper--${this.variant==="multi"?"multi":"single"}\n ${this.opened&&!this.readOnly?"chip__wrapper--opened":""}\n ${this.selectedOptions.length?"chip__wrapper--selected":""}`,tabIndex:0,onClick:!this.readOnly?()=>{this.handleWrapperClick()}:undefined,role:"combobox","aria-label":this.AriaLabel,"aria-value":this.getSelectedOptions(),"aria-haspopup":!this.readOnly?"listbox":undefined,"aria-expanded":!this.readOnly?this.opened.toString():undefined,"aria-controls":!this.readOnly?"dropdown":undefined,"aria-readonly":this.readOnly?"true":undefined,"aria-multiselectable":this.variant==="multi"?"true":undefined},t("div",{key:"4aaef2ece1dcc35bea91ef726bd76ca4aa8026fb",class:"wrapper__label"},this.selectedOptions.length===0&&`${this.placeholder}`,this.selectedOptions.length!==0&&(this.variant==="multi"||this.readOnly)&&this.placeholder!==""&&`${this.placeholder}:`,this.selectedOptions.length!==0&&t("div",{key:"2e9334d52fdb6dc76d3a57019e0ac767653b124b",class:"label__selected-options"},this.getSelectedOptions()),this.selectedOptions.length>2&&this.variant==="multi"&&t("ifx-number-indicator",{key:"fbe0db0fd96005221685ff2681dd00d98ab9cecb"}," ",`+${this.selectedOptions.length-2}`," ")),!this.readOnly&&(this.variant!=="multi"||this.variant==="multi"&&this.selectedOptions.length===0)&&t("div",{key:"b7c0dd24b8409c2be6556b7add6befd631ad57b7",class:"wrapper__open-button"},t("ifx-icon",{key:1,icon:`chevrondown16`})),this.variant!=="multi"&&this.readOnly!==false&&this.selectedOptions.length>0&&t("div",{key:"fbf84d682a54d14da73a18b2b52fab8b947c760c",class:"wrapper__unselect-button",onClick:e=>{this.handleUnselectButtonClick(e)}},t("ifx-icon",{key:2,icon:`cross16`})),this.selectedOptions.length>=1&&this.variant==="multi"&&t("div",{key:"c21d50cf12f05d95464615449bc9cc70acdba040",class:"wrapper__unselect-button",onClick:e=>{this.handleUnselectButtonClick(e)}},t("ifx-icon",{key:2,icon:`cross16`}))),this.opened&&!this.readOnly&&t("div",{key:"c4b49602aaebdd8950646737df5fa19008870c2e",id:"dropdown",role:"listbox",class:"chip__dropdown"},t("slot",{key:"fb52f07c992f8f4c3de1ca7e0631bacd8ef7147c"})))}get chip(){return a(this)}static get watchers(){return{value:["handleValueChange"],readOnly:["handleReadOnlyChange"]}}};n.style=l;const r=':root{--ifx-font-family:"Source Sans 3";font-family:var(--ifx-font-family, sans-serif)}.chip-item{display:flex;align-items:center;gap:8px;padding:8px 16px;user-select:none;transition:all 100ms ease;transition-property:background, color}.chip-item:hover{cursor:pointer;background-color:#EEEDED}.chip-item:active{background-color:#BFBBBB}.chip-item:focus{outline:2px solid #0A8276}.chip-item.chip-item--large{font:400 1rem/1.5rem "Source Sans 3"}.chip-item.chip-item--small{font:400 0.875rem/1.25rem "Source Sans 3"}.chip-item.chip-item--selected{color:#0A8276}.chip-item.chip-item--selected .chip-item__selected-indicator{display:block}.chip-item__selected-indicator{display:none;margin-left:auto}';const c=r;const h=class{constructor(t){e(this,t);this.ifxChipItemSelect=i(this,"ifxChipItemSelect",5);this.value=undefined;this.chipState={emitIfxChipItemSelect:true,variant:"multi",size:"large"};this.selected=false}updateItemSelection(e){if(this.chipState.variant==="single"){const i=e.target;if(this.chipItem!==i&&this.chipItem.parentElement===i.parentElement){this.selected=false}}}validateSelected(e,i){if(e!==i){if(this.chipState.emitIfxChipItemSelect){this.emitIfxChipItemSelectEvent()}else{this.chipState.emitIfxChipItemSelect=true}}}getItemLabel(){return this.chipItem.innerText}toggleItemSelection(){this.selected=!this.selected}emitIfxChipItemSelectEvent(e=true){this.ifxChipItemSelect.emit({emitIfxChipChange:e,key:this.chipState.key,label:this.getItemLabel(),selected:this.selected,value:this.value})}handleItemClick(){this.toggleItemSelection()}handleItemKeyDown(e){if(e.code==="Enter"||e.code==="Space"){this.toggleItemSelection()}}handleSelectedState(){if(this.selected){this.emitIfxChipItemSelectEvent(false)}}componentWillLoad(){this.handleSelectedState()}render(){return t("div",{key:"493fe2e521f96fbe65792b4364c32a3010a4ae86",class:`chip-item chip-item--${this.chipState.size} \n chip-item--${(this.selected&&this.chipState.variant)==="single"?"selected":""}`,tabIndex:0,onClick:()=>{this.handleItemClick()},onKeyDown:e=>{this.handleItemKeyDown(e)},role:"option","aria-selected":this.selected.toString()},this.chipState.variant==="multi"&&t("ifx-checkbox",{key:"3f65da6457afbeca9e5e803f2569263b499fe839",checked:this.selected,tabIndex:-1,size:"s"}),t("div",{key:"02a710f81308419623960d15270f719c45f5fd11",class:"chip-item__label"}," ",t("slot",{key:"ad971a10884b08cf3775f7296a44c7aff1769a0b"})," "),t("div",{key:"2ba702249a7fc67ded010890181f5b35494df843",class:"chip-item__selected-indicator"},t("ifx-icon",{key:"887b43ff1b8c6539b01c0fc620f51d9bc04a05d9",icon:`check${this.chipState.size==="small"?"12":"16"}`}," ")))}get chipItem(){return a(this)}static get watchers(){return{selected:["validateSelected"]}}};h.style=c;const o='@charset "UTF-8";:root{--ifx-font-family:"Source Sans 3";font-family:var(--ifx-font-family, sans-serif)}:host{display:inline-flex}.container{display:inline-flex;justify-content:center;align-items:center;gap:32px;font-family:var(--ifx-font-family)}.container .items__per-page-wrapper{display:flex;align-items:center;gap:16px}.container .items__per-page-wrapper .items__per-page-label{color:#1D1D1D;font-size:14px;font-style:normal;font-weight:600;line-height:20px}.container .items__per-page-wrapper .items__per-page-field{display:flex;flex-direction:column;align-items:flex-start}.container .items__per-page-wrapper .items__per-page-field ifx-select{width:92px}.container .items__total-wrapper{display:flex;justify-content:center;align-items:center;gap:12px}.container .items__total-wrapper .items__total-button{display:flex;width:40px;height:40px;justify-content:center;align-items:center;border-radius:100px;border:1px solid #BFBBBB;background:#FFF}.container .items__total-wrapper .page__numbers-wrapper{display:flex;justify-content:center;align-items:center;gap:12px}.container .items__total-wrapper .page__numbers-wrapper .page__number-item{display:flex;padding:6px;flex-direction:column;justify-content:center;align-items:center;gap:10px;border-radius:100px}.container .items__total-wrapper .page__numbers-wrapper .page__number-item.active{background-color:#0A8276}.container .items__total-wrapper .page__numbers-wrapper .page__number-item.active span{color:#fff}.container .items__total-wrapper .page__numbers-wrapper .page__number-item:hover{cursor:pointer}.container .items__total-wrapper .page__numbers-wrapper .page__number-item:hover:not(.active){background-color:#ddd}.container .items__total-wrapper .page__numbers-wrapper .page__number-item:active:not(.active){background-color:#575352}.container .items__total-wrapper .page__numbers-wrapper .page__number-item span{display:flex;width:16px;height:16px;flex-direction:column;justify-content:center;color:#1D1D1D;text-align:center;font-size:13px;font-style:normal;font-weight:400;line-height:20px}.pagination{display:flex}.pagination ifx-icon-button:first-of-type{margin-right:12px}.pagination ifx-icon-button:last-of-type{margin-left:12px}a{padding:8px;border-radius:100px}ol{list-style-type:none;padding:0;margin:0;display:inline-flex;align-items:center;gap:12px}li{display:flex;flex-direction:column;justify-content:center;align-items:center;border-radius:100px}li:hover:not(.active) a{background-color:#EEEDED}li:active:not(.active) a{background-color:#575352;color:#fff}li.active{background-color:#0A8276}li.active a{color:#fff}li:hover{cursor:pointer}li a{text-decoration:none;display:flex;width:16px;height:16px;flex-direction:column;justify-content:center;color:#1D1D1D;text-align:center;font-size:13px;font-style:normal;font-weight:400;line-height:20px;align-items:center}.prev.disabled,.next.disabled{cursor:default}.prev.disabled:hover,.next.disabled:hover{cursor:default;text-decoration:none}.prev{margin-right:2.5px}.next{margin-left:2.5px}@media (min-width: 400px){li:first-child,li.active-sibling,li.active,li.active+li,li:last-child{display:inline-flex !important;flex-direction:row}li:first-child:nth-last-child(n+8)~li{display:none}li:first-child:nth-last-child(n+8)~li.active-sibling:before{content:"…";font-size:13px;display:inline-block;margin-right:6px}li:first-child:nth-last-child(n+8)~li.active+li:after{content:"…";font-size:13px;display:inline-block;margin-left:6px}li:first-child:nth-last-child(n+8)~li:nth-last-child(-n+5){display:inline-flex;flex-direction:row}li:first-child:nth-last-child(n+8)~li:nth-last-child(5):before{content:"…";font-size:13px;display:inline-block;margin-right:6px}li:first-child:nth-last-child(n+8)~li:nth-child(-n+2):before,li:first-child:nth-last-child(n+8)~li:nth-child(-n+2):after,li:first-child:nth-last-child(n+8)~li:nth-last-child(-n+2):before,li:first-child:nth-last-child(n+8)~li:nth-last-child(-n+2):after,li:first-child:nth-last-child(n+8)~li.active-sibling:nth-last-child(-n+4):before,li:first-child:nth-last-child(n+8)~li.active-sibling:nth-last-child(-n+4):after{display:none !important}li:first-child:nth-last-child(n+8).active~li:nth-last-child(-n+5),li:first-child:nth-last-child(n+8)~li.active~li:nth-last-child(-n+5){display:none}li:first-child:nth-last-child(n+8).active~li:nth-last-child(-n+5):before,li:first-child:nth-last-child(n+8)~li.active~li:nth-last-child(-n+5):before{display:none}li:first-child:nth-last-child(n+8).active~li:nth-child(-n+5),li:first-child:nth-last-child(n+8)~li.active~li:nth-child(-n+5){display:inline-flex !important;flex-direction:row}li:first-child:nth-last-child(n+8).active~li:nth-child(-n+4):after,li:first-child:nth-last-child(n+8)~li.active~li:nth-child(-n+4):after{display:none}li:first-child:nth-last-child(n+8).active~li:nth-child(5):after,li:first-child:nth-last-child(n+8)~li.active~li:nth-child(5):after{content:"…";font-size:13px;display:inline-block;margin-left:6px}li:first-child:nth-last-child(n+8).active:before,li:first-child:nth-last-child(n+8).active:after,li:first-child:nth-last-child(n+8)~li.active:before,li:first-child:nth-last-child(n+8)~li.active:after{display:none}}';const p=o;const d=class{constructor(t){e(this,t);this.ifxPageChange=i(this,"ifxPageChange",7);this.ifxNextPage=i(this,"ifxNextPage",7);this.ifxPrevPage=i(this,"ifxPrevPage",7);this.CLASS_DISABLED="disabled";this.CLASS_ACTIVE="active";this.CLASS_SIBLING_ACTIVE="active-sibling";this.DATA_KEY="pagination";this.currentPage=0;this.internalPage=1;this.itemsPerPage=10;this.numberOfPages=[];this.total=1}setItemsPerPage(e){if(e.detail){this.itemsPerPage=parseInt(e.detail.label)}else{this.itemsPerPage=10}}componentDidLoad(){this.calculateVisiblePageIndices();var e=this.el.shadowRoot.querySelector(".pagination");let i=e.querySelector(".prev");this.navigateSinglePage(i,true)}calculateNumberOfPages(){if(isNaN(this.currentPage)){this.currentPage=1}const e=this.total<=this.itemsPerPage?this.itemsPerPage:this.total;const i=this.itemsPerPage;const t=Math.ceil(e/i);if(this.currentPage<=0){this.internalPage=1}else if(this.currentPage>t){this.internalPage=t}else this.internalPage=this.currentPage;this.numberOfPages=Array.from({length:t},((e,i)=>i+1))}componentWillLoad(){this.calculateNumberOfPages()}componentDidUpdate(){var e=this.el.shadowRoot.querySelector(".pagination");var i=e.querySelectorAll("li");this.addEventListenersToPageItems(i,e);if(e.dataset[this.DATA_KEY]<this.numberOfPages){e.dataset[this.DATA_KEY]=e.dataset[this.DATA_KEY]}else e.dataset[this.DATA_KEY]=0;this.changePage(e,false)}componentWillUpdate(){this.calculateNumberOfPages()}handleEventEmission(e){let i=e+1;let t=this.numberOfPages.length;let a=e===0?null:e;let s=e+2>t?null:e+2;let l=this.itemsPerPage;this.ifxPageChange.emit({currentPage:i,totalPages:t,prevPage:a,nextPage:s,itemsPerPage:l})}addEventListenersToPageItems(e,i){e.forEach((e=>{e.addEventListener("click",(e=>{var t=i;let a=t.querySelectorAll("li");t.dataset[this.DATA_KEY]=Array.from(a).indexOf(e.currentTarget);this.changePage(t,false)}))}))}initPagination(e){var i=e.querySelectorAll("li");e.dataset[this.DATA_KEY]=Array.from(i).indexOf(e.querySelector(".active"));e.querySelector(".prev").addEventListener("click",(e=>this.navigateSinglePage(e,false)));e.querySelector(".next").addEventListener("click",(e=>this.navigateSinglePage(e,false)));this.addEventListenersToPageItems(i,e)}navigateSinglePage(e,i){let t=e;if(typeof e.target==="object"){t=e.target}if(!t.classList.contains(this.CLASS_DISABLED)){var a=t.closest(".pagination");var s=parseInt(a.dataset[this.DATA_KEY],10);s+=1*(t.classList.contains("prev")?-1:1);if(s===-1){s=0}a.dataset[this.DATA_KEY]=s;this.changePage(a,i)}}changePage(e,i){const t=e;var a=t.querySelectorAll("li");var s=parseInt(t.dataset[this.DATA_KEY],10);a.forEach((e=>{e.classList.remove(this.CLASS_ACTIVE);e.classList.remove(this.CLASS_SIBLING_ACTIVE)}));if(i&&this.internalPage>1){s=Math.floor(this.internalPage-1);t.dataset[this.DATA_KEY]=s}this.handleEventEmission(s);a[s].classList.add(this.CLASS_ACTIVE);if(s===0){t.querySelector(".prev").classList.add(this.CLASS_DISABLED);t.querySelector(".prev").disabled=true}else{a[s-1].classList.add(this.CLASS_SIBLING_ACTIVE);t.querySelector(".prev").classList.remove(this.CLASS_DISABLED);t.querySelector(".prev").disabled=false}if(s===a.length-1){t.querySelector(".next").classList.add(this.CLASS_DISABLED);t.querySelector(".next").disabled=true}else{t.querySelector(".next").classList.remove(this.CLASS_DISABLED);t.querySelector(".next").disabled=false}}calculateVisiblePageIndices(){var e=this.el.shadowRoot.querySelector(".pagination");this.initPagination(e)}render(){return t("div",{key:"b9e1b525f3a20354d409c93a1aa0faa9d9d17019","aria-label":"a pagination","aria-value":this.currentPage,class:"container"},t("div",{key:"fc932c8e4114f39e5df86007d3595f72fac6384a",class:"items__per-page-wrapper"},t("div",{key:"93816bd9264a8cd32d782cc78df9052ab93f76a7",class:"items__per-page-label"},"Results per Page"),t("div",{key:"3432585bf8ce77786657f676fdaca27aba34b413",class:"items__per-page-field"},t("ifx-select",{key:"a6def492e7db12fb2d9245a6655aaecb99282ceb",value:"undefined",size:"s",placeholder:"false","show-search":"false","search-placeholder-value":"Search...",disabled:false,error:false,"error-message":"Error",label:"","placeholder-value":"Placeholder",options:'[{"value":"ten","label":"10","selected":true}, {"value":"Twenty","label":"20","selected":false}, {"value":"Thirty","label":"30","selected":false}]'}))),t("div",{key:"275104906a9d0e733644e2b5efbab477ecfc95ca",class:"items__total-wrapper"},t("div",{key:"75528c52f8be0724c332daf2f292c1ec852f6e53",class:"page__numbers-wrapper"},t("div",{key:"4e350e7002b1de2e5fc2c16d10b4a035a3bdedad",class:"pagination"},t("ifx-icon-button",{key:"42a3fe966d4bae2bc90b24709293237a5b57c413",variant:"secondary",class:"prev",color:"primary",icon:"arrow-left-24"}),t("ol",{key:"5d5f20215e988d2adc10f842be5b9300f30b1fd1"},this.numberOfPages.map((e=>t("li",{class:`${this.internalPage===e?"active":""}`},t("a",{href:undefined},e))))),t("ifx-icon-button",{key:"ebb0d3ef295477810891b41ca03ae42cdb634cf7",class:"next",variant:"secondary",color:"primary",icon:"arrow-right-24"})))))}get el(){return a(this)}};d.style=p;export{n as ifx_chip,h as ifx_chip_item,d as ifx_pagination};
2
+ //# sourceMappingURL=p-ad3db607.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["chipCss","IfxChipStyle0","Chip","undefined","handleValueChange","newValue","this","syncSelectedOptionsWithProp","handleReadOnlyChange","opened","closeDropdownOnOutsideClick","event","path","composedPath","chipWrapper","chip","shadowRoot","querySelector","chipDropdown","includes","toggleDropdownMenu","handleKeyDown","code","preventDefault","target","tagName","handleWrapperKeyDown","handleDropdownKeyDown","updateSelectedOptions","eventDetail","detail","previousSelection","selectedOptions","variant","selected","chipItems","getChipItems","forEach","chipItem","chipState","Object","assign","emitIfxChipItemSelect","value","find","option","filter","map","emitIfxChipChange","ifxChipChange","emit","currentSelection","name","placeholder","querySelectorAll","getSelectedOptions","label","join","slice","readOnly","focusChipItemAt","index","item","length","console","error","shadowItem","setTimeout","focus","focusChip","handleUnselectButtonClick","stopPropagation","itemGotUnselected","handleWrapperClick","chipitems","targetIndex","Array","from","indexOf","syncChipState","key","size","generateKey","count","isArray","componentWillLoad","render","h","class","tabIndex","onClick","role","AriaLabel","toString","icon","e","id","chipItemCss","IfxChipItemStyle0","ChipItem","updateItemSelection","parentElement","validateSelected","oldValue","emitIfxChipItemSelectEvent","getItemLabel","innerText","toggleItemSelection","ifxChipItemSelect","handleItemClick","handleItemKeyDown","handleSelectedState","onKeyDown","checked","paginationCss","IfxPaginationStyle0","Pagination","CLASS_DISABLED","CLASS_ACTIVE","CLASS_SIBLING_ACTIVE","DATA_KEY","setItemsPerPage","itemsPerPage","parseInt","componentDidLoad","calculateVisiblePageIndices","paginationElement","el","leftArrow","navigateSinglePage","calculateNumberOfPages","isNaN","currentPage","total","totalPageNumber","Math","ceil","internalPage","numberOfPages","_","componentDidUpdate","listItems","addEventListenersToPageItems","dataset","changePage","componentWillUpdate","handleEventEmission","currActive","totalPages","prevPage","nextPage","ifxPageChange","paginationContainer","addEventListener","parent","currentTarget","initPagination","initialValue","classList","contains","closest","pagination","remove","floor","add","disabled","options","color","href"],"sources":["src/components/chip/chip.scss?tag=ifx-chip&encapsulation=shadow","src/components/chip/chip.tsx","src/components/chip/chip-item/chip-item.scss?tag=ifx-chip-item&encapsulation=shadow","src/components/chip/chip-item/chip-item.tsx","src/components/pagination/pagination.scss?tag=ifx-pagination&encapsulation=shadow","src/components/pagination/pagination.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n:host {\n display: inline-block;\n}\n\n.chip {\n position: relative;\n}\n\n.chip__wrapper {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: tokens.$ifxSpace100;\n\n box-sizing: border-box;\n border: 1px solid tokens.$ifxColorEngineering300;\n border-radius: tokens.$ifxBorderRadiusRound;\n \n background: tokens.$ifxColorBaseWhite;\n \n cursor: pointer; \n \n transition: border 100ms ease;\n\n font: tokens.$ifxBodyBody04;\n \n &:hover, &:focus-visible {\n outline: none;\n border: 1px solid tokens.$ifxColorEngineering500;\n }\n\n &:focus {\n border: 1px solid tokens.$ifxColorOcean500;\n }\n \n &.chip__wrapper--small {\n padding: tokens.$ifxSpace50 tokens.$ifxSpace150;\n }\n \n &.chip__wrapper--large {\n padding: tokens.$ifxSpace100 tokens.$ifxSpace200;\n }\n \n &.chip__wrapper--opened {\n border: 1px solid tokens.$ifxColorOcean500;\n \n .wrapper__open-button {\n transform: rotate(-180deg);\n }\n }\n \n &.chip__wrapper--selected {\n outline: 3px solid tokens.$ifxColorOcean500;\n outline-offset: -3px;\n \n color: tokens.$ifxColorOcean500;\n \n &:hover, &:focus-visible {\n outline: 3px solid tokens.$ifxColorOcean600;\n \n color: tokens.$ifxColorOcean600;\n }\n }\n}\n\n.wrapper__label {\n display: inline-flex;\n align-items: center;\n gap: tokens.$ifxSpace50;\n\n font: tokens.$ifxBodyBody04;\n \n .label__selected-options {\n font: tokens.$ifxBodyBodySemibold04;\n }\n}\n\n.wrapper__open-button {\n display:flex;\n align-items: center;\n \n transition: all 300ms ease;\n}\n\n.wrapper__unselect-button {\n display:flex;\n align-items: center;\n}\n\n.chip__dropdown {\n position: absolute;\n z-index: 1;\n\n box-shadow: 0px 6px 9px 0px #1D1D1D1A;\n border: 1px solid tokens.$ifxColorEngineering200;\n border-radius: tokens.$ifxBorderRadius12;\n padding: tokens.$ifxSpace100 0;\n\n min-width: 222px;\n \n background-color: tokens.$ifxColorBaseWhite;\n}\n","import { h, Component, Element, Event, EventEmitter, Listen, Prop, State, Watch } from '@stencil/core';\nimport { ChipItemSelectEvent } from './interfaces';\n\n@Component({\n tag: 'ifx-chip',\n styleUrl: 'chip.scss',\n shadow: true\n})\nexport class Chip {\n @Element() chip: HTMLIfxChipElement;\n\n @Event() ifxChipChange: EventEmitter<{ previousSelection: Array<ChipItemSelectEvent>, currentSelection: Array<ChipItemSelectEvent>, name: string }>;\n @Prop() placeholder: string = '';\n @Prop() size: 'small' | 'large' = 'large';\n @Prop({ mutable: true }) value: Array<string> | string = undefined;\n @Prop() variant: 'single' | 'multi' = 'single';\n @Prop() readOnly: boolean = false;\n @Prop() AriaLabel: string;\n\n @State() opened: boolean = false;\n @State() selectedOptions: Array<ChipItemSelectEvent> = [];\n\n @Watch('value')\n handleValueChange(newValue: Array<string> | string) {\n this.syncSelectedOptionsWithProp(newValue);\n }\n\n @Watch('readOnly')\n handleReadOnlyChange(newValue: boolean) {\n if (newValue) {\n this.opened = false;\n }\n }\n\n @Listen('mousedown', { target: 'document' })\n closeDropdownOnOutsideClick(event: MouseEvent) {\n const path = event.composedPath();\n const chipWrapper: HTMLElement = this.chip.shadowRoot.querySelector('.chip__wrapper');\n const chipDropdown: HTMLElement = this.chip.shadowRoot.querySelector('.chip__dropdown');\n if (!path.includes(chipDropdown) && !path.includes(chipWrapper) && this.opened) {\n this.toggleDropdownMenu();\n }\n }\n\n @Listen('keydown')\n handleKeyDown(event: KeyboardEvent) {\n // override behavior of all keys except Tab. Users should be able to tab out of the component.\n if (event.code !== 'Tab') {\n event.preventDefault(); \n }\n\n if ((event.target as HTMLElement).tagName === 'IFX-CHIP') {\n this.handleWrapperKeyDown(event);\n } else if ((event.target as HTMLElement).tagName === 'IFX-CHIP-ITEM') {\n this.handleDropdownKeyDown(event);\n }\n }\n\n @Listen('ifxChipItemSelect')\n updateSelectedOptions(event: CustomEvent<ChipItemSelectEvent>) {\n const eventDetail: ChipItemSelectEvent = event.detail;\n const previousSelection: Array<ChipItemSelectEvent> = [...this.selectedOptions];\n\n if (this.variant !== 'multi') {\n if (eventDetail.selected) {\n this.opened = false;\n const chipItems: NodeList = this.getChipItems();\n chipItems.forEach((chipItem: HTMLIfxChipItemElement) => {\n if (chipItem.selected && chipItem !== event.target) {\n chipItem.chipState = {\n ...chipItem.chipState,\n emitIfxChipItemSelect: false,\n };\n chipItem.selected = false;\n }\n });\n this.selectedOptions = [eventDetail];\n } else {\n this.selectedOptions = [];\n }\n this.value = this.selectedOptions[0] ? this.selectedOptions[0].value : undefined;\n } else {\n if (eventDetail.selected) {\n // Prevent duplicate entries\n if (!this.selectedOptions.find(option => option.value === eventDetail.value)) {\n this.selectedOptions = [...this.selectedOptions, eventDetail];\n }\n } else {\n this.selectedOptions = this.selectedOptions.filter((option) => option.value !== eventDetail.value);\n }\n this.value = this.selectedOptions.map((option) => option.value);\n }\n\n if (eventDetail.emitIfxChipChange) {\n this.ifxChipChange.emit({\n previousSelection: previousSelection,\n currentSelection: this.selectedOptions,\n name: this.placeholder\n });\n }\n }\n\n getChipItems(): NodeList {\n return this.chip.querySelectorAll('ifx-chip-item');\n }\n\n getSelectedOptions(): string {\n if (this.variant !== 'multi') {\n return this.selectedOptions.map(option => option.label).join('');\n }\n return this.selectedOptions.slice(0, 2).map(option => option.label).join(', ');\n }\n\n toggleDropdownMenu() {\n if (this.readOnly) return;\n this.opened = !this.opened;\n }\n\n /**\n * Focuses the chip item at the specified index.\n * @param index the index of the chip item to focus. -1 will focus the last chip item.\n */\n focusChipItemAt(index: number = 0) {\n this.opened = true;\n const chipItems: NodeList = this.getChipItems();\n let item: HTMLIfxChipItemElement;\n \n if (index === -1) {\n item = chipItems.item(chipItems.length - 1) as HTMLIfxChipItemElement;\n } else if (index >= 0 && index < chipItems.length) {\n item = chipItems.item(index) as HTMLIfxChipItemElement;\n } else {\n console.error(`Invalid index: ${index}`);\n return;\n }\n\n const shadowItem = item.shadowRoot.querySelector('.chip-item') as HTMLDivElement;\n if (shadowItem) {\n // Delay needed for the shadow item to be rendered.\n setTimeout(() => {\n shadowItem.focus();\n }, 1);\n }\n }\n\n focusChip() {\n const chipWrapper: HTMLElement = this.chip.shadowRoot.querySelector('.chip__wrapper');\n chipWrapper.focus();\n }\n\n handleUnselectButtonClick(event: MouseEvent) {\n event.stopPropagation();\n this.opened = false;\n\n let itemGotUnselected = false;\n const chipItems: NodeList = this.getChipItems();\n chipItems.forEach((chipItem: HTMLIfxChipItemElement) => {\n if (chipItem.selected) {\n itemGotUnselected = true;\n chipItem.chipState = {\n ...chipItem.chipState,\n emitIfxChipItemSelect: false,\n }\n chipItem.selected = false;\n }\n });\n\n /* Emit event only if at least one item was unselected. */\n if (itemGotUnselected) {\n const previousSelection: Array<ChipItemSelectEvent> = this.selectedOptions;\n this.selectedOptions = [];\n this.value = [];\n this.ifxChipChange.emit({\n previousSelection: previousSelection,\n currentSelection: [],\n name: this.placeholder\n });\n }\n }\n\n handleWrapperClick() {\n if (!this.readOnly) {\n this.toggleDropdownMenu();\n }\n }\n\n handleWrapperKeyDown(event: KeyboardEvent) {\n // Keymap oriented at https://www.w3.org/WAI/ARIA/apg/patterns/combobox/#keyboard_interaction\n if (this.readOnly) return;\n\n if (!this.opened) {\n switch (event.code) {\n case 'Space':\n case 'Enter':\n case 'ArrowDown':\n this.focusChipItemAt(0);\n break;\n case 'ArrowUp':\n this.focusChipItemAt(-1);\n break;\n }\n } else {\n switch (event.code) {\n case 'Escape':\n this.opened = false;\n this.focusChip();\n break;\n }\n }\n }\n\n handleDropdownKeyDown(event: KeyboardEvent) {\n let chipitems = this.getChipItems();\n\n let targetIndex = Array.from(chipitems).indexOf(event.target as HTMLIfxChipItemElement);\n if (targetIndex === -1) {\n console.error('Target not found in chip items');\n return;\n }\n\n switch (event.code) {\n case 'ArrowDown':\n if (targetIndex === chipitems.length - 1) break;\n this.focusChipItemAt(targetIndex + 1);\n break;\n case 'ArrowUp':\n if (targetIndex === 0) break;\n this.focusChipItemAt( targetIndex - 1);\n break;\n case 'Escape':\n this.opened = false;\n this.focusChip();\n break;\n case 'Space':\n // selection is handled by the chip-item component\n if (this.variant === 'single') {\n // only close dropdown if single select\n this.opened = false;\n this.focusChip();\n }\n break;\n case 'Enter':\n // selection is handled by the chip-item component\n this.opened = false;\n this.focusChip();\n break;\n }\n }\n\n syncChipState() {\n const chipItems: NodeList = this.getChipItems();\n let key: number = 0;\n chipItems.forEach((chipItem: HTMLIfxChipItemElement) => {\n chipItem.chipState = {\n emitIfxChipItemSelect: true,\n size: (this.size === 'small' ? 'small' : 'large'),\n variant: (this.variant === 'multi' ? 'multi' : 'single'),\n key: key++\n };\n });\n }\n\n syncSelectedOptionsWithProp(newValue: Array<string> | string) {\n // Clear old selected options\n this.selectedOptions = [];\n\n const generateKey = (() => {\n let count = 0;\n return () => count++;\n })();\n\n if (Array.isArray(newValue)) {\n this.selectedOptions = newValue.map(value => ({\n value,\n label: value,\n selected: true,\n key: generateKey(),\n emitIfxChipChange: true\n }));\n } else if (typeof newValue === 'string') {\n this.selectedOptions = [{\n value: newValue,\n label: newValue,\n selected: true,\n key: generateKey(),\n emitIfxChipChange: true\n }];\n }\n\n this.syncChipState();\n }\n\n componentWillLoad() {\n this.syncSelectedOptionsWithProp(this.value);\n }\n\n render() {\n return (\n <div class='chip'>\n <div class={`chip__wrapper chip__wrapper--${this.size === 'small' ? 'small' : 'large'}\n chip__wrapper--${this.variant === 'multi' ? 'multi' : 'single'}\n ${this.opened && !this.readOnly ? 'chip__wrapper--opened' : ''}\n ${this.selectedOptions.length ? 'chip__wrapper--selected' : ''}`}\n tabIndex={0}\n onClick={!this.readOnly ? () => { this.handleWrapperClick() } : undefined}\n role='combobox'\n aria-label={this.AriaLabel}\n aria-value={this.getSelectedOptions()}\n aria-haspopup={!this.readOnly ? 'listbox' : undefined}\n aria-expanded={!this.readOnly ? this.opened.toString() : undefined}\n aria-controls={!this.readOnly ? 'dropdown' : undefined}\n aria-readonly={this.readOnly ? 'true' : undefined}\n aria-multiselectable={this.variant === 'multi' ? 'true' : undefined}\n >\n\n <div class='wrapper__label'>\n {\n (this.selectedOptions.length === 0) && `${this.placeholder}`\n }\n\n {\n (this.selectedOptions.length !== 0 && (this.variant === 'multi' || this.readOnly) && this.placeholder !== '') &&\n `${this.placeholder}:`\n }\n\n {\n (this.selectedOptions.length !== 0) &&\n <div class='label__selected-options'>\n {this.getSelectedOptions()}\n </div>\n }\n\n {\n (this.selectedOptions.length > 2 && this.variant === 'multi') &&\n <ifx-number-indicator> {`+${this.selectedOptions.length - 2}`} </ifx-number-indicator>\n }\n </div>\n\n {\n !this.readOnly && (this.variant !== 'multi' || (this.variant === 'multi' && this.selectedOptions.length === 0)) &&\n <div class='wrapper__open-button'>\n <ifx-icon key={1} icon={`chevrondown16`} />\n </div>\n }\n\n\n { \n (this.variant !== 'multi' && this.readOnly !== false && this.selectedOptions.length > 0) &&\n <div class='wrapper__unselect-button' onClick={(e) => { this.handleUnselectButtonClick(e) }}>\n <ifx-icon key={2} icon={`cross16`} />\n </div>\n }\n\n {\n ((this.selectedOptions.length >= 1) && this.variant === 'multi') &&\n <div class='wrapper__unselect-button' onClick={(e) => { this.handleUnselectButtonClick(e) }}>\n <ifx-icon key={2} icon={`cross16`} />\n </div>\n }\n\n </div>\n\n {\n this.opened && !this.readOnly &&\n <div id='dropdown' role='listbox' class='chip__dropdown'>\n <slot />\n </div>\n }\n </div>\n );\n }\n}\n","@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../../global/font.scss\";\n\n.chip-item {\n display: flex;\n align-items: center;\n gap: tokens.$ifxSpace100;\n \n padding: tokens.$ifxSpace100 tokens.$ifxSpace200;\n \n user-select: none;\n \n transition: all 100ms ease;\n transition-property: background, color;\n \n &:hover {\n cursor: pointer;\n \n background-color: tokens.$ifxColorEngineering200;\n }\n \n &:active {\n background-color: tokens.$ifxColorEngineering300;\n }\n\n &:focus {\n outline: 2px solid tokens.$ifxColorOcean500;\n }\n \n &.chip-item--large {\n font: tokens.$ifxBodyBody03;\n }\n \n &.chip-item--small {\n font: tokens.$ifxBodyBody04;\n }\n\n &.chip-item--selected {\n color: tokens.$ifxColorOcean500;\n\n .chip-item__selected-indicator {\n display: block;\n }\n }\n}\n\n.chip-item__selected-indicator {\n display: none;\n \n margin-left: auto;\n}\n\n","import { h,\n Component,\n Element,\n Event,\n EventEmitter, \n Listen,\n Prop, \n Watch } from '@stencil/core';\nimport { ChipItemSelectEvent, ChipState } from '../interfaces';\n\n@Component({\ntag: 'ifx-chip-item',\nstyleUrl: 'chip-item.scss',\nshadow: true\n})\n\nexport class ChipItem {\n@Element() chipItem: HTMLIfxChipItemElement;\n\n@Event({ composed: false }) ifxChipItemSelect: EventEmitter<ChipItemSelectEvent>;\n\n@Prop() value: string = undefined;\n@Prop() chipState: ChipState = { emitIfxChipItemSelect: true, variant: 'multi', size: 'large' }; \n@Prop({ mutable: true, reflect: true }) selected: boolean = false;\n\n@Listen('ifxChipItemSelect', { target: 'body' })\nupdateItemSelection(event: CustomEvent<ChipItemSelectEvent>) {\n if (this.chipState.variant === 'single') {\n const target = event.target as HTMLIfxChipItemElement;\n /* Also making sure chip items are from the same group (parent) while unselecting. */\n if (this.chipItem !== target && this.chipItem.parentElement === target.parentElement) {\n this.selected = false;\n }\n }\n} \n\n@Watch('selected')\nvalidateSelected(newValue: boolean, oldValue: boolean) {\n if (newValue !== oldValue) {\n /* Do not emit if ChipState does not allow. */\n if (this.chipState.emitIfxChipItemSelect){\n this.emitIfxChipItemSelectEvent();\n } else {\n this.chipState.emitIfxChipItemSelect = true;\n }\n }\n} \n\ngetItemLabel(): string {\n return this.chipItem.innerText as string;\n}\n\ntoggleItemSelection() {\n this.selected = !this.selected;\n}\n \n\nemitIfxChipItemSelectEvent(emitIfxChipChange: boolean = true) {\n this.ifxChipItemSelect.emit({ emitIfxChipChange: emitIfxChipChange,\n key: this.chipState.key,\n label: this.getItemLabel(), \n selected: this.selected, \n value: this.value });\n}\n\nhandleItemClick() {\n this.toggleItemSelection();\n}\n\nhandleItemKeyDown(event: KeyboardEvent) {\n if (event.code === 'Enter' || event.code === 'Space') {\n this.toggleItemSelection();\n }\n}\n\nhandleSelectedState() {\n if (this.selected) {\n this.emitIfxChipItemSelectEvent(false);\n }\n}\n\n\ncomponentWillLoad() {\n /* Propogating the selected state to the Chip (Parent) component if it is set. */\n this.handleSelectedState();\n}\n\nrender() {\n return (\n <div class={`chip-item chip-item--${this.chipState.size} \n chip-item--${(this.selected && this.chipState.variant) === 'single' ? 'selected' : ''}`} \n tabIndex={0}\n onClick={() => {this.handleItemClick()}}\n onKeyDown={(e) => {this.handleItemKeyDown(e)}}\n role=\"option\"\n aria-selected={this.selected.toString()}> \n {/* Checkbox; renders only in 'multi' variant. */}\n { \n this.chipState.variant === 'multi' &&\n <ifx-checkbox checked={this.selected}\n tabIndex={-1} \n size='s'>\n </ifx-checkbox>\n }\n\n <div class='chip-item__label'> <slot /> </div>\n\n {/* Selected indicator only visible in 'single' variant. */}\n <div class='chip-item__selected-indicator'> \n <ifx-icon icon={`check${this.chipState.size === 'small' ? '12' : '16'}`}> </ifx-icon> \n </div>\n\n </div>\n );\n}\n}","@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n:host {\n display: inline-flex;\n}\n\n.container {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n gap: 32px;\n font-family: var(--ifx-font-family);\n\n\n & .items__per-page-wrapper {\n display: flex;\n align-items: center;\n gap: 16px;\n\n & .items__per-page-label {\n color: #1D1D1D;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: 20px;\n }\n\n & .items__per-page-field {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n\n & ifx-select {\n width: 92px;\n }\n }\n }\n\n & .items__total-wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 12px;\n\n & .items__total-button {\n display: flex;\n width: 40px;\n height: 40px;\n justify-content: center;\n align-items: center;\n border-radius: 100px;\n border: 1px solid #BFBBBB;\n background: #FFF;\n }\n\n & .page__numbers-wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 12px;\n\n & .page__number-item {\n display: flex;\n padding: 6px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 10px;\n border-radius: 100px;\n\n &.active {\n background-color: #0A8276;\n\n & span {\n color: #fff;\n }\n }\n\n &:hover {\n cursor: pointer;\n }\n\n &:hover:not(.active) {\n background-color: #ddd;\n\n }\n\n &:active:not(.active) {\n background-color: #575352;\n }\n\n & span {\n display: flex;\n width: 16px;\n height: 16px;\n flex-direction: column;\n justify-content: center;\n color: #1D1D1D;\n text-align: center;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n }\n }\n }\n }\n}\n\n\n.pagination {\n display: flex;\n\n & ifx-icon-button:first-of-type {\n margin-right: 12px;\n }\n\n & ifx-icon-button:last-of-type {\n margin-left: 12px;\n }\n}\n\na {\n padding: 8px;\n border-radius: 100px;\n}\n\nol {\n list-style-type: none;\n padding: 0;\n margin: 0;\n display: inline-flex;\n align-items: center;\n gap: 12px;\n}\n\nli {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n border-radius: 100px;\n\n &:hover:not(.active) {\n & a {\n background-color: #EEEDED;\n }\n }\n\n &:active:not(.active) {\n & a {\n background-color: #575352;\n color: #fff;\n }\n }\n\n &.active {\n background-color: #0A8276;\n\n & a {\n color: #fff;\n }\n }\n\n &:hover {\n cursor: pointer;\n }\n\n & a {\n text-decoration: none;\n display: flex;\n width: 16px;\n height: 16px;\n flex-direction: column;\n justify-content: center;\n color: #1D1D1D;\n text-align: center;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n align-items: center;\n }\n}\n\n.prev,\n.next {\n &.disabled {\n cursor: default;\n\n &:hover {\n cursor: default;\n text-decoration: none;\n }\n }\n}\n\n.prev {\n margin-right: 2.5px;\n}\n\n.next {\n margin-left: 2.5px;\n}\n\n\n@mixin ellipsis($before: true) {\n content: \"\\2026\";\n font-size: 13px;\n display: inline-block;\n\n @if($before) {\n margin-right: 6px;\n }\n\n @else {\n margin-left: 6px;\n }\n}\n\n\n// @media(max-width:460px) {\n// li {\n\n// &:first-child,\n// &.active,\n// &.active-sibling:nth-last-child(2), // Show second to last child if the last one is active\n// &:last-child {\n// //display: inline-block !important;\n// display: inline-flex !important;\n// flex-direction: row;\n// }\n\n// $how-many-on-ends: 3; // 1,2,3,...,10 || 1,...,8,9,10\n// // There are >= 5 pages\n// &:first-child:nth-last-child(n+6) {\n\n// &~li {\n// // Start out with all siblings hidden\n// display: none;\n\n// // Show the last children in the list by default\n// &:nth-last-child(-n+#{$how-many-on-ends}) {\n// //display: inline-block;\n// display: inline-flex;\n// flex-direction: row;\n\n// }\n\n// // The child at the beginning of the last group shows ellipsis for the group\n// &:nth-last-child(#{$how-many-on-ends}) {\n// &:before {\n// @include ellipsis(true);\n// }\n// }\n\n// // The very beginning elements do not need to show ellipsis\n// // The very end elements do not need to show ellipsis\n// }\n\n\n// &.active,\n// &~li.active {\n\n// // Show ellipsis before and after the active element\n// &:before {\n// @include ellipsis(true);\n// }\n// &:after {\n// @include ellipsis(false);\n// }\n\n\n// // If the active element is in the first or last group, don't show ellipsis (siblings will take care of it)\n// &:nth-child(-n+#{$how-many-on-ends - 1}),\n// &:nth-last-child(-n+#{$how-many-on-ends - 1}) {\n// &:before, &:after {\n// display: none;\n// }\n// }\n\n// // Hide the last group if \"active\" comes before them\n// &~li:nth-last-child(-n+#{$how-many-on-ends}) {\n// display: none;\n// }\n\n// // Show the first group together if \"active\" comes before them\n// &~li:nth-child(-n+#{$how-many-on-ends}) {\n// //display: inline-block;\n// display: inline-flex;\n// flex-direction: row;\n// }\n\n// // If \"active\" is before the last member in the group, don't show ellipsis\n// &~li:nth-child(-n+#{$how-many-on-ends - 1}) {\n// &:after {\n// display: none;\n// }\n// }\n\n\n// // The child at the end of the first group shows ellipsis for the group\n// &~li:nth-child(#{$how-many-on-ends}) {\n// &:after {\n// @include ellipsis(false);\n// }\n// }\n// }\n// }\n// }\n// }\n\n@media (min-width: 400px) {\n li {\n\n &:first-child,\n &.active-sibling,\n &.active,\n &.active+li,\n &:last-child {\n //display: inline-block!important;\n display: inline-flex !important;\n flex-direction: row;\n }\n\n // There are >= 7 pages\n &:first-child:nth-last-child(n+8) {\n $how-many-on-ends: 5; // 1,2,3,4,5,...,10 || 1,...6,7,8,9,10\n\n &~li {\n // Start out with all siblings hidden\n display: none;\n\n // Show ellipsis before the previous one\n &.active-sibling:before {\n @include ellipsis(true);\n }\n\n // Show ellipsis after the next one\n &.active+li:after {\n @include ellipsis(false);\n }\n\n // Show the last children in the list by default\n &:nth-last-child(-n+#{$how-many-on-ends}) {\n //display: inline-block;\n display: inline-flex;\n flex-direction: row;\n }\n\n // The child at the beginning of the last group shows ellipsis for the group\n &:nth-last-child(#{$how-many-on-ends}) {\n &:before {\n @include ellipsis(true);\n }\n }\n\n // The very beginning elements do not need to show ellipsis\n &:nth-child(-n+#{$how-many-on-ends - 3}),\n // The very end elements do not need to show ellipsis\n &:nth-last-child(-n+#{$how-many-on-ends - 3}),\n // Even if it's a sibling to \"active\"\n &.active-sibling:nth-last-child(-n+#{$how-many-on-ends - 1}) {\n\n &:before,\n &:after {\n display: none !important;\n }\n }\n }\n\n &.active,\n &~li.active {\n\n // Hide the last group if \"active\" comes before them\n &~li:nth-last-child(-n+#{$how-many-on-ends}) {\n display: none;\n\n // If there is overlap, the element will show, but hide it's ellipsis\n &:before {\n display: none;\n }\n }\n\n // Show the first group together if \"active\" comes before them\n &~li:nth-child(-n+#{$how-many-on-ends}) {\n //display: inline-block;\n display: inline-flex !important;\n flex-direction: row;\n }\n\n // If \"active\" is before the last member in the group, don't show ellipsis\n &~li:nth-child(-n+#{$how-many-on-ends - 1}) {\n &:after {\n display: none;\n }\n }\n\n\n // The child at the end of the first group shows ellipsis for the group\n &~li:nth-child(#{$how-many-on-ends}) {\n &:after {\n @include ellipsis(false);\n }\n }\n\n // \"active\" should never show ellipsis\n &:before,\n &:after {\n display: none;\n }\n }\n }\n }\n}","import { Component, h, Element, Event, EventEmitter, Prop, State, Listen } from '@stencil/core';\n \n\n@Component({\n tag: 'ifx-pagination',\n styleUrl: 'pagination.scss',\n shadow: true\n})\nexport class Pagination {\n @Element() el;\n @Event() ifxPageChange: EventEmitter;\n @Event() ifxNextPage: EventEmitter;\n @Event() ifxPrevPage: EventEmitter;\n @Prop() currentPage: number = 0;\n @State() internalPage: number = 1;\n @State() itemsPerPage: number = 10;\n @State() numberOfPages: number[] = [];\n @Prop() total: number = 1;\n\n private CLASS_DISABLED = \"disabled\"\n private CLASS_ACTIVE = \"active\"\n private CLASS_SIBLING_ACTIVE = \"active-sibling\"\n private DATA_KEY = \"pagination\";\n\n @Listen('ifxSelect')\n setItemsPerPage(e) {\n if(e.detail) {\n this.itemsPerPage = parseInt(e.detail.label)\n } else { \n this.itemsPerPage = 10;\n }\n }\n\n componentDidLoad() {\n this.calculateVisiblePageIndices()\n var paginationElement = this.el.shadowRoot.querySelector(\".pagination\");\n let leftArrow = paginationElement.querySelector('.prev')\n this.navigateSinglePage(leftArrow, true)\n\n }\n\n calculateNumberOfPages() {\n if (isNaN(this.currentPage)) {\n this.currentPage = 1;\n }\n const total = this.total <= this.itemsPerPage ? this.itemsPerPage : this.total;\n const itemsPerPage = this.itemsPerPage;\n const totalPageNumber = Math.ceil(total / itemsPerPage);\n\n if (this.currentPage <= 0) {\n this.internalPage = 1;\n } else if (this.currentPage > totalPageNumber) {\n this.internalPage = totalPageNumber;\n } else this.internalPage = this.currentPage;\n\n this.numberOfPages = Array.from({ length: totalPageNumber }, (_, index) => index + 1);\n }\n\n componentWillLoad() {\n this.calculateNumberOfPages()\n }\n\n componentDidUpdate() {\n var paginationElement = this.el.shadowRoot.querySelector(\".pagination\");\n var listItems = paginationElement.querySelectorAll(\"li\");\n this.addEventListenersToPageItems(listItems, paginationElement)\n\n if (paginationElement.dataset[this.DATA_KEY] < this.numberOfPages) {\n paginationElement.dataset[this.DATA_KEY] = paginationElement.dataset[this.DATA_KEY];\n } else paginationElement.dataset[this.DATA_KEY] = 0;\n\n this.changePage(paginationElement, false)\n }\n\n componentWillUpdate() {\n this.calculateNumberOfPages()\n }\n\n handleEventEmission(currActive) {\n let currentPage = currActive + 1;\n let totalPages = this.numberOfPages.length;\n let prevPage = currActive === 0 ? null : currActive;\n let nextPage = currActive + 2 > totalPages ? null : currActive + 2;\n let itemsPerPage = this.itemsPerPage\n this.ifxPageChange.emit({ currentPage, totalPages, prevPage, nextPage, itemsPerPage })\n }\n\n addEventListenersToPageItems(listItems, paginationContainer) {\n listItems.forEach((item) => {\n item.addEventListener(\"click\", (e) => {\n var parent = paginationContainer;\n let listItems = parent.querySelectorAll(\"li\");\n parent.dataset[this.DATA_KEY] = Array.from(listItems).indexOf(e.currentTarget)\n this.changePage(parent, false)\n });\n });\n }\n\n initPagination(paginationContainer) {\n var listItems = paginationContainer.querySelectorAll(\"li\");\n\n paginationContainer.dataset[this.DATA_KEY] = Array.from(listItems).indexOf(paginationContainer.querySelector(\".active\"));\n\n paginationContainer.querySelector(\".prev\").addEventListener(\"click\", (e) => this.navigateSinglePage(e, false));\n paginationContainer.querySelector(\".next\").addEventListener(\"click\", (e) => this.navigateSinglePage(e, false));\n\n this.addEventListenersToPageItems(listItems, paginationContainer)\n }\n\n navigateSinglePage(e, initialValue) {\n let el = e;\n if (typeof e.target === 'object') {\n el = e.target\n }\n\n if (!el.classList.contains(this.CLASS_DISABLED)) {\n var parent = el.closest(\".pagination\");\n var currActive = parseInt(parent.dataset[this.DATA_KEY], 10);\n currActive += 1 * (el.classList.contains(\"prev\") ? -1 : 1);\n\n if (currActive === -1) {\n currActive = 0;\n }\n\n parent.dataset[this.DATA_KEY] = currActive;\n this.changePage(parent, initialValue)\n }\n }\n\n changePage(pagination, initialValue) {\n const paginationContainer = pagination;\n var listItems = paginationContainer.querySelectorAll(\"li\");\n var currActive = parseInt(paginationContainer.dataset[this.DATA_KEY], 10);\n\n listItems.forEach((item) => {\n item.classList.remove(this.CLASS_ACTIVE);\n item.classList.remove(this.CLASS_SIBLING_ACTIVE);\n });\n\n if (initialValue && this.internalPage > 1) {\n currActive = Math.floor(this.internalPage - 1);\n paginationContainer.dataset[this.DATA_KEY] = currActive;\n }\n\n this.handleEventEmission(currActive)\n\n listItems[currActive].classList.add(this.CLASS_ACTIVE);\n\n if (currActive === 0) {\n paginationContainer.querySelector(\".prev\").classList.add(this.CLASS_DISABLED);\n paginationContainer.querySelector(\".prev\").disabled = true;\n\n } else {\n listItems[currActive - 1].classList.add(this.CLASS_SIBLING_ACTIVE);\n paginationContainer.querySelector(\".prev\").classList.remove(this.CLASS_DISABLED);\n paginationContainer.querySelector(\".prev\").disabled = false;\n }\n\n if (currActive === (listItems.length - 1)) {\n paginationContainer.querySelector(\".next\").classList.add(this.CLASS_DISABLED);\n paginationContainer.querySelector(\".next\").disabled = true;\n\n } else {\n paginationContainer.querySelector(\".next\").classList.remove(this.CLASS_DISABLED);\n paginationContainer.querySelector(\".next\").disabled = false;\n }\n }\n\n calculateVisiblePageIndices() {\n var paginationElement = this.el.shadowRoot.querySelector(\".pagination\");\n this.initPagination(paginationElement)\n }\n\n render() {\n return (\n <div aria-label='a pagination' aria-value={this.currentPage} class=\"container\">\n <div class='items__per-page-wrapper'>\n <div class='items__per-page-label'>Results per Page</div>\n <div class='items__per-page-field'>\n <ifx-select\n value='undefined'\n size='s'\n placeholder='false'\n show-search='false'\n search-placeholder-value='Search...'\n disabled={false}\n error={false}\n error-message='Error'\n label=''\n placeholder-value='Placeholder'\n options='[{\"value\":\"ten\",\"label\":\"10\",\"selected\":true}, {\"value\":\"Twenty\",\"label\":\"20\",\"selected\":false}, {\"value\":\"Thirty\",\"label\":\"30\",\"selected\":false}]' >\n </ifx-select>\n </div>\n </div>\n <div class='items__total-wrapper'>\n <div class='page__numbers-wrapper'>\n <div class=\"pagination\">\n <ifx-icon-button variant='secondary' class=\"prev\" color='primary' icon='arrow-left-24'></ifx-icon-button>\n <ol>\n {this.numberOfPages.map((item) =>\n <li class={`${this.internalPage === item ? 'active' : \"\"}`}><a href={undefined}>{item}</a></li>)}\n </ol>\n <ifx-icon-button class=\"next\" variant='secondary' color='primary' icon='arrow-right-24'></ifx-icon-button>\n </div>\n </div>\n </div>\n </div>\n );\n }\n}"],"mappings":"yDAAA,MAAMA,EAAU,6gDAChB,MAAAC,EAAeD,E,MCOFE,EAAI,M,uFAIe,G,UACI,Q,WACuBC,U,aACnB,S,cACV,M,qCAGD,M,qBAC4B,E,CAGvD,iBAAAC,CAAkBC,GAChBC,KAAKC,4BAA4BF,E,CAInC,oBAAAG,CAAqBH,GACnB,GAAIA,EAAU,CACZC,KAAKG,OAAS,K,EAKlB,2BAAAC,CAA4BC,GAC1B,MAAMC,EAAOD,EAAME,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Ac3F,KAAKe,GACvByB,EAAA,MAAIC,MAAO,GAAGlF,KAAKmI,eAAiB3E,EAAO,SAAW,MAAMyB,EAAA,KAAGiF,KAAMrK,WAAY2D,OAErFyB,EAAA,mBAAAP,IAAA,2CAAiBQ,MAAM,OAAOvD,QAAQ,YAAYsI,MAAM,UAAUzE,KAAK,sB","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as e,c as t,h as o,a as i,g as n}from"./p-6b122987.js";function a(e,t,o,i=20,n=0){const s=[];if(n>=i){return s}const d=e=>{const s=e.assignedNodes().filter((e=>e.nodeType===1));if(s.length>0){const e=s[0].parentElement;return a(e,t,o,i,n+1)}return[]};const r=Array.from(e.children||[]);for(const e of r){if(t(e)){continue}if(o(e)){s.push(e)}if(e.shadowRoot!=null){s.push(...a(e.shadowRoot,t,o,i,n+1))}else if(e.tagName==="SLOT"){s.push(...d(e))}else{s.push(...a(e,t,o,i,n+1))}}return s}function s(e){return e.hasAttribute("hidden")||e.hasAttribute("aria-hidden")&&e.getAttribute("aria-hidden")!=="false"||e.style.display===`none`||e.style.opacity===`0`||e.style.visibility===`hidden`||e.style.visibility===`collapse`}function d(e){return e.hasAttribute("disabled")||e.hasAttribute("aria-disabled")&&e.getAttribute("aria-disabled")!=="false"}function r(e){if(e.getAttribute("tabindex")==="-1"||s(e)||d(e)){return false}return e.hasAttribute("tabindex")||(e instanceof HTMLAnchorElement||e instanceof HTMLAreaElement)&&e.hasAttribute("href")||e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement||e instanceof HTMLIFrameElement}function c(e,t,o){const i=e.animate(t,Object.assign(Object.assign({},o),{fill:"both"}));i.addEventListener("finish",(()=>{i.commitStyles();i.cancel()}));return i}const l={easing:"cubic-bezier(0.390, 0.575, 0.565, 1.000)"};const f={fadeIn:[Object.assign(Object.assign({offset:0},l),{opacity:0}),Object.assign(Object.assign({offset:1},l),{opacity:1})],fadeOut:[Object.assign(Object.assign({offset:0},l),{opacity:1}),Object.assign(Object.assign({offset:1},l),{opacity:0})]};const h=':root{--ifx-font-family:"Source Sans 3";font-family:var(--ifx-font-family, sans-serif)}:host{display:block}.modal-container{display:none;justify-content:center;align-items:center;position:fixed;top:0;left:0;width:100%;height:100%;z-index:1060;overflow-y:auto;font-family:var(--ifx-font-family)}.modal-container.open{display:flex}.modal-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#1D1D1D;opacity:0.5;z-index:0}.modal-content-container{position:absolute;display:flex;justify-content:center;width:90%;min-height:218px;background-color:#fff;border-radius:0;box-shadow:0 2px 10px rgba(0, 0, 0, 0.1);overflow:hidden;box-sizing:border-box;align-items:stretch}@media screen and (min-width: 768px){.modal-content-container{width:540px;min-height:132px}.modal-content-container.m,.modal-content-container.l,.modal-content-container.s{width:90%}}@media screen and (min-width: 1024px){.modal-content-container.s{width:47vw}.modal-content-container.m{width:63vw}.modal-content-container.l{width:80%}}.modal-content{display:flex;flex-direction:column;width:100%;max-height:90vh}.modal-icon-container{display:flex;align-items:center;justify-content:center;width:32px;background-color:#0A8276;align-self:stretch}.modal-icon-container.danger{background-color:#CD002F}.modal-icon-container ifx-icon{color:#FFFFFF}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:24px;min-height:76px;max-height:105px;box-sizing:border-box;border-radius:1px 1px 0px 0px;border-bottom:1px solid #EEEDED}.modal-caption{max-height:56px;display:-webkit-box;overflow:hidden;white-space:pre-wrap;word-wrap:break-word;-webkit-line-clamp:2;-webkit-box-orient:vertical}.modal-header h2{margin:0;font-weight:600;font-size:1.25rem;line-height:28px}.modal-header button{background:none;border:none;font-size:1.5em;padding:0;cursor:pointer}.modal-close-button{align-self:flex-start;margin-right:-8px}.modal-body{padding:16px 24px;min-height:56px;box-sizing:border-box;flex:1;overflow-y:auto}.modal-footer.buttons-present ::slotted(*){display:flex;justify-content:flex-end;gap:16px;padding:16px 24px 32px 16px}.modal-border{display:flex;align-items:center;justify-content:center;width:100%;font-size:1.5em;flex-grow:1}.modal-border.primary{background-color:#0A8276}.modal-border.secondary{background-color:#575352}.modal-border.danger{background-color:#CD002F}.modal-border.success{background-color:#4CA460}.modal-border.warning{background-color:#E16B25}.modal-border.orange{background-color:#E16B25}.modal-border.ocean{background-color:#0A8276}.modal-border.grey{background-color:#575352}.modal-border.grey-200{background-color:#EEEDED}.modal-border.red{background-color:#CD002F}.modal-border.green{background-color:#4CA460}.modal-border.berry{background-color:#9C216E}';const b=h;const m=class{constructor(o){e(this,o);this.ifxOpen=t(this,"ifxOpen",7);this.ifxClose=t(this,"ifxClose",7);this.focusableElements=[];this.handleTopFocus=()=>{this.attemptFocus(this.getLastFocusableElement())};this.handleBottomFocus=()=>{this.attemptFocus(this.getFirstFocusableElement())};this.handleKeypress=e=>{if(!this.showModal){return}if(e.key==="Escape"){this.doBeforeClose("ESCAPE_KEY")}};this.opened=false;this.showModal=this.opened||false;this.caption="Modal Title";this.closeOnOverlayClick=true;this.variant="default";this.size="s";this.alertIcon="";this.okButtonLabel="OK";this.cancelButtonLabel="Cancel";this.slotButtonsPresent=false;this.showCloseButton=true}componentDidLoad(){this.focusableElements=a(this.hostElement.shadowRoot,(e=>s(e)||e.matches("[data-focus-trap-edge]")),r)}getFirstFocusableElement(){return this.focusableElements[0]}getLastFocusableElement(){return this.focusableElements[this.focusableElements.length-1]}attemptFocus(e){if(e==null){setTimeout((()=>{this.closeButton.focus()}));return}setTimeout((()=>{e.focus()}),0)}open(){this.showModal=true;try{const e=c(this.modalContainer,f.fadeIn,{duration:200});e.addEventListener("finish",(()=>{setTimeout((()=>{var e,t;(e=this.getLastFocusableElement())===null||e===void 0?void 0:e.focus();(t=this.getLastFocusableElement())===null||t===void 0?void 0:t.blur()}),0);this.ifxOpen.emit()}));this.hostElement.addEventListener("keydown",this.handleKeypress)}catch(e){this.ifxOpen.emit()}}close(){try{const e=c(this.modalContainer,f.fadeOut,{duration:200});e.addEventListener("finish",(()=>{this.showModal=false;this.ifxClose.emit()}));this.hostElement.removeEventListener("keydown",this.handleKeypress)}catch(e){this.showModal=false;this.ifxClose.emit()}}doBeforeClose(e){const t=[];t.push(e);const o=t.some((e=>e.defaultPrevented));if(!o){this.opened=false}}openedChanged(e){if(e===true){this.open()}else{this.close()}}handleOverlayClick(){if(this.closeOnOverlayClick){this.doBeforeClose("BACKDROP")}}handleButtonsSlotChange(e){var t;if(((t=e.currentTarget.assignedElements()[0])===null||t===void 0?void 0:t.childElementCount)>0){this.slotButtonsPresent=true}else{this.slotButtonsPresent=false}}render(){const e=this.variant!=="default";return o(i,{key:"38194353600e6e6ba689ff3c3bec631624c12f24"},o("div",{key:"f08db61f400c4af5d0384dc996ff47630537ab53",ref:e=>this.modalContainer=e,class:`modal-container ${this.showModal?"open":""}`},o("div",{key:"0f80cf4b8f04c46df7ccd8f3cff9fdeb4171cf90",class:"modal-overlay",onClick:()=>this.handleOverlayClick()}),o("div",{key:"5fe062d671589f423ef9bbd8e485f4e345e2a7a9","data-focus-trap-edge":true,onFocus:this.handleTopFocus,tabindex:"0"}),o("div",{key:"b4bd6f3cc799ed24e5eb4736b3d6f9b0d69e408c",class:`modal-content-container ${this.size}`,role:"dialog","aria-modal":"true","aria-label":this.caption},e?o("div",{class:`modal-icon-container ${this.variant==="alert-brand"?"":"danger"}`},this.alertIcon?o("ifx-icon",{icon:this.alertIcon}):null):null,o("div",{key:"09f8862f88cde0d410b50da912563db79e812f8d",class:"modal-content"},o("div",{key:"6770fefb279be63b37179a6e531214a94a43df41",class:"modal-header"},o("h2",{key:"babc6449e513fc3ef8513ef98fa192393b32918c",class:"modal-caption"},this.caption),this.showCloseButton&&o("ifx-icon-button",{key:"6d7fe6a29c39a3c5e3662107f78ca5768ac3ce00",class:"modal-close-button",ref:e=>this.closeButton=e,icon:"cross-24",variant:"tertiary",onClick:()=>this.doBeforeClose("CLOSE_BUTTON")})),o("div",{key:"0488350e36fd845481e2bb779e7b54484dd9e070",class:"modal-body"},o("slot",{key:"269d38f446c6d3d80f89538b57256e19bcdf871d",name:"content"})),o("div",{key:"cbf98594014a535f7f8e08e59af6600f70a24350",class:`modal-footer ${this.slotButtonsPresent?"buttons-present":""}`},o("slot",{key:"08f41c2265ec73b466ce8c666d1d653aa2d6e114",name:"buttons",onSlotchange:e=>this.handleButtonsSlotChange(e)})))),o("div",{key:"a4d68099d24172497f3e5e20abb44a9d7279b236","data-focus-trap-edge":true,onFocus:this.handleBottomFocus,tabindex:"0"})))}get hostElement(){return n(this)}static get watchers(){return{opened:["openedChanged"]}}};m.style=b;export{m as ifx_modal};
2
- //# sourceMappingURL=p-d93eb561.entry.js.map
1
+ import{r as e,c as t,h as o,a as i,g as n}from"./p-6b122987.js";function a(e,t,o,i=20,n=0){const s=[];if(n>=i){return s}const d=e=>{const s=e.assignedNodes().filter((e=>e.nodeType===1));if(s.length>0){const e=s[0].parentElement;return a(e,t,o,i,n+1)}return[]};const r=Array.from(e.children||[]);for(const e of r){if(t(e)){continue}if(o(e)){s.push(e)}if(e.shadowRoot!=null){s.push(...a(e.shadowRoot,t,o,i,n+1))}else if(e.tagName==="SLOT"){s.push(...d(e))}else{s.push(...a(e,t,o,i,n+1))}}return s}function s(e){return e.hasAttribute("hidden")||e.hasAttribute("aria-hidden")&&e.getAttribute("aria-hidden")!=="false"||e.style.display===`none`||e.style.opacity===`0`||e.style.visibility===`hidden`||e.style.visibility===`collapse`}function d(e){return e.hasAttribute("disabled")||e.hasAttribute("aria-disabled")&&e.getAttribute("aria-disabled")!=="false"}function r(e){if(e.getAttribute("tabindex")==="-1"||s(e)||d(e)){return false}return e.hasAttribute("tabindex")||(e instanceof HTMLAnchorElement||e instanceof HTMLAreaElement)&&e.hasAttribute("href")||e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement||e instanceof HTMLIFrameElement}function c(e,t,o){const i=e.animate(t,Object.assign(Object.assign({},o),{fill:"both"}));i.addEventListener("finish",(()=>{i.commitStyles();i.cancel()}));return i}const l={easing:"cubic-bezier(0.390, 0.575, 0.565, 1.000)"};const f={fadeIn:[Object.assign(Object.assign({offset:0},l),{opacity:0}),Object.assign(Object.assign({offset:1},l),{opacity:1})],fadeOut:[Object.assign(Object.assign({offset:0},l),{opacity:1}),Object.assign(Object.assign({offset:1},l),{opacity:0})]};const h=':root{--ifx-font-family:"Source Sans 3";font-family:var(--ifx-font-family, sans-serif)}:host{display:block}.modal-container{display:none;justify-content:center;align-items:center;position:fixed;top:0;left:0;width:100%;height:100%;z-index:1060;overflow-y:auto;font-family:var(--ifx-font-family)}.modal-container.open{display:flex}.modal-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#1D1D1D;opacity:0.5;z-index:0}.modal-content-container{position:absolute;display:flex;justify-content:center;width:90%;min-height:218px;background-color:#fff;border-radius:0;box-shadow:0 2px 10px rgba(0, 0, 0, 0.1);overflow:hidden;box-sizing:border-box;align-items:stretch}@media screen and (min-width: 768px){.modal-content-container{width:540px;min-height:132px}.modal-content-container.m,.modal-content-container.l,.modal-content-container.s{width:90%}}@media screen and (min-width: 1024px){.modal-content-container.s{width:47vw}.modal-content-container.m{width:63vw}.modal-content-container.l{width:80%}}.modal-content{display:flex;flex-direction:column;width:100%;max-height:90vh}.modal-icon-container{display:flex;align-items:center;justify-content:center;width:32px;background-color:#0A8276;align-self:stretch}.modal-icon-container.danger{background-color:#CD002F}.modal-icon-container ifx-icon{color:#FFFFFF}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:24px;min-height:76px;max-height:105px;box-sizing:border-box;border-radius:1px 1px 0px 0px;border-bottom:1px solid #EEEDED}.modal-caption{max-height:56px;display:-webkit-box;overflow:hidden;white-space:pre-wrap;word-wrap:break-word;-webkit-line-clamp:2;-webkit-box-orient:vertical}.modal-header h2{margin:0;font-weight:600;font-size:1.25rem;line-height:28px}.modal-header button{background:none;border:none;font-size:1.5em;padding:0;cursor:pointer}.modal-close-button{align-self:flex-start;margin-right:-8px}.modal-body{padding:16px 24px;min-height:56px;box-sizing:border-box;flex:1;overflow-y:auto}.modal-footer.buttons-present ::slotted(*){display:flex;justify-content:flex-end;gap:16px;padding:16px 24px 32px 16px}.modal-border{display:flex;align-items:center;justify-content:center;width:100%;font-size:1.5em;flex-grow:1}.modal-border.primary{background-color:#0A8276}.modal-border.secondary{background-color:#575352}.modal-border.danger{background-color:#CD002F}.modal-border.success{background-color:#4CA460}.modal-border.warning{background-color:#E16B25}.modal-border.orange{background-color:#E16B25}.modal-border.ocean{background-color:#0A8276}.modal-border.grey{background-color:#575352}.modal-border.grey-200{background-color:#EEEDED}.modal-border.red{background-color:#CD002F}.modal-border.green{background-color:#4CA460}.modal-border.berry{background-color:#9C216E}';const b=h;const m=class{constructor(o){e(this,o);this.ifxModalOpen=t(this,"ifxModalOpen",7);this.ifxModalClose=t(this,"ifxModalClose",7);this.focusableElements=[];this.handleTopFocus=()=>{this.attemptFocus(this.getLastFocusableElement())};this.handleBottomFocus=()=>{this.attemptFocus(this.getFirstFocusableElement())};this.handleKeypress=e=>{if(!this.showModal){return}if(e.key==="Escape"){this.doBeforeClose("ESCAPE_KEY")}};this.opened=false;this.showModal=this.opened||false;this.caption="Modal Title";this.closeOnOverlayClick=true;this.variant="default";this.size="s";this.alertIcon="";this.okButtonLabel="OK";this.cancelButtonLabel="Cancel";this.slotButtonsPresent=false;this.showCloseButton=true}componentDidLoad(){this.focusableElements=a(this.hostElement.shadowRoot,(e=>s(e)||e.matches("[data-focus-trap-edge]")),r)}getFirstFocusableElement(){return this.focusableElements[0]}getLastFocusableElement(){return this.focusableElements[this.focusableElements.length-1]}attemptFocus(e){if(e==null){setTimeout((()=>{this.closeButton.focus()}));return}setTimeout((()=>{e.focus()}),0)}open(){this.showModal=true;try{const e=c(this.modalContainer,f.fadeIn,{duration:200});e.addEventListener("finish",(()=>{setTimeout((()=>{var e,t;(e=this.getLastFocusableElement())===null||e===void 0?void 0:e.focus();(t=this.getLastFocusableElement())===null||t===void 0?void 0:t.blur()}),0);this.ifxModalOpen.emit()}));this.hostElement.addEventListener("keydown",this.handleKeypress)}catch(e){this.ifxModalOpen.emit()}}close(){try{const e=c(this.modalContainer,f.fadeOut,{duration:200});e.addEventListener("finish",(()=>{this.showModal=false;this.ifxModalClose.emit()}));this.hostElement.removeEventListener("keydown",this.handleKeypress)}catch(e){this.showModal=false;this.ifxModalClose.emit()}}doBeforeClose(e){const t=[];t.push(e);const o=t.some((e=>e.defaultPrevented));if(!o){this.opened=false}}openedChanged(e){if(e===true){this.open()}else{this.close()}}handleOverlayClick(){if(this.closeOnOverlayClick){this.doBeforeClose("BACKDROP")}}handleButtonsSlotChange(e){var t;if(((t=e.currentTarget.assignedElements()[0])===null||t===void 0?void 0:t.childElementCount)>0){this.slotButtonsPresent=true}else{this.slotButtonsPresent=false}}render(){const e=this.variant!=="default";return o(i,{key:"622de26c143196380000861b977a483595799667"},o("div",{key:"62e5820014cbf03a4cda7d39dd8e9f7d58d81635",ref:e=>this.modalContainer=e,class:`modal-container ${this.showModal?"open":""}`},o("div",{key:"e023841191ff25390e9b5f8b24562f8ec22eb9af",class:"modal-overlay",onClick:()=>this.handleOverlayClick()}),o("div",{key:"10d3e8232f6bc52e6bb337621fe53c96265a6b84","data-focus-trap-edge":true,onFocus:this.handleTopFocus,tabindex:"0"}),o("div",{key:"83dbaf46f8461430da29f4ec0de615bae86fc1c2",class:`modal-content-container ${this.size}`,role:"dialog","aria-modal":"true","aria-label":this.caption},e?o("div",{class:`modal-icon-container ${this.variant==="alert-brand"?"":"danger"}`},this.alertIcon?o("ifx-icon",{icon:this.alertIcon}):null):null,o("div",{key:"080b7681bca959116bd2c48741a5fd6a4dc97cd8",class:"modal-content"},o("div",{key:"847772a8f8736914887a869ae7eabd443266ca4e",class:"modal-header"},o("h2",{key:"0ac26f87449e72c39afa3f672ae4c2f44ee4465f",class:"modal-caption"},this.caption),this.showCloseButton&&o("ifx-icon-button",{key:"dba0bc92c5bb0a695f9449bf146933529da935de",class:"modal-close-button",ref:e=>this.closeButton=e,icon:"cross-24",variant:"tertiary",onClick:()=>this.doBeforeClose("CLOSE_BUTTON")})),o("div",{key:"571fca3750ca7df83c0c834e235674639d5e88a7",class:"modal-body"},o("slot",{key:"b7008875ccc46abe0b06d7f10dcc25a6d257ffdf",name:"content"})),o("div",{key:"f6639e282e3f856d648847c91752a7fca3fc3505",class:`modal-footer ${this.slotButtonsPresent?"buttons-present":""}`},o("slot",{key:"d12f3e70c2ba8f3ae52e1ec3087ea6dc916c9e92",name:"buttons",onSlotchange:e=>this.handleButtonsSlotChange(e)})))),o("div",{key:"05e2615fda33ac19d61f1845d3df042642634347","data-focus-trap-edge":true,onFocus:this.handleBottomFocus,tabindex:"0"})))}get hostElement(){return n(this)}static get watchers(){return{opened:["openedChanged"]}}};m.style=b;export{m as ifx_modal};
2
+ //# sourceMappingURL=p-bc8a4226.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["queryShadowRoot","root","skipNode","isMatch","maxDepth","depth","matches","traverseSlot","$slot","assignedNodes","filter","node","nodeType","length","$slotParent","parentElement","children","Array","from","$child","push","shadowRoot","tagName","isHidden","$elem","hasAttribute","getAttribute","style","display","opacity","visibility","isDisabled","isFocusable","HTMLAnchorElement","HTMLAreaElement","HTMLButtonElement","HTMLInputElement","HTMLTextAreaElement","HTMLSelectElement","HTMLIFrameElement","animationTo","element","keyframes","options","animated","animate","Object","assign","fill","addEventListener","commitStyles","cancel","keyframeDefaults","easing","KEYFRAMES","fadeIn","offset","fadeOut","modalCss","IfxModalStyle0","IfxModal","this","focusableElements","handleTopFocus","attemptFocus","getLastFocusableElement","handleBottomFocus","getFirstFocusableElement","handleKeypress","event","showModal","key","doBeforeClose","opened","componentDidLoad","hostElement","el","setTimeout","closeButton","focus","open","anim","modalContainer","duration","_a","_b","blur","ifxModalOpen","emit","err","close","ifxModalClose","removeEventListener","trigger","triggers","prevented","some","defaultPrevented","openedChanged","newValue","handleOverlayClick","closeOnOverlayClick","handleButtonsSlotChange","e","currentTarget","assignedElements","childElementCount","slotButtonsPresent","render","isAlertVariant","variant","h","Host","ref","class","onClick","onFocus","tabindex","size","role","caption","alertIcon","icon","showCloseButton","name","onSlotchange"],"sources":["src/global/utils/focus-trap.ts","src/global/utils/animation.ts","src/components/modal/modal.scss?tag=ifx-modal&encapsulation=shadow","src/components/modal/modal.tsx"],"sourcesContent":["/**\n * Copy/pasted from https://github.com/andreasbm/focus-trap\n */\n\n/**\n * Traverses the slots of the open shadowroots and returns all children matching the query.\n * We need to traverse each child-depth one at a time because if an element should be skipped\n * (for example because it is hidden) we need to skip all of it's children. If we use querySelectorAll(\"*\")\n * the information of whether the children is within a hidden parent is lost.\n * @param {ShadowRoot | HTMLElement} root\n * @param skipNode\n * @param isMatch\n * @param {number} maxDepth\n * @param {number} depth\n * @returns {HTMLElement[]}\n */\nexport function queryShadowRoot(\n root: ShadowRoot | HTMLElement,\n skipNode: ($elem: HTMLElement) => boolean,\n isMatch: ($elem: HTMLElement) => boolean,\n maxDepth: number = 20,\n depth: number = 0\n): HTMLElement[] {\n const matches: HTMLElement[] = [];\n\n // If the depth is above the max depth, abort the searching here.\n if (depth >= maxDepth) {\n return matches;\n }\n\n // Traverses a slot element\n const traverseSlot = ($slot: HTMLSlotElement) => {\n // Only check nodes that are of the type Node.ELEMENT_NODE\n // Read more here https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\n const assignedNodes = $slot\n .assignedNodes()\n .filter((node) => node.nodeType === 1);\n if (assignedNodes.length > 0) {\n const $slotParent = assignedNodes[0].parentElement!;\n return queryShadowRoot(\n $slotParent,\n skipNode,\n isMatch,\n maxDepth,\n depth + 1\n );\n }\n\n return [];\n };\n\n // Go through each child and continue the traversing if necessary\n // Even though the typing says that children can't be undefined, Edge 15 sometimes gives an undefined value.\n // Therefore we fallback to an empty array if it is undefined.\n const children = Array.from(root.children || []) as HTMLElement[];\n for (const $child of children) {\n // Check if the element and its descendants should be skipped\n if (skipNode($child)) {\n // console.log('-- SKIP', $child);\n continue;\n }\n\n // console.log('$child', $child);\n\n // If the element matches we always add it\n if (isMatch($child)) {\n matches.push($child);\n }\n\n if ($child.shadowRoot != null) {\n // If the element has a shadow root we need to traverse it\n matches.push(\n ...queryShadowRoot(\n $child.shadowRoot,\n skipNode,\n isMatch,\n maxDepth,\n depth + 1\n )\n );\n } else if ($child.tagName === 'SLOT') {\n // If the child is a slot we need to traverse each assigned node\n matches.push(...traverseSlot($child as HTMLSlotElement));\n } else {\n // Traverse the children of the element\n matches.push(\n ...queryShadowRoot($child, skipNode, isMatch, maxDepth, depth + 1)\n );\n }\n }\n\n return matches;\n}\n\n/**\n * Returns whether the element is hidden.\n * @param $elem\n */\nexport function isHidden($elem: HTMLElement): boolean {\n return (\n $elem.hasAttribute('hidden') ||\n ($elem.hasAttribute('aria-hidden') &&\n $elem.getAttribute('aria-hidden') !== 'false') ||\n // A quick and dirty way to check whether the element is hidden.\n // For a more fine-grained check we could use \"window.getComputedStyle\" but we don't because of bad performance.\n // If the element has visibility set to \"hidden\" or \"collapse\", display set to \"none\" or opacity set to \"0\" through CSS\n // we won't be able to catch it here. We accept it due to the huge performance benefits.\n $elem.style.display === `none` ||\n $elem.style.opacity === `0` ||\n $elem.style.visibility === `hidden` ||\n $elem.style.visibility === `collapse`\n );\n\n // If offsetParent is null we can assume that the element is hidden\n // https://stackoverflow.com/questions/306305/what-would-make-offsetparent-null\n // || $elem.offsetParent == null;\n}\n\n/**\n * Returns whether the element is disabled.\n * @param $elem\n */\nexport function isDisabled($elem: HTMLElement): boolean {\n return (\n $elem.hasAttribute('disabled') ||\n ($elem.hasAttribute('aria-disabled') &&\n $elem.getAttribute('aria-disabled') !== 'false')\n );\n}\n\n/**\n * Determines whether an element is focusable.\n * Read more here: https://stackoverflow.com/questions/1599660/which-html-elements-can-receive-focus/1600194#1600194\n * Or here: https://stackoverflow.com/questions/18261595/how-to-check-if-a-dom-element-is-focusable\n * @param $elem\n */\nexport function isFocusable($elem: HTMLElement): boolean {\n // Discard elements that are removed from the tab order.\n if (\n $elem.getAttribute('tabindex') === '-1' ||\n isHidden($elem) ||\n isDisabled($elem)\n ) {\n return false;\n }\n\n return (\n // At this point we know that the element can have focus (eg. won't be -1) if the tabindex attribute exists\n $elem.hasAttribute('tabindex') ||\n // Anchor tags or area tags with a href set\n (($elem instanceof HTMLAnchorElement || $elem instanceof HTMLAreaElement) &&\n $elem.hasAttribute('href')) ||\n // Form elements which are not disabled\n $elem instanceof HTMLButtonElement ||\n $elem instanceof HTMLInputElement ||\n $elem instanceof HTMLTextAreaElement ||\n $elem instanceof HTMLSelectElement ||\n // IFrames\n $elem instanceof HTMLIFrameElement\n );\n}","export function animationTo(\n element: HTMLElement,\n keyframes: Keyframe | Keyframe[],\n options?: KeyframeAnimationOptions\n) {\n const animated = element.animate(keyframes, { ...options, fill: 'both' });\n animated.addEventListener('finish', () => {\n // @ts-ignore\n animated.commitStyles();\n animated.cancel();\n });\n\n return animated;\n}\n\nconst keyframeDefaults = {\n easing: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)',\n};\n\nexport const KEYFRAMES = {\n fadeIn: [\n {\n offset: 0,\n ...keyframeDefaults,\n opacity: 0,\n },\n {\n offset: 1,\n ...keyframeDefaults,\n opacity: 1,\n },\n ],\n fadeOut: [\n {\n offset: 0,\n ...keyframeDefaults,\n opacity: 1,\n },\n {\n offset: 1,\n ...keyframeDefaults,\n opacity: 0,\n },\n ],\n};","@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n:host {\n display: block;\n}\n\n.modal-container {\n display: none;\n justify-content: center;\n align-items: center;\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 1060;\n overflow-y: auto;\n font-family: var(--ifx-font-family);\n\n}\n\n.modal-container.open {\n display: flex;\n}\n\n.modal-overlay {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: tokens.$ifxColorBaseBlack;\n opacity: 0.5;\n z-index: 0;\n}\n\n.modal-content-container {\n position: absolute;\n display: flex;\n justify-content: center;\n width: 90%;\n min-height: 218px;\n background-color: #fff;\n border-radius: tokens.$ifxBorderRadiusNone;\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);\n overflow: hidden;\n box-sizing: border-box;\n align-items: stretch;\n}\n\n/* Add desktop size here */\n@media screen and (min-width: 768px) {\n .modal-content-container {\n width: 540px;\n min-height: 132px;\n\n &.m,\n &.l,\n &.s {\n width: 90%;\n }\n }\n}\n\n@media screen and (min-width: 1024px) {\n .modal-content-container {\n\n &.s {\n width: 47vw;\n }\n\n &.m {\n width: 63vw;\n }\n\n &.l {\n width: 80%;\n }\n }\n}\n\n.modal-content {\n display: flex;\n flex-direction: column;\n width: 100%;\n max-height: 90vh;\n}\n\n.modal-icon-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n background-color: tokens.$ifxColorOcean500;\n align-self: stretch;\n\n &.danger {\n background-color: tokens.$ifxColorRed500;\n }\n\n & ifx-icon {\n color: tokens.$ifxColorBaseWhite;\n }\n}\n\n.modal-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 24px;\n min-height: 76px;\n max-height: 105px;\n box-sizing: border-box;\n border-radius: 1px 1px 0px 0px;\n border-bottom: 1px solid tokens.$ifxColorEngineering200;\n}\n\n.modal-caption {\n max-height: 56px;\n display: -webkit-box;\n overflow: hidden;\n white-space: pre-wrap;\n word-wrap: break-word;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical; \n}\n\n.modal-header h2 {\n margin: 0;\n font-weight: tokens.$ifxFontWeightSemibold;\n font-size: tokens.$ifxFontSizeXl;\n line-height: 28px;\n}\n\n.modal-header button {\n background: none;\n border: none;\n font-size: 1.5em;\n padding: 0;\n cursor: pointer;\n}\n\n.modal-close-button {\n align-self: flex-start;\n margin-right: -8px;\n}\n\n.modal-body {\n padding: 16px 24px;\n min-height: 56px;\n box-sizing: border-box;\n flex: 1;\n overflow-y: auto;\n}\n\n.modal-footer.buttons-present ::slotted(*){\n display: flex;\n justify-content: flex-end;\n gap: 16px;\n padding: 16px 24px 32px 16px\n}\n\n.modal-border {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n font-size: 1.5em;\n flex-grow: 1;\n\n &.primary {\n background-color: tokens.$ifxColorOcean500;\n }\n\n &.secondary {\n background-color: tokens.$ifxColorEngineering500;\n }\n\n &.danger {\n background-color: tokens.$ifxColorRed500;\n }\n\n &.success {\n background-color: tokens.$ifxColorGreen500;\n }\n\n &.warning {\n background-color: tokens.$ifxColorOrange500;\n }\n\n &.orange {\n background-color: tokens.$ifxColorOrange500;\n }\n\n &.ocean {\n background-color: tokens.$ifxColorOcean500;\n }\n\n &.grey {\n background-color: tokens.$ifxColorEngineering500;\n }\n\n &.grey-200 {\n background-color: tokens.$ifxColorEngineering200;\n }\n\n &.red {\n background-color: tokens.$ifxColorRed500;\n }\n\n &.green {\n background-color: tokens.$ifxColorGreen500;\n }\n\n &.berry {\n background-color: tokens.$ifxColorBerry500;\n }\n}","import { Component, Prop, Element, State, Event, Host, EventEmitter, h, Watch } from '@stencil/core';\nimport { queryShadowRoot, isHidden, isFocusable } from '../../global/utils/focus-trap';\nimport { animationTo, KEYFRAMES } from '../../global/utils/animation';\n \n\ntype CloseEventTrigger = 'CLOSE_BUTTON' | 'ESCAPE_KEY' | 'BACKDROP';\n\nexport interface BeforeCloseEventDetail {\n trigger: CloseEventTrigger;\n}\n@Component({\n tag: 'ifx-modal',\n styleUrl: 'modal.scss',\n shadow: true\n})\nexport class IfxModal {\n @Prop({ reflect: true, mutable: true }) opened?: boolean = false;\n @State() showModal: boolean = this.opened || false;\n\n @Prop() caption: string = 'Modal Title';\n @Prop() closeOnOverlayClick: boolean = true;\n\n @Event() ifxModalOpen: EventEmitter;\n @Event() ifxModalClose: EventEmitter;\n\n @Prop() variant: 'default' | 'alert-brand' | 'alert-danger' = 'default';\n \n @Prop() size: 's' | 'm' | 'l' = 's';\n\n @Prop() alertIcon: string = '';\n @Prop() okButtonLabel: string = 'OK';\n @Prop() cancelButtonLabel: string = 'Cancel';\n @Element() hostElement: HTMLElement;\n\n @State() slotButtonsPresent: boolean = false;\n\n @Prop() showCloseButton: boolean = true;\n\n private modalContainer: HTMLElement;\n private focusableElements: HTMLElement[] = [];\n private closeButton: HTMLButtonElement | HTMLIfxIconButtonElement;\n\n componentDidLoad() {\n // Query all focusable elements and store them in `focusableElements`.\n // Needed for the \"focus trap\" functionality.\n this.focusableElements = queryShadowRoot(\n this.hostElement.shadowRoot,\n (el) => isHidden(el) || el.matches('[data-focus-trap-edge]'),\n isFocusable\n );\n\n }\n\n getFirstFocusableElement(): HTMLElement | null {\n return this.focusableElements[0];\n }\n\n getLastFocusableElement(): HTMLElement | null {\n return this.focusableElements[this.focusableElements.length - 1];\n }\n\n handleTopFocus = () => {\n this.attemptFocus(this.getLastFocusableElement());\n };\n\n handleBottomFocus = () => {\n this.attemptFocus(this.getFirstFocusableElement());\n };\n\n\n attemptFocus(element: HTMLElement | null) {\n if (element == null) {\n setTimeout(() => { //wait until DOM is fully loaded\n this.closeButton.focus();\n },);\n return;\n }\n\n setTimeout(() => { //wait until DOM is fully loaded\n element.focus();\n }, 0);\n }\n\n\n open() {\n this.showModal = true;\n try {\n const anim = animationTo(this.modalContainer, KEYFRAMES.fadeIn, {\n duration: 200,\n });\n anim.addEventListener('finish', () => {\n // Setting focus on last item and removing immediately\n // so, on tab press first element is focused\n setTimeout(() => {\n this.getLastFocusableElement()?.focus();\n this.getLastFocusableElement()?.blur();\n }, 0);\n\n this.ifxModalOpen.emit();\n });\n\n this.hostElement.addEventListener('keydown', this.handleKeypress);\n } catch (err) {\n this.ifxModalOpen.emit();\n\n }\n\n\n }\n\n close() {\n try {\n const anim = animationTo(this.modalContainer, KEYFRAMES.fadeOut, {\n duration: 200,\n });\n anim.addEventListener('finish', () => {\n this.showModal = false;\n this.ifxModalClose.emit();\n });\n this.hostElement.removeEventListener('keydown', this.handleKeypress);\n } catch (err) {\n this.showModal = false;\n this.ifxModalClose.emit();\n }\n }\n\n handleKeypress = (event: KeyboardEvent) => {\n if (!this.showModal) {\n return;\n }\n if (event.key === 'Escape') {\n this.doBeforeClose('ESCAPE_KEY');\n }\n };\n\n\n doBeforeClose(trigger: CloseEventTrigger) {\n const triggers = [];\n triggers.push(trigger);\n const prevented = triggers.some((event) => event.defaultPrevented);\n if (!prevented) {\n this.opened = false;\n }\n }\n\n\n\n @Watch('opened')\n openedChanged(newValue) {\n if (newValue === true) {\n this.open();\n } else {\n this.close()\n }\n }\n\n\n handleOverlayClick() {\n if (this.closeOnOverlayClick) {\n this.doBeforeClose('BACKDROP')\n }\n }\n\n\n handleButtonsSlotChange(e) {\n if(e.currentTarget.assignedElements()[0]?.childElementCount > 0) {\n this.slotButtonsPresent = true;\n }else{\n this.slotButtonsPresent = false;\n }\n }\n\n\n render() {\n const isAlertVariant = this.variant !== 'default';\n return (\n <Host>\n <div\n ref={(el) => (this.modalContainer = el)}\n class={`modal-container ${this.showModal ? 'open' : ''}`}\n >\n <div\n class=\"modal-overlay\"\n onClick={() => this.handleOverlayClick()}\n ></div>\n <div\n data-focus-trap-edge\n onFocus={this.handleTopFocus}\n tabindex=\"0\"\n ></div>\n <div\n class={`modal-content-container ${this.size}`}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={this.caption}>\n {isAlertVariant ? (\n <div class={`modal-icon-container ${this.variant === 'alert-brand' ? '' : 'danger'}`}>\n {this.alertIcon ? <ifx-icon icon={this.alertIcon} /> : null}\n </div>\n ) : null}\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h2 class=\"modal-caption\">{this.caption}</h2>\n { \n this.showCloseButton && \n <ifx-icon-button class = 'modal-close-button' ref={(el) => (this.closeButton = el)} icon=\"cross-24\" variant=\"tertiary\" onClick={() => this.doBeforeClose('CLOSE_BUTTON') }>\n </ifx-icon-button>\n }\n </div>\n <div class=\"modal-body\">\n <slot name=\"content\" /*onSlotchange={() => console.log('slots children modified')}*/ />\n </div>\n <div class={`modal-footer ${this.slotButtonsPresent ? 'buttons-present' : ''}`}>\n <slot name=\"buttons\" onSlotchange={(e)=>this.handleButtonsSlotChange(e)}>\n </slot>\n </div>\n </div>\n </div>\n <div\n data-focus-trap-edge\n onFocus={this.handleBottomFocus}\n tabindex=\"0\"\n ></div>\n </div>\n </Host>\n\n );\n }\n}"],"mappings":"yEAgBgBA,EACdC,EACAC,EACAC,EACAC,EAAmB,GACnBC,EAAgB,GAEhB,MAAMC,EAAyB,GAG/B,GAAID,GAASD,EAAU,CACrB,OAAOE,C,CAIT,MAAMC,EAAgBC,IAGpB,MAAMC,EAAgBD,EACnBC,gBACAC,QAAQC,GAASA,EAAKC,WAAa,IACtC,GAAIH,EAAcI,OAAS,EAAG,CAC5B,MAAMC,EAAcL,EAAc,GAAGM,cACrC,OAAOf,EACLc,EACAZ,EACAC,EACAC,EACAC,EAAQ,E,CAIZ,MAAO,EAAE,EAMX,MAAMW,EAAWC,MAAMC,KAAKjB,EAAKe,UAAY,IAC7C,IAAK,MAAMG,KAAUH,EAAU,CAE7B,GAAId,EAASiB,GAAS,CAEpB,Q,CAMF,GAAIhB,EAAQgB,GAAS,CACnBb,EAAQc,KAAKD,E,CAGf,GAAIA,EAAOE,YAAc,KAAM,CAE7Bf,EAAQc,QACHpB,EACDmB,EAAOE,WACPnB,EACAC,EACAC,EACAC,EAAQ,G,MAGP,GAAIc,EAAOG,UAAY,OAAQ,CAEpChB,EAAQc,QAAQb,EAAaY,G,KACxB,CAELb,EAAQc,QACHpB,EAAgBmB,EAAQjB,EAAUC,EAASC,EAAUC,EAAQ,G,EAKtE,OAAOC,CACT,C,SAMgBiB,EAASC,GACvB,OACEA,EAAMC,aAAa,WAClBD,EAAMC,aAAa,gBAClBD,EAAME,aAAa,iBAAmB,SAKxCF,EAAMG,MAAMC,UAAY,QACxBJ,EAAMG,MAAME,UAAY,KACxBL,EAAMG,MAAMG,aAAe,UAC3BN,EAAMG,MAAMG,aAAe,UAM/B,C,SAMgBC,EAAWP,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AQf,KAAKiB,YAAcF,EAAK8C,KAAK,WAAWZ,QAAQ,WAAWK,QAAS,IAAMtD,KAAKW,cAAc,mBAI7JuC,EAAA,OAAAxC,IAAA,2CAAK2C,MAAM,cACTH,EAAA,QAAAxC,IAAA,2CAAMqD,KAAK,aAEbb,EAAA,OAAAxC,IAAA,2CAAK2C,MAAO,gBAAgBrD,KAAK8C,mBAAqB,kBAAoB,MACxEI,EAAA,QAAAxC,IAAA,2CAAMqD,KAAK,UAAUC,aAAetB,GAAI1C,KAAKyC,wBAAwBC,QAK3EQ,EAAA,OAAAxC,IAAA,uEAEE6C,QAASvD,KAAKK,kBACdmD,SAAS,O","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as e,h as i,g as s}from"./p-6b122987.js";const n=':root{--ifx-font-family:"Source Sans 3";font-family:var(--ifx-font-family, sans-serif)}.ifx-multiselect-container{position:relative;box-sizing:border-box;font-family:var(--ifx-font-family)}.ifx-multiselect-container.small-select{height:36px}.ifx-multiselect-container.medium-select{height:40px}.ifx-multiselect-container:hover{cursor:pointer}.ifx-multiselect-container .ifx-label-wrapper{font-size:1rem;line-height:1.5rem;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;max-width:100%}.ifx-multiselect-container .ifx-error-message-wrapper{color:#CD002F;font-size:0.75rem;line-height:1rem;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;max-width:100%}.ifx-multiselect-container .ifx-multiselect-wrapper{background-color:#FFFFFF;box-sizing:border-box;position:relative;display:flex;align-items:center;border:1px solid #8D8786;border-radius:1px;width:100%;font-weight:400;font-style:normal}.ifx-multiselect-container .ifx-multiselect-wrapper.small-select{height:36px;padding:8px 12px;font-size:0.875rem;line-height:1.25rem}.ifx-multiselect-container .ifx-multiselect-wrapper.medium-select{height:40px;padding:8px 16px;font-size:1rem;line-height:1.5rem}.ifx-multiselect-container .ifx-multiselect-wrapper:focus-visible{outline:none}.ifx-multiselect-container .ifx-multiselect-wrapper:focus-visible:not(.active):not(:active){outline:none}.ifx-multiselect-container .ifx-multiselect-wrapper:focus-visible:not(.active):not(:active)::before{content:"";position:absolute;width:calc(100% + 4px);height:calc(100% + 4px);top:50%;left:50%;transform:translate(-50%, -50%);border:2px solid #0A8276;border-radius:2px}.ifx-multiselect-container .ifx-multiselect-wrapper.disabled{background:#EEEDED;color:#575352;border-color:#575352;cursor:default;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ifx-multiselect-container .ifx-multiselect-wrapper.error{border-color:#CD002F}.ifx-multiselect-container .ifx-multiselect-wrapper:hover:not(.focus,:focus){border-color:#575352}.ifx-multiselect-container .ifx-multiselect-wrapper.active{border-color:#0A8276 !important}.ifx-multiselect-container .ifx-multiselect-wrapper.active .icon-wrapper-up{display:flex;align-items:center;justify-content:center;padding-left:8px}.ifx-multiselect-container .ifx-multiselect-wrapper.active .icon-wrapper-down{display:none}.ifx-multiselect-container .ifx-multiselect-wrapper .icon-wrapper-up{display:none}.ifx-multiselect-container .ifx-multiselect-wrapper .icon-wrapper-down{display:flex;align-items:center;justify-content:center;padding-left:8px}.ifx-multiselect-container .ifx-multiselect-wrapper.is-flipped .ifx-multiselect-dropdown-menu{top:auto;bottom:100%}.ifx-multiselect-container .ifx-multiselect-input{flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ifx-multiselect-container .ifx-multiselect-input.placeholder{opacity:0.5}.ifx-multiselect-container .ifx-multiselect-icon-container{margin-left:auto;align-items:center;display:flex}.ifx-multiselect-container .ifx-clear-button{display:flex}.ifx-multiselect-container .ifx-multiselect-dropdown-menu{position:absolute;top:100%;left:0;width:100%;margin-top:2px;background-color:#fff;box-shadow:0px 6px 9px 0px rgba(29, 29, 29, 0.1);max-height:300px;overflow-y:auto;z-index:var(--dynamic-z-index, 1)}.ifx-multiselect-container .ifx-multiselect-dropdown-menu .search-input{position:sticky;top:0;left:0;z-index:1;width:100%;padding:8px 16px;font-size:1rem;line-height:1.5rem;font-style:normal;font-weight:400;box-sizing:border-box;background-color:#FFFFFF;border:none;border-bottom:1px solid #8D8786}.ifx-multiselect-container .ifx-multiselect-dropdown-menu .search-input:focus{outline:none;border:1px solid #0A8276}.ifx-multiselect-container .ifx-multiselect-dropdown-menu .search-input::placeholder{color:#999}.ifx-multiselect-container .option{position:relative;padding:8px 16px;gap:8px;align-items:center;display:flex;font-style:normal;font-weight:400}.ifx-multiselect-container .option.small-select{font-size:0.875rem;line-height:1.25rem}.ifx-multiselect-container .option.medium-select{font-size:1rem;line-height:1.5rem}.ifx-multiselect-container .option:hover{background-color:#EEEDED}.ifx-multiselect-container .option:focus:not(.disabled){background-color:#BFBBBB;outline:none}.ifx-multiselect-container .option.is-highlighted{background-color:#EEEDED}.ifx-multiselect-container .option.sub-option{padding-left:30px;}.ifx-multiselect-container .option.disabled:hover{cursor:default}.ifx-multiselect-container .option label{cursor:inherit}.select-all-wrapper{padding-top:8px}';const o=n;function r(t,e){let i;return function s(...n){const o=()=>{clearTimeout(i);t(...n)};clearTimeout(i);i=setTimeout(o,e)}}const l=class{constructor(i){t(this,i);this.ifxSelect=e(this,"ifxSelect",7);this.ifxMultiselectIsOpen=e(this,"ifxMultiselectIsOpen",7);if(i.$hostElement$["s-ei"]){this.internals=i.$hostElement$["s-ei"]}else{this.internals=i.$hostElement$.attachInternals();i.$hostElement$["s-ei"]=this.internals}this.currentIndex=0;this.handleSearch=r((t=>{const e=t.value.toLowerCase();if(e===""){this.filteredOptions=this.loadedOptions}else{this.filteredOptions=this.loadedOptions.filter((t=>t.label.toLowerCase().includes(e)))}}),300);this.handleDocumentClick=t=>{const e=t.composedPath();if(!e.includes(this.dropdownElement)){this.dropdownOpen=false;document.removeEventListener("click",this.handleDocumentClick);this.ifxMultiselectIsOpen.emit(this.dropdownOpen)}};this.name=undefined;this.options=undefined;this.batchSize=50;this.size="medium (40px)";this.disabled=false;this.error=false;this.internalError=false;this.errorMessage="Error";this.internalErrorMessage=undefined;this.label="";this.persistentSelectedOptions=[];this.placeholder="";this.dropdownOpen=false;this.dropdownFlipped=undefined;this.maxItemCount=undefined;this.zIndex=1;this.isLoading=false;this.loadedOptions=[];this.filteredOptions=[];this.showSearch=true;this.showSelectAll=true;this.optionCount=0;this.optionsProcessed=false}updateOptions(){this.loadedOptions=[];this.filteredOptions=[];this.optionCount=0;this.optionsProcessed=false;this.persistentSelectedOptions=[];this.loadInitialOptions()}async loadInitialOptions(){this.isLoading=true;this.internalError=this.error;this.internalErrorMessage=this.errorMessage;this.loadedOptions=await this.fetchOptions(0,this.batchSize);this.isLoading=false}async fetchMoreOptions(){this.isLoading=true;const t=await this.fetchOptions(this.loadedOptions.length,this.batchSize);this.loadedOptions=[...this.loadedOptions,...t];this.isLoading=false}handleScroll(t){const e=t.target;const i=Math.floor((e.scrollHeight-e.clientHeight)/2);if(e.scrollTop>=i){this.fetchMoreOptions()}}async fetchOptions(t,e){let i=[];if(typeof this.options==="string"){try{i=JSON.parse(this.options)}catch(t){console.error("Failed to parse options:",t)}}else if(Array.isArray(this.options)){i=this.options}else{console.error("Unexpected value for options:",this.options)}if(!this.optionsProcessed){this.optionCount=this.countOptions(i);const t=this.collectSelectedOptions(i);const e=t.filter((t=>!this.persistentSelectedOptions.some((e=>e.value==t.value))));this.persistentSelectedOptions=[...this.persistentSelectedOptions,...e];this.optionsProcessed=true}const s=i.slice(t,t+e);return s}collectSelectedOptions(t){let e=[];for(const i of t){if(i.selected){if(i.children&&i.children.length>0){e=e.concat(this.collectLeafOptions(i.children))}else{e.push(i)}}else{if(i.children&&i.children.length>0){e=e.concat(this.collectSelectedOptions(i.children))}}}return e}collectLeafOptions(t){let e=[];for(const i of t){if(i.children&&i.children.length>0){e=e.concat(this.collectLeafOptions(i.children))}else{e.push(i)}}return e}countOptions(t){let e=0;for(const i of t){if(i.children&&i.children.length>=0){e+=this.countOptions(i.children)}else{e++}}return e}componentDidLoad(){setTimeout((()=>{this.positionDropdown()}),500)}componentWillLoad(){this.loadInitialOptions();this.filteredOptions=[...this.loadedOptions]}updateInternalError(){this.internalError=this.error}updateInternalErrorMessage(){this.internalErrorMessage=this.errorMessage}loadedOptionsChanged(){this.filteredOptions=[...this.loadedOptions]}onSelectionChange(t,e){const i=new FormData;t.forEach((t=>i.append(this.name,t.value)));this.internals.setFormValue(i)}handleOptionClick(t){this.internalError=false;if(!t.selected&&this.isSelectionLimitReached(t)){t.checkboxRef.toggleCheckedState(false);this.internalError=true;this.internalErrorMessage="Please consider the maximum number of items to choose from";return}this.updateSelection(t);this.ifxSelect.emit(this.persistentSelectedOptions)}isSelectionLimitReached(t){let e=t.children?t.children.length:1;return this.maxItemCount&&this.persistentSelectedOptions.length+e>this.maxItemCount&&!this.persistentSelectedOptions.some((e=>e.value===t.value))}updateSelection(t){const e=this.persistentSelectedOptions.some((e=>e.value===t.value));if(t.children&&t.children.length>0){this.handleParentOptionClick(t)}else{this.handleChildOptionClick(t,e)}}async selectAll(){const t=await this.fetchOptions(0,this.optionCount);this.selectAllRecursive(t);this.ifxSelect.emit(this.persistentSelectedOptions)}selectAllRecursive(t){for(const e of t){if(e.children&&e.children.length>0){this.selectAllRecursive(e.children)}else{if(!this.persistentSelectedOptions.some((t=>t.value===e.value))){e.selected=true;this.persistentSelectedOptions=[...this.persistentSelectedOptions,e]}}}}handleParentOptionClick(t){const e=t.children.every((t=>this.persistentSelectedOptions.some((e=>e.value===t.value))));if(e){this.persistentSelectedOptions=[...this.persistentSelectedOptions.filter((e=>!t.children.some((t=>t.value===e.value))))];t.selected=false;t.children.forEach((t=>{t.selected=false}))}else{const e=[...t.children.filter((t=>!this.persistentSelectedOptions.some((e=>e.value===t.value))))];t.selected=true;t.children.forEach((t=>{t.selected=true}));this.persistentSelectedOptions=[...this.persistentSelectedOptions,...e]}}handleChildOptionClick(t,e){if(e){this.persistentSelectedOptions=[...this.persistentSelectedOptions.filter((e=>e.value!==t.value))];t.selected=false}else{this.persistentSelectedOptions=[...this.persistentSelectedOptions,t];t.selected=true}this.updateParentSelectedState()}updateParentSelectedState(){this.loadedOptions.forEach((t=>{var e;if(((e=t.children)===null||e===void 0?void 0:e.length)>0){if(t.children.every((t=>t.selected===true)))t.selected=true;else{t.selected=false;if(this.isOptionIndeterminate(t)){t.indeterminate=true}else{t.indeterminate=false}}}}))}getSizeClass(){return`${this.size}`==="s"?"small-select":"medium-select"}toggleDropdown(){this.dropdownOpen=!this.dropdownOpen;setTimeout((()=>{if(this.dropdownOpen){document.addEventListener("click",this.handleDocumentClick)}this.ifxMultiselectIsOpen.emit(this.dropdownOpen)}),0);this.zIndex=l.globalZIndex++}waitForElement(t,e,i=50){let s=0;function n(){requestAnimationFrame((()=>{const o=t();if(o.length>0||s>i){e(o)}else{s++;n()}}))}n()}handleKeyDown(t){if(this.disabled)return;const e=this.dropdownElement.querySelectorAll(".option");switch(t.code){case"Enter":this.toggleDropdown();this.waitForElement((()=>this.dropdownElement.querySelectorAll(".option")),(t=>{this.updateHighlightedOption(t)}));break;case"Space":this.toggleDropdown();this.waitForElement((()=>this.dropdownElement.querySelectorAll(".option")),(t=>{this.updateHighlightedOption(t)}));break;case"ArrowDown":this.handleArrowDown(e);if(this.dropdownOpen){this.updateHighlightedOption(e)}break;case"ArrowUp":this.handleArrowUp(e);if(this.dropdownOpen){this.updateHighlightedOption(e)}break}}handleWrapperClick(t){this.positionDropdown();if(t.currentTarget===t.target){this.toggleDropdown()}}clearSelection(){this.persistentSelectedOptions=[];this.ifxSelect.emit(this.persistentSelectedOptions)}positionDropdown(){var t;const e=(t=this.el.shadowRoot.querySelector(".ifx-multiselect-wrapper"))===null||t===void 0?void 0:t.getBoundingClientRect();const i=window.innerHeight-e.bottom;const s=e.top;if(s>i&&e.height>i||e.bottom>window.innerHeight){this.dropdownFlipped=true}else{this.dropdownFlipped=false}}updateHighlightedOption(t){t.forEach((t=>t.classList.remove("is-highlighted")));if(this.currentIndex>=0&&this.currentIndex<t.length){t[this.currentIndex].classList.add("is-highlighted");t[this.currentIndex].focus()}}handleArrowDown(t){if(this.currentIndex<t.length-1){this.currentIndex++}else{this.currentIndex=0}}handleArrowUp(t){if(this.currentIndex>0){this.currentIndex--}else{this.currentIndex=t.length-1}}handleOptionKeyDown(t,e){if(t.key!=="ArrowUp"&&t.key!=="ArrowDown")t.stopPropagation();if(t.key==="Enter"||t.key===" "){this.handleOptionClick(e)}}renderOption(t,e){var s;const n=this.isOptionIndeterminate(t);const o=t.children?n||this.isOptionSelected(t):this.persistentSelectedOptions.some((e=>e.value===t.value));const r=!o&&this.maxItemCount&&this.persistentSelectedOptions.length>=this.maxItemCount;const l=`checkbox-${t.value}-${e}`;return i("div",{class:"option-wrapper"},i("div",{class:`option ${o?"selected":""} ${r?"disabled":""} \n ${this.getSizeClass()}`,"data-value":t.value,onKeyDown:e=>!r&&this.handleOptionKeyDown(e,t),onClick:()=>!r&&this.handleOptionClick(t),tabindex:"0",role:`${((s=t.children)===null||s===void 0?void 0:s.length)>0?"treeitem":"option"}`},i("ifx-checkbox",{tabIndex:-1,ref:e=>t.checkboxRef=e,id:l,size:"s",checked:n?false:o,indeterminate:n,disabled:r}),i("label",{htmlFor:l,onClick:t=>t.stopPropagation()},t.label)),t.children&&t.children.map(((t,i)=>this.renderSubOption(t,`${e}-${i}`))))}isOptionSelected(t){if(!t.children)return false;return t.children.every((t=>this.persistentSelectedOptions.some((e=>e.value===t.value))))}isOptionIndeterminate(t){if(!t.children)return false;const e=t.children.filter((t=>this.persistentSelectedOptions.some((e=>e.value===t.value)))).length;return e>0&&e<t.children.length}findInOptions(t,e){for(const i of t){if(i.value===e){return i}if(i.children){const t=this.findInOptions(i.children,e);if(t){return t}}}return null}renderSubOption(t,e){var s;const n=this.persistentSelectedOptions.some((e=>e.value===t.value));const o=!n&&this.maxItemCount&&this.persistentSelectedOptions.length>=this.maxItemCount;const r=`checkbox-${t.value}-${e}`;return i("div",{class:`option sub-option ${n?"selected":""} ${this.getSizeClass()} ${o?"disabled":""}`,"data-value":t.value,role:`${((s=t.children)===null||s===void 0?void 0:s.length)>0?"option":"treeitem"}`,onKeyDown:e=>!o&&this.handleOptionKeyDown(e,t),onClick:()=>!o&&this.handleOptionClick(t),tabindex:"0"},i("ifx-checkbox",{tabIndex:-1,ref:e=>t.checkboxRef=e,id:r,size:"s",checked:n,disabled:o}),i("label",{htmlFor:r,onClick:t=>t.stopPropagation()},t.label))}renderSelectAll(){const t=this.persistentSelectedOptions.length===this.optionCount;const e=this.persistentSelectedOptions.length===0;const s=this.optionCount>0&&!e&&!t;const n=this;function o(){if(t){n.clearSelection()}else{n.selectAll()}}function r(t){if(t.key!=="ArrowUp"&&t.key!=="ArrowDown")t.stopPropagation();if(t.key==="Enter"||t.key===" "){o()}}return i("div",{class:"select-all-wrapper"},i("div",{class:`option ${this.getSizeClass()}`,tabindex:"0",onKeyDown:t=>r(t),onClick:o},i("ifx-checkbox",{tabIndex:-1,id:"selectAll",checked:t,indeterminate:s,size:"s"}),i("label",{htmlFor:"selectAll"},"Select all")),i("ifx-dropdown-separator",null))}render(){const t=this.persistentSelectedOptions.filter((t=>{const e=this.persistentSelectedOptions.some((e=>e.children&&e.children.some((e=>e.value===t.value))&&e.selected));return!e})).map((t=>t.label)).join(", ");return i("div",{class:`ifx-multiselect-container`,ref:t=>this.dropdownElement=t},this.label?i("div",{class:"ifx-label-wrapper"},i("span",null,this.label)):null,i("div",{class:`ifx-multiselect-wrapper \n ${this.getSizeClass()} \n ${this.dropdownOpen?"active":""} \n ${this.dropdownFlipped?"is-flipped":""}\n ${this.internalError?"error":""}\n ${this.disabled?"disabled":""}`,tabindex:"0",onClick:this.disabled?undefined:t=>this.handleWrapperClick(t),onKeyDown:this.disabled?undefined:t=>this.handleKeyDown(t)},i("div",{class:`ifx-multiselect-input \n ${this.persistentSelectedOptions.length===0?"placeholder":""}\n `,onClick:this.disabled?undefined:()=>this.toggleDropdown()},this.persistentSelectedOptions.length>0?t:this.placeholder),this.dropdownOpen&&i("div",{class:"ifx-multiselect-dropdown-menu",onScroll:t=>this.handleScroll(t),style:{"--dynamic-z-index":this.zIndex.toString()}},this.showSearch&&i("input",{type:"text",role:"textbox",class:"search-input",onKeyDown:t=>{t.stopPropagation()},onInput:t=>this.handleSearch(t.target),placeholder:"Search..."}),this.showSelectAll&&this.renderSelectAll(),this.filteredOptions.map(((t,e)=>this.renderOption(t,e))),this.isLoading&&i("div",null,"Loading more options...")),i("div",{class:"ifx-multiselect-icon-container"},this.persistentSelectedOptions.length>0&&i("div",{class:"ifx-clear-button",onClick:this.disabled?undefined:()=>this.clearSelection()},i("ifx-icon",{icon:"cremove16"})),i("div",{class:"icon-wrapper-up",onClick:this.disabled?undefined:()=>this.toggleDropdown()},i("ifx-icon",{key:"icon-up",icon:"chevronup-16"})),i("div",{class:"icon-wrapper-down",onClick:this.disabled?undefined:()=>this.toggleDropdown()},i("ifx-icon",{key:"icon-down",icon:"chevron-down-16"})))),this.internalError?i("div",{class:"ifx-error-message-wrapper"},i("span",null,this.internalErrorMessage)):null)}static get formAssociated(){return true}get el(){return s(this)}static get watchers(){return{options:["updateOptions"],error:["updateInternalError"],errorMessage:["updateInternalErrorMessage"],loadedOptions:["loadedOptionsChanged"],persistentSelectedOptions:["onSelectionChange"]}}};l.globalZIndex=1;l.style=o;const a=':root{--ifx-font-family:"Source Sans 3";font-family:var(--ifx-font-family, sans-serif)}:host{display:flex}.textInput__container{display:flex;flex-direction:column;align-items:flex-start;padding:0px;width:100%;flex:none;order:0;align-self:stretch;flex-grow:0;font-family:var(--ifx-font-family)}.textInput__container.disabled .textInput__top-wrapper label{color:#575352}.textInput__container.disabled .textInput__bottom-wrapper input{border:1px solid #575352;background-color:#EEEDED}.textInput__container.disabled .textInput__bottom-wrapper input::placeholder{font-size:0.875rem;color:#575352}.textInput__container .textInput__top-wrapper{display:flex;flex-direction:row;align-items:flex-start;padding:0px;gap:4px;flex:none;order:0;align-self:stretch;flex-grow:0}.textInput__container .textInput__top-wrapper label{font-style:normal;font-weight:400;font-size:1rem;line-height:1.5rem;display:flex;align-items:center;color:#1D1D1D;flex:none;order:0;flex-grow:0}.textInput__container .textInput__top-wrapper label .optional-required{margin-left:4px}.textInput__container .textInput__top-wrapper label .optional{margin-left:4px}.textInput__container .textInput__top-wrapper label .required{margin-left:4px}.textInput__container .textInput__top-wrapper label .required.error{color:#CD002F}.textInput__container .input-container{position:relative;display:flex;align-items:center;width:100%}.textInput__container .textInput__bottom-wrapper{flex-grow:1;position:relative;display:flex;flex-direction:column;align-items:flex-start;padding:0px;gap:4px;flex:none;order:1;align-self:stretch;flex-grow:0}.textInput__container .textInput__bottom-wrapper input{width:100%;box-sizing:border-box;display:flex;flex-direction:row;align-items:center;padding:8px 16px;gap:8px;height:40px;background-color:#FFFFFF;color:#1D1D1D;font-family:"Source Sans 3";font-size:1rem;line-height:1.5rem;border:1px solid #8D8786;border-radius:1px;flex:none;order:0;align-self:stretch;flex-grow:0;text-overflow:ellipsis}.textInput__container .textInput__bottom-wrapper input.input-s{height:36px;font-size:0.875rem;line-height:1.25rem}.textInput__container .textInput__bottom-wrapper input.input-s::placeholder{font-size:0.875rem;line-height:1.25rem}.textInput__container .textInput__bottom-wrapper input.icon{padding-left:40px}.textInput__container .textInput__bottom-wrapper input.error{border:1px solid #CD002F}.textInput__container .textInput__bottom-wrapper input.error:focus{outline:none}.textInput__container .textInput__bottom-wrapper input.success{border:1px solid #4CA460}.textInput__container .textInput__bottom-wrapper input.success:focus{outline:none}.textInput__container .textInput__bottom-wrapper input:focus:not(.error,.success){outline:none;border:1px solid #0A8276}.textInput__container .textInput__bottom-wrapper input:hover:not(:disabled,:focus,.error,.success){border:1px solid #575352}.textInput__container .textInput__bottom-wrapper input::placeholder{font-style:normal;font-weight:400;font-size:1rem;line-height:1.5rem;color:#8D8786;flex:none;order:1;flex-grow:1}.textInput__container .textInput__bottom-wrapper .input-icon{position:absolute;top:50%;transform:translateY(-50%);left:16px;transition:0.3s;color:#8D8786}.textInput__container .textInput__bottom-wrapper .textInput__bottom-wrapper-caption{font-style:normal;font-weight:400;font-size:0.75rem;line-height:1rem;letter-spacing:0.2px;color:#1D1D1D;flex:none;order:1;align-self:stretch;flex-grow:0}.textInput__container .textInput__bottom-wrapper .textInput__bottom-wrapper-caption.error{color:#CD002F}.textInput__container .textInput__bottom-wrapper .textInput__bottom-wrapper-caption.disabled{color:#575352}.textInput__container .delete-icon{position:absolute;right:16px}.textInput__container .delete-icon :hover{cursor:pointer}';const c=a;const p=class{constructor(i){t(this,i);this.ifxInput=e(this,"ifxInput",7);if(i.$hostElement$["s-ei"]){this.internals=i.$hostElement$["s-ei"]}else{this.internals=i.$hostElement$.attachInternals();i.$hostElement$["s-ei"]=this.internals}this.placeholder="Placeholder";this.value="";this.error=false;this.label="";this.icon="";this.caption="";this.size="m";this.required=false;this.optional=false;this.success=false;this.disabled=false;this.maxlength=undefined;this.showDeleteIcon=false}valueWatcher(t){if(t!==this.inputElement.value){this.inputElement.value=t}}async reset(){this.value="";this.inputElement.value=""}handleDeleteContent(){this.reset();this.ifxInput.emit(this.value)}handleInput(){const t=this.inputElement.value;this.value=t;this.internals.setFormValue(t);this.ifxInput.emit(this.value)}formResetCallback(){this.internals.setValidity({});this.internals.setFormValue("")}render(){return i("div",{key:"8d742d3a60998d4648040fab5d5d50853b12c7b4","aria-label":"a text field for user input","aria-value":this.value,"aria-disabled":this.disabled,class:`textInput__container ${this.disabled?"disabled":""}`},i("div",{key:"4965d888690874e8775bfc83602340b6b83d3e5e",class:"textInput__top-wrapper"},i("label",{key:"d5224921d5c26fc62d551bf10dd1207d8ff5e67f",htmlFor:"text-field"},i("slot",{key:"eb5758011376ace0664b074fd4e755b1920fa7f4"}),this.optional&&this.required?i("span",{class:"optional-required"},"(optional) *"):this.optional?i("span",{class:"optional"},"(optional)"):this.required?i("span",{class:`required ${this.error?"error":""}`},"*"):null)),i("div",{key:"ec295037f306f2cd6ee6c3ba3310dc858c4a74f6",class:"textInput__bottom-wrapper"},i("div",{key:"bfb3f3e2c47c6f57f29f3fb16cc5e5b50a5e11f4",class:"input-container"},this.icon&&i("ifx-icon",{key:"e94e39b0426900264b834b79e9b7667563311b3c",class:"input-icon",icon:this.icon}),i("input",{key:"08ba76dbe8ac6ab62ffbcb4d0aa44437f8c6b057",ref:t=>this.inputElement=t,disabled:this.disabled,type:"text",id:"text-field",value:this.value,onInput:()=>this.handleInput(),placeholder:this.placeholder,maxlength:this.maxlength,class:`${this.icon?"icon":""}\n ${this.error?"error":""} \n ${this.size==="s"?"input-s":""}\n ${this.success?"success":""}`}),this.showDeleteIcon&&this.value&&i("ifx-icon",{key:"f0df7c42fe70e05928e2db93017db15d1f8c659c",class:"delete-icon",icon:"cremove16",onClick:()=>this.handleDeleteContent()})),this.caption&&!this.error&&i("div",{key:"ac6811a80b1728eb7ecea350a2821990d3e49b40",class:`textInput__bottom-wrapper-caption ${this.disabled} ? disabled : ""`},this.caption),this.error&&i("div",{key:"deba470325e740fc058a67bfcf056af34ab4d8ef",class:"textInput__bottom-wrapper-caption error"},this.caption)))}static get formAssociated(){return true}get el(){return s(this)}static get watchers(){return{value:["valueWatcher"]}}};p.style=c;export{l as ifx_multiselect,p as ifx_text_field};
2
+ //# sourceMappingURL=p-dc7deb14.entry.js.map