@infineon/infineon-design-system-stencil 30.9.2--canary.1640.64bdc8df6d06e0c7326a4bfb6bcc6798b101e99a.0 → 30.9.2--canary.1669.a6556475a763cdebf0a29aa12ca37f78801b6799.1

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 (280) hide show
  1. package/dist/cjs/ifx-accordion_2.cjs.entry.js +7 -7
  2. package/dist/cjs/ifx-accordion_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/ifx-breadcrumb-item-label.cjs.entry.js +2 -2
  4. package/dist/cjs/ifx-breadcrumb-item-label.cjs.entry.js.map +1 -1
  5. package/dist/cjs/ifx-breadcrumb.cjs.entry.js +3 -3
  6. package/dist/cjs/ifx-breadcrumb.cjs.entry.js.map +1 -1
  7. package/dist/cjs/ifx-chip_3.cjs.entry.js +21 -19
  8. package/dist/cjs/ifx-chip_3.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ifx-modal.cjs.entry.js +8 -8
  10. package/dist/cjs/ifx-modal.cjs.entry.js.map +1 -1
  11. package/dist/cjs/ifx-multiselect_2.cjs.entry.js +5 -5
  12. package/dist/cjs/ifx-multiselect_2.cjs.entry.js.map +1 -1
  13. package/dist/cjs/ifx-search-bar.cjs.entry.js +5 -5
  14. package/dist/cjs/ifx-search-bar.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ifx-sidebar-item.cjs.entry.js +10 -9
  16. package/dist/cjs/ifx-sidebar-item.cjs.entry.js.map +1 -1
  17. package/dist/cjs/ifx-table.cjs.entry.js +2 -2
  18. package/dist/cjs/ifx-table.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ifx-tabs.cjs.entry.js +6 -6
  20. package/dist/cjs/ifx-tabs.cjs.entry.js.map +1 -1
  21. package/dist/cjs/infineon-design-system-stencil.cjs.js +1 -1
  22. package/dist/cjs/loader.cjs.js +1 -1
  23. package/dist/collection/components/accordion/accordion.js +2 -2
  24. package/dist/collection/components/accordion/accordion.js.map +1 -1
  25. package/dist/collection/components/accordion/accordion.stories.js +7 -81
  26. package/dist/collection/components/accordion/accordion.stories.js.map +1 -1
  27. package/dist/collection/components/accordion/accordionItem.js +10 -10
  28. package/dist/collection/components/accordion/accordionItem.js.map +1 -1
  29. package/dist/collection/components/alert/alert.stories.js +12 -45
  30. package/dist/collection/components/alert/alert.stories.js.map +1 -1
  31. package/dist/collection/components/badge/badge.stories.js +7 -28
  32. package/dist/collection/components/badge/badge.stories.js.map +1 -1
  33. package/dist/collection/components/breadcrumb/breadcrumb-item-label.js +4 -4
  34. package/dist/collection/components/breadcrumb/breadcrumb-item-label.js.map +1 -1
  35. package/dist/collection/components/breadcrumb/breadcrumb.js +3 -3
  36. package/dist/collection/components/breadcrumb/breadcrumb.js.map +1 -1
  37. package/dist/collection/components/breadcrumb/breadcrumb.stories.js +13 -87
  38. package/dist/collection/components/breadcrumb/breadcrumb.stories.js.map +1 -1
  39. package/dist/collection/components/button/button.stories.js +9 -101
  40. package/dist/collection/components/button/button.stories.js.map +1 -1
  41. package/dist/collection/components/card/card.stories.js +3 -84
  42. package/dist/collection/components/card/card.stories.js.map +1 -1
  43. package/dist/collection/components/checkbox/checkbox.stories.js +14 -72
  44. package/dist/collection/components/checkbox/checkbox.stories.js.map +1 -1
  45. package/dist/collection/components/chip/chip-item/chip-item.js +4 -4
  46. package/dist/collection/components/chip/chip-item/chip-item.js.map +1 -1
  47. package/dist/collection/components/chip/chip.js +15 -15
  48. package/dist/collection/components/chip/chip.js.map +1 -1
  49. package/dist/collection/components/chip/chip.stories.js +26 -18
  50. package/dist/collection/components/chip/chip.stories.js.map +1 -1
  51. package/dist/collection/components/chip/interfaces.js.map +1 -1
  52. package/dist/collection/components/content-switcher/content-switcher.stories.js +3 -65
  53. package/dist/collection/components/content-switcher/content-switcher.stories.js.map +1 -1
  54. package/dist/collection/components/date-picker/date-picker.stories.js +7 -95
  55. package/dist/collection/components/date-picker/date-picker.stories.js.map +1 -1
  56. package/dist/collection/components/dropdown/dropdown.stories.js +64 -222
  57. package/dist/collection/components/dropdown/dropdown.stories.js.map +1 -1
  58. package/dist/collection/components/footer/footer.stories.js +1 -7
  59. package/dist/collection/components/footer/footer.stories.js.map +1 -1
  60. package/dist/collection/components/icon/infineonIconStencil.stories.js +2 -7
  61. package/dist/collection/components/icon/infineonIconStencil.stories.js.map +1 -1
  62. package/dist/collection/components/icon-button/icon-button.stories.js +5 -61
  63. package/dist/collection/components/icon-button/icon-button.stories.js.map +1 -1
  64. package/dist/collection/components/link/link.stories.js +4 -53
  65. package/dist/collection/components/link/link.stories.js.map +1 -1
  66. package/dist/collection/components/modal/modal.js +10 -10
  67. package/dist/collection/components/modal/modal.js.map +1 -1
  68. package/dist/collection/components/modal/modal.stories.js +19 -96
  69. package/dist/collection/components/modal/modal.stories.js.map +1 -1
  70. package/dist/collection/components/navigation/navbar/navbar.stories.js +12 -176
  71. package/dist/collection/components/navigation/navbar/navbar.stories.js.map +1 -1
  72. package/dist/collection/components/navigation/sidebar/sidebar-item.js +32 -11
  73. package/dist/collection/components/navigation/sidebar/sidebar-item.js.map +1 -1
  74. package/dist/collection/components/navigation/sidebar/sidebar.stories.js +19 -183
  75. package/dist/collection/components/navigation/sidebar/sidebar.stories.js.map +1 -1
  76. package/dist/collection/components/notification/notification.stories.js +8 -55
  77. package/dist/collection/components/notification/notification.stories.js.map +1 -1
  78. package/dist/collection/components/number-indicator/number-indicator.stories.js +0 -19
  79. package/dist/collection/components/number-indicator/number-indicator.stories.js.map +1 -1
  80. package/dist/collection/components/pagination/pagination.js +31 -1
  81. package/dist/collection/components/pagination/pagination.js.map +1 -1
  82. package/dist/collection/components/pagination/pagination.stories.js +14 -19
  83. package/dist/collection/components/pagination/pagination.stories.js.map +1 -1
  84. package/dist/collection/components/progress-bar/progress-bar.stories.js +8 -31
  85. package/dist/collection/components/progress-bar/progress-bar.stories.js.map +1 -1
  86. package/dist/collection/components/radio-button/radio-button.stories.js +13 -66
  87. package/dist/collection/components/radio-button/radio-button.stories.js.map +1 -1
  88. package/dist/collection/components/search-bar/search-bar.js +6 -6
  89. package/dist/collection/components/search-bar/search-bar.js.map +1 -1
  90. package/dist/collection/components/search-bar/search-bar.stories.js +9 -58
  91. package/dist/collection/components/search-bar/search-bar.stories.js.map +1 -1
  92. package/dist/collection/components/search-field/search-field.stories.js +8 -54
  93. package/dist/collection/components/search-field/search-field.stories.js.map +1 -1
  94. package/dist/collection/components/segmented-control/segmented-control.stories.js +10 -1
  95. package/dist/collection/components/segmented-control/segmented-control.stories.js.map +1 -1
  96. package/dist/collection/components/select/multi-select/multiselect.js +6 -6
  97. package/dist/collection/components/select/multi-select/multiselect.js.map +1 -1
  98. package/dist/collection/components/select/multi-select/multiselect.stories.js +5 -131
  99. package/dist/collection/components/select/multi-select/multiselect.stories.js.map +1 -1
  100. package/dist/collection/components/select/single-select/select.stories.js +26 -83
  101. package/dist/collection/components/select/single-select/select.stories.js.map +1 -1
  102. package/dist/collection/components/slider/slider.stories.js +13 -97
  103. package/dist/collection/components/slider/slider.stories.js.map +1 -1
  104. package/dist/collection/components/spinner/spinner.stories.js +2 -34
  105. package/dist/collection/components/spinner/spinner.stories.js.map +1 -1
  106. package/dist/collection/components/status/status.stories.js +1 -25
  107. package/dist/collection/components/status/status.stories.js.map +1 -1
  108. package/dist/collection/components/stepper/stepper.stories.js +25 -54
  109. package/dist/collection/components/stepper/stepper.stories.js.map +1 -1
  110. package/dist/collection/components/switch/switch.stories.js +4 -51
  111. package/dist/collection/components/switch/switch.stories.js.map +1 -1
  112. package/dist/collection/components/table-advanced-version/table.js +3 -3
  113. package/dist/collection/components/table-advanced-version/table.js.map +1 -1
  114. package/dist/collection/components/table-advanced-version/table.stories.js +39 -124
  115. package/dist/collection/components/table-advanced-version/table.stories.js.map +1 -1
  116. package/dist/collection/components/table-basic-version/table.stories.js +3 -30
  117. package/dist/collection/components/table-basic-version/table.stories.js.map +1 -1
  118. package/dist/collection/components/tabs/tabs.js +7 -7
  119. package/dist/collection/components/tabs/tabs.js.map +1 -1
  120. package/dist/collection/components/tabs/tabs.stories.js +29 -104
  121. package/dist/collection/components/tabs/tabs.stories.js.map +1 -1
  122. package/dist/collection/components/tag/tag.stories.js +0 -18
  123. package/dist/collection/components/tag/tag.stories.js.map +1 -1
  124. package/dist/collection/components/text-field/text-field.stories.js +13 -116
  125. package/dist/collection/components/text-field/text-field.stories.js.map +1 -1
  126. package/dist/collection/components/textarea/textarea.stories.js +3 -1
  127. package/dist/collection/components/textarea/textarea.stories.js.map +1 -1
  128. package/dist/collection/components/tooltip/tooltip.stories.js +4 -48
  129. package/dist/collection/components/tooltip/tooltip.stories.js.map +1 -1
  130. package/dist/components/ifx-accordion-item.js +1 -1
  131. package/dist/components/ifx-accordion.js +1 -1
  132. package/dist/components/ifx-breadcrumb-item-label.js +3 -3
  133. package/dist/components/ifx-breadcrumb-item-label.js.map +1 -1
  134. package/dist/components/ifx-breadcrumb.js +3 -3
  135. package/dist/components/ifx-breadcrumb.js.map +1 -1
  136. package/dist/components/ifx-chip-item.js +1 -1
  137. package/dist/components/ifx-chip.js +1 -1
  138. package/dist/components/ifx-faq.js +2 -2
  139. package/dist/components/ifx-modal.js +8 -8
  140. package/dist/components/ifx-modal.js.map +1 -1
  141. package/dist/components/ifx-multiselect.js +1 -1
  142. package/dist/components/ifx-pagination.js +1 -1
  143. package/dist/components/ifx-search-bar.js +5 -5
  144. package/dist/components/ifx-search-bar.js.map +1 -1
  145. package/dist/components/ifx-set-filter.js +1 -1
  146. package/dist/components/ifx-sidebar-item.js +13 -11
  147. package/dist/components/ifx-sidebar-item.js.map +1 -1
  148. package/dist/components/ifx-table.js +6 -6
  149. package/dist/components/ifx-table.js.map +1 -1
  150. package/dist/components/ifx-tabs.js +6 -6
  151. package/dist/components/ifx-tabs.js.map +1 -1
  152. package/dist/components/{p-cf8fd0f4.js → p-04b73e62.js} +6 -6
  153. package/dist/components/p-04b73e62.js.map +1 -0
  154. package/dist/components/{p-3baaa460.js → p-094bb435.js} +3 -3
  155. package/dist/components/{p-3baaa460.js.map → p-094bb435.js.map} +1 -1
  156. package/dist/components/{p-793d89e7.js → p-184f1004.js} +15 -15
  157. package/dist/components/p-184f1004.js.map +1 -0
  158. package/dist/components/{p-7b5e297f.js → p-23cdd5a7.js} +5 -5
  159. package/dist/components/p-23cdd5a7.js.map +1 -0
  160. package/dist/components/{p-b85fba0e.js → p-2f1e7628.js} +4 -2
  161. package/dist/components/p-2f1e7628.js.map +1 -0
  162. package/dist/components/{p-053d42ef.js → p-b2439194.js} +8 -8
  163. package/dist/components/{p-053d42ef.js.map → p-b2439194.js.map} +1 -1
  164. package/dist/esm/ifx-accordion_2.entry.js +7 -7
  165. package/dist/esm/ifx-accordion_2.entry.js.map +1 -1
  166. package/dist/esm/ifx-breadcrumb-item-label.entry.js +2 -2
  167. package/dist/esm/ifx-breadcrumb-item-label.entry.js.map +1 -1
  168. package/dist/esm/ifx-breadcrumb.entry.js +3 -3
  169. package/dist/esm/ifx-breadcrumb.entry.js.map +1 -1
  170. package/dist/esm/ifx-chip_3.entry.js +21 -19
  171. package/dist/esm/ifx-chip_3.entry.js.map +1 -1
  172. package/dist/esm/ifx-modal.entry.js +8 -8
  173. package/dist/esm/ifx-modal.entry.js.map +1 -1
  174. package/dist/esm/ifx-multiselect_2.entry.js +5 -5
  175. package/dist/esm/ifx-multiselect_2.entry.js.map +1 -1
  176. package/dist/esm/ifx-search-bar.entry.js +5 -5
  177. package/dist/esm/ifx-search-bar.entry.js.map +1 -1
  178. package/dist/esm/ifx-sidebar-item.entry.js +10 -9
  179. package/dist/esm/ifx-sidebar-item.entry.js.map +1 -1
  180. package/dist/esm/ifx-table.entry.js +2 -2
  181. package/dist/esm/ifx-table.entry.js.map +1 -1
  182. package/dist/esm/ifx-tabs.entry.js +6 -6
  183. package/dist/esm/ifx-tabs.entry.js.map +1 -1
  184. package/dist/esm/infineon-design-system-stencil.js +1 -1
  185. package/dist/esm/loader.js +1 -1
  186. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
  187. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js.map +1 -1
  188. package/dist/infineon-design-system-stencil/{p-26810237.entry.js → p-00d6e46e.entry.js} +2 -2
  189. package/dist/infineon-design-system-stencil/p-00d6e46e.entry.js.map +1 -0
  190. package/dist/infineon-design-system-stencil/p-222c1af9.entry.js +2 -0
  191. package/dist/infineon-design-system-stencil/p-222c1af9.entry.js.map +1 -0
  192. package/dist/infineon-design-system-stencil/p-28fb795b.entry.js +2 -0
  193. package/dist/infineon-design-system-stencil/{p-26df4dfe.entry.js.map → p-28fb795b.entry.js.map} +1 -1
  194. package/dist/infineon-design-system-stencil/p-436babb8.entry.js +2 -0
  195. package/dist/infineon-design-system-stencil/p-436babb8.entry.js.map +1 -0
  196. package/dist/infineon-design-system-stencil/p-72d804fb.entry.js +2 -0
  197. package/dist/infineon-design-system-stencil/p-72d804fb.entry.js.map +1 -0
  198. package/dist/infineon-design-system-stencil/p-7bef9272.entry.js +2 -0
  199. package/dist/infineon-design-system-stencil/p-7bef9272.entry.js.map +1 -0
  200. package/dist/infineon-design-system-stencil/p-89c7209f.entry.js +2 -0
  201. package/dist/infineon-design-system-stencil/p-89c7209f.entry.js.map +1 -0
  202. package/dist/infineon-design-system-stencil/p-9481adc8.entry.js +2 -0
  203. package/dist/infineon-design-system-stencil/p-9481adc8.entry.js.map +1 -0
  204. package/dist/infineon-design-system-stencil/{p-d93eb561.entry.js → p-bc8a4226.entry.js} +2 -2
  205. package/dist/infineon-design-system-stencil/p-bc8a4226.entry.js.map +1 -0
  206. package/dist/infineon-design-system-stencil/p-dc7deb14.entry.js +2 -0
  207. package/dist/infineon-design-system-stencil/p-dc7deb14.entry.js.map +1 -0
  208. package/dist/types/components/accordion/accordion.stories.d.ts +1 -67
  209. package/dist/types/components/accordion/accordionItem.d.ts +3 -3
  210. package/dist/types/components/alert/alert.stories.d.ts +11 -38
  211. package/dist/types/components/badge/badge.stories.d.ts +3 -23
  212. package/dist/types/components/breadcrumb/breadcrumb-item-label.d.ts +1 -1
  213. package/dist/types/components/breadcrumb/breadcrumb.stories.d.ts +1 -83
  214. package/dist/types/components/button/button.stories.d.ts +16 -92
  215. package/dist/types/components/card/card.stories.d.ts +1 -95
  216. package/dist/types/components/checkbox/checkbox.stories.d.ts +10 -65
  217. package/dist/types/components/chip/chip-item/chip-item.d.ts +1 -1
  218. package/dist/types/components/chip/chip.d.ts +1 -1
  219. package/dist/types/components/chip/chip.stories.d.ts +4 -11
  220. package/dist/types/components/chip/interfaces.d.ts +1 -1
  221. package/dist/types/components/content-switcher/content-switcher.stories.d.ts +0 -66
  222. package/dist/types/components/date-picker/date-picker.stories.d.ts +2 -88
  223. package/dist/types/components/dropdown/dropdown.stories.d.ts +33 -90
  224. package/dist/types/components/footer/footer.stories.d.ts +0 -4
  225. package/dist/types/components/icon/infineonIconStencil.stories.d.ts +0 -5
  226. package/dist/types/components/icon-button/icon-button.stories.d.ts +8 -56
  227. package/dist/types/components/link/link.stories.d.ts +6 -49
  228. package/dist/types/components/modal/modal.d.ts +2 -2
  229. package/dist/types/components/modal/modal.stories.d.ts +3 -77
  230. package/dist/types/components/navigation/navbar/navbar.stories.d.ts +6 -222
  231. package/dist/types/components/navigation/sidebar/sidebar-item.d.ts +3 -2
  232. package/dist/types/components/navigation/sidebar/sidebar.stories.d.ts +7 -158
  233. package/dist/types/components/notification/notification.stories.d.ts +2 -46
  234. package/dist/types/components/number-indicator/number-indicator.stories.d.ts +0 -19
  235. package/dist/types/components/pagination/pagination.d.ts +2 -0
  236. package/dist/types/components/pagination/pagination.stories.d.ts +7 -12
  237. package/dist/types/components/progress-bar/progress-bar.stories.d.ts +4 -25
  238. package/dist/types/components/radio-button/radio-button.stories.d.ts +8 -59
  239. package/dist/types/components/search-bar/search-bar.d.ts +1 -1
  240. package/dist/types/components/search-bar/search-bar.stories.d.ts +3 -60
  241. package/dist/types/components/search-field/search-field.stories.d.ts +6 -45
  242. package/dist/types/components/segmented-control/segmented-control.stories.d.ts +3 -0
  243. package/dist/types/components/select/multi-select/multiselect.d.ts +1 -1
  244. package/dist/types/components/select/multi-select/multiselect.stories.d.ts +0 -125
  245. package/dist/types/components/select/single-select/select.stories.d.ts +24 -67
  246. package/dist/types/components/slider/slider.stories.d.ts +0 -110
  247. package/dist/types/components/spinner/spinner.stories.d.ts +0 -32
  248. package/dist/types/components/status/status.stories.d.ts +2 -24
  249. package/dist/types/components/stepper/stepper.stories.d.ts +6 -30
  250. package/dist/types/components/switch/switch.stories.d.ts +1 -47
  251. package/dist/types/components/table-advanced-version/table.stories.d.ts +11 -50
  252. package/dist/types/components/table-basic-version/table.stories.d.ts +1 -21
  253. package/dist/types/components/tabs/tabs.d.ts +1 -1
  254. package/dist/types/components/tabs/tabs.stories.d.ts +9 -88
  255. package/dist/types/components/tag/tag.stories.d.ts +0 -20
  256. package/dist/types/components/text-field/text-field.stories.d.ts +10 -106
  257. package/dist/types/components/tooltip/tooltip.stories.d.ts +6 -41
  258. package/dist/types/components.d.ts +26 -20
  259. package/package.json +1 -1
  260. package/dist/components/p-793d89e7.js.map +0 -1
  261. package/dist/components/p-7b5e297f.js.map +0 -1
  262. package/dist/components/p-b85fba0e.js.map +0 -1
  263. package/dist/components/p-cf8fd0f4.js.map +0 -1
  264. package/dist/infineon-design-system-stencil/p-26810237.entry.js.map +0 -1
  265. package/dist/infineon-design-system-stencil/p-26df4dfe.entry.js +0 -2
  266. package/dist/infineon-design-system-stencil/p-355cea09.entry.js +0 -2
  267. package/dist/infineon-design-system-stencil/p-355cea09.entry.js.map +0 -1
  268. package/dist/infineon-design-system-stencil/p-60dcd508.entry.js +0 -2
  269. package/dist/infineon-design-system-stencil/p-60dcd508.entry.js.map +0 -1
  270. package/dist/infineon-design-system-stencil/p-68752789.entry.js +0 -2
  271. package/dist/infineon-design-system-stencil/p-68752789.entry.js.map +0 -1
  272. package/dist/infineon-design-system-stencil/p-6a274db4.entry.js +0 -2
  273. package/dist/infineon-design-system-stencil/p-6a274db4.entry.js.map +0 -1
  274. package/dist/infineon-design-system-stencil/p-71fda335.entry.js +0 -2
  275. package/dist/infineon-design-system-stencil/p-71fda335.entry.js.map +0 -1
  276. package/dist/infineon-design-system-stencil/p-7741e81d.entry.js +0 -2
  277. package/dist/infineon-design-system-stencil/p-7741e81d.entry.js.map +0 -1
  278. package/dist/infineon-design-system-stencil/p-d93eb561.entry.js.map +0 -1
  279. package/dist/infineon-design-system-stencil/p-df6cadc1.entry.js +0 -2
  280. package/dist/infineon-design-system-stencil/p-df6cadc1.entry.js.map +0 -1
