@infineon/infineon-design-system-stencil 37.13.1--canary.1987.3a00aa50ac2f53008f1e351eabf4b0c340894bb9.0 → 37.13.1--canary.1992.0eb8390d6cfd0c060d046f7e91d06e160e2dc360.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 (420) hide show
  1. package/dist/cjs/ifx-alert_2.cjs.entry.js +1 -1
  2. package/dist/cjs/ifx-basic-table.cjs.entry.js +1 -1
  3. package/dist/cjs/ifx-card.cjs.entry.js +21 -11
  4. package/dist/cjs/ifx-card.cjs.entry.js.map +1 -1
  5. package/dist/cjs/ifx-card.entry.cjs.js.map +1 -1
  6. package/dist/cjs/ifx-chip.ifx-chip-item.ifx-pagination.entry.cjs.js.map +1 -1
  7. package/dist/cjs/ifx-chip_3.cjs.entry.js +2 -2
  8. package/dist/cjs/ifx-chip_3.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ifx-faq.cjs.entry.js +1 -1
  10. package/dist/cjs/ifx-filter-accordion.cjs.entry.js +2 -2
  11. package/dist/cjs/ifx-filter-bar.cjs.entry.js +1 -1
  12. package/dist/cjs/ifx-filter-search.cjs.entry.js +1 -1
  13. package/dist/cjs/ifx-filter-type-group.cjs.entry.js +1 -1
  14. package/dist/cjs/ifx-link.cjs.entry.js +1 -1
  15. package/dist/cjs/ifx-link.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ifx-link.entry.cjs.js.map +1 -1
  17. package/dist/cjs/ifx-list-entry.cjs.entry.js +1 -1
  18. package/dist/cjs/ifx-multiselect_2.cjs.entry.js +4 -4
  19. package/dist/cjs/ifx-overview-table.cjs.entry.js +1 -1
  20. package/dist/cjs/ifx-overview-table.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ifx-overview-table.entry.cjs.js.map +1 -1
  22. package/dist/cjs/ifx-progress-bar.cjs.entry.js +1 -1
  23. package/dist/cjs/ifx-progress-bar.cjs.entry.js.map +1 -1
  24. package/dist/cjs/ifx-progress-bar.entry.cjs.js.map +1 -1
  25. package/dist/cjs/ifx-radio-button-group.cjs.entry.js +1 -1
  26. package/dist/cjs/ifx-radio-button.cjs.entry.js +2 -2
  27. package/dist/cjs/ifx-search-bar.cjs.entry.js +1 -1
  28. package/dist/cjs/ifx-search-field.cjs.entry.js +2 -2
  29. package/dist/cjs/ifx-segment.cjs.entry.js +1 -1
  30. package/dist/cjs/ifx-segmented-control.cjs.entry.js +2 -2
  31. package/dist/cjs/ifx-select.cjs.entry.js +27 -43
  32. package/dist/cjs/ifx-select.cjs.entry.js.map +1 -1
  33. package/dist/cjs/ifx-select.entry.cjs.js.map +1 -1
  34. package/dist/cjs/ifx-sidebar-item.cjs.entry.js +1 -1
  35. package/dist/cjs/ifx-sidebar-item.cjs.entry.js.map +1 -1
  36. package/dist/cjs/ifx-sidebar-item.entry.cjs.js.map +1 -1
  37. package/dist/cjs/ifx-slider.cjs.entry.js +4 -4
  38. package/dist/cjs/ifx-slider.cjs.entry.js.map +1 -1
  39. package/dist/cjs/ifx-slider.entry.cjs.js.map +1 -1
  40. package/dist/cjs/ifx-spinner.ifx-text-field.entry.cjs.js.map +1 -1
  41. package/dist/cjs/ifx-spinner_2.cjs.entry.js +7 -7
  42. package/dist/cjs/ifx-spinner_2.cjs.entry.js.map +1 -1
  43. package/dist/cjs/ifx-status.cjs.entry.js +1 -1
  44. package/dist/cjs/ifx-status.cjs.entry.js.map +1 -1
  45. package/dist/cjs/ifx-status.entry.cjs.js.map +1 -1
  46. package/dist/cjs/ifx-step.cjs.entry.js +5 -5
  47. package/dist/cjs/ifx-step.cjs.entry.js.map +1 -1
  48. package/dist/cjs/ifx-step.entry.cjs.js.map +1 -1
  49. package/dist/cjs/ifx-stepper.cjs.entry.js +2 -2
  50. package/dist/cjs/ifx-stepper.cjs.entry.js.map +1 -1
  51. package/dist/cjs/ifx-stepper.entry.cjs.js.map +1 -1
  52. package/dist/cjs/ifx-switch.cjs.entry.js +1 -1
  53. package/dist/cjs/ifx-switch.cjs.entry.js.map +1 -1
  54. package/dist/cjs/ifx-switch.entry.cjs.js.map +1 -1
  55. package/dist/cjs/ifx-tab.cjs.entry.js +1 -1
  56. package/dist/cjs/ifx-table.cjs.entry.js +2 -2
  57. package/dist/cjs/ifx-tabs.cjs.entry.js +2 -2
  58. package/dist/cjs/ifx-tag.cjs.entry.js +2 -2
  59. package/dist/cjs/ifx-tag.cjs.entry.js.map +1 -1
  60. package/dist/cjs/ifx-tag.entry.cjs.js.map +1 -1
  61. package/dist/cjs/ifx-templates-ui.cjs.entry.js +1 -1
  62. package/dist/cjs/ifx-textarea.cjs.entry.js +3 -3
  63. package/dist/cjs/ifx-textarea.cjs.entry.js.map +1 -1
  64. package/dist/cjs/ifx-textarea.entry.cjs.js.map +1 -1
  65. package/dist/cjs/ifx-tooltip.cjs.entry.js +4 -4
  66. package/dist/cjs/ifx-tooltip.cjs.entry.js.map +1 -1
  67. package/dist/cjs/ifx-tooltip.entry.cjs.js.map +1 -1
  68. package/dist/cjs/ifx-tree-view-item.cjs.entry.js +2 -2
  69. package/dist/cjs/ifx-tree-view.cjs.entry.js +1 -1
  70. package/dist/cjs/infineon-design-system-stencil.cjs.js +1 -1
  71. package/dist/cjs/loader.cjs.js +1 -1
  72. package/dist/collection/components/card/card.css +2 -2
  73. package/dist/collection/components/card/card.js +20 -10
  74. package/dist/collection/components/card/card.js.map +1 -1
  75. package/dist/collection/components/link/link.js +1 -1
  76. package/dist/collection/components/link/link.js.map +1 -1
  77. package/dist/collection/components/navigation/sidebar/sidebar-item.css +2 -6
  78. package/dist/collection/components/overview-table/overview-table.js +1 -1
  79. package/dist/collection/components/overview-table/overview-table.js.map +1 -1
  80. package/dist/collection/components/pagination/pagination.css +5 -5
  81. package/dist/collection/components/pagination/pagination.js +1 -1
  82. package/dist/collection/components/pagination/pagination.js.map +1 -1
  83. package/dist/collection/components/progress-bar/progress-bar.js +1 -1
  84. package/dist/collection/components/progress-bar/progress-bar.js.map +1 -1
  85. package/dist/collection/components/radio-button/radio-button.js +2 -2
  86. package/dist/collection/components/radio-button-group/radio-button-group.js +1 -1
  87. package/dist/collection/components/search-bar/search-bar.js +1 -1
  88. package/dist/collection/components/search-field/search-field.js +2 -2
  89. package/dist/collection/components/segmented-control/segment/segment.js +1 -1
  90. package/dist/collection/components/segmented-control/segmented-control.js +2 -2
  91. package/dist/collection/components/select/multi-select/multiselect-option.js +4 -4
  92. package/dist/collection/components/select/single-select/select.css +0 -6
  93. package/dist/collection/components/select/single-select/select.js +26 -42
  94. package/dist/collection/components/select/single-select/select.js.map +1 -1
  95. package/dist/collection/components/slider/slider.css +0 -8
  96. package/dist/collection/components/slider/slider.js +3 -22
  97. package/dist/collection/components/slider/slider.js.map +1 -1
  98. package/dist/collection/components/slider/slider.stories.js +0 -14
  99. package/dist/collection/components/slider/slider.stories.js.map +1 -1
  100. package/dist/collection/components/spinner/spinner.js +2 -21
  101. package/dist/collection/components/spinner/spinner.js.map +1 -1
  102. package/dist/collection/components/spinner/spinner.stories.js +2 -16
  103. package/dist/collection/components/spinner/spinner.stories.js.map +1 -1
  104. package/dist/collection/components/status/status.js +1 -1
  105. package/dist/collection/components/status/status.js.map +1 -1
  106. package/dist/collection/components/stepper/step/step.css +0 -4
  107. package/dist/collection/components/stepper/step/step.js +4 -4
  108. package/dist/collection/components/stepper/stepper.js +2 -40
  109. package/dist/collection/components/stepper/stepper.js.map +1 -1
  110. package/dist/collection/components/stepper/stepper.stories.js +0 -30
  111. package/dist/collection/components/stepper/stepper.stories.js.map +1 -1
  112. package/dist/collection/components/switch/switch.js +1 -1
  113. package/dist/collection/components/switch/switch.js.map +1 -1
  114. package/dist/collection/components/table-advanced-version/filter-bar/filter-bar.js +1 -1
  115. package/dist/collection/components/table-advanced-version/filter-type-group/filter-accordion/filter-accordion.js +2 -2
  116. package/dist/collection/components/table-advanced-version/filter-type-group/filter-search/filter-search.js +1 -1
  117. package/dist/collection/components/table-advanced-version/filter-type-group/filter-type-group.js +1 -1
  118. package/dist/collection/components/table-advanced-version/list/list-entry/list-entry.js +1 -1
  119. package/dist/collection/components/table-advanced-version/table.js +2 -2
  120. package/dist/collection/components/table-basic-version/table.js +1 -1
  121. package/dist/collection/components/tabs/tab.js +1 -1
  122. package/dist/collection/components/tabs/tabs.js +2 -2
  123. package/dist/collection/components/tag/tag.css +5 -2
  124. package/dist/collection/components/tag/tag.js +1 -39
  125. package/dist/collection/components/tag/tag.js.map +1 -1
  126. package/dist/collection/components/tag/tag.stories.js +1 -29
  127. package/dist/collection/components/tag/tag.stories.js.map +1 -1
  128. package/dist/collection/components/templates/template/template.js +1 -1
  129. package/dist/collection/components/templates/templates-ui/templates-ui.js +1 -1
  130. package/dist/collection/components/text-field/text-field.css +2 -11
  131. package/dist/collection/components/text-field/text-field.js +4 -23
  132. package/dist/collection/components/text-field/text-field.js.map +1 -1
  133. package/dist/collection/components/text-field/text-field.stories.js +2 -17
  134. package/dist/collection/components/text-field/text-field.stories.js.map +1 -1
  135. package/dist/collection/components/textarea/textarea.css +2 -2
  136. package/dist/collection/components/textarea/textarea.js +2 -2
  137. package/dist/collection/components/tooltip/tooltip.js +4 -23
  138. package/dist/collection/components/tooltip/tooltip.js.map +1 -1
  139. package/dist/collection/components/tooltip/tooltip.stories.js +1 -16
  140. package/dist/collection/components/tooltip/tooltip.stories.js.map +1 -1
  141. package/dist/collection/components/tree-view/tree-view-item.js +2 -2
  142. package/dist/collection/components/tree-view/tree-view.js +1 -1
  143. package/dist/collection/stories/setup-and-installation/faq/faq.js +1 -1
  144. package/dist/components/ifx-basic-table.js +1 -1
  145. package/dist/components/ifx-card.js +21 -11
  146. package/dist/components/ifx-card.js.map +1 -1
  147. package/dist/components/ifx-download.js +1 -1
  148. package/dist/components/ifx-faq.js +1 -1
  149. package/dist/components/ifx-file-upload.js +1 -1
  150. package/dist/components/ifx-filter-accordion.js +2 -2
  151. package/dist/components/ifx-filter-bar.js +1 -1
  152. package/dist/components/ifx-filter-search.js +2 -2
  153. package/dist/components/ifx-filter-type-group.js +1 -1
  154. package/dist/components/ifx-icons-preview.js +3 -3
  155. package/dist/components/ifx-link.js +1 -1
  156. package/dist/components/ifx-list-entry.js +2 -2
  157. package/dist/components/ifx-list.js +1 -1
  158. package/dist/components/ifx-multiselect-option.js +1 -1
  159. package/dist/components/ifx-multiselect.js +1 -1
  160. package/dist/components/ifx-notification.js +1 -1
  161. package/dist/components/ifx-overview-table.js +2 -2
  162. package/dist/components/ifx-overview-table.js.map +1 -1
  163. package/dist/components/ifx-pagination.js +1 -1
  164. package/dist/components/ifx-progress-bar.js +1 -1
  165. package/dist/components/ifx-radio-button-group.js +1 -1
  166. package/dist/components/ifx-radio-button.js +1 -1
  167. package/dist/components/ifx-search-bar.js +2 -2
  168. package/dist/components/ifx-search-field.js +1 -1
  169. package/dist/components/ifx-segment.js +1 -1
  170. package/dist/components/ifx-segmented-control.js +2 -2
  171. package/dist/components/ifx-select.js +1 -1
  172. package/dist/components/ifx-set-filter.js +5 -5
  173. package/dist/components/ifx-sidebar-item.js +1 -1
  174. package/dist/components/ifx-sidebar-item.js.map +1 -1
  175. package/dist/components/ifx-slider.js +4 -5
  176. package/dist/components/ifx-slider.js.map +1 -1
  177. package/dist/components/ifx-spinner.js +1 -1
  178. package/dist/components/ifx-status.js +1 -1
  179. package/dist/components/ifx-status.js.map +1 -1
  180. package/dist/components/ifx-step.js +5 -5
  181. package/dist/components/ifx-step.js.map +1 -1
  182. package/dist/components/ifx-stepper.js +2 -4
  183. package/dist/components/ifx-stepper.js.map +1 -1
  184. package/dist/components/ifx-switch.js +1 -1
  185. package/dist/components/ifx-switch.js.map +1 -1
  186. package/dist/components/ifx-tab.js +1 -1
  187. package/dist/components/ifx-table.js +4 -4
  188. package/dist/components/ifx-tabs.js +2 -2
  189. package/dist/components/ifx-tag.js +3 -5
  190. package/dist/components/ifx-tag.js.map +1 -1
  191. package/dist/components/ifx-template.js +1 -1
  192. package/dist/components/ifx-templates-ui.js +5 -5
  193. package/dist/components/ifx-text-field.js +1 -1
  194. package/dist/components/ifx-textarea.js +3 -3
  195. package/dist/components/ifx-textarea.js.map +1 -1
  196. package/dist/components/ifx-tooltip.js +4 -5
  197. package/dist/components/ifx-tooltip.js.map +1 -1
  198. package/dist/components/ifx-tree-view-item.js +2 -2
  199. package/dist/components/ifx-tree-view.js +1 -1
  200. package/dist/components/{p-C3VPtV-F.js → p-BPtblWb0.js} +3 -3
  201. package/dist/components/{p-C3VPtV-F.js.map → p-BPtblWb0.js.map} +1 -1
  202. package/dist/components/{p-By5SOUeF.js → p-BzDW_8pG.js} +6 -6
  203. package/dist/components/{p-By5SOUeF.js.map → p-BzDW_8pG.js.map} +1 -1
  204. package/dist/components/{p-C09NpLE0.js → p-C7jhiUEX.js} +5 -6
  205. package/dist/components/p-C7jhiUEX.js.map +1 -0
  206. package/dist/components/{p-Dt9X9aqI.js → p-CFMrihYb.js} +4 -4
  207. package/dist/components/{p-Dt9X9aqI.js.map → p-CFMrihYb.js.map} +1 -1
  208. package/dist/components/{p-CssgRUtq.js → p-CSpaQFX2.js} +5 -5
  209. package/dist/components/p-CSpaQFX2.js.map +1 -0
  210. package/dist/components/p-Cg6x-9WC.js +124 -0
  211. package/dist/components/p-Cg6x-9WC.js.map +1 -0
  212. package/dist/components/{p-VdirQ-rJ.js → p-Coa3oQEK.js} +29 -45
  213. package/dist/components/p-Coa3oQEK.js.map +1 -0
  214. package/dist/components/{p-C-KteFFX.js → p-CqAVn1BP.js} +4 -4
  215. package/dist/components/{p-C-KteFFX.js.map → p-CqAVn1BP.js.map} +1 -1
  216. package/dist/components/{p-aoMMugzu.js → p-D4E8VwPm.js} +3 -3
  217. package/dist/components/p-D4E8VwPm.js.map +1 -0
  218. package/dist/components/{p-hknsKJbL.js → p-DEGJaJSs.js} +3 -3
  219. package/dist/components/p-DEGJaJSs.js.map +1 -0
  220. package/dist/components/{p-frFN17iF.js → p-DhQ2JvFY.js} +3 -3
  221. package/dist/components/{p-frFN17iF.js.map → p-DhQ2JvFY.js.map} +1 -1
  222. package/dist/components/{p-Cwianh3O.js → p-KIEUAyZE.js} +6 -6
  223. package/dist/components/{p-Cwianh3O.js.map → p-KIEUAyZE.js.map} +1 -1
  224. package/dist/esm/ifx-alert_2.entry.js +1 -1
  225. package/dist/esm/ifx-basic-table.entry.js +1 -1
  226. package/dist/esm/ifx-card.entry.js +21 -11
  227. package/dist/esm/ifx-card.entry.js.map +1 -1
  228. package/dist/esm/ifx-chip.ifx-chip-item.ifx-pagination.entry.js.map +1 -1
  229. package/dist/esm/ifx-chip_3.entry.js +2 -2
  230. package/dist/esm/ifx-chip_3.entry.js.map +1 -1
  231. package/dist/esm/ifx-faq.entry.js +1 -1
  232. package/dist/esm/ifx-filter-accordion.entry.js +2 -2
  233. package/dist/esm/ifx-filter-bar.entry.js +1 -1
  234. package/dist/esm/ifx-filter-search.entry.js +1 -1
  235. package/dist/esm/ifx-filter-type-group.entry.js +1 -1
  236. package/dist/esm/ifx-link.entry.js +1 -1
  237. package/dist/esm/ifx-link.entry.js.map +1 -1
  238. package/dist/esm/ifx-list-entry.entry.js +1 -1
  239. package/dist/esm/ifx-multiselect_2.entry.js +4 -4
  240. package/dist/esm/ifx-overview-table.entry.js +1 -1
  241. package/dist/esm/ifx-overview-table.entry.js.map +1 -1
  242. package/dist/esm/ifx-progress-bar.entry.js +1 -1
  243. package/dist/esm/ifx-progress-bar.entry.js.map +1 -1
  244. package/dist/esm/ifx-radio-button-group.entry.js +1 -1
  245. package/dist/esm/ifx-radio-button.entry.js +2 -2
  246. package/dist/esm/ifx-search-bar.entry.js +1 -1
  247. package/dist/esm/ifx-search-field.entry.js +2 -2
  248. package/dist/esm/ifx-segment.entry.js +1 -1
  249. package/dist/esm/ifx-segmented-control.entry.js +2 -2
  250. package/dist/esm/ifx-select.entry.js +27 -43
  251. package/dist/esm/ifx-select.entry.js.map +1 -1
  252. package/dist/esm/ifx-sidebar-item.entry.js +1 -1
  253. package/dist/esm/ifx-sidebar-item.entry.js.map +1 -1
  254. package/dist/esm/ifx-slider.entry.js +4 -4
  255. package/dist/esm/ifx-slider.entry.js.map +1 -1
  256. package/dist/esm/ifx-spinner.ifx-text-field.entry.js.map +1 -1
  257. package/dist/esm/ifx-spinner_2.entry.js +7 -7
  258. package/dist/esm/ifx-spinner_2.entry.js.map +1 -1
  259. package/dist/esm/ifx-status.entry.js +1 -1
  260. package/dist/esm/ifx-status.entry.js.map +1 -1
  261. package/dist/esm/ifx-step.entry.js +5 -5
  262. package/dist/esm/ifx-step.entry.js.map +1 -1
  263. package/dist/esm/ifx-stepper.entry.js +2 -2
  264. package/dist/esm/ifx-stepper.entry.js.map +1 -1
  265. package/dist/esm/ifx-switch.entry.js +1 -1
  266. package/dist/esm/ifx-switch.entry.js.map +1 -1
  267. package/dist/esm/ifx-tab.entry.js +1 -1
  268. package/dist/esm/ifx-table.entry.js +2 -2
  269. package/dist/esm/ifx-tabs.entry.js +2 -2
  270. package/dist/esm/ifx-tag.entry.js +2 -2
  271. package/dist/esm/ifx-tag.entry.js.map +1 -1
  272. package/dist/esm/ifx-templates-ui.entry.js +1 -1
  273. package/dist/esm/ifx-textarea.entry.js +3 -3
  274. package/dist/esm/ifx-textarea.entry.js.map +1 -1
  275. package/dist/esm/ifx-tooltip.entry.js +4 -4
  276. package/dist/esm/ifx-tooltip.entry.js.map +1 -1
  277. package/dist/esm/ifx-tree-view-item.entry.js +2 -2
  278. package/dist/esm/ifx-tree-view.entry.js +1 -1
  279. package/dist/esm/infineon-design-system-stencil.js +1 -1
  280. package/dist/esm/loader.js +1 -1
  281. package/dist/infineon-design-system-stencil/ifx-card.entry.esm.js.map +1 -1
  282. package/dist/infineon-design-system-stencil/ifx-chip.ifx-chip-item.ifx-pagination.entry.esm.js.map +1 -1
  283. package/dist/infineon-design-system-stencil/ifx-link.entry.esm.js.map +1 -1
  284. package/dist/infineon-design-system-stencil/ifx-overview-table.entry.esm.js.map +1 -1
  285. package/dist/infineon-design-system-stencil/ifx-progress-bar.entry.esm.js.map +1 -1
  286. package/dist/infineon-design-system-stencil/ifx-select.entry.esm.js.map +1 -1
  287. package/dist/infineon-design-system-stencil/ifx-sidebar-item.entry.esm.js.map +1 -1
  288. package/dist/infineon-design-system-stencil/ifx-slider.entry.esm.js.map +1 -1
  289. package/dist/infineon-design-system-stencil/ifx-spinner.ifx-text-field.entry.esm.js.map +1 -1
  290. package/dist/infineon-design-system-stencil/ifx-status.entry.esm.js.map +1 -1
  291. package/dist/infineon-design-system-stencil/ifx-step.entry.esm.js.map +1 -1
  292. package/dist/infineon-design-system-stencil/ifx-stepper.entry.esm.js.map +1 -1
  293. package/dist/infineon-design-system-stencil/ifx-switch.entry.esm.js.map +1 -1
  294. package/dist/infineon-design-system-stencil/ifx-tag.entry.esm.js.map +1 -1
  295. package/dist/infineon-design-system-stencil/ifx-textarea.entry.esm.js.map +1 -1
  296. package/dist/infineon-design-system-stencil/ifx-tooltip.entry.esm.js.map +1 -1
  297. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
  298. package/dist/infineon-design-system-stencil/{p-a10a1d46.entry.js → p-04985a8a.entry.js} +2 -2
  299. package/dist/infineon-design-system-stencil/p-0debad84.entry.js +2 -0
  300. package/dist/infineon-design-system-stencil/p-0debad84.entry.js.map +1 -0
  301. package/dist/infineon-design-system-stencil/p-0f008d09.entry.js +2 -0
  302. package/dist/infineon-design-system-stencil/p-0f008d09.entry.js.map +1 -0
  303. package/dist/infineon-design-system-stencil/{p-8ca1da22.entry.js → p-1c890e97.entry.js} +2 -2
  304. package/dist/infineon-design-system-stencil/{p-ead84183.entry.js → p-2a879a83.entry.js} +2 -2
  305. package/dist/infineon-design-system-stencil/{p-4d2dfb65.entry.js → p-2c726b58.entry.js} +2 -2
  306. package/dist/infineon-design-system-stencil/p-2c726b58.entry.js.map +1 -0
  307. package/dist/infineon-design-system-stencil/p-310f8129.entry.js +2 -0
  308. package/dist/infineon-design-system-stencil/p-310f8129.entry.js.map +1 -0
  309. package/dist/infineon-design-system-stencil/{p-c75a57a2.entry.js → p-3dbfa0c1.entry.js} +2 -2
  310. package/dist/infineon-design-system-stencil/p-3dbfa0c1.entry.js.map +1 -0
  311. package/dist/infineon-design-system-stencil/p-4a828c58.entry.js +2 -0
  312. package/dist/infineon-design-system-stencil/p-4a828c58.entry.js.map +1 -0
  313. package/dist/infineon-design-system-stencil/{p-733cc7f4.entry.js → p-4f221c15.entry.js} +2 -2
  314. package/dist/infineon-design-system-stencil/p-4f221c15.entry.js.map +1 -0
  315. package/dist/infineon-design-system-stencil/{p-47388e22.entry.js → p-52cf847f.entry.js} +2 -2
  316. package/dist/infineon-design-system-stencil/{p-50cd0c8a.entry.js → p-546ed89f.entry.js} +2 -2
  317. package/dist/infineon-design-system-stencil/{p-ef8fabdf.entry.js → p-582ec002.entry.js} +2 -2
  318. package/dist/infineon-design-system-stencil/p-6d5a43ee.entry.js +2 -0
  319. package/dist/infineon-design-system-stencil/{p-fb11d0cc.entry.js.map → p-6d5a43ee.entry.js.map} +1 -1
  320. package/dist/infineon-design-system-stencil/p-71c6b92c.entry.js +2 -0
  321. package/dist/infineon-design-system-stencil/{p-3d447d67.entry.js.map → p-71c6b92c.entry.js.map} +1 -1
  322. package/dist/infineon-design-system-stencil/p-7873796d.entry.js +2 -0
  323. package/dist/infineon-design-system-stencil/p-7873796d.entry.js.map +1 -0
  324. package/dist/infineon-design-system-stencil/{p-5f5e674d.entry.js → p-7ce54612.entry.js} +2 -2
  325. package/dist/infineon-design-system-stencil/p-8291f4e6.entry.js +2 -0
  326. package/dist/infineon-design-system-stencil/p-8291f4e6.entry.js.map +1 -0
  327. package/dist/infineon-design-system-stencil/{p-863e520d.entry.js → p-89d7b521.entry.js} +2 -2
  328. package/dist/infineon-design-system-stencil/p-8a526f6e.entry.js +2 -0
  329. package/dist/infineon-design-system-stencil/{p-1453032c.entry.js.map → p-8a526f6e.entry.js.map} +1 -1
  330. package/dist/infineon-design-system-stencil/{p-993d003a.entry.js → p-8c82ffa9.entry.js} +2 -2
  331. package/dist/infineon-design-system-stencil/p-8c82ffa9.entry.js.map +1 -0
  332. package/dist/infineon-design-system-stencil/{p-394548d7.entry.js → p-94eaf9ae.entry.js} +2 -2
  333. package/dist/infineon-design-system-stencil/{p-582f7515.entry.js → p-9779c3ab.entry.js} +2 -2
  334. package/dist/infineon-design-system-stencil/p-9bd0a9d4.entry.js +2 -0
  335. package/dist/infineon-design-system-stencil/p-9bd0a9d4.entry.js.map +1 -0
  336. package/dist/infineon-design-system-stencil/{p-05f154da.entry.js → p-a24709c6.entry.js} +2 -2
  337. package/dist/infineon-design-system-stencil/p-b31baf1b.entry.js +2 -0
  338. package/dist/infineon-design-system-stencil/{p-5f79d386.entry.js → p-b3f51af9.entry.js} +2 -2
  339. package/dist/infineon-design-system-stencil/{p-8a960c92.entry.js → p-c5865690.entry.js} +2 -2
  340. package/dist/infineon-design-system-stencil/p-c769b06c.entry.js +2 -0
  341. package/dist/infineon-design-system-stencil/p-c769b06c.entry.js.map +1 -0
  342. package/dist/infineon-design-system-stencil/{p-d246597b.entry.js → p-cfac63fe.entry.js} +2 -2
  343. package/dist/infineon-design-system-stencil/{p-98f57aed.entry.js → p-d7d94bf8.entry.js} +2 -2
  344. package/dist/infineon-design-system-stencil/p-d895326e.entry.js +2 -0
  345. package/dist/infineon-design-system-stencil/p-d895326e.entry.js.map +1 -0
  346. package/dist/infineon-design-system-stencil/{p-c378c228.entry.js → p-d9e803b2.entry.js} +2 -2
  347. package/dist/infineon-design-system-stencil/{p-7dd092cf.entry.js → p-e5735d80.entry.js} +2 -2
  348. package/dist/infineon-design-system-stencil/{p-a11b5f74.entry.js → p-e7b8e003.entry.js} +2 -2
  349. package/dist/infineon-design-system-stencil/{p-633ca789.entry.js → p-eeeccd0b.entry.js} +2 -2
  350. package/dist/infineon-design-system-stencil/{p-ade0ec39.entry.js → p-fff9449b.entry.js} +2 -2
  351. package/dist/infineon-design-system-stencil/p-fff9449b.entry.js.map +1 -0
  352. package/dist/types/components/card/card.d.ts +1 -0
  353. package/dist/types/components/slider/slider.d.ts +0 -1
  354. package/dist/types/components/slider/slider.stories.d.ts +0 -13
  355. package/dist/types/components/spinner/spinner.d.ts +0 -1
  356. package/dist/types/components/spinner/spinner.stories.d.ts +0 -14
  357. package/dist/types/components/stepper/stepper.d.ts +0 -2
  358. package/dist/types/components/stepper/stepper.stories.d.ts +0 -28
  359. package/dist/types/components/tag/tag.d.ts +0 -2
  360. package/dist/types/components/tag/tag.stories.d.ts +0 -28
  361. package/dist/types/components/text-field/text-field.d.ts +0 -1
  362. package/dist/types/components/text-field/text-field.stories.d.ts +0 -14
  363. package/dist/types/components/tooltip/tooltip.d.ts +0 -1
  364. package/dist/types/components/tooltip/tooltip.stories.d.ts +0 -14
  365. package/dist/types/components.d.ts +0 -16
  366. package/package.json +1 -1
  367. package/dist/components/p-C09NpLE0.js.map +0 -1
  368. package/dist/components/p-CssgRUtq.js.map +0 -1
  369. package/dist/components/p-VdirQ-rJ.js.map +0 -1
  370. package/dist/components/p-aoMMugzu.js.map +0 -1
  371. package/dist/components/p-cqNsYK8s.js +0 -125
  372. package/dist/components/p-cqNsYK8s.js.map +0 -1
  373. package/dist/components/p-hknsKJbL.js.map +0 -1
  374. package/dist/infineon-design-system-stencil/p-08ac6334.entry.js +0 -2
  375. package/dist/infineon-design-system-stencil/p-08ac6334.entry.js.map +0 -1
  376. package/dist/infineon-design-system-stencil/p-1453032c.entry.js +0 -2
  377. package/dist/infineon-design-system-stencil/p-3a444f2d.entry.js +0 -2
  378. package/dist/infineon-design-system-stencil/p-3d447d67.entry.js +0 -2
  379. package/dist/infineon-design-system-stencil/p-4d2dfb65.entry.js.map +0 -1
  380. package/dist/infineon-design-system-stencil/p-6ae1a75c.entry.js +0 -2
  381. package/dist/infineon-design-system-stencil/p-6ae1a75c.entry.js.map +0 -1
  382. package/dist/infineon-design-system-stencil/p-733cc7f4.entry.js.map +0 -1
  383. package/dist/infineon-design-system-stencil/p-7780665b.entry.js +0 -2
  384. package/dist/infineon-design-system-stencil/p-7780665b.entry.js.map +0 -1
  385. package/dist/infineon-design-system-stencil/p-9062208e.entry.js +0 -2
  386. package/dist/infineon-design-system-stencil/p-9062208e.entry.js.map +0 -1
  387. package/dist/infineon-design-system-stencil/p-993d003a.entry.js.map +0 -1
  388. package/dist/infineon-design-system-stencil/p-ade0ec39.entry.js.map +0 -1
  389. package/dist/infineon-design-system-stencil/p-b9a871a7.entry.js +0 -2
  390. package/dist/infineon-design-system-stencil/p-b9a871a7.entry.js.map +0 -1
  391. package/dist/infineon-design-system-stencil/p-c51df9e9.entry.js +0 -2
  392. package/dist/infineon-design-system-stencil/p-c51df9e9.entry.js.map +0 -1
  393. package/dist/infineon-design-system-stencil/p-c75a57a2.entry.js.map +0 -1
  394. package/dist/infineon-design-system-stencil/p-caccdf14.entry.js +0 -2
  395. package/dist/infineon-design-system-stencil/p-caccdf14.entry.js.map +0 -1
  396. package/dist/infineon-design-system-stencil/p-cb838071.entry.js +0 -2
  397. package/dist/infineon-design-system-stencil/p-cb838071.entry.js.map +0 -1
  398. package/dist/infineon-design-system-stencil/p-f8f4af1c.entry.js +0 -2
  399. package/dist/infineon-design-system-stencil/p-f8f4af1c.entry.js.map +0 -1
  400. package/dist/infineon-design-system-stencil/p-fb11d0cc.entry.js +0 -2
  401. /package/dist/infineon-design-system-stencil/{p-a10a1d46.entry.js.map → p-04985a8a.entry.js.map} +0 -0
  402. /package/dist/infineon-design-system-stencil/{p-8ca1da22.entry.js.map → p-1c890e97.entry.js.map} +0 -0
  403. /package/dist/infineon-design-system-stencil/{p-ead84183.entry.js.map → p-2a879a83.entry.js.map} +0 -0
  404. /package/dist/infineon-design-system-stencil/{p-47388e22.entry.js.map → p-52cf847f.entry.js.map} +0 -0
  405. /package/dist/infineon-design-system-stencil/{p-50cd0c8a.entry.js.map → p-546ed89f.entry.js.map} +0 -0
  406. /package/dist/infineon-design-system-stencil/{p-ef8fabdf.entry.js.map → p-582ec002.entry.js.map} +0 -0
  407. /package/dist/infineon-design-system-stencil/{p-5f5e674d.entry.js.map → p-7ce54612.entry.js.map} +0 -0
  408. /package/dist/infineon-design-system-stencil/{p-863e520d.entry.js.map → p-89d7b521.entry.js.map} +0 -0
  409. /package/dist/infineon-design-system-stencil/{p-394548d7.entry.js.map → p-94eaf9ae.entry.js.map} +0 -0
  410. /package/dist/infineon-design-system-stencil/{p-582f7515.entry.js.map → p-9779c3ab.entry.js.map} +0 -0
  411. /package/dist/infineon-design-system-stencil/{p-05f154da.entry.js.map → p-a24709c6.entry.js.map} +0 -0
  412. /package/dist/infineon-design-system-stencil/{p-3a444f2d.entry.js.map → p-b31baf1b.entry.js.map} +0 -0
  413. /package/dist/infineon-design-system-stencil/{p-5f79d386.entry.js.map → p-b3f51af9.entry.js.map} +0 -0
  414. /package/dist/infineon-design-system-stencil/{p-8a960c92.entry.js.map → p-c5865690.entry.js.map} +0 -0
  415. /package/dist/infineon-design-system-stencil/{p-d246597b.entry.js.map → p-cfac63fe.entry.js.map} +0 -0
  416. /package/dist/infineon-design-system-stencil/{p-98f57aed.entry.js.map → p-d7d94bf8.entry.js.map} +0 -0
  417. /package/dist/infineon-design-system-stencil/{p-c378c228.entry.js.map → p-d9e803b2.entry.js.map} +0 -0
  418. /package/dist/infineon-design-system-stencil/{p-7dd092cf.entry.js.map → p-e5735d80.entry.js.map} +0 -0
  419. /package/dist/infineon-design-system-stencil/{p-a11b5f74.entry.js.map → p-e7b8e003.entry.js.map} +0 -0
  420. /package/dist/infineon-design-system-stencil/{p-633ca789.entry.js.map → p-eeeccd0b.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{r as e,c as i,h as t,a as s}from"./p-DS8meZSd.js";import{d as a,t as n}from"./p-DcmcuUOA.js";import{i as l}from"./p-Bw2fh5LT.js";const r=':root{--ifx-font-family:"Source Sans 3", "Arial, 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 c=class{constructor(t){e(this,t);this.ifxChange=i(this,"ifxChange",7);this.placeholder="";this.size="large";this.value=undefined;this.variant="single";this.readOnly=false;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 s=this.chip.shadowRoot.querySelector(".chip__dropdown");if(!i.includes(s)&&!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.emitIfxChange){this.ifxChange.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 s=t.shadowRoot.querySelector(".chip-item");if(s){setTimeout((()=>{s.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.ifxChange.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(),emitIfxChange:true})))}else if(typeof e==="string"){this.selectedOptions=[{value:e,label:e,selected:true,key:i(),emitIfxChange:true}]}this.syncChipState()}componentWillLoad(){this.syncSelectedOptionsWithProp(this.value)}async componentDidLoad(){if(!l(this.chip)){const e=a();n("ifx-chip",await e)}}render(){return t("div",{key:"c91add8c4af1fa4ec84184992969deefa67d3feb",class:"chip"},t("div",{key:"cc35edda151d00c7a7670859806f9678057d941e",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:"a9c1790c753340227ee88a059f63d9c260705eb8",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:"4d797db98446a87c02944bd7650445d78f637e5d",class:"label__selected-options"},this.getSelectedOptions()),this.selectedOptions.length>2&&this.variant==="multi"&&t("ifx-indicator",{key:"9a3576fa06fbcac135b20a0ba2337832b168d28a",variant:"number",number:this.selectedOptions.length-2})),!this.readOnly&&(this.variant!=="multi"||this.variant==="multi"&&this.selectedOptions.length===0)&&t("div",{key:"678d1ba8227d543feb3da142d78e3c4bc5de1b32",class:"wrapper__open-button"},t("ifx-icon",{key:1,icon:`chevron-down-16`})),this.variant!=="multi"&&this.readOnly!==false&&this.selectedOptions.length>0&&t("div",{key:"d4856bfa3359a008797712a9391281303edb0dd8",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:"059b498f687e043e70e1194de3d1c1a3a124409e",class:"wrapper__unselect-button",onClick:e=>{this.handleUnselectButtonClick(e)}},t("ifx-icon",{key:2,icon:`cross16`}))),this.opened&&!this.readOnly&&t("div",{key:"628c7180e6f8257942c79b24e254f6924910f115",id:"dropdown",role:"listbox",class:"chip__dropdown"},t("slot",{key:"373297c8235e4748e822da674a0488060bb9c228"})))}get chip(){return s(this)}static get watchers(){return{value:["handleValueChange"],readOnly:["handleReadOnlyChange"]}}};c.style=r;const h=':root{--ifx-font-family:"Source Sans 3", "Arial, 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 o=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({emitIfxChange: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:"0feac58e2e7104e948633503bb6e1e41a7933963",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:"5bff8f27bda9843ffbad86fed014e6f5b1df3b9c",checked:this.selected,tabIndex:-1,size:"s"}),t("div",{key:"e4ed1025410e1821e1549d8f29f7cc6c5ba57a2d",class:"chip-item__label"}," ",t("slot",{key:"541c9acff7c19e816f75cea1d17de319eefb8536"})," "),t("div",{key:"e5fc6f9e1d1e40bcc2ac591f2e550abcffa4cdad",class:"chip-item__selected-indicator"},t("ifx-icon",{key:"24c75f1d1eb8927d5193875aacda59ce9117e0df",icon:"check-16"}," ")))}get chipItem(){return s(this)}static get watchers(){return{selected:["validateSelected"]}}};o.style=h;const p='@charset "UTF-8";:root{--ifx-font-family:"Source Sans 3", "Arial, 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}.page__button{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) page__button{background-color:#EEEDED}li:active:not(.active) .page__button{background-color:#575352;color:#fff}li.active{background-color:#0A8276}li.active .page__button{color:#fff}li:hover{cursor:pointer}li .page__button{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 d=class{constructor(t){e(this,t);this.ifxPageChange=i(this,"ifxPageChange",7);this.ifxItemsPerPageChange=i(this,"ifxItemsPerPageChange",7);this.currentPage=1;this.internalPage=1;this.internalItemsPerPage=10;this.numberOfPages=[];this.total=1;this.filteredItemsPerPage=[];this.visiblePages=[];this.CLASS_DISABLED="disabled";this.CLASS_ACTIVE="active";this.handlePageClick=e=>{const i=e.currentTarget;const t=parseInt(i.dataset.page);if(!isNaN(t))this.changePage(t)}}watchTotalHandler(){this.calculateNumberOfPages();this.updateVisiblePages()}currentPageWatcher(e){this.internalPage=Math.max(1,Math.min(e,this.numberOfPages.length));this.calculateNumberOfPages();this.updateVisiblePages()}setItemsPerPage(e){var i,t;const s=((i=e.detail)===null||i===void 0?void 0:i.value)||((t=e.detail)===null||t===void 0?void 0:t.label);const a=parseInt(s)||10;if(a===this.internalItemsPerPage){return}this.internalItemsPerPage=a;this.internalPage=1;this.calculateNumberOfPages();this.updateVisiblePages();this.handleEventEmission()}emitItemsPerPage(e){this.ifxItemsPerPageChange.emit(e.detail.label)}async componentDidLoad(){const e=this.el.shadowRoot.querySelector("#itemsPerPageSelect");if(e){e.addEventListener("ifxSelect",(e=>this.emitItemsPerPage(e)))}if(!l(this.el)){const e=a();n("ifx-pagination",await e)}this.initPagination()}disconnectedCallback(){const e=this.el.shadowRoot.querySelector("#itemsPerPageSelect");if(e){e.removeEventListener("ifxSelect",(e=>this.emitItemsPerPage(e)))}}updateVisiblePages(){const e=2;const i=this.numberOfPages.length;const t=this.internalPage;let s=[];if(i<=5){s=[...this.numberOfPages]}else{s.push(1);if(t>e+1)s.push("...");let a=Math.max(2,t-e);let n=Math.min(i-1,t+e);if(t<=e+1)n=e*2+1;if(t>=i-e)a=i-e*2;for(let e=a;e<=n;e++)s.push(e);if(t<i-e)s.push("...");s.push(i)}this.visiblePages=[...new Set(s)]}calculateNumberOfPages(){const e=Math.ceil(this.total/this.internalItemsPerPage);this.numberOfPages=Array.from({length:e},((e,i)=>i+1));this.internalPage=Math.max(1,Math.min(this.currentPage,e))}filterOptionsArray(){const e=typeof this.itemsPerPage==="string"?JSON.parse(this.itemsPerPage):this.itemsPerPage;this.filteredItemsPerPage=e.map((e=>Object.assign(Object.assign({},e),{label:e.label||e.value})))}componentWillLoad(){this.filterOptionsArray();const e=this.filteredItemsPerPage.find((e=>e.selected));if(e){this.internalItemsPerPage=Number(e.value)}else if(this.filteredItemsPerPage.length>0){this.internalItemsPerPage=Number(this.filteredItemsPerPage[0].value)}this.calculateNumberOfPages();this.internalPage=Math.max(1,Math.min(this.currentPage,this.numberOfPages.length));this.updateVisiblePages()}componentWillUpdate(){if(this.prevInternalPage!==this.internalPage){this.updateVisiblePages();this.prevInternalPage=this.internalPage}}componentDidUpdate(){this.initPagination()}handleEventEmission(){this.ifxPageChange.emit({currentPage:this.internalPage,totalPages:this.numberOfPages.length,itemsPerPage:this.internalItemsPerPage})}initPagination(){const e=this.el.shadowRoot.querySelector(".pagination");if(!e)return;const i=()=>{const i=e.querySelector(".prev");const t=e.querySelector(".next");if(i){i.disabled=this.internalPage===1;i.classList.toggle(this.CLASS_DISABLED,this.internalPage===1)}if(t){t.disabled=this.internalPage===this.numberOfPages.length;t.classList.toggle(this.CLASS_DISABLED,this.internalPage===this.numberOfPages.length)}};e.querySelectorAll("li").forEach((e=>{e.removeEventListener("click",this.handlePageClick);e.addEventListener("click",this.handlePageClick)}));i()}changePage(e){e=Math.max(1,Math.min(e,this.numberOfPages.length));if(e===this.internalPage)return;this.internalPage=e;this.handleEventEmission();this.initPagination()}render(){return t("div",{key:"14f71cd0291d0b01d3b9da91ecec8d3908796107",class:"container"},t("div",{key:"d28f3b1a05cd937eec0efa30b661c1e5671542d3",class:"items__per-page-wrapper"},t("div",{key:"504286b0c1d4d1a77e283612389e2f0a98f76ce3",class:"items__per-page-label"},"Results per Page"),t("div",{key:"61fb210192777dc3ebf7810f0d311eae2abd3dc3",class:"items__per-page-field"},t("ifx-select",{key:"a576ef3d2ee4feb8d9f04550fa08e0a75fdafc07",id:"itemsPerPageSelect",placeholder:"false","show-search":"false",value:undefined,disabled:false,error:false,size:"s",options:this.filteredItemsPerPage,"placeholder-value":"Select"}))),t("nav",{key:"47646225b5ab6cfa65b5620fda57300bc39e23e9",class:"items__total-wrapper","aria-label":`Pagination navigation, page ${this.internalPage} of ${this.numberOfPages.length}`},t("div",{key:"6bdbf4cb181b372491efc177b26c75e1b7677c64",class:"pagination"},t("ifx-icon-button",{key:"ede2c6a66a75510ecc7244be7a7d00dae16f9d3a",class:"prev",icon:"arrow-left-16","aria-label":"Previous Page",onClick:()=>this.changePage(this.internalPage-1)}),t("ol",{key:"43f63193bf3fc7c93fdf714e328da4f1333aca88"},this.visiblePages.map(((e,i)=>typeof e==="number"?t("li",{key:`page-${e}`,class:{[this.CLASS_ACTIVE]:e===this.internalPage},"data-page":e},t("span",{class:"page__button",role:"button",tabindex:"0","aria-current":e===this.internalPage?"page":undefined,"aria-label":`Page ${e}`,onClick:()=>this.changePage(e),onKeyDown:i=>(i.key==="Enter"||i.key===" ")&&this.changePage(e)},e)):t("li",{class:"ellipsis",key:`ellipsis-${i}`},t("span",{"aria-hidden":"true"},"..."))))),t("ifx-icon-button",{key:"610f92b2a6af014529f5562409fa963d85654050",class:"next",icon:"arrow-right-16","aria-label":"Next Page",onClick:()=>this.changePage(this.internalPage+1)}))))}get el(){return s(this)}static get watchers(){return{total:["watchTotalHandler"],currentPage:["currentPageWatcher"]}}};d.style=p;export{c as ifx_chip,o as ifx_chip_item,d as ifx_pagination};
2
- //# sourceMappingURL=p-4d2dfb65.entry.js.map
1
+ import{r as e,c as i,h as t,a as s}from"./p-DS8meZSd.js";import{d as a,t as n}from"./p-DcmcuUOA.js";import{i as l}from"./p-Bw2fh5LT.js";const r=':root{--ifx-font-family:"Source Sans 3", "Arial, 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 c=class{constructor(t){e(this,t);this.ifxChange=i(this,"ifxChange",7);this.placeholder="";this.size="large";this.value=undefined;this.variant="single";this.readOnly=false;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 s=this.chip.shadowRoot.querySelector(".chip__dropdown");if(!i.includes(s)&&!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.emitIfxChange){this.ifxChange.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 s=t.shadowRoot.querySelector(".chip-item");if(s){setTimeout((()=>{s.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.ifxChange.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(),emitIfxChange:true})))}else if(typeof e==="string"){this.selectedOptions=[{value:e,label:e,selected:true,key:i(),emitIfxChange:true}]}this.syncChipState()}componentWillLoad(){this.syncSelectedOptionsWithProp(this.value)}async componentDidLoad(){if(!l(this.chip)){const e=a();n("ifx-chip",await e)}}render(){return t("div",{key:"c91add8c4af1fa4ec84184992969deefa67d3feb",class:"chip"},t("div",{key:"cc35edda151d00c7a7670859806f9678057d941e",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:"a9c1790c753340227ee88a059f63d9c260705eb8",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:"4d797db98446a87c02944bd7650445d78f637e5d",class:"label__selected-options"},this.getSelectedOptions()),this.selectedOptions.length>2&&this.variant==="multi"&&t("ifx-indicator",{key:"9a3576fa06fbcac135b20a0ba2337832b168d28a",variant:"number",number:this.selectedOptions.length-2})),!this.readOnly&&(this.variant!=="multi"||this.variant==="multi"&&this.selectedOptions.length===0)&&t("div",{key:"678d1ba8227d543feb3da142d78e3c4bc5de1b32",class:"wrapper__open-button"},t("ifx-icon",{key:1,icon:`chevron-down-16`})),this.variant!=="multi"&&this.readOnly!==false&&this.selectedOptions.length>0&&t("div",{key:"d4856bfa3359a008797712a9391281303edb0dd8",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:"059b498f687e043e70e1194de3d1c1a3a124409e",class:"wrapper__unselect-button",onClick:e=>{this.handleUnselectButtonClick(e)}},t("ifx-icon",{key:2,icon:`cross16`}))),this.opened&&!this.readOnly&&t("div",{key:"628c7180e6f8257942c79b24e254f6924910f115",id:"dropdown",role:"listbox",class:"chip__dropdown"},t("slot",{key:"373297c8235e4748e822da674a0488060bb9c228"})))}get chip(){return s(this)}static get watchers(){return{value:["handleValueChange"],readOnly:["handleReadOnlyChange"]}}};c.style=r;const h=':root{--ifx-font-family:"Source Sans 3", "Arial, 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 o=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({emitIfxChange: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:"0feac58e2e7104e948633503bb6e1e41a7933963",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:"5bff8f27bda9843ffbad86fed014e6f5b1df3b9c",checked:this.selected,tabIndex:-1,size:"s"}),t("div",{key:"e4ed1025410e1821e1549d8f29f7cc6c5ba57a2d",class:"chip-item__label"}," ",t("slot",{key:"541c9acff7c19e816f75cea1d17de319eefb8536"})," "),t("div",{key:"e5fc6f9e1d1e40bcc2ac591f2e550abcffa4cdad",class:"chip-item__selected-indicator"},t("ifx-icon",{key:"24c75f1d1eb8927d5193875aacda59ce9117e0df",icon:"check-16"}," ")))}get chipItem(){return s(this)}static get watchers(){return{selected:["validateSelected"]}}};o.style=h;const p='@charset "UTF-8";:root{--ifx-font-family:"Source Sans 3", "Arial, 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 d=class{constructor(t){e(this,t);this.ifxPageChange=i(this,"ifxPageChange",7);this.ifxItemsPerPageChange=i(this,"ifxItemsPerPageChange",7);this.currentPage=1;this.internalPage=1;this.internalItemsPerPage=10;this.numberOfPages=[];this.total=1;this.filteredItemsPerPage=[];this.visiblePages=[];this.CLASS_DISABLED="disabled";this.CLASS_ACTIVE="active";this.handlePageClick=e=>{const i=e.currentTarget;const t=parseInt(i.dataset.page);if(!isNaN(t))this.changePage(t)}}watchTotalHandler(){this.calculateNumberOfPages();this.updateVisiblePages()}currentPageWatcher(e){this.internalPage=Math.max(1,Math.min(e,this.numberOfPages.length));this.calculateNumberOfPages();this.updateVisiblePages()}setItemsPerPage(e){var i,t;const s=((i=e.detail)===null||i===void 0?void 0:i.value)||((t=e.detail)===null||t===void 0?void 0:t.label);const a=parseInt(s)||10;if(a===this.internalItemsPerPage){return}this.internalItemsPerPage=a;this.internalPage=1;this.calculateNumberOfPages();this.updateVisiblePages();this.handleEventEmission()}emitItemsPerPage(e){this.ifxItemsPerPageChange.emit(e.detail.label)}async componentDidLoad(){const e=this.el.shadowRoot.querySelector("#itemsPerPageSelect");if(e){e.addEventListener("ifxSelect",(e=>this.emitItemsPerPage(e)))}if(!l(this.el)){const e=a();n("ifx-pagination",await e)}this.initPagination()}disconnectedCallback(){const e=this.el.shadowRoot.querySelector("#itemsPerPageSelect");if(e){e.removeEventListener("ifxSelect",(e=>this.emitItemsPerPage(e)))}}updateVisiblePages(){const e=2;const i=this.numberOfPages.length;const t=this.internalPage;let s=[];if(i<=5){s=[...this.numberOfPages]}else{s.push(1);if(t>e+1)s.push("...");let a=Math.max(2,t-e);let n=Math.min(i-1,t+e);if(t<=e+1)n=e*2+1;if(t>=i-e)a=i-e*2;for(let e=a;e<=n;e++)s.push(e);if(t<i-e)s.push("...");s.push(i)}this.visiblePages=[...new Set(s)]}calculateNumberOfPages(){const e=Math.ceil(this.total/this.internalItemsPerPage);this.numberOfPages=Array.from({length:e},((e,i)=>i+1));this.internalPage=Math.max(1,Math.min(this.currentPage,e))}filterOptionsArray(){const e=typeof this.itemsPerPage==="string"?JSON.parse(this.itemsPerPage):this.itemsPerPage;this.filteredItemsPerPage=e.map((e=>Object.assign(Object.assign({},e),{label:e.label||e.value})))}componentWillLoad(){this.filterOptionsArray();const e=this.filteredItemsPerPage.find((e=>e.selected));if(e){this.internalItemsPerPage=Number(e.value)}else if(this.filteredItemsPerPage.length>0){this.internalItemsPerPage=Number(this.filteredItemsPerPage[0].value)}this.calculateNumberOfPages();this.internalPage=Math.max(1,Math.min(this.currentPage,this.numberOfPages.length));this.updateVisiblePages()}componentWillUpdate(){if(this.prevInternalPage!==this.internalPage){this.updateVisiblePages();this.prevInternalPage=this.internalPage}}componentDidUpdate(){this.initPagination()}handleEventEmission(){this.ifxPageChange.emit({currentPage:this.internalPage,totalPages:this.numberOfPages.length,itemsPerPage:this.internalItemsPerPage})}initPagination(){const e=this.el.shadowRoot.querySelector(".pagination");if(!e)return;const i=()=>{const i=e.querySelector(".prev");const t=e.querySelector(".next");if(i){i.disabled=this.internalPage===1;i.classList.toggle(this.CLASS_DISABLED,this.internalPage===1)}if(t){t.disabled=this.internalPage===this.numberOfPages.length;t.classList.toggle(this.CLASS_DISABLED,this.internalPage===this.numberOfPages.length)}};e.querySelectorAll("li").forEach((e=>{e.removeEventListener("click",this.handlePageClick);e.addEventListener("click",this.handlePageClick)}));i()}changePage(e){e=Math.max(1,Math.min(e,this.numberOfPages.length));if(e===this.internalPage)return;this.internalPage=e;this.handleEventEmission();this.initPagination()}render(){return t("div",{key:"572be4f9e025b9cbf558caca6b13d96836403c91",class:"container"},t("div",{key:"29d403aa753ff37aa30ae2eac8fb0979e91d5c2c",class:"items__per-page-wrapper"},t("div",{key:"a94ea5e6167216a8d60220d1ccd290a14ad66459",class:"items__per-page-label"},"Results per Page"),t("div",{key:"c11dbf5ca3f8146964145d46e64345d93d7dedf8",class:"items__per-page-field"},t("ifx-select",{key:"717e5d66e5790d52901d2f0d6b060fee129c3a78",id:"itemsPerPageSelect",placeholder:"false","show-search":"false",value:undefined,disabled:false,error:false,size:"s",options:this.filteredItemsPerPage,"placeholder-value":"Select"}))),t("div",{key:"79f8c4298d3e8b33911eb7d3199fd71498ab1b14",class:"items__total-wrapper"},t("div",{key:"ba8fb1aa5607423ec9adabfb7843e66772988c77",class:"pagination"},t("ifx-icon-button",{key:"83bbd7d2a1283cdfc65ee50b073ce17107276921",class:"prev",icon:"arrow-left-16",onClick:()=>this.changePage(this.internalPage-1)}),t("ol",{key:"366dc5ab48edce7bf02e312887d5fa3d2d9b65d5"},this.visiblePages.map(((e,i)=>typeof e==="number"?t("li",{key:`page-${e}`,class:{[this.CLASS_ACTIVE]:e===this.internalPage},"data-page":e},t("a",{href:"javascript:void(0)"},e)):t("li",{class:"ellipsis",key:`ellipsis-${i}`},t("span",null,"..."))))),t("ifx-icon-button",{key:"0aad1b8c94d0ed31b75ff0d2f89680c078000a70",class:"next",icon:"arrow-right-16",onClick:()=>this.changePage(this.internalPage+1)}))))}get el(){return s(this)}static get watchers(){return{total:["watchTotalHandler"],currentPage:["currentPageWatcher"]}}};d.style=p;export{c as ifx_chip,o as ifx_chip_item,d as ifx_pagination};
2
+ //# sourceMappingURL=p-2c726b58.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["chipCss","Chip","constructor","hostRef","this","placeholder","size","value","undefined","variant","readOnly","opened","selectedOptions","handleValueChange","newValue","syncSelectedOptionsWithProp","handleReadOnlyChange","closeDropdownOnOutsideClick","event","path","composedPath","chipWrapper","chip","shadowRoot","querySelector","chipDropdown","includes","toggleDropdownMenu","handleKeyDown","code","preventDefault","target","tagName","handleWrapperKeyDown","handleDropdownKeyDown","updateSelectedOptions","eventDetail","detail","previousSelection","selected","chipItems","getChipItems","forEach","chipItem","chipState","Object","assign","emitIfxChipItemSelect","find","option","filter","map","emitIfxChange","ifxChange","emit","currentSelection","name","querySelectorAll","getSelectedOptions","label","join","slice","focusChipItemAt","index","item","length","console","error","shadowItem","setTimeout","focus","focusChip","handleUnselectButtonClick","stopPropagation","itemGotUnselected","handleWrapperClick","chipitems","targetIndex","Array","from","indexOf","syncChipState","key","generateKey","count","isArray","componentWillLoad","componentDidLoad","isNestedInIfxComponent","framework","detectFramework","trackComponent","render","h","class","tabIndex","onClick","role","ariaLabel","toString","number","icon","e","id","chipItemCss","ChipItem","updateItemSelection","parentElement","validateSelected","oldValue","emitIfxChipItemSelectEvent","getItemLabel","innerText","toggleItemSelection","ifxChipItemSelect","handleItemClick","handleItemKeyDown","handleSelectedState","onKeyDown","checked","paginationCss","Pagination","currentPage","internalPage","internalItemsPerPage","numberOfPages","total","filteredItemsPerPage","visiblePages","CLASS_DISABLED","CLASS_ACTIVE","handlePageClick","li","currentTarget","page","parseInt","dataset","isNaN","changePage","watchTotalHandler","calculateNumberOfPages","updateVisiblePages","currentPageWatcher","newVal","Math","max","min","setItemsPerPage","selectedValue","_a","_b","newItemsPerPage","handleEventEmission","emitItemsPerPage","ifxItemsPerPageChange","select","el","addEventListener","initPagination","disconnectedCallback","removeEventListener","buffer","totalPages","current","pages","push","start","end","i","Set","ceil","_","filterOptionsArray","items","itemsPerPage","JSON","parse","selectedOption","Number","componentWillUpdate","prevInternalPage","componentDidUpdate","ifxPageChange","pagination","updateButtons","prev","next","disabled","classList","toggle","newPage","options","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';\nimport { trackComponent } from '../../global/utils/tracking';\nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\n\n@Component({\n tag: 'ifx-chip',\n styleUrl: 'chip.scss',\n shadow: true\n})\nexport class Chip {\n @Element() chip: HTMLIfxChipElement;\n\n @Event() ifxChange: 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 | null;\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.emitIfxChange) {\n this.ifxChange.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.ifxChange.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 emitIfxChange: true\n }));\n } else if (typeof newValue === 'string') {\n this.selectedOptions = [{\n value: newValue,\n label: newValue,\n selected: true,\n key: generateKey(),\n emitIfxChange: true\n }];\n }\n\n this.syncChipState();\n }\n\n componentWillLoad() {\n this.syncSelectedOptionsWithProp(this.value);\n }\n\n async componentDidLoad() { \n if(!isNestedInIfxComponent(this.chip)) { \n const framework = detectFramework();\n trackComponent('ifx-chip', await framework)\n }\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-indicator variant='number' number={this.selectedOptions.length - 2}></ifx-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={`chevron-down-16`} />\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(emitIfxChange: boolean = true) {\n this.ifxChipItemSelect.emit({ emitIfxChange: emitIfxChange,\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-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); // tokens.$ifxFontFamilyBody;\n\n\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, Watch } from '@stencil/core';\nimport { trackComponent } from '../../global/utils/tracking';\nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\n\n@Component({\n tag: 'ifx-pagination',\n styleUrl: 'pagination.scss',\n shadow: true\n})\nexport class Pagination {\n @Element() el: HTMLElement;\n @Event() ifxPageChange: EventEmitter;\n @Event() ifxItemsPerPageChange: EventEmitter;\n @Prop() currentPage: number = 1;\n @State() internalPage: number = 1;\n @State() internalItemsPerPage: number = 10;\n @State() numberOfPages: number[] = [];\n @Prop() total: number = 1;\n @Prop() itemsPerPage: any[] | string;\n @State() filteredItemsPerPage: any[] = [];\n @State() visiblePages: (number | string)[] = [];\n \n private CLASS_DISABLED = \"disabled\";\n private CLASS_ACTIVE = \"active\";\n private prevInternalPage: number;\n\n @Watch('total')\n watchTotalHandler() {\n this.calculateNumberOfPages();\n this.updateVisiblePages();\n }\n\n @Watch('currentPage')\n currentPageWatcher(newVal: number) {\n this.internalPage = Math.max(1, Math.min(newVal, this.numberOfPages.length));\n this.calculateNumberOfPages();\n this.updateVisiblePages();\n }\n\n @Listen('ifxSelect')\n setItemsPerPage(e: CustomEvent) {\n const selectedValue = e.detail?.value || e.detail?.label; \n const newItemsPerPage = parseInt(selectedValue) || 10;\n\n if (newItemsPerPage === this.internalItemsPerPage) {\n return;\n }\n\n this.internalItemsPerPage = newItemsPerPage;\n this.internalPage = 1; \n this.calculateNumberOfPages();\n this.updateVisiblePages();\n this.handleEventEmission();\n }\n\n emitItemsPerPage(e) { \n this.ifxItemsPerPageChange.emit((e as any).detail.label)\n }\n\n async componentDidLoad() {\n const select = this.el.shadowRoot.querySelector('#itemsPerPageSelect');\n if(select) { \n select.addEventListener('ifxSelect', (e) => this.emitItemsPerPage(e))\n }\n\n if(!isNestedInIfxComponent(this.el)) { \n const framework = detectFramework();\n trackComponent('ifx-pagination', await framework)\n }\n this.initPagination();\n }\n\n disconnectedCallback() {\n const select = this.el.shadowRoot.querySelector('#itemsPerPageSelect');\n if (select) {\n select.removeEventListener('ifxSelect', (e) => this.emitItemsPerPage(e));\n }\n }\n\n updateVisiblePages() {\n const buffer = 2;\n const totalPages = this.numberOfPages.length;\n const current = this.internalPage;\n let pages: (number | string)[] = [];\n \n if (totalPages <= 5) {\n pages = [...this.numberOfPages];\n } else {\n pages.push(1);\n \n if (current > buffer + 1) pages.push('...');\n \n let start = Math.max(2, current - buffer);\n let end = Math.min(totalPages - 1, current + buffer);\n \n if (current <= buffer + 1) end = buffer * 2 + 1;\n if (current >= totalPages - buffer) start = totalPages - buffer * 2;\n \n for (let i = start; i <= end; i++) pages.push(i);\n \n if (current < totalPages - buffer) pages.push('...');\n pages.push(totalPages);\n }\n \n this.visiblePages = [...new Set(pages)];\n }\n\n calculateNumberOfPages() {\n const totalPages = Math.ceil(this.total / this.internalItemsPerPage);\n this.numberOfPages = Array.from({ length: totalPages }, (_, i) => i + 1);\n this.internalPage = Math.max(1, Math.min(this.currentPage, totalPages));\n }\n\n filterOptionsArray() { \n const items = typeof this.itemsPerPage === 'string' ? \n JSON.parse(this.itemsPerPage) : this.itemsPerPage;\n this.filteredItemsPerPage = items.map(item => ({\n ...item,\n label: item.label || item.value\n }));\n }\n\n componentWillLoad() {\n this.filterOptionsArray();\n \n const selectedOption = this.filteredItemsPerPage.find(option => option.selected);\n if (selectedOption) {\n this.internalItemsPerPage = Number(selectedOption.value);\n } else if (this.filteredItemsPerPage.length > 0) {\n this.internalItemsPerPage = Number(this.filteredItemsPerPage[0].value);\n }\n\n this.calculateNumberOfPages();\n this.internalPage = Math.max(1, Math.min(this.currentPage, this.numberOfPages.length));\n this.updateVisiblePages();\n }\n\n componentWillUpdate() { \n if (this.prevInternalPage !== this.internalPage) {\n this.updateVisiblePages();\n this.prevInternalPage = this.internalPage;\n }\n }\n\n componentDidUpdate() {\n this.initPagination();\n }\n\n handleEventEmission() {\n this.ifxPageChange.emit({\n currentPage: this.internalPage,\n totalPages: this.numberOfPages.length,\n itemsPerPage: this.internalItemsPerPage\n });\n }\n\n initPagination() {\n const pagination = this.el.shadowRoot.querySelector('.pagination');\n if (!pagination) return;\n\n const updateButtons = () => {\n const prev = pagination.querySelector<HTMLButtonElement>('.prev');\n const next = pagination.querySelector<HTMLButtonElement>('.next');\n if (prev) {\n prev.disabled = this.internalPage === 1;\n prev.classList.toggle(this.CLASS_DISABLED, this.internalPage === 1);\n }\n if (next) {\n next.disabled = this.internalPage === this.numberOfPages.length;\n next.classList.toggle(this.CLASS_DISABLED, this.internalPage === this.numberOfPages.length);\n }\n };\n\n pagination.querySelectorAll('li').forEach(li => {\n li.removeEventListener('click', this.handlePageClick);\n li.addEventListener('click', this.handlePageClick);\n });\n\n updateButtons();\n }\n\n private handlePageClick = (e: Event) => {\n const li = e.currentTarget as HTMLLIElement;\n const page = parseInt(li.dataset.page);\n if (!isNaN(page)) this.changePage(page);\n };\n\n changePage(newPage: number) {\n newPage = Math.max(1, Math.min(newPage, this.numberOfPages.length));\n if (newPage === this.internalPage) return;\n \n this.internalPage = newPage;\n this.handleEventEmission();\n this.initPagination();\n }\n\n render() {\n return (\n <div 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 id='itemsPerPageSelect'\n placeholder='false'\n show-search='false'\n value={undefined}\n disabled={false}\n error={false}\n size=\"s\"\n options={this.filteredItemsPerPage}\n placeholder-value=\"Select\"\n ></ifx-select>\n </div>\n </div>\n \n <div class=\"items__total-wrapper\">\n <div class=\"pagination\">\n <ifx-icon-button\n class=\"prev\"\n icon=\"arrow-left-16\"\n onClick={() => this.changePage(this.internalPage - 1)}\n ></ifx-icon-button>\n \n <ol>\n {this.visiblePages.map((page, i) => typeof page === 'number' ? (\n <li \n key={`page-${page}`}\n class={{ [this.CLASS_ACTIVE]: page === this.internalPage }}\n data-page={page}\n >\n <a href=\"javascript:void(0)\">{page}</a>\n </li>\n ) : (\n <li class=\"ellipsis\" key={`ellipsis-${i}`}>\n <span>...</span>\n </li>\n ))}\n </ol>\n \n <ifx-icon-button\n class=\"next\"\n icon=\"arrow-right-16\"\n onClick={() => this.changePage(this.internalPage + 1)}\n ></ifx-icon-button>\n </div>\n </div>\n </div>\n );\n }\n}"],"mappings":"wIAAA,MAAMA,EAAU,m/C,MCWHC,EAAI,MALjB,WAAAC,CAAAC,G,+CASUC,KAAWC,YAAW,GACtBD,KAAIE,KAAsB,QACTF,KAAKG,MAA2BC,UACjDJ,KAAOK,QAAuB,SAC9BL,KAAQM,SAAY,MAGnBN,KAAMO,OAAY,MAClBP,KAAeQ,gBAA+B,EAsWxD,CAnWC,iBAAAC,CAAkBC,GAChBV,KAAKW,4BAA4BD,E,CAInC,oBAAAE,CAA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B,GAAG,qBACHlG,YAAY,QACA,sBACZE,MAAOC,UACPmL,SAAU,MACVxH,MAAO,MACP7D,KAAK,IACLyL,QAAS3L,KAAK2H,qBAAoB,oBAChB,aAKxBlC,EAAK,OAAAX,IAAA,2CAAAY,MAAM,wBACTD,EAAK,OAAAX,IAAA,2CAAAY,MAAM,cACTD,EACE,mBAAAX,IAAA,2CAAAY,MAAM,OACNO,KAAK,gBACLL,QAAS,IAAM5F,KAAKsI,WAAWtI,KAAKuH,aAAe,KAGrD9B,EACC,MAAAX,IAAA,4CAAA9E,KAAK4H,aAAa7E,KAAI,CAACmF,EAAMkC,WAAalC,IAAS,SAClDzC,EAAA,MACEX,IAAK,QAAQoD,IACbxC,MAAO,CAAE,CAAC1F,KAAK8H,cAAeI,IAASlI,KAAKuH,cAAc,YAC/CW,GAEXzC,EAAG,KAAAmG,KAAK,sBAAsB1D,IAGhCzC,EAAA,MAAIC,MAAM,WAAWZ,IAAK,YAAYsF,KACpC3E,EAAgB,uBAKpBA,EAAA,mBAAAX,IAAA,2CACEY,MAAM,OACNO,KAAK,iBACLL,QAAS,IAAM5F,KAAKsI,WAAWtI,KAAKuH,aAAe,O","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as s,h as t,a as e}from"./p-DS8meZSd.js";import{d as r,t as a}from"./p-DcmcuUOA.js";import{i}from"./p-Bw2fh5LT.js";const o=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:flex;width:100%}.progress-bar{height:16px;bottom:0;right:0;top:0;left:0;display:flex;height:20px;border-radius:1px;width:100%;overflow:hidden;background-color:#EEEDED;font-family:var(--ifx-font-family)}.progress-bar.s{height:4px}.progress-bar .label{font-style:normal;font-size:0.875rem;font-weight:400;line-height:1.25rem;color:#FFFFFF}.progress-bar .progress{display:flex;align-items:center;justify-content:center;min-width:fit-content;height:100%;background-color:#0A8276;transition:width 0.2s ease}';const n=class{constructor(t){s(this,t);this.value=0;this.showLabel=false}valueChanged(s,t){if(s!==t){this.internalValue=s}}componentWillLoad(){this.internalValue=this.value}async componentDidLoad(){if(!i(this.el)){const s=r();a("ifx-progress-bar",await s)}}render(){return t("div",{key:"aab5d36ce5e1d2de702f7fd867d284be8f02e165","aria-label":"a progress bar","aria-value":this.value,class:`progress-bar ${this.size}`},t("div",{key:"d113086b5d7d439ac710b284c017d295c25284cf",class:"progress",style:{width:`${this.internalValue}%`}},this.showLabel&&this.size!=="s"&&this.internalValue!==0&&t("span",{key:"98a8475f5cff469261f8a42e89a5c621c21a4373",class:"label"},`${this.internalValue}%`)))}get el(){return e(this)}static get watchers(){return{value:["valueChanged"]}}};n.style=o;export{n as ifx_progress_bar};
2
+ //# sourceMappingURL=p-310f8129.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["progressBarCss","ProgressBar","constructor","hostRef","this","value","showLabel","valueChanged","newValue","oldValue","internalValue","componentWillLoad","componentDidLoad","isNestedInIfxComponent","el","framework","detectFramework","trackComponent","render","h","key","class","size","style","width"],"sources":["src/components/progress-bar/progress-bar.scss?tag=ifx-progress-bar&encapsulation=shadow","src/components/progress-bar/progress-bar.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n:host {\n display: flex;\n width: 100%;\n}\n\n.progress-bar {\n height: tokens.$ifxSize200;\n bottom: 0;\n right: 0;\n top: 0;\n left: 0;\n display: flex;\n height: tokens.$ifxSize250;\n border-radius: tokens.$ifxBorderRadius12;\n width: 100%; // Ensure the bar itself can grow up to 100% width\n overflow: hidden; // Ensures that the inner progress bar doesn't exceed the width of the outer progress bar\n background-color: tokens.$ifxColorEngineering200;\n font-family: var(--ifx-font-family); // tokens.$ifxFontFamilyBody;\n\n \n \n &.s {\n height: 4px;\n }\n\n .label {\n font-style: normal;\n font-size: tokens.$ifxFontSizeS;\n font-weight: 400;\n line-height: tokens.$ifxLineHeightS;\n color: tokens.$ifxColorBaseWhite;\n }\n \n .progress {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: fit-content;\n height: 100%;\n background-color: #0A8276;\n transition: width 0.2s ease;\n }\n}","import { Component, Prop, h, State, Watch, Element } from '@stencil/core';\nimport { trackComponent } from '../../global/utils/tracking';\nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\n\n@Component({\n tag: 'ifx-progress-bar',\n styleUrl: 'progress-bar.scss',\n shadow: true\n})\nexport class ProgressBar {\n @Element() el: HTMLElement;\n @Prop() value: number = 0;\n @Prop() size: string;\n @Prop() showLabel: boolean = false;\n\n @State() internalValue: number;\n\n @Watch('value')\n valueChanged(newValue: number, oldValue: number) {\n if (newValue !== oldValue) {\n this.internalValue = newValue;\n }\n }\n\n componentWillLoad() {\n this.internalValue = this.value;\n }\n\n async componentDidLoad() { \n if(!isNestedInIfxComponent(this.el)) { \n const framework = detectFramework();\n trackComponent('ifx-progress-bar', await framework)\n }\n }\n\n render() {\n return (\n <div aria-label='a progress bar' aria-value={this.value} class={`progress-bar ${this.size}`}>\n <div class=\"progress\" style={{ width: `${this.internalValue}%` }}>\n {this.showLabel && this.size !== \"s\" && this.internalValue !== 0 && <span class=\"label\">{`${this.internalValue}%`}</span>}\n </div>\n </div>\n );\n }\n}\n"],"mappings":"4HAAA,MAAMA,EAAiB,okB,MCUVC,EAAW,MALxB,WAAAC,CAAAC,G,UAOUC,KAAKC,MAAW,EAEhBD,KAASE,UAAY,KA+B9B,CA1BC,YAAAC,CAAaC,EAAkBC,GAC7B,GAAID,IAAaC,EAAU,CACzBL,KAAKM,cAAgBF,C,EAIzB,iBAAAG,GACEP,KAAKM,cAAgBN,KAAKC,K,CAG5B,sBAAMO,GACJ,IAAIC,EAAuBT,KAAKU,IAAK,CACnC,MAAMC,EAAYC,IAClBC,EAAe,yBAA0BF,E,EAI7C,MAAAG,GACE,OACEC,EAAA,OAAAC,IAAA,wDAAgB,iBAAgB,aAAahB,KAAKC,MAAQgB,MAAO,gBAAgBjB,KAAKkB,QACpFH,EAAK,OAAAC,IAAA,2CAAAC,MAAM,WAAWE,MAAO,CAAEC,MAAO,GAAGpB,KAAKM,mBAC3CN,KAAKE,WAAaF,KAAKkB,OAAS,KAAOlB,KAAKM,gBAAkB,GAAKS,EAAA,QAAAC,IAAA,2CAAMC,MAAM,SAAS,GAAGjB,KAAKM,mB","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as e,h as i,a as t}from"./p-DS8meZSd.js";import{d as n,t as l}from"./p-DcmcuUOA.js";import{i as o}from"./p-Bw2fh5LT.js";import{c as r}from"./p-DMLRPGid.js";import"./p-B85MJLTf.js";const s=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:inline-flex}.link{display:inline-flex;align-items:center;font-weight:400;font-size:1rem;text-decoration:none;color:#0A8276;gap:8px;line-height:1.6;font-family:var(--ifx-font-family)}.link:hover{cursor:pointer}.link:focus{outline-width:2px;outline-style:solid;outline-color:#0A8276;outline-offset:4px;border-radius:3px}.link.bold{font-weight:600}.link.bold:hover{text-decoration:underline}.link.bold:active{color:#08665C;font-style:normal;font-weight:600;text-decoration:underline}.link.underlined{text-decoration:underline;text-decoration-color:#0A8276;color:#1D1D1D;text-underline-offset:8px}.link.underlined:hover{color:#0A8276}.link.underlined:active{color:#0A8276}.link.underlined:disabled,.link.underlined.disabled{text-decoration-color:#BFBBBB}.link.title{text-decoration:none;font-weight:600;color:#1D1D1D}.link.title:hover{color:#0A8276}.link.title:active{color:#08665C}.link.menu{font-weight:400;font-style:normal;line-height:26px;color:#1D1D1D}.link.menu:hover{color:#0A8276}.link.menu:active{color:#08665C}.link.small{font-size:0.875rem}.link.medium{font-size:1rem}.link.large{font-size:1.125rem}.link.extraLarge{font-size:1.25rem}.link.underline{text-decoration:underline}.link:disabled,.link.disabled{color:#BFBBBB;cursor:default;pointer-events:none}';const a=class{constructor(i){e(this,i);this.href=undefined;this.target="_self";this.variant="bold";this.disabled=false;this.internalHref="";this.internalTarget="";this.internalVariant=""}setInternalStates(){if(this.href){this.internalHref=this.href.trim()}else{this.internalHref=undefined}this.internalTarget=this.target.trim();this.internalVariant=this.variant.trim().toLowerCase()}componentWillRender(){this.setInternalStates()}handleKeyDown(e){if(this.disabled){e.preventDefault()}else if(e.key==="Enter"){e.preventDefault()}}async componentDidLoad(){if(!o(this.el)){const e=n();l("ifx-link",await e)}}render(){return i("a",{key:"592e216911ae25b9072dce1a3e9be118d6a54c7a",tabindex:"0",role:"link","aria-label":this.ariaLabel,"aria-disabled":this.disabled||!this.internalHref,href:this.disabled?undefined:this.internalHref,download:this.download,target:this.internalTarget,class:this.linkClassNames()},i("slot",{key:"6c7c1523957f3b1f8ef3d2a96ae8f80590fda81a"}))}getSizeClass(){const e=this.size==="s"?"small":null;const i=this.size==="m"?"medium":null;const t=this.size==="l"?"large":null;const n=this.size==="xl"?"extraLarge":null;if(e){return e}else if(i){return i}else if(t){return t}else if(n&&this.internalVariant==="underlined"){return"large"}else if(n&&this.internalVariant!=="underlined"){return n}else return""}getVariantClass(){const e=this.internalVariant==="bold"?"bold":null;const i=this.internalVariant==="title"?"title":null;const t=this.internalVariant==="underlined"?"underlined":null;const n=this.internalVariant==="menu"?"menu":null;if(e){return e}else if(i){return i}else if(t){return t}else if(n){return n}else return e}linkClassNames(){return r("link","primary",this.getVariantClass(),this.getSizeClass(),this.disabled?"disabled":"")}get el(){return t(this)}};a.style=s;export{a as ifx_link};
2
- //# sourceMappingURL=p-c75a57a2.entry.js.map
1
+ import{r as e,h as i,a as t}from"./p-DS8meZSd.js";import{d as n,t as l}from"./p-DcmcuUOA.js";import{i as o}from"./p-Bw2fh5LT.js";import{c as r}from"./p-DMLRPGid.js";import"./p-B85MJLTf.js";const s=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:inline-flex}.link{display:inline-flex;align-items:center;font-weight:400;font-size:1rem;text-decoration:none;color:#0A8276;gap:8px;line-height:1.6;font-family:var(--ifx-font-family)}.link:hover{cursor:pointer}.link:focus{outline-width:2px;outline-style:solid;outline-color:#0A8276;outline-offset:4px;border-radius:3px}.link.bold{font-weight:600}.link.bold:hover{text-decoration:underline}.link.bold:active{color:#08665C;font-style:normal;font-weight:600;text-decoration:underline}.link.underlined{text-decoration:underline;text-decoration-color:#0A8276;color:#1D1D1D;text-underline-offset:8px}.link.underlined:hover{color:#0A8276}.link.underlined:active{color:#0A8276}.link.underlined:disabled,.link.underlined.disabled{text-decoration-color:#BFBBBB}.link.title{text-decoration:none;font-weight:600;color:#1D1D1D}.link.title:hover{color:#0A8276}.link.title:active{color:#08665C}.link.menu{font-weight:400;font-style:normal;line-height:26px;color:#1D1D1D}.link.menu:hover{color:#0A8276}.link.menu:active{color:#08665C}.link.small{font-size:0.875rem}.link.medium{font-size:1rem}.link.large{font-size:1.125rem}.link.extraLarge{font-size:1.25rem}.link.underline{text-decoration:underline}.link:disabled,.link.disabled{color:#BFBBBB;cursor:default;pointer-events:none}';const a=class{constructor(i){e(this,i);this.href=undefined;this.target="_self";this.variant="bold";this.disabled=false;this.internalHref="";this.internalTarget="";this.internalVariant=""}setInternalStates(){if(this.href){this.internalHref=this.href.trim()}else{this.internalHref=undefined}this.internalTarget=this.target.trim();this.internalVariant=this.variant.trim().toLowerCase()}componentWillRender(){this.setInternalStates()}handleKeyDown(e){if(this.disabled){e.preventDefault()}else if(e.key==="Enter"){e.preventDefault()}}async componentDidLoad(){if(!o(this.el)){const e=n();l("ifx-link",await e)}}render(){return i("a",{key:"ae498558ea8884e532e335d63efaf343baa53ea4",role:"link","aria-label":this.ariaLabel,"aria-disabled":this.disabled||!this.internalHref,href:this.disabled?undefined:this.internalHref,download:this.download,target:this.internalTarget,class:this.linkClassNames()},i("slot",{key:"94ce17ba74775672da8d8317f3c70f056ae746ed"}))}getSizeClass(){const e=this.size==="s"?"small":null;const i=this.size==="m"?"medium":null;const t=this.size==="l"?"large":null;const n=this.size==="xl"?"extraLarge":null;if(e){return e}else if(i){return i}else if(t){return t}else if(n&&this.internalVariant==="underlined"){return"large"}else if(n&&this.internalVariant!=="underlined"){return n}else return""}getVariantClass(){const e=this.internalVariant==="bold"?"bold":null;const i=this.internalVariant==="title"?"title":null;const t=this.internalVariant==="underlined"?"underlined":null;const n=this.internalVariant==="menu"?"menu":null;if(e){return e}else if(i){return i}else if(t){return t}else if(n){return n}else return e}linkClassNames(){return r("link","primary",this.getVariantClass(),this.getSizeClass(),this.disabled?"disabled":"")}get el(){return t(this)}};a.style=s;export{a as ifx_link};
2
+ //# sourceMappingURL=p-3dbfa0c1.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["linkCss","Link","constructor","hostRef","this","href","undefined","target","variant","disabled","internalHref","internalTarget","internalVariant","setInternalStates","trim","toLowerCase","componentWillRender","handleKeyDown","event","preventDefault","key","componentDidLoad","isNestedInIfxComponent","el","framework","detectFramework","trackComponent","render","h","role","ariaLabel","download","class","linkClassNames","getSizeClass","small","size","medium","large","extraLarge","getVariantClass","bold","title","underlined","menu","classNames"],"sources":["src/components/link/link.scss?tag=ifx-link&encapsulation=shadow","src/components/link/link.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n:host {\n display: inline-flex;\n}\n\n.link {\n display: inline-flex;\n align-items: center;\n font-weight: 400;\n font-size: tokens.$ifxFontSizeM;\n text-decoration: none;\n color: tokens.$ifxColorOcean500;\n gap: tokens.$ifxSpace100;\n line-height: 1.6;\n font-family: var(--ifx-font-family); // tokens.$ifxFontFamilyBody;\n\n\n\n &:hover { \n cursor: pointer;\n }\n\n &:focus {\n outline-width: 2px;\n outline-style: solid;\n outline-color: #0A8276;\n outline-offset: 4px;\n border-radius: 3px;\n }\n\n &.bold {\n font-weight: tokens.$ifxFontWeightSemibold;\n\n &:hover {\n text-decoration: underline;\n }\n\n &:active {\n color: #08665C;\n font-style: normal;\n font-weight: 600;\n text-decoration: underline;\n }\n\n }\n\n &.underlined {\n text-decoration: underline;\n text-decoration-color: tokens.$ifxColorOcean500;\n color: #1D1D1D;\n text-underline-offset: 8px;\n \n &:hover {\n color: tokens.$ifxColorOcean500;;\n }\n \n &:active {\n color: #0A8276;\n }\n\n &:disabled,\n &.disabled {\n text-decoration-color: tokens.$ifxColorEngineering300;\n }\n }\n\n &.title {\n text-decoration: none;\n font-weight: tokens.$ifxFontWeightSemibold;\n color: #1D1D1D;\n\n &:hover {\n color: tokens.$ifxColorOcean500;\n }\n\n &:active {\n color: #08665C;\n }\n }\n\n &.menu {\n font-weight: 400;\n font-style: normal;\n line-height: 26px;\n color: #1D1D1D;\n\n &:hover {\n color: tokens.$ifxColorOcean500;\n }\n\n &:active {\n color: #08665C;\n }\n }\n\n &.small {\n font-size: tokens.$ifxFontSizeS;\n }\n\n &.medium {\n font-size: tokens.$ifxFontSizeM;\n }\n\n &.large {\n font-size: tokens.$ifxFontSizeL;\n }\n\n &.extraLarge {\n font-size: tokens.$ifxFontSizeXl;\n }\n\n &.underline {\n text-decoration: underline;\n }\n\n &:disabled,\n &.disabled {\n color: tokens.$ifxColorEngineering300;\n cursor: default;\n pointer-events: none;\n }\n\n}","import { Component, Prop, h, State, Element } from \"@stencil/core\";\nimport { trackComponent } from '../../global/utils/tracking';\nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\nimport classNames from 'classnames';\n \n@Component({\n tag: 'ifx-link',\n styleUrl: 'link.scss',\n shadow: true\n})\n\nexport class Link {\n @Element() el;\n @Prop() href: string = undefined;\n @Prop() target: string = '_self';\n @Prop() variant: string = 'bold';\n @Prop() size: string;\n @Prop() disabled: boolean = false;\n @Prop() download: string;\n @Prop() ariaLabel: string | null;\n @State() internalHref: string ='';\n @State() internalTarget: string = '';\n @State() internalVariant: string = '';\n\n setInternalStates() {\n if(this.href){\n this.internalHref = this.href.trim();\n }else{\n this.internalHref = undefined;\n }\n this.internalTarget = this.target.trim();\n this.internalVariant = this.variant.trim().toLowerCase();\n }\n\n componentWillRender(){\n this.setInternalStates();\n }\n\n handleKeyDown(event: KeyboardEvent) {\n if (this.disabled) {\n event.preventDefault();\n } else if (event.key === 'Enter') {\n event.preventDefault();\n }\n }\n\n async componentDidLoad() { \n if(!isNestedInIfxComponent(this.el)) { \n const framework = detectFramework();\n trackComponent('ifx-link', await framework)\n }\n }\n\n render() {\n return (\n <a\n role=\"link\"\n aria-label={this.ariaLabel}\n aria-disabled={this.disabled || !this.internalHref}\n href={this.disabled ? undefined : this.internalHref}\n download={this.download}\n target={this.internalTarget}\n class={this.linkClassNames()}>\n <slot></slot>\n </a>)\n }\n\n getSizeClass() {\n const small = this.size === 's' ? 'small' : null;\n const medium = this.size === 'm' ? 'medium' : null;\n const large = this.size === 'l' ? 'large' : null;\n const extraLarge = this.size === 'xl' ? 'extraLarge' : null;\n\n if (small) {\n return small;\n } else if (medium) {\n return medium;\n } else if (large) {\n return large;\n } else if (extraLarge && this.internalVariant === 'underlined') {\n return 'large';\n } else if (extraLarge && this.internalVariant !== 'underlined') {\n return extraLarge;\n } else return \"\";\n }\n\n getVariantClass() {\n const bold = this.internalVariant === 'bold' ? 'bold' : null;\n const title = this.internalVariant === 'title' ? 'title' : null;\n const underlined = this.internalVariant === 'underlined' ? 'underlined' : null;\n const menu = this.internalVariant === 'menu' ? 'menu' : null;\n\n if (bold) {\n return bold\n } else if (title) {\n return title;\n } else if (underlined) {\n return underlined;\n } else if (menu) {\n return menu;\n } else return bold;\n }\n\n linkClassNames() {\n return classNames(\n 'link',\n 'primary',\n this.getVariantClass(),\n this.getSizeClass(),\n this.disabled ? 'disabled' : '',\n );\n }\n}"],"mappings":"6LAAA,MAAMA,EAAU,6zC,MCYHC,EAAI,MANjB,WAAAC,CAAAC,G,UAQUC,KAAIC,KAAWC,UACfF,KAAMG,OAAW,QACjBH,KAAOI,QAAW,OAElBJ,KAAQK,SAAY,MAGnBL,KAAYM,aAAU,GACtBN,KAAcO,eAAW,GACzBP,KAAeQ,gBAAW,EA0FpC,CAxFC,iBAAAC,GACE,GAAGT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AC3D,MAAM+B,EAAavC,KAAKQ,kBAAoB,aAAe,aAAe,KAC1E,MAAMgC,EAAOxC,KAAKQ,kBAAoB,OAAS,OAAS,KAExD,GAAI6B,EAAM,CACR,OAAOA,C,MACF,GAAIC,EAAO,CAChB,OAAOA,C,MACF,GAAIC,EAAY,CACrB,OAAOA,C,MACF,GAAIC,EAAM,CACf,OAAOA,C,MACF,OAAOH,C,CAGhB,cAAAR,GACE,OAAOY,EACL,OACA,UACAzC,KAAKoC,kBACLpC,KAAK8B,eACL9B,KAAKK,SAAW,WAAa,G","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as e,c as i,h as t,a as s}from"./p-DS8meZSd.js";const a=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{position:relative}.sidebar__nav-item:focus,.sidebar__nav-item.header__section:focus{outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #0A8276}.sidebar__nav-item:focus .sidebar__nav-item-icon-wrapper,.sidebar__nav-item.header__section:focus .sidebar__nav-item-icon-wrapper{color:#08665C}.sidebar__nav-item:focus .sidebar__nav-item-label,.sidebar__nav-item.header__section:focus .sidebar__nav-item-label{outline:none;color:#08665C}.sidebar__nav-item:focus .sidebar__nav-item-indicator .item__arrow-wrapper ifx-icon,.sidebar__nav-item.header__section:focus .sidebar__nav-item-indicator .item__arrow-wrapper ifx-icon{color:#08665C}.sidebar__nav-item:hover,.sidebar__nav-item.header__section:hover{outline:none}.sidebar__nav-item:hover .sidebar__nav-item-icon-wrapper,.sidebar__nav-item.header__section:hover .sidebar__nav-item-icon-wrapper{color:#08665C}.sidebar__nav-item:hover .sidebar__nav-item-label,.sidebar__nav-item.header__section:hover .sidebar__nav-item-label{outline:none;color:#08665C}.sidebar__nav-item:hover .sidebar__nav-item-indicator .item__arrow-wrapper ifx-icon,.sidebar__nav-item.header__section:hover .sidebar__nav-item-indicator .item__arrow-wrapper ifx-icon{color:#08665C}.sidebar__nav-item{display:flex;flex-direction:row;align-items:center;width:100%;padding:8px 0px;gap:4px;flex:none;order:0;flex-grow:0;text-decoration:none;color:#1D1D1D;cursor:pointer;font-family:var(--ifx-font-family)}.sidebar__nav-item.extra-padding__bottom{padding:8px 0px 16px 0px}.sidebar__nav-item.active{color:#0A8276}.sidebar__nav-item.active-section::before{content:"";position:absolute;left:-32px;height:40px;width:2px;background:#0A8276}.sidebar__nav-item.open{padding:8px 0px}.sidebar__nav-item.open .sidebar__nav-item-label{font-size:16px;font-style:normal;font-weight:400;line-height:24px}.sidebar__nav-item.open .sidebar__nav-item-indicator .item__arrow-wrapper ifx-icon{transform:rotate(-180deg)}.sidebar__nav-item.header__section{box-sizing:padding-box;border-top:1px solid #EEEDED;padding:16px 0px;display:-webkit-flex;-webkit-line-clamp:1;-webkit-box-orient:horizontal;overflow:hidden;text-overflow:ellipsis}.sidebar__nav-item.header__section.no-top-border{border-top:none}.sidebar__nav-item.header__section.active-section::before{content:"";position:absolute;left:-32px;height:40px;width:2px;background:#0A8276}.sidebar__nav-item.header__section.open{padding:16px 0px 8px 0px}.sidebar__nav-item.header__section.open .sidebar__nav-item-indicator .item__arrow-wrapper ifx-icon{transform:rotate(-180deg)}.sidebar__nav-item.header__section .sidebar__nav-item-label{color:#1D1D1D;font-family:Source Sans 3;font-size:16px;font-style:normal;font-weight:600;line-height:24px}.sidebar__nav-item.submenu__item{padding:4px 0px}.sidebar__nav-item.submenu__item.extra-padding__bottom{padding:4px 0px 16px 0px}.sidebar__nav-item .sidebar__nav-item-icon-wrapper{display:flex;width:24px;height:24px;justify-content:center;align-items:center;gap:8px;flex-shrink:0}.sidebar__nav-item .sidebar__nav-item-icon-wrapper.noIcon{display:none}.sidebar__nav-item .sidebar__nav-item-icon-wrapper ifx-icon{width:16px;height:16px}.sidebar__nav-item .sidebar__nav-item-label{font-style:normal;font-weight:400;font-size:1rem;line-height:1.5rem;display:flex;align-items:center;flex:none;order:1;flex-grow:1;cursor:pointer}.sidebar__nav-item .sidebar__nav-item-indicator{display:flex;flex-direction:row;justify-content:center;align-items:center;padding:0px 4px;flex:none;order:2;flex-grow:0}.expandable__submenu{display:none;list-style-type:none;flex-direction:column;padding:0;margin:0;padding-left:40px}.expandable__submenu.open{display:flex}.header__section+.expandable__submenu{padding-left:0}';const n=class{constructor(t){e(this,t);this.ifxSidebarMenu=i(this,"ifxSidebarMenu",7);this.ifxSidebarNavigationItem=i(this,"ifxSidebarNavigationItem",7);this.ifxSidebarActionItem=i(this,"ifxSidebarActionItem",7);this.icon="";this.showIcon=true;this.showIconWrapper=false;this.href="";this.internalHref="";this.target="_self";this.isExpandable=false;this.isNested=true;this.isSubMenuItem=false;this.active=false;this.isActionItem=false;this.internalActiveState=false}handleActiveChange(e,i){if(this.isActionItem){this.internalActiveState=false;return}this.internalActiveState=e;if(e!==i){let i=this.getNavItem(this.el.shadowRoot);if(!this.isExpandable&&!e){this.handleClassList(i,"remove","active")}if(!this.isExpandable&&e){this.handleClassList(i,"add","active")}}}handleConsoleError(e){if(e.detail){this.showIcon=false}else{this.showIcon=true}}handleEventEmission(){this.ifxSidebarMenu.emit(this.el)}handleClassList(e,i,t){e.classList[i](t);if(i==="contains"){return e.classList.contains(t)}}getExpandableMenu(){const e=this.el.shadowRoot.querySelector(".expandable__submenu");return e}getNavItem(e){return e===null||e===void 0?void 0:e.querySelector(".sidebar__nav-item")}getSidebarMenuItems(e=this.el){const i=e.querySelectorAll("ifx-sidebar-item");if(i.length===0){return e.shadowRoot.querySelectorAll("ifx-sidebar-item")}return i}getSidebarMenuItem(){const e=this.el.shadowRoot.querySelector(".sidebar__nav-item");return e}toggleSubmenu(){if(this.isExpandable){const e=this.getSidebarMenuItem();const i=this.getExpandableMenu();this.handleClassList(i,"toggle","open");this.handleClassList(e,"toggle","open");this.handleEventEmission()}else{if(this.isActionItem){this.ifxSidebarActionItem.emit(this.el);return}else{this.handleActiveChange(true,this.internalActiveState);this.ifxSidebarNavigationItem.emit(this.el)}if(this.handleItemClick){this.handleItemClick(this.el)}}}handleExpandableMenu(e){const i=this.getExpandableMenu();e.forEach((e=>{const t=document.createElement("li");t.appendChild(e);i.appendChild(t)}))}parentElementIsSidebar(){const e=this.el.parentElement;if(e.tagName.toUpperCase()==="IFX-SIDEBAR"){return true}else return false}checkIfMenuItemIsNested(){const e=this.parentElementIsSidebar();if(e){this.isNested=false}}checkIfMenuItemIsSubMenu(){const e=this.el.parentElement;const i=this.getNavItem(e.shadowRoot);if(e.tagName.toUpperCase()==="IFX-SIDEBAR-ITEM"&&!this.handleClassList(i,"contains","header__section")){this.isSubMenuItem=true}else{this.isSubMenuItem=false}}isActive(e){const i=e.getAttribute("active");const t=i==="true";return t}getParentSection(e){let i=e.parentElement;while(i&&i.tagName.toUpperCase()!=="IFX-SIDEBAR"){if(i.tagName.toUpperCase()==="IFX-SIDEBAR-ITEM"){return i}i=i.parentElement}return null}handleBorderIndicatorDisplacement(e){const i=(e,t)=>{const s=this.isActive(e);if(s){const e=this.handleClassList(t,"contains","open");const i=this.getActiveItemSection();if(!e){this.handleClassList(i,"add","active-section")}else{this.handleClassList(i,"remove","active-section")}}const a=this.getSidebarMenuItems(e);a.forEach((e=>i(e,t)))};const t=this.getSidebarMenuItems();t.forEach((t=>i(t,e)))}setHref(){if(this.href.toLowerCase().trim()===""){this.internalHref=undefined}else this.internalHref=this.href}getActiveItemSection(){const e=this.parentElementIsSidebar();if(e){const e=this.getNavItem(this.el.shadowRoot);return e}else{const e=this.getNavItem(this.el.shadowRoot);return e}}async setActiveClasses(){const e=this.getNavItem(this.el.shadowRoot);this.handleClassList(e,"add","active")}async expandMenu(e){const i=this.getSidebarMenuItem();const t=this.getExpandableMenu();this.handleClassList(t,"add","open");this.handleClassList(i,"add","open");if(e){this.handleClassList(t,"remove","active-section");this.handleClassList(i,"remove","active-section")}}async isItemExpandable(){return this.isExpandable}handleActiveState(){if(this.internalActiveState){this.setActiveClasses()}}handleKeyDown(e){if(e.key==="Enter"){this.toggleSubmenu()}}componentDidLoad(){this.handleActiveState();if(this.isExpandable){const e=this.getSidebarMenuItems();this.handleExpandableMenu(e)}}componentWillLoad(){this.internalActiveState=this.active;this.checkIfMenuItemIsNested();this.checkIfMenuItemIsSubMenu();this.setHref();const e=this.getSidebarMenuItems();if(e.length!==0){this.isExpandable=true}else{this.isExpandable=false}}componentWillUpdate(){if(this.active&&!this.internalActiveState){this.internalActiveState=this.active;this.ifxSidebarNavigationItem.emit(this.el)}}render(){return t("div",{key:"7e0a398a47baab334837a55eb79cfd999c2fe99f"},t("a",{key:"d188e679861320c3c0d38e89dbc4bd503f120d24",tabIndex:1,onKeyDown:e=>this.handleKeyDown(e),href:this.internalHref,onClick:()=>this.toggleSubmenu(),target:this.target,class:`sidebar__nav-item ${!this.isNested&&this.isExpandable?"header__section":""} ${this.isSubMenuItem?"submenu__item":""}`},this.icon&&t("div",{key:"4098174f3c52fd51466d78f9d7816f358b6002ed",class:`sidebar__nav-item-icon-wrapper ${!this.showIcon?"noIcon":""}`},t("ifx-icon",{key:"2248af3dc70c08a46c874e14ee88724e6eefbcd1",icon:this.icon})),t("div",{key:"4e5ec198e85e975d38acb5b111f6d2d3892438d9",class:"sidebar__nav-item-label"},t("slot",{key:"9fc8c5a800d790b82c341d8fd78b822dcd90c1e0"})),(this.isExpandable||!isNaN(this.numberIndicator))&&t("div",{key:"870741b1ced893333e08cef620ac28bf19a6e8c0",class:"sidebar__nav-item-indicator"},this.isExpandable&&t("span",{key:"c08832e75d3ca68a891e4446b40f4b7cfbde30c6",class:"item__arrow-wrapper"},t("ifx-icon",{key:"a773892abff98167a8f452aab4ddbea6700521c9",icon:"chevron-down-16"})),!isNaN(this.numberIndicator)&&!this.isExpandable&&!this.isNested&&t("span",{key:"940f81e8d2cc81d792b72a76e5862b3df3a1803c",class:"item__number-indicator"},t("ifx-indicator",{key:"490c7c99c6fac419eceb233ade7e5d9a711d2fbf",variant:"number",number:this.numberIndicator})))),this.isExpandable&&t("ul",{key:"e810e46353df2fc6924e9d4e7e41690da7e1c72f",class:"expandable__submenu"}))}get el(){return s(this)}static get watchers(){return{active:["handleActiveChange"]}}};n.style=a;export{n as ifx_sidebar_item};
2
+ //# sourceMappingURL=p-4a828c58.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sidebarItemCss","SidebarItem","constructor","hostRef","this","icon","showIcon","showIconWrapper","href","internalHref","target","isExpandable","isNested","isSubMenuItem","active","isActionItem","internalActiveState","handleActiveChange","newValue","oldValue","labelElement","getNavItem","el","shadowRoot","handleClassList","handleConsoleError","event","detail","handleEventEmission","ifxSidebarMenu","emit","type","className","classList","contains","getExpandableMenu","expandableSubmenu","querySelector","getSidebarMenuItems","sidebarItems","querySelectorAll","length","getSidebarMenuItem","sidebarItem","toggleSubmenu","menuItem","expandableMenu","ifxSidebarActionItem","ifxSidebarNavigationItem","handleItemClick","handleExpandableMenu","sidebarExpandableMenu","forEach","li","document","createElement","appendChild","parentElementIsSidebar","parentElement","tagName","toUpperCase","checkIfMenuItemIsNested","parentIsSidebar","checkIfMenuItemIsSubMenu","navItem","isActive","iteratedComponent","activeAttributeValue","getAttribute","getParentSection","handleBorderIndicatorDisplacement","handleItem","item","isOpen","activeMenuItemSection","getActiveItemSection","children","child","topLevelItems","setHref","toLowerCase","trim","undefined","setActiveClasses","activeMenuItem","expandMenu","ac","isItemExpandable","handleActiveState","handleKeyDown","key","componentDidLoad","componentWillLoad","componentWillUpdate","render","h","tabIndex","onKeyDown","onClick","class","isNaN","numberIndicator","variant","number"],"sources":["src/components/navigation/sidebar/sidebar-item.scss?tag=ifx-sidebar-item&encapsulation=shadow","src/components/navigation/sidebar/sidebar-item.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../../global/font.scss\";\n\n:host {\n position: relative;\n}\n\n.sidebar__nav-item,\n.sidebar__nav-item.header__section {\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px tokens.$ifxColorBaseWhite, 0 0 0 4px tokens.$ifxColorOcean500;\n\n & .sidebar__nav-item-icon-wrapper {\n color: tokens.$ifxColorOcean600;\n }\n\n & .sidebar__nav-item-label {\n outline: none;\n color: tokens.$ifxColorOcean600;\n }\n\n & .sidebar__nav-item-indicator {\n & .item__arrow-wrapper {\n & ifx-icon {\n color: tokens.$ifxColorOcean600;\n }\n }\n }\n }\n\n &:hover {\n outline: none;\n\n & .sidebar__nav-item-icon-wrapper {\n color: tokens.$ifxColorOcean600;\n }\n\n & .sidebar__nav-item-label {\n outline: none;\n color: tokens.$ifxColorOcean600;\n }\n\n & .sidebar__nav-item-indicator {\n & .item__arrow-wrapper {\n & ifx-icon {\n color: tokens.$ifxColorOcean600;\n }\n }\n }\n }\n}\n\n.sidebar__nav-item {\n display: flex;\n flex-direction: row;\n align-items: center;\n width: 100%;\n padding: 8px 0px;\n gap: 4px;\n flex: none;\n order: 0;\n flex-grow: 0;\n text-decoration: none;\n color: tokens.$ifxColorBaseBlack;\n cursor: pointer;\n font-family: var(--ifx-font-family); // tokens.$ifxFontFamilyBody;\n\n\n\n &.extra-padding__bottom {\n padding: 8px 0px 16px 0px;\n }\n\n &.active {\n color: tokens.$ifxColorOcean500;\n }\n\n &.active-section {\n &::before {\n content: \"\";\n position: absolute;\n left: -32px;\n height: 40px;\n width: 2px;\n background: tokens.$ifxColorOcean500;\n }\n }\n\n\n &.open {\n padding: 8px 0px;\n\n & .sidebar__nav-item-label {\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 24px;\n }\n\n & .sidebar__nav-item-indicator {\n & .item__arrow-wrapper {\n & ifx-icon {\n transform: rotate(-180deg);\n }\n }\n }\n }\n\n &.header__section {\n box-sizing: padding-box;\n border-top: 1px solid tokens.$ifxColorEngineering200;\n padding: 16px 0px;\n display: -webkit-flex;\n -webkit-line-clamp: 1;\n -webkit-box-orient: horizontal;\n overflow: hidden;\n text-overflow: ellipsis;\n \n &.no-top-border {\n border-top: none;\n }\n\n &.active-section {\n &::before {\n content: \"\";\n position: absolute;\n left: -32px;\n height: 40px;\n width: 2px;\n background: tokens.$ifxColorOcean500;\n }\n }\n\n &.open {\n \n padding: 16px 0px 8px 0px;\n\n & .sidebar__nav-item-indicator {\n & .item__arrow-wrapper {\n & ifx-icon {\n transform: rotate(-180deg);\n }\n }\n }\n }\n\n & .sidebar__nav-item-label {\n color: tokens.$ifxColorBaseBlack;\n font-family: Source Sans 3;\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 24px;\n }\n }\n\n &.submenu__item {\n padding: 4px 0px;\n \n &.extra-padding__bottom {\n padding: 4px 0px 16px 0px;\n }\n }\n\n & .sidebar__nav-item-icon-wrapper {\n display: flex;\n width: tokens.$ifxSize300;\n height: tokens.$ifxSize300;\n justify-content: center;\n align-items: center;\n gap: tokens.$ifxSpace100;\n flex-shrink: 0;\n\n &.noIcon {\n display: none;\n }\n\n & ifx-icon {\n width: tokens.$ifxSize200;\n height: tokens.$ifxSize200;\n }\n }\n\n & .sidebar__nav-item-label {\n font-style: normal;\n font-weight: 400;\n font-size: tokens.$ifxFontSizeM;\n line-height: tokens.$ifxLineHeightM;\n display: flex;\n align-items: center;\n flex: none;\n order: 1;\n flex-grow: 1;\n cursor: pointer;\n }\n\n & .sidebar__nav-item-indicator {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n padding: 0px 4px;\n flex: none;\n order: 2;\n flex-grow: 0;\n }\n}\n\n.expandable__submenu {\n display: none;\n list-style-type: none;\n flex-direction: column;\n padding: 0;\n margin: 0;\n padding-left: 40px;\n\n &.open {\n display: flex;\n }\n}\n\n.header__section + .expandable__submenu{\n padding-left: 0;\n}\n","import { Component, h, Prop, Element, State, Listen, Watch, Event, EventEmitter, Method } from '@stencil/core';\n\n@Component({\n tag: 'ifx-sidebar-item',\n styleUrl: 'sidebar-item.scss',\n shadow: true\n})\nexport class SidebarItem {\n @Element() el;\n @Prop() icon: string = \"\"\n @State() showIcon: boolean = true;\n @State() showIconWrapper: boolean = false;\n @Prop() href: string = \"\";\n @State() internalHref: string = \"\";\n @Prop() target: string = \"_self\";\n @State() isExpandable: boolean = false;\n @State() isNested: boolean = true;\n @State() isSubMenuItem: boolean = false;\n @Prop() numberIndicator: number;\n @Prop() active: boolean = false; // set to true manually or by clicking on a navigation item\n @Prop() isActionItem: boolean = false; // if an item is an action item, it can not become active\n\n @State() internalActiveState: boolean = false;\n\n @Event({ bubbles: true, composed: true }) ifxSidebarMenu: EventEmitter;\n @Event({ bubbles: true, composed: true }) ifxSidebarNavigationItem: EventEmitter;\n @Event({ bubbles: true, composed: true }) ifxSidebarActionItem: EventEmitter;\n\n @Prop() handleItemClick: (item: HTMLElement) => void;\n\n\n @Watch('active')\n handleActiveChange(newValue: boolean, oldValue: boolean) {\n // If the item is an action item, ignore the active prop\n if (this.isActionItem) {\n this.internalActiveState = false;\n return;\n }\n this.internalActiveState = newValue;\n if (newValue !== oldValue) {\n let labelElement = this.getNavItem(this.el.shadowRoot)\n if (!this.isExpandable && !newValue) {\n this.handleClassList(labelElement, 'remove', 'active');\n }\n if (!this.isExpandable && newValue) {\n this.handleClassList(labelElement, 'add', 'active');\n }\n }\n }\n\n\n\n @Listen('consoleError')\n handleConsoleError(event: CustomEvent<boolean>) {\n if (event.detail) {\n this.showIcon = false;\n } else {\n this.showIcon = true;\n }\n }\n\n handleEventEmission() {\n // Get the active item section\n this.ifxSidebarMenu.emit(this.el)\n }\n\n handleClassList(el, type, className) {\n el.classList[type](className)\n if (type === 'contains') {\n return el.classList.contains(className)\n }\n }\n\n getExpandableMenu() {\n const expandableSubmenu = this.el.shadowRoot.querySelector('.expandable__submenu')\n return expandableSubmenu\n }\n\n getNavItem(el) {\n return el?.querySelector('.sidebar__nav-item')\n }\n\n\n\n getSidebarMenuItems(el = this.el) {\n const sidebarItems = el.querySelectorAll('ifx-sidebar-item');\n if (sidebarItems.length === 0) {\n return el.shadowRoot.querySelectorAll('ifx-sidebar-item');\n }\n return sidebarItems;\n }\n\n getSidebarMenuItem() {\n const sidebarItem = this.el.shadowRoot.querySelector('.sidebar__nav-item')\n return sidebarItem;\n }\n\n\n toggleSubmenu() {\n if (this.isExpandable) {\n const menuItem = this.getSidebarMenuItem();\n const expandableMenu = this.getExpandableMenu();\n this.handleClassList(expandableMenu, 'toggle', 'open');\n this.handleClassList(menuItem, 'toggle', 'open');\n // Emit an event with the current component\n this.handleEventEmission();\n } else {\n // If the sidebar item is not expandable, it's a leaf item without a submenu.\n // Emit an event to the parent `ifx-sidebar` component to notify it that a leaf item has been clicked.\n if (this.isActionItem) { //its an action item that eg opens an overlay etc and should not influence the active state of the item\n this.ifxSidebarActionItem.emit(this.el); // emit new event if isActionItem is true\n return;\n } else { //its a navigation item which becomes active after clicking it\n this.handleActiveChange(true, this.internalActiveState)\n this.ifxSidebarNavigationItem.emit(this.el);\n }\n // If the sidebar item is selectable (not expandable), then call the handler function with the current element.\n if (this.handleItemClick) {\n this.handleItemClick(this.el);\n }\n }\n // // Emit an event with the current component\n // this.handleEventEmission();\n }\n\n\n\n handleExpandableMenu(sidebarItems) {\n const sidebarExpandableMenu = this.getExpandableMenu();\n sidebarItems.forEach((el: HTMLElement) => {\n const li = document.createElement('li')\n li.appendChild(el)\n sidebarExpandableMenu.appendChild(li)\n })\n }\n\n parentElementIsSidebar() {\n const parentElement = this.el.parentElement;\n if (parentElement.tagName.toUpperCase() === 'IFX-SIDEBAR') {\n return true;\n } else return false;\n }\n\n checkIfMenuItemIsNested() {\n const parentIsSidebar = this.parentElementIsSidebar()\n if (parentIsSidebar) {\n this.isNested = false;\n }\n }\n\n checkIfMenuItemIsSubMenu() {\n const parentElement = this.el.parentElement;\n const navItem = this.getNavItem(parentElement.shadowRoot);\n if(parentElement.tagName.toUpperCase() === 'IFX-SIDEBAR-ITEM' && !this.handleClassList(navItem, 'contains', 'header__section')) {\n this.isSubMenuItem = true;\n }else {\n this.isSubMenuItem = false;\n }\n }\n\n isActive(iteratedComponent) {\n const activeAttributeValue = iteratedComponent.getAttribute('active');\n const isActive = activeAttributeValue === 'true';\n return isActive\n }\n\n getParentSection(el: HTMLElement) {\n let parentElement = el.parentElement;\n\n while (parentElement && parentElement.tagName.toUpperCase() !== 'IFX-SIDEBAR') {\n if (parentElement.tagName.toUpperCase() === 'IFX-SIDEBAR-ITEM') {\n return parentElement;\n }\n parentElement = parentElement.parentElement;\n }\n\n return null;\n }\n\n\n\n handleBorderIndicatorDisplacement(menuItem) {\n // Recursive function to handle each item\n const handleItem = (item, menuItem) => {\n const isActive = this.isActive(item);\n if (isActive) {\n const isOpen = this.handleClassList(menuItem, 'contains', 'open');\n const activeMenuItemSection = this.getActiveItemSection();\n if (!isOpen) {\n this.handleClassList(activeMenuItemSection, 'add', 'active-section');\n } else {\n this.handleClassList(activeMenuItemSection, 'remove', 'active-section');\n }\n }\n\n // Process each child item\n const children = this.getSidebarMenuItems(item);\n children.forEach((child) => handleItem(child, menuItem));\n }\n\n // Start with the top-level items\n const topLevelItems = this.getSidebarMenuItems();\n topLevelItems.forEach((item) => handleItem(item, menuItem));\n }\n\n\n setHref() {\n if (this.href.toLowerCase().trim() === \"\") {\n this.internalHref = undefined;\n } else this.internalHref = this.href;\n }\n\n getActiveItemSection() {\n const parentIsSidebar = this.parentElementIsSidebar()\n if (parentIsSidebar) {\n const labelElement = this.getNavItem(this.el.shadowRoot)\n return labelElement;\n } else {\n const labelElement = this.getNavItem(this.el.shadowRoot)\n return labelElement;\n }\n }\n\n @Method()\n async setActiveClasses() {\n const activeMenuItem = this.getNavItem(this.el.shadowRoot)\n this.handleClassList(activeMenuItem, 'add', 'active')\n }\n\n @Method()\n async expandMenu(ac: boolean){\n const menuItem = this.getSidebarMenuItem();\n const expandableMenu = this.getExpandableMenu();\n this.handleClassList(expandableMenu, 'add', 'open');\n this.handleClassList(menuItem, 'add', 'open');\n if(ac){\n this.handleClassList(expandableMenu, 'remove', 'active-section')\n this.handleClassList(menuItem, 'remove', 'active-section')\n }\n }\n \n @Method()\n async isItemExpandable(){\n return this.isExpandable;\n }\n\n handleActiveState() {\n if (this.internalActiveState) {\n this.setActiveClasses()\n }\n }\n\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter') {\n this.toggleSubmenu()\n }\n }\n\n componentDidLoad() {\n this.handleActiveState();\n if (this.isExpandable) {\n const sidebarItems = this.getSidebarMenuItems();\n this.handleExpandableMenu(sidebarItems)\n }\n }\n \n componentWillLoad() {\n this.internalActiveState = this.active;\n this.checkIfMenuItemIsNested();\n this.checkIfMenuItemIsSubMenu();\n this.setHref()\n const sidebarItems = this.getSidebarMenuItems();\n if (sidebarItems.length !== 0) {\n this.isExpandable = true;\n } else {\n this.isExpandable = false;\n }\n }\n\n componentWillUpdate() {\n // If the active prop has been set to true and the internalActiveState has not been set to true yet\n if (this.active && !this.internalActiveState) {\n // Set the internal active state to true\n this.internalActiveState = this.active;\n\n // Emit the event to notify the parent Sidebar\n this.ifxSidebarNavigationItem.emit(this.el);\n }\n }\n\n\n render() {\n return (\n <div>\n <a tabIndex={1} onKeyDown={(event) => this.handleKeyDown(event)} href={this.internalHref} onClick={() => this.toggleSubmenu()} target={this.target} class={`sidebar__nav-item ${!this.isNested && this.isExpandable ? 'header__section' : \"\"} ${this.isSubMenuItem ? 'submenu__item' : \"\"}`}>\n {this.icon &&\n <div class={`sidebar__nav-item-icon-wrapper ${!this.showIcon ? 'noIcon' : \"\"}`}>\n <ifx-icon icon={this.icon}></ifx-icon>\n </div>}\n <div class=\"sidebar__nav-item-label\">\n <slot />\n </div>\n {\n (this.isExpandable || !isNaN(this.numberIndicator)) &&\n <div class=\"sidebar__nav-item-indicator\">\n {this.isExpandable &&\n <span class='item__arrow-wrapper'>\n <ifx-icon icon=\"chevron-down-16\" />\n </span>\n }\n\n {!isNaN(this.numberIndicator) && !this.isExpandable && !this.isNested &&\n <span class='item__number-indicator'>\n <ifx-indicator variant='number' number={this.numberIndicator}></ifx-indicator>\n </span>}\n\n </div>\n }\n </a>\n {this.isExpandable && <ul class='expandable__submenu'></ul>}\n\n </div>\n );\n }\n}\n"],"mappings":"yDAAA,MAAMA,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AAKS,cAAgB,gBAAkB,MACpRT,KAAKC,MACJ0F,EAAA,OAAAL,IAAA,2CAAKS,MAAO,mCAAmC/F,KAAKE,SAAW,SAAW,MACxEyF,EAAA,YAAAL,IAAA,2CAAUrF,KAAMD,KAAKC,QAEzB0F,EAAK,OAAAL,IAAA,2CAAAS,MAAM,2BACTJ,EAAA,QAAAL,IAAA,+CAGDtF,KAAKO,eAAiByF,MAAMhG,KAAKiG,mBAChCN,EAAK,OAAAL,IAAA,2CAAAS,MAAM,+BACR/F,KAAKO,cACJoF,EAAM,QAAAL,IAAA,2CAAAS,MAAM,uBACVJ,EAAA,YAAAL,IAAA,2CAAUrF,KAAK,sBAIjB+F,MAAMhG,KAAKiG,mBAAqBjG,KAAKO,eAAiBP,KAAKQ,UAC3DmF,EAAM,QAAAL,IAAA,2CAAAS,MAAM,0BACVJ,EAAA,iBAAAL,IAAA,2CAAeY,QAAQ,SAASC,OAAQnG,KAAKiG,qBAMtDjG,KAAKO,cAAgBoF,EAAI,MAAAL,IAAA,2CAAAS,MAAM,wB","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as t,h as o,a as i}from"./p-DS8meZSd.js";import{d as e,t as s}from"./p-DcmcuUOA.js";import{i as a}from"./p-Bw2fh5LT.js";import{c as l}from"./p-BfP9ezJQ.js";const d=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:inline-flex}.tooltip__container{display:inline-flex;flex-direction:column;position:relative;font-family:var(--ifx-font-family)}.tooltip-extended,.tooltip-compact,.tooltip-dismissible{background-color:#1D1D1D;border:1px solid black;z-index:1080;display:none;transition:opacity 0.3s;position:absolute;font-size:14px;font-style:normal;font-weight:400;line-height:20px;color:#FFFFFF;width:max-content;box-sizing:border-box;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;}.visible.tooltip-extended,.visible.tooltip-compact,.visible.tooltip-dismissible{display:flex !important;align-items:start}.tooltip-dismissible .close-button{all:unset;cursor:pointer;position:relative;order:2;margin-top:12px;margin-right:12px;line-height:0px}.tooltip-dismissible .tooltip-dismissible-content{display:flex;flex-direction:column;gap:12px;padding:12px;flex-grow:1;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere}.tooltip-dismissible .tooltip-dismissible-header,.tooltip-dismissible .tooltip-dismissible-body{font-size:14px;font-style:normal;line-height:20px}.tooltip-dismissible .tooltip-dismissible-header{font-weight:600}.tooltip-dismissible .tooltip-dismissible-body{font-weight:400}.tooltip-compact{padding:4px 8px;text-align:center;flex-grow:1}.tooltip-extended{align-items:center;padding:12px;gap:10px}.tooltip-extended .extended_icon{display:flex;align-self:flex-start;align-items:center;cursor:pointer}.tooltip-extended .tooltip-extended-content{display:flex;flex-direction:column;gap:12px;flex-grow:1;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere}.tooltip-extended .tooltip-extended-header,.tooltip-extended .tooltip-extended-body{font-size:14px;font-style:normal;line-height:20px}.tooltip-extended .tooltip-extended-header{font-weight:600}.tooltip-extended .tooltip-extended-body{font-weight:400}.tooltip__container .tooltip-arrow-svg{position:absolute;width:8px;height:8px}[data-placement=top].tooltip-extended>.tooltip-arrow-svg,[data-placement=top].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=top].tooltip-compact>.tooltip-arrow-svg{bottom:-7px;left:50%;transform:rotate(180deg) translateX(-50%)}[data-placement=top-start].tooltip-extended>.tooltip-arrow-svg,[data-placement=top-start].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=top-start].tooltip-compact>.tooltip-arrow-svg{bottom:-7px;left:10px;transform:rotate(180deg)}[data-placement=top-end].tooltip-extended>.tooltip-arrow-svg,[data-placement=top-end].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=top-end].tooltip-compact>.tooltip-arrow-svg{bottom:-7px;right:10px;transform:rotate(180deg)}[data-placement=bottom].tooltip-extended>.tooltip-arrow-svg,[data-placement=bottom].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=bottom].tooltip-compact>.tooltip-arrow-svg{top:-7px;left:50%;transform:translateX(-50%)}[data-placement=bottom-start].tooltip-extended>.tooltip-arrow-svg,[data-placement=bottom-start].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=bottom-start].tooltip-compact>.tooltip-arrow-svg{top:-7px;left:10px}[data-placement=bottom-end].tooltip-extended>.tooltip-arrow-svg,[data-placement=bottom-end].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=bottom-end].tooltip-compact>.tooltip-arrow-svg{top:-7px;right:10px}[data-placement=left].tooltip-extended>.tooltip-arrow-svg,[data-placement=left].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=left].tooltip-compact>.tooltip-arrow-svg{right:-3px;top:50%;transform:rotate(90deg) translateY(-50%) translateX(-50%)}[data-placement=right].tooltip-extended>.tooltip-arrow-svg,[data-placement=right].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=right].tooltip-compact>.tooltip-arrow-svg{left:-3px;top:50%;transform:rotate(270deg) translateY(-50%) translateX(50%)}.tooltip-compact{min-width:28px !important;max-width:145px !important}.tooltip-dismissible{min-width:145px !important;max-width:310px !important}.tooltip-extended{min-width:145px !important;max-width:310px !important}';const p=class{constructor(o){t(this,o);this.tooltipVisible=false;this.header="";this.text="";this.position="auto";this.internalPosition="auto";this.variant="compact";this.popperInstance=null;this.onMouseEnter=()=>{var t,o;(t=this.popperInstance)===null||t===void 0?void 0:t.setOptions((t=>Object.assign(Object.assign({},t),{modifiers:[...t.modifiers,{name:"eventListeners",enabled:true}]})));this.initializePopper();this.tooltipVisible=true;this.tooltipEl.style.display="block";(o=this.popperInstance)===null||o===void 0?void 0:o.update()};this.onMouseLeave=()=>{this.tooltipVisible=false;this.tooltipEl.style.display="none"};this.onClick=()=>{var t;if(this.variant.toLowerCase()==="dismissible"){this.initializePopper();this.tooltipVisible=!this.tooltipVisible;this.tooltipEl.style.display=this.tooltipVisible?"block":"none";(t=this.popperInstance)===null||t===void 0?void 0:t.update()}};this.onDismissClick=()=>{this.tooltipVisible=false;this.tooltipEl.style.display="none"}}componentWillLoad(){if(this.variant.toLowerCase().trim()===""){this.variant="compact"}}async componentDidLoad(){if(!a(this.el)){const t=e();s("ifx-tooltip",await t)}const t=this.el.shadowRoot.querySelector(".tooltip__container").firstChild;if(this.variant.toLowerCase()==="compact"||this.variant.toLowerCase()==="extended"){t.addEventListener("mouseenter",this.onMouseEnter);t.addEventListener("mouseleave",this.onMouseLeave)}else{t.addEventListener("click",this.onClick)}}initializePopper(){if(this.popperInstance)return;this.referenceEl=this.el;if(this.variant.toLowerCase()==="compact"){this.tooltipEl=this.el.shadowRoot.querySelector(".tooltip-compact")}else if(this.variant.toLowerCase()==="dismissible"){this.tooltipEl=this.el.shadowRoot.querySelector(".tooltip-dismissible")}else{this.tooltipEl=this.el.shadowRoot.querySelector(".tooltip-extended")}const t=this.position==="auto"?this.determineBestPosition():this.position;this.internalPosition=t;if(this.tooltipEl&&this.referenceEl){this.popperInstance=l(this.referenceEl,this.tooltipEl,{placement:this.internalPosition,modifiers:[{name:"offset",options:{offset:[0,8]}},{name:"arrow",options:{element:".tooltip-arrow-svg"}}]})}this.tooltipEl.setAttribute("data-placement",t)}determineBestPosition(){const t=this.referenceEl.getBoundingClientRect();const o=window.scrollY;const i=window.scrollX;const e=t.top+o+t.height/2;const s=t.left+i+t.width/2;if(this.position==="auto"){if(e>window.innerHeight/2){if(s>window.innerWidth/2){return"top-end"}else{return"top-start"}}else{if(s>window.innerWidth/2){return"bottom-end"}else{return"bottom-start"}}}else{return this.position}}positionChanged(t){var o;this.internalPosition=t;(o=this.popperInstance)===null||o===void 0?void 0:o.destroy();this.popperInstance=null}disconnectedCallback(){var t;(t=this.popperInstance)===null||t===void 0?void 0:t.destroy()}render(){const t={"tooltip-dismissible":true,visible:this.tooltipVisible};const i={"tooltip-compact":true,visible:this.tooltipVisible};const e={"tooltip-extended":true,visible:this.tooltipVisible};return o("div",{key:"392a0dea33ce094c1c9edfa66bac570041c6faa8","aria-label":this.ariaLabel,"aria-value":this.header,class:"tooltip__container"},o("slot",{key:"060d3d893192da2f5c9e7da059a72ad24c3e96fb"}),this.variant.toLowerCase()==="dismissible"&&o("div",{key:"f692d7b1592c89f011d5ecedf33bddf9eb76fea7",class:t},o("button",{key:"ebb9ec532d359f6f3d7e27bce88d39a5bef0a02a","aria-label":"Close Tooltip",class:"close-button",onClick:this.onDismissClick},o("ifx-icon",{key:"5d6135b54703c7a9543913868033d20400c621d3",icon:"cross16"})),o("div",{key:"70a28bfc24bed55c221b2f63aabe22fe937cb9cb",class:"tooltip-dismissible-content"},this.header&&o("div",{key:"a84b24eaf5770c80953a2a3b9bc58d4a47971d23",class:"tooltip-dismissible-header"},this.header),o("div",{key:"5784c784d17950c0c656fd3b20b55d2c5439dfb4",class:"tooltip-dismissible-body"},this.text)),o("svg",{key:"4873d99641fc0d149f7a8670d60b137da4850ec6",class:"tooltip-arrow-svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{key:"fe2be9c1c3e054513a06279a93079ad27157c09f",id:"Indicator",d:"M6 0L12 8L0 8L6 0Z",fill:"#1D1D1D"}))),this.variant.toLowerCase()==="compact"&&o("div",{key:"8e01e6bce39dfe478415debfb61b2e9220b4d28e",class:i},this.text,o("svg",{key:"dab75581ded89658750d748b631a540c3f4f7646",class:"tooltip-arrow-svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{key:"a25a3ec98ba2a6c59183ae0220a004d2c903757e",id:"Indicator",d:"M6 0L12 8L0 8L6 0Z",fill:"#1D1D1D"}))),this.variant.toLowerCase()==="extended"&&o("div",{key:"09283c102e17de29a463565681bca1eb5a1a0cb3",class:e},o("slot",{key:"599a57702fbf73b7540eb59d3a7d2c1e82a63b06",name:"icon"},this.icon?o("div",{class:"extended_icon"},o("ifx-icon",{icon:this.icon})):o("svg",{class:"extended_icon",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},o("path",{stroke:"#fff","stroke-linecap":"round","stroke-linejoin":"round",d:"M20.5 2.5h-16a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-16a2 2 0 0 0-2-2Z"}),o("path",{stroke:"#fff",d:"M19 17H6l2.5-4 2.097 2.516.405.486.379-.506 4.118-5.49.003-.002L19 17Z"}),o("path",{fill:"#fff",d:"M10 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}))),o("div",{key:"b0e22b8bab61afc6150a3d2aa7d79d9744a0abf8",class:"tooltip-extended-content"},this.header&&o("div",{key:"e7b46d17bf65831f2875af89326d0a5774910192",class:"tooltip-extended-header"},this.header),o("div",{key:"e5123a74a9234baf5fb6b5f25026217ea066d6b2",class:"tooltip-extended-body"},this.text)),o("svg",{key:"321c1f9fca215417f9f68998fc0de65dc23c4a80",class:"tooltip-arrow-svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{key:"99062b9d90e6c7c109612eb3b59170694c150f62",id:"Indicator",d:"M6 0L12 8L0 8L6 0Z",fill:"#1D1D1D"}))))}get el(){return i(this)}static get watchers(){return{position:["positionChanged"]}}};p.style=d;export{p as ifx_tooltip};
2
- //# sourceMappingURL=p-733cc7f4.entry.js.map
1
+ import{r as t,h as o,a as i}from"./p-DS8meZSd.js";import{d as e,t as s}from"./p-DcmcuUOA.js";import{i as a}from"./p-Bw2fh5LT.js";import{c as l}from"./p-BfP9ezJQ.js";const d=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:inline-flex}.tooltip__container{display:inline-flex;flex-direction:column;position:relative;font-family:var(--ifx-font-family)}.tooltip-extended,.tooltip-compact,.tooltip-dismissible{background-color:#1D1D1D;border:1px solid black;z-index:1080;display:none;transition:opacity 0.3s;position:absolute;font-size:14px;font-style:normal;font-weight:400;line-height:20px;color:#FFFFFF;width:max-content;box-sizing:border-box;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;}.visible.tooltip-extended,.visible.tooltip-compact,.visible.tooltip-dismissible{display:flex !important;align-items:start}.tooltip-dismissible .close-button{all:unset;cursor:pointer;position:relative;order:2;margin-top:12px;margin-right:12px;line-height:0px}.tooltip-dismissible .tooltip-dismissible-content{display:flex;flex-direction:column;gap:12px;padding:12px;flex-grow:1;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere}.tooltip-dismissible .tooltip-dismissible-header,.tooltip-dismissible .tooltip-dismissible-body{font-size:14px;font-style:normal;line-height:20px}.tooltip-dismissible .tooltip-dismissible-header{font-weight:600}.tooltip-dismissible .tooltip-dismissible-body{font-weight:400}.tooltip-compact{padding:4px 8px;text-align:center;flex-grow:1}.tooltip-extended{align-items:center;padding:12px;gap:10px}.tooltip-extended .extended_icon{display:flex;align-self:flex-start;align-items:center;cursor:pointer}.tooltip-extended .tooltip-extended-content{display:flex;flex-direction:column;gap:12px;flex-grow:1;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere}.tooltip-extended .tooltip-extended-header,.tooltip-extended .tooltip-extended-body{font-size:14px;font-style:normal;line-height:20px}.tooltip-extended .tooltip-extended-header{font-weight:600}.tooltip-extended .tooltip-extended-body{font-weight:400}.tooltip__container .tooltip-arrow-svg{position:absolute;width:8px;height:8px}[data-placement=top].tooltip-extended>.tooltip-arrow-svg,[data-placement=top].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=top].tooltip-compact>.tooltip-arrow-svg{bottom:-7px;left:50%;transform:rotate(180deg) translateX(-50%)}[data-placement=top-start].tooltip-extended>.tooltip-arrow-svg,[data-placement=top-start].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=top-start].tooltip-compact>.tooltip-arrow-svg{bottom:-7px;left:10px;transform:rotate(180deg)}[data-placement=top-end].tooltip-extended>.tooltip-arrow-svg,[data-placement=top-end].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=top-end].tooltip-compact>.tooltip-arrow-svg{bottom:-7px;right:10px;transform:rotate(180deg)}[data-placement=bottom].tooltip-extended>.tooltip-arrow-svg,[data-placement=bottom].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=bottom].tooltip-compact>.tooltip-arrow-svg{top:-7px;left:50%;transform:translateX(-50%)}[data-placement=bottom-start].tooltip-extended>.tooltip-arrow-svg,[data-placement=bottom-start].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=bottom-start].tooltip-compact>.tooltip-arrow-svg{top:-7px;left:10px}[data-placement=bottom-end].tooltip-extended>.tooltip-arrow-svg,[data-placement=bottom-end].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=bottom-end].tooltip-compact>.tooltip-arrow-svg{top:-7px;right:10px}[data-placement=left].tooltip-extended>.tooltip-arrow-svg,[data-placement=left].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=left].tooltip-compact>.tooltip-arrow-svg{right:-3px;top:50%;transform:rotate(90deg) translateY(-50%) translateX(-50%)}[data-placement=right].tooltip-extended>.tooltip-arrow-svg,[data-placement=right].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=right].tooltip-compact>.tooltip-arrow-svg{left:-3px;top:50%;transform:rotate(270deg) translateY(-50%) translateX(50%)}.tooltip-compact{min-width:28px !important;max-width:145px !important}.tooltip-dismissible{min-width:145px !important;max-width:310px !important}.tooltip-extended{min-width:145px !important;max-width:310px !important}';const p=class{constructor(o){t(this,o);this.tooltipVisible=false;this.header="";this.text="";this.position="auto";this.internalPosition="auto";this.variant="compact";this.popperInstance=null;this.onMouseEnter=()=>{var t,o;(t=this.popperInstance)===null||t===void 0?void 0:t.setOptions((t=>Object.assign(Object.assign({},t),{modifiers:[...t.modifiers,{name:"eventListeners",enabled:true}]})));this.initializePopper();this.tooltipVisible=true;this.tooltipEl.style.display="block";(o=this.popperInstance)===null||o===void 0?void 0:o.update()};this.onMouseLeave=()=>{this.tooltipVisible=false;this.tooltipEl.style.display="none"};this.onClick=()=>{var t;if(this.variant.toLowerCase()==="dismissible"){this.initializePopper();this.tooltipVisible=!this.tooltipVisible;this.tooltipEl.style.display=this.tooltipVisible?"block":"none";(t=this.popperInstance)===null||t===void 0?void 0:t.update()}};this.onDismissClick=()=>{this.tooltipVisible=false;this.tooltipEl.style.display="none"}}componentWillLoad(){if(this.variant.toLowerCase().trim()===""){this.variant="compact"}}async componentDidLoad(){if(!a(this.el)){const t=e();s("ifx-tooltip",await t)}const t=this.el.shadowRoot.querySelector(".tooltip__container").firstChild;if(this.variant.toLowerCase()==="compact"||this.variant.toLowerCase()==="extended"){t.addEventListener("mouseenter",this.onMouseEnter);t.addEventListener("mouseleave",this.onMouseLeave)}else{t.addEventListener("click",this.onClick)}}initializePopper(){if(this.popperInstance)return;this.referenceEl=this.el;if(this.variant.toLowerCase()==="compact"){this.tooltipEl=this.el.shadowRoot.querySelector(".tooltip-compact")}else if(this.variant.toLowerCase()==="dismissible"){this.tooltipEl=this.el.shadowRoot.querySelector(".tooltip-dismissible")}else{this.tooltipEl=this.el.shadowRoot.querySelector(".tooltip-extended")}const t=this.position==="auto"?this.determineBestPosition():this.position;this.internalPosition=t;if(this.tooltipEl&&this.referenceEl){this.popperInstance=l(this.referenceEl,this.tooltipEl,{placement:this.internalPosition,modifiers:[{name:"offset",options:{offset:[0,8]}},{name:"arrow",options:{element:".tooltip-arrow-svg"}}]})}this.tooltipEl.setAttribute("data-placement",t)}determineBestPosition(){const t=this.referenceEl.getBoundingClientRect();const o=window.scrollY;const i=window.scrollX;const e=t.top+o+t.height/2;const s=t.left+i+t.width/2;if(this.position==="auto"){if(e>window.innerHeight/2){if(s>window.innerWidth/2){return"top-end"}else{return"top-start"}}else{if(s>window.innerWidth/2){return"bottom-end"}else{return"bottom-start"}}}else{return this.position}}positionChanged(t){var o;this.internalPosition=t;(o=this.popperInstance)===null||o===void 0?void 0:o.destroy();this.popperInstance=null}disconnectedCallback(){var t;(t=this.popperInstance)===null||t===void 0?void 0:t.destroy()}render(){const t={"tooltip-dismissible":true,visible:this.tooltipVisible};const i={"tooltip-compact":true,visible:this.tooltipVisible};const e={"tooltip-extended":true,visible:this.tooltipVisible};return o("div",{key:"5e5cc1fa5c9ec49849fa5f78c220a3d3afd5fa84","aria-label":"a tooltip showing important information","aria-value":this.header,class:"tooltip__container"},o("slot",{key:"c6486b1a9b2f4147a4b359669f77bc9678c44404"}),this.variant.toLowerCase()==="dismissible"&&o("div",{key:"663db61ef18dba05ecc87dc2d3404ccd5a423917",class:t},o("button",{key:"39d0d47ed02b8f49363cab4b6f366b6730888e2c","aria-label":"Close Tooltip",class:"close-button",onClick:this.onDismissClick},o("ifx-icon",{key:"653a22f87da21ada807da35347caf7e8aff6878e",icon:"cross16"})),o("div",{key:"35ee339b148fb0157d6a08df1ca38314c12dd636",class:"tooltip-dismissible-content"},this.header&&o("div",{key:"42bb380bce7839a4263e82b91f7f577716087277",class:"tooltip-dismissible-header"},this.header),o("div",{key:"e0436f7e5a65a0354a82338c34ab62d4e3656c0a",class:"tooltip-dismissible-body"},this.text)),o("svg",{key:"4867c44982b76a53e24e3efff7838e603cb28d27",class:"tooltip-arrow-svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{key:"ed9c304285de92d64444c4faf07f2f76582f2fe4",id:"Indicator",d:"M6 0L12 8L0 8L6 0Z",fill:"#1D1D1D"}))),this.variant.toLowerCase()==="compact"&&o("div",{key:"4bb8e1ca55e2ca3077615727f50c35de5a014957",class:i},this.text,o("svg",{key:"382a5bcae87e6652d57ac03e1bee26ae5494ce54",class:"tooltip-arrow-svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{key:"33ca23e4ed5dfc332e62d8f5a34b4f39c2e388e6",id:"Indicator",d:"M6 0L12 8L0 8L6 0Z",fill:"#1D1D1D"}))),this.variant.toLowerCase()==="extended"&&o("div",{key:"4553fe35ce9a37eab707eab180dbd04247a91f91",class:e},o("slot",{key:"bd11143759af71f7e045ecf7640cef44f6b6f338",name:"icon"},this.icon?o("div",{class:"extended_icon"},o("ifx-icon",{icon:this.icon})):o("svg",{class:"extended_icon",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},o("path",{stroke:"#fff","stroke-linecap":"round","stroke-linejoin":"round",d:"M20.5 2.5h-16a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-16a2 2 0 0 0-2-2Z"}),o("path",{stroke:"#fff",d:"M19 17H6l2.5-4 2.097 2.516.405.486.379-.506 4.118-5.49.003-.002L19 17Z"}),o("path",{fill:"#fff",d:"M10 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}))),o("div",{key:"46446e956bb9f1cbcaf86f6dafdfafda1f447a41",class:"tooltip-extended-content"},this.header&&o("div",{key:"0724a40073e23f359c2759ed9854242b357c2d2c",class:"tooltip-extended-header"},this.header),o("div",{key:"b54da3ac4901f19dd9ae9b88d6e79ff36cd16cb2",class:"tooltip-extended-body"},this.text)),o("svg",{key:"e0caa4063f3d5c5f0323843b20b9b8cbf4439c66",class:"tooltip-arrow-svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{key:"46c01df81886f71356204957edc651a3cbc0b27d",id:"Indicator",d:"M6 0L12 8L0 8L6 0Z",fill:"#1D1D1D"}))))}get el(){return i(this)}static get watchers(){return{position:["positionChanged"]}}};p.style=d;export{p as ifx_tooltip};
2
+ //# sourceMappingURL=p-4f221c15.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["tooltipCss","Tooltip","constructor","hostRef","this","tooltipVisible","header","text","position","internalPosition","variant","popperInstance","onMouseEnter","_a","setOptions","options","Object","assign","modifiers","name","enabled","initializePopper","tooltipEl","style","display","_b","update","onMouseLeave","onClick","toLowerCase","onDismissClick","componentWillLoad","trim","componentDidLoad","isNestedInIfxComponent","el","framework","detectFramework","trackComponent","slotElement","shadowRoot","querySelector","firstChild","addEventListener","referenceEl","effectivePosition","determineBestPosition","createPopper","placement","offset","element","setAttribute","rect","getBoundingClientRect","yOffset","window","scrollY","xOffset","scrollX","verticalHalfwayPoint","top","height","horizontalHalfwayPoint","left","width","innerHeight","innerWidth","positionChanged","newVal","destroy","disconnectedCallback","render","tooltipDismissible","visible","tooltipCompact","tooltipExtended","h","key","class","icon","viewBox","fill","xmlns","id","d","stroke"],"sources":["src/components/tooltip/tooltip.scss?tag=ifx-tooltip&encapsulation=shadow","src/components/tooltip/tooltip.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n:host {\n display: inline-flex;\n}\n\n.tooltip__container {\n display: inline-flex;\n flex-direction: column;\n position: relative;\n font-family: var(--ifx-font-family); // tokens.$ifxFontFamilyBody;\n\n\n\n}\n\n%tooltip-common {\n background-color: tokens.$ifxColorBaseBlack;\n border: 1px solid black;\n z-index: 1080;\n display: none;\n transition: opacity 0.3s;\n position: absolute;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n color: tokens.$ifxColorBaseWhite;\n width: max-content;\n box-sizing: border-box;\n\n white-space: pre-wrap; /* wraps text at spaces and within words */\n word-wrap: break-word; /* breaks text within a word if necessary */\n overflow-wrap: anywhere; /* breaks text at arbitrary points when needed */\n\n &.visible {\n display: flex !important;\n align-items: start;\n //min-width: 100px;\n //width: auto;\n }\n}\n\n\n\n.tooltip-dismissible {\n @extend %tooltip-common;\n\n .close-button {\n all: unset;\n //position: absolute;\n //top: tokens.$ifxSpace150;\n //right: tokens.$ifxSpace150;\n cursor: pointer;\n position: relative;\n order: 2;\n margin-top: 12px;\n margin-right: 12px;\n line-height: 0px;\n }\n\n .tooltip-dismissible-content {\n display: flex;\n flex-direction: column;\n gap: tokens.$ifxSpace150;\n padding: tokens.$ifxSpace150;\n flex-grow: 1;\n white-space: pre-wrap;\n word-wrap: break-word;\n overflow-wrap: anywhere;\n\n }\n\n .tooltip-dismissible-header,\n .tooltip-dismissible-body {\n font-size: 14px;\n font-style: normal;\n line-height: 20px;\n }\n\n .tooltip-dismissible-header {\n font-weight: tokens.$ifxFontWeightSemibold;\n }\n\n .tooltip-dismissible-body {\n font-weight: tokens.$ifxFontWeightRegular;\n }\n}\n\n.tooltip-compact {\n @extend %tooltip-common;\n padding: 4px 8px;\n text-align: center;\n flex-grow: 1;\n}\n\n\n.tooltip-extended {\n @extend %tooltip-common;\n //padding-left: 36px; // Added this line, adjust as per your icon width\n //padding-left: tokens.$ifxSpace150; // Added this line, adjust as per your icon width\n align-items: center;\n padding: tokens.$ifxSpace150;\n gap: 10px;\n\n .extended_icon {\n display: flex;\n align-self: flex-start;\n align-items: center;\n //padding-top: tokens.$ifxSpace150;\n cursor: pointer;\n }\n\n\n\n .tooltip-extended-content {\n display: flex;\n flex-direction: column;\n gap: tokens.$ifxSpace150;\n //padding: tokens.$ifxSpace150;\n flex-grow: 1;\n white-space: pre-wrap;\n word-wrap: break-word;\n overflow-wrap: anywhere;\n }\n\n .tooltip-extended-header,\n .tooltip-extended-body {\n font-size: 14px;\n font-style: normal;\n line-height: 20px;\n }\n\n .tooltip-extended-header {\n font-weight: tokens.$ifxFontWeightSemibold;\n }\n\n .tooltip-extended-body {\n font-weight: tokens.$ifxFontWeightRegular;\n }\n}\n\n\n.tooltip__container .tooltip-arrow-svg {\n position: absolute;\n width: 8px;\n height: 8px;\n}\n\n\n%tooltip-arrow-positions {\n\n // For 'top' placement\n &[data-placement=\"top\"]>.tooltip-arrow-svg {\n bottom: -7px;\n left: 50%;\n transform: rotate(180deg) translateX(-50%);\n }\n\n // For 'top-start' placement\n &[data-placement=\"top-start\"]>.tooltip-arrow-svg {\n bottom: -7px;\n left: 10px; // Adjust as needed\n transform: rotate(180deg)\n }\n\n // For 'top-end' placement\n &[data-placement=\"top-end\"]>.tooltip-arrow-svg {\n bottom: -7px;\n right: 10px; // Adjust as needed\n transform: rotate(180deg);\n }\n\n // For 'bottom' placement\n &[data-placement=\"bottom\"]>.tooltip-arrow-svg {\n top: -7px;\n left: 50%;\n transform: translateX(-50%);\n }\n\n // For 'bottom-start' placement\n &[data-placement=\"bottom-start\"]>.tooltip-arrow-svg {\n top: -7px;\n left: 10px; // Adjust as needed\n }\n\n // For 'bottom-end' placement\n &[data-placement=\"bottom-end\"]>.tooltip-arrow-svg {\n top: -7px;\n right: 10px; // Adjust as needed\n }\n\n // For 'left' placement\n &[data-placement=\"left\"]>.tooltip-arrow-svg {\n right: -3px;\n top: 50%;\n transform: rotate(90deg) translateY(-50%) translateX(-50%);\n }\n\n // For 'right' placement\n &[data-placement=\"right\"]>.tooltip-arrow-svg {\n left: -3px;\n top: 50%;\n transform: rotate(270deg) translateY(-50%) translateX(50%);\n }\n}\n\n\n.tooltip-compact {\n @extend %tooltip-arrow-positions;\n min-width: 28px !important;\n max-width: 145px !important;\n}\n\n.tooltip-dismissible {\n @extend %tooltip-arrow-positions;\n min-width: 145px !important;\n max-width: 310px !important;\n}\n\n.tooltip-extended {\n @extend %tooltip-arrow-positions;\n min-width: 145px !important;\n max-width: 310px !important;\n}\n","import { Component, Prop, h, Element, State, Watch } from '@stencil/core';\nimport { createPopper } from '@popperjs/core';\nimport { trackComponent } from '../../global/utils/tracking';\nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\n\n@Component({\n tag: 'ifx-tooltip',\n styleUrl: 'tooltip.scss',\n shadow: true\n})\nexport class Tooltip {\n\n @Element() el: HTMLElement;\n @State() tooltipVisible: boolean = false;\n @Prop() header: string = '';\n @Prop() text: string = '';\n @Prop() position: 'bottom-start' | 'top-start' | 'left' | 'bottom-end' | 'top-end' | 'right' | 'bottom' | 'top' | 'auto' = 'auto';\n @State() internalPosition: 'bottom-start' | 'top-start' | 'left' | 'bottom-end' | 'top-end' | 'right' | 'bottom' | 'top' | 'auto' = 'auto';\n\n @Prop() variant: 'compact' | 'dismissible' | 'extended' = 'compact';\n @Prop() icon: string;\n\n tooltipEl: HTMLElement;\n referenceEl: HTMLElement;\n popperInstance: any = null;\n\n\n componentWillLoad() { \n if(this.variant.toLowerCase().trim() === \"\") { \n this.variant = 'compact'\n }\n }\n \n async componentDidLoad() {\n if(!isNestedInIfxComponent(this.el)) { \n const framework = detectFramework();\n trackComponent('ifx-tooltip', await framework)\n }\n const slotElement = this.el.shadowRoot.querySelector('.tooltip__container').firstChild;\n \n if(this.variant.toLowerCase() === 'compact' || this.variant.toLowerCase() === 'extended') {\n slotElement.addEventListener('mouseenter', this.onMouseEnter)\n slotElement.addEventListener('mouseleave', this.onMouseLeave)\n }else{\n slotElement.addEventListener('click', this.onClick);\n }\n\n }\n\n initializePopper() {\n if (this.popperInstance) return;\n\n this.referenceEl = this.el;\n this.tooltipEl;\n if (this.variant.toLowerCase() === 'compact') {\n this.tooltipEl = this.el.shadowRoot.querySelector('.tooltip-compact');\n }\n else if (this.variant.toLowerCase() === 'dismissible') {\n this.tooltipEl = this.el.shadowRoot.querySelector('.tooltip-dismissible');\n }\n else {\n this.tooltipEl = this.el.shadowRoot.querySelector('.tooltip-extended');\n\n }\n\n const effectivePosition = this.position === 'auto' ? this.determineBestPosition() : this.position;\n\n // Set the internalPosition\n this.internalPosition = effectivePosition;\n\n if (this.tooltipEl && this.referenceEl) {\n\n this.popperInstance = createPopper(this.referenceEl, this.tooltipEl, {\n placement: this.internalPosition,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, 8] // this offset should be adjusted to ensure the tooltip doesn't overlap its reference element\n }\n },\n {\n name: 'arrow',\n options: {\n element: '.tooltip-arrow-svg'\n }\n }\n ]\n });\n\n }\n\n // Add this line to set the 'data-placement' attribute on the tooltip\n this.tooltipEl.setAttribute('data-placement', effectivePosition);\n\n\n }\n\n determineBestPosition() {\n // This is a simplified version, you can enhance this based on available viewport space.\n const rect = this.referenceEl.getBoundingClientRect();\n const yOffset = window.scrollY; // Get current scroll position\n const xOffset = window.scrollX; // Get current horizontal scroll position\n\n const verticalHalfwayPoint = rect.top + yOffset + rect.height / 2;\n const horizontalHalfwayPoint = rect.left + xOffset + rect.width / 2;\n\n if (this.position === 'auto') {\n if (verticalHalfwayPoint > window.innerHeight / 2) {\n if (horizontalHalfwayPoint > window.innerWidth / 2) {\n return 'top-end';\n } else {\n return 'top-start';\n }\n } else {\n if (horizontalHalfwayPoint > window.innerWidth / 2) {\n return 'bottom-end';\n } else {\n return 'bottom-start';\n }\n }\n } else {\n return this.position;\n }\n }\n\n @Watch('position')\n positionChanged(newVal: any) {\n this.internalPosition = newVal;\n this.popperInstance?.destroy();\n this.popperInstance = null; // Force re-initialization on next mouse enter\n }\n\n\n\n onMouseEnter = () => {\n // Enable the event listeners immediately\n this.popperInstance?.setOptions((options) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // Initialize the popper instance\n this.initializePopper();\n\n // Make the tooltip visible\n this.tooltipVisible = true;\n this.tooltipEl.style.display = 'block';\n\n // Update the popper instance immediately after initialization\n this.popperInstance?.update();\n }\n\n\n onMouseLeave = () => {\n this.tooltipVisible = false;\n this.tooltipEl.style.display = 'none';\n\n }\n\n disconnectedCallback() {\n this.popperInstance?.destroy();\n }\n\n onClick = () => {\n if (this.variant.toLowerCase() === 'dismissible') {\n this.initializePopper();\n this.tooltipVisible = !this.tooltipVisible;\n this.tooltipEl.style.display = this.tooltipVisible ? 'block' : 'none';\n this.popperInstance?.update();\n }\n }\n\n onDismissClick = () => {\n this.tooltipVisible = false;\n this.tooltipEl.style.display = 'none';\n }\n\n render() {\n const tooltipDismissible = {\n 'tooltip-dismissible': true,\n 'visible': this.tooltipVisible,\n };\n\n const tooltipCompact = {\n 'tooltip-compact': true,\n 'visible': this.tooltipVisible,\n };\n\n const tooltipExtended = {\n 'tooltip-extended': true,\n 'visible': this.tooltipVisible,\n };\n\n return (\n <div aria-label=\"a tooltip showing important information\" aria-value={this.header} class=\"tooltip__container\" >\n <slot></slot>\n\n {this.variant.toLowerCase() === 'dismissible' && <div class={tooltipDismissible}>\n <button aria-label=\"Close Tooltip\" class=\"close-button\" onClick={this.onDismissClick}>\n <ifx-icon icon=\"cross16\"></ifx-icon>\n </button>\n <div class=\"tooltip-dismissible-content\">\n {this.header && <div class=\"tooltip-dismissible-header\">{this.header}</div>}\n <div class=\"tooltip-dismissible-body\">{this.text}</div>\n </div>\n <svg class=\"tooltip-arrow-svg\" width=\"12\" height=\"8\" viewBox=\"0 0 12 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path id=\"Indicator\" d=\"M6 0L12 8L0 8L6 0Z\" fill=\"#1D1D1D\" />\n </svg>\n </div>\n }\n {this.variant.toLowerCase() === 'compact' &&\n <div class={tooltipCompact}>\n {this.text}\n <svg class=\"tooltip-arrow-svg\" width=\"12\" height=\"8\" viewBox=\"0 0 12 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path id=\"Indicator\" d=\"M6 0L12 8L0 8L6 0Z\" fill=\"#1D1D1D\" />\n </svg>\n </div>\n }\n {this.variant.toLowerCase() === 'extended' &&\n <div class={tooltipExtended}>\n <slot name=\"icon\">\n {this.icon ? <div class=\"extended_icon\"><ifx-icon icon={this.icon}></ifx-icon></div> :\n <svg class=\"extended_icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"none\" viewBox=\"0 0 24 24\">\n <path stroke=\"#fff\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M20.5 2.5h-16a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-16a2 2 0 0 0-2-2Z\" />\n <path stroke=\"#fff\" d=\"M19 17H6l2.5-4 2.097 2.516.405.486.379-.506 4.118-5.49.003-.002L19 17Z\" />\n <path fill=\"#fff\" d=\"M10 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z\" />\n </svg>\n }\n </slot>\n <div class=\"tooltip-extended-content\">\n {this.header && <div class=\"tooltip-extended-header\">{this.header}</div>}\n <div class=\"tooltip-extended-body\">{this.text}</div>\n </div>\n <svg class=\"tooltip-arrow-svg\" width=\"12\" height=\"8\" viewBox=\"0 0 12 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path id=\"Indicator\" d=\"M6 0L12 8L0 8L6 0Z\" fill=\"#1D1D1D\" />\n </svg>\n </div >\n }\n </div>\n );\n }\n\n\n}"],"mappings":"qKAAA,MAAMA,EAAa,w/H,MCWNC,EAAO,MALpB,WAAAC,CAAAC,G,UAQWC,KAAcC,eAAY,MAC3BD,KAAME,OAAW,GACjBF,KAAIG,KAAW,GACfH,KAAQI,SAA2G,OAClHJ,KAAgBK,iBAA2G,OAE5HL,KAAOM,QAA2C,UAK1DN,KAAcO,eAAQ,KA+GtBP,KAAYQ,aAAG,K,SAEbC,EAAAT,KAAKO,kBAAc,MAAAE,SAAA,SAAAA,EAAEC,YAAYC,GAAYC,OAAAC,OAAAD,OAAAC,OAAA,GACxCF,GAAO,CACVG,UAAW,IACNH,EAAQG,UACX,CAAEC,KAAM,iBAAkBC,QAAS,WAKvChB,KAAKiB,mBAGLjB,KAAKC,eAAiB,KACtBD,KAAKkB,UAAUC,MAAMC,QAAU,SAG/BC,EAAArB,KAAKO,kBAAgB,MAAAc,SAAA,SAAAA,EAAAC,QAAQ,EAI/BtB,KAAYuB,aAAG,KACbvB,KAAKC,eAAiB,MACtBD,KAAKkB,UAAUC,MAAMC,QAAU,MAAM,EAQvCpB,KAAOwB,QAAG,K,MACR,GAAIxB,KAAKM,QAAQmB,gBAAkB,cAAe,CAChDzB,KAAKiB,mBACLjB,KAAKC,gBAAkBD,KAAKC,eAC5BD,KAAKkB,UAAUC,MAAMC,QAAUpB,KAAKC,eAAiB,QAAU,QAC/DQ,EAAAT,KAAKO,kBAAgB,MAAAE,SAAA,SAAAA,EAAAa,Q,GAIzBtB,KAAc0B,eAAG,KACf1B,KAAKC,eAAiB,MACtBD,KAAKkB,UAA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AAK,OAAAC,IAAA,2CAAAC,MAAM,oBAAoBd,MAAM,KAAKH,OAAO,IAAImB,QAAQ,WAAWC,KAAK,OAAOC,MAAM,8BACxFN,EAAA,QAAAC,IAAA,2CAAMM,GAAG,YAAYC,EAAE,qBAAqBH,KAAK,c","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as t,h as i,a as o}from"./p-DS8meZSd.js";import{d as r,t as e}from"./p-DcmcuUOA.js";import{i as n}from"./p-Bw2fh5LT.js";const a=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}.radio-button-group-container{display:flex;flex-direction:column}.radio-button-group{display:flex;font-family:var(--ifx-font-family);gap:8px}.radio-button-group.horizontal{flex-direction:row;column-gap:12px}.radio-button-group.vertical{flex-direction:column;row-gap:12px}.group-label{font:400 0.75rem/1rem "Source Sans 3";margin-bottom:8px;text-align:left;text-underline-position:from-font;text-decoration-skip-ink:none}.caption{margin-top:8px;align-self:flex-start;display:flex;width:100%;column-gap:8px;justify-content:space-between;align-items:center}.caption.default{color:#1D1D1D}.caption.error{color:#CD002F}.caption-text{font:400 0.75rem/1rem "Source Sans 3";flex:1;text-align:left;text-underline-position:from-font;text-decoration-skip-ink:none}.caption-icon{flex:0;display:flex}';const s=class{constructor(i){t(this,i);this.errorStates=new Map;this.alignment="vertical";this.groupLabelText="Group Label Text";this.hasErrors=false;this.handleSlotChange=()=>{this.initializeState()}}handleRadioButtonError(t){const i=t.target;if(i.tagName==="ifx-radio-button"){this.errorStates.set(i,t.detail);this.updateHasErrors()}}async setGroupError(t){const i=Array.from(this.el.querySelectorAll("ifx-radio-button"));i.forEach((i=>{i.error=t}))}componentWillLoad(){this.initializeState()}async componentDidLoad(){if(!n(this.el)){const t=r();e("ifx-radio-button-group",await t)}}initializeState(){this.errorStates.clear();const t=Array.from(this.el.querySelectorAll("ifx-radio-button"));t.forEach((t=>{if(!this.errorStates.has(t)){this.errorStates.set(t,t.error||false)}}));this.updateHasErrors()}updateHasErrors(){this.hasErrors=Array.from(this.errorStates.values()).some((t=>t))}render(){return i("div",{key:"110dd90eedde21f29a02bf7844c046cc1b5de641",class:"radio-button-group-container"},this.showGroupLabel?i("div",{class:"group-label"},this.groupLabelText," *"):"",i("div",{key:"891bd69906ffeefeb2641e72f4d468c100f43b90",class:`radio-button-group ${this.alignment} ${this.size}`},i("slot",{key:"32b754f9b0b47fb53bdaeb825740114b7b6fe737",onSlotchange:this.handleSlotChange})),this.showCaption?i("div",{class:`caption ${this.hasErrors?"error":"default"}`},this.showCaptionIcon?i("div",{class:"caption-icon"},i("ifx-icon",{icon:"c-info-16"})):"",i("div",{class:"caption-text"},this.captionText)):"")}static get formAssociated(){return true}get el(){return o(this)}};s.style=a;export{s as ifx_radio_button_group};
2
- //# sourceMappingURL=p-47388e22.entry.js.map
1
+ import{r as t,h as i,a as o}from"./p-DS8meZSd.js";import{d as a,t as r}from"./p-DcmcuUOA.js";import{i as n}from"./p-Bw2fh5LT.js";const e=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}.radio-button-group-container{display:flex;flex-direction:column}.radio-button-group{display:flex;font-family:var(--ifx-font-family);gap:8px}.radio-button-group.horizontal{flex-direction:row;column-gap:12px}.radio-button-group.vertical{flex-direction:column;row-gap:12px}.group-label{font:400 0.75rem/1rem "Source Sans 3";margin-bottom:8px;text-align:left;text-underline-position:from-font;text-decoration-skip-ink:none}.caption{margin-top:8px;align-self:flex-start;display:flex;width:100%;column-gap:8px;justify-content:space-between;align-items:center}.caption.default{color:#1D1D1D}.caption.error{color:#CD002F}.caption-text{font:400 0.75rem/1rem "Source Sans 3";flex:1;text-align:left;text-underline-position:from-font;text-decoration-skip-ink:none}.caption-icon{flex:0;display:flex}';const s=class{constructor(i){t(this,i);this.errorStates=new Map;this.alignment="vertical";this.groupLabelText="Group Label Text";this.hasErrors=false;this.handleSlotChange=()=>{this.initializeState()}}handleRadioButtonError(t){const i=t.target;if(i.tagName==="ifx-radio-button"){this.errorStates.set(i,t.detail);this.updateHasErrors()}}async setGroupError(t){const i=Array.from(this.el.querySelectorAll("ifx-radio-button"));i.forEach((i=>{i.error=t}))}componentWillLoad(){this.initializeState()}async componentDidLoad(){if(!n(this.el)){const t=a();r("ifx-radio-button-group",await t)}}initializeState(){this.errorStates.clear();const t=Array.from(this.el.querySelectorAll("ifx-radio-button"));t.forEach((t=>{if(!this.errorStates.has(t)){this.errorStates.set(t,t.error||false)}}));this.updateHasErrors()}updateHasErrors(){this.hasErrors=Array.from(this.errorStates.values()).some((t=>t))}render(){return i("div",{key:"5970ee5b26caf63ffa5b33705dd88f9970826782",class:"radio-button-group-container"},this.showGroupLabel?i("div",{class:"group-label"},this.groupLabelText," *"):"",i("div",{key:"5a166fe359c07d1e19752a7565f82389378602c4",class:`radio-button-group ${this.alignment} ${this.size}`},i("slot",{key:"8fa966493211e16fbcdab377488d8fb0fd90502b",onSlotchange:this.handleSlotChange})),this.showCaption?i("div",{class:`caption ${this.hasErrors?"error":"default"}`},this.showCaptionIcon?i("div",{class:"caption-icon"},i("ifx-icon",{icon:"c-info-16"})):"",i("div",{class:"caption-text"},this.captionText)):"")}static get formAssociated(){return true}get el(){return o(this)}};s.style=e;export{s as ifx_radio_button_group};
2
+ //# sourceMappingURL=p-52cf847f.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as a,c as e,h as r,a as s}from"./p-DS8meZSd.js";import{d as i,t}from"./p-DcmcuUOA.js";import{i as h}from"./p-Bw2fh5LT.js";const o=':root{--ifx-font-family:"Source Sans 3", "Arial, 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 a:focus{outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #0A8276}.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 c=class{constructor(r){a(this,r);this.ifxInput=e(this,"ifxInput",7);this.ifxOpen=e(this,"ifxOpen",7);this.isOpen=true;this.disabled=false;this.autocomplete="on";this.handleCloseButton=()=>{this.internalState=!this.internalState;this.ifxOpen.emit(this.internalState)};this.handleFocus=()=>{this.internalState=true}}async onNavbarMobile(){this.ifxOpen.emit(false);this.internalState=false}handlePropChange(){this.internalState=this.isOpen}setInitialState(){this.internalState=this.isOpen}componentWillLoad(){this.setInitialState();this.ifxOpen.emit(this.internalState)}async componentDidLoad(){if(!h(this.el)){const a=i();t("ifx-search-bar",await a)}}handleInput(a){this.value=a.detail}render(){return r("div",{key:"09974ec9adab8f6dfa54364c8ba4665574cdebe9",role:"search","aria-label":"a search field for user input","aria-value":this.value,"aria-disabled":this.disabled,class:`search-bar ${this.internalState?"open":"closed"}`},this.internalState?r("div",{class:"search-bar-wrapper"},r("ifx-search-field",{autocomplete:this.autocomplete,disabled:this.disabled,value:this.value,maxlength:this.maxlength,onIfxInput:this.handleInput.bind(this)},r("ifx-icon",{icon:"search-16",slot:"search-icon"})),r("a",{"aria-label":"Close button",href:"javascript:void(0)",onClick:this.handleCloseButton},"Close")):r("div",{class:"search-bar_icon-wrapper",onClick:this.handleCloseButton},r("ifx-icon",{icon:"search-16"})))}get el(){return s(this)}static get watchers(){return{isOpen:["handlePropChange"]}}};c.style=o;export{c as ifx_search_bar};
2
- //# sourceMappingURL=p-50cd0c8a.entry.js.map
1
+ import{r as a,c as e,h as r,a as s}from"./p-DS8meZSd.js";import{d as i,t}from"./p-DcmcuUOA.js";import{i as h}from"./p-Bw2fh5LT.js";const o=':root{--ifx-font-family:"Source Sans 3", "Arial, 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 a:focus{outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #0A8276}.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 c=class{constructor(r){a(this,r);this.ifxInput=e(this,"ifxInput",7);this.ifxOpen=e(this,"ifxOpen",7);this.isOpen=true;this.disabled=false;this.autocomplete="on";this.handleCloseButton=()=>{this.internalState=!this.internalState;this.ifxOpen.emit(this.internalState)};this.handleFocus=()=>{this.internalState=true}}async onNavbarMobile(){this.ifxOpen.emit(false);this.internalState=false}handlePropChange(){this.internalState=this.isOpen}setInitialState(){this.internalState=this.isOpen}componentWillLoad(){this.setInitialState();this.ifxOpen.emit(this.internalState)}async componentDidLoad(){if(!h(this.el)){const a=i();t("ifx-search-bar",await a)}}handleInput(a){this.value=a.detail}render(){return r("div",{key:"0e6a3ebaf25533324d81eaab8147ecd44decda64",role:"search","aria-label":"a search field for user input","aria-value":this.value,"aria-disabled":this.disabled,class:`search-bar ${this.internalState?"open":"closed"}`},this.internalState?r("div",{class:"search-bar-wrapper"},r("ifx-search-field",{autocomplete:this.autocomplete,disabled:this.disabled,value:this.value,maxlength:this.maxlength,onIfxInput:this.handleInput.bind(this)},r("ifx-icon",{icon:"search-16",slot:"search-icon"})),r("a",{"aria-label":"Close button",href:"javascript:void(0)",onClick:this.handleCloseButton},"Close")):r("div",{class:"search-bar_icon-wrapper",onClick:this.handleCloseButton},r("ifx-icon",{icon:"search-16"})))}get el(){return s(this)}static get watchers(){return{isOpen:["handlePropChange"]}}};c.style=o;export{c as ifx_search_bar};
2
+ //# sourceMappingURL=p-546ed89f.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as s,h as e,a as i}from"./p-DS8meZSd.js";const a=".list-entry{display:flex;align-items:center;margin-top:8px;align-self:stretch}";const r=class{constructor(e){t(this,e);this.ifxListEntryChange=s(this,"ifxListEntryChange",7)}valueChanged(t){if(t){this.host.setAttribute("value","true")}else{this.host.removeAttribute("value")}}handleFilterEntryChange(t){this.value=t.detail;this.ifxListEntryChange.emit({label:this.label,value:this.value,type:this.type})}render(){return e("div",{key:"a78a3927f090f95f0e4a75a6f2c44200b91370a2",class:"wrapper"},this.type==="checkbox"?e("div",{class:"list-entry"},e("ifx-checkbox",{size:"s",checked:this.value},this.label)):e("div",{class:"list-entry"},e("ifx-radio-button",{size:"s",checked:this.value},this.label)))}get host(){return i(this)}static get watchers(){return{value:["valueChanged"]}}};r.style=a;export{r as ifx_list_entry};
2
- //# sourceMappingURL=p-ef8fabdf.entry.js.map
1
+ import{r as t,c as s,h as e,a as i}from"./p-DS8meZSd.js";const a=".list-entry{display:flex;align-items:center;margin-top:8px;align-self:stretch}";const r=class{constructor(e){t(this,e);this.ifxListEntryChange=s(this,"ifxListEntryChange",7)}valueChanged(t){if(t){this.host.setAttribute("value","true")}else{this.host.removeAttribute("value")}}handleFilterEntryChange(t){this.value=t.detail;this.ifxListEntryChange.emit({label:this.label,value:this.value,type:this.type})}render(){return e("div",{key:"191c0d0d1578948c343a9bfd6ac5843b7643209b",class:"wrapper"},this.type==="checkbox"?e("div",{class:"list-entry"},e("ifx-checkbox",{size:"s",checked:this.value},this.label)):e("div",{class:"list-entry"},e("ifx-radio-button",{size:"s",checked:this.value},this.label)))}get host(){return i(this)}static get watchers(){return{value:["valueChanged"]}}};r.style=a;export{r as ifx_list_entry};
2
+ //# sourceMappingURL=p-582ec002.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{r as e,c as t,h as s,a as i}from"./p-DS8meZSd.js";import{d as a,t as o}from"./p-DcmcuUOA.js";import{i as c}from"./p-Bw2fh5LT.js";const n=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}.group{display:flex;flex-direction:column;justify-content:space-between;gap:12px}.group__label{font:400 0.75rem/1rem "Source Sans 3"}.group__label:empty{display:none}.group__controls{display:flex;flex-wrap:wrap}.group__controls ::slotted(*){margin-left:-1px;margin-top:-1px}.group__caption{display:flex;align-items:center;gap:8px;font:400 0.75rem/1rem "Source Sans 3"}';const r=class{constructor(s){e(this,s);this.ifxChange=t(this,"ifxChange",7);this.caption="";this.label="";this.size="regular";this.selectedValue=""}onSegmentSelect(e){const{previousValue:t,selectedValue:s}=this.unselectPreviousSegment(e.detail);this.selectedValue=s;this.ifxChange.emit({previousValue:t,selectedValue:s})}unselectPreviousSegment(e){let t;let s;const i=this.getSegments();i.forEach((i=>{if(i.selected){if(i.segmentIndex!==e){i.selected=false;t=i.value}else{s=i.value}}}));return{previousValue:t,selectedValue:s}}getSegments(){return this.SegmentedControl.querySelectorAll("ifx-segment")}setActiveSegment(){const e=this.getSegments();let t=false;e.forEach(((e,s)=>{e.segmentIndex=s;if(t){if(e.selected)e.selected=false}else{if(e.selected){t=true;this.selectedValue=e.value}}}))}setSegmentSize(){const e=this.getSegments();e.forEach((e=>{e.shadowRoot.querySelector(".segment").classList.add(`segment--${this.size}`)}))}async componentDidLoad(){if(!c(this.SegmentedControl)){const e=a();o("ifx-segmented-control",await e)}this.setActiveSegment()}render(){return s("div",{key:"736ba9f070e0e476d6818b4803b870ca932273c3","aria-value":this.selectedValue,"aria-label":"segmented control",class:"group"},s("div",{key:"c1615f5fd6b1569cef19cd627955f9e0180e6e59",class:"group__label"},this.label.trim()),s("div",{key:"0c9ffc3a3c1fcb515cc9d5731ea7e1d61af03cbe",class:"group__controls"},s("slot",{key:"6abcc914da42eb8b400aa3bde6b6d7bbd8cfe6c0"})),this.caption.trim()&&s("div",{key:"e7a38c546402e9403d9692d700fffc425a453bcc",class:"group__caption"},s("ifx-icon",{key:"e64b062c4a53e402c58cadf77462fc606e737eb3",icon:"c-info-16"})," ",this.caption.trim()))}componentDidRender(){this.setSegmentSize()}get SegmentedControl(){return i(this)}};r.style=n;export{r as ifx_segmented_control};
2
+ //# sourceMappingURL=p-6d5a43ee.entry.js.map