@infineon/infineon-design-system-stencil 30.1.1--canary.1640.e4770f238d16196b9059daf4898d2d6ef7cdcbdd.0 → 30.2.0--canary.1641.2fa3dc92b1652a9ad0c0488d80e396bc04aab9d2.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 (324) hide show
  1. package/dist/cjs/ifx-accordion_2.cjs.entry.js +2 -2
  2. package/dist/cjs/ifx-accordion_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/ifx-basic-table.cjs.entry.js +1 -1
  4. package/dist/cjs/ifx-faq.cjs.entry.js +1 -1
  5. package/dist/cjs/ifx-filter-accordion.cjs.entry.js +2 -2
  6. package/dist/cjs/ifx-filter-bar.cjs.entry.js +1 -1
  7. package/dist/cjs/ifx-filter-search.cjs.entry.js +1 -1
  8. package/dist/cjs/ifx-filter-type-group.cjs.entry.js +1 -1
  9. package/dist/cjs/ifx-list-entry.cjs.entry.js +1 -1
  10. package/dist/cjs/ifx-modal.cjs.entry.js +8 -8
  11. package/dist/cjs/ifx-modal.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ifx-multiselect_2.cjs.entry.js +9 -9
  13. package/dist/cjs/ifx-multiselect_2.cjs.entry.js.map +1 -1
  14. package/dist/cjs/ifx-search-bar.cjs.entry.js +5 -5
  15. package/dist/cjs/ifx-search-bar.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ifx-select.cjs.entry.js +2 -2
  17. package/dist/cjs/ifx-select.cjs.entry.js.map +1 -1
  18. package/dist/cjs/ifx-sidebar-item.cjs.entry.js +9 -9
  19. package/dist/cjs/ifx-sidebar-item.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ifx-slider.cjs.entry.js +2 -2
  21. package/dist/cjs/ifx-spinner.cjs.entry.js +2 -2
  22. package/dist/cjs/ifx-status.cjs.entry.js +1 -1
  23. package/dist/cjs/ifx-step.cjs.entry.js +4 -4
  24. package/dist/cjs/ifx-stepper.cjs.entry.js +2 -2
  25. package/dist/cjs/ifx-switch.cjs.entry.js +1 -1
  26. package/dist/cjs/ifx-tab.cjs.entry.js +1 -1
  27. package/dist/cjs/ifx-table.cjs.entry.js +2 -2
  28. package/dist/cjs/ifx-tabs.cjs.entry.js +2 -2
  29. package/dist/cjs/ifx-tag.cjs.entry.js +1 -1
  30. package/dist/cjs/ifx-textarea.cjs.entry.js +2 -2
  31. package/dist/cjs/ifx-tooltip.cjs.entry.js +4 -4
  32. package/dist/cjs/infineon-design-system-stencil.cjs.js +1 -1
  33. package/dist/cjs/loader.cjs.js +1 -1
  34. package/dist/collection/components/accordion/accordion.stories.js +3 -79
  35. package/dist/collection/components/accordion/accordion.stories.js.map +1 -1
  36. package/dist/collection/components/accordion/accordionItem.js +4 -4
  37. package/dist/collection/components/accordion/accordionItem.js.map +1 -1
  38. package/dist/collection/components/alert/alert.stories.js +12 -45
  39. package/dist/collection/components/alert/alert.stories.js.map +1 -1
  40. package/dist/collection/components/badge/badge.stories.js +7 -28
  41. package/dist/collection/components/badge/badge.stories.js.map +1 -1
  42. package/dist/collection/components/breadcrumb/breadcrumb.stories.js +7 -66
  43. package/dist/collection/components/breadcrumb/breadcrumb.stories.js.map +1 -1
  44. package/dist/collection/components/button/button.stories.js +9 -104
  45. package/dist/collection/components/button/button.stories.js.map +1 -1
  46. package/dist/collection/components/card/card.stories.js +2 -85
  47. package/dist/collection/components/card/card.stories.js.map +1 -1
  48. package/dist/collection/components/checkbox/checkbox.stories.js +13 -74
  49. package/dist/collection/components/checkbox/checkbox.stories.js.map +1 -1
  50. package/dist/collection/components/content-switcher/content-switcher.stories.js +3 -48
  51. package/dist/collection/components/content-switcher/content-switcher.stories.js.map +1 -1
  52. package/dist/collection/components/date-picker/date-picker.stories.js +6 -73
  53. package/dist/collection/components/date-picker/date-picker.stories.js.map +1 -1
  54. package/dist/collection/components/dropdown/dropdown.stories.js +64 -161
  55. package/dist/collection/components/dropdown/dropdown.stories.js.map +1 -1
  56. package/dist/collection/components/footer/footer.stories.js +1 -7
  57. package/dist/collection/components/footer/footer.stories.js.map +1 -1
  58. package/dist/collection/components/icon/infineonIconStencil.stories.js +2 -7
  59. package/dist/collection/components/icon/infineonIconStencil.stories.js.map +1 -1
  60. package/dist/collection/components/icon-button/icon-button.stories.js +5 -61
  61. package/dist/collection/components/icon-button/icon-button.stories.js.map +1 -1
  62. package/dist/collection/components/link/link.stories.js +4 -56
  63. package/dist/collection/components/link/link.stories.js.map +1 -1
  64. package/dist/collection/components/modal/modal.js +10 -10
  65. package/dist/collection/components/modal/modal.js.map +1 -1
  66. package/dist/collection/components/modal/modal.stories.js +19 -96
  67. package/dist/collection/components/modal/modal.stories.js.map +1 -1
  68. package/dist/collection/components/navigation/navbar/navbar.stories.js +12 -203
  69. package/dist/collection/components/navigation/navbar/navbar.stories.js.map +1 -1
  70. package/dist/collection/components/navigation/sidebar/sidebar-item.js +11 -11
  71. package/dist/collection/components/navigation/sidebar/sidebar-item.js.map +1 -1
  72. package/dist/collection/components/navigation/sidebar/sidebar.stories.js +17 -110
  73. package/dist/collection/components/navigation/sidebar/sidebar.stories.js.map +1 -1
  74. package/dist/collection/components/notification/notification.stories.js +4 -51
  75. package/dist/collection/components/notification/notification.stories.js.map +1 -1
  76. package/dist/collection/components/number-indicator/number-indicator.stories.js +0 -19
  77. package/dist/collection/components/number-indicator/number-indicator.stories.js.map +1 -1
  78. package/dist/collection/components/pagination/pagination.stories.js +3 -30
  79. package/dist/collection/components/pagination/pagination.stories.js.map +1 -1
  80. package/dist/collection/components/progress-bar/progress-bar.stories.js +8 -31
  81. package/dist/collection/components/progress-bar/progress-bar.stories.js.map +1 -1
  82. package/dist/collection/components/radio-button/radio-button.stories.js +13 -66
  83. package/dist/collection/components/radio-button/radio-button.stories.js.map +1 -1
  84. package/dist/collection/components/search-bar/search-bar.js +6 -6
  85. package/dist/collection/components/search-bar/search-bar.js.map +1 -1
  86. package/dist/collection/components/search-bar/search-bar.stories.js +9 -58
  87. package/dist/collection/components/search-bar/search-bar.stories.js.map +1 -1
  88. package/dist/collection/components/search-field/search-field.stories.js +7 -43
  89. package/dist/collection/components/search-field/search-field.stories.js.map +1 -1
  90. package/dist/collection/components/select/multi-select/multiselect.js +6 -6
  91. package/dist/collection/components/select/multi-select/multiselect.js.map +1 -1
  92. package/dist/collection/components/select/multi-select/multiselect.stories.js +5 -131
  93. package/dist/collection/components/select/multi-select/multiselect.stories.js.map +1 -1
  94. package/dist/collection/components/select/single-select/select.css +16 -0
  95. package/dist/collection/components/select/single-select/select.js +1 -1
  96. package/dist/collection/components/select/single-select/select.js.map +1 -1
  97. package/dist/collection/components/select/single-select/select.stories.js +26 -83
  98. package/dist/collection/components/select/single-select/select.stories.js.map +1 -1
  99. package/dist/collection/components/slider/slider.js +2 -2
  100. package/dist/collection/components/slider/slider.stories.js +13 -97
  101. package/dist/collection/components/slider/slider.stories.js.map +1 -1
  102. package/dist/collection/components/spinner/spinner.js +2 -2
  103. package/dist/collection/components/spinner/spinner.stories.js +2 -34
  104. package/dist/collection/components/spinner/spinner.stories.js.map +1 -1
  105. package/dist/collection/components/status/status.js +1 -1
  106. package/dist/collection/components/status/status.stories.js +1 -24
  107. package/dist/collection/components/status/status.stories.js.map +1 -1
  108. package/dist/collection/components/stepper/step/step.js +4 -4
  109. package/dist/collection/components/stepper/stepper.js +2 -2
  110. package/dist/collection/components/stepper/stepper.stories.js +16 -33
  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.stories.js +4 -54
  114. package/dist/collection/components/switch/switch.stories.js.map +1 -1
  115. package/dist/collection/components/table-advanced-version/filter-bar/filter-bar.js +1 -1
  116. package/dist/collection/components/table-advanced-version/filter-type-group/filter-accordion/filter-accordion.js +2 -2
  117. package/dist/collection/components/table-advanced-version/filter-type-group/filter-search/filter-search.js +1 -1
  118. package/dist/collection/components/table-advanced-version/filter-type-group/filter-type-group.js +1 -1
  119. package/dist/collection/components/table-advanced-version/list/list-entry/list-entry.js +1 -1
  120. package/dist/collection/components/table-advanced-version/table.js +2 -2
  121. package/dist/collection/components/table-advanced-version/table.stories.js +13 -235
  122. package/dist/collection/components/table-advanced-version/table.stories.js.map +1 -1
  123. package/dist/collection/components/table-basic-version/table.js +1 -1
  124. package/dist/collection/components/table-basic-version/table.stories.js +1 -17
  125. package/dist/collection/components/table-basic-version/table.stories.js.map +1 -1
  126. package/dist/collection/components/tabs/tab.js +1 -1
  127. package/dist/collection/components/tabs/tabs.js +2 -2
  128. package/dist/collection/components/tabs/tabs.stories.js +23 -89
  129. package/dist/collection/components/tabs/tabs.stories.js.map +1 -1
  130. package/dist/collection/components/tag/tag.js +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.js +4 -4
  134. package/dist/collection/components/text-field/text-field.stories.js +13 -104
  135. package/dist/collection/components/text-field/text-field.stories.js.map +1 -1
  136. package/dist/collection/components/textarea/textarea.js +2 -2
  137. package/dist/collection/components/tooltip/tooltip.js +4 -4
  138. package/dist/collection/components/tooltip/tooltip.stories.js +4 -48
  139. package/dist/collection/components/tooltip/tooltip.stories.js.map +1 -1
  140. package/dist/collection/stories/setup-and-installation/faq/faq.js +1 -1
  141. package/dist/components/ifx-accordion-item.js +1 -1
  142. package/dist/components/ifx-basic-table.js +1 -1
  143. package/dist/components/ifx-faq.js +2 -2
  144. package/dist/components/ifx-filter-accordion.js +2 -2
  145. package/dist/components/ifx-filter-bar.js +1 -1
  146. package/dist/components/ifx-filter-search.js +1 -1
  147. package/dist/components/ifx-filter-type-group.js +1 -1
  148. package/dist/components/ifx-list-entry.js +1 -1
  149. package/dist/components/ifx-modal.js +8 -8
  150. package/dist/components/ifx-modal.js.map +1 -1
  151. package/dist/components/ifx-multiselect.js +1 -1
  152. package/dist/components/ifx-pagination.js +1 -1
  153. package/dist/components/ifx-search-bar.js +5 -5
  154. package/dist/components/ifx-search-bar.js.map +1 -1
  155. package/dist/components/ifx-select.js +1 -1
  156. package/dist/components/ifx-set-filter.js +3 -3
  157. package/dist/components/ifx-sidebar-item.js +11 -11
  158. package/dist/components/ifx-sidebar-item.js.map +1 -1
  159. package/dist/components/ifx-slider.js +2 -2
  160. package/dist/components/ifx-spinner.js +2 -2
  161. package/dist/components/ifx-status.js +1 -1
  162. package/dist/components/ifx-step.js +4 -4
  163. package/dist/components/ifx-stepper.js +2 -2
  164. package/dist/components/ifx-switch.js +1 -1
  165. package/dist/components/ifx-tab.js +1 -1
  166. package/dist/components/ifx-table.js +4 -4
  167. package/dist/components/ifx-tabs.js +2 -2
  168. package/dist/components/ifx-tag.js +1 -1
  169. package/dist/components/ifx-text-field.js +1 -1
  170. package/dist/components/ifx-textarea.js +2 -2
  171. package/dist/components/ifx-tooltip.js +4 -4
  172. package/dist/components/{p-78f3e867.js → p-0a68c458.js} +4 -4
  173. package/dist/components/{p-78f3e867.js.map → p-0a68c458.js.map} +1 -1
  174. package/dist/components/{p-81357e99.js → p-652fc14d.js} +2 -2
  175. package/dist/components/{p-81357e99.js.map → p-652fc14d.js.map} +1 -1
  176. package/dist/components/{p-b9024e1a.js → p-7826add7.js} +3 -3
  177. package/dist/components/p-7826add7.js.map +1 -0
  178. package/dist/components/{p-bac84326.js → p-96fbc3db.js} +6 -6
  179. package/dist/components/p-96fbc3db.js.map +1 -0
  180. package/dist/components/{p-d5a199fb.js → p-a6736b21.js} +5 -5
  181. package/dist/components/{p-d5a199fb.js.map → p-a6736b21.js.map} +1 -1
  182. package/dist/esm/ifx-accordion_2.entry.js +2 -2
  183. package/dist/esm/ifx-accordion_2.entry.js.map +1 -1
  184. package/dist/esm/ifx-basic-table.entry.js +1 -1
  185. package/dist/esm/ifx-faq.entry.js +1 -1
  186. package/dist/esm/ifx-filter-accordion.entry.js +2 -2
  187. package/dist/esm/ifx-filter-bar.entry.js +1 -1
  188. package/dist/esm/ifx-filter-search.entry.js +1 -1
  189. package/dist/esm/ifx-filter-type-group.entry.js +1 -1
  190. package/dist/esm/ifx-list-entry.entry.js +1 -1
  191. package/dist/esm/ifx-modal.entry.js +8 -8
  192. package/dist/esm/ifx-modal.entry.js.map +1 -1
  193. package/dist/esm/ifx-multiselect_2.entry.js +9 -9
  194. package/dist/esm/ifx-multiselect_2.entry.js.map +1 -1
  195. package/dist/esm/ifx-search-bar.entry.js +5 -5
  196. package/dist/esm/ifx-search-bar.entry.js.map +1 -1
  197. package/dist/esm/ifx-select.entry.js +2 -2
  198. package/dist/esm/ifx-select.entry.js.map +1 -1
  199. package/dist/esm/ifx-sidebar-item.entry.js +9 -9
  200. package/dist/esm/ifx-sidebar-item.entry.js.map +1 -1
  201. package/dist/esm/ifx-slider.entry.js +2 -2
  202. package/dist/esm/ifx-spinner.entry.js +2 -2
  203. package/dist/esm/ifx-status.entry.js +1 -1
  204. package/dist/esm/ifx-step.entry.js +4 -4
  205. package/dist/esm/ifx-stepper.entry.js +2 -2
  206. package/dist/esm/ifx-switch.entry.js +1 -1
  207. package/dist/esm/ifx-tab.entry.js +1 -1
  208. package/dist/esm/ifx-table.entry.js +2 -2
  209. package/dist/esm/ifx-tabs.entry.js +2 -2
  210. package/dist/esm/ifx-tag.entry.js +1 -1
  211. package/dist/esm/ifx-textarea.entry.js +2 -2
  212. package/dist/esm/ifx-tooltip.entry.js +4 -4
  213. package/dist/esm/infineon-design-system-stencil.js +1 -1
  214. package/dist/esm/loader.js +1 -1
  215. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
  216. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js.map +1 -1
  217. package/dist/infineon-design-system-stencil/{p-37ecac74.entry.js → p-190ebb90.entry.js} +2 -2
  218. package/dist/infineon-design-system-stencil/{p-a10f9b3c.entry.js → p-2e2ab749.entry.js} +2 -2
  219. package/dist/infineon-design-system-stencil/{p-0ddf85fc.entry.js → p-32c617c6.entry.js} +2 -2
  220. package/dist/infineon-design-system-stencil/{p-2e8c0115.entry.js → p-42a6429b.entry.js} +2 -2
  221. package/dist/infineon-design-system-stencil/{p-b30b66e5.entry.js → p-44e64146.entry.js} +2 -2
  222. package/dist/infineon-design-system-stencil/{p-50e122c4.entry.js → p-462946bf.entry.js} +2 -2
  223. package/dist/infineon-design-system-stencil/{p-8b089cd1.entry.js → p-4a6e75a4.entry.js} +2 -2
  224. package/dist/infineon-design-system-stencil/p-598324f5.entry.js +2 -0
  225. package/dist/infineon-design-system-stencil/{p-31e9d4f8.entry.js.map → p-598324f5.entry.js.map} +1 -1
  226. package/dist/infineon-design-system-stencil/p-6902ee06.entry.js +2 -0
  227. package/dist/infineon-design-system-stencil/{p-49872432.entry.js → p-6e2eec34.entry.js} +2 -2
  228. package/dist/infineon-design-system-stencil/p-7131a2b3.entry.js +2 -0
  229. package/dist/infineon-design-system-stencil/p-7131a2b3.entry.js.map +1 -0
  230. package/dist/infineon-design-system-stencil/p-79b4d359.entry.js +2 -0
  231. package/dist/infineon-design-system-stencil/p-79b4d359.entry.js.map +1 -0
  232. package/dist/infineon-design-system-stencil/p-7f510d1c.entry.js +2 -0
  233. package/dist/infineon-design-system-stencil/{p-7378190d.entry.js → p-874f2bf6.entry.js} +2 -2
  234. package/dist/infineon-design-system-stencil/{p-39697853.entry.js → p-88fb3c49.entry.js} +2 -2
  235. package/dist/infineon-design-system-stencil/{p-30640970.entry.js → p-90687777.entry.js} +2 -2
  236. package/dist/infineon-design-system-stencil/{p-bc40ad21.entry.js → p-a1c9b6fc.entry.js} +2 -2
  237. package/dist/infineon-design-system-stencil/{p-25bf54c9.entry.js → p-a24039e5.entry.js} +2 -2
  238. package/dist/infineon-design-system-stencil/p-a29b6247.entry.js +2 -0
  239. package/dist/infineon-design-system-stencil/p-a29b6247.entry.js.map +1 -0
  240. package/dist/infineon-design-system-stencil/{p-c428a56a.entry.js → p-b8f31dc3.entry.js} +2 -2
  241. package/dist/infineon-design-system-stencil/p-b8f31dc3.entry.js.map +1 -0
  242. package/dist/infineon-design-system-stencil/{p-02be14a9.entry.js → p-c68be6d9.entry.js} +2 -2
  243. package/dist/infineon-design-system-stencil/p-cdad5d2c.entry.js +2 -0
  244. package/dist/infineon-design-system-stencil/p-cdad5d2c.entry.js.map +1 -0
  245. package/dist/infineon-design-system-stencil/{p-5edfe317.entry.js → p-db956276.entry.js} +2 -2
  246. package/dist/infineon-design-system-stencil/{p-c2e6cbdb.entry.js → p-e954b757.entry.js} +2 -2
  247. package/dist/infineon-design-system-stencil/{p-b010bfcb.entry.js → p-ec0c6eb5.entry.js} +2 -2
  248. package/dist/infineon-design-system-stencil/{p-b010bfcb.entry.js.map → p-ec0c6eb5.entry.js.map} +1 -1
  249. package/dist/types/components/accordion/accordion.stories.d.ts +1 -67
  250. package/dist/types/components/accordion/accordionItem.d.ts +1 -1
  251. package/dist/types/components/alert/alert.stories.d.ts +11 -38
  252. package/dist/types/components/badge/badge.stories.d.ts +3 -23
  253. package/dist/types/components/breadcrumb/breadcrumb.stories.d.ts +1 -66
  254. package/dist/types/components/button/button.stories.d.ts +16 -95
  255. package/dist/types/components/card/card.stories.d.ts +1 -95
  256. package/dist/types/components/checkbox/checkbox.stories.d.ts +10 -68
  257. package/dist/types/components/content-switcher/content-switcher.stories.d.ts +0 -50
  258. package/dist/types/components/date-picker/date-picker.stories.d.ts +2 -67
  259. package/dist/types/components/dropdown/dropdown.stories.d.ts +27 -111
  260. package/dist/types/components/footer/footer.stories.d.ts +0 -4
  261. package/dist/types/components/icon/infineonIconStencil.stories.d.ts +0 -5
  262. package/dist/types/components/icon-button/icon-button.stories.d.ts +8 -56
  263. package/dist/types/components/link/link.stories.d.ts +6 -52
  264. package/dist/types/components/modal/modal.d.ts +2 -2
  265. package/dist/types/components/modal/modal.stories.d.ts +3 -77
  266. package/dist/types/components/navigation/navbar/navbar.stories.d.ts +6 -243
  267. package/dist/types/components/navigation/sidebar/sidebar-item.d.ts +2 -2
  268. package/dist/types/components/navigation/sidebar/sidebar.stories.d.ts +7 -90
  269. package/dist/types/components/notification/notification.stories.d.ts +0 -44
  270. package/dist/types/components/number-indicator/number-indicator.stories.d.ts +0 -19
  271. package/dist/types/components/pagination/pagination.stories.d.ts +0 -27
  272. package/dist/types/components/progress-bar/progress-bar.stories.d.ts +4 -25
  273. package/dist/types/components/radio-button/radio-button.stories.d.ts +8 -59
  274. package/dist/types/components/search-bar/search-bar.d.ts +1 -1
  275. package/dist/types/components/search-bar/search-bar.stories.d.ts +3 -60
  276. package/dist/types/components/search-field/search-field.stories.d.ts +6 -36
  277. package/dist/types/components/select/multi-select/multiselect.d.ts +1 -1
  278. package/dist/types/components/select/multi-select/multiselect.stories.d.ts +0 -125
  279. package/dist/types/components/select/single-select/select.stories.d.ts +24 -67
  280. package/dist/types/components/slider/slider.stories.d.ts +0 -110
  281. package/dist/types/components/spinner/spinner.stories.d.ts +0 -32
  282. package/dist/types/components/status/status.stories.d.ts +2 -23
  283. package/dist/types/components/stepper/stepper.stories.d.ts +4 -21
  284. package/dist/types/components/switch/switch.stories.d.ts +1 -50
  285. package/dist/types/components/table-advanced-version/table.stories.d.ts +2 -243
  286. package/dist/types/components/table-basic-version/table.stories.d.ts +1 -19
  287. package/dist/types/components/tabs/tabs.stories.d.ts +7 -77
  288. package/dist/types/components/tag/tag.stories.d.ts +0 -20
  289. package/dist/types/components/text-field/text-field.stories.d.ts +11 -96
  290. package/dist/types/components/tooltip/tooltip.stories.d.ts +6 -41
  291. package/dist/types/components.d.ts +10 -10
  292. package/package.json +1 -1
  293. package/dist/components/p-b9024e1a.js.map +0 -1
  294. package/dist/components/p-bac84326.js.map +0 -1
  295. package/dist/infineon-design-system-stencil/p-16f9a47c.entry.js +0 -2
  296. package/dist/infineon-design-system-stencil/p-227d384c.entry.js +0 -2
  297. package/dist/infineon-design-system-stencil/p-227d384c.entry.js.map +0 -1
  298. package/dist/infineon-design-system-stencil/p-2849823e.entry.js +0 -2
  299. package/dist/infineon-design-system-stencil/p-2849823e.entry.js.map +0 -1
  300. package/dist/infineon-design-system-stencil/p-31e9d4f8.entry.js +0 -2
  301. package/dist/infineon-design-system-stencil/p-3ca407c8.entry.js +0 -2
  302. package/dist/infineon-design-system-stencil/p-3ca407c8.entry.js.map +0 -1
  303. package/dist/infineon-design-system-stencil/p-b1688ca4.entry.js +0 -2
  304. package/dist/infineon-design-system-stencil/p-b1688ca4.entry.js.map +0 -1
  305. package/dist/infineon-design-system-stencil/p-c428a56a.entry.js.map +0 -1
  306. package/dist/infineon-design-system-stencil/p-ea74d7ab.entry.js +0 -2
  307. /package/dist/infineon-design-system-stencil/{p-37ecac74.entry.js.map → p-190ebb90.entry.js.map} +0 -0
  308. /package/dist/infineon-design-system-stencil/{p-a10f9b3c.entry.js.map → p-2e2ab749.entry.js.map} +0 -0
  309. /package/dist/infineon-design-system-stencil/{p-0ddf85fc.entry.js.map → p-32c617c6.entry.js.map} +0 -0
  310. /package/dist/infineon-design-system-stencil/{p-2e8c0115.entry.js.map → p-42a6429b.entry.js.map} +0 -0
  311. /package/dist/infineon-design-system-stencil/{p-b30b66e5.entry.js.map → p-44e64146.entry.js.map} +0 -0
  312. /package/dist/infineon-design-system-stencil/{p-50e122c4.entry.js.map → p-462946bf.entry.js.map} +0 -0
  313. /package/dist/infineon-design-system-stencil/{p-8b089cd1.entry.js.map → p-4a6e75a4.entry.js.map} +0 -0
  314. /package/dist/infineon-design-system-stencil/{p-16f9a47c.entry.js.map → p-6902ee06.entry.js.map} +0 -0
  315. /package/dist/infineon-design-system-stencil/{p-49872432.entry.js.map → p-6e2eec34.entry.js.map} +0 -0
  316. /package/dist/infineon-design-system-stencil/{p-ea74d7ab.entry.js.map → p-7f510d1c.entry.js.map} +0 -0
  317. /package/dist/infineon-design-system-stencil/{p-7378190d.entry.js.map → p-874f2bf6.entry.js.map} +0 -0
  318. /package/dist/infineon-design-system-stencil/{p-39697853.entry.js.map → p-88fb3c49.entry.js.map} +0 -0
  319. /package/dist/infineon-design-system-stencil/{p-30640970.entry.js.map → p-90687777.entry.js.map} +0 -0
  320. /package/dist/infineon-design-system-stencil/{p-bc40ad21.entry.js.map → p-a1c9b6fc.entry.js.map} +0 -0
  321. /package/dist/infineon-design-system-stencil/{p-25bf54c9.entry.js.map → p-a24039e5.entry.js.map} +0 -0
  322. /package/dist/infineon-design-system-stencil/{p-02be14a9.entry.js.map → p-c68be6d9.entry.js.map} +0 -0
  323. /package/dist/infineon-design-system-stencil/{p-5edfe317.entry.js.map → p-db956276.entry.js.map} +0 -0
  324. /package/dist/infineon-design-system-stencil/{p-c2e6cbdb.entry.js.map → p-e954b757.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar-item.js","sourceRoot":"","sources":["../../../../src/components/navigation/sidebar/sidebar-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,EAAE,MAAM,eAAe,CAAC;AAO/G,MAAM,OAAO,WAAW;;oBAEC,EAAE;wBACI,IAAI;+BACG,KAAK;oBAClB,EAAE;4BACO,EAAE;sBACT,OAAO;4BACC,KAAK;wBACT,IAAI;6BACC,KAAK;;sBAEb,KAAK;4BACC,KAAK;mCAEG,KAAK;qBAOrB,EAAE;;;IAK1B,kBAAkB,CAAC,QAAiB,EAAE,QAAiB;QACrD,wDAAwD;QACxD,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC;YACjC,OAAO;QACT,CAAC;QACD,IAAI,CAAC,mBAAmB,GAAG,QAAQ,CAAC;QACpC,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;YAC1B,IAAI,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,CAAA;YACtD,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,QAAQ,EAAE,CAAC;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jD,4DAAK,KAAK,EAAC,6BAA6B;wBACrC,IAAI,CAAC,YAAY;4BAChB,6DAAM,KAAK,EAAC,qBAAqB;gCAC/B,iEAAU,IAAI,EAAC,iBAAiB,GAAG,CAC9B;wBAGR,CAAA,MAAA,IAAI,CAAC,eAAe,0CAAE,IAAI,EAAE,KAAI,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,QAAQ;4BACnE,6DAAM,KAAK,EAAC,wBAAwB;gCAClC,+EAAuB,IAAI,CAAC,eAAe,CAAwB,CAC9D,CAEL,CAEN;YACH,IAAI,CAAC,YAAY,IAAI,2DAAI,KAAK,EAAC,qBAAqB,GAAM,CAEvD,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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: string;\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\n @Prop() value: string = \"\"\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 || this.numberIndicator?.trim()) && \n <div class=\"sidebar__nav-item-indicator\">\n {this.isExpandable &&\n <span class='item__arrow-wrapper'>\n <ifx-icon icon=\"chevron-down-12\" />\n </span>\n }\n\n {this.numberIndicator?.trim() && !this.isExpandable && !this.isNested &&\n <span class='item__number-indicator'>\n <ifx-number-indicator>{this.numberIndicator}</ifx-number-indicator>\n </span>}\n\n </div>\n }\n </a>\n {this.isExpandable && <ul class='expandable__submenu'></ul>}\n\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"sidebar-item.js","sourceRoot":"","sources":["../../../../src/components/navigation/sidebar/sidebar-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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() hasIcon: boolean = true;\n @State() hasIconWrapper: 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: string;\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\n @Prop() value: string = \"\"\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.hasIcon = false;\n } else {\n this.hasIcon = 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.hasIcon ? '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 || this.numberIndicator?.trim()) && \n <div class=\"sidebar__nav-item-indicator\">\n {this.isExpandable &&\n <span class='item__arrow-wrapper'>\n <ifx-icon icon=\"chevron-down-12\" />\n </span>\n }\n\n {this.numberIndicator?.trim() && !this.isExpandable && !this.isNested &&\n <span class='item__number-indicator'>\n <ifx-number-indicator>{this.numberIndicator}</ifx-number-indicator>\n </span>}\n\n </div>\n }\n </a>\n {this.isExpandable && <ul class='expandable__submenu'></ul>}\n\n </div>\n );\n }\n}\n"]}
