@infineon/infineon-design-system-stencil 30.9.2--canary.1669.a6556475a763cdebf0a29aa12ca37f78801b6799.1 → 30.9.2--canary.1640.73e4e19bf6e56fa149c04b7bbaec71574880c28a.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +22 -20
  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 +23 -21
  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 +26 -24
  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 +22 -20
  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-26df4dfe.entry.js +2 -0
  189. package/dist/infineon-design-system-stencil/{p-28fb795b.entry.js.map → p-26df4dfe.entry.js.map} +1 -1
  190. package/dist/infineon-design-system-stencil/p-355cea09.entry.js +2 -0
  191. package/dist/infineon-design-system-stencil/p-355cea09.entry.js.map +1 -0
  192. package/dist/infineon-design-system-stencil/{p-00d6e46e.entry.js → p-602edb1f.entry.js} +2 -2
  193. package/dist/infineon-design-system-stencil/p-602edb1f.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
@@ -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;YACjD,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC5B;QACD,OAAO,EAAE;YACP,OAAO,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,UAAU,CAAC;YAC7C,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SAC3B;QACD,KAAK,EAAE;YACL,OAAO,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC;YACzC,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SAC3B;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC;YACtC,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SAC3B;QACD,IAAI,EAAE;YACJ,WAAW,E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":["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,IAA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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"]}
@@ -2,37 +2,117 @@ export default {
2
2
  title: 'Components/Card',
3
3
  tags: ['autodocs'],
4
4
  args: {
5
- direction: 'vertical',
6
5
  overline: 'Overline',
7
6
  headline: 'Headline',
8
7
  description: "Some quick example text to build on the card title and make up the bulk of the card's content.",
8
+ direction: 'vertical',
9
9
  button: 'button',
10
10
  href: '',
11
11
  target: '_blank',
12
12
  position: 'right',
13
13
  src: 'https://upload.wikimedia.org/wikipedia/commons/e/e4/Latte_and_dark_coffee.jpg',
14
+ AriaLabel: 'Card',
14
15
  },
15
16
  argTypes: {
17
+ overline: {
18
+ name: 'Overline',
19
+ description: 'Sets the overline text of the card.',
20
+ type: { name: 'string' },
21
+ table: {
22
+ category: 'story controls',
23
+ },
24
+ },
25
+ headline: {
26
+ name: 'Headline',
27
+ description: 'Sets the headline text of the card.',
28
+ type: { name: 'string' },
29
+ table: {
30
+ category: 'story controls',
31
+ },
32
+ },
33
+ description: {
34
+ name: 'Description',
35
+ description: 'Sets the description text of the card.',
36
+ type: { name: 'string' },
37
+ table: {
38
+ category: 'story controls',
39
+ },
40
+ },
16
41
  button: {
42
+ name: 'Button',
17
43
  options: ['button', 'link', 'none'],
44
+ description: 'Sets the button type of the card.',
18
45
  control: { type: 'radio' },
46
+ table: {
47
+ category: 'story controls',
48
+ },
19
49
  },
20
50
  direction: {
51
+ description: 'Sets the direction of the card layout.',
52
+ table: {
53
+ category: 'ifx-card props',
54
+ defaultValue: {
55
+ summary: 'vertical',
56
+ },
57
+ type: {
58
+ summary: 'horizontal | vertical',
59
+ disable: true,
60
+ },
61
+ },
21
62
  options: ['horizontal', 'vertical'],
22
63
  control: { type: 'radio' },
23
64
  },
65
+ AriaLabel: {
66
+ control: { type: 'text' },
67
+ description: 'Sets the aria-label attribute of the card. Enhances accessibility.',
68
+ table: {
69
+ category: 'ifx-card props',
70
+ },
71
+ },
24
72
  position: {
73
+ description: 'Sets the position of the image in the card.',
74
+ table: {
75
+ category: 'ifx-card-image props',
76
+ },
25
77
  options: ['left', 'right'],
26
78
  control: { type: 'radio' },
27
79
  if: { arg: 'direction', eq: 'horizontal' },
28
80
  },
81
+ href: {
82
+ description: 'Sets the hyperlink reference.',
83
+ type: { name: 'string' },
84
+ table: {
85
+ category: 'ifx-card props',
86
+ },
87
+ },
29
88
  target: {
89
+ description: 'Sets the target of the hyperlink reference',
90
+ table: {
91
+ category: 'ifx-card props',
92
+ defaultValue: {
93
+ summary: '_self',
94
+ },
95
+ },
30
96
  options: ['_blank', '_self', '_parent'],
31
97
  control: { type: 'radio' },
32
98
  },
99
+ src: {
100
+ description: 'Sets the image source.',
101
+ type: { name: 'string' },
102
+ table: {
103
+ category: 'ifx-card-image props',
104
+ },
105
+ },
106
+ alt: {
107
+ description: 'Sets the alternative text for the image.',
108
+ type: { name: 'string' },
109
+ table: {
110
+ category: 'ifx-card-image props',
111
+ },
112
+ },
33
113
  },
34
114
  };
35
- const DefaultTemplate = args => `<ifx-card direction="${args.direction}" href="${args.href}" target="${args.target}">
115
+ const DefaultTemplate = args => `<ifx-card direction="${args.direction}" href="${args.href}" target="${args.target}" aria-label="${args.AriaLabel}">
36
116
  <ifx-card-image position="${args.position}" src="${args.src}" alt="" slot="img"></ifx-card-image>
