@infineon/infineon-design-system-stencil 30.9.2--canary.1669.a6556475a763cdebf0a29aa12ca37f78801b6799.1 → 30.9.2--canary.1640.64bdc8df6d06e0c7326a4bfb6bcc6798b101e99a.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 +19 -21
  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 +9 -10
  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 +81 -7
  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 +45 -12
  30. package/dist/collection/components/alert/alert.stories.js.map +1 -1
  31. package/dist/collection/components/badge/badge.stories.js +28 -7
  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 +87 -13
  38. package/dist/collection/components/breadcrumb/breadcrumb.stories.js.map +1 -1
  39. package/dist/collection/components/button/button.stories.js +101 -9
  40. package/dist/collection/components/button/button.stories.js.map +1 -1
  41. package/dist/collection/components/card/card.stories.js +84 -3
  42. package/dist/collection/components/card/card.stories.js.map +1 -1
  43. package/dist/collection/components/checkbox/checkbox.stories.js +72 -14
  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 +18 -26
  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 +65 -3
  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 +95 -7
  55. package/dist/collection/components/date-picker/date-picker.stories.js.map +1 -1
  56. package/dist/collection/components/dropdown/dropdown.stories.js +222 -64
  57. package/dist/collection/components/dropdown/dropdown.stories.js.map +1 -1
  58. package/dist/collection/components/footer/footer.stories.js +7 -1
  59. package/dist/collection/components/footer/footer.stories.js.map +1 -1
  60. package/dist/collection/components/icon/infineonIconStencil.stories.js +7 -2
  61. package/dist/collection/components/icon/infineonIconStencil.stories.js.map +1 -1
  62. package/dist/collection/components/icon-button/icon-button.stories.js +61 -5
  63. package/dist/collection/components/icon-button/icon-button.stories.js.map +1 -1
  64. package/dist/collection/components/link/link.stories.js +53 -4
  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 +96 -19
  69. package/dist/collection/components/modal/modal.stories.js.map +1 -1
  70. package/dist/collection/components/navigation/navbar/navbar.stories.js +176 -12
  71. package/dist/collection/components/navigation/navbar/navbar.stories.js.map +1 -1
  72. package/dist/collection/components/navigation/sidebar/sidebar-item.js +11 -32
  73. package/dist/collection/components/navigation/sidebar/sidebar-item.js.map +1 -1
  74. package/dist/collection/components/navigation/sidebar/sidebar.stories.js +183 -19
  75. package/dist/collection/components/navigation/sidebar/sidebar.stories.js.map +1 -1
  76. package/dist/collection/components/notification/notification.stories.js +55 -8
  77. package/dist/collection/components/notification/notification.stories.js.map +1 -1
  78. package/dist/collection/components/number-indicator/number-indicator.stories.js +19 -0
  79. package/dist/collection/components/number-indicator/number-indicator.stories.js.map +1 -1
  80. package/dist/collection/components/pagination/pagination.js +1 -31
  81. package/dist/collection/components/pagination/pagination.js.map +1 -1
  82. package/dist/collection/components/pagination/pagination.stories.js +19 -14
  83. package/dist/collection/components/pagination/pagination.stories.js.map +1 -1
  84. package/dist/collection/components/progress-bar/progress-bar.stories.js +31 -8
  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 +66 -13
  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 +58 -9
  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 +54 -8
  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 +1 -10
  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 +131 -5
  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 +83 -26
  101. package/dist/collection/components/select/single-select/select.stories.js.map +1 -1
  102. package/dist/collection/components/slider/slider.stories.js +97 -13
  103. package/dist/collection/components/slider/slider.stories.js.map +1 -1
  104. package/dist/collection/components/spinner/spinner.stories.js +34 -2
  105. package/dist/collection/components/spinner/spinner.stories.js.map +1 -1
  106. package/dist/collection/components/status/status.stories.js +25 -1
  107. package/dist/collection/components/status/status.stories.js.map +1 -1
  108. package/dist/collection/components/stepper/stepper.stories.js +54 -25
  109. package/dist/collection/components/stepper/stepper.stories.js.map +1 -1
  110. package/dist/collection/components/switch/switch.stories.js +51 -4
  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 +124 -39
  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 +30 -3
  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 +104 -29
  121. package/dist/collection/components/tabs/tabs.stories.js.map +1 -1
  122. package/dist/collection/components/tag/tag.stories.js +18 -0
  123. package/dist/collection/components/tag/tag.stories.js.map +1 -1
  124. package/dist/collection/components/text-field/text-field.stories.js +116 -13
  125. package/dist/collection/components/text-field/text-field.stories.js.map +1 -1
  126. package/dist/collection/components/textarea/textarea.stories.js +1 -3
  127. package/dist/collection/components/textarea/textarea.stories.js.map +1 -1
  128. package/dist/collection/components/tooltip/tooltip.stories.js +48 -4
  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 +11 -13
  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-b2439194.js → p-053d42ef.js} +8 -8
  153. package/dist/components/{p-b2439194.js.map → p-053d42ef.js.map} +1 -1
  154. package/dist/components/{p-094bb435.js → p-3baaa460.js} +3 -3
  155. package/dist/components/{p-094bb435.js.map → p-3baaa460.js.map} +1 -1
  156. package/dist/components/{p-184f1004.js → p-793d89e7.js} +15 -15
  157. package/dist/components/p-793d89e7.js.map +1 -0
  158. package/dist/components/{p-23cdd5a7.js → p-7b5e297f.js} +5 -5
  159. package/dist/components/p-7b5e297f.js.map +1 -0
  160. package/dist/components/{p-2f1e7628.js → p-b85fba0e.js} +2 -4
  161. package/dist/components/p-b85fba0e.js.map +1 -0
  162. package/dist/components/{p-04b73e62.js → p-cf8fd0f4.js} +6 -6
  163. package/dist/components/p-cf8fd0f4.js.map +1 -0
  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 +19 -21
  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 +9 -10
  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-00d6e46e.entry.js → p-26810237.entry.js} +2 -2
  189. package/dist/infineon-design-system-stencil/p-26810237.entry.js.map +1 -0
  190. package/dist/infineon-design-system-stencil/p-26df4dfe.entry.js +2 -0
  191. package/dist/infineon-design-system-stencil/{p-28fb795b.entry.js.map → p-26df4dfe.entry.js.map} +1 -1
  192. package/dist/infineon-design-system-stencil/p-355cea09.entry.js +2 -0
  193. package/dist/infineon-design-system-stencil/p-355cea09.entry.js.map +1 -0
  194. package/dist/infineon-design-system-stencil/p-60dcd508.entry.js +2 -0
  195. package/dist/infineon-design-system-stencil/p-60dcd508.entry.js.map +1 -0
  196. package/dist/infineon-design-system-stencil/p-68752789.entry.js +2 -0
  197. package/dist/infineon-design-system-stencil/p-68752789.entry.js.map +1 -0
  198. package/dist/infineon-design-system-stencil/p-6a274db4.entry.js +2 -0
  199. package/dist/infineon-design-system-stencil/p-6a274db4.entry.js.map +1 -0
  200. package/dist/infineon-design-system-stencil/p-71fda335.entry.js +2 -0
  201. package/dist/infineon-design-system-stencil/p-71fda335.entry.js.map +1 -0
  202. package/dist/infineon-design-system-stencil/p-7741e81d.entry.js +2 -0
  203. package/dist/infineon-design-system-stencil/p-7741e81d.entry.js.map +1 -0
  204. package/dist/infineon-design-system-stencil/{p-bc8a4226.entry.js → p-d93eb561.entry.js} +2 -2
  205. package/dist/infineon-design-system-stencil/p-d93eb561.entry.js.map +1 -0
  206. package/dist/infineon-design-system-stencil/p-df6cadc1.entry.js +2 -0
  207. package/dist/infineon-design-system-stencil/p-df6cadc1.entry.js.map +1 -0
  208. package/dist/types/components/accordion/accordion.stories.d.ts +67 -1
  209. package/dist/types/components/accordion/accordionItem.d.ts +3 -3
  210. package/dist/types/components/alert/alert.stories.d.ts +38 -11
  211. package/dist/types/components/badge/badge.stories.d.ts +23 -3
  212. package/dist/types/components/breadcrumb/breadcrumb-item-label.d.ts +1 -1
  213. package/dist/types/components/breadcrumb/breadcrumb.stories.d.ts +83 -1
  214. package/dist/types/components/button/button.stories.d.ts +92 -16
  215. package/dist/types/components/card/card.stories.d.ts +95 -1
  216. package/dist/types/components/checkbox/checkbox.stories.d.ts +65 -10
  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 +11 -4
  220. package/dist/types/components/chip/interfaces.d.ts +1 -1
  221. package/dist/types/components/content-switcher/content-switcher.stories.d.ts +66 -0
  222. package/dist/types/components/date-picker/date-picker.stories.d.ts +88 -2
  223. package/dist/types/components/dropdown/dropdown.stories.d.ts +90 -33
  224. package/dist/types/components/footer/footer.stories.d.ts +4 -0
  225. package/dist/types/components/icon/infineonIconStencil.stories.d.ts +5 -0
  226. package/dist/types/components/icon-button/icon-button.stories.d.ts +56 -8
  227. package/dist/types/components/link/link.stories.d.ts +49 -6
  228. package/dist/types/components/modal/modal.d.ts +2 -2
  229. package/dist/types/components/modal/modal.stories.d.ts +77 -3
  230. package/dist/types/components/navigation/navbar/navbar.stories.d.ts +222 -6
  231. package/dist/types/components/navigation/sidebar/sidebar-item.d.ts +2 -3
  232. package/dist/types/components/navigation/sidebar/sidebar.stories.d.ts +158 -7
  233. package/dist/types/components/notification/notification.stories.d.ts +46 -2
  234. package/dist/types/components/number-indicator/number-indicator.stories.d.ts +19 -0
  235. package/dist/types/components/pagination/pagination.d.ts +0 -2
  236. package/dist/types/components/pagination/pagination.stories.d.ts +12 -7
  237. package/dist/types/components/progress-bar/progress-bar.stories.d.ts +25 -4
  238. package/dist/types/components/radio-button/radio-button.stories.d.ts +59 -8
  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 +60 -3
  241. package/dist/types/components/search-field/search-field.stories.d.ts +45 -6
  242. package/dist/types/components/segmented-control/segmented-control.stories.d.ts +0 -3
  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 +125 -0
  245. package/dist/types/components/select/single-select/select.stories.d.ts +67 -24
  246. package/dist/types/components/slider/slider.stories.d.ts +110 -0
  247. package/dist/types/components/spinner/spinner.stories.d.ts +32 -0
  248. package/dist/types/components/status/status.stories.d.ts +24 -2
  249. package/dist/types/components/stepper/stepper.stories.d.ts +30 -6
  250. package/dist/types/components/switch/switch.stories.d.ts +47 -1
  251. package/dist/types/components/table-advanced-version/table.stories.d.ts +50 -11
  252. package/dist/types/components/table-basic-version/table.stories.d.ts +21 -1
  253. package/dist/types/components/tabs/tabs.d.ts +1 -1
  254. package/dist/types/components/tabs/tabs.stories.d.ts +88 -9
  255. package/dist/types/components/tag/tag.stories.d.ts +20 -0
  256. package/dist/types/components/text-field/text-field.stories.d.ts +106 -10
  257. package/dist/types/components/tooltip/tooltip.stories.d.ts +41 -6
  258. package/dist/types/components.d.ts +20 -26
  259. package/package.json +1 -1
  260. package/dist/components/p-04b73e62.js.map +0 -1
  261. package/dist/components/p-184f1004.js.map +0 -1
  262. package/dist/components/p-23cdd5a7.js.map +0 -1
  263. package/dist/components/p-2f1e7628.js.map +0 -1
  264. package/dist/infineon-design-system-stencil/p-00d6e46e.entry.js.map +0 -1
  265. package/dist/infineon-design-system-stencil/p-222c1af9.entry.js +0 -2
  266. package/dist/infineon-design-system-stencil/p-222c1af9.entry.js.map +0 -1
  267. package/dist/infineon-design-system-stencil/p-28fb795b.entry.js +0 -2
  268. package/dist/infineon-design-system-stencil/p-436babb8.entry.js +0 -2
  269. package/dist/infineon-design-system-stencil/p-436babb8.entry.js.map +0 -1
  270. package/dist/infineon-design-system-stencil/p-72d804fb.entry.js +0 -2
  271. package/dist/infineon-design-system-stencil/p-72d804fb.entry.js.map +0 -1
  272. package/dist/infineon-design-system-stencil/p-7bef9272.entry.js +0 -2
  273. package/dist/infineon-design-system-stencil/p-7bef9272.entry.js.map +0 -1
  274. package/dist/infineon-design-system-stencil/p-89c7209f.entry.js +0 -2
  275. package/dist/infineon-design-system-stencil/p-89c7209f.entry.js.map +0 -1
  276. package/dist/infineon-design-system-stencil/p-9481adc8.entry.js +0 -2
  277. package/dist/infineon-design-system-stencil/p-9481adc8.entry.js.map +0 -1
  278. package/dist/infineon-design-system-stencil/p-bc8a4226.entry.js.map +0 -1
  279. package/dist/infineon-design-system-stencil/p-dc7deb14.entry.js +0 -2
  280. package/dist/infineon-design-system-stencil/p-dc7deb14.entry.js.map +0 -1