@@ -1,10 +1,9 @@
1
1
  import { action } from "@storybook/addon-actions";
2
- import { icons } from "@infineon/infineon-icons";
3
2
  export default {
4
3
  title: 'Components/Navigation/Sidebar',
5
4
  // tags: ['autodocs'],
6
5
  args: {
7
- icon: 'image-16',
6
+ icon: true,
8
7
  applicationName: 'Application Name',
9
8
  showFooter: true,
10
9
  showHeader: true,
@@ -15,118 +14,26 @@ export default {
15
14
  copyrightText: `© 1999 - ${new Date().getFullYear()} Infineon Technologies AG`,
16
15
  },
17
16
  argTypes: {
18
- applicationName: {
19
- description: 'The name of the application to display at the top of the sidebar.',
20
- table: {
21
- category: 'ifx-sidebar props'
22
- }
23
- },
24
- showHeader: {
25
- description: 'Determines whether the header is displayed in the sidebar.',
26
- table: {
27
- category: 'ifx-sidebar props',
28
- defaultValue: {
29
- summary: true
30
- }
31
- }
32
- },
33
- showFooter: {
34
- description: 'Determines whether the footer is displayed in the sidebar.',
35
- table: {
36
- category: 'ifx-sidebar props',
37
- defaultValue: {
38
- summary: true
39
- }
40
- }
41
- },
42
- initialCollapse: {
43
- description: 'Determines if the sidebar should be collapsed by default when it first loads.',
44
- table: {
45
- category: 'ifx-sidebar props',
46
- defaultValue: {
47
- summary: true
48
- }
49
- }
50
- },
51
- imprint: {
52
- description: 'The URL link for the "Imprint" section in the sidebar footer.',
53
- if: { arg: 'showFooter', eq: true },
54
- table: {
55
- category: 'ifx-sidebar props'
56
- }
57
- },
58
- termsOfUse: {
59
- description: 'The URL link for the "Terms of Use" section in the sidebar footer.',
60
- if: { arg: 'showFooter', eq: true },
61
- table: {
62
- category: 'ifx-sidebar props'
63
- }
64
- },
65
- privacyPolicy: {
66
- description: 'The URL link for the "Privacy Policy" section in the sidebar footer.',
67
- if: { arg: 'showFooter', eq: true },
68
- table: {
69
- category: 'ifx-sidebar props'
70
- }
71
- },
72
- copyrightText: {
73
- description: 'The copyright text to display at the bottom of the sidebar.',
74
- table: {
75
- category: 'ifx-sidebar props'
76
- }
77
- },
78
- icon: {
79
- description: 'The icon to display for the sidebar items. Choose ***none*** to display no icon.',
80
- options: ['none', ...Object.values(icons).map(i => i['name'])],
81
- control: 'select',
82
- table: {
83
- category: 'ifx-sidebar-item props',
84
- defaultValue: {
85
- summary: 'image-16'
86
- }
87
- }
88
- },
89
17
  ifxSidebarNavigationItem: {
90
18
  action: 'ifxSidebarNavigationItem',
91
19
  description: 'Custom event emitted when a navigation item becomes active on selection',
92
- table: {
93
- category: 'custom events',
94
- type: {
95
- summary: 'Framework integration',
96
- detail: `React: onIfxSidebarNavigationItem={handleChange}
97
- Vue: @ifxSidebarNavigationItem="handleChange"
98
- Angular: (ifxSidebarNavigationItem)="handleChange()"
99
- VanillaJs: .addEventListener("ifxSidebarNavigationItem", (event) => {/*handle change*/});`
100
- }
101
- }
102
20
  },
103
21
  ifxSidebarActionItem: {
104
22
  action: 'ifxSidebarActionItem',
105
23
  description: 'Custom event emitted when an action item is selected',
106
- table: {
107
- category: 'custom events',
108
- type: {
109
- summary: 'Framework integration',
110
- detail: `React: onIfxSidebarActionItem={handleAction}
111
- Vue: @ifxSidebarActionItem="handleAction"
112
- Angular: (ifxSidebarActionItem)="handleAction()"
113
- VanillaJs: .addEventListener("ifxSidebarActionItem", (event) => {/*handle action*/});`
114
- },
115
- }
116
24
  },
117
25
  ifxSidebarMenu: {
118
26
  action: 'ifxSidebarMenu',
119
27
  description: 'Custom event emitted when a menu is expanded or closed',
120
- table: {
121
- category: 'custom events',
122
- type: {
123
- summary: 'Framework integration',
124
- detail: `React: onIfxSidebarMenu={handleMenu}
125
- Vue: @ifxSidebarMenu="handleMenu"
126
- Angular: (ifxSidebarMenu)="handleMenu()"
127
- VanillaJs: .addEventListener("ifxSidebarMenu", (event) => {/*handle menu*/});`
128
- },
129
- },
28
+ },
29
+ imprint: {
30
+ if: { arg: 'showFooter', eq: true },
31
+ },
32
+ termsOfUse: {
33
+ if: { arg: 'showFooter', eq: true },
34
+ },
35
+ privacyPolicy: {
36
+ if: { arg: 'showFooter', eq: true },
130
37
  },
131
38
  },
132
39
  };
@@ -146,13 +53,13 @@ const DefaultTemplate = args => {
146
53
  sidebarElement.setAttribute('copyright-text', args.copyrightText);
147
54
  sidebarElement.innerHTML = `
148
55
  <ifx-sidebar-title>Menu Items</ifx-sidebar-title>
149
- <ifx-sidebar-item href='https://google.com' target='_blank' icon="${args.icon === 'none' ? '' : args.icon}">Menu Item</ifx-sidebar-item>
150
- <ifx-sidebar-item href='https://google.com' target='_blank' icon="${args.icon === 'none' ? '' : args.icon}">Menu Item</ifx-sidebar-item>
151
- <ifx-sidebar-item href='https://google.com' target='_blank' icon="${args.icon === 'none' ? '' : args.icon}">Menu Item</ifx-sidebar-item>
152
- <ifx-sidebar-item href='https://google.com' target='_blank' icon="${args.icon === 'none' ? '' : args.icon}">Menu Item</ifx-sidebar-item>
56
+ <ifx-sidebar-item href='https://google.com' target='_blank' icon='image-16'>Menu Item</ifx-sidebar-item>
57
+ <ifx-sidebar-item href='https://google.com' target='_blank' icon='image-16'>Menu Item</ifx-sidebar-item>
58
+ <ifx-sidebar-item href='https://google.com' target='_blank' icon='image-16'>Menu Item</ifx-sidebar-item>
59
+ <ifx-sidebar-item href='https://google.com' target='_blank' icon='image-16'>Menu Item</ifx-sidebar-item>
153
60
  <ifx-sidebar-item>
154
61
  Section
155
- <ifx-sidebar-item href='https://google.com' target='_blank' icon="${args.icon === 'none' ? '' : args.icon}">Menu Item</ifx-sidebar-item>
62
+ <ifx-sidebar-item href='https://google.com' target='_blank' icon='image-16'>Menu Item</ifx-sidebar-item>
156
63
  <ifx-sidebar-item icon='image-16'>
157
64
  Menu Item
158
65
  <ifx-sidebar-item>Sub menu item</ifx-sidebar-item>
@@ -163,8 +70,8 @@ const DefaultTemplate = args => {
163
70
  <ifx-sidebar-item href='https://google.com' target='_blank'>Menu Item</ifx-sidebar-item>
164
71
  </ifx-sidebar-item>
165
72
  <ifx-sidebar-title>Items group</ifx-sidebar-title>
166
- <ifx-sidebar-item href='https://google.com' target='_blank' icon="${args.icon === 'none' ? '' : args.icon}">Item 1</ifx-sidebar-item>
167
- <ifx-sidebar-item href='https://google.com' target='_blank' icon="${args.icon === 'none' ? '' : args.icon}">Item 2</ifx-sidebar-item>
73
+ <ifx-sidebar-item href='https://google.com' target='_blank' icon='image-16'>Item 1</ifx-sidebar-item>
74
+ <ifx-sidebar-item href='https://google.com' target='_blank' icon='image-16'>Item 2</ifx-sidebar-item>
168
75
  `;
169
76
  return sidebarElement;
170
77
  };
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar.stories.js","sourceRoot":"","sources":["../../../../src/components/navigation/sidebar/sidebar.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD,eAAe;IACb,KAAK,EAAE,+BAA+B;IACtC,sBAAsB;IAEtB,IAAI,EAAE;QACJ,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,kBAAkB;QACnC,UAAU,EAAE,IAAI;QAChB,UAAU,EAAE,IAAI;QAChB,eAAe,EAAE,IAAI;QACrB,UAAU,EAAE,+BAA+B;QAC3C,OAAO,EAAE,iCAAiC;QAC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AE9F,aAAa,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC,CAAC,kBAAkB;IAChH,aAAa,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC,CAAC,mBAAmB;IAEjH,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAEpD,MAAM,uBAAuB,GAAG,GAAG,EAAE,CACnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eA6Fa,CAAC;AAEhB,MAAM,CAAC,MAAM,mBAAmB,GAAG,uBAAuB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { action } from '@storybook/addon-actions';\nimport { icons } from '@infineon/infineon-icons';\n\nexport default {\n title: 'Components/Navigation/Sidebar',\n // tags: ['autodocs'],\n\n args: {\n icon: 'image-16',\n applicationName: 'Application Name',\n showFooter: true,\n showHeader: true,\n initialCollapse: true,\n termsOfUse: 'https://yourwebsite.com/terms',\n imprint: 'https://yourwebsite.com/imprint',\n privacyPolicy: 'https://yourwebsite.com/privacy-policy',\n copyrightText: `© 1999 - ${new Date().getFullYear()} Infineon Technologies AG`,\n },\n\n argTypes: {\n applicationName: {\n description: 'The name of the application to display at the top of the sidebar.',\n table: {\n category: 'ifx-sidebar props'\n }\n },\n showHeader: {\n description: 'Determines whether the header is displayed in the sidebar.',\n table: {\n category: 'ifx-sidebar props',\n defaultValue: {\n summary: true\n }\n }\n },\n showFooter: {\n description: 'Determines whether the footer is displayed in the sidebar.',\n table: {\n category: 'ifx-sidebar props',\n defaultValue: {\n summary: true\n }\n }\n },\n initialCollapse: {\n description: 'Determines if the sidebar should be collapsed by default when it first loads.',\n table: {\n category: 'ifx-sidebar props',\n defaultValue: {\n summary: true\n }\n }\n },\n imprint: {\n description: 'The URL link for the \"Imprint\" section in the sidebar footer.',\n if: { arg: 'showFooter', eq: true },\n table: {\n category: 'ifx-sidebar props'\n }\n },\n termsOfUse: {\n description: 'The URL link for the \"Terms of Use\" section in the sidebar footer.',\n if: { arg: 'showFooter', eq: true },\n table: {\n category: 'ifx-sidebar props'\n }\n },\n privacyPolicy: {\n description: 'The URL link for the \"Privacy Policy\" section in the sidebar footer.',\n if: { arg: 'showFooter', eq: true },\n table: {\n category: 'ifx-sidebar props'\n }\n },\n copyrightText: {\n description: 'The copyright text to display at the bottom of the sidebar.',\n table: {\n category: 'ifx-sidebar props'\n }\n },\n icon: {\n description: 'The icon to display for the sidebar items. Choose ***none*** to display no icon.',\n options: ['none', ...Object.values(icons).map(i => i['name'])],\n control: 'select',\n table: {\n category: 'ifx-sidebar-item props',\n defaultValue: {\n summary: 'image-16'\n }\n }\n },\n ifxSidebarNavigationItem: {\n action: 'ifxSidebarNavigationItem',\n description: 'Custom event emitted when a navigation item becomes active on selection',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail: \n `React: onIfxSidebarNavigationItem={handleChange}\n Vue: @ifxSidebarNavigationItem=\"handleChange\"\n Angular: (ifxSidebarNavigationItem)=\"handleChange()\"\n VanillaJs: .addEventListener(\"ifxSidebarNavigationItem\", (event) => {/*handle change*/});`\n }\n }\n },\n ifxSidebarActionItem: {\n action: 'ifxSidebarActionItem',\n description: 'Custom event emitted when an action item is selected',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail: \n `React: onIfxSidebarActionItem={handleAction}\n Vue: @ifxSidebarActionItem=\"handleAction\"\n Angular: (ifxSidebarActionItem)=\"handleAction()\"\n VanillaJs: .addEventListener(\"ifxSidebarActionItem\", (event) => {/*handle action*/});`\n },\n }\n },\n ifxSidebarMenu: {\n action: 'ifxSidebarMenu',\n description: 'Custom event emitted when a menu is expanded or closed',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail: \n `React: onIfxSidebarMenu={handleMenu}\n Vue: @ifxSidebarMenu=\"handleMenu\"\n Angular: (ifxSidebarMenu)=\"handleMenu()\"\n VanillaJs: .addEventListener(\"ifxSidebarMenu\", (event) => {/*handle menu*/});`\n },\n },\n },\n },\n};\n\nconst DefaultTemplate = args => {\n // Create the sidebar element and attach event listener\n const sidebarElement = document.createElement('ifx-sidebar') as HTMLIfxSidebarElement;\n sidebarElement.setAttribute('application-name', args.applicationName);\n sidebarElement.addEventListener('ifxSidebarNavigationItem', action(`ifxSidebarNavigationItem`));\n sidebarElement.addEventListener('ifxSidebarActionItem', action(`ifxSidebarActionItem`));\n sidebarElement.addEventListener('ifxSidebarMenu', action(`ifxSidebarMenu`));\n\n sidebarElement.setAttribute('show-header', args.showHeader);\n sidebarElement.setAttribute('show-footer', args.showFooter);\n sidebarElement.setAttribute('initial-collapse', args.initialCollapse);\n sidebarElement.setAttribute('terms-of-use', args.termsOfUse);\n sidebarElement.setAttribute('imprint', args.imprint);\n sidebarElement.setAttribute('privacy-policy', args.privacyPolicy);\n sidebarElement.setAttribute('copyright-text', args.copyrightText);\n\n sidebarElement.innerHTML = `\n <ifx-sidebar-title>Menu Items</ifx-sidebar-title>\n <ifx-sidebar-item href='https://google.com' target='_blank' icon=\"${args.icon === 'none' ? '' : args.icon}\">Menu Item</ifx-sidebar-item>\n <ifx-sidebar-item href='https://google.com' target='_blank' icon=\"${args.icon === 'none' ? '' : args.icon}\">Menu Item</ifx-sidebar-item>\n <ifx-sidebar-item href='https://google.com' target='_blank' icon=\"${args.icon === 'none' ? '' : args.icon}\">Menu Item</ifx-sidebar-item>\n <ifx-sidebar-item href='https://google.com' target='_blank' icon=\"${args.icon === 'none' ? '' : args.icon}\">Menu Item</ifx-sidebar-item>\n <ifx-sidebar-item>\n Section\n <ifx-sidebar-item href='https://google.com' target='_blank' icon=\"${args.icon === 'none' ? '' : args.icon}\">Menu Item</ifx-sidebar-item>\n <ifx-sidebar-item icon='image-16'>\n Menu Item\n <ifx-sidebar-item>Sub menu item</ifx-sidebar-item>\n <ifx-sidebar-item active=true>Sub menu item</ifx-sidebar-item>\n <ifx-sidebar-item>Sub menu item</ifx-sidebar-item>\n </ifx-sidebar-item>\n <ifx-sidebar-item href='https://google.com' target='_blank'>Menu Item</ifx-sidebar-item>\n <ifx-sidebar-item href='https://google.com' target='_blank'>Menu Item</ifx-sidebar-item>\n </ifx-sidebar-item>\n <ifx-sidebar-title>Items group</ifx-sidebar-title>\n <ifx-sidebar-item href='https://google.com' target='_blank' icon=\"${args.icon === 'none' ? '' : args.icon}\">Item 1</ifx-sidebar-item>\n <ifx-sidebar-item href='https://google.com' target='_blank' icon=\"${args.icon === 'none' ? '' : args.icon}\">Item 2</ifx-sidebar-item>\n `\n return sidebarElement;\n};\n\nexport const Default = DefaultTemplate.bind({});\n\nconst SubmenuTemplate = args => {\n // Create the sidebar element and attach event listener\n const sidebarElement = document.createElement('ifx-sidebar') as HTMLIfxSidebarElement;\n sidebarElement.setAttribute('application-name', args.applicationName);\n sidebarElement.addEventListener('ifxSidebarNavigationItem', action('ifxSidebarNavigationItem'));\n sidebarElement.addEventListener('ifxSidebarActionItem', action('ifxSidebarActionItem'));\n sidebarElement.addEventListener('ifxSidebarMenu', action('ifxSidebarMenu'));\n sidebarElement.setAttribute('initial-collapse', args.initialCollapse);\n\n // Create 3 sections\n for (let i = 0; i < 3; i++) {\n const sectionElement = document.createElement('ifx-sidebar-item');\n sectionElement.textContent = `Header Section ${i + 1}`;\n\n // In each section, create 3 menu items\n for (let j = 0; j < 3; j++) {\n const menuItemElement = document.createElement('ifx-sidebar-item');\n menuItemElement.setAttribute('icon', args.icon ? 'image-16' : '');\n menuItemElement.textContent = `Menu Item ${j + 1}`;\n\n // In the first menu item of each section, create 3 submenu items\n if (j === 0) {\n for (let k = 0; k < 3; k++) {\n const subMenuItemElement = document.createElement('ifx-sidebar-item');\n subMenuItemElement.textContent = `Sub Menu Item ${k + 1}`;\n menuItemElement.appendChild(subMenuItemElement);\n }\n }\n\n sectionElement.appendChild(menuItemElement);\n }\n sidebarElement.appendChild(sectionElement);\n }\n const firstSection = sidebarElement.querySelectorAll('ifx-sidebar-item')[0];\n const firstMenuItem = firstSection.querySelectorAll('ifx-sidebar-item')[0];\n\n firstMenuItem.querySelectorAll('ifx-sidebar-item')[0].setAttribute('active', 'true'); //first submenu item\n firstMenuItem.querySelectorAll('ifx-sidebar-item')[0].setAttribute('is-action-item', 'false');\n\n firstMenuItem.querySelectorAll('ifx-sidebar-item')[1].setAttribute('is-action-item', 'true'); //2nd submenu item\n firstMenuItem.querySelectorAll('ifx-sidebar-item')[2].setAttribute('is-action-item', 'true'); //3rd sub menu item\n\n return sidebarElement;\n};\n\nexport const WithSubmenu = SubmenuTemplate.bind({});\n\nconst NumberIndicatorTemplate = () =>\n `<ifx-sidebar application-name=\"Application name\">\n <ifx-sidebar-item icon=\"image-16\" number-indicator=\"5\">Menu Item</ifx-sidebar-item>\n <ifx-sidebar-item icon=\"image-16\" number-indicator=\"1\">Menu Item</ifx-sidebar-item>\n <ifx-sidebar-item icon=\"image-16\" number-indicator=\"23\">Menu Item</ifx-sidebar-item>\n <ifx-sidebar-item active=\"false\">\n Header Section\n <ifx-sidebar-item icon=\"image-16\" active=\"false\" >\n Second layer\n <ifx-sidebar-item target=\"_blank\" active=\"false\" icon=\"image-16\">\n 3rd layer Menu Item\n </ifx-sidebar-item>\n\n <ifx-sidebar-item target=\"_blank\" active=\"false\" icon=\"image-16\" value=\"thisPage\">\n This Page\n </ifx-sidebar-item>\n\n <ifx-sidebar-item target=\"_blank\" active=\"false\" icon=\"image-16\">\n 3rd layer Menu Item\n </ifx-sidebar-item>\n </ifx-sidebar-item>\n\n <ifx-sidebar-item icon=\"image-16\" active=\"false\">\n Second layer\n <ifx-sidebar-item target=\"_blank\" icon=\"image-16\" active=\"false\">\n Menu Item\n </ifx-sidebar-item>\n </ifx-sidebar-item>\n\n <ifx-sidebar-item icon=\"image-16\" active=\"false\">\n Second layer\n <ifx-sidebar-item target=\"_blank\" icon=\"image-16\" active=\"false\">\n Menu Item\n </ifx-sidebar-item>\n </ifx-sidebar-item>\n </ifx-sidebar-item>\n \n\n <ifx-sidebar-item>\n Header Section\n <ifx-sidebar-item icon=\"image-16\">\n Menu Item\n <ifx-sidebar-item active=\"false\" is-action-item=\"false\" target=\"_blank\" icon=\"image-16\">\n Sub Menu Item\n </ifx-sidebar-item>\n <ifx-sidebar-item is-action-item=\"true\" icon=\"image-16\" value=\"thisPage\">\n This one too\n </ifx-sidebar-item>\n <ifx-sidebar-item is-action-item=\"false\" target=\"_blank\" icon=\"image-16\">\n Menu Item\n </ifx-sidebar-item>\n </ifx-sidebar-item>\n <ifx-sidebar-item icon=\"image-16\">\n Menu Item\n <ifx-sidebar-item target=\"_blank\" icon=\"image-16\">\n Menu Item\n </ifx-sidebar-item>\n </ifx-sidebar-item>\n <ifx-sidebar-item icon=\"image-16\">\n Menu Item\n <ifx-sidebar-item target=\"_blank\" icon=\"image-16\">\n Menu Item\n </ifx-sidebar-item>\n </ifx-sidebar-item>\n </ifx-sidebar-item>\n\n\n <ifx-sidebar-item>\n Header Section\n <ifx-sidebar-item icon=\"image-16\">\n Menu Item\n <ifx-sidebar-item href=\"http://google.com\" target=\"_blank\" icon=\"image-16\">\n Menu Item\n </ifx-sidebar-item>\n <ifx-sidebar-item href=\"http://google.com\" target=\"_blank\" icon=\"image-16\">\n Menu Item\n </ifx-sidebar-item>\n <ifx-sidebar-item href=\"http://google.com\" target=\"_blank\" icon=\"image-16\">\n Menu Item\n </ifx-sidebar-item>\n </ifx-sidebar-item>\n <ifx-sidebar-item icon=\"image-16\">\n Menu Item\n <ifx-sidebar-item href=\"http://google.com\" target=\"_blank\" icon=\"image-16\">\n Menu Item\n </ifx-sidebar-item>\n </ifx-sidebar-item>\n <ifx-sidebar-item icon=\"image-16\">\n Menu Item\n <ifx-sidebar-item href=\"http://google.com\" target=\"_blank\" icon=\"image-16\">\n Menu Item\n </ifx-sidebar-item>\n </ifx-sidebar-item>\n </ifx-sidebar-item>\n</ifx-sidebar>`;\n\nexport const WithNumberIndicator = NumberIndicatorTemplate.bind({});\n"]}
1
+ {"version":3,"file":"sidebar.stories.js","sourceRoot":"","sources":["../../../../src/components/navigation/sidebar/sidebar.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eAAe;IACb,KAAK,EAAE,+BAA+B;IACtC,sBAAsB;IAEtB,IAAI,EAAE;QACJ,IAAI,EAAE,IAAI;QACV,eAAe,EAAE,kBAAkB;QACnC,UAAU,EAAE,IAAI;QAChB,UAAU,EAAE,IAAI;QAChB,eAAe,EAAE,IAAI;QACrB,UAAU,EAAE,+BAA+B;QAC3C,OAAO,EAAE,iCAAiC;QAC1C,aAAa,EAAE,wCAAwC;QACvD,aAAa,EAAE,YAAY,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,2BAA2B;KAC/E;IAED,QAAQ,EAAE;QACR,wBAAwB,EAAE;YACxB,MAAM,EAAE,0BAA0B;YAClC,WAAW,EAAE,yEAAyE;SACvF;QACD,oBAAoB,EAAE;YACpB,MAAM,EAAE,sBAAsB;YAC9B,WAAW,EAAE,sDAAsD;SACpE;QACD,cAAc,EAAE;YACd,MAAM,EAAE,gBAAgB;YACxB,WAAW,EAAE,wDAAwD;SACtE;QACD,OAAO,EAAE;YACP,EAAE,EAAE,EAAE,GAAG,EAAE,YAAY,EAAE,EAAE,EAAE,IAAI,EAAE;SACpC;QACD,UAAU,EAAE;YACV,EAAE,EAAE,EAAE,GAAG,EAAE,YAAY,EAAE,EAAE,EAAE,IAAI,EAAE;SACpC;QACD,aAAa,EAAE;YACb,EAAE,EAAE,EAAE,GAAG,EAAE,YAAY,EAAE,EAAE,EAAE,IAAI,EAAE;SACpC;KACF;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eA6Fa,CAAC;AAEhB,MAAM,CAAC,MAAM,mBAAmB,GAAG,uBAAuB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { action } from '@storybook/addon-actions';\n\nexport default {\n title: 'Components/Navigation/Sidebar',\n // tags: ['autodocs'],\n\n args: {\n icon: true,\n applicationName: 'Application Name',\n showFooter: true,\n showHeader: true,\n initialCollapse: true,\n termsOfUse: 'https://yourwebsite.com/terms',\n imprint: 'https://yourwebsite.com/imprint',\n privacyPolicy: 'https://yourwebsite.com/privacy-policy',\n copyrightText: `© 1999 - ${new Date().getFullYear()} Infineon Technologies AG`,\n },\n\n argTypes: {\n ifxSidebarNavigationItem: {\n action: 'ifxSidebarNavigationItem',\n description: 'Custom event emitted when a navigation item becomes active on selection',\n },\n ifxSidebarActionItem: {\n action: 'ifxSidebarActionItem',\n description: 'Custom event emitted when an action item is selected',\n },\n ifxSidebarMenu: {\n action: 'ifxSidebarMenu',\n description: 'Custom event emitted when a menu is expanded or closed',\n },\n imprint: {\n if: { arg: 'showFooter', eq: true },\n },\n termsOfUse: {\n if: { arg: 'showFooter', eq: true },\n },\n privacyPolicy: {\n if: { arg: 'showFooter', eq: true },\n },\n },\n};\n\nconst DefaultTemplate = args => {\n // Create the sidebar element and attach event listener\n const sidebarElement = document.createElement('ifx-sidebar') as HTMLIfxSidebarElement;\n sidebarElement.setAttribute('application-name', args.applicationName);\n sidebarElement.addEventListener('ifxSidebarNavigationItem', action(`ifxSidebarNavigationItem`));\n sidebarElement.addEventListener('ifxSidebarActionItem', action(`ifxSidebarActionItem`));\n sidebarElement.addEventListener('ifxSidebarMenu', action(`ifxSidebarMenu`));\n\n sidebarElement.setAttribute('show-header', args.showHeader);\n sidebarElement.setAttribute('show-footer', args.showFooter);\n sidebarElement.setAttribute('initial-collapse', args.initialCollapse);\n sidebarElement.setAttribute('terms-of-use', args.termsOfUse);\n sidebarElement.setAttribute('imprint', args.imprint);\n sidebarElement.setAttribute('privacy-policy', args.privacyPolicy);\n sidebarElement.setAttribute('copyright-text', args.copyrightText);\n \n sidebarElement.innerHTML = `\n <ifx-sidebar-title>Menu Items</ifx-sidebar-title>\n <ifx-sidebar-item href='https://google.com' target='_blank' icon='image-16'>Menu Item</ifx-sidebar-item>\n <ifx-sidebar-item href='https://google.com' target='_blank' icon='image-16'>Menu Item</ifx-sidebar-item>\n <ifx-sidebar-item href='https://google.com' target='_blank' icon='image-16'>Menu Item</ifx-sidebar-item>\n <ifx-sidebar-item href='https://google.com' target='_blank' icon='image-16'>Menu Item</ifx-sidebar-item>\n <ifx-sidebar-item>\n Section\n <ifx-sidebar-item href='https://google.com' target='_blank' icon='image-16'>Menu Item</ifx-sidebar-item>\n <ifx-sidebar-item icon='image-16'>\n Menu Item\n <ifx-sidebar-item>Sub menu item</ifx-sidebar-item>\n <ifx-sidebar-item active=true>Sub menu item</ifx-sidebar-item>\n <ifx-sidebar-item>Sub menu item</ifx-sidebar-item>\n </ifx-sidebar-item>\n <ifx-sidebar-item href='https://google.com' target='_blank'>Menu Item</ifx-sidebar-item>\n <ifx-sidebar-item href='https://google.com' target='_blank'>Menu Item</ifx-sidebar-item>\n </ifx-sidebar-item>\n <ifx-sidebar-title>Items group</ifx-sidebar-title>\n <ifx-sidebar-item href='https://google.com' target='_blank' icon='image-16'>Item 1</ifx-sidebar-item>\n <ifx-sidebar-item href='https://google.com' target='_blank' icon='image-16'>Item 2</ifx-sidebar-item>\n `\n return sidebarElement;\n};\n\nexport const Default = DefaultTemplate.bind({});\n\nconst SubmenuTemplate = args => {\n // Create the sidebar element and attach event listener\n const sidebarElement = document.createElement('ifx-sidebar') as HTMLIfxSidebarElement;\n sidebarElement.setAttribute('application-name', args.applicationName);\n sidebarElement.addEventListener('ifxSidebarNavigationItem', action('ifxSidebarNavigationItem'));\n sidebarElement.addEventListener('ifxSidebarActionItem', action('ifxSidebarActionItem'));\n sidebarElement.addEventListener('ifxSidebarMenu', action('ifxSidebarMenu'));\n sidebarElement.setAttribute('initial-collapse', args.initialCollapse);\n\n // Create 3 sections\n for (let i = 0; i < 3; i++) {\n const sectionElement = document.createElement('ifx-sidebar-item');\n sectionElement.textContent = `Header Section ${i + 1}`;\n\n // In each section, create 3 menu items\n for (let j = 0; j < 3; j++) {\n const menuItemElement = document.createElement('ifx-sidebar-item');\n menuItemElement.setAttribute('icon', args.icon ? 'image-16' : '');\n menuItemElement.textContent = `Menu Item ${j + 1}`;\n\n // In the first menu item of each section, create 3 submenu items\n if (j === 0) {\n for (let k = 0; k < 3; k++) {\n const subMenuItemElement = document.createElement('ifx-sidebar-item');\n subMenuItemElement.textContent = `Sub Menu Item ${k + 1}`;\n menuItemElement.appendChild(subMenuItemElement);\n }\n }\n\n sectionElement.appendChild(menuItemElement);\n }\n sidebarElement.appendChild(sectionElement);\n }\n const firstSection = sidebarElement.querySelectorAll('ifx-sidebar-item')[0];\n const firstMenuItem = firstSection.querySelectorAll('ifx-sidebar-item')[0];\n\n firstMenuItem.querySelectorAll('ifx-sidebar-item')[0].setAttribute('active', 'true'); //first submenu item\n firstMenuItem.querySelectorAll('ifx-sidebar-item')[0].setAttribute('is-action-item', 'false');\n\n firstMenuItem.querySelectorAll('ifx-sidebar-item')[1].setAttribute('is-action-item', 'true'); //2nd submenu item\n firstMenuItem.querySelectorAll('ifx-sidebar-item')[2].setAttribute('is-action-item', 'true'); //3rd sub menu item\n\n return sidebarElement;\n};\n\nexport const WithSubmenu = SubmenuTemplate.bind({});\n\nconst NumberIndicatorTemplate = () =>\n `<ifx-sidebar application-name=\"Application name\">\n <ifx-sidebar-item icon=\"image-16\" number-indicator=\"5\">Menu Item</ifx-sidebar-item>\n <ifx-sidebar-item icon=\"image-16\" number-indicator=\"1\">Menu Item</ifx-sidebar-item>\n <ifx-sidebar-item icon=\"image-16\" number-indicator=\"23\">Menu Item</ifx-sidebar-item>\n <ifx-sidebar-item active=\"false\">\n Header Section\n <ifx-sidebar-item icon=\"image-16\" active=\"false\" >\n Second layer\n <ifx-sidebar-item target=\"_blank\" active=\"false\" icon=\"image-16\">\n 3rd layer Menu Item\n </ifx-sidebar-item>\n\n <ifx-sidebar-item target=\"_blank\" active=\"false\" icon=\"image-16\" value=\"thisPage\">\n This Page\n </ifx-sidebar-item>\n\n <ifx-sidebar-item target=\"_blank\" active=\"false\" icon=\"image-16\">\n 3rd layer Menu Item\n </ifx-sidebar-item>\n </ifx-sidebar-item>\n\n <ifx-sidebar-item icon=\"image-16\" active=\"false\">\n Second layer\n <ifx-sidebar-item target=\"_blank\" icon=\"image-16\" active=\"false\">\n Menu Item\n </ifx-sidebar-item>\n </ifx-sidebar-item>\n\n <ifx-sidebar-item icon=\"image-16\" active=\"false\">\n Second layer\n <ifx-sidebar-item target=\"_blank\" icon=\"image-16\" active=\"false\">\n Menu Item\n </ifx-sidebar-item>\n </ifx-sidebar-item>\n </ifx-sidebar-item>\n \n\n <ifx-sidebar-item>\n Header Section\n <ifx-sidebar-item icon=\"image-16\">\n Menu Item\n <ifx-sidebar-item active=\"false\" is-action-item=\"false\" target=\"_blank\" icon=\"image-16\">\n Sub Menu Item\n </ifx-sidebar-item>\n <ifx-sidebar-item is-action-item=\"true\" icon=\"image-16\" value=\"thisPage\">\n This one too\n </ifx-sidebar-item>\n <ifx-sidebar-item is-action-item=\"false\" target=\"_blank\" icon=\"image-16\">\n Menu Item\n </ifx-sidebar-item>\n </ifx-sidebar-item>\n <ifx-sidebar-item icon=\"image-16\">\n Menu Item\n <ifx-sidebar-item target=\"_blank\" icon=\"image-16\">\n Menu Item\n </ifx-sidebar-item>\n </ifx-sidebar-item>\n <ifx-sidebar-item icon=\"image-16\">\n Menu Item\n <ifx-sidebar-item target=\"_blank\" icon=\"image-16\">\n Menu Item\n </ifx-sidebar-item>\n </ifx-sidebar-item>\n </ifx-sidebar-item>\n\n\n <ifx-sidebar-item>\n Header Section\n <ifx-sidebar-item icon=\"image-16\">\n Menu Item\n <ifx-sidebar-item href=\"http://google.com\" target=\"_blank\" icon=\"image-16\">\n Menu Item\n </ifx-sidebar-item>\n <ifx-sidebar-item href=\"http://google.com\" target=\"_blank\" icon=\"image-16\">\n Menu Item\n </ifx-sidebar-item>\n <ifx-sidebar-item href=\"http://google.com\" target=\"_blank\" icon=\"image-16\">\n Menu Item\n </ifx-sidebar-item>\n </ifx-sidebar-item>\n <ifx-sidebar-item icon=\"image-16\">\n Menu Item\n <ifx-sidebar-item href=\"http://google.com\" target=\"_blank\" icon=\"image-16\">\n Menu Item\n </ifx-sidebar-item>\n </ifx-sidebar-item>\n <ifx-sidebar-item icon=\"image-16\">\n Menu Item\n <ifx-sidebar-item href=\"http://google.com\" target=\"_blank\" icon=\"image-16\">\n Menu Item\n </ifx-sidebar-item>\n </ifx-sidebar-item>\n </ifx-sidebar-item>\n</ifx-sidebar>`;\n\nexport const WithNumberIndicator = NumberIndicatorTemplate.bind({});\n"]}
@@ -12,85 +12,38 @@ export default {
12
12
  },
13
13
  argTypes: {
14
14
  content: {
15
- name: 'Content',
16
15
  description: 'Text inside the notification is passed as slot.',
17
- table: {
18
- category: 'story controls',
19
- type: {
20
- summary: null
21
- }
22
- }
23
16
  },
24
17
  variant: {
25
18
  description: 'Variant of the notification.',
26
19
  options: ['success', 'warning', 'error'],
27
20
  control: { type: 'radio' },
28
- table: {
29
- category: 'ifx-notification props',
30
- defaultValue: {
31
- summary: 'success'
32
- },
33
- type: {
34
- summary: 'success | warning | error'
35
- }
36
- }
37
21
  },
38
22
  icon: {
39
- description: 'The icon to be displayed in the notification. Choose "none" to display no icon.',
40
- options: ['none', ...Object.values(icons).map(i => i['name'])],
23
+ description: 'The icon to be displayed in the notification.',
24
+ options: Object.values(icons).map(i => i['name']),
41
25
  control: { type: 'select' },
42
- table: {
43
- category: 'ifx-notification props',
44
- type: {
45
- summary: 'string'
46
- }
47
- }
48
26
  },
49
27
  linkText: {
50
28
  description: 'Text for the link.',
51
- table: {
52
- category: 'ifx-notification props',
53
- type: {
54
- summary: 'string'
55
- }
56
- }
57
29
  },
58
30
  linkHref: {
59
31
  description: 'URL for the link.',
60
- table: {
61
- category: 'ifx-notification props',
62
- type: {
63
- summary: 'string'
64
- }
65
- }
66
32
  },
67
33
  linkTarget: {
68
34
  options: ['_blank', '_self', '_parent'],
69
35
  control: { type: 'radio' },
70
- description: 'Specifies where to open the linked document.',
71
- table: {
72
- category: 'ifx-notification props',
73
- defaultValue: {
74
- summary: '_blank'
75
- },
76
- type: {
77
- summary: '_blank | _self | _parent'
78
- }
79
- }
80
36
  },
81
37
  },
82
38
  };
83
- const DefaultTemplate = args => {
84
- const icon = args.icon === 'none' ? '' : args.icon;
85
- return `<ifx-notification
86
- icon = "${icon}"
39
+ const DefaultTemplate = args => `<ifx-notification
40
+ icon="${args.icon}"
87
41
  variant="${args.variant}"
88
42
  link-text="${args.linkText}"
89
43
  link-href="${args.linkHref}"
90
44
  link-target="${args.linkTarget}">
91
45
  ${args.content}
92
46
  </ifx-notification>`;
93
- };
94
47
  export const Default = DefaultTemplate.bind({});
95
48
  Default.argTypes = {};
96
49
  //# sourceMappingURL=notification.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notification.stories.js","sourceRoot":"","sources":["../../../src/components/notification/notification.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD,eAAe;IACb,KAAK,EAAE,yBAAyB;IAChC,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,IAAI,EAAE;QACJ,OAAO,EAAE,qBAAqB;QAC9B,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE,MAAM;QAChB,QAAQ,EAAE,yBAAyB;QACnC,UAAU,EAAE,QAAQ;KACrB;IACD,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,iDAAiD;YAC9D,KAAK,EAAE;gBACL,QA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ACL,QAAQ,EAAE,wBAAwB;gBAClC,YAAY,EAAE;oBACZ,OAAO,EAAE,QAAQ;iBAClB;gBACD,IAAI,EAAE;oBACJ,OAAO,EAAE,0BAA0B;iBACpC;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE;IAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;IAEnD,OAAO;YACG,IAAI;aACH,IAAI,CAAC,OAAO;eACV,IAAI,CAAC,QAAQ;eACb,IAAI,CAAC,QAAQ;iBACX,IAAI,CAAC,UAAU;IAC5B,IAAI,CAAC,OAAO;oBACI,CAAC;AACrB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChD,OAAO,CAAC,QAAQ,GAAG,EAAE,CAAC","sourcesContent":["import { icons } from '@infineon/infineon-icons';\n\nexport default {\n title: 'Components/Notification',\n tags: ['autodocs'],\n\n args: {\n content: \"Sample Notification\",\n variant: 'success',\n icon: 'c-check-16',\n linkText: 'Link',\n linkHref: 'https://www.example.com',\n linkTarget: '_blank',\n },\n argTypes: {\n content: {\n name: 'Content',\n description: 'Text inside the notification is passed as slot.',\n table: {\n category: 'story controls',\n type: {\n summary: null\n }\n }\n },\n variant: {\n description: 'Variant of the notification.',\n options: ['success', 'warning', 'error'],\n control: { type: 'radio' },\n table: {\n category: 'ifx-notification props',\n defaultValue: {\n summary: 'success'\n },\n type: {\n summary: 'success | warning | error'\n }\n }\n },\n icon: {\n description: 'The icon to be displayed in the notification. Choose \"none\" to display no icon.',\n options: ['none', ...Object.values(icons).map(i => i['name'])],\n control: { type: 'select' },\n table: {\n category: 'ifx-notification props',\n type: {\n summary: 'string'\n }\n }\n },\n linkText: {\n description: 'Text for the link.',\n table: {\n category: 'ifx-notification props',\n type: {\n summary: 'string'\n }\n }\n },\n linkHref: {\n description: 'URL for the link.',\n table: {\n category: 'ifx-notification props',\n type: {\n summary: 'string'\n }\n }\n },\n linkTarget: {\n options: ['_blank', '_self', '_parent'],\n control: { type: 'radio' },\n description: 'Specifies where to open the linked document.',\n table: {\n category: 'ifx-notification props',\n defaultValue: {\n summary: '_blank'\n },\n type: {\n summary: '_blank | _self | _parent'\n }\n }\n },\n },\n};\n\nconst DefaultTemplate = args => {\n const icon = args.icon === 'none' ? '' : args.icon;\n\n return `<ifx-notification \n icon = \"${icon}\"\n variant=\"${args.variant}\" \n link-text=\"${args.linkText}\" \n link-href=\"${args.linkHref}\"\n link-target=\"${args.linkTarget}\">\n ${args.content}\n</ifx-notification>`;\n}\n\nexport const Default = DefaultTemplate.bind({});\nDefault.argTypes = {};\n"]}