37
117
  ${args.overline
38
118
  ? `<ifx-card-overline>
@@ -70,10 +150,11 @@ const DefaultTemplate = args => `<ifx-card direction="${args.direction}" href="$
70
150
  </ifx-card>`;
71
151
  export const Default = DefaultTemplate.bind({});
72
152
  Default.args = {
153
+ alt: 'Coffee',
73
154
  src: 'https://upload.wikimedia.org/wikipedia/commons/e/e4/Latte_and_dark_coffee.jpg',
74
155
  };
75
156
  const HorizontalTemplate = args => `<ifx-card direction="${args.direction}" href="${args.href}" target="${args.target}">
76
- <ifx-card-image position="${args.position}" src="${args.src}" alt="" slot="img"></ifx-card-image>
157
+ <ifx-card-image position="${args.position}" src="${args.src}" alt="${args.alt}" slot="img"></ifx-card-image>
77
158
  ${args.overline
78
159
  ? `<ifx-card-overline>
79
160
  ${args.overline}
@@ -1 +1 @@
1
- {"version":3,"file":"card.stories.js","sourceRoot":"","sources":["../../../src/components/card/card.stories.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,KAAK,EAAE,iBAAiB;IACxB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,IAAI,EAAE;QACJ,SAAS,EAAE,UAAU;QACrB,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,UAAU;QACpB,WAAW,EAAE,gGAAgG;QAC7G,MAAM,EAAE,QAAQ;QAChB,IAAI,EAAE,EAAE;QACR,MAAM,EAAE,QAAQ;QAChB,QAAQ,EAAE,OAAO;QACjB,GAAG,EAAE,+EAA+E;KACrF;IAED,QAAQ,EAAE;QACR,MAAM,EAAE;YACN,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;YACnC,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SAC3B;QACD,SAAS,EAAE;YACT,OAAO,EAAE,C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MAAM,kBAAkB,GAAG,IAAI,CAAC,EAAE,CAChC,wBAAwB,IAAI,CAAC,SAAS,WAAW,IAAI,CAAC,IAAI,aAAa,IAAI,CAAC,MAAM;gCACpD,IAAI,CAAC,QAAQ,UAAU,IAAI,CAAC,GAAG;MAEzD,IAAI,CAAC,QAAQ;IACX,CAAC,CAAC;UACA,IAAI,CAAC,QAAQ;6BACM;IACrB,CAAC,CAAC,EACN;QAEI,IAAI,CAAC,QAAQ;IACX,CAAC,CAAC;YACA,IAAI,CAAC,QAAQ;+BACM;IACrB,CAAC,CAAC,EACN;UAEI,IAAI,CAAC,WAAW;IACd,CAAC,CAAC;cACA,IAAI,CAAC,WAAW;6BACD;IACjB,CAAC,CAAC,EACN;QAEA,IAAI,CAAC,MAAM,KAAK,QAAQ;IACtB,CAAC,CAAC;;;4BAGgB;IAClB,CAAC,CAAC,EACN;YAEM,IAAI,CAAC,MAAM,KAAK,MAAM;IACpB,CAAC,CAAC;;;;;;;;;0BASU;IACZ,CAAC,CAAC,EACN;cACI,CAAC;AAEf,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtD,UAAU,CAAC,IAAI,GAAG;IAChB,SAAS,EAAE,YAAY;IACvB,GAAG,EAAE,+EAA+E;CACrF,CAAC;AACF,UAAU,CAAC,QAAQ,GAAG;IACpB,SAAS,EAAE;QACT,KAAK,EAAE;YACL,OAAO,EAAE,IAAI;SACd;KACF;CACF,CAAC","sourcesContent":["export default {\n title: 'Components/Card',\n tags: ['autodocs'],\n args: {\n direction: 'vertical',\n overline: 'Overline',\n headline: 'Headline',\n description: \"Some quick example text to build on the card title and make up the bulk of the card's content.\",\n button: 'button',\n href: '',\n target: '_blank',\n position: 'right',\n src: 'https://upload.wikimedia.org/wikipedia/commons/e/e4/Latte_and_dark_coffee.jpg',\n },\n\n argTypes: {\n button: {\n options: ['button', 'link', 'none'],\n control: { type: 'radio' },\n },\n direction: {\n options: ['horizontal', 'vertical'],\n control: { type: 'radio' },\n },\n\n position: {\n options: ['left', 'right'],\n control: { type: 'radio' },\n if: { arg: 'direction', eq: 'horizontal' },\n },\n\n target: {\n options: ['_blank', '_self', '_parent'],\n control: { type: 'radio' },\n },\n },\n};\n\nconst DefaultTemplate = args =>\n `<ifx-card direction=\"${args.direction}\" href=\"${args.href}\" target=\"${args.target}\">\n <ifx-card-image position=\"${args.position}\" src=\"${args.src}\" alt=\"\" slot=\"img\"></ifx-card-image>\n ${\n args.overline\n ? `<ifx-card-overline>\n ${args.overline}\n </ifx-card-overline>`\n : ''\n }\n ${\n args.headline\n ? `<ifx-card-headline>\n ${args.headline}\n </ifx-card-headline>`\n : ''\n }\n ${\n args.description\n ? `<ifx-card-text>\n ${args.description}\n </ifx-card-text>`\n : ''\n }\n ${\n args.button === 'button'\n ? `<ifx-card-links slot=\"buttons\">\n <ifx-button variant=\"primary\">Button</ifx-button>\n <ifx-button variant=\"secondary\">Button</ifx-button>\n </ifx-card-links>`\n : ''\n }\n ${\n args.button === 'link'\n ? `<ifx-card-links slot=\"buttons\">\n <ifx-link href=\"https://google.com\" target=\"_blank\">\n <ifx-icon icon=\"calendar16\"></ifx-icon>\n Link\n </ifx-link>\n <ifx-link href=\"https://yahoo.com\" target=\"_blank\">\n <ifx-icon icon=\"calendar16\"></ifx-icon>\n Link\n </ifx-link>\n </ifx-card-links>`\n : ''\n }\n </ifx-card>`;\n\nexport const Default = DefaultTemplate.bind({});\nDefault.args = {\n src: 'https://upload.wikimedia.org/wikipedia/commons/e/e4/Latte_and_dark_coffee.jpg',\n};\n\nconst HorizontalTemplate = args =>\n `<ifx-card direction=\"${args.direction}\" href=\"${args.href}\" target=\"${args.target}\">\n <ifx-card-image position=\"${args.position}\" src=\"${args.src}\" alt=\"\" slot=\"img\"></ifx-card-image>\n ${\n args.overline\n ? `<ifx-card-overline>\n ${args.overline}\n </ifx-card-overline>`\n : ''\n }\n ${\n args.headline\n ? `<ifx-card-headline>\n ${args.headline}\n </ifx-card-headline>`\n : ''\n }\n ${\n args.description\n ? `<ifx-card-text>\n ${args.description}\n </ifx-card-text>`\n : ''\n }\n ${\n args.button === 'button'\n ? `<ifx-card-links slot=\"buttons\">\n <ifx-button variant=\"primary\">Button</ifx-button>\n <ifx-button variant=\"secondary\">Button</ifx-button>\n </ifx-card-links>`\n : ''\n }\n ${\n args.button === 'link'\n ? `<ifx-card-links slot=\"buttons\">\n <ifx-link color=\"primary\" href=\"https://google.com\" target=\"_blank\" underline=\"false\">\n <ifx-icon icon=\"calendar16\"></ifx-icon>\n Link\n </ifx-link>\n <ifx-link color=\"primary\" href=\"https://yahoo.com\" target=\"_blank\" underline=\"false\">\n <ifx-icon icon=\"calendar16\"></ifx-icon>\n Link\n </ifx-link>\n </ifx-card-links>`\n : ''\n }\n </ifx-card>`;\n\nexport const Horizontal = HorizontalTemplate.bind({});\nHorizontal.args = {\n direction: 'horizontal',\n src: 'https://upload.wikimedia.org/wikipedia/commons/e/e4/Latte_and_dark_coffee.jpg',\n};\nHorizontal.argTypes = {\n direction: {\n table: {\n disable: true,\n },\n },\n};\n"]}
1
+ {"version":3,"file":"card.stories.js","sourceRoot":"","sources":["../../../src/components/card/card.stories.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,KAAK,EAAE,iBAAiB;IACxB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,IAAI,EAAE;QACJ,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,UAAU;QACpB,WAAW,EAAE,gGAAgG;QAC7G,SAAS,EAAE,UAAU;QACrB,MAAM,EAAE,QAAQ;QAChB,IAAI,EAAE,EAAE;QACR,MAAM,EAAE,QAAQ;QAChB,QAAQ,EAAE,OAAO;QACjB,GAAG,EAAE,+EAA+E;QACpF,SAAS,EAAE,MAAM;KAClB;IAED,QAAQ,EAAE;QACR,QAAQ,EAAE;YACR,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,qCAAqC;YAClD,IAAI,EAAE,EAAE,IAAI,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AU,GAAG,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtD,UAAU,CAAC,IAAI,GAAG;IAChB,SAAS,EAAE,YAAY;IACvB,GAAG,EAAE,+EAA+E;CACrF,CAAC;AACF,UAAU,CAAC,QAAQ,GAAG;IACpB,SAAS,EAAE;QACT,KAAK,EAAE;YACL,OAAO,EAAE,IAAI;SACd;KACF;CACF,CAAC","sourcesContent":["export default {\n title: 'Components/Card',\n tags: ['autodocs'],\n args: {\n overline: 'Overline',\n headline: 'Headline',\n description: \"Some quick example text to build on the card title and make up the bulk of the card's content.\",\n direction: 'vertical',\n button: 'button',\n href: '',\n target: '_blank',\n position: 'right',\n src: 'https://upload.wikimedia.org/wikipedia/commons/e/e4/Latte_and_dark_coffee.jpg',\n AriaLabel: 'Card',\n },\n\n argTypes: {\n overline: {\n name: 'Overline',\n description: 'Sets the overline text of the card.',\n type: { name: 'string' },\n table: {\n category: 'story controls',\n },\n },\n headline: {\n name: 'Headline',\n description: 'Sets the headline text of the card.',\n type: { name: 'string' },\n table: {\n category: 'story controls',\n },\n },\n description: {\n name: 'Description',\n description: 'Sets the description text of the card.',\n type: { name: 'string' },\n table: {\n category: 'story controls',\n },\n },\n button: {\n name: 'Button',\n options: ['button', 'link', 'none'],\n description: 'Sets the button type of the card.',\n control: { type: 'radio' },\n table: {\n category: 'story controls',\n },\n },\n direction: {\n description: 'Sets the direction of the card layout.',\n table: {\n category: 'ifx-card props',\n defaultValue: {\n summary: 'vertical',\n },\n type: {\n summary: 'horizontal | vertical',\n disable: true,\n },\n },\n options: ['horizontal', 'vertical'],\n control: { type: 'radio' },\n },\n AriaLabel: {\n control: { type: 'text' },\n description: 'Sets the aria-label attribute of the card. Enhances accessibility.',\n table: {\n category: 'ifx-card props',\n },\n },\n\n position: {\n description: 'Sets the position of the image in the card.',\n table: {\n category: 'ifx-card-image props',\n },\n options: ['left', 'right'],\n control: { type: 'radio' },\n if: { arg: 'direction', eq: 'horizontal' },\n },\n href: {\n description: 'Sets the hyperlink reference.',\n type: { name: 'string' },\n table: {\n category: 'ifx-card props',\n },\n },\n target: {\n description: 'Sets the target of the hyperlink reference',\n table: {\n category: 'ifx-card props',\n defaultValue: {\n summary: '_self',\n },\n },\n options: ['_blank', '_self', '_parent'],\n control: { type: 'radio' },\n },\n src: {\n description: 'Sets the image source.',\n type: { name: 'string' },\n table: {\n category: 'ifx-card-image props',\n },\n },\n alt: {\n description: 'Sets the alternative text for the image.',\n type: { name: 'string' },\n table: {\n category: 'ifx-card-image props',\n },\n },\n },\n};\n\nconst DefaultTemplate = args =>\n `<ifx-card direction=\"${args.direction}\" href=\"${args.href}\" target=\"${args.target}\" aria-label=\"${args.AriaLabel}\">\n <ifx-card-image position=\"${args.position}\" src=\"${args.src}\" alt=\"\" slot=\"img\"></ifx-card-image>\n ${args.overline\n ? `<ifx-card-overline>\n ${args.overline}\n </ifx-card-overline>`\n : ''\n }\n ${args.headline\n ? `<ifx-card-headline>\n ${args.headline}\n </ifx-card-headline>`\n : ''\n }\n ${args.description\n ? `<ifx-card-text>\n ${args.description}\n </ifx-card-text>`\n : ''\n }\n ${args.button === 'button'\n ? `<ifx-card-links slot=\"buttons\">\n <ifx-button variant=\"primary\">Button</ifx-button>\n <ifx-button variant=\"secondary\">Button</ifx-button>\n </ifx-card-links>`\n : ''\n }\n ${args.button === 'link'\n ? `<ifx-card-links slot=\"buttons\">\n <ifx-link href=\"https://google.com\" target=\"_blank\">\n <ifx-icon icon=\"calendar16\"></ifx-icon>\n Link\n </ifx-link>\n <ifx-link href=\"https://yahoo.com\" target=\"_blank\">\n <ifx-icon icon=\"calendar16\"></ifx-icon>\n Link\n </ifx-link>\n </ifx-card-links>`\n : ''\n }\n </ifx-card>`;\n\nexport const Default = DefaultTemplate.bind({});\nDefault.args = {\n alt: 'Coffee',\n src: 'https://upload.wikimedia.org/wikipedia/commons/e/e4/Latte_and_dark_coffee.jpg',\n};\n\nconst HorizontalTemplate = args =>\n `<ifx-card direction=\"${args.direction}\" href=\"${args.href}\" target=\"${args.target}\">\n <ifx-card-image position=\"${args.position}\" src=\"${args.src}\" alt=\"${args.alt}\" slot=\"img\"></ifx-card-image>\n ${args.overline\n ? `<ifx-card-overline>\n ${args.overline}\n </ifx-card-overline>`\n : ''\n }\n ${args.headline\n ? `<ifx-card-headline>\n ${args.headline}\n </ifx-card-headline>`\n : ''\n }\n ${args.description\n ? `<ifx-card-text>\n ${args.description}\n </ifx-card-text>`\n : ''\n }\n ${args.button === 'button'\n ? `<ifx-card-links slot=\"buttons\">\n <ifx-button variant=\"primary\">Button</ifx-button>\n <ifx-button variant=\"secondary\">Button</ifx-button>\n </ifx-card-links>`\n : ''\n }\n ${args.button === 'link'\n ? `<ifx-card-links slot=\"buttons\">\n <ifx-link color=\"primary\" href=\"https://google.com\" target=\"_blank\" underline=\"false\">\n <ifx-icon icon=\"calendar16\"></ifx-icon>\n Link\n </ifx-link>\n <ifx-link color=\"primary\" href=\"https://yahoo.com\" target=\"_blank\" underline=\"false\">\n <ifx-icon icon=\"calendar16\"></ifx-icon>\n Link\n </ifx-link>\n </ifx-card-links>`\n : ''\n }\n </ifx-card>`;\n\nexport const Horizontal = HorizontalTemplate.bind({});\nHorizontal.args = {\n direction: 'horizontal',\n src: 'https://upload.wikimedia.org/wikipedia/commons/e/e4/Latte_and_dark_coffee.jpg',\n};\nHorizontal.argTypes = {\n direction: {\n table: {\n disable: true,\n },\n },\n};\n"]}
@@ -3,41 +3,99 @@ export default {
3
3
  title: 'Components/Checkbox',
4
4
  tags: ['autodocs'],
5
5
  args: {
6
+ label: 'Text',
6
7
  error: false,
8
+ disabled: false,
7
9
  checked: false,
8
- label: 'Text',
9
10
  size: 's',
10
11
  indeterminate: false,
11
- name: 'checkbox',
12
- value: 'checkbox',
12
+ name: 'checkbox'
13
13
  },
14
14
  argTypes: {
15
+ label: {
16
+ name: 'Label of Checkbox',
17
+ description: 'Set the label displayed next to *<ifx-checkbox>*.',
18
+ table: {
19
+ category: 'story controls',
20
+ }
21
+ },
22
+ error: {
23
+ description: 'Toggles the error state for the checkbox.',
24
+ control: 'boolean',
25
+ table: {
26
+ category: 'ifx-checkbox props',
27
+ defaultValue: {
28
+ summary: false,
29
+ }
30
+ }
31
+ },
32
+ disabled: {
33
+ description: 'Disables the checkbox when set to true.',
34
+ control: 'boolean',
35
+ table: {
36
+ category: 'ifx-checkbox props',
37
+ defaultValue: {
38
+ summary: false,
39
+ }
40
+ }
41
+ },
42
+ checked: {
43
+ description: 'Controls whether the checkbox is checked.',
44
+ control: 'boolean',
45
+ table: {
46
+ category: 'ifx-checkbox props',
47
+ defaultValue: {
48
+ summary: false,
49
+ }
50
+ }
51
+ },
52
+ indeterminate: {
53
+ description: 'Activates the indeterminate state for the checkbox when set to true.',
54
+ control: 'boolean',
55
+ table: {
56
+ category: 'ifx-checkbox props',
57
+ defaultValue: {
58
+ summary: false,
59
+ }
60
+ }
61
+ },
15
62
  size: {
16
- description: 'Size options: s (21px) and m (25px) - default: m',
63
+ description: 'Sets the size of the checkbox. Options: s (21px) and m (25px).',
64
+ control: 'radio',
17
65
  options: ['s', 'm'],
18
- control: { type: 'radio' },
66
+ table: {
67
+ category: 'ifx-checkbox props',
68
+ defaultValue: {
69
+ summary: 's'
70
+ },
71
+ type: {
72
+ summary: 's | m'
73
+ }
74
+ }
75
+ },
76
+ name: {
77
+ description: 'Name of the element, that is used as reference when a form is submitted.',
78
+ table: {
79
+ category: 'ifx-checkbox props'
80
+ }
19
81
  },
20
82
  ifxChange: {
21
83
  action: 'ifxChange',
22
- description: 'Custom event emitted when accordion-item is closed',
84
+ description: 'Custom event that is triggered when the checkbox is clicked.',
23
85
  table: {
86
+ category: 'custom events',
24
87
  type: {
25
88
  summary: 'Framework integration',
26
89
  detail: 'React: onIfxChange={handleChange}\nVue:@ifxChange="handleChange"\nAngular:(ifxChange)="handleChange()"\nVanillaJs:.addEventListener("ifxChange", (event) => {//handle change});',
27
90
  },
28
91
  },
29
92
  },
30
- name: {
31
- description: 'Name of the element, that is used as reference when a form is submitted.'
32
- },
33
- value: {
34
- description: 'The value that gets submitted, when the checkbox is seleted'
35
- }
36
93
  },
37
94
  };
38
- const DefaultTemplate = ({ error, checked, indeterminate, size, label, name }) => {
95
+ const Template = ({ error, disabled, checked, indeterminate, size, label, name }) => {
39
96
  const checkbox = document.createElement('ifx-checkbox');
40
97
  checkbox.setAttribute('error', error);
98
+ checkbox.setAttribute('disabled', disabled);
41
99
  checkbox.setAttribute('checked', checked);
42
100
  checkbox.setAttribute('size', size);
43
101
  checkbox.setAttribute('indeterminate', indeterminate);
@@ -48,5 +106,5 @@ const DefaultTemplate = ({ error, checked, indeterminate, size, label, name }) =
48
106
  `;
49
107
  return checkbox;
50
108
  };
51
- export const Default = DefaultTemplate.bind({});
109
+ export const Default = Template.bind({});
52
110
  //# sourceMappingURL=checkbox.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.stories.js","sourceRoot":"","sources":["../../../src/components/checkbox/checkbox.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eAAe;IACb,KAAK,EAAE,qBAAqB;IAC5B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,IAAI,EAAE;QACJ,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,MAAM;QACb,IAAI,EAAE,GAAG;QACT,aAAa,EAAE,KAAK;QACpB,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,UAAU;KAClB;IAED,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,WAAW,EAAE,kDAAkD;YAC/D,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;YACnB,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SAC3B;QACD,SAAS,EAAE;YACT,MAAM,EAAE,WAAW;YACnB,WAAW,EAAE,oDAAoD;YACjE,KAAK,EAAE;gBACL,IAAI,EAAE;oBACJ,OAAO,EAAE,uBAAuB;oBAChC,MAAM,EACJ,iLAAiL;iBACpL;aACF;SACF;QACD,IAAI,EAAE;YACJ,WAAW,EAAE,0EAA0E;SACxF;QACD,KAAK,EAAE;YACL,WAAW,EAAE,6DAA6D;SAC3E;KACF;CACF,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE;IAC/E,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;IACxD,QAAQ,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACtC,QAAQ,CAAC,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC1C,QAAQ,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACpC,QAAQ,CAAC,YAAY,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IACtD,QAAQ,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAEpC,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;IAE5D,QAAQ,CAAC,SAAS,GAAG;MACjB,KAAK;GACR,CAAC;IAEF,OAAO,QAAQ,CAAC;AAClB,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/Checkbox',\n tags: ['autodocs'],\n args: {\n error: false,\n checked: false,\n label: 'Text',\n size: 's',\n indeterminate: false,\n name: 'checkbox',\n value: 'checkbox',\n },\n\n argTypes: {\n size: {\n description: 'Size options: s (21px) and m (25px) - default: m',\n options: ['s', 'm'],\n control: { type: 'radio' },\n },\n ifxChange: {\n action: 'ifxChange',\n description: 'Custom event emitted when accordion-item is closed',\n table: {\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxChange={handleChange}\\nVue:@ifxChange=\"handleChange\"\\nAngular:(ifxChange)=\"handleChange()\"\\nVanillaJs:.addEventListener(\"ifxChange\", (event) => {//handle change});',\n },\n },\n },\n name: {\n description: 'Name of the element, that is used as reference when a form is submitted.'\n },\n value: {\n description: 'The value that gets submitted, when the checkbox is seleted'\n }\n },\n};\n\nconst DefaultTemplate = ({ error, checked, indeterminate, size, label, name }) => {\n const checkbox = document.createElement('ifx-checkbox');\n checkbox.setAttribute('error', error);\n checkbox.setAttribute('checked', checked);\n checkbox.setAttribute('size', size);\n checkbox.setAttribute('indeterminate', indeterminate);\n checkbox.setAttribute('name', name);\n\n checkbox.addEventListener('ifxChange', action('ifxChange'));\n\n checkbox.innerHTML = `\n ${label}\n `;\n\n return checkbox;\n};\n\nexport const Default = DefaultTemplate.bind({});\n"]}
1
+ {"version":3,"file":"checkbox.stories.js","sourceRoot":"","sources":["../../../src/components/checkbox/checkbox.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eAAe;IACb,KAAK,EAAE,qBAAqB;IAC5B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM;QACb,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,GAAG;QACT,aAAa,EAAE,KAAK;QACpB,IAAI,EAAE,UAAU;KACjB;IAED,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,IAAI,EAAE,mBAAmB;YACzB,WAAW,EAAE,mDAAmD;YAChE,KAAK,EAAE;gBACL,QAAQ,EAAE,gBAAgB;aAC3B;SACF;QACD,KAAK,EAAE;YACL,WAAW,EAAE,2CAA2C;YACxD,OAAO,EAAE,SAAS;YAClB,KAAK,EAAE;gBACL,QAAQ,EAAE,oBAAoB;gBAC9B,YAAY,EAAE;oB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,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE;IAClF,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;IACxD,QAAQ,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACtC,QAAQ,CAAC,YAAY,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAC5C,QAAQ,CAAC,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC1C,QAAQ,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACpC,QAAQ,CAAC,YAAY,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IACtD,QAAQ,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAEpC,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;IAE5D,QAAQ,CAAC,SAAS,GAAG;MACjB,KAAK;GACR,CAAC;IAEF,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { action } from '@storybook/addon-actions';\n\nexport default {\n title: 'Components/Checkbox',\n tags: ['autodocs'],\n args: {\n label: 'Text',\n error: false,\n disabled: false,\n checked: false,\n size: 's',\n indeterminate: false,\n name: 'checkbox'\n },\n\n argTypes: {\n label: {\n name: 'Label of Checkbox',\n description: 'Set the label displayed next to *<ifx-checkbox>*.',\n table: {\n category: 'story controls',\n }\n },\n error: {\n description: 'Toggles the error state for the checkbox.',\n control: 'boolean',\n table: {\n category: 'ifx-checkbox props',\n defaultValue: {\n summary: false,\n }\n }\n },\n disabled: {\n description: 'Disables the checkbox when set to true.',\n control: 'boolean',\n table: {\n category: 'ifx-checkbox props',\n defaultValue: {\n summary: false,\n }\n }\n },\n checked: {\n description: 'Controls whether the checkbox is checked.',\n control: 'boolean',\n table: {\n category: 'ifx-checkbox props',\n defaultValue: {\n summary: false,\n }\n }\n },\n indeterminate: {\n description: 'Activates the indeterminate state for the checkbox when set to true.',\n control: 'boolean',\n table: {\n category: 'ifx-checkbox props',\n defaultValue: {\n summary: false,\n }\n }\n },\n size: {\n description: 'Sets the size of the checkbox. Options: s (21px) and m (25px).',\n control: 'radio',\n options: ['s', 'm'],\n table: {\n category: 'ifx-checkbox props',\n defaultValue: {\n summary: 's'\n },\n type: {\n summary: 's | m'\n }\n }\n },\n name: {\n description: 'Name of the element, that is used as reference when a form is submitted.',\n table: {\n category: 'ifx-checkbox props'\n }\n },\n ifxChange: {\n action: 'ifxChange',\n description: 'Custom event that is triggered when the checkbox is clicked.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxChange={handleChange}\\nVue:@ifxChange=\"handleChange\"\\nAngular:(ifxChange)=\"handleChange()\"\\nVanillaJs:.addEventListener(\"ifxChange\", (event) => {//handle change});',\n },\n },\n },\n },\n};\n\nconst Template = ({ error, disabled, checked, indeterminate, size, label, name }) => {\n const checkbox = document.createElement('ifx-checkbox');\n checkbox.setAttribute('error', error);\n checkbox.setAttribute('disabled', disabled);\n checkbox.setAttribute('checked', checked);\n checkbox.setAttribute('size', size);\n checkbox.setAttribute('indeterminate', indeterminate);\n checkbox.setAttribute('name', name);\n\n checkbox.addEventListener('ifxChange', action('ifxChange'));\n\n checkbox.innerHTML = `\n ${label}\n `;\n\n return checkbox;\n};\n\nexport const Default = Template.bind({});"]}
@@ -31,8 +31,8 @@ export class ChipItem {
31
31
  toggleItemSelection() {
32
32
  this.selected = !this.selected;
33
33
  }
34
- emitIfxChipItemSelectEvent(emitIfxChipChange = true) {
35
- this.ifxChipItemSelect.emit({ emitIfxChipChange: emitIfxChipChange,
34
+ emitIfxChipItemSelectEvent(emitIfxChange = true) {
35
+ this.ifxChipItemSelect.emit({ emitIfxChange: emitIfxChange,
36
36
  key: this.chipState.key,
37
37
  label: this.getItemLabel(),
38
38
  selected: this.selected,
@@ -56,9 +56,9 @@ export class ChipItem {
56
56
  this.handleSelectedState();
57
57
  }
58
58
  render() {
59
- return (h("div", { key: '493fe2e521f96fbe65792b4364c32a3010a4ae86', class: `chip-item chip-item--${this.chipState.size}
59
+ return (h("div", { key: 'a4d81329a7a5bbbc71b66b0f02f32302e3edd6bd', class: `chip-item chip-item--${this.chipState.size}
60
60
  chip-item--${(this.selected && this.chipState.variant) === 'single' ? 'selected' : ''}`, tabIndex: 0, onClick: () => { this.handleItemClick(); }, onKeyDown: (e) => { this.handleItemKeyDown(e); }, role: "option", "aria-selected": this.selected.toString() }, this.chipState.variant === 'multi' &&
61
- h("ifx-checkbox", { key: '3f65da6457afbeca9e5e803f2569263b499fe839', checked: this.selected, tabIndex: -1, size: 's' }), h("div", { key: '02a710f81308419623960d15270f719c45f5fd11', class: 'chip-item__label' }, " ", h("slot", { key: 'ad971a10884b08cf3775f7296a44c7aff1769a0b' }), " "), h("div", { key: '2ba702249a7fc67ded010890181f5b35494df843', class: 'chip-item__selected-indicator' }, h("ifx-icon", { key: '887b43ff1b8c6539b01c0fc620f51d9bc04a05d9', icon: `check${this.chipState.size === 'small' ? '12' : '16'}` }, " "))));
61
+ h("ifx-checkbox", { key: '26865e6c41a95e1a92a0bbcb444ffd99b06b6f6b', checked: this.selected, tabIndex: -1, size: 's' }), h("div", { key: '8a48897962af2131d6f574d602b71e035b2f46a6', class: 'chip-item__label' }, " ", h("slot", { key: '2945084fa15c686cc6456761f4ca67370d6418b3' }), " "), h("div", { key: '94e48f99ce3629f73d2a82530626474a50d0d9c1', class: 'chip-item__selected-indicator' }, h("ifx-icon", { key: 'e9aaef0ae55766df51d8d293bb4405703dcdead8', icon: `check${this.chipState.size === 'small' ? '12' : '16'}` }, " "))));
62
62
  }
