@infineon/infineon-design-system-stencil 30.9.3--canary.1640.c246fbcdce3247ffada7a2fffa49d05593d4088f.0 → 30.9.3--canary.1678.5b4a7e71bc0aa2e3f495f00864e3c9507193dd72.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 (304) hide show
  1. package/dist/cjs/ifx-accordion_2.cjs.entry.js +7 -7
  2. package/dist/cjs/ifx-accordion_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/ifx-breadcrumb-item-label.cjs.entry.js +1 -1
  4. package/dist/cjs/ifx-breadcrumb-item-label.cjs.entry.js.map +1 -1
  5. package/dist/cjs/ifx-breadcrumb.cjs.entry.js +3 -3
  6. package/dist/cjs/ifx-breadcrumb.cjs.entry.js.map +1 -1
  7. package/dist/cjs/ifx-chip_3.cjs.entry.js +21 -19
  8. package/dist/cjs/ifx-chip_3.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ifx-modal.cjs.entry.js +8 -8
  10. package/dist/cjs/ifx-modal.cjs.entry.js.map +1 -1
  11. package/dist/cjs/ifx-multiselect_2.cjs.entry.js +5 -5
  12. package/dist/cjs/ifx-multiselect_2.cjs.entry.js.map +1 -1
  13. package/dist/cjs/ifx-navbar.cjs.entry.js +3 -3
  14. package/dist/cjs/ifx-navbar.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ifx-search-bar.cjs.entry.js +5 -5
  16. package/dist/cjs/ifx-search-bar.cjs.entry.js.map +1 -1
  17. package/dist/cjs/ifx-sidebar-item.cjs.entry.js +10 -9
  18. package/dist/cjs/ifx-sidebar-item.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ifx-status.cjs.entry.js +3 -3
  20. package/dist/cjs/ifx-status.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ifx-table.cjs.entry.js +20 -22
  22. package/dist/cjs/ifx-table.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ifx-tabs.cjs.entry.js +6 -6
  24. package/dist/cjs/ifx-tabs.cjs.entry.js.map +1 -1
  25. package/dist/cjs/infineon-design-system-stencil.cjs.js +1 -1
  26. package/dist/cjs/loader.cjs.js +1 -1
  27. package/dist/collection/components/accordion/accordion.js +2 -2
  28. package/dist/collection/components/accordion/accordion.js.map +1 -1
  29. package/dist/collection/components/accordion/accordion.stories.js +7 -81
  30. package/dist/collection/components/accordion/accordion.stories.js.map +1 -1
  31. package/dist/collection/components/accordion/accordionItem.js +10 -10
  32. package/dist/collection/components/accordion/accordionItem.js.map +1 -1
  33. package/dist/collection/components/alert/alert.stories.js +12 -45
  34. package/dist/collection/components/alert/alert.stories.js.map +1 -1
  35. package/dist/collection/components/badge/badge.stories.js +7 -28
  36. package/dist/collection/components/badge/badge.stories.js.map +1 -1
  37. package/dist/collection/components/breadcrumb/breadcrumb-item-label.js +3 -3
  38. package/dist/collection/components/breadcrumb/breadcrumb-item-label.js.map +1 -1
  39. package/dist/collection/components/breadcrumb/breadcrumb.js +3 -3
  40. package/dist/collection/components/breadcrumb/breadcrumb.js.map +1 -1
  41. package/dist/collection/components/breadcrumb/breadcrumb.stories.js +13 -87
  42. package/dist/collection/components/breadcrumb/breadcrumb.stories.js.map +1 -1
  43. package/dist/collection/components/button/button.stories.js +9 -101
  44. package/dist/collection/components/button/button.stories.js.map +1 -1
  45. package/dist/collection/components/card/card.stories.js +4 -85
  46. package/dist/collection/components/card/card.stories.js.map +1 -1
  47. package/dist/collection/components/checkbox/checkbox.stories.js +14 -72
  48. package/dist/collection/components/checkbox/checkbox.stories.js.map +1 -1
  49. package/dist/collection/components/chip/chip-item/chip-item.js +4 -4
  50. package/dist/collection/components/chip/chip-item/chip-item.js.map +1 -1
  51. package/dist/collection/components/chip/chip.js +15 -15
  52. package/dist/collection/components/chip/chip.js.map +1 -1
  53. package/dist/collection/components/chip/chip.stories.js +26 -21
  54. package/dist/collection/components/chip/chip.stories.js.map +1 -1
  55. package/dist/collection/components/chip/interfaces.js.map +1 -1
  56. package/dist/collection/components/content-switcher/content-switcher.stories.js +3 -65
  57. package/dist/collection/components/content-switcher/content-switcher.stories.js.map +1 -1
  58. package/dist/collection/components/date-picker/date-picker.stories.js +7 -97
  59. package/dist/collection/components/date-picker/date-picker.stories.js.map +1 -1
  60. package/dist/collection/components/dropdown/dropdown.stories.js +64 -222
  61. package/dist/collection/components/dropdown/dropdown.stories.js.map +1 -1
  62. package/dist/collection/components/footer/footer.stories.js +1 -31
  63. package/dist/collection/components/footer/footer.stories.js.map +1 -1
  64. package/dist/collection/components/icon/infineonIconStencil.stories.js +2 -7
  65. package/dist/collection/components/icon/infineonIconStencil.stories.js.map +1 -1
  66. package/dist/collection/components/icon-button/icon-button.stories.js +5 -61
  67. package/dist/collection/components/icon-button/icon-button.stories.js.map +1 -1
  68. package/dist/collection/components/link/link.stories.js +4 -53
  69. package/dist/collection/components/link/link.stories.js.map +1 -1
  70. package/dist/collection/components/modal/modal.js +10 -10
  71. package/dist/collection/components/modal/modal.js.map +1 -1
  72. package/dist/collection/components/modal/modal.stories.js +19 -96
  73. package/dist/collection/components/modal/modal.stories.js.map +1 -1
  74. package/dist/collection/components/navigation/navbar/navbar.js +4 -4
  75. package/dist/collection/components/navigation/navbar/navbar.js.map +1 -1
  76. package/dist/collection/components/navigation/navbar/navbar.stories.js +12 -176
  77. package/dist/collection/components/navigation/navbar/navbar.stories.js.map +1 -1
  78. package/dist/collection/components/navigation/sidebar/sidebar-item.js +32 -11
  79. package/dist/collection/components/navigation/sidebar/sidebar-item.js.map +1 -1
  80. package/dist/collection/components/navigation/sidebar/sidebar.stories.js +19 -184
  81. package/dist/collection/components/navigation/sidebar/sidebar.stories.js.map +1 -1
  82. package/dist/collection/components/notification/notification.stories.js +8 -55
  83. package/dist/collection/components/notification/notification.stories.js.map +1 -1
  84. package/dist/collection/components/number-indicator/number-indicator.stories.js +0 -19
  85. package/dist/collection/components/number-indicator/number-indicator.stories.js.map +1 -1
  86. package/dist/collection/components/pagination/pagination.js +31 -1
  87. package/dist/collection/components/pagination/pagination.js.map +1 -1
  88. package/dist/collection/components/pagination/pagination.stories.js +14 -19
  89. package/dist/collection/components/pagination/pagination.stories.js.map +1 -1
  90. package/dist/collection/components/progress-bar/progress-bar.stories.js +8 -31
  91. package/dist/collection/components/progress-bar/progress-bar.stories.js.map +1 -1
  92. package/dist/collection/components/radio-button/radio-button.stories.js +13 -66
  93. package/dist/collection/components/radio-button/radio-button.stories.js.map +1 -1
  94. package/dist/collection/components/search-bar/search-bar.js +6 -6
  95. package/dist/collection/components/search-bar/search-bar.js.map +1 -1
  96. package/dist/collection/components/search-bar/search-bar.stories.js +9 -58
  97. package/dist/collection/components/search-bar/search-bar.stories.js.map +1 -1
  98. package/dist/collection/components/search-field/search-field.stories.js +8 -54
  99. package/dist/collection/components/search-field/search-field.stories.js.map +1 -1
  100. package/dist/collection/components/segmented-control/segmented-control.stories.js +10 -1
  101. package/dist/collection/components/segmented-control/segmented-control.stories.js.map +1 -1
  102. package/dist/collection/components/select/multi-select/multiselect.js +6 -6
  103. package/dist/collection/components/select/multi-select/multiselect.js.map +1 -1
  104. package/dist/collection/components/select/multi-select/multiselect.stories.js +5 -131
  105. package/dist/collection/components/select/multi-select/multiselect.stories.js.map +1 -1
  106. package/dist/collection/components/select/single-select/select.stories.js +26 -83
  107. package/dist/collection/components/select/single-select/select.stories.js.map +1 -1
  108. package/dist/collection/components/slider/slider.stories.js +13 -97
  109. package/dist/collection/components/slider/slider.stories.js.map +1 -1
  110. package/dist/collection/components/spinner/spinner.stories.js +2 -34
  111. package/dist/collection/components/spinner/spinner.stories.js.map +1 -1
  112. package/dist/collection/components/status/status.css +140 -20
  113. package/dist/collection/components/status/status.js +5 -5
  114. package/dist/collection/components/status/status.js.map +1 -1
  115. package/dist/collection/components/status/status.stories.js +3 -27
  116. package/dist/collection/components/status/status.stories.js.map +1 -1
  117. package/dist/collection/components/stepper/stepper.stories.js +25 -54
  118. package/dist/collection/components/stepper/stepper.stories.js.map +1 -1
  119. package/dist/collection/components/switch/switch.stories.js +4 -51
  120. package/dist/collection/components/switch/switch.stories.js.map +1 -1
  121. package/dist/collection/components/table-advanced-version/table.js +21 -23
  122. package/dist/collection/components/table-advanced-version/table.js.map +1 -1
  123. package/dist/collection/components/table-advanced-version/table.stories.js +39 -124
  124. package/dist/collection/components/table-advanced-version/table.stories.js.map +1 -1
  125. package/dist/collection/components/table-basic-version/table.stories.js +4 -31
  126. package/dist/collection/components/table-basic-version/table.stories.js.map +1 -1
  127. package/dist/collection/components/tabs/tabs.js +7 -7
  128. package/dist/collection/components/tabs/tabs.js.map +1 -1
  129. package/dist/collection/components/tabs/tabs.stories.js +29 -104
  130. package/dist/collection/components/tabs/tabs.stories.js.map +1 -1
  131. package/dist/collection/components/tag/tag.stories.js +0 -18
  132. package/dist/collection/components/tag/tag.stories.js.map +1 -1
  133. package/dist/collection/components/text-field/text-field.stories.js +13 -116
  134. package/dist/collection/components/text-field/text-field.stories.js.map +1 -1
  135. package/dist/collection/components/textarea/textarea.stories.js +3 -1
  136. package/dist/collection/components/textarea/textarea.stories.js.map +1 -1
  137. package/dist/collection/components/tooltip/tooltip.stories.js +4 -48
  138. package/dist/collection/components/tooltip/tooltip.stories.js.map +1 -1
  139. package/dist/components/ifx-accordion-item.js +1 -1
  140. package/dist/components/ifx-accordion.js +1 -1
  141. package/dist/components/ifx-breadcrumb-item-label.js +2 -2
  142. package/dist/components/ifx-breadcrumb-item-label.js.map +1 -1
  143. package/dist/components/ifx-breadcrumb.js +3 -3
  144. package/dist/components/ifx-breadcrumb.js.map +1 -1
  145. package/dist/components/ifx-chip-item.js +1 -1
  146. package/dist/components/ifx-chip.js +1 -1
  147. package/dist/components/ifx-faq.js +2 -2
  148. package/dist/components/ifx-modal.js +8 -8
  149. package/dist/components/ifx-modal.js.map +1 -1
  150. package/dist/components/ifx-multiselect.js +1 -1
  151. package/dist/components/ifx-navbar.js +4 -4
  152. package/dist/components/ifx-navbar.js.map +1 -1
  153. package/dist/components/ifx-pagination.js +1 -1
  154. package/dist/components/ifx-search-bar.js +5 -5
  155. package/dist/components/ifx-search-bar.js.map +1 -1
  156. package/dist/components/ifx-set-filter.js +1 -1
  157. package/dist/components/ifx-sidebar-item.js +13 -11
  158. package/dist/components/ifx-sidebar-item.js.map +1 -1
  159. package/dist/components/ifx-status.js +3 -3
  160. package/dist/components/ifx-status.js.map +1 -1
  161. package/dist/components/ifx-table.js +24 -26
  162. package/dist/components/ifx-table.js.map +1 -1
  163. package/dist/components/ifx-tabs.js +6 -6
  164. package/dist/components/ifx-tabs.js.map +1 -1
  165. package/dist/components/{p-a6310ccf.js → p-2167e98c.js} +3 -3
  166. package/dist/components/{p-a6310ccf.js.map → p-2167e98c.js.map} +1 -1
  167. package/dist/components/{p-62eff23e.js → p-474e011d.js} +8 -8
  168. package/dist/components/{p-62eff23e.js.map → p-474e011d.js.map} +1 -1
  169. package/dist/components/{p-dd91260d.js → p-6613f3b4.js} +5 -5
  170. package/dist/components/p-6613f3b4.js.map +1 -0
  171. package/dist/components/{p-61ecfa9a.js → p-9f15ef5a.js} +15 -15
  172. package/dist/components/p-9f15ef5a.js.map +1 -0
  173. package/dist/components/{p-28a8736e.js → p-ecfb353b.js} +4 -2
  174. package/dist/components/p-ecfb353b.js.map +1 -0
  175. package/dist/components/{p-fce5491f.js → p-f0953b8a.js} +6 -6
  176. package/dist/components/p-f0953b8a.js.map +1 -0
  177. package/dist/esm/ifx-accordion_2.entry.js +7 -7
  178. package/dist/esm/ifx-accordion_2.entry.js.map +1 -1
  179. package/dist/esm/ifx-breadcrumb-item-label.entry.js +1 -1
  180. package/dist/esm/ifx-breadcrumb-item-label.entry.js.map +1 -1
  181. package/dist/esm/ifx-breadcrumb.entry.js +3 -3
  182. package/dist/esm/ifx-breadcrumb.entry.js.map +1 -1
  183. package/dist/esm/ifx-chip_3.entry.js +21 -19
  184. package/dist/esm/ifx-chip_3.entry.js.map +1 -1
  185. package/dist/esm/ifx-modal.entry.js +8 -8
  186. package/dist/esm/ifx-modal.entry.js.map +1 -1
  187. package/dist/esm/ifx-multiselect_2.entry.js +5 -5
  188. package/dist/esm/ifx-multiselect_2.entry.js.map +1 -1
  189. package/dist/esm/ifx-navbar.entry.js +3 -3
  190. package/dist/esm/ifx-navbar.entry.js.map +1 -1
  191. package/dist/esm/ifx-search-bar.entry.js +5 -5
  192. package/dist/esm/ifx-search-bar.entry.js.map +1 -1
  193. package/dist/esm/ifx-sidebar-item.entry.js +10 -9
  194. package/dist/esm/ifx-sidebar-item.entry.js.map +1 -1
  195. package/dist/esm/ifx-status.entry.js +3 -3
  196. package/dist/esm/ifx-status.entry.js.map +1 -1
  197. package/dist/esm/ifx-table.entry.js +20 -22
  198. package/dist/esm/ifx-table.entry.js.map +1 -1
  199. package/dist/esm/ifx-tabs.entry.js +6 -6
  200. package/dist/esm/ifx-tabs.entry.js.map +1 -1
  201. package/dist/esm/infineon-design-system-stencil.js +1 -1
  202. package/dist/esm/loader.js +1 -1
  203. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
  204. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js.map +1 -1
  205. package/dist/infineon-design-system-stencil/p-022dbe8b.entry.js +2 -0
  206. package/dist/infineon-design-system-stencil/p-022dbe8b.entry.js.map +1 -0
  207. package/dist/infineon-design-system-stencil/{p-ae1791a8.entry.js → p-19a2740f.entry.js} +2 -2
  208. package/dist/infineon-design-system-stencil/p-19a2740f.entry.js.map +1 -0
  209. package/dist/infineon-design-system-stencil/p-1c5c318c.entry.js +2 -0
  210. package/dist/infineon-design-system-stencil/p-1c5c318c.entry.js.map +1 -0
  211. package/dist/infineon-design-system-stencil/p-56426c94.entry.js +2 -0
  212. package/dist/infineon-design-system-stencil/{p-73505b17.entry.js.map → p-56426c94.entry.js.map} +1 -1
  213. package/dist/infineon-design-system-stencil/p-5a83ef48.entry.js +2 -0
  214. package/dist/infineon-design-system-stencil/p-5a83ef48.entry.js.map +1 -0
  215. package/dist/infineon-design-system-stencil/p-7c9ca144.entry.js +2 -0
  216. package/dist/infineon-design-system-stencil/p-7c9ca144.entry.js.map +1 -0
  217. package/dist/infineon-design-system-stencil/p-974829c7.entry.js +2 -0
  218. package/dist/infineon-design-system-stencil/p-974829c7.entry.js.map +1 -0
  219. package/dist/infineon-design-system-stencil/p-9a013f52.entry.js +2 -0
  220. package/dist/infineon-design-system-stencil/p-9a013f52.entry.js.map +1 -0
  221. package/dist/infineon-design-system-stencil/p-a6c07e60.entry.js +2 -0
  222. package/dist/infineon-design-system-stencil/p-a6c07e60.entry.js.map +1 -0
  223. package/dist/infineon-design-system-stencil/{p-8e416f0e.entry.js → p-aaada3f2.entry.js} +2 -2
  224. package/dist/infineon-design-system-stencil/p-aaada3f2.entry.js.map +1 -0
  225. package/dist/infineon-design-system-stencil/{p-23978a74.entry.js → p-ef68ce70.entry.js} +2 -2
  226. package/dist/infineon-design-system-stencil/p-ef68ce70.entry.js.map +1 -0
  227. package/dist/infineon-design-system-stencil/{p-520ddc60.entry.js → p-f0884a54.entry.js} +2 -2
  228. package/dist/infineon-design-system-stencil/p-f0884a54.entry.js.map +1 -0
  229. package/dist/types/components/accordion/accordion.stories.d.ts +1 -67
  230. package/dist/types/components/accordion/accordionItem.d.ts +3 -3
  231. package/dist/types/components/alert/alert.stories.d.ts +11 -38
  232. package/dist/types/components/badge/badge.stories.d.ts +3 -23
  233. package/dist/types/components/breadcrumb/breadcrumb-item-label.d.ts +1 -1
  234. package/dist/types/components/breadcrumb/breadcrumb.stories.d.ts +1 -83
  235. package/dist/types/components/button/button.stories.d.ts +16 -92
  236. package/dist/types/components/card/card.stories.d.ts +1 -95
  237. package/dist/types/components/checkbox/checkbox.stories.d.ts +10 -65
  238. package/dist/types/components/chip/chip-item/chip-item.d.ts +1 -1
  239. package/dist/types/components/chip/chip.d.ts +1 -1
  240. package/dist/types/components/chip/chip.stories.d.ts +4 -11
  241. package/dist/types/components/chip/interfaces.d.ts +1 -1
  242. package/dist/types/components/content-switcher/content-switcher.stories.d.ts +0 -66
  243. package/dist/types/components/date-picker/date-picker.stories.d.ts +2 -89
  244. package/dist/types/components/dropdown/dropdown.stories.d.ts +33 -90
  245. package/dist/types/components/footer/footer.stories.d.ts +0 -26
  246. package/dist/types/components/icon/infineonIconStencil.stories.d.ts +0 -5
  247. package/dist/types/components/icon-button/icon-button.stories.d.ts +8 -56
  248. package/dist/types/components/link/link.stories.d.ts +6 -49
  249. package/dist/types/components/modal/modal.d.ts +2 -2
  250. package/dist/types/components/modal/modal.stories.d.ts +3 -77
  251. package/dist/types/components/navigation/navbar/navbar.stories.d.ts +6 -222
  252. package/dist/types/components/navigation/sidebar/sidebar-item.d.ts +3 -2
  253. package/dist/types/components/navigation/sidebar/sidebar.stories.d.ts +7 -161
  254. package/dist/types/components/notification/notification.stories.d.ts +2 -46
  255. package/dist/types/components/number-indicator/number-indicator.stories.d.ts +0 -19
  256. package/dist/types/components/pagination/pagination.d.ts +2 -0
  257. package/dist/types/components/pagination/pagination.stories.d.ts +7 -12
  258. package/dist/types/components/progress-bar/progress-bar.stories.d.ts +4 -25
  259. package/dist/types/components/radio-button/radio-button.stories.d.ts +8 -59
  260. package/dist/types/components/search-bar/search-bar.d.ts +1 -1
  261. package/dist/types/components/search-bar/search-bar.stories.d.ts +3 -60
  262. package/dist/types/components/search-field/search-field.stories.d.ts +6 -45
  263. package/dist/types/components/segmented-control/segmented-control.stories.d.ts +3 -0
  264. package/dist/types/components/select/multi-select/multiselect.d.ts +1 -1
  265. package/dist/types/components/select/multi-select/multiselect.stories.d.ts +0 -125
  266. package/dist/types/components/select/single-select/select.stories.d.ts +24 -67
  267. package/dist/types/components/slider/slider.stories.d.ts +0 -110
  268. package/dist/types/components/spinner/spinner.stories.d.ts +0 -32
  269. package/dist/types/components/status/status.d.ts +1 -1
  270. package/dist/types/components/status/status.stories.d.ts +2 -24
  271. package/dist/types/components/stepper/stepper.stories.d.ts +6 -30
  272. package/dist/types/components/switch/switch.stories.d.ts +1 -47
  273. package/dist/types/components/table-advanced-version/table.stories.d.ts +11 -50
  274. package/dist/types/components/table-basic-version/table.stories.d.ts +1 -21
  275. package/dist/types/components/tabs/tabs.d.ts +1 -1
  276. package/dist/types/components/tabs/tabs.stories.d.ts +9 -88
  277. package/dist/types/components/tag/tag.stories.d.ts +0 -20
  278. package/dist/types/components/text-field/text-field.stories.d.ts +10 -106
  279. package/dist/types/components/tooltip/tooltip.stories.d.ts +6 -41
  280. package/dist/types/components.d.ts +28 -22
  281. package/package.json +2 -3
  282. package/dist/components/p-28a8736e.js.map +0 -1
  283. package/dist/components/p-61ecfa9a.js.map +0 -1
  284. package/dist/components/p-dd91260d.js.map +0 -1
  285. package/dist/components/p-fce5491f.js.map +0 -1
  286. package/dist/infineon-design-system-stencil/p-134d043c.entry.js +0 -2
  287. package/dist/infineon-design-system-stencil/p-134d043c.entry.js.map +0 -1
  288. package/dist/infineon-design-system-stencil/p-23978a74.entry.js.map +0 -1
  289. package/dist/infineon-design-system-stencil/p-45e42392.entry.js +0 -2
  290. package/dist/infineon-design-system-stencil/p-45e42392.entry.js.map +0 -1
  291. package/dist/infineon-design-system-stencil/p-520ddc60.entry.js.map +0 -1
  292. package/dist/infineon-design-system-stencil/p-56e92d85.entry.js +0 -2
  293. package/dist/infineon-design-system-stencil/p-56e92d85.entry.js.map +0 -1
  294. package/dist/infineon-design-system-stencil/p-73505b17.entry.js +0 -2
  295. package/dist/infineon-design-system-stencil/p-7fbfd8a9.entry.js +0 -2
  296. package/dist/infineon-design-system-stencil/p-7fbfd8a9.entry.js.map +0 -1
  297. package/dist/infineon-design-system-stencil/p-878db58b.entry.js +0 -2
  298. package/dist/infineon-design-system-stencil/p-878db58b.entry.js.map +0 -1
  299. package/dist/infineon-design-system-stencil/p-8e416f0e.entry.js.map +0 -1
  300. package/dist/infineon-design-system-stencil/p-ae1791a8.entry.js.map +0 -1
  301. package/dist/infineon-design-system-stencil/p-c27f4f95.entry.js +0 -2
  302. package/dist/infineon-design-system-stencil/p-c27f4f95.entry.js.map +0 -1
  303. package/dist/infineon-design-system-stencil/p-f6a9f419.entry.js +0 -2
  304. package/dist/infineon-design-system-stencil/p-f6a9f419.entry.js.map +0 -1