1
+ {"version":3,"file":"notification.stories.js","sourceRoot":"","sources":["../../../src/components/notification/notification.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD,eAAe;IACb,KAAK,EAAE,yBAAyB;IAChC,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,IAAI,EAAE;QACJ,OAAO,EAAE,qBAAqB;QAC9B,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE,MAAM;QAChB,QAAQ,EAAE,yBAAyB;QACnC,UAAU,EAAE,QAAQ;KACrB;IACD,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,WAAW,EAAE,iDAAiD;SAC/D;QACD,OAAO,EAAE;YACP,WAAW,EAAE,8BAA8B;YAC3C,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC;YACxC,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SAC3B;QACD,IAAI,EAAE;YACJ,WAAW,EAAE,+CAA+C;YAC5D,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;YACjD,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC5B;QACD,QAAQ,EAAE;YACR,WAAW,EAAE,oBAAoB;SAClC;QACD,QAAQ,EAAE;YACR,WAAW,EAAE,mBAAmB;SACjC;QACD,UAAU,EAAC;YACT,OAAO,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC;YACvC,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SAC3B;KACF;CACF,CAAC;AAEF,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE,CAAC;UACtB,IAAI,CAAC,IAAI;aACN,IAAI,CAAC,OAAO;eACV,IAAI,CAAC,QAAQ;eACb,IAAI,CAAC,QAAQ;iBACX,IAAI,CAAC,UAAU;IAC5B,IAAI,CAAC,OAAO;oBACI,CAAC;AAErB,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChD,OAAO,CAAC,QAAQ,GAAG,EAAE,CAAC","sourcesContent":["import { icons } from '@infineon/infineon-icons';\n\nexport default {\n title: 'Components/Notification',\n tags: ['autodocs'],\n\n args: {\n content: \"Sample Notification\",\n variant: 'success',\n icon: 'c-check-16',\n linkText: 'Link',\n linkHref: 'https://www.example.com',\n linkTarget: '_blank',\n },\n argTypes: {\n content: {\n description: 'Text inside the notification is passed as slot.',\n },\n variant: {\n description: 'Variant of the notification.',\n options: ['success', 'warning', 'error'],\n control: { type: 'radio' },\n },\n icon: {\n description: 'The icon to be displayed in the notification.',\n options: Object.values(icons).map(i => i['name']),\n control: { type: 'select' },\n },\n linkText: {\n description: 'Text for the link.',\n },\n linkHref: {\n description: 'URL for the link.',\n },\n linkTarget:{\n options: ['_blank', '_self', '_parent'],\n control: { type: 'radio' },\n },\n },\n};\n\nconst DefaultTemplate = args => `<ifx-notification \n icon=\"${args.icon}\" \n variant=\"${args.variant}\" \n link-text=\"${args.linkText}\" \n link-href=\"${args.linkHref}\"\n link-target=\"${args.linkTarget}\">\n ${args.content}\n</ifx-notification>`;\n\nexport const Default = DefaultTemplate.bind({});\nDefault.argTypes = {};\n"]}
@@ -5,25 +5,6 @@ export default {
5
5
  label: 1,
6
6
  inverted: false,
7
7
  },
8
- argTypes: {
9
- label: {
10
- name: 'Label of Number Indicator',
11
- description: 'Specifies the number to be displayed within the indicator.',
12
- table: {
13
- category: 'story controls'
14
- }
15
- },
16
- inverted: {
17
- description: 'Toggles the color scheme of the number indicator.',
18
- control: 'boolean',
19
- table: {
20
- category: 'ifx-number-indicator props',
21
- defaultValue: {
22
- summary: false
23
- }
24
- }
25
- }
26
- }
27
8
  };