63
63
  static get is() { return "ifx-chip-item"; }
64
64
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"chip-item.js","s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gBAClC,qEAAc,OAAO,EAAE,IAAI,CAAC,QAAQ,EAChC,QAAQ,EAAE,CAAC,CAAC,EACZ,IAAI,EAAC,GAAG,GACG;YAGnB,4DAAK,KAAK,EAAC,kBAAkB;;gBAAE,8DAAQ;oBAAO;YAG9C,4DAAK,KAAK,EAAC,+BAA+B;gBACtC,iEAAU,IAAI,EAAE,QAAQ,IAAI,CAAC,SAAS,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,QAAc,CACnF,CAEJ,CACT,CAAC;IACL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACA","sourcesContent":["import { h,\n Component,\n Element,\n Event,\n EventEmitter, \n Listen,\n Prop, \n Watch } from '@stencil/core';\nimport { ChipItemSelectEvent, ChipState } from '../interfaces';\n\n@Component({\ntag: 'ifx-chip-item',\nstyleUrl: 'chip-item.scss',\nshadow: true\n})\n\nexport class ChipItem {\n@Element() chipItem: HTMLIfxChipItemElement;\n\n@Event({ composed: false }) ifxChipItemSelect: EventEmitter<ChipItemSelectEvent>;\n\n@Prop() value: string = undefined;\n@Prop() chipState: ChipState = { emitIfxChipItemSelect: true, variant: 'multi', size: 'large' }; \n@Prop({ mutable: true, reflect: true }) selected: boolean = false;\n\n@Listen('ifxChipItemSelect', { target: 'body' })\nupdateItemSelection(event: CustomEvent<ChipItemSelectEvent>) {\n if (this.chipState.variant === 'single') {\n const target = event.target as HTMLIfxChipItemElement;\n /* Also making sure chip items are from the same group (parent) while unselecting. */\n if (this.chipItem !== target && this.chipItem.parentElement === target.parentElement) {\n this.selected = false;\n }\n }\n} \n\n@Watch('selected')\nvalidateSelected(newValue: boolean, oldValue: boolean) {\n if (newValue !== oldValue) {\n /* Do not emit if ChipState does not allow. */\n if (this.chipState.emitIfxChipItemSelect){\n this.emitIfxChipItemSelectEvent();\n } else {\n this.chipState.emitIfxChipItemSelect = true;\n }\n }\n} \n\ngetItemLabel(): string {\n return this.chipItem.innerText as string;\n}\n\ntoggleItemSelection() {\n this.selected = !this.selected;\n}\n \n\nemitIfxChipItemSelectEvent(emitIfxChipChange: boolean = true) {\n this.ifxChipItemSelect.emit({ emitIfxChipChange: emitIfxChipChange,\n key: this.chipState.key,\n label: this.getItemLabel(), \n selected: this.selected, \n value: this.value });\n}\n\nhandleItemClick() {\n this.toggleItemSelection();\n}\n\nhandleItemKeyDown(event: KeyboardEvent) {\n if (event.code === 'Enter' || event.code === 'Space') {\n this.toggleItemSelection();\n }\n}\n\nhandleSelectedState() {\n if (this.selected) {\n this.emitIfxChipItemSelectEvent(false);\n }\n}\n\n\ncomponentWillLoad() {\n /* Propogating the selected state to the Chip (Parent) component if it is set. */\n this.handleSelectedState();\n}\n\nrender() {\n return (\n <div class={`chip-item chip-item--${this.chipState.size} \n chip-item--${(this.selected && this.chipState.variant) === 'single' ? 'selected' : ''}`} \n tabIndex={0}\n onClick={() => {this.handleItemClick()}}\n onKeyDown={(e) => {this.handleItemKeyDown(e)}}\n role=\"option\"\n aria-selected={this.selected.toString()}> \n {/* Checkbox; renders only in 'multi' variant. */}\n { \n this.chipState.variant === 'multi' &&\n <ifx-checkbox checked={this.selected}\n tabIndex={-1} \n size='s'>\n </ifx-checkbox>\n }\n\n <div class='chip-item__label'> <slot /> </div>\n\n {/* Selected indicator only visible in 'single' variant. */}\n <div class='chip-item__selected-indicator'> \n <ifx-icon icon={`check${this.chipState.size === 'small' ? '12' : '16'}`}> </ifx-icon> \n </div>\n\n </div>\n );\n}\n}"]}
1
+ {"version":3,"file":"chip-item.js","sourceRoot":"","sources":["../../../../src/components/chip/chip-item/chip-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EACN,SAAS,EACT,OAAO,EACP,KAAK,EAEL,MAAM,EACN,IAAI,EACJ,KAAK,EAAE,MAAM,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9C,4DAAK,KAAK,EAAC,+BAA+B;gBACtC,iEAAU,IAAI,EAAE,QAAQ,IAAI,CAAC,SAAS,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,QAAc,CACnF,CAEJ,CACT,CAAC;IACL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACA","sourcesContent":["import { h,\n Component,\n Element,\n Event,\n EventEmitter, \n Listen,\n Prop, \n Watch } from '@stencil/core';\nimport { ChipItemSelectEvent, ChipState } from '../interfaces';\n\n@Component({\ntag: 'ifx-chip-item',\nstyleUrl: 'chip-item.scss',\nshadow: true\n})\n\nexport class ChipItem {\n@Element() chipItem: HTMLIfxChipItemElement;\n\n@Event({ composed: false }) ifxChipItemSelect: EventEmitter<ChipItemSelectEvent>;\n\n@Prop() value: string = undefined;\n@Prop() chipState: ChipState = { emitIfxChipItemSelect: true, variant: 'multi', size: 'large' }; \n@Prop({ mutable: true, reflect: true }) selected: boolean = false;\n\n@Listen('ifxChipItemSelect', { target: 'body' })\nupdateItemSelection(event: CustomEvent<ChipItemSelectEvent>) {\n if (this.chipState.variant === 'single') {\n const target = event.target as HTMLIfxChipItemElement;\n /* Also making sure chip items are from the same group (parent) while unselecting. */\n if (this.chipItem !== target && this.chipItem.parentElement === target.parentElement) {\n this.selected = false;\n }\n }\n} \n\n@Watch('selected')\nvalidateSelected(newValue: boolean, oldValue: boolean) {\n if (newValue !== oldValue) {\n /* Do not emit if ChipState does not allow. */\n if (this.chipState.emitIfxChipItemSelect){\n this.emitIfxChipItemSelectEvent();\n } else {\n this.chipState.emitIfxChipItemSelect = true;\n }\n }\n} \n\ngetItemLabel(): string {\n return this.chipItem.innerText as string;\n}\n\ntoggleItemSelection() {\n this.selected = !this.selected;\n}\n \n\nemitIfxChipItemSelectEvent(emitIfxChange: boolean = true) {\n this.ifxChipItemSelect.emit({ emitIfxChange: emitIfxChange,\n key: this.chipState.key,\n label: this.getItemLabel(), \n selected: this.selected, \n value: this.value });\n}\n\nhandleItemClick() {\n this.toggleItemSelection();\n}\n\nhandleItemKeyDown(event: KeyboardEvent) {\n if (event.code === 'Enter' || event.code === 'Space') {\n this.toggleItemSelection();\n }\n}\n\nhandleSelectedState() {\n if (this.selected) {\n this.emitIfxChipItemSelectEvent(false);\n }\n}\n\n\ncomponentWillLoad() {\n /* Propogating the selected state to the Chip (Parent) component if it is set. */\n this.handleSelectedState();\n}\n\nrender() {\n return (\n <div class={`chip-item chip-item--${this.chipState.size} \n chip-item--${(this.selected && this.chipState.variant) === 'single' ? 'selected' : ''}`} \n tabIndex={0}\n onClick={() => {this.handleItemClick()}}\n onKeyDown={(e) => {this.handleItemKeyDown(e)}}\n role=\"option\"\n aria-selected={this.selected.toString()}> \n {/* Checkbox; renders only in 'multi' variant. */}\n { \n this.chipState.variant === 'multi' &&\n <ifx-checkbox checked={this.selected}\n tabIndex={-1} \n size='s'>\n </ifx-checkbox>\n }\n\n <div class='chip-item__label'> <slot /> </div>\n\n {/* Selected indicator only visible in 'single' variant. */}\n <div class='chip-item__selected-indicator'> \n <ifx-icon icon={`check${this.chipState.size === 'small' ? '12' : '16'}`}> </ifx-icon> \n </div>\n\n </div>\n );\n}\n}"]}