@@ -5,28 +5,55 @@ export default {
5
5
  args: {
6
6
  label: 'Attention! This is an alert message — check it out!',
7
7
  variant: 'primary',
8
- showIcon: true,
9
8
  closable: true,
10
- iconName: 'c-info-24',
9
+ icon: 'c-info-24',
11
10
  AriaLive: 'assertive',
12
11
  },
13
12
  argTypes: {
13
+ label: {
14
+ name: 'Label of Alert',
15
+ description: 'Sets the label of *<ifx-alert>*.',
16
+ table: {
17
+ category: 'story controls'
18
+ }
19
+ },
14
20
  variant: {
21
+ description: 'Sets the style variant of the alert.',
15
22
  options: ['primary', 'success', 'danger', 'warning'],
16
- control: { type: 'radio' },
23
+ control: 'radio',
24
+ table: {
25
+ category: 'ifx-alert props',
26
+ defaultValue: {
27
+ summary: 'primary'
28
+ }
29
+ }
17
30
  },
18
- iconName: {
19
- options: Object.values(icons).map(i => i['name']),
20
- control: { type: 'select' },
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
+ }
21
41
  },
22
42
  closable: {
43
+ description: 'Defines whether the alert should be closable or not.',
23
44
  control: 'boolean',
24
- default: true,
45
+ table: {
46
+ category: 'ifx-alert props',
47
+ defaultValue: {
48
+ summary: 'true'
49
+ }
50
+ }
25
51
  },
26
52
  ifxClose: {
27
53
  action: 'ifxClose',
28
- description: 'Custom event emitted when close button clicked',
54
+ description: 'Custom event emitted when close button clicked.',
29
55
  table: {
56
+ category: 'custom events',
30
57
  type: {
31
58
  summary: 'Framework integration',
32
59
  detail: 'React: onIfxClose={handleChange}\nVue:@ifxClose="handleChange"\nAngular:(ifxClose)="handleChange()"\nVanillaJs:.addEventListener("ifxClose", (event) => {//handle change});',
@@ -35,12 +62,18 @@ export default {
35
62
  },
36
63
  AriaLive: {
37
64
  options: ['off', 'polite', 'assertive'],
38
- control: { type: 'radio' },
39
- description: 'The aria-live attribute to indicate a dynamic content.'
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
+ }
40
73
  },
41
74
  },
42
75
  };
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>`;
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>`;
44
77
  export const Default = DefaultTemplate.bind({});
45
78
  const InfoTemplate = args => ` <ifx-alert variant="info" closable="${args.closable}">
46
79
  <div slot="headline">Headline</div>
@@ -55,7 +88,7 @@ Info.argTypes = {
55
88
  disable: true,
56
89
  },
57
90
  },
58
- iconName: {
91
+ icon: {
59
92
  table: {
60
93
  disable: true,
61
94
  },
@@ -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,E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AAe,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"]}
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,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,WAAW;KACtB;IAED,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,IAAI,EAAE,gBAAgB;YACtB,WAAW,EAAE,kCAAkC;YAC/C,KAAK,EAAE;gBACL,QAAQ,EAAE,gBAAgB;aAC3B;SACF;QACD,OAAO,EAAE;YACP,WAAW,EAAE,sCAAsC;YACnD,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC;YACpD,OAAO,EAAE,OAAO;YAChB,KAAK,EAAE;gBACL,QAAQ,EAAE,iBAAiB;gBAC3B,YAAY,EAAE;oBACZ,OAAO,EAAE,SAAS;iBACnB;aACF;SACF;Q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AAM,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"]}
@@ -4,19 +4,40 @@ export default {
4
4
  tags: ['autodocs'],
5
5
  args: {
6
6
  label: 'Badge label',
7
- icon: false,
7
+ icon: '',
8
8
  },
9
9
  argTypes: {
10
- iconName: {
11
- options: Object.values(icons).map(i => i['name']),
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: {
12
22
  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
+ }
13
31
  },
14
32
  },
15
33
  };
16
- const DefaultTemplate = args => `<ifx-badge>
17
- ${args.icon ? `<ifx-icon icon="${args.iconName}"></ifx-icon>` : ''}
18
- ${args.label}
19
- </ifx-badge>`;
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
+ };
20
41
  export const Default = DefaultTemplate.bind({});
21
42
  Default.argTypes = {};
22
43
  //# 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,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"]}
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"]}
@@ -2,7 +2,7 @@ import { h } from "@stencil/core";
2
2
  export class BreadcrumbItemLabel {
3
3
  constructor() {
4
4
  this.icon = undefined;
5
- this.url = undefined;
5
+ this.href = 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: '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" }))));
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" }))));
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
- "url": {
49
+ "href": {
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": "url",
65
+ "attribute": "href",
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,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"]}
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"]}
@@ -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('url') && breadcrumbDropdown) {
22
- throw new Error('ifx-breadcrumb-item cannot have both a url and a dropdown menu.');
21
+ if (breadcrumbItemLabel.hasAttribute('href') && breadcrumbDropdown) {
22
+ throw new Error('ifx-breadcrumb-item cannot have both a href and a dropdown menu.');
23
23
  }
24
24
  }
25
25
  }
26
26
  }
27
27
  }
28
28
  render() {
29
- return (h("nav", { key: '82aec60bebf9a71d7cdcfc2916f91c0e36dee868', "aria-label": "Page navigation breadcrumb" }, h("ol", { key: '70bae75b26b5df4c509f16c0ab8e2b10333de8ac', class: "breadcrumb" }, h("slot", { key: '1cb28e3640f20319349b4f6d3cb1568508d3b1ba' }))));
29
+ return (h("nav", { key: '3d01af951d4a6a396545eb9cf26454cbe2b31ed0', "aria-label": "Page navigation breadcrumb" }, h("ol", { key: '95ae08a0de7099ecd7c3aa963c1bf9952918ecda', class: "breadcrumb" }, h("slot", { key: 'e9fed255fa08b28c8974498d329df69b1e92edf5' }))));
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,KAAK,CAAC,IAAI,kBAAkB,EAAE,CAAC;wBAClE,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;oBACrF,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('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
+ {"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=\"breadcrumb\">\n <slot />\n </ol>\n </nav>\n );\n }\n}\n"]}
@@ -1,15 +1,88 @@
1
1
  import { action } from "@storybook/addon-actions";
2
+ import { icons } from "@infineon/infineon-icons";
2
3
  export default {
3
4
  title: 'Components/Breadcrumb',
4
5
  tags: ['autodocs'],
5
6
  args: {
6
- icon: false,
7
+ icon: '',
8
+ iconArialLabel: '',
9
+ href: 'http://yahoo.com',
10
+ hrefOfDropdownItem: 'http://google.com',
11
+ target: '_self',
7
12
  },
8
13
  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
+ },
9
81
  ifxDropdownMenuItem: {
10
82
  action: 'ifxDropdownMenuItem',
11
- description: 'Custom event emitted when an item is selected',
83
+ description: 'Custom event emitted by ifx-dropdown-menu when an item is selected.',
12
84
  table: {
85
+ category: 'custom events',
13
86
  type: {
14
87
  summary: 'Framework integration',
15
88
  detail: 'React: onIfxDropdownMenuItem={handleChange}\nVue:@ifxDropdownMenuItem="handleChange"\nAngular:(ifxDropdownMenuItem)="handleChange()"\nVanillaJs:.addEventListener("ifxDropdownMenuItem", (event) => {//handle change});',
@@ -19,30 +92,31 @@ export default {
19
92
  },
20
93
  };
21
94
  const DefaultTemplate = args => {
95
+ const icon = args.icon === 'none' ? '' : args.icon;
22
96
  const wrapper = document.createElement('div');
23
97
  wrapper.innerHTML = `<ifx-breadcrumb>
24
98
  <ifx-breadcrumb-item>
25
- <ifx-breadcrumb-item-label slot="label" icon="${args.icon ? 'c-info-16' : ''}">Breadcrumb 1</ifx-breadcrumb-item-label>
99
+ <ifx-breadcrumb-item-label slot="label" icon="${args.icon ? icon : ''}" href="${args.href}"">Breadcrumb 1</ifx-breadcrumb-item-label>
26
100
  <ifx-dropdown-menu>
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>
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>
31
105
  </ifx-dropdown-menu>
32
106
  </ifx-breadcrumb-item>
33
107
 
34
108
  <ifx-breadcrumb-item>
35
- <ifx-breadcrumb-item-label slot="label" icon="${args.icon ? 'c-info-16' : ''}">Breadcrumb 2</ifx-breadcrumb-item-label>
109
+ <ifx-breadcrumb-item-label slot="label" icon="${args.icon ? icon : ''}">Breadcrumb 2</ifx-breadcrumb-item-label>
36
110
  <ifx-dropdown-menu>
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>
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>
41
115
  </ifx-dropdown-menu>
42
116
  </ifx-breadcrumb-item>
43
117
 
44
118
  <ifx-breadcrumb-item>
45
- <ifx-breadcrumb-item-label slot="label" icon="${args.icon ? 'c-info-16' : ''}" url="http://google.com">Breadcrumb 3</ifx-breadcrumb-item-label>
119
+ <ifx-breadcrumb-item-label slot="label" icon="${args.icon ? icon : ''}" href="http://google.com">Breadcrumb 3</ifx-breadcrumb-item-label>
46
120
  </ifx-breadcrumb-item>
47
121
  </ifx-breadcrumb>`;
48
122
  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;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"]}
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;gBAC3C,YAAY,EAAE;oBACZ,OAAO,EAAE,EAAE;iBACZ;gBACD,IAAI,EAAE;oBACJ,OAAO,EAAE,QAAQ;iBAClB;aACF;SACF;QACD,MAAM,EAAE;YACN,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YACzB,WAAW,EAAE,6BAA6B;YAC1C,KAAK,EAAE;gBACL,QAAQ,EAAE,iCAAiC;gBAC3C,YAAY,EAAE;oBACZ,OAAO,EAAE,OAAO;iBACjB;gBACD,IAAI,EAAE;oBACJ,OAAO,EAAE,QAAQ;iBAClB;aACF;SACF;QACD,cAAc,EAAE;YACd,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YACzB,WAAW,EAAE,iCAAiC;YAC9C,KA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AAC,EAAE,WAAW,IAAI,CAAC,IAAI;;gCAE7D,IAAI,CAAC,kBAAkB;;;;;;;;oDAQH,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;;8BAE3C,IAAI,CAAC,IAAI;;;;;;;;oDAQa,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;;kBAEvD,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';\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"]}
@@ -10,43 +10,135 @@ export default {
10
10
  size: 'm',
11
11
  fullWidth: false,
12
12
  disabled: false,
13
+ icon: '',
13
14
  iconPosition: 'left',
14
15
  href: false,
15
16
  url: '',
16
17
  target: '_blank',
17
18
  },
18
19
  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
+ },
19
27
  icon: {
28
+ description: 'The icon to be displayed.',
29
+ control: 'select',
20
30
  options: Object.values(icons).map(i => i['name']),
21
- control: { type: 'select' },
31
+ table: {
32
+ category: 'ifx-button props',
33
+ type: {
34
+ summary: 'string'
35
+ }
36
+ }
22
37
  },
23
38
  variant: {
39
+ description: 'Sets the style variant of the button.',
40
+ control: 'radio',
24
41
  options: ['primary', 'secondary', 'tertiary'],
25
- control: { type: 'radio' },
42
+ table: {
43
+ category: 'ifx-button props',
44
+ defaultValue: {
45
+ summary: 'primary'
46
+ }
47
+ }
26
48
  },
27
49
  theme: {
50
+ description: 'Specifies the theme style of the button.',
51
+ control: 'radio',
28
52
  options: ['default', 'danger', 'inverse'],
29
- control: { type: 'radio' },
53
+ table: {
54
+ category: 'ifx-button props',
55
+ defaultValue: {
56
+ summary: 'default'
57
+ }
58
+ }
30
59
  },
31
60
  type: {
61
+ description: 'Sets the type attribute of the button.',
62
+ control: 'radio',
32
63
  options: ['button', 'submit', 'reset'],
33
- control: { type: 'radio' },
64
+ table: {
65
+ category: 'ifx-button props',
66
+ defaultValue: {
67
+ summary: 'button'
68
+ }
69
+ }
34
70
  },
35
71
  size: {
36
- description: 'Size options: xs (32px) s (36px), m (40px), l (48px) - default: m',
72
+ description: 'Sets the size of the button. Options: xs (32px) s (36px), m (40px), l (48px)',
73
+ control: 'radio',
37
74
  options: ['xs', 's', 'm', 'l'],
38
- control: { type: 'radio' },
75
+ table: {
76
+ category: 'ifx-button props',
77
+ defaultValue: {
78
+ summary: 'm'
79
+ }
80
+ }
39
81
  },
40
82
  fullWidth: {
41
- control: { type: 'boolean' },
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
+ }
42
101
  },
43
102
  iconPosition: {
103
+ description: 'Determines the position of an icon within the button if an icon is used.',
104
+ control: 'radio',
44
105
  options: ['left', 'right'],
45
- control: { type: 'radio' },
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
+ }
46
131
  },
47
132
  target: {
133
+ description: 'Determines where to open the linked document when the button is clicked.',
134
+ control: 'radio',
48
135
  options: ['_blank', '_self', '_parent'],
49
- control: { type: 'radio' },
136
+ table: {
137
+ category: 'ifx-button props',
138
+ defaultValue: {
139
+ summary: '_blank'
140
+ }
141
+ }
50
142
  },
51
143
  },
52
144
  };
@@ -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,YAAY,EAAE,MAAM;QACpB,IAAI,EAAE,KAAK;QACX,GAAG,EAAE,EAAE;QACP,MAAM,EAAE,QAAQ;KACjB;IAED,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC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,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"]}
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,EAAE;oBACJ,OAAO,EAAE,QAAQ;iBAClB;aACF;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,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"]}