28
9
  const DefaultTemplate = args => `<ifx-number-indicator inverted="${args.inverted}">${args.label}</ifx-number-indicator>`;
29
10
  export const Default = DefaultTemplate.bind({});
@@ -1 +1 @@
1
- {"version":3,"file":"number-indicator.stories.js","sourceRoot":"","sources":["../../../src/components/number-indicator/number-indicator.stories.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,KAAK,EAAE,6BAA6B;IACpC,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,IAAI,EAAE;QACJ,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,KAAK;KAChB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,IAAI,EAAE,2BAA2B;YACjC,WAAW,EAAE,4DAA4D;YACzE,KAAK,EAAE;gBACL,QAAQ,EAAE,gBAAgB;aAC3B;SACF;QACD,QAAQ,EAAE;YACR,WAAW,EAAE,mDAAmD;YAChE,OAAO,EAAE,SAAS;YAClB,KAAK,EAAE;gBACL,QAAQ,EAAE,4BAA4B;gBACtC,YAAY,EAAE;oBACZ,OAAO,EAAE,KAAK;iBACf;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE,CAAC,mCAAmC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,KAAK,yBAAyB,CAAC;AAEzH,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChD,OAAO,CAAC,QAAQ,GAAG,EAAE,CAAC","sourcesContent":["export default {\n title: 'Components/Number Indicator',\n tags: ['autodocs'],\n\n args: {\n label: 1,\n inverted: false,\n },\n argTypes: {\n label: {\n name: 'Label of Number Indicator',\n description: 'Specifies the number to be displayed within the indicator.',\n table: {\n category: 'story controls'\n }\n },\n inverted: {\n description: 'Toggles the color scheme of the number indicator.',\n control: 'boolean',\n table: {\n category: 'ifx-number-indicator props',\n defaultValue: {\n summary: false\n }\n }\n }\n }\n};\n\nconst DefaultTemplate = args => `<ifx-number-indicator inverted=\"${args.inverted}\">${args.label}</ifx-number-indicator>`;\n\nexport const Default = DefaultTemplate.bind({});\nDefault.argTypes = {};\n"]}
1
+ {"version":3,"file":"number-indicator.stories.js","sourceRoot":"","sources":["../../../src/components/number-indicator/number-indicator.stories.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,KAAK,EAAE,6BAA6B;IACpC,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,IAAI,EAAE;QACJ,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,KAAK;KAChB;CACF,CAAC;AAEF,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE,CAAC,mCAAmC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,KAAK,yBAAyB,CAAC;AAEzH,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChD,OAAO,CAAC,QAAQ,GAAG,EAAE,CAAC","sourcesContent":["export default {\n title: 'Components/Number Indicator',\n tags: ['autodocs'],\n\n args: {\n label: 1,\n inverted: false,\n },\n};\n\nconst DefaultTemplate = args => `<ifx-number-indicator inverted=\"${args.inverted}\">${args.label}</ifx-number-indicator>`;\n\nexport const Default = DefaultTemplate.bind({});\nDefault.argTypes = {};\n"]}
@@ -7,35 +7,10 @@ export default {
7
7
  currentPage: 1,
8
8
  },
9
9
  argTypes: {
10
- currentPage: {
11
- description: 'Current page number.',
12
- table: {
13
- category: 'Ifx-pagination props',
14
- defaultValue: {
15
- 'summary': '0'
16
- },
17
- type: {
18
- summary: 'number',
19
- },
20
- },
21
- },
22
- total: {
23
- description: 'Total number of items.',
24
- table: {
25
- category: 'Ifx-pagination props',
26
- defaultValue: {
27
- 'summary': '1'
28
- },
29
- type: {
30
- summary: 'number',
31
- },
32
- },
33
- },
34
10
  ifxPageChange: {
35
11
  action: 'ifxPageChange',
36
- description: 'Custom event emitted page is changed.',
12
+ description: 'Custom event emitted page is changed',
37
13
  table: {
38
- category: 'custom events',
39
14
  type: {
40
15
  summary: 'Framework integration',
41
16
  detail: 'React: onIfxPageChange={handlePageChange}\nVue:@ifxPageChange="handlePageChange"\nAngular:(ifxPageChange)="handlePageChange()"\nVanillaJs:.addEventListener("ifxPageChange", (event) => {//handle page change});',
@@ -44,9 +19,8 @@ export default {
44
19
  },
45
20
  ifxNextPage: {
46
21
  action: 'ifxNextPage',
47
- description: 'Custom event emitted when next page button clicked.',
22
+ description: 'Custom event emitted when next page button clicked',
48
23
  table: {
49
- category: 'custom events',
50
24
  type: {
51
25
  summary: 'Framework integration',
52
26
  detail: 'React: onIfxNextPage={handlePageChange}\nVue:@ifxNextPage="handlePageChange"\nAngular:(ifxNextPage)="handlePageChange()"\nVanillaJs:.addEventListener("ifxNextPage", (event) => {//handle page change});',
@@ -55,9 +29,8 @@ export default {
55
29
  },
56
30
  ifxPrevPage: {
57
31
  action: 'ifxPrevPage',
58
- description: 'Custom event emitted when previous page button clicked.',
32
+ description: 'Custom event emitted when previous page button clicked',
59
33
  table: {
60
- category: 'custom events',
61
34
  type: {
62
35
  summary: 'Framework integration',
63
36
  detail: 'React: onIfxPrevPage={handlePageChange}\nVue:@ifxPrevPage="handlePageChange"\nAngular:(ifxPrevPage)="handlePageChange()"\nVanillaJs:.addEventListener("ifxPrevPage", (event) => {//handle page change});',
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.stories.js","sourceRoot":"","sources":["../../../src/components/pagination/pagination.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eAAe;IACb,KAAK,EAAE,uBAAuB;IAC9B,sBAAsB;IAEtB,IAAI,EAAE;QACJ,KAAK,EAAE,EAAE;QACT,WAAW,EAAE,CAAC;KACf;IACD,QAAQ,EAAE;QACR,WAAW,EAAE;YACX,WAAW,EAAE,sBAAsB;YACnC,KAAK,EAAE;gBACL,QAAQ,EAAE,sBAAsB;gBAChC,YAAY,EAAE;oBACZ,SAAS,EAAE,GAAG;iBACf;gBACD,IAAI,EAAE;oBACJ,OAAO,EAAE,QAAQ;iBAClB;aACF;SACF;QAED,KAAK,EAAE;YACL,WAAW,EAAE,wBAAwB;YACrC,KAAK,EAAE;gBACL,QAAQ,EAAE,sBAAsB;gBAChC,YAAY,EAAE;oBACZ,SAAS,EAAE,GAAG;iBACf;gBACD,IAAI,EAAE;oBACJ,OAAO,EAAE,QAAQ;iBAClB;aACF;SACF;QAED,aAAa,EAAE;YACb,MAAM,EAAE,eAAe;YACvB,WAAW,EAAE,uCAAuC;YACpD,KAAK,EAAE;gBACL,QAAQ,EAAE,eAAe;gBACzB,IAAI,EAAE;oBACJ,OAAO,EAAE,uBAAuB;oBAChC,MAAM,EACJ,kNAAkN;iBACrN;aACF;SACF;QACD,WAAW,EAAE;YACX,MAAM,EAAE,aAAa;YACrB,WAAW,EAAE,qDAAqD;YAClE,KAAK,EAAE;gBACL,QAAQ,EAAE,eAAe;gBACzB,IAAI,EAAE;oBACJ,OAAO,EAAE,uBAAuB;oBAChC,MAAM,EACJ,0MAA0M;iBAC7M;aACF;SACF;QACD,WAAW,EAAE;YACX,MAAM,EAAE,aAAa;YACrB,WAAW,EAAE,yDAAyD;YACtE,KAAK,EAAE;gBACL,QAAQ,EAAE,eAAe;gBACzB,IAAI,EAAE;oBACJ,OAAO,EAAE,uBAAuB;oBAChC,MAAM,EACJ,0MAA0M;iBAC7M;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE;IAC7B,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;IACzD,OAAO,CAAC,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1C,OAAO,CAAC,YAAY,CAAC,cAAc,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IACvD,OAAO,CAAC,gBAAgB,CAAC,eAAe,EAAE,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC;IACnE,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChD,OAAO,CAAC,QAAQ,GAAG,EAAE,CAAC","sourcesContent":["import { action } from '@storybook/addon-actions';\n\nexport default {\n title: 'Components/Pagination',\n // tags: ['autodocs'],\n\n args: {\n total: 50,\n currentPage: 1,\n },\n argTypes: {\n currentPage: {\n description: 'Current page number.',\n table: {\n category: 'Ifx-pagination props',\n defaultValue: {\n 'summary': '0'\n },\n type: {\n summary: 'number',\n },\n },\n },\n\n total: {\n description: 'Total number of items.',\n table: {\n category: 'Ifx-pagination props',\n defaultValue: {\n 'summary': '1'\n },\n type: {\n summary: 'number',\n },\n },\n },\n\n ifxPageChange: {\n action: 'ifxPageChange',\n description: 'Custom event emitted page is changed.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxPageChange={handlePageChange}\\nVue:@ifxPageChange=\"handlePageChange\"\\nAngular:(ifxPageChange)=\"handlePageChange()\"\\nVanillaJs:.addEventListener(\"ifxPageChange\", (event) => {//handle page change});',\n },\n },\n },\n ifxNextPage: {\n action: 'ifxNextPage',\n description: 'Custom event emitted when next page button clicked.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxNextPage={handlePageChange}\\nVue:@ifxNextPage=\"handlePageChange\"\\nAngular:(ifxNextPage)=\"handlePageChange()\"\\nVanillaJs:.addEventListener(\"ifxNextPage\", (event) => {//handle page change});',\n },\n },\n },\n ifxPrevPage: {\n action: 'ifxPrevPage',\n description: 'Custom event emitted when previous page button clicked.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxPrevPage={handlePageChange}\\nVue:@ifxPrevPage=\"handlePageChange\"\\nAngular:(ifxPrevPage)=\"handlePageChange()\"\\nVanillaJs:.addEventListener(\"ifxPrevPage\", (event) => {//handle page change});',\n },\n },\n },\n },\n};\n\nconst DefaultTemplate = args => {\n const element = document.createElement('ifx-pagination');\n element.setAttribute('total', args.total);\n element.setAttribute('current-page', args.currentPage);\n element.addEventListener('ifxPageChange', action('ifxPageChange'));\n return element;\n};\n\nexport const Default = DefaultTemplate.bind({});\nDefault.argTypes = {};\n"]}
1
+ {"version":3,"file":"pagination.stories.js","sourceRoot":"","sources":["../../../src/components/pagination/pagination.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eAAe;IACb,KAAK,EAAE,uBAAuB;IAC9B,sBAAsB;IAEtB,IAAI,EAAE;QACJ,KAAK,EAAE,EAAE;QACT,WAAW,EAAE,CAAC;KACf;IACD,QAAQ,EAAE;QACR,aAAa,EAAE;YACb,MAAM,EAAE,eAAe;YACvB,WAAW,EAAE,sCAAsC;YACnD,KAAK,EAAE;gBACL,IAAI,EAAE;oBACJ,OAAO,EAAE,uBAAuB;oBAChC,MAAM,EACJ,kNAAkN;iBACrN;aACF;SACF;QACD,WAAW,EAAE;YACX,MAAM,EAAE,aAAa;YACrB,WAAW,EAAE,oDAAoD;YACjE,KAAK,EAAE;gBACL,IAAI,EAAE;oBACJ,OAAO,EAAE,uBAAuB;oBAChC,MAAM,EACJ,0MAA0M;iBAC7M;aACF;SACF;QACD,WAAW,EAAE;YACX,MAAM,EAAE,aAAa;YACrB,WAAW,EAAE,wDAAwD;YACrE,KAAK,EAAE;gBACL,IAAI,EAAE;oBACJ,OAAO,EAAE,uBAAuB;oBAChC,MAAM,EACJ,0MAA0M;iBAC7M;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE;IAC7B,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;IACzD,OAAO,CAAC,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1C,OAAO,CAAC,YAAY,CAAC,cAAc,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IACvD,OAAO,CAAC,gBAAgB,CAAC,eAAe,EAAE,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC;IACnE,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChD,OAAO,CAAC,QAAQ,GAAG,EAAE,CAAC","sourcesContent":["import { action } from '@storybook/addon-actions';\n\nexport default {\n title: 'Components/Pagination',\n // tags: ['autodocs'],\n\n args: {\n total: 50,\n currentPage: 1,\n },\n argTypes: {\n ifxPageChange: {\n action: 'ifxPageChange',\n description: 'Custom event emitted page is changed',\n table: {\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxPageChange={handlePageChange}\\nVue:@ifxPageChange=\"handlePageChange\"\\nAngular:(ifxPageChange)=\"handlePageChange()\"\\nVanillaJs:.addEventListener(\"ifxPageChange\", (event) => {//handle page change});',\n },\n },\n },\n ifxNextPage: {\n action: 'ifxNextPage',\n description: 'Custom event emitted when next page button clicked',\n table: {\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxNextPage={handlePageChange}\\nVue:@ifxNextPage=\"handlePageChange\"\\nAngular:(ifxNextPage)=\"handlePageChange()\"\\nVanillaJs:.addEventListener(\"ifxNextPage\", (event) => {//handle page change});',\n },\n },\n },\n ifxPrevPage: {\n action: 'ifxPrevPage',\n description: 'Custom event emitted when previous page button clicked',\n table: {\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxPrevPage={handlePageChange}\\nVue:@ifxPrevPage=\"handlePageChange\"\\nAngular:(ifxPrevPage)=\"handlePageChange()\"\\nVanillaJs:.addEventListener(\"ifxPrevPage\", (event) => {//handle page change});',\n },\n },\n },\n },\n};\n\nconst DefaultTemplate = args => {\n const element = document.createElement('ifx-pagination');\n element.setAttribute('total', args.total);\n element.setAttribute('current-page', args.currentPage);\n element.addEventListener('ifxPageChange', action('ifxPageChange'));\n return element;\n};\n\nexport const Default = DefaultTemplate.bind({});\nDefault.argTypes = {};\n"]}