@@ -5,55 +5,28 @@ export default {
5
5
  args: {
6
6
  label: 'Attention! This is an alert message — check it out!',
7
7
  variant: 'primary',
8
+ showIcon: true,
8
9
  closable: true,
9
- icon: 'c-info-24',
10
+ iconName: 'c-info-24',
10
11
  AriaLive: 'assertive',
11
12
  },
12
13
  argTypes: {
13
- label: {
14
- name: 'Label of Alert',
15
- description: 'Sets the label of *<ifx-alert>*.',
16
- table: {
17
- category: 'story controls'
18
- }
19
- },
20
14
  variant: {
21
- description: 'Sets the style variant of the alert.',
22
15
  options: ['primary', 'success', 'danger', 'warning'],
23
- control: 'radio',
24
- table: {
25
- category: 'ifx-alert props',
26
- defaultValue: {
27
- summary: 'primary'
28
- }
29
- }
16
+ control: { type: 'radio' },
30
17
  },
31
- icon: {
32
- description: 'The icon to be displayed. Choose ***none*** to display no icon.',
33
- options: ['none', ...Object.values(icons).map(i => i['name'])],
34
- control: 'select',
35
- table: {
36
- category: 'ifx-alert props',
37
- defaultValue: {
38
- summary: 'c-info-24'
39
- }
40
- }
18
+ iconName: {
19
+ options: Object.values(icons).map(i => i['name']),
20
+ control: { type: 'select' },
41
21
  },
42
22
  closable: {
43
- description: 'Defines whether the alert should be closable or not.',
44
23
  control: 'boolean',
45
- table: {
46
- category: 'ifx-alert props',
47
- defaultValue: {
48
- summary: 'true'
49
- }
50
- }
24
+ default: true,
51
25
  },
52
26
  ifxClose: {
53
27
  action: 'ifxClose',
54
- description: 'Custom event emitted when close button clicked.',
28
+ description: 'Custom event emitted when close button clicked',
55
29
  table: {
56
- category: 'custom events',
57
30
  type: {
58
31
  summary: 'Framework integration',
59
32
  detail: 'React: onIfxClose={handleChange}\nVue:@ifxClose="handleChange"\nAngular:(ifxClose)="handleChange()"\nVanillaJs:.addEventListener("ifxClose", (event) => {//handle change});',
@@ -62,18 +35,12 @@ export default {
62
35
  },
63
36
  AriaLive: {
64
37
  options: ['off', 'polite', 'assertive'],
65
- control: 'radio',
66
- description: 'The aria-live attribute to indicate a dynamic content.',
67
- table: {
68
- category: 'ifx-alert props',
69
- defaultValue: {
70
- summary: 'assertive'
71
- }
72
- }
38
+ control: { type: 'radio' },
39
+ description: 'The aria-live attribute to indicate a dynamic content.'
73
40
  },
74
41
  },
75
42
  };
76
- const DefaultTemplate = args => `<ifx-alert aria-live="${args.AriaLive}" variant="${args.variant}" icon="${args.icon === 'none' ? '' : args.icon}" closable="${args.closable}">${args.label}</ifx-alert>`;
43
+ const DefaultTemplate = args => `<ifx-alert aria-live="${args.AriaLive}" variant="${args.variant}" icon="${args.showIcon ? args.iconName : ''}" closable="${args.closable}">${args.label}</ifx-alert>`;
77
44
  export const Default = DefaultTemplate.bind({});
78
45
  const InfoTemplate = args => ` <ifx-alert variant="info" closable="${args.closable}">
79
46
  <div slot="headline">Headline</div>
@@ -88,7 +55,7 @@ Info.argTypes = {
88
55
  disable: true,
89
56
  },
90
57
  },
91
- icon: {
58
+ iconName: {
92
59
  table: {
93
60
  disable: true,
94
61
  },
@@ -1 +1 @@
1
- {"version":3,"file":"alert.stories.js","sourceRoot":"","sources":["../../../src/components/alert/alert.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,IAAI,EAAE;QACJ,KAAK,EAAE,qDAAqD;QAC5D,O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,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,WAAW,CAAC;YACvC,OAAO,EAAE,OAAO;YAChB,WAAW,EAAE,wDAAwD;YACrE,KAAK,EAAE;gBACL,QAAQ,EAAE,iBAAiB;gBAC3B,YAAY,EAAE;oBACZ,OAAO,EAAE,WAAW;iBACrB;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE,CAAC,yBAAyB,IAAI,CAAC,QAAQ,cAAc,IAAI,CAAC,OAAO,WAAW,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,eAAe,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,KAAK,cAAc,CAAC;AAE1M,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAEhD,MAAM,YAAY,GAAG,IAAI,CAAC,EAAE,CAC1B,yCAAyC,IAAI,CAAC,QAAQ;;;;;iBAKvC,CAAC;AAElB,MAAM,CAAC,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC1C,IAAI,CAAC,QAAQ,GAAG;IACd,OAAO,EAAE;QACP,KAAK,EAAE;YACL,OAAO,EAAE,IAAI;SACd;KACF;IACD,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,OAAO,EAAE,IAAI;SACd;KACF;IACD,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,OAAO,EAAE,IAAI;SACd;KACF;CACF,CAAC","sourcesContent":["import { icons } from '@infineon/infineon-icons';\n\nexport default {\n title: 'Components/Alert',\n tags: ['autodocs'],\n\n args: {\n label: 'Attention! This is an alert message — check it out!',\n variant: 'primary',\n closable: true,\n icon: 'c-info-24',\n AriaLive: 'assertive',\n },\n\n argTypes: {\n label: {\n name: 'Label of Alert',\n description: 'Sets the label of *<ifx-alert>*.',\n table: {\n category: 'story controls'\n }\n },\n variant: {\n description: 'Sets the style variant of the alert.',\n options: ['primary', 'success', 'danger', 'warning'],\n control: 'radio',\n table: {\n category: 'ifx-alert props',\n defaultValue: {\n summary: 'primary'\n }\n }\n },\n\n icon: {\n description: 'The icon to be displayed. Choose ***none*** to display no icon.',\n options: ['none', ...Object.values(icons).map(i => i['name'])],\n control: 'select',\n table: {\n category: 'ifx-alert props',\n defaultValue: {\n summary: 'c-info-24'\n }\n }\n },\n closable: {\n description: 'Defines whether the alert should be closable or not.',\n control: 'boolean',\n table: {\n category: 'ifx-alert props',\n defaultValue: {\n summary: 'true'\n }\n }\n },\n\n ifxClose: {\n action: 'ifxClose',\n description: 'Custom event emitted when close button clicked.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxClose={handleChange}\\nVue:@ifxClose=\"handleChange\"\\nAngular:(ifxClose)=\"handleChange()\"\\nVanillaJs:.addEventListener(\"ifxClose\", (event) => {//handle change});',\n },\n },\n },\n\n AriaLive: { \n options: ['off', 'polite', 'assertive'],\n control: 'radio',\n description: 'The aria-live attribute to indicate a dynamic content.',\n table: {\n category: 'ifx-alert props',\n defaultValue: {\n summary: 'assertive'\n }\n }\n },\n },\n};\n\nconst DefaultTemplate = args => `<ifx-alert aria-live=\"${args.AriaLive}\" variant=\"${args.variant}\" icon=\"${args.icon === 'none' ? '' : args.icon}\" closable=\"${args.closable}\">${args.label}</ifx-alert>`;\n\nexport const Default = DefaultTemplate.bind({});\n\nconst InfoTemplate = args =>\n ` <ifx-alert variant=\"info\" closable=\"${args.closable}\">\n <div slot=\"headline\">Headline</div>\n <div slot=\"desc\">\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Modi animi voluptatum quia esse dolor corrupti veniam dolorum. Voluptatem ut enim voluptate. Provident modi molestiae at atque rerum cupiditate, dicta recusandae ab libero veniam iusto possimus quia sequi amet, tempora dolore nobis excepturi est illo blanditiis nihil laborum enim ducimus consequuntur.\n </div>\n </ifx-alert>`;\n\nexport const Info = InfoTemplate.bind({});\nInfo.argTypes = {\n variant: {\n table: {\n disable: true,\n },\n },\n icon: {\n table: {\n disable: true,\n },\n },\n showIcon: {\n table: {\n disable: true,\n },\n },\n};\n"]}
1
+ {"version":3,"file":"alert.stories.js","sourceRoot":"","sources":["../../../src/components/alert/alert.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,IAAI,EAAE;QACJ,KAAK,EAAE,qDAAqD;QAC5D,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,WAAW;KACtB;IAED,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC;YACpD,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SAC3B;QAED,QAAQ,EAAE;YACR,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;QAED,QAAQ,EAAE;YACR,OAAO,EAAE,SAAS;YAClB,OAAO,EAAE,IAAI;SACd;QAED,QAAQ,EAAE;YACR,MAAM,EAAE,UAAU;YAClB,WAAW,EAAE,gDAAgD;YAC7D,KAAK,EAAE;gBACL,IAAI,EAAE;oBACJ,OAAO,EAAE,uBAAuB;oBAChC,MAAM,EACJ,6KAA6K;iBAChL;aACF;SACF;QAED,QAAQ,EAAE;YACR,OAAO,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,WAAW,CAAC;YACvC,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;YAC1B,WAAW,EAAE,wDAAwD;SACtE;KACF;CACF,CAAC;AAEF,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE,CAAC,yBAAyB,IAAI,CAAC,QAAQ,cAAc,IAAI,CAAC,OAAO,WAAW,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,eAAe,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,KAAK,cAAc,CAAC;AAEvM,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAEhD,MAAM,YAAY,GAAG,IAAI,CAAC,EAAE,CAC1B,yCAAyC,IAAI,CAAC,QAAQ;;;;;iBAKvC,CAAC;AAElB,MAAM,CAAC,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC1C,IAAI,CAAC,QAAQ,GAAG;IACd,OAAO,EAAE;QACP,KAAK,EAAE;YACL,OAAO,EAAE,IAAI;SACd;KACF;IACD,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,OAAO,EAAE,IAAI;SACd;KACF;IACD,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,OAAO,EAAE,IAAI;SACd;KACF;CACF,CAAC","sourcesContent":["import { icons } from '@infineon/infineon-icons';\n\nexport default {\n title: 'Components/Alert',\n tags: ['autodocs'],\n\n args: {\n label: 'Attention! This is an alert message — check it out!',\n variant: 'primary',\n showIcon: true,\n closable: true,\n iconName: 'c-info-24',\n AriaLive: 'assertive',\n },\n\n argTypes: {\n variant: {\n options: ['primary', 'success', 'danger', 'warning'],\n control: { type: 'radio' },\n },\n\n iconName: {\n options: Object.values(icons).map(i => i['name']),\n control: { type: 'select' },\n },\n\n closable: {\n control: 'boolean',\n default: true,\n },\n\n ifxClose: {\n action: 'ifxClose',\n description: 'Custom event emitted when close button clicked',\n table: {\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxClose={handleChange}\\nVue:@ifxClose=\"handleChange\"\\nAngular:(ifxClose)=\"handleChange()\"\\nVanillaJs:.addEventListener(\"ifxClose\", (event) => {//handle change});',\n },\n },\n },\n\n AriaLive: { \n options: ['off', 'polite', 'assertive'],\n control: { type: 'radio' },\n description: 'The aria-live attribute to indicate a dynamic content.' \n },\n },\n};\n\nconst DefaultTemplate = args => `<ifx-alert aria-live=\"${args.AriaLive}\" variant=\"${args.variant}\" icon=\"${args.showIcon ? args.iconName : ''}\" closable=\"${args.closable}\">${args.label}</ifx-alert>`;\n\nexport const Default = DefaultTemplate.bind({});\n\nconst InfoTemplate = args =>\n ` <ifx-alert variant=\"info\" closable=\"${args.closable}\">\n <div slot=\"headline\">Headline</div>\n <div slot=\"desc\">\n Lorem ipsum dolor sit amet consectetur adipisicing elit. Modi animi voluptatum quia esse dolor corrupti veniam dolorum. Voluptatem ut enim voluptate. Provident modi molestiae at atque rerum cupiditate, dicta recusandae ab libero veniam iusto possimus quia sequi amet, tempora dolore nobis excepturi est illo blanditiis nihil laborum enim ducimus consequuntur.\n </div>\n </ifx-alert>`;\n\nexport const Info = InfoTemplate.bind({});\nInfo.argTypes = {\n variant: {\n table: {\n disable: true,\n },\n },\n iconName: {\n table: {\n disable: true,\n },\n },\n showIcon: {\n table: {\n disable: true,\n },\n },\n};\n"]}
@@ -4,40 +4,19 @@ export default {
4
4
  tags: ['autodocs'],
5
5
  args: {
6
6
  label: 'Badge label',
7
- icon: '',
7
+ icon: false,
8
8
  },
9
9
  argTypes: {
10
- label: {
11
- description: 'The label of the badge.',
12
- name: 'Label',
13
- control: { type: 'text' },
14
- table: {
15
- category: 'story controls',
16
- type: {
17
- summary: 'string'
18
- }
19
- }
20
- },
21
- icon: {
10
+ iconName: {
11
+ options: Object.values(icons).map(i => i['name']),
22
12
  control: { type: 'select' },
23
- options: ['none', ...Object.values(icons).map(i => i['name'])],
24
- description: 'Set the icon of the tab. Choose "none" to display no icon.',
25
- table: {
26
- category: 'ifx-tab props',
27
- type: {
28
- summary: 'string'
29
- }
30
- }
31
13
  },
32
14
  },
33
15
  };
34
- const DefaultTemplate = args => {
35
- const icon = args.icon === 'none' ? '' : args.icon;
36
- return `<ifx-badge>
37
- ${args.label}
38
- ${icon ? `<ifx-icon icon="${icon}"></ifx-icon>` : ''}
39
- </ifx-badge>`;
40
- };
16
+ const DefaultTemplate = args => `<ifx-badge>
17
+ ${args.icon ? `<ifx-icon icon="${args.iconName}"></ifx-icon>` : ''}
18
+ ${args.label}
19
+ </ifx-badge>`;
41
20
  export const Default = DefaultTemplate.bind({});
42
21
  Default.argTypes = {};
43
22
  //# sourceMappingURL=badge.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"badge.stories.js","sourceRoot":"","sources":["../../../src/components/badge/badge.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,IAAI,EAAE;QACJ,KAAK,EAAE,aAAa;QACpB,IAAI,EAAE,EAAE;KACT;IAED,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,WAAW,EAAE,yBAAyB;YACtC,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YACzB,KAAK,EAAE;gBACL,QAAQ,EAAE,gBAAgB;gBAC1B,IAAI,EAAE;oBACJ,OAAO,EAAE,QAAQ;iBAClB;aACF;SACF;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,OAAO,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YAC9D,WAAW,EAAE,4DAA4D;YACzE,KAAK,EAAE;gBACL,QAAQ,EAAE,eAAe;gBACzB,IAAI,EAAE;oBACJ,OAAO,EAAE,QAAQ;iBAClB;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;IACL,IAAI,CAAC,KAAK;IACV,IAAI,CAAC,CAAC,CAAC,mBAAmB,IAAI,eAAe,CAAC,CAAC,CAAC,EAAE;aACzC,CAAC;AACd,CAAC,CAAC;AAEF,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/Badge',\n tags: ['autodocs'],\n\n args: {\n label: 'Badge label',\n icon: '',\n },\n\n argTypes: {\n label: {\n description: 'The label of the badge.',\n name: 'Label',\n control: { type: 'text' },\n table: {\n category: 'story controls',\n type: {\n summary: 'string'\n }\n }\n },\n icon: {\n control: { type: 'select' },\n options: ['none', ...Object.values(icons).map(i => i['name'])],\n description: 'Set the icon of the tab. Choose \"none\" to display no icon.',\n table: {\n category: 'ifx-tab props',\n type: {\n summary: 'string'\n }\n }\n },\n },\n};\n\nconst DefaultTemplate = args => {\n const icon = args.icon === 'none' ? '' : args.icon;\n\n return `<ifx-badge>\n ${args.label}\n ${icon ? `<ifx-icon icon=\"${icon}\"></ifx-icon>` : ''}\n</ifx-badge>`;\n};\n\nexport const Default = DefaultTemplate.bind({});\nDefault.argTypes = {};\n"]}
1
+ {"version":3,"file":"badge.stories.js","sourceRoot":"","sources":["../../../src/components/badge/badge.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,IAAI,EAAE;QACJ,KAAK,EAAE,aAAa;QACpB,IAAI,EAAE,KAAK;KACZ;IAED,QAAQ,EAAE;QACR,QAAQ,EAAE;YACR,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;KACF;CACF,CAAC;AAEF,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE,CAC7B;MACI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,mBAAmB,IAAI,CAAC,QAAQ,eAAe,CAAC,CAAC,CAAC,EAAE;MAChE,IAAI,CAAC,KAAK;eACD,CAAC;AAEhB,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/Badge',\n tags: ['autodocs'],\n\n args: {\n label: 'Badge label',\n icon: false,\n },\n\n argTypes: {\n iconName: {\n options: Object.values(icons).map(i => i['name']),\n control: { type: 'select' },\n },\n },\n};\n\nconst DefaultTemplate = args =>\n `<ifx-badge>\n ${args.icon ? `<ifx-icon icon=\"${args.iconName}\"></ifx-icon>` : ''}\n ${args.label}\n </ifx-badge>`;\n\nexport const Default = DefaultTemplate.bind({});\nDefault.argTypes = {};\n"]}
@@ -2,7 +2,7 @@ import { h } from "@stencil/core";
2
2
  export class BreadcrumbItemLabel {
3
3
  constructor() {
4
4
  this.icon = undefined;
5
- this.href = undefined;
5
+ this.url = undefined;
6
6
  this.target = "_self";
7
7
  }
8
8
  componentDidLoad() {
@@ -11,7 +11,7 @@ export class BreadcrumbItemLabel {
11
11
  this.breadcrumbMenuIconWrapper.emit(menuWrapper);
12
12
  }
13
13
  render() {
14
- return (h("a", { key: '856f06f931087b841e5f0350f1eb03e83b70e598', href: this.href, target: this.target, class: "breadcrumb-item-label-container", role: 'link' }, h("ifx-icon", { key: 'b67ee6634bea1f1626e073c1cf4238d12e0e8902', icon: this.icon, "aria-hidden": "true" }), h("span", { key: '270394a637cc6dd822d74d47dcc0bce51e9455c5', class: "label-wrapper" }, h("slot", { key: 'a2c15ce4581d3323d52fe931706ed86f3a777e08' })), h("span", { key: 'f013021b230b0a83a9fc1133d395f91c74cec4c4', class: "menu-icon-wrapper", "aria-hiden": "true" }, h("ifx-icon", { key: 'b22c149f7cb47f43054ba7e7a2ca669a94f2d8bc', icon: "chevron-down-12" }))));
14
+ return (h("a", { key: '16ddbc6dfce781d06c5e852423d1646426c6fb04', href: this.url, target: this.target, class: "breadcrumb-item-label-container", role: 'link' }, h("ifx-icon", { key: '6d62e4f854b7ea735c46a3849a92c09a8d222e54', icon: this.icon, "aria-hidden": "true" }), h("span", { key: '452dc64f08a93f4872f0f033b0b7016073818aab', class: "label-wrapper" }, h("slot", { key: '0a522ff8d13c3133367e62b50480af2dc970961d' })), h("span", { key: '7f5d3a5305ad187e312ae20a59610c9cfe4b13cf', class: "menu-icon-wrapper", "aria-hiden": "true" }, h("ifx-icon", { key: '07dc7f9912e3d87f286273e5758490f39df31d0d', icon: "chevron-down-12" }))));
15
15
  }
16
16
  static get is() { return "ifx-breadcrumb-item-label"; }
17
17
  static get encapsulation() { return "shadow"; }
@@ -46,7 +46,7 @@ export class BreadcrumbItemLabel {
46
46
  "attribute": "icon",
47
47
  "reflect": false
48
48
  },
49
- "href": {
49
+ "url": {
50
50
  "type": "string",
51
51
  "mutable": false,
52
52
  "complexType": {
@@ -62,7 +62,7 @@ export class BreadcrumbItemLabel {
62
62
  },
63
63
  "getter": false,
64
64
  "setter": false,
65
- "attribute": "href",
65
+ "attribute": "url",
66
66
  "reflect": false
67
67
  },
68
68
  "target": {
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb-item-label.js","sourceRoot":"","sources":["../../../src/components/breadcrumb/breadcrumb-item-label.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAOjF,MAAM,OAAO,mBAAmB;;;;sBAGL,OAAO;;IAIhC,gBAAgB;QACd,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,kCAAkC,CAAC,CAAA;QACtF,MAAM,WAAW,GAAG,SAAS,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAA;QACjE,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;IAClD,CAAC;IAED,MAAM;QACJ,OAAO,CACL,0DAAG,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAC,iCAAiC,EAAC,IAAI,EAAC,MAAM;YAC1F,iEAAU,IAAI,EAAE,IAAI,CAAC,IAAI,iBAAc,MAAM,GAAY;YACzD,6DAAM,KAAK,EAAC,eAAe;gBACzB,8DAAQ,CACH;YACR,6DAAM,KAAK,EAAC,mBAAmB,gBAAY,MAAM;gBAChD,iEAAU,IAAI,EAAC,iBAAiB,GAAY,CACtC,CACJ,CACL,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop, Element, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'ifx-breadcrumb-item-label',\n styleUrl: 'breadcrumb-item-label.scss',\n shadow: true,\n})\nexport class BreadcrumbItemLabel {\n @Prop() icon: string;\n @Prop() href: string;\n @Prop() target: string = \"_self\"\n @Element() el;\n @Event() breadcrumbMenuIconWrapper: EventEmitter<CustomEvent>;\n\n componentDidLoad() { \n const container = this.el.shadowRoot.querySelector('.breadcrumb-item-label-container')\n const menuWrapper = container.querySelector('.menu-icon-wrapper')\n this.breadcrumbMenuIconWrapper.emit(menuWrapper)\n }\n\n render() {\n return (\n <a href={this.href} target={this.target} class=\"breadcrumb-item-label-container\" role='link'>\n <ifx-icon icon={this.icon} aria-hidden=\"true\"></ifx-icon>\n <span class=\"label-wrapper\">\n <slot />\n </span>\n <span class=\"menu-icon-wrapper\" aria-hiden=\"true\">\n <ifx-icon icon=\"chevron-down-12\"></ifx-icon>\n </span>\n </a>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"breadcrumb-item-label.js","sourceRoot":"","sources":["../../../src/components/breadcrumb/breadcrumb-item-label.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAOjF,MAAM,OAAO,mBAAmB;;;;sBAGL,OAAO;;IAIhC,gBAAgB;QACd,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,kCAAkC,CAAC,CAAA;QACtF,MAAM,WAAW,GAAG,SAAS,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAA;QACjE,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;IAClD,CAAC;IAED,MAAM;QACJ,OAAO,CACL,0DAAG,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAC,iCAAiC,EAAC,IAAI,EAAC,MAAM;YACzF,iEAAU,IAAI,EAAE,IAAI,CAAC,IAAI,iBAAc,MAAM,GAAY;YACzD,6DAAM,KAAK,EAAC,eAAe;gBACzB,8DAAQ,CACH;YACR,6DAAM,KAAK,EAAC,mBAAmB,gBAAY,MAAM;gBAChD,iEAAU,IAAI,EAAC,iBAAiB,GAAY,CACtC,CACJ,CACL,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop, Element, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'ifx-breadcrumb-item-label',\n styleUrl: 'breadcrumb-item-label.scss',\n shadow: true,\n})\nexport class BreadcrumbItemLabel {\n @Prop() icon: string;\n @Prop() url: string;\n @Prop() target: string = \"_self\"\n @Element() el;\n @Event() breadcrumbMenuIconWrapper: EventEmitter<CustomEvent>;\n\n componentDidLoad() { \n const container = this.el.shadowRoot.querySelector('.breadcrumb-item-label-container')\n const menuWrapper = container.querySelector('.menu-icon-wrapper')\n this.breadcrumbMenuIconWrapper.emit(menuWrapper)\n }\n\n render() {\n return (\n <a href={this.url} target={this.target} class=\"breadcrumb-item-label-container\" role='link'>\n <ifx-icon icon={this.icon} aria-hidden=\"true\"></ifx-icon>\n <span class=\"label-wrapper\">\n <slot />\n </span>\n <span class=\"menu-icon-wrapper\" aria-hiden=\"true\">\n <ifx-icon icon=\"chevron-down-12\"></ifx-icon>\n </span>\n </a>\n );\n }\n}\n"]}
@@ -18,15 +18,15 @@ export class Breadcrumb {
18
18
  const breadcrumbItem = node;
19
19
  const breadcrumbItemLabel = breadcrumbItem.querySelector('ifx-breadcrumb-item-label');
20
20
  const breadcrumbDropdown = breadcrumbItem.querySelector('ifx-dropdown-menu');
21
- if (breadcrumbItemLabel.hasAttribute('href') && breadcrumbDropdown) {
22
- throw new Error('ifx-breadcrumb-item cannot have both a href and a dropdown menu.');
21
+ if (breadcrumbItemLabel.hasAttribute('url') && breadcrumbDropdown) {
22
+ throw new Error('ifx-breadcrumb-item cannot have both a url and a dropdown menu.');
23
23
  }
24
24
  }
25
25
  }
26
26
  }
27
27
  }
28
28
  render() {
29
- return (h("nav", { key: '3d01af951d4a6a396545eb9cf26454cbe2b31ed0', "aria-label": "Page navigation breadcrumb" }, h("ol", { key: '95ae08a0de7099ecd7c3aa963c1bf9952918ecda', class: "breadcrumb" }, h("slot", { key: 'e9fed255fa08b28c8974498d329df69b1e92edf5' }))));
29
+ return (h("nav", { key: '82aec60bebf9a71d7cdcfc2916f91c0e36dee868', "aria-label": "Page navigation breadcrumb" }, h("ol", { key: '70bae75b26b5df4c509f16c0ab8e2b10333de8ac', class: "breadcrumb" }, h("slot", { key: '1cb28e3640f20319349b4f6d3cb1568508d3b1ba' }))));
30
30
  }
31
31
  static get is() { return "ifx-breadcrumb"; }
32
32
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb.js","sourceRoot":"","sources":["../../../src/components/breadcrumb/breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAOtD,MAAM,OAAO,UAAU;IAGrB,gBAAgB;QACd,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;QAC9C,IAAI,CAAC,+BAA+B,CAAC,OAAO,CAAC,CAAC;IAChD,CAAC;IAEO,+BAA+B,CAAC,OAAoB;QAC1D,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;YACnC,OAAO;QACT,CAAC;QAED,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAC3C,IAAG,IAAI,EAAE,CAAC;YACR,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;YAE3C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC9C,MAAM,IAAI,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;gBAC9B,IAAI,IAAI,CAAC,QAAQ,KAAK,qBAAqB,EAAE,CAAC;oBAC5C,MAAM,cAAc,GAAG,IAAoC,CAAC;oBAC5D,MAAM,mBAAmB,GAAG,cAAc,CAAC,aAAa,CAAC,2BAA2B,CAAC,CAAC;oBACtF,MAAM,kBAAkB,GAAG,cAAc,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;oBAC7E,IAAI,mBAAmB,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,kBAAkB,EAAE,CAAC;wBACnE,MAAM,IAAI,KAAK,CAAC,kEAAkE,CAAC,CAAC;oBACtF,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,0EAAgB,4BAA4B;YAC1C,2DAAI,KAAK,EAAC,YAAY;gBACpB,8DAAQ,CACL,CACD,CACP,CAAC;IACJ,CAAC;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Element } from '@stencil/core';\n\n@Component({\n tag: 'ifx-breadcrumb',\n styleUrl: 'breadcrumb.scss',\n shadow: true\n})\nexport class Breadcrumb {\n @Element() el;\n\n componentDidLoad() {\n const element = this.el.shadowRoot.firstChild;\n this.validateBreadcrumbItemStructure(element);\n }\n\n private validateBreadcrumbItemStructure(element: HTMLElement) {\n if (!element) {\n console.error('element not found');\n return;\n }\n \n const slot = element.querySelector('slot');\n if(slot) { \n const assignedNodes = slot.assignedNodes();\n \n for (let i = 0; i < assignedNodes.length; i++) {\n const node = assignedNodes[i];\n if (node.nodeName === 'IFX-BREADCRUMB-ITEM') {\n const breadcrumbItem = node as HTMLIfxBreadcrumbItemElement;\n const breadcrumbItemLabel = breadcrumbItem.querySelector('ifx-breadcrumb-item-label');\n const breadcrumbDropdown = breadcrumbItem.querySelector('ifx-dropdown-menu');\n if (breadcrumbItemLabel.hasAttribute('href') && breadcrumbDropdown) {\n throw new Error('ifx-breadcrumb-item cannot have both a href and a dropdown menu.');\n }\n }\n }\n }\n }\n\n render() {\n return (\n <nav aria-label=\"Page navigation breadcrumb\">\n <ol class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AAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,0EAAgB,4BAA4B;YAC1C,2DAAI,KAAK,EAAC,YAAY;gBACpB,8DAAQ,CACL,CACD,CACP,CAAC;IACJ,CAAC;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Element } from '@stencil/core';\n\n@Component({\n tag: 'ifx-breadcrumb',\n styleUrl: 'breadcrumb.scss',\n shadow: true\n})\nexport class Breadcrumb {\n @Element() el;\n\n componentDidLoad() {\n const element = this.el.shadowRoot.firstChild;\n this.validateBreadcrumbItemStructure(element);\n }\n\n private validateBreadcrumbItemStructure(element: HTMLElement) {\n if (!element) {\n console.error('element not found');\n return;\n }\n \n const slot = element.querySelector('slot');\n if(slot) { \n const assignedNodes = slot.assignedNodes();\n \n for (let i = 0; i < assignedNodes.length; i++) {\n const node = assignedNodes[i];\n if (node.nodeName === 'IFX-BREADCRUMB-ITEM') {\n const breadcrumbItem = node as HTMLIfxBreadcrumbItemElement;\n const breadcrumbItemLabel = breadcrumbItem.querySelector('ifx-breadcrumb-item-label');\n const breadcrumbDropdown = breadcrumbItem.querySelector('ifx-dropdown-menu');\n if (breadcrumbItemLabel.hasAttribute('url') && breadcrumbDropdown) {\n throw new Error('ifx-breadcrumb-item cannot have both a url and a dropdown menu.');\n }\n }\n }\n }\n }\n\n render() {\n return (\n <nav aria-label=\"Page navigation breadcrumb\">\n <ol class=\"breadcrumb\">\n <slot />\n </ol>\n </nav>\n );\n }\n}\n"]}
@@ -1,88 +1,15 @@
1
1
  import { action } from "@storybook/addon-actions";
2
- import { icons } from "@infineon/infineon-icons";
3
2
  export default {
4
3
  title: 'Components/Breadcrumb',
5
4
  tags: ['autodocs'],
6
5
  args: {
7
- icon: '',
8
- iconArialLabel: '',
9
- href: 'http://yahoo.com',
10
- hrefOfDropdownItem: 'http://google.com',
11
- target: '_self',
6
+ icon: false,
12
7
  },
13
8
  argTypes: {
14
- icon: {
15
- control: { type: 'select' },
16
- options: ['none', ...Object.values(icons).map(i => i['name'])],
17
- description: 'Set the icon of the tab. Choose "none" to display no icon.',
18
- table: {
19
- category: 'ifx-breadcrumb-item-label props',
20
- defaultValue: {
21
- summary: ''
22
- },
23
- type: {
24
- summary: 'string'
25
- }
26
- }
27
- },
28
- target: {
29
- control: { type: 'text' },
30
- description: 'Set the target of the link.',
31
- table: {
32
- category: 'ifx-breadcrumb-item-label props',
33
- defaultValue: {
34
- summary: '_self'
35
- },
36
- type: {
37
- summary: 'string'
38
- }
39
- }
40
- },
41
- iconArialLabel: {
42
- control: { type: 'text' },
43
- description: 'Set the aria label of the icon.',
44
- table: {
45
- category: 'ifx-breadcrumb-item-label props',
46
- defaultValue: {
47
- summary: ''
48
- },
49
- type: {
50
- summary: 'string'
51
- }
52
- }
53
- },
54
- href: {
55
- control: { type: 'text' },
56
- description: 'Set the href of the breadcrumb item.',
57
- table: {
58
- category: 'ifx-breadcrumb-item-label props',
59
- defaultValue: {
60
- summary: ''
61
- },
62
- type: {
63
- summary: 'string'
64
- }
65
- }
66
- },
67
- hrefOfDropdownItem: {
68
- name: 'href',
69
- control: { type: 'text' },
70
- description: 'Set the href of the dropdown item.',
71
- table: {
72
- category: 'ifx-dropdown-item props',
73
- defaultValue: {
74
- summary: ''
75
- },
76
- type: {
77
- summary: 'string'
78
- }
79
- }
80
- },
81
9
  ifxDropdownMenuItem: {
82
10
  action: 'ifxDropdownMenuItem',
83
- description: 'Custom event emitted by ifx-dropdown-menu when an item is selected.',
11
+ description: 'Custom event emitted when an item is selected',
84
12
  table: {
85
- category: 'custom events',
86
13
  type: {
87
14
  summary: 'Framework integration',
88
15
  detail: 'React: onIfxDropdownMenuItem={handleChange}\nVue:@ifxDropdownMenuItem="handleChange"\nAngular:(ifxDropdownMenuItem)="handleChange()"\nVanillaJs:.addEventListener("ifxDropdownMenuItem", (event) => {//handle change});',
@@ -92,31 +19,30 @@ export default {
92
19
  },
93
20
  };
94
21
  const DefaultTemplate = args => {
95
- const icon = args.icon === 'none' ? '' : args.icon;
96
22
  const wrapper = document.createElement('div');
97
23
  wrapper.innerHTML = `<ifx-breadcrumb>
98
24
  <ifx-breadcrumb-item>
99
- <ifx-breadcrumb-item-label slot="label" icon="${args.icon ? icon : ''}" href="${args.href}"">Breadcrumb 1</ifx-breadcrumb-item-label>
25
+ <ifx-breadcrumb-item-label slot="label" icon="${args.icon ? 'c-info-16' : ''}">Breadcrumb 1</ifx-breadcrumb-item-label>
100
26
  <ifx-dropdown-menu>
101
- <ifx-dropdown-item href=${args.hrefOfDropdownItem}>Google</ifx-dropdown-item>
102
- <ifx-dropdown-item href="http://bing.com">Bing</ifx-dropdown-item>
103
- <ifx-dropdown-item href="http://yahoo.com">Yahoo</ifx-dropdown-item>
104
- <ifx-dropdown-item href="http://naver.com">Naver</ifx-dropdown-item>
27
+ <ifx-dropdown-item url="http://google.com">Google</ifx-dropdown-item>
28
+ <ifx-dropdown-item url="http://bing.com">Bing</ifx-dropdown-item>
29
+ <ifx-dropdown-item url="http://yahoo.com">Yahoo</ifx-dropdown-item>
30
+ <ifx-dropdown-item url="http://naver.com">Naver</ifx-dropdown-item>
105
31
  </ifx-dropdown-menu>
106
32
  </ifx-breadcrumb-item>
107
33
 
108
34
  <ifx-breadcrumb-item>
109
- <ifx-breadcrumb-item-label slot="label" icon="${args.icon ? icon : ''}">Breadcrumb 2</ifx-breadcrumb-item-label>
35
+ <ifx-breadcrumb-item-label slot="label" icon="${args.icon ? 'c-info-16' : ''}">Breadcrumb 2</ifx-breadcrumb-item-label>
110
36
  <ifx-dropdown-menu>
111
- <ifx-dropdown-item href=${args.href}>Google</ifx-dropdown-item>
112
- <ifx-dropdown-item href="http://bing.com">Bing</ifx-dropdown-item>
113
- <ifx-dropdown-item href="http://yahoo.com">Yahoo</ifx-dropdown-item>
114
- <ifx-dropdown-item href="http://naver.com">Naver</ifx-dropdown-item>
37
+ <ifx-dropdown-item url="http://google.com">Google</ifx-dropdown-item>
38
+ <ifx-dropdown-item url="http://bing.com">Bing</ifx-dropdown-item>
39
+ <ifx-dropdown-item url="http://yahoo.com">Yahoo</ifx-dropdown-item>
40
+ <ifx-dropdown-item url="http://naver.com">Naver</ifx-dropdown-item>
115
41
  </ifx-dropdown-menu>
116
42
  </ifx-breadcrumb-item>
117
43
 
118
44
  <ifx-breadcrumb-item>
119
- <ifx-breadcrumb-item-label slot="label" icon="${args.icon ? icon : ''}" href="http://google.com">Breadcrumb 3</ifx-breadcrumb-item-label>
45
+ <ifx-breadcrumb-item-label slot="label" icon="${args.icon ? 'c-info-16' : ''}" url="http://google.com">Breadcrumb 3</ifx-breadcrumb-item-label>
120
46
  </ifx-breadcrumb-item>
121
47
  </ifx-breadcrumb>`;
122
48
  const breadcrumb = wrapper.querySelector('ifx-breadcrumb');
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb.stories.js","sourceRoot":"","sources":["../../../src/components/breadcrumb/breadcrumb.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,uBAAuB;IAC9B,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,IAAI,EAAE;QACJ,IAAI,EAAE,EAAE;QACR,cAAc,EAAE,EAAE;QAClB,IAAI,EAAE,kBAAkB;QACxB,kBAAkB,EAAE,mBAAmB;QACvC,MAAM,EAAE,OAAO;KAChB;IACD,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,OAAO,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YAC9D,WAAW,EAAE,4DAA4D;YACzE,KAAK,EAAE;gBACL,QAAQ,EAAE,iCAAiC;gB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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/Breadcrumb',\n tags: ['autodocs'],\n\n args: {\n icon: '',\n iconArialLabel: '',\n href: 'http://yahoo.com',\n hrefOfDropdownItem: 'http://google.com',\n target: '_self',\n },\n argTypes: {\n icon: {\n control: { type: 'select' },\n options: ['none', ...Object.values(icons).map(i => i['name'])],\n description: 'Set the icon of the tab. Choose \"none\" to display no icon.',\n table: {\n category: 'ifx-breadcrumb-item-label props',\n defaultValue: {\n summary: ''\n },\n type: {\n summary: 'string'\n }\n }\n },\n target: {\n control: { type: 'text' },\n description: 'Set the target of the link.',\n table: {\n category: 'ifx-breadcrumb-item-label props',\n defaultValue: {\n summary: '_self'\n },\n type: {\n summary: 'string'\n }\n }\n },\n iconArialLabel: {\n control: { type: 'text' },\n description: 'Set the aria label of the icon.',\n table: {\n category: 'ifx-breadcrumb-item-label props',\n defaultValue: {\n summary: ''\n },\n type: {\n summary: 'string'\n }\n }\n },\n href: {\n control: { type: 'text' },\n description: 'Set the href of the breadcrumb item.',\n table: {\n category: 'ifx-breadcrumb-item-label props',\n defaultValue: {\n summary: ''\n },\n type: {\n summary: 'string'\n }\n }\n },\n hrefOfDropdownItem: {\n name: 'href',\n control: { type: 'text' },\n description: 'Set the href of the dropdown item.',\n table: {\n category: 'ifx-dropdown-item props',\n defaultValue: {\n summary: ''\n },\n type: {\n summary: 'string'\n }\n }\n },\n ifxDropdownMenuItem: {\n action: 'ifxDropdownMenuItem',\n description: 'Custom event emitted by ifx-dropdown-menu when an item is selected.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxDropdownMenuItem={handleChange}\\nVue:@ifxDropdownMenuItem=\"handleChange\"\\nAngular:(ifxDropdownMenuItem)=\"handleChange()\"\\nVanillaJs:.addEventListener(\"ifxDropdownMenuItem\", (event) => {//handle change});',\n },\n },\n },\n },\n};\n\nconst DefaultTemplate = args => {\n const icon = args.icon === 'none' ? '' : args.icon;\n const wrapper = document.createElement('div');\n wrapper.innerHTML = `<ifx-breadcrumb>\n <ifx-breadcrumb-item>\n <ifx-breadcrumb-item-label slot=\"label\" icon=\"${args.icon ? icon : ''}\" href=\"${args.href}\"\">Breadcrumb 1</ifx-breadcrumb-item-label>\n <ifx-dropdown-menu>\n <ifx-dropdown-item href=${args.hrefOfDropdownItem}>Google</ifx-dropdown-item>\n <ifx-dropdown-item href=\"http://bing.com\">Bing</ifx-dropdown-item>\n <ifx-dropdown-item href=\"http://yahoo.com\">Yahoo</ifx-dropdown-item>\n <ifx-dropdown-item href=\"http://naver.com\">Naver</ifx-dropdown-item>\n </ifx-dropdown-menu>\n </ifx-breadcrumb-item>\n\n <ifx-breadcrumb-item>\n <ifx-breadcrumb-item-label slot=\"label\" icon=\"${args.icon ? icon : ''}\">Breadcrumb 2</ifx-breadcrumb-item-label>\n <ifx-dropdown-menu>\n <ifx-dropdown-item href=${args.href}>Google</ifx-dropdown-item>\n <ifx-dropdown-item href=\"http://bing.com\">Bing</ifx-dropdown-item>\n <ifx-dropdown-item href=\"http://yahoo.com\">Yahoo</ifx-dropdown-item>\n <ifx-dropdown-item href=\"http://naver.com\">Naver</ifx-dropdown-item>\n </ifx-dropdown-menu>\n </ifx-breadcrumb-item>\n\n <ifx-breadcrumb-item>\n <ifx-breadcrumb-item-label slot=\"label\" icon=\"${args.icon ? icon : ''}\" href=\"http://google.com\">Breadcrumb 3</ifx-breadcrumb-item-label>\n </ifx-breadcrumb-item>\n</ifx-breadcrumb>`;\n\n const breadcrumb = wrapper.querySelector('ifx-breadcrumb') as HTMLElement;\n // Loop through each breadcrumb item and attach event listeners to its dropdown menu\n const breadcrumbItems = breadcrumb.querySelectorAll('ifx-breadcrumb-item');\n breadcrumbItems.forEach(breadcrumbItem => {\n const dropdownMenu = breadcrumbItem.querySelector('ifx-dropdown-menu');\n dropdownMenu?.addEventListener('ifxDropdownMenuItem', action('ifxDropdownMenuItem'));\n });\n\n return wrapper;\n};\n\nexport const Default = DefaultTemplate.bind({});\n"]}
1
+ {"version":3,"file":"breadcrumb.stories.js","sourceRoot":"","sources":["../../../src/components/breadcrumb/breadcrumb.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eAAe;IACb,KAAK,EAAE,uBAAuB;IAC9B,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,IAAI,EAAE;QACJ,IAAI,EAAE,KAAK;KACZ;IACD,QAAQ,EAAE;QACR,mBAAmB,EAAE;YACnB,MAAM,EAAE,qBAAqB;YAC7B,WAAW,EAAE,+CAA+C;YAC5D,KAAK,EAAE;gBACL,IAAI,EAAE;oBACJ,OAAO,EAAE,uBAAuB;oBAChC,MAAM,EACJ,yNAAyN;iBAC5N;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE;IAC7B,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC9C,OAAO,CAAC,SAAS,GAAG;;oDAE8B,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE;;;;;;;;;;oDAU5B,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE;;;;;;;;;;oDAU5B,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE;;kBAE9D,CAAC;IAEjB,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAgB,CAAC;IAC1E,oFAAoF;IACpF,MAAM,eAAe,GAAG,UAAU,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;IAC3E,eAAe,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE;QACvC,MAAM,YAAY,GAAG,cAAc,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;QACvE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,gBAAgB,CAAC,qBAAqB,EAAE,MAAM,CAAC,qBAAqB,CAAC,CAAC,CAAC;IACvF,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { action } from '@storybook/addon-actions';\n\nexport default {\n title: 'Components/Breadcrumb',\n tags: ['autodocs'],\n\n args: {\n icon: false,\n },\n argTypes: {\n ifxDropdownMenuItem: {\n action: 'ifxDropdownMenuItem',\n description: 'Custom event emitted when an item is selected',\n table: {\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxDropdownMenuItem={handleChange}\\nVue:@ifxDropdownMenuItem=\"handleChange\"\\nAngular:(ifxDropdownMenuItem)=\"handleChange()\"\\nVanillaJs:.addEventListener(\"ifxDropdownMenuItem\", (event) => {//handle change});',\n },\n },\n },\n },\n};\n\nconst DefaultTemplate = args => {\n const wrapper = document.createElement('div');\n wrapper.innerHTML = `<ifx-breadcrumb>\n <ifx-breadcrumb-item>\n <ifx-breadcrumb-item-label slot=\"label\" icon=\"${args.icon ? 'c-info-16' : ''}\">Breadcrumb 1</ifx-breadcrumb-item-label>\n <ifx-dropdown-menu>\n <ifx-dropdown-item url=\"http://google.com\">Google</ifx-dropdown-item>\n <ifx-dropdown-item url=\"http://bing.com\">Bing</ifx-dropdown-item>\n <ifx-dropdown-item url=\"http://yahoo.com\">Yahoo</ifx-dropdown-item>\n <ifx-dropdown-item url=\"http://naver.com\">Naver</ifx-dropdown-item>\n </ifx-dropdown-menu>\n </ifx-breadcrumb-item>\n\n <ifx-breadcrumb-item>\n <ifx-breadcrumb-item-label slot=\"label\" icon=\"${args.icon ? 'c-info-16' : ''}\">Breadcrumb 2</ifx-breadcrumb-item-label>\n <ifx-dropdown-menu>\n <ifx-dropdown-item url=\"http://google.com\">Google</ifx-dropdown-item>\n <ifx-dropdown-item url=\"http://bing.com\">Bing</ifx-dropdown-item>\n <ifx-dropdown-item url=\"http://yahoo.com\">Yahoo</ifx-dropdown-item>\n <ifx-dropdown-item url=\"http://naver.com\">Naver</ifx-dropdown-item>\n </ifx-dropdown-menu>\n </ifx-breadcrumb-item>\n\n <ifx-breadcrumb-item>\n <ifx-breadcrumb-item-label slot=\"label\" icon=\"${args.icon ? 'c-info-16' : ''}\" url=\"http://google.com\">Breadcrumb 3</ifx-breadcrumb-item-label>\n </ifx-breadcrumb-item>\n</ifx-breadcrumb>`;\n\n const breadcrumb = wrapper.querySelector('ifx-breadcrumb') as HTMLElement;\n // Loop through each breadcrumb item and attach event listeners to its dropdown menu\n const breadcrumbItems = breadcrumb.querySelectorAll('ifx-breadcrumb-item');\n breadcrumbItems.forEach(breadcrumbItem => {\n const dropdownMenu = breadcrumbItem.querySelector('ifx-dropdown-menu');\n dropdownMenu?.addEventListener('ifxDropdownMenuItem', action('ifxDropdownMenuItem'));\n });\n\n return wrapper;\n};\n\nexport const Default = DefaultTemplate.bind({});\n"]}
@@ -10,135 +10,43 @@ export default {
10
10
  size: 'm',
11
11
  fullWidth: false,
12
12
  disabled: false,
13
- icon: '',
14
13
  iconPosition: 'left',
15
14
  href: false,
16
15
  url: '',
17
16
  target: '_blank',
18
17
  },
19
18
  argTypes: {
20
- label: {
21
- name: 'Label of Button',
22
- description: 'Sets the text displayed on the *<ifx-button>*.',
23
- table: {
24
- category: 'story controls',
25
- }
26
- },
27
19
  icon: {
28
- description: 'The icon to be displayed.',
29
- control: 'select',
30
20
  options: Object.values(icons).map(i => i['name']),
31
- table: {
32
- category: 'ifx-button props',
33
- type: {
34
- summary: 'string'
35
- }
36
- }
21
+ control: { type: 'select' },
37
22
  },
38
23
  variant: {
39
- description: 'Sets the style variant of the button.',
40
- control: 'radio',
41
24
  options: ['primary', 'secondary', 'tertiary'],
42
- table: {
43
- category: 'ifx-button props',
44
- defaultValue: {
45
- summary: 'primary'
46
- }
47
- }
25
+ control: { type: 'radio' },
48
26
  },
49
27
  theme: {
50
- description: 'Specifies the theme style of the button.',
51
- control: 'radio',
52
28
  options: ['default', 'danger', 'inverse'],
53
- table: {
54
- category: 'ifx-button props',
55
- defaultValue: {
56
- summary: 'default'
57
- }
58
- }
29
+ control: { type: 'radio' },
59
30
  },
60
31
  type: {
61
- description: 'Sets the type attribute of the button.',
62
- control: 'radio',
63
32
  options: ['button', 'submit', 'reset'],
64
- table: {
65
- category: 'ifx-button props',
66
- defaultValue: {
67
- summary: 'button'
68
- }
69
- }
33
+ control: { type: 'radio' },
70
34
  },
71
35
  size: {
72
- description: 'Sets the size of the button. Options: xs (32px) s (36px), m (40px), l (48px)',
73
- control: 'radio',
36
+ description: 'Size options: xs (32px) s (36px), m (40px), l (48px) - default: m',
74
37
  options: ['xs', 's', 'm', 'l'],
75
- table: {
76
- category: 'ifx-button props',
77
- defaultValue: {
78
- summary: 'm'
79
- }
80
- }
38
+ control: { type: 'radio' },
81
39
  },
82
40
  fullWidth: {
83
- description: 'When set to **true**, expands the button to take the full width of its container.',
84
- control: 'boolean',
85
- table: {
86
- category: 'ifx-button props',
87
- defaultValue: {
88
- summary: 'false'
89
- }
90
- }
91
- },
92
- disabled: {
93
- description: 'Disables the button when set to true.',
94
- control: 'boolean',
95
- table: {
96
- category: 'ifx-button props',
97
- defaultValue: {
98
- summary: 'false'
99
- }
100
- }
41
+ control: { type: 'boolean' },
101
42
  },
102
43
  iconPosition: {
103
- description: 'Determines the position of an icon within the button if an icon is used.',
104
- control: 'radio',
105
44
  options: ['left', 'right'],
106
- table: {
107
- category: 'ifx-button props',
108
- defaultValue: {
109
- summary: 'left'
110
- }
111
- }
112
- },
113
- href: {
114
- description: 'When set to **true**, treats the button as a link by setting a URL.',
115
- control: 'boolean',
116
- table: {
117
- category: 'ifx-button props',
118
- defaultValue: {
119
- summary: 'false'
120
- }
121
- }
122
- },
123
- url: {
124
- description: 'Specifies the destination URL for the button when it acts as a link.',
125
- table: {
126
- category: 'ifx-button props',
127
- type: {
128
- summary: 'string'
129
- }
130
- }
45
+ control: { type: 'radio' },
131
46
  },
132
47
  target: {
133
- description: 'Determines where to open the linked document when the button is clicked.',
134
- control: 'radio',
135
48
  options: ['_blank', '_self', '_parent'],
136
- table: {
137
- category: 'ifx-button props',
138
- defaultValue: {
139
- summary: '_blank'
140
- }
141
- }
49
+ control: { type: 'radio' },
142
50
  },
143
51
  },
144
52
  };
@@ -1 +1 @@
1
- {"version":3,"file":"button.stories.js","sourceRoot":"","sources":["../../../src/components/button/button.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD,eAAe;IACb,KAAK,EAAE,mBAAmB;IAC1B,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,IAAI,EAAE;QACJ,KAAK,EAAE,QAAQ;QACf,OAAO,EAAE,SAAS;QAClB,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,GAAG;QACT,SAAS,EAAE,KAAK;QAChB,QAAQ,EAAE,KAAK;QACf,IAAI,EAAE,EAAE;QACR,YAAY,EAAE,MAAM;QACpB,IAAI,EAAE,KAAK;QACX,GAAG,EAAE,EAAE;QACP,MAAM,EAAE,QAAQ;KACjB;IAED,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,IAAI,EAAE,iBAAiB;YACvB,WAAW,EAAE,gDAAgD;YAC7D,KAAK,EAAE;gBACL,QAAQ,EAAE,gBAAgB;aAC3B;SACF;QACD,IAAI,EAAE;YACJ,WAAW,EAAE,2BAA2B;YACxC,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;YACjD,KAAK,EAAE;gBACL,QAAQ,EAAE,kBAAkB;gBAC5B,IAAI,E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,IAAI,CAAC,SAAS;IAC5N,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,CAAC,CAAC,mBAAmB,IAAI,CAAC,IAAI,eAAe,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,mBAAmB,IAAI,CAAC,IAAI,eAAe,CAAC,CAAC,CAAC,EAAE;cAC3N,CAAC;AAEf,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { icons } from '@infineon/infineon-icons';\n\nexport default {\n title: 'Components/Button',\n tags: ['autodocs'],\n\n args: {\n label: 'Button',\n variant: 'primary',\n theme: 'default',\n type: 'button',\n size: 'm',\n fullWidth: false,\n disabled: false,\n icon: '',\n iconPosition: 'left',\n href: false,\n url: '',\n target: '_blank',\n },\n\n argTypes: {\n label: {\n name: 'Label of Button',\n description: 'Sets the text displayed on the *<ifx-button>*.',\n table: {\n category: 'story controls',\n }\n },\n icon: {\n description: 'The icon to be displayed.',\n control: 'select',\n options: Object.values(icons).map(i => i['name']),\n table: {\n category: 'ifx-button props',\n type: {\n summary: 'string'\n }\n }\n },\n variant: {\n description: 'Sets the style variant of the button.',\n control: 'radio',\n options: ['primary', 'secondary', 'tertiary'],\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: 'primary'\n }\n }\n },\n theme: {\n description: 'Specifies the theme style of the button.',\n control: 'radio',\n options: ['default', 'danger', 'inverse'],\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: 'default'\n }\n }\n },\n type: {\n description: 'Sets the type attribute of the button.',\n control: 'radio',\n options: ['button', 'submit', 'reset'],\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: 'button'\n }\n }\n },\n size: {\n description: 'Sets the size of the button. Options: xs (32px) s (36px), m (40px), l (48px)',\n control: 'radio',\n options: ['xs', 's', 'm', 'l'],\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: 'm'\n }\n }\n },\n fullWidth: {\n description: 'When set to **true**, expands the button to take the full width of its container.',\n control: 'boolean',\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: 'false'\n }\n }\n },\n disabled: {\n description: 'Disables the button when set to true.',\n control: 'boolean',\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: 'false'\n }\n }\n },\n iconPosition: {\n description: 'Determines the position of an icon within the button if an icon is used.',\n control: 'radio',\n options: ['left', 'right'],\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: 'left'\n }\n }\n },\n href: {\n description: 'When set to **true**, treats the button as a link by setting a URL.',\n control: 'boolean',\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: 'false'\n }\n }\n },\n url: {\n description: 'Specifies the destination URL for the button when it acts as a link.',\n table: {\n category: 'ifx-button props',\n type: {\n summary: 'string'\n }\n }\n },\n target: {\n description: 'Determines where to open the linked document when the button is clicked.',\n control: 'radio',\n options: ['_blank', '_self', '_parent'],\n table: {\n category: 'ifx-button props',\n defaultValue: {\n summary: '_blank'\n }\n }\n },\n },\n};\n\nconst DefaultTemplate = args =>\n `<ifx-button type=\"${args.type}\" disabled=\"${args.disabled}\" variant=\"${args.variant}\" size=\"${args.size}\" target=\"${args.target}\" theme=\"${args.theme}\" ${args.href ? `href=\"${args.url}\"` : ''} full-width=\"${args.fullWidth}\">\n ${args.icon && args.iconPosition.toUpperCase() === 'LEFT' ? `<ifx-icon icon=\"${args.icon}\"></ifx-icon>` : ''}${args.label}${args.icon && args.iconPosition.toUpperCase() === 'RIGHT' ? `<ifx-icon icon=\"${args.icon}\"></ifx-icon>` : ''} \n</ifx-button>`;\n\nexport const Default = DefaultTemplate.bind({});\n"]}
1
+ {"version":3,"file":"button.stories.js","sourceRoot":"","sources":["../../../src/components/button/button.stories.ts"],"names":[],"m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O,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;SAC7B;QACD,YAAY,EAAE;YACZ,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;YAC1B,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SAC3B;QACD,MAAM,EAAE;YACN,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,CAC7B,qBAAqB,IAAI,CAAC,IAAI,eAAe,IAAI,CAAC,QAAQ,cAAc,IAAI,CAAC,OAAO,WAAW,IAAI,CAAC,IAAI,aAAa,IAAI,CAAC,MAAM,YAAY,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,gBAAgB,IAAI,CAAC,SAAS;IAC5N,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,CAAC,CAAC,mBAAmB,IAAI,CAAC,IAAI,eAAe,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,mBAAmB,IAAI,CAAC,IAAI,eAAe,CAAC,CAAC,CAAC,EAAE;cAC3N,CAAC;AAEf,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { icons } from '@infineon/infineon-icons';\n\nexport default {\n title: 'Components/Button',\n tags: ['autodocs'],\n\n args: {\n label: 'Button',\n variant: 'primary',\n theme: 'default',\n type: 'button',\n size: 'm',\n fullWidth: false,\n disabled: false,\n iconPosition: 'left',\n href: false,\n url: '',\n target: '_blank',\n },\n\n argTypes: {\n icon: {\n options: Object.values(icons).map(i => i['name']),\n control: { type: 'select' },\n },\n variant: {\n options: ['primary', 'secondary', 'tertiary'],\n control: { type: 'radio' },\n },\n theme: {\n options: ['default', 'danger', 'inverse'],\n control: { type: 'radio' },\n },\n type: {\n options: ['button', 'submit', 'reset'],\n control: { type: 'radio' },\n },\n size: {\n description: 'Size options: xs (32px) s (36px), m (40px), l (48px) - default: m',\n options: ['xs', 's', 'm', 'l'],\n control: { type: 'radio' },\n },\n fullWidth: {\n control: { type: 'boolean' },\n },\n iconPosition: {\n options: ['left', 'right'],\n control: { type: 'radio' },\n },\n target: {\n options: ['_blank', '_self', '_parent'],\n control: { type: 'radio' },\n },\n },\n};\n\nconst DefaultTemplate = args =>\n `<ifx-button type=\"${args.type}\" disabled=\"${args.disabled}\" variant=\"${args.variant}\" size=\"${args.size}\" target=\"${args.target}\" theme=\"${args.theme}\" ${args.href ? `href=\"${args.url}\"` : ''} full-width=\"${args.fullWidth}\">\n ${args.icon && args.iconPosition.toUpperCase() === 'LEFT' ? `<ifx-icon icon=\"${args.icon}\"></ifx-icon>` : ''}${args.label}${args.icon && args.iconPosition.toUpperCase() === 'RIGHT' ? `<ifx-icon icon=\"${args.icon}\"></ifx-icon>` : ''} \n</ifx-button>`;\n\nexport const Default = DefaultTemplate.bind({});\n"]}