@@ -74,84 +74,42 @@ export default {
74
74
  tableHeight: 'auto',
75
75
  pagination: false,
76
76
  paginationPageSize: 10,
77
+ currentPage: 1,
77
78
  rowHeight: 40,
78
79
  showLoading: false,
80
+ buttonRendererOptions: {
81
+ onButtonClick: (params, event) => {
82
+ console.log('Button clicked:', params, event);
83
+ }
84
+ }
79
85
  },
80
86
  argTypes: {
81
87
  tableHeight: {
82
- description: 'Set the height of the table.',
83
88
  table: {
84
- category: 'ifx-table props',
85
89
  type: {
86
90
  summary: 'Options',
87
91
  detail: 'Default: "auto"\nExample for fixed height: "400px"',
88
92
  }
89
93
  },
90
94
  },
91
- pagination: {
92
- description: 'Show pagination control.',
93
- control: { type: 'boolean' },
94
- table: {
95
- category: 'ifx-table props',
96
- defaultValue: {
97
- summary: true
98
- },
99
- type: {
100
- summary: 'Boolean',
101
- },
102
- },
103
- },
104
95
  paginationPageSize: {
105
- description: "Results per page: minimum 10 - maximum 30.",
106
- control: { type: 'number', min: 10, max: 30, step: 10 },
107
- table: {
108
- category: 'ifx-table props',
109
- defaultValue: {
110
- summary: 10
111
- },
112
- type: {
113
- summary: 'Number',
114
- },
115
- },
96
+ description: "Results per page: minimum 10 - maximum 30",
97
+ control: { type: 'number', min: 10, max: 30, step: 10 }
116
98
  },
117
99
  showLoading: {
118
- description: 'Show loading spinner.',
119
100
  options: [true, false],
120
101
  control: { type: 'radio' },
121
- table: {
122
- category: 'ifx-table props',
123
- defaultValue: {
124
- summary: false
125
- },
126
- },
127
102
  },
128
103
  rowHeight: {
129
- description: 'Set the height of the rows.',
130
104
  options: ['compact', 'default'],
131
105
  control: { type: 'radio' },
132
- table: {
133
- category: 'ifx-table props',
134
- defaultValue: {
135
- summary: 'default'
136
- },
137
- },
138
106
  },
139
107
  filterOrientation: {
140
- description: 'Set the filter orientation.',
141
108
  options: ['sidebar', 'topbar', 'none'],
142
109
  control: { type: 'radio' },
143
- table: {
144
- category: 'ifx-table props',
145
- defaultValue: {
146
- summary: 'none'
147
- },
148
- },
149
110
  },
150
111
  columnDefs: {
151
- description: 'Column header options',
152
- name: 'cols',
153
112
  table: {
154
- category: 'ifx-table props',
155
113
  type: {
156
114
  summary: 'Column header options',
157
115
  detail: 'Standard columns:\nheaderName: "Model", \nfield: "model", \nsortable: true (optional),\nsort: "desc" (optional) => descending sort (show icon)\nunSortIcon: true (optional) => unsorted (show icon)\n\nSpecial columns:\nheaderName: "",\nfield: "button"\nheaderName: "",\nfield: "link"',
@@ -159,90 +117,37 @@ export default {
159
117
  },
160
118
  },
161
119
  rowData: {
162
- description: 'Row data options',
163
- name: 'rows',
164
120
  table: {
165
- category: 'ifx-table props',
166
121
  type: {
167
122
  summary: 'Row data options',
168
123
  detail: 'Standard row values:\nmake: "Toyota", \nmodel: "Celica", \nprice: 35000 \n\nSpecial row values (incl buttons):\nmake: "Porsche",\nmodel: "Boxster",\nprice: "72000",\nbutton: { \ndisabled: false (optional),\nvariant: "outline" (optional)\nsize: "s" (optional),\ntext: "Button"\n...other ifx-button properties\n}',
169
124
  },
170
125
  },
171
126
  },
127
+ buttonRendererOptions: {
128
+ control: 'object',
129
+ description: 'Options for button cell renderer, including event handlers.',
130
+ table: {
131
+ type: {
132
+ summary: 'Button Renderer Options',
133
+ detail: 'Custom event handlers and other options for the button cell renderer in the table.'
134
+ },
135
+ },
136
+ },
172
137
  }
173
138
  };
174
139
  const DefaultTemplate = (args) => {
175
- if (args.filterOrientation === 'none') {
176
- const table = `<ifx-table
177
- row-height="${args.rowHeight}"
178
- cols='${JSON.stringify(args.columnDefs)}'
179
- rows='${JSON.stringify(args.rowData)}'
180
- table-height="${args.tableHeight}"
181
- pagination="${args.pagination}"
182
- pagination-page-size="${args.paginationPageSize}"
183
- filter-orientation="${args.filterOrientation}">
184
- </ifx-table>`;
185
- return table;
186
- }
187
- else {
188
- //sidebar
189
- const filterAccordions = args.columnDefs.map(column => {
190
- const uniqueColValues = [...new Set(args.rowData.map(row => row[column.field]))];
191
- const filterOptions = uniqueColValues.map((option, index) => {
192
- return `<ifx-list-entry slot="slot${index}" label="${option}" value="false"></ifx-list-entry>`;
193
- }).join('');
194
- return `
195
- <ifx-filter-accordion slot="filter-accordion" filter-group-name="${column.field}">
196
- <ifx-list slot="list" type="checkbox" name="${column.field}" max-visible-items="6">
197
- ${filterOptions}
198
- </ifx-list>
199
- </ifx-filter-accordion>
200
- `;
201
- }).join('');
202
- //topbar
203
- const filterComponents = args.columnDefs.map((column, index) => {
204
- const uniqueColValues = [...new Set(args.rowData.map(row => row[column.field]))];
205
- const options = uniqueColValues.map(option => ({
206
- value: option,
207
- label: option,
208
- selected: false
209
- }));
210
- // Directly use JSON.stringify without replacing quotes
211
- const optionsString = JSON.stringify(options);
212
- return `
213
- <ifx-set-filter slot="filter-component-${index + 1}"
214
- options='${optionsString}'
215
- filter-label='${column.headerName}'
216
- filter-name='${column.field}'
217
- type='multi-select'
218
- search-enabled='true'>
219
- </ifx-set-filter>
220
- `;
221
- }).join('\n');
222
- const filterTypeGroupComponent = args.filterOrientation === 'sidebar'
223
- ? `<ifx-filter-type-group slot="sidebar-filter">
224
- <div slot="filter-search">
225
- <ifx-filter-search filter-orientation="sidebar" filter-name="search"></ifx-filter-search>
226
- </div>
227
- ${filterAccordions}
228
- </ifx-filter-type-group>`
229
- :
230
- `<ifx-filter-bar slot="topbar-filter" max-shown-filters="3">
231
- <ifx-filter-search slot="filter-search" filter-orientation="topbar"></ifx-filter-search>
232
- ${filterComponents}
233
- </ifx-filter-bar>`;
234
- const table = `<ifx-table
235
- row-height="${args.rowHeight}"
236
- cols='${JSON.stringify(args.columnDefs)}'
237
- rows='${JSON.stringify(args.rowData)}'
238
- table-height="${args.tableHeight}"
239
- pagination="${args.pagination}"
240
- pagination-page-size="${args.paginationPageSize}"
241
- filter-orientation="${args.filterOrientation}">
242
- ${filterTypeGroupComponent}
243
- </ifx-table>`;
244
- return table;
245
- }
140
+ const table = `
141
+ <ifx-table
142
+ row-height="${args.rowHeight}"
143
+ cols='${JSON.stringify(args.columnDefs)}'
144
+ rows='${JSON.stringify(args.rowData)}'
145
+ table-height="${args.tableHeight}"
146
+ pagination="${args.pagination}"
147
+ pagination-page-size="${args.paginationPageSize}"
148
+ filter-orientation="${args.filterOrientation}">
149
+ </ifx-table>`;
150
+ return table;
246
151
  };
247
152
  export const Pagination = DefaultTemplate.bind({});
248
153
  Pagination.args = {
@@ -281,6 +186,11 @@ SidebarFilter.args = {
281
186
  columnDefs: columnDefs,
282
187
  rowData: rowData,
283
188
  filterOrientation: 'sidebar',
189
+ buttonRendererOptions: {
190
+ onButtonClick: (params, event) => {
191
+ console.log('Button clicked:', params, event);
192
+ }
193
+ }
284
194
  };
285
195
  export const TopbarFilter = DefaultTemplate.bind({});
286
196
  TopbarFilter.args = {
@@ -288,5 +198,10 @@ TopbarFilter.args = {
288
198
  columnDefs: columnDefs,
289
199
  rowData: rowData,
290
200
  filterOrientation: 'topbar',
201
+ buttonRendererOptions: {
202
+ onButtonClick: (params, event) => {
203
+ console.log('Button clicked:', params, event);
204
+ }
205
+ }
291
206
  };
292
207
  //# sourceMappingURL=table.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"table.stories.js","sourceRoot":"","sources":["../../../src/components/table-advanced-version/table.stories.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,GAAG;IACjB,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE;IACrF,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;IACzE,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IACvC,EAAE,UAAU,EAAE,KA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U,CAAC;cAC/B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC;sBACpB,IAAI,CAAC,WAAW;oBAClB,IAAI,CAAC,UAAU;8BACL,IAAI,CAAC,kBAAkB;4BACzB,IAAI,CAAC,iBAAiB;iBACjC,CAAC;IAChB,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAIF,MAAM,CAAC,MAAM,eAAe,GAAG,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3D,eAAe,CAAC,IAAI,GAAG;IACrB,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,uBAAuB;IACnC,OAAO,EAAE,oBAAoB;IAC7B,iBAAiB,EAAE,MAAM;IACzB,UAAU,EAAE,KAAK;IACjB,kBAAkB,EAAE,EAAE;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtD,aAAa,CAAC,IAAI,GAAG;IACnB,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,OAAO;IAChB,iBAAiB,EAAE,SAAS;CAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACrD,YAAY,CAAC,IAAI,GAAG;IAClB,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,OAAO;IAChB,iBAAiB,EAAE,QAAQ;CAC5B,CAAC","sourcesContent":["const columnDefs = [\n { headerName: 'Make', field: 'make', sortable: true, sort: 'desc', unSortIcon: true },\n { headerName: 'Model', field: 'model', sortable: true, unSortIcon: true },\n { headerName: 'Price', field: 'price' },\n { headerName: 'Age', field: 'age' }\n];\n\nconst rowData = [\n { make: 'Toyota', model: 'Celica', price: 35000, age: 10 },\n { make: 'Ford', model: 'Mondeo', price: 32000, age: 12 },\n { make: 'Porsche', model: 'Boxster', price: 72000 },\n { make: 'Bmw', model: 'x', price: 72000 },\n { make: 'Mercedes', model: 'y', price: 72000 },\n { make: 'Ferrari', model: 'z', price: 72000 },\n { make: 'Chrysler', model: 'a', price: 72000 },\n { make: 'Range rover', model: 'b', price: 72000 },\n { make: 'Tesla', model: 'x', price: 72000 },\n { make: 'Audi', model: '3', price: 72000 },\n { make: 'Landrover', model: 'x', price: 72000 },\n];\n\nconst columnDefsWithButtonCol = [\n { headerName: 'Make', field: 'make', sortable: true, sort: 'desc', unSortIcon: true },\n { headerName: 'Model', field: 'model', sortable: true, unSortIcon: true },\n { headerName: 'Price', field: 'price' },\n { headerName: 'Age', field: 'age' },\n {\n headerName: '',\n field: 'button',\n }\n];\n\n\nconst rowDataWithButtonCol = [\n {\n make: 'Toyota', model: 'Celica', price: 35000, age: 10, button: {\n disabled: false,\n variant: \"secondary\",\n size: \"s\",\n target: \"_blank\",\n href: \"https://www.w3schools.com/\",\n theme: \"default\",\n type: \"button\",\n fullWidth: true,\n text: \"Toyota Button\"\n }\n },\n {\n make: 'Ford', model: 'Mondeo', price: 32000, age: 12, button: {\n disabled: false,\n variant: \"secondary\",\n size: \"s\",\n target: \"_blank\",\n href: \"https://www.w3schools.com/\",\n theme: \"default\",\n type: \"button\",\n fullWidth: true,\n text: \"Ford Button\"\n }\n },\n {\n make: 'Porsche', model: 'Boxster', price: 72000, button: {\n disabled: false,\n variant: \"secondary\",\n size: \"s\",\n target: \"_blank\",\n href: \"https://www.w3schools.com/\",\n theme: \"default\",\n type: \"button\",\n fullWidth: true,\n text: \"Porsche Button\"\n }\n }\n];\n\nexport default {\n title: 'Components/Table (advanced)',\n args: {\n tableHeight: 'auto',\n pagination: false,\n paginationPageSize: 10,\n rowHeight: 40,\n showLoading: false,\n },\n argTypes: {\n tableHeight: {\n description: 'Set the height of the table.',\n table: {\n category: 'ifx-table props',\n type: {\n summary: 'Options',\n detail: 'Default: \"auto\"\\nExample for fixed height: \"400px\"',\n }\n },\n },\n pagination: {\n description: 'Show pagination control.',\n control: { type: 'boolean' },\n table: {\n category: 'ifx-table props',\n defaultValue: {\n summary: true\n },\n type: {\n summary: 'Boolean',\n },\n },\n },\n paginationPageSize: {\n description: \"Results per page: minimum 10 - maximum 30.\",\n control: { type: 'number', min: 10, max: 30, step: 10 },\n table: {\n category: 'ifx-table props',\n defaultValue: {\n summary: 10\n },\n type: {\n summary: 'Number',\n },\n },\n },\n showLoading: {\n description: 'Show loading spinner.',\n options: [true, false],\n control: { type: 'radio' },\n table: {\n category: 'ifx-table props',\n defaultValue: {\n summary: false\n },\n },\n },\n rowHeight: {\n description: 'Set the height of the rows.',\n options: ['compact', 'default'],\n control: { type: 'radio' },\n table: {\n category: 'ifx-table props',\n defaultValue: {\n summary: 'default'\n },\n },\n },\n filterOrientation: {\n description: 'Set the filter orientation.',\n options: ['sidebar', 'topbar', 'none'],\n control: { type: 'radio' },\n table: {\n category: 'ifx-table props',\n defaultValue: {\n summary: 'none'\n },\n },\n },\n columnDefs: {\n description: 'Column header options',\n name: 'cols',\n table: {\n category: 'ifx-table props',\n type: {\n summary: 'Column header options',\n detail: 'Standard columns:\\nheaderName: \"Model\", \\nfield: \"model\", \\nsortable: true (optional),\\nsort: \"desc\" (optional) => descending sort (show icon)\\nunSortIcon: true (optional) => unsorted (show icon)\\n\\nSpecial columns:\\nheaderName: \"\",\\nfield: \"button\"\\nheaderName: \"\",\\nfield: \"link\"',\n },\n },\n },\n rowData: {\n description: 'Row data options',\n name: 'rows',\n table: {\n category: 'ifx-table props',\n type: {\n summary: 'Row data options',\n detail: 'Standard row values:\\nmake: \"Toyota\", \\nmodel: \"Celica\", \\nprice: 35000 \\n\\nSpecial row values (incl buttons):\\nmake: \"Porsche\",\\nmodel: \"Boxster\",\\nprice: \"72000\",\\nbutton: { \\ndisabled: false (optional),\\nvariant: \"outline\" (optional)\\nsize: \"s\" (optional),\\ntext: \"Button\"\\n...other ifx-button properties\\n}',\n },\n },\n },\n }\n};\n\n\n\nconst DefaultTemplate = (args) => {\n if (args.filterOrientation === 'none') {\n const table = `<ifx-table\n row-height=\"${args.rowHeight}\"\n cols='${JSON.stringify(args.columnDefs)}'\n rows='${JSON.stringify(args.rowData)}'\n table-height=\"${args.tableHeight}\"\n pagination=\"${args.pagination}\"\n pagination-page-size=\"${args.paginationPageSize}\"\n filter-orientation=\"${args.filterOrientation}\">\n</ifx-table>`;\n return table;\n } else {\n //sidebar\n const filterAccordions = args.columnDefs.map(column => {\n const uniqueColValues = [...new Set(args.rowData.map(row => row[column.field]))];\n const filterOptions = uniqueColValues.map((option, index) => {\n return `<ifx-list-entry slot=\"slot${index}\" label=\"${option}\" value=\"false\"></ifx-list-entry>`;\n }).join('');\n\n return `\n <ifx-filter-accordion slot=\"filter-accordion\" filter-group-name=\"${column.field}\">\n <ifx-list slot=\"list\" type=\"checkbox\" name=\"${column.field}\" max-visible-items=\"6\">\n ${filterOptions}\n </ifx-list>\n </ifx-filter-accordion>\n `;\n }).join('');\n\n //topbar\n const filterComponents = args.columnDefs.map((column, index) => {\n const uniqueColValues = [...new Set(args.rowData.map(row => row[column.field]))];\n const options = uniqueColValues.map(option => ({\n value: option,\n label: option,\n selected: false\n }));\n\n // Directly use JSON.stringify without replacing quotes\n const optionsString = JSON.stringify(options);\n\n return `\n <ifx-set-filter slot=\"filter-component-${index + 1}\"\n options='${optionsString}' \n filter-label='${column.headerName}'\n filter-name='${column.field}'\n type='multi-select'\n search-enabled='true'>\n </ifx-set-filter>\n `;\n }).join('\\n');\n\n\n\n const filterTypeGroupComponent = args.filterOrientation === 'sidebar'\n ? `<ifx-filter-type-group slot=\"sidebar-filter\">\n <div slot=\"filter-search\">\n <ifx-filter-search filter-orientation=\"sidebar\" filter-name=\"search\"></ifx-filter-search>\n </div>\n ${filterAccordions}\n </ifx-filter-type-group>`\n :\n `<ifx-filter-bar slot=\"topbar-filter\" max-shown-filters=\"3\">\n <ifx-filter-search slot=\"filter-search\" filter-orientation=\"topbar\"></ifx-filter-search>\n ${filterComponents}\n </ifx-filter-bar>`;\n\n const table = `<ifx-table\n row-height=\"${args.rowHeight}\"\n cols='${JSON.stringify(args.columnDefs)}'\n rows='${JSON.stringify(args.rowData)}'\n table-height=\"${args.tableHeight}\"\n pagination=\"${args.pagination}\"\n pagination-page-size=\"${args.paginationPageSize}\"\n filter-orientation=\"${args.filterOrientation}\">\n ${filterTypeGroupComponent}\n</ifx-table>`;\n\n return table;\n }\n};\n\n\n\nexport const Pagination = DefaultTemplate.bind({});\nPagination.args = {\n pagination: true,\n paginationPageSize: 10,\n rowHeight: 'default',\n columnDefs: columnDefs,\n rowData: rowData,\n filterOrientation: 'none',\n};\n\n\nconst CustomCellTemplate = (args) => {\n const table = `\n <ifx-table\n row-height=\"${args.rowHeight}\"\n cols='${JSON.stringify(args.columnDefs)}'\n rows='${JSON.stringify(args.rowData)}'\n table-height=\"${args.tableHeight}\"\n pagination=\"${args.pagination}\"\n pagination-page-size=\"${args.paginationPageSize}\"\n filter-orientation=\"${args.filterOrientation}\">\n </ifx-table>`;\n return table;\n};\n\n\n\nexport const IncludesButtons = CustomCellTemplate.bind({});\nIncludesButtons.args = {\n rowHeight: 'default',\n columnDefs: columnDefsWithButtonCol,\n rowData: rowDataWithButtonCol,\n filterOrientation: 'none',\n pagination: false,\n paginationPageSize: 10,\n};\n\nexport const SidebarFilter = DefaultTemplate.bind({});\nSidebarFilter.args = {\n rowHeight: 'default',\n columnDefs: columnDefs,\n rowData: rowData,\n filterOrientation: 'sidebar',\n};\n\nexport const TopbarFilter = DefaultTemplate.bind({});\nTopbarFilter.args = {\n rowHeight: 'default',\n columnDefs: columnDefs,\n rowData: rowData,\n filterOrientation: 'topbar',\n};\n"]}
1
+ {"version":3,"file":"table.stories.js","sourceRoot":"","sources":["../../../src/components/table-advanced-version/table.stories.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,GAAG;IACjB,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,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;IACtB,OAAO,EAAE,OAAO;IAChB,iBAAiB,EAAE,QAAQ;IAC3B,qBAAqB,EAAE;QACrB,aAAa,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YAC/B,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;QAChD,CAAC;KACF;CACF,CAAC","sourcesContent":["const columnDefs = [\n { headerName: 'Make', field: 'make', sortable: true, sort: 'desc', unSortIcon: true },\n { headerName: 'Model', field: 'model', sortable: true, unSortIcon: true },\n { headerName: 'Price', field: 'price' },\n { headerName: 'Age', field: 'age' }\n];\n\nconst rowData = [\n { make: 'Toyota', model: 'Celica', price: 35000, age: 10 },\n { make: 'Ford', model: 'Mondeo', price: 32000, age: 12 },\n { make: 'Porsche', model: 'Boxster', price: 72000 },\n { make: 'Bmw', model: 'x', price: 72000 },\n { make: 'Mercedes', model: 'y', price: 72000 },\n { make: 'Ferrari', model: 'z', price: 72000 },\n { make: 'Chrysler', model: 'a', price: 72000 },\n { make: 'Range rover', model: 'b', price: 72000 },\n { make: 'Tesla', model: 'x', price: 72000 },\n { make: 'Audi', model: '3', price: 72000 },\n { make: 'Landrover', model: 'x', price: 72000 },\n];\n\nconst columnDefsWithButtonCol = [\n { headerName: 'Make', field: 'make', sortable: true, sort: 'desc', unSortIcon: true },\n { headerName: 'Model', field: 'model', sortable: true, unSortIcon: true },\n { headerName: 'Price', field: 'price' },\n { headerName: 'Age', field: 'age' },\n { \n headerName: '', \n field: 'button',\n }\n];\n\n\nconst rowDataWithButtonCol = [\n {\n make: 'Toyota', model: 'Celica', price: 35000, age: 10, button: {\n disabled: false,\n variant: \"secondary\",\n size: \"s\",\n target: \"_blank\",\n href: \"https://www.w3schools.com/\",\n theme: \"default\",\n type: \"button\",\n fullWidth: true,\n text: \"Toyota Button\"\n }\n },\n {\n make: 'Ford', model: 'Mondeo', price: 32000, age: 12, button: {\n disabled: false,\n variant: \"secondary\",\n size: \"s\",\n target: \"_blank\",\n href: \"https://www.w3schools.com/\",\n theme: \"default\",\n type: \"button\",\n fullWidth: true,\n text: \"Ford Button\"\n }\n },\n {\n make: 'Porsche', model: 'Boxster', price: 72000, button: {\n disabled: false,\n variant: \"secondary\",\n size: \"s\",\n target: \"_blank\",\n href: \"https://www.w3schools.com/\",\n theme: \"default\",\n type: \"button\",\n fullWidth: true,\n text: \"Porsche Button\"\n }\n }\n];\n \nexport default {\n title: 'Components/Table (advanced)',\n args: {\n tableHeight: 'auto',\n pagination: false,\n paginationPageSize: 10,\n currentPage: 1,\n rowHeight: 40,\n showLoading: false,\n buttonRendererOptions: {\n onButtonClick: (params, event) => {\n console.log('Button clicked:', params, event);\n }\n }\n },\n argTypes: {\n tableHeight: {\n table: {\n type: {\n summary: 'Options',\n detail: 'Default: \"auto\"\\nExample for fixed height: \"400px\"',\n }\n },\n },\n paginationPageSize: {\n description: \"Results per page: minimum 10 - maximum 30\",\n control: { type: 'number', min: 10, max: 30, step: 10 }\n },\n showLoading: {\n options: [true, false],\n control: { type: 'radio' },\n },\n rowHeight: {\n options: ['compact', 'default'],\n control: { type: 'radio' },\n },\n filterOrientation: {\n options: ['sidebar', 'topbar', 'none'],\n control: { type: 'radio' },\n },\n columnDefs: {\n table: {\n type: {\n summary: 'Column header options',\n detail: 'Standard columns:\\nheaderName: \"Model\", \\nfield: \"model\", \\nsortable: true (optional),\\nsort: \"desc\" (optional) => descending sort (show icon)\\nunSortIcon: true (optional) => unsorted (show icon)\\n\\nSpecial columns:\\nheaderName: \"\",\\nfield: \"button\"\\nheaderName: \"\",\\nfield: \"link\"',\n },\n },\n },\n rowData: {\n table: {\n type: {\n summary: 'Row data options',\n detail: 'Standard row values:\\nmake: \"Toyota\", \\nmodel: \"Celica\", \\nprice: 35000 \\n\\nSpecial row values (incl buttons):\\nmake: \"Porsche\",\\nmodel: \"Boxster\",\\nprice: \"72000\",\\nbutton: { \\ndisabled: false (optional),\\nvariant: \"outline\" (optional)\\nsize: \"s\" (optional),\\ntext: \"Button\"\\n...other ifx-button properties\\n}',\n },\n },\n },\n buttonRendererOptions: {\n control: 'object',\n description: 'Options for button cell renderer, including event handlers.',\n table: {\n type: {\n summary: 'Button Renderer Options',\n detail: 'Custom event handlers and other options for the button cell renderer in the table.'\n },\n },\n },\n }\n};\n\nconst DefaultTemplate = (args) => {\n const table = `\n <ifx-table\n row-height=\"${args.rowHeight}\"\n cols='${JSON.stringify(args.columnDefs)}'\n rows='${JSON.stringify(args.rowData)}'\n table-height=\"${args.tableHeight}\"\n pagination=\"${args.pagination}\"\n pagination-page-size=\"${args.paginationPageSize}\"\n filter-orientation=\"${args.filterOrientation}\">\n </ifx-table>`;\n return table;\n};\n\n\nexport const Pagination = DefaultTemplate.bind({});\nPagination.args = {\n pagination: true,\n paginationPageSize: 10,\n rowHeight: 'default',\n columnDefs: columnDefs,\n rowData: rowData,\n filterOrientation: 'none',\n};\n\n\nconst CustomCellTemplate = (args) => {\n const table = `\n <ifx-table\n row-height=\"${args.rowHeight}\"\n cols='${JSON.stringify(args.columnDefs)}'\n rows='${JSON.stringify(args.rowData)}'\n table-height=\"${args.tableHeight}\"\n pagination=\"${args.pagination}\"\n pagination-page-size=\"${args.paginationPageSize}\"\n filter-orientation=\"${args.filterOrientation}\">\n </ifx-table>`;\n return table;\n};\n\n\n\nexport const IncludesButtons = CustomCellTemplate.bind({});\nIncludesButtons.args = {\n rowHeight: 'default',\n columnDefs: columnDefsWithButtonCol,\n rowData: rowDataWithButtonCol,\n filterOrientation: 'none',\n pagination: false,\n paginationPageSize: 10,\n};\n\nexport const SidebarFilter = DefaultTemplate.bind({});\nSidebarFilter.args = {\n rowHeight: 'default',\n columnDefs: columnDefs,\n rowData: rowData,\n filterOrientation: 'sidebar',\n buttonRendererOptions: {\n onButtonClick: (params, event) => {\n console.log('Button clicked:', params, event);\n }\n }\n};\n\nexport const TopbarFilter = DefaultTemplate.bind({});\nTopbarFilter.args = {\n rowHeight: 'default',\n columnDefs: columnDefs,\n rowData: rowData,\n filterOrientation: 'topbar',\n buttonRendererOptions: {\n onButtonClick: (params, event) => {\n console.log('Button clicked:', params, event);\n }\n }\n};\n"]}
@@ -9,29 +9,17 @@ const rows = [
9
9
  { make: 'Toyota', model: 'Celica', price: 35000, age: 10 },
10
10
  { make: 'Ford', model: 'Mondeo', price: 32000, age: 12 },
11
11
  { make: 'Porsche', model: 'Boxster', price: 72000 },
12
- { make: 'Toyota', model: 'Celica', price: 37000, age: 8 },
13
- { make: 'Ford', model: 'Mondeo', price: 34000, age: 10 },
14
- { make: 'Porsche', model: 'Boxster', price: 72000 },
15
- { make: 'Toyota', model: 'Celica', price: 38000, age: 7 },
16
- { make: 'Ford', model: 'Mondeo', price: 36000, age: 8 },
17
- { make: 'Porsche', model: 'Boxster', price: 72000 },
18
- { make: 'Toyota', model: 'Celica', price: 39000, age: 2 },
19
- { make: 'Ford', model: 'Mondeo', price: 38000, age: 6 },
20
- { make: 'Porsche', model: 'Boxster', price: 72000 },
21
12
  ];
22
13
  export default {
23
14
  title: 'Components/Table (basic)',
24
15
  // tags: ['autodocs'],
25
16
  args: {
26
17
  tableHeight: 'auto',
27
- rowHeight: 'default',
18
+ rowHeight: 40,
28
19
  },
29
20
  argTypes: {
30
21
  tableHeight: {
31
- description: 'Controls the height of the table.',
32
22
  table: {
33
- category: 'ifx-table props',
34
- defaultValue: { summary: 'auto' },
35
23
  type: {
36
24
  summary: 'Options',
37
25
  detail: 'Default: "auto"\nExample for fixed height: "400px"',
@@ -39,35 +27,22 @@ export default {
39
27
  },
40
28
  },
41
29
  rowHeight: {
42
- description: 'Controls the height of the rows.',
43
- table: {
44
- category: 'ifx-table props',
45
- defaultValue: { summary: 'default' },
46
- type: {
47
- summary: 'Options',
48
- detail: 'Default: 40\nCompact: 32\nOptions: 40, 32',
49
- },
50
- },
51
30
  options: ['compact', 'default'],
52
31
  control: { type: 'radio' },
53
32
  },
54
33
  cols: {
55
- description: 'The array must be a string for Vanilla JavaScript, and stringified or array object for React/Vue/Angular.',
56
34
  table: {
57
- category: 'ifx-table props',
58
35
  type: {
59
36
  summary: 'Column header options',
60
- detail: 'Standard columns:\nheaderName: "Model", \nfield: "model", \nsortable: true (optional),\nsort: "desc" (optional) => descending sort (show icon)\nunSortIcon: true (optional) => unsorted (show icon)\nresizable: false\nflex: 1\nminWidth: 50px\nwidth: 100px\n\nSpecial columns:\nheaderName: "",\nfield: "button"\nheaderName: "",\nfield: "link",',
37
+ detail: 'Standard columns:\nheaderName: "Model", \nfield: "model", \nsortable: true (optional),\nsort: "desc" (optional) => descending sort (show icon)\nunSortIcon: true (optional) => unsorted (show icon)\n\nSpecial columns:\nheaderName: "",\nfield: "button"\nheaderName: "",\nfield: "link"',
61
38
  },
62
39
  },
63
40
  },
64
41
  rows: {
65
- description: 'The array must be a string for Vanilla JavaScript, and stringified or array object for React/Vue/Angular.',
66
42
  table: {
67
- category: 'ifx-table props',
68
43
  type: {
69
44
  summary: 'Row data options',
70
- detail: 'Standard row values:\nmake: "Toyota", \nmodel: "Celica", \nprice: 35000\nresizable: false\nflex: 1\nminWidth: 50px\nwidth: 100px\n\nSpecial row values (incl buttons):\nmake: "Porsche",\nmodel: "Boxster",\nprice: "72000",\nbutton: { \ndisabled: false (optional),\nvariant: "outline" (optional)\nsize: "s" (optional),\ntext: "Button"\n...other ifx-button properties\n}',
45
+ detail: 'Standard row values:\nmake: "Toyota", \nmodel: "Celica", \nprice: 35000 \n\nSpecial row values (incl buttons):\nmake: "Porsche",\nmodel: "Boxster",\nprice: "72000",\nbutton: { \ndisabled: false (optional),\nvariant: "outline" (optional)\nsize: "s" (optional),\ntext: "Button"\n...other ifx-button properties\n}',
71
46
  },
72
47
  },
73
48
  },
@@ -76,14 +51,12 @@ export default {
76
51
  const DefaultTemplate = args => `<ifx-basic-table
77
52
  cols='${JSON.stringify(args.cols)}'
78
53
  rows='${JSON.stringify(args.rows)}'
79
- table-height='${args.tableHeight}'
80
- row-height='${args.rowHeight}'>
54
+ table-height='${args.tableHeight}'>
81
55
  </ifx-basic-table>`;
82
56
  export const Default = DefaultTemplate.bind({});
83
57
  Default.args = {
84
58
  cols: cols,
85
59
  rows: rows,
86
- tableHeight: 'auto',
87
60
  };
88
61
  export const FixedHeight = DefaultTemplate.bind({});
89
62
  FixedHeight.args = {
@@ -1 +1 @@
1
- {"version":3,"file":"table.stories.js","sourceRoot":"","sources":["../../../src/components/table-basic-version/table.stories.ts"],"names":[],"mappings":"AAAA,SAAS;AACT,MAAM,IAAI,GAAG;IACX,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE;IACrF,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;IACzE,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IACvC,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;CACpC,CAAC;AACF,MAAM,IAAI,GAAG;IACX,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;IAC1D,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;IACxD,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE;IACnD,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE;IACzD,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;I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;oBACJ,OAAO,EAAE,SAAS;oBAClB,MAAM,EAAE,2CAA2C;iBACpD;aACF;YACD,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;YAC/B,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SAC3B;QACD,IAAI,EAAE;YACJ,WAAW,EAAE,2GAA2G;YACxH,KAAK,EAAE;gBACL,QAAQ,EAAE,iBAAiB;gBAC3B,IAAI,EAAE;oBACJ,OAAO,EAAE,uBAAuB;oBAChC,MAAM,EACJ,qVAAqV;iBACxV;aACF;SACF;QACD,IAAI,EAAE;YACJ,WAAW,EAAE,2GAA2G;YACxH,KAAK,EAAE;gBACL,QAAQ,EAAE,iBAAiB;gBAC3B,IAAI,EAAE;oBACJ,OAAO,EAAE,kBAAkB;oBAC3B,MAAM,EACJ,gXAAgX;iBACnX;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE,CAAC;QACxB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;gBACjB,IAAI,CAAC,WAAW;cAClB,IAAI,CAAC,SAAS;mBACT,CAAC;AAEpB,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChD,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;IACV,WAAW,EAAE,MAAM;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpD,WAAW,CAAC,IAAI,GAAG;IACjB,WAAW,EAAE,OAAO;IACpB,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;CACX,CAAC","sourcesContent":["//default\nconst cols = [\n { headerName: 'Make', field: 'make', sortable: true, sort: 'desc', unSortIcon: true },\n { headerName: 'Model', field: 'model', sortable: true, unSortIcon: true },\n { headerName: 'Price', field: 'price' },\n { headerName: 'Age', field: 'age' },\n];\nconst rows = [\n { make: 'Toyota', model: 'Celica', price: 35000, age: 10 },\n { make: 'Ford', model: 'Mondeo', price: 32000, age: 12 },\n { make: 'Porsche', model: 'Boxster', price: 72000 },\n { make: 'Toyota', model: 'Celica', price: 37000, age: 8 },\n { make: 'Ford', model: 'Mondeo', price: 34000, age: 10 },\n { make: 'Porsche', model: 'Boxster', price: 72000 },\n { make: 'Toyota', model: 'Celica', price: 38000, age: 7 },\n { make: 'Ford', model: 'Mondeo', price: 36000, age: 8 },\n { make: 'Porsche', model: 'Boxster', price: 72000 },\n { make: 'Toyota', model: 'Celica', price: 39000, age: 2 },\n { make: 'Ford', model: 'Mondeo', price: 38000, age: 6 },\n { make: 'Porsche', model: 'Boxster', price: 72000 },\n];\n\nexport default {\n title: 'Components/Table (basic)',\n // tags: ['autodocs'],\n args: {\n tableHeight: 'auto',\n rowHeight: 'default',\n },\n argTypes: {\n tableHeight: {\n description: 'Controls the height of the table.',\n table: {\n category: 'ifx-table props',\n defaultValue: { summary: 'auto' },\n type: {\n summary: 'Options',\n detail: 'Default: \"auto\"\\nExample for fixed height: \"400px\"',\n },\n },\n },\n rowHeight: {\n description: 'Controls the height of the rows.',\n table: {\n category: 'ifx-table props',\n defaultValue: { summary: 'default' },\n type: {\n summary: 'Options',\n detail: 'Default: 40\\nCompact: 32\\nOptions: 40, 32',\n },\n },\n options: ['compact', 'default'],\n control: { type: 'radio' },\n },\n cols: {\n description: 'The array must be a string for Vanilla JavaScript, and stringified or array object for React/Vue/Angular.',\n table: {\n category: 'ifx-table props',\n type: {\n summary: 'Column header options',\n detail:\n 'Standard columns:\\nheaderName: \"Model\", \\nfield: \"model\", \\nsortable: true (optional),\\nsort: \"desc\" (optional) => descending sort (show icon)\\nunSortIcon: true (optional) => unsorted (show icon)\\nresizable: false\\nflex: 1\\nminWidth: 50px\\nwidth: 100px\\n\\nSpecial columns:\\nheaderName: \"\",\\nfield: \"button\"\\nheaderName: \"\",\\nfield: \"link\",',\n },\n },\n },\n rows: {\n description: 'The array must be a string for Vanilla JavaScript, and stringified or array object for React/Vue/Angular.',\n table: {\n category: 'ifx-table props',\n type: {\n summary: 'Row data options',\n detail:\n 'Standard row values:\\nmake: \"Toyota\", \\nmodel: \"Celica\", \\nprice: 35000\\nresizable: false\\nflex: 1\\nminWidth: 50px\\nwidth: 100px\\n\\nSpecial row values (incl buttons):\\nmake: \"Porsche\",\\nmodel: \"Boxster\",\\nprice: \"72000\",\\nbutton: { \\ndisabled: false (optional),\\nvariant: \"outline\" (optional)\\nsize: \"s\" (optional),\\ntext: \"Button\"\\n...other ifx-button properties\\n}',\n },\n },\n },\n },\n};\n\nconst DefaultTemplate = args => `<ifx-basic-table \ncols='${JSON.stringify(args.cols)}' \nrows='${JSON.stringify(args.rows)}'\ntable-height='${args.tableHeight}'\nrow-height='${args.rowHeight}'>\n</ifx-basic-table>`;\n\nexport const Default = DefaultTemplate.bind({});\nDefault.args = {\n cols: cols,\n rows: rows,\n tableHeight: 'auto',\n};\n\nexport const FixedHeight = DefaultTemplate.bind({});\nFixedHeight.args = {\n tableHeight: '400px',\n cols: cols,\n rows: rows,\n};\n"]}
1
+ {"version":3,"file":"table.stories.js","sourceRoot":"","sources":["../../../src/components/table-basic-version/table.stories.ts"],"names":[],"mappings":"AAAA,SAAS;AACT,MAAM,IAAI,GAAG;IACX,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE;IACrF,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;IACzE,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IACvC,EAAE,UAAU,EAAE,KAAK,EAAE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AAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChD,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;CACX,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpD,WAAW,CAAC,IAAI,GAAG;IACjB,WAAW,EAAE,OAAO;IACpB,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;CACX,CAAC","sourcesContent":["//default\nconst cols = [\n { headerName: 'Make', field: 'make', sortable: true, sort: 'desc', unSortIcon: true },\n { headerName: 'Model', field: 'model', sortable: true, unSortIcon: true },\n { headerName: 'Price', field: 'price' },\n { headerName: 'Age', field: 'age' },\n];\nconst rows = [\n { make: 'Toyota', model: 'Celica', price: 35000, age: 10 },\n { make: 'Ford', model: 'Mondeo', price: 32000, age: 12 },\n { make: 'Porsche', model: 'Boxster', price: 72000 },\n];\n\nexport default {\n title: 'Components/Table (basic)',\n // tags: ['autodocs'],\n args: {\n tableHeight: 'auto',\n rowHeight: 40,\n },\n argTypes: {\n tableHeight: {\n table: {\n type: {\n summary: 'Options',\n detail: 'Default: \"auto\"\\nExample for fixed height: \"400px\"',\n },\n },\n },\n rowHeight: {\n options: ['compact', 'default'],\n control: { type: 'radio' },\n },\n cols: {\n table: {\n type: {\n summary: 'Column header options',\n detail:\n 'Standard columns:\\nheaderName: \"Model\", \\nfield: \"model\", \\nsortable: true (optional),\\nsort: \"desc\" (optional) => descending sort (show icon)\\nunSortIcon: true (optional) => unsorted (show icon)\\n\\nSpecial columns:\\nheaderName: \"\",\\nfield: \"button\"\\nheaderName: \"\",\\nfield: \"link\"',\n },\n },\n },\n rows: {\n table: {\n type: {\n summary: 'Row data options',\n detail:\n 'Standard row values:\\nmake: \"Toyota\", \\nmodel: \"Celica\", \\nprice: 35000 \\n\\nSpecial row values (incl buttons):\\nmake: \"Porsche\",\\nmodel: \"Boxster\",\\nprice: \"72000\",\\nbutton: { \\ndisabled: false (optional),\\nvariant: \"outline\" (optional)\\nsize: \"s\" (optional),\\ntext: \"Button\"\\n...other ifx-button properties\\n}',\n },\n },\n },\n },\n};\n\nconst DefaultTemplate = args => `<ifx-basic-table \ncols='${JSON.stringify(args.cols)}' \nrows='${JSON.stringify(args.rows)}'\ntable-height='${args.tableHeight}'>\n</ifx-basic-table>`;\n\nexport const Default = DefaultTemplate.bind({});\nDefault.args = {\n cols: cols,\n rows: rows,\n};\n\nexport const FixedHeight = DefaultTemplate.bind({});\nFixedHeight.args = {\n tableHeight: '400px',\n cols: cols,\n rows: rows,\n};\n"]}
@@ -41,7 +41,7 @@ export class IfxTabs {
41
41
  componentWillLoad() {
42
42
  this.internalOrientation = this.orientation.toLowerCase() === 'vertical' ? 'vertical' : 'horizontal';
43
43
  if (this.internalActiveTabIndex !== this.activeTabIndex) {
44
- this.ifxChange.emit({ previousTab: this.internalActiveTabIndex, currentTab: this.activeTabIndex });
44
+ this.ifxTabChange.emit({ previousTab: this.internalActiveTabIndex, currentTab: this.activeTabIndex });
45
45
  }
46
46
  ;
47
47
  this.onSlotChange();
@@ -154,7 +154,7 @@ export class IfxTabs {
154
154
  return `tab-item ${this.fullWidth ? 'full-width' : ""} ${isActive ? 'active' : ''} ${isDisabled ? 'disabled' : ''} ${'icon__' + iconPosition}`;
155
155
  }
156
156
  handleClick(tab, index) {
157
- this.ifxChange.emit({ previousTab: this.internalActiveTabIndex, currentTab: index });
157
+ this.ifxTabChange.emit({ previousTab: this.internalActiveTabIndex, currentTab: index });
158
158
  if (!tab.disabled)
159
159
  this.internalActiveTabIndex = index;
160
160
  }
@@ -187,15 +187,15 @@ export class IfxTabs {
187
187
  if (this.internalFocusedTabIndex !== -1 && !this.tabObjects[this.internalFocusedTabIndex].disabled) {
188
188
  const previouslyActiveTabIndex = this.internalActiveTabIndex;
189
189
  this.internalActiveTabIndex = this.internalFocusedTabIndex;
190
- this.ifxChange.emit({ previousTab: previouslyActiveTabIndex, currentTab: this.internalFocusedTabIndex });
190
+ this.ifxTabChange.emit({ previousTab: previouslyActiveTabIndex, currentTab: this.internalFocusedTabIndex });
191
191
  }
192
192
  }
193
193
  }
194
194
  render() {
195
195
  var _a;
196
- return (h("div", { key: '3a022d8b1299785fcfc8e23a0180debdaeebbc19', "aria-label": "navigation tabs", class: `tabs ${this.internalOrientation}` }, h("ul", { key: '5d8d85681ad17528cfd5d51bed56df985e936bcd', role: "tablist", class: "tabs-list" }, (_a = this.tabObjects) === null || _a === void 0 ? void 0 :
196
+ return (h("div", { key: 'b94b74545720034560b78d35909a4757c9239c28', "aria-label": "navigation tabs", class: `tabs ${this.internalOrientation}` }, h("ul", { key: '9689012ae62d5d22c7f9938bce7a5247d7fd1022', role: "tablist", class: "tabs-list" }, (_a = this.tabObjects) === null || _a === void 0 ? void 0 :
197
197
  _a.map((tab, index) => (h("li", { class: this.getTabItemClass(index), ref: (el) => (this.tabHeaderRefs[index] = el), onMouseDown: (event) => event.preventDefault(), onClick: () => this.handleClick(tab, index), "aria-selected": index === this.internalActiveTabIndex ? 'true' : 'false', "aria-disabled": tab.disabled ? 'true' : 'false', role: "tab" }, (tab === null || tab === void 0 ? void 0 : tab.icon) ? h("ifx-icon", { icon: tab.icon }) : '', tab === null || tab === void 0 ? void 0 :
198
- tab.header))), h("div", { key: 'c0b1d541c10581ee7d097697d155b24a9c862178', class: "active-border" })), h("div", { key: '8b79fe69929791ffdc7ef4d765304a46ac09af08', class: "tab-content" }, Array.from(this.tabObjects).map((_, index) => (h("div", { style: { display: index === this.internalActiveTabIndex ? 'block' : 'none' } }, h("slot", { name: `tab-${index}` })))))));
198
+ tab.header))), h("div", { key: '0365da7db703747de5996d5b48f1a59ba3ebc3e0', class: "active-border" })), h("div", { key: '53bdc3fbd557dec39cbdea5543ef7e56bf57a156', class: "tab-content" }, Array.from(this.tabObjects).map((_, index) => (h("div", { style: { display: index === this.internalActiveTabIndex ? 'block' : 'none' } }, h("slot", { name: `tab-${index}` })))))));
199
199
  }
200
200
  static get is() { return "ifx-tabs"; }
201
201
  static get encapsulation() { return "shadow"; }
@@ -286,8 +286,8 @@ export class IfxTabs {
286
286
  }
287
287
  static get events() {
288
288
  return [{
289
- "method": "ifxChange",
290
- "name": "ifxChange",
289
+ "method": "ifxTabChange",
290
+ "name": "ifxTabChange",
291
291
  "bubbles": true,
292
292
  "cancelable": true,
293
293
  "composed": true,
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.js","sourceRoot":"","sources":["../../../src/components/tabs/tabs.tsx"],"names":[],"mappings":"AAAA,aAAa;AACb,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AASvG,MAAM,OAAO,OAAO;IALpB;QAQU,gBAAW,GAAW,YAAY,CAAC;QAClB,mBAAc,GAAW,CAAC,CAAC;QAC5C,cAAS,GAAY,KAAK,CAAC;QAG1B,2BAAsB,GAAW,CAAC,CAAC;QACnC,4BAAuB,GAAW,CAAC,CAAC;QACpC,YAAO,GAAkB,EAAE,CAAC;QAC5B,kBAAa,GAAkB,EAAE,CAAC;QAClC,iBAAY,GAAa,EAAE,CAAC;QAC5B,eAAU,GAAU,EAAE,CAAC;KAoPjC;IA/OC,0BAA0B;QACxB,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC9B,CAAC;IAED,sBAAsB,CAAC,KAAa;;QAClC,IAAI,KAAK,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;YACpC,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;QACrC,CAAC;QACD,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;YACd,KAAK,GAAG,CAAC,CAAC;QACZ,CAAC;QACD,IAAI,CAAC,CAAA,MAAA,IAAI,CAAC,UAAU,CAAC,KAAK,CAA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aAAa,IACrB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAC7C,WAAK,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,KAAK,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE;gBAC/E,YAAM,IAAI,EAAE,OAAO,KAAK,EAAE,GAAI,CAC1B,CACP,CAAC,CACE,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["//ifxTabs.tsx\nimport { Component, h, Prop, State, Element, Listen, Event, EventEmitter, Watch } from '@stencil/core';\n \n\n\n@Component({\n tag: 'ifx-tabs',\n styleUrl: 'tabs.scss',\n shadow: true\n})\nexport class IfxTabs {\n @Element() el: HTMLElement;\n\n @Prop() orientation: string = \"horizontal\";\n @Prop({ mutable: true }) activeTabIndex: number = 0;\n @Prop() fullWidth: boolean = false;\n\n @State() internalOrientation: string;\n @State() internalActiveTabIndex: number = 0;\n @State() internalFocusedTabIndex: number = 0;\n @State() tabRefs: HTMLElement[] = [];\n @State() tabHeaderRefs: HTMLElement[] = [];\n @State() disabledTabs: string[] = [];\n @State() tabObjects: any[] = [];\n\n @Event() ifxChange: EventEmitter;\n\n @Listen('resize', {target: 'window'})\n updateBorderOnWindowResize() {\n this.updateBorderAndFocus();\n }\n\n setActiveAndFocusedTab(index: number) {\n if (index >= this.tabObjects.length) {\n index = this.tabObjects.length - 1;\n }\n if (index < 0) {\n index = 0;\n }\n if (!this.tabObjects[index]?.disabled) {\n this.internalActiveTabIndex = index;\n this.internalFocusedTabIndex = index;\n }\n }\n\n @Listen('tabHeaderChange')\n handleTabHeaderChange(e) { \n const tabIndex = e.target.getAttribute('slot').replace('tab-', '');\n this.tabObjects[tabIndex].header = e.detail;\n this.tabObjects = [...this.tabObjects]; \n }\n \n\n @Watch('activeTabIndex')\n activeTabIndexChanged(newValue: number, oldValue: number) {\n if (newValue !== oldValue) {\n this.setActiveAndFocusedTab(newValue);\n }\n }\n\n\n\n componentWillLoad() {\n this.internalOrientation = this.orientation.toLowerCase() === 'vertical' ? 'vertical' : 'horizontal';\n if (this.internalActiveTabIndex !== this.activeTabIndex) {\n this.ifxChange.emit({ previousTab: this.internalActiveTabIndex, currentTab: this.activeTabIndex });\n };\n this.onSlotChange();\n this.setActiveAndFocusedTab(this.activeTabIndex);\n this.updateTabStyles();\n }\n\n updateTabStyles() {\n this.tabHeaderRefs.forEach((tab, index) => {\n tab.classList.toggle('active', index === this.internalActiveTabIndex);\n tab.setAttribute('aria-selected', index === this.internalActiveTabIndex ? 'true' : 'false')\n });\n }\n\n\n // needed for smooth border transition\n reRenderBorder() {\n const borderElement = this.el.shadowRoot.querySelector('.active-border') as HTMLElement;\n if (borderElement && this.tabHeaderRefs[this.internalActiveTabIndex]) {\n if (this.orientation === 'horizontal') {\n\n borderElement.style.left = `${this.tabHeaderRefs[this.internalActiveTabIndex].offsetLeft}px`;\n borderElement.style.width = `${this.tabHeaderRefs[this.internalActiveTabIndex].offsetWidth}px`;\n borderElement.style.top = '';\n borderElement.style.height = '';\n } else {\n borderElement.style.top = `${this.tabHeaderRefs[this.internalActiveTabIndex].offsetTop}px`;\n borderElement.style.height = `${this.tabHeaderRefs[this.internalActiveTabIndex].offsetHeight}px`;\n borderElement.style.left = '';\n borderElement.style.width = '';\n }\n }\n }\n\n\n // when a slot is removed / added\n @Listen('slotchange')\n onSlotChange() {\n const tabs = this.el.querySelectorAll('ifx-tab');\n this.tabObjects = Array.from(tabs).map((tab) => {\n return {\n header: tab?.header,\n disabled: tab?.disabled === true,\n icon: tab?.icon,\n iconPosition: tab?.iconPosition\n }\n });\n\n this.tabRefs = Array.from(tabs);\n this.tabRefs.forEach((tab, index) => {\n tab.setAttribute('slot', `tab-${index}`);\n });\n }\n\n setDefaultOrientation() {\n const validOrientations = ['horizontal', 'vertical'];\n const lowercaseOrientation = this.orientation.toLowerCase();\n\n if (!validOrientations.includes(lowercaseOrientation)) {\n this.internalOrientation = 'horizontal';\n } else this.internalOrientation = this.orientation;\n }\n\n componentDidLoad() {\n this.updateBorderAndFocus();\n // Add keyboard event listeners for each tab header\n this.tabHeaderRefs.forEach((tab, index) => {\n tab.addEventListener('focus', this.onTabFocus(index));\n });\n\n }\n\n onTabFocus(index) {\n return () => {\n this.internalFocusedTabIndex = index;\n };\n }\n\n disconnectedCallback() {\n // Remove keyboard event listeners when component is unmounted\n this.tabHeaderRefs.forEach((tab, index) => {\n tab.removeEventListener('focus', this.onTabFocus(index));\n });\n }\n componentDidUpdate() {\n this.updateBorderAndFocus();\n }\n\n private updateBorderAndFocus() {\n this.reRenderBorder()\n this.updateTabFocusability();\n }\n\n private updateTabFocusability() {\n this.tabHeaderRefs.forEach((tab, index) => {\n tab.tabIndex = index === this.internalActiveTabIndex ? 0 : -1;\n })\n }\n\n\n private focusNextTab() {\n let nextIndex = this.internalFocusedTabIndex + 1;\n while (nextIndex < this.tabHeaderRefs.length && this.tabObjects[nextIndex].disabled) {\n nextIndex++;\n }\n if (nextIndex >= 0 && nextIndex < this.tabHeaderRefs.length) {\n this.internalFocusedTabIndex = nextIndex;\n this.tabHeaderRefs[nextIndex].focus();\n }\n }\n\n private focusPreviousTab() {\n let prevIndex = this.internalFocusedTabIndex - 1;\n while ((prevIndex >= 0) && (this.tabObjects[prevIndex].disabled)) {\n prevIndex--;\n }\n if ((prevIndex >= 0) && (prevIndex < this.tabHeaderRefs.length)) {\n this.internalFocusedTabIndex = prevIndex;\n this.tabHeaderRefs[prevIndex].focus();\n }\n }\n\n\n private getTabItemClass(index: number) {\n const isActive = index === this.internalActiveTabIndex && !this.tabObjects[index].disabled;\n const isDisabled = this.tabObjects[index].disabled;\n const iconPosition = this.tabObjects[index].iconPosition\n return `tab-item ${this.fullWidth ? 'full-width' : \"\"} ${isActive ? 'active' : ''} ${isDisabled ? 'disabled' : ''} ${'icon__'+iconPosition}`;\n }\n\n private handleClick(tab, index) {\n this.ifxChange.emit({ previousTab: this.internalActiveTabIndex, currentTab: index })\n if (!tab.disabled) this.internalActiveTabIndex = index;\n\n }\n\n\n\n @Listen('keydown')\n handleKeyDown(ev: KeyboardEvent) {\n if (ev.key === 'Tab') {\n\n if (ev.shiftKey) {\n // Shift + Tab\n if (this.internalFocusedTabIndex === 0) {\n // Allow default behavior to move focus out of component\n return;\n } else {\n ev.preventDefault();\n this.focusPreviousTab();\n }\n } else {\n // Tab\n if (this.internalFocusedTabIndex === this.tabHeaderRefs.length - 1) {\n // Allow default behavior to move focus out of component\n return;\n } else {\n ev.preventDefault();\n this.focusNextTab();\n }\n }\n } else if (ev.key === 'Enter') {\n if (this.internalFocusedTabIndex !== -1 && !this.tabObjects[this.internalFocusedTabIndex].disabled) {\n const previouslyActiveTabIndex = this.internalActiveTabIndex;\n this.internalActiveTabIndex = this.internalFocusedTabIndex;\n this.ifxChange.emit({ previousTab: previouslyActiveTabIndex, currentTab: this.internalFocusedTabIndex })\n }\n }\n }\n\n\n render() {\n return (\n <div aria-label=\"navigation tabs\" class={`tabs ${this.internalOrientation}`}>\n <ul role=\"tablist\" class=\"tabs-list\">\n {this.tabObjects?.map((tab, index) => (\n <li\n class={this.getTabItemClass(index)}\n ref={(el) => (this.tabHeaderRefs[index] = el)}\n onMouseDown={(event) => event.preventDefault()}\n onClick={() => this.handleClick(tab, index)}\n aria-selected={index === this.internalActiveTabIndex ? 'true' : 'false'}\n aria-disabled={tab.disabled ? 'true' : 'false'}\n role=\"tab\"\n > \n {tab?.icon ? <ifx-icon icon = {tab.icon}></ifx-icon> : ''}\n {tab?.header}\n </li>\n ))}\n <div class=\"active-border\"></div>\n </ul>\n <div class=\"tab-content\">\n {Array.from(this.tabObjects).map((_, index) => (\n <div style={{ display: index === this.internalActiveTabIndex ? 'block' : 'none' }}>\n <slot name={`tab-${index}`} />\n </div>\n ))}\n </div>\n </div>\n );\n }\n\n}"]}
1
+ {"version":3,"file":"tabs.js","sourceRoot":"","sources":["../../../src/components/tabs/tabs.tsx"],"names":[],"mappings":"AAAA,aAAa;AACb,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AASvG,MAAM,OAAO,OAAO;IALpB;QAQU,gBAAW,GAAW,YAAY,CAAC;QAClB,mBAAc,GAAW,CAAC,CAAC;QAC5C,cAAS,GAAY,KAAK,CAAC;QAG1B,2BAAsB,GAAW,CAAC,CAAC;QACnC,4BAAuB,GAAW,CAAC,CAAC;QACpC,YAAO,GAAkB,EAAE,CAAC;QAC5B,kBAAa,GAAkB,EAAE,CAAC;QAClC,iBAAY,GAAa,EAAE,CAAC;QAC5B,eAAU,GAAU,EAAE,CAAC;KAoPjC;IA/OC,0BAA0B;QACxB,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC9B,CAAC;IAED,sBAAsB,CAAC,KAAa;;QAClC,IAAI,KAAK,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;YACpC,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;QACrC,CAAC;QACD,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;YACd,KAAK,GAAG,CAAC,CAAC;QACZ,CAAC;QACD,IAAI,CAAC,CAAA,MAAA,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,0CAAE,QAAQ,CAAA,EAAE,CAAC;YACtC,IAAI,CAAC,sBAAsB,GAAG,KAAK,CAAC;YACpC,IAAI,CAAC,uBAAuB,GAAG,KAAK,CAAC;QACvC,CAAC;IACH,CAAC;IAGD,qBAAqB,CAAC,CAAC;QACrB,MAA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AAC,sBAAsB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE;gBAC/E,YAAM,IAAI,EAAE,OAAO,KAAK,EAAE,GAAI,CAC1B,CACP,CAAC,CACE,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["//ifxTabs.tsx\nimport { Component, h, Prop, State, Element, Listen, Event, EventEmitter, Watch } from '@stencil/core';\n \n\n\n@Component({\n tag: 'ifx-tabs',\n styleUrl: 'tabs.scss',\n shadow: true\n})\nexport class IfxTabs {\n @Element() el: HTMLElement;\n\n @Prop() orientation: string = \"horizontal\";\n @Prop({ mutable: true }) activeTabIndex: number = 0;\n @Prop() fullWidth: boolean = false;\n\n @State() internalOrientation: string;\n @State() internalActiveTabIndex: number = 0;\n @State() internalFocusedTabIndex: number = 0;\n @State() tabRefs: HTMLElement[] = [];\n @State() tabHeaderRefs: HTMLElement[] = [];\n @State() disabledTabs: string[] = [];\n @State() tabObjects: any[] = [];\n\n @Event() ifxTabChange: EventEmitter;\n\n @Listen('resize', {target: 'window'})\n updateBorderOnWindowResize() {\n this.updateBorderAndFocus();\n }\n\n setActiveAndFocusedTab(index: number) {\n if (index >= this.tabObjects.length) {\n index = this.tabObjects.length - 1;\n }\n if (index < 0) {\n index = 0;\n }\n if (!this.tabObjects[index]?.disabled) {\n this.internalActiveTabIndex = index;\n this.internalFocusedTabIndex = index;\n }\n }\n\n @Listen('tabHeaderChange')\n handleTabHeaderChange(e) { \n const tabIndex = e.target.getAttribute('slot').replace('tab-', '');\n this.tabObjects[tabIndex].header = e.detail;\n this.tabObjects = [...this.tabObjects]; \n }\n \n\n @Watch('activeTabIndex')\n activeTabIndexChanged(newValue: number, oldValue: number) {\n if (newValue !== oldValue) {\n this.setActiveAndFocusedTab(newValue);\n }\n }\n\n\n\n componentWillLoad() {\n this.internalOrientation = this.orientation.toLowerCase() === 'vertical' ? 'vertical' : 'horizontal';\n if (this.internalActiveTabIndex !== this.activeTabIndex) {\n this.ifxTabChange.emit({ previousTab: this.internalActiveTabIndex, currentTab: this.activeTabIndex });\n };\n this.onSlotChange();\n this.setActiveAndFocusedTab(this.activeTabIndex);\n this.updateTabStyles();\n }\n\n updateTabStyles() {\n this.tabHeaderRefs.forEach((tab, index) => {\n tab.classList.toggle('active', index === this.internalActiveTabIndex);\n tab.setAttribute('aria-selected', index === this.internalActiveTabIndex ? 'true' : 'false')\n });\n }\n\n\n // needed for smooth border transition\n reRenderBorder() {\n const borderElement = this.el.shadowRoot.querySelector('.active-border') as HTMLElement;\n if (borderElement && this.tabHeaderRefs[this.internalActiveTabIndex]) {\n if (this.orientation === 'horizontal') {\n\n borderElement.style.left = `${this.tabHeaderRefs[this.internalActiveTabIndex].offsetLeft}px`;\n borderElement.style.width = `${this.tabHeaderRefs[this.internalActiveTabIndex].offsetWidth}px`;\n borderElement.style.top = '';\n borderElement.style.height = '';\n } else {\n borderElement.style.top = `${this.tabHeaderRefs[this.internalActiveTabIndex].offsetTop}px`;\n borderElement.style.height = `${this.tabHeaderRefs[this.internalActiveTabIndex].offsetHeight}px`;\n borderElement.style.left = '';\n borderElement.style.width = '';\n }\n }\n }\n\n\n // when a slot is removed / added\n @Listen('slotchange')\n onSlotChange() {\n const tabs = this.el.querySelectorAll('ifx-tab');\n this.tabObjects = Array.from(tabs).map((tab) => {\n return {\n header: tab?.header,\n disabled: tab?.disabled === true,\n icon: tab?.icon,\n iconPosition: tab?.iconPosition\n }\n });\n\n this.tabRefs = Array.from(tabs);\n this.tabRefs.forEach((tab, index) => {\n tab.setAttribute('slot', `tab-${index}`);\n });\n }\n\n setDefaultOrientation() {\n const validOrientations = ['horizontal', 'vertical'];\n const lowercaseOrientation = this.orientation.toLowerCase();\n\n if (!validOrientations.includes(lowercaseOrientation)) {\n this.internalOrientation = 'horizontal';\n } else this.internalOrientation = this.orientation;\n }\n\n componentDidLoad() {\n this.updateBorderAndFocus();\n // Add keyboard event listeners for each tab header\n this.tabHeaderRefs.forEach((tab, index) => {\n tab.addEventListener('focus', this.onTabFocus(index));\n });\n\n }\n\n onTabFocus(index) {\n return () => {\n this.internalFocusedTabIndex = index;\n };\n }\n\n disconnectedCallback() {\n // Remove keyboard event listeners when component is unmounted\n this.tabHeaderRefs.forEach((tab, index) => {\n tab.removeEventListener('focus', this.onTabFocus(index));\n });\n }\n componentDidUpdate() {\n this.updateBorderAndFocus();\n }\n\n private updateBorderAndFocus() {\n this.reRenderBorder()\n this.updateTabFocusability();\n }\n\n private updateTabFocusability() {\n this.tabHeaderRefs.forEach((tab, index) => {\n tab.tabIndex = index === this.internalActiveTabIndex ? 0 : -1;\n })\n }\n\n\n private focusNextTab() {\n let nextIndex = this.internalFocusedTabIndex + 1;\n while (nextIndex < this.tabHeaderRefs.length && this.tabObjects[nextIndex].disabled) {\n nextIndex++;\n }\n if (nextIndex >= 0 && nextIndex < this.tabHeaderRefs.length) {\n this.internalFocusedTabIndex = nextIndex;\n this.tabHeaderRefs[nextIndex].focus();\n }\n }\n\n private focusPreviousTab() {\n let prevIndex = this.internalFocusedTabIndex - 1;\n while ((prevIndex >= 0) && (this.tabObjects[prevIndex].disabled)) {\n prevIndex--;\n }\n if ((prevIndex >= 0) && (prevIndex < this.tabHeaderRefs.length)) {\n this.internalFocusedTabIndex = prevIndex;\n this.tabHeaderRefs[prevIndex].focus();\n }\n }\n\n\n private getTabItemClass(index: number) {\n const isActive = index === this.internalActiveTabIndex && !this.tabObjects[index].disabled;\n const isDisabled = this.tabObjects[index].disabled;\n const iconPosition = this.tabObjects[index].iconPosition\n return `tab-item ${this.fullWidth ? 'full-width' : \"\"} ${isActive ? 'active' : ''} ${isDisabled ? 'disabled' : ''} ${'icon__'+iconPosition}`;\n }\n\n private handleClick(tab, index) {\n this.ifxTabChange.emit({ previousTab: this.internalActiveTabIndex, currentTab: index })\n if (!tab.disabled) this.internalActiveTabIndex = index;\n\n }\n\n\n\n @Listen('keydown')\n handleKeyDown(ev: KeyboardEvent) {\n if (ev.key === 'Tab') {\n\n if (ev.shiftKey) {\n // Shift + Tab\n if (this.internalFocusedTabIndex === 0) {\n // Allow default behavior to move focus out of component\n return;\n } else {\n ev.preventDefault();\n this.focusPreviousTab();\n }\n } else {\n // Tab\n if (this.internalFocusedTabIndex === this.tabHeaderRefs.length - 1) {\n // Allow default behavior to move focus out of component\n return;\n } else {\n ev.preventDefault();\n this.focusNextTab();\n }\n }\n } else if (ev.key === 'Enter') {\n if (this.internalFocusedTabIndex !== -1 && !this.tabObjects[this.internalFocusedTabIndex].disabled) {\n const previouslyActiveTabIndex = this.internalActiveTabIndex;\n this.internalActiveTabIndex = this.internalFocusedTabIndex;\n this.ifxTabChange.emit({ previousTab: previouslyActiveTabIndex, currentTab: this.internalFocusedTabIndex })\n }\n }\n }\n\n\n render() {\n return (\n <div aria-label=\"navigation tabs\" class={`tabs ${this.internalOrientation}`}>\n <ul role=\"tablist\" class=\"tabs-list\">\n {this.tabObjects?.map((tab, index) => (\n <li\n class={this.getTabItemClass(index)}\n ref={(el) => (this.tabHeaderRefs[index] = el)}\n onMouseDown={(event) => event.preventDefault()}\n onClick={() => this.handleClick(tab, index)}\n aria-selected={index === this.internalActiveTabIndex ? 'true' : 'false'}\n aria-disabled={tab.disabled ? 'true' : 'false'}\n role=\"tab\"\n > \n {tab?.icon ? <ifx-icon icon = {tab.icon}></ifx-icon> : ''}\n {tab?.header}\n </li>\n ))}\n <div class=\"active-border\"></div>\n </ul>\n <div class=\"tab-content\">\n {Array.from(this.tabObjects).map((_, index) => (\n <div style={{ display: index === this.internalActiveTabIndex ? 'block' : 'none' }}>\n <slot name={`tab-${index}`} />\n </div>\n ))}\n </div>\n </div>\n );\n }\n\n}"]}