@otto-de/b2b-core-components 1.30.0 → 1.31.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 (474) hide show
  1. package/dist/b2b-core-components/b2b-core-components.esm.js +1 -1
  2. package/dist/b2b-core-components/p-00666ca7.entry.js +1 -0
  3. package/dist/b2b-core-components/p-0a63f5f8.entry.js +1 -0
  4. package/dist/b2b-core-components/{p-9cfba835.entry.js → p-0bf05f33.entry.js} +1 -1
  5. package/dist/b2b-core-components/{p-68e07419.entry.js → p-0edac105.entry.js} +1 -1
  6. package/dist/b2b-core-components/p-0ffc90ee.entry.js +1 -0
  7. package/dist/b2b-core-components/p-168c8684.entry.js +1 -0
  8. package/dist/b2b-core-components/p-19392020.js +1 -0
  9. package/dist/b2b-core-components/p-1a908833.entry.js +1 -0
  10. package/dist/b2b-core-components/{p-a37d6cea.entry.js → p-1dff8b34.entry.js} +1 -1
  11. package/dist/b2b-core-components/p-2d5df8f7.entry.js +1 -0
  12. package/dist/b2b-core-components/p-2dc0c5c0.entry.js +1 -0
  13. package/dist/b2b-core-components/p-318eb15e.entry.js +1 -0
  14. package/dist/b2b-core-components/p-33c01bb2.entry.js +1 -0
  15. package/dist/b2b-core-components/p-375cefbd.entry.js +1 -0
  16. package/dist/b2b-core-components/p-383d0a10.entry.js +1 -0
  17. package/dist/b2b-core-components/{p-08577a40.entry.js → p-400fa973.entry.js} +1 -1
  18. package/dist/b2b-core-components/p-413729d1.entry.js +1 -0
  19. package/dist/b2b-core-components/p-4528e98c.entry.js +1 -0
  20. package/dist/b2b-core-components/p-49bafb74.entry.js +1 -0
  21. package/dist/b2b-core-components/{p-745ad406.entry.js → p-4bc0ec9a.entry.js} +1 -1
  22. package/dist/b2b-core-components/p-564c62d0.entry.js +1 -0
  23. package/dist/b2b-core-components/{p-6040dca2.entry.js → p-6025d667.entry.js} +1 -1
  24. package/dist/b2b-core-components/p-61b2a6ad.js +1 -0
  25. package/dist/b2b-core-components/{p-54d478b6.entry.js → p-661d0249.entry.js} +1 -1
  26. package/dist/b2b-core-components/p-6dd7fd7b.entry.js +1 -0
  27. package/dist/b2b-core-components/p-6ff5114b.entry.js +1 -0
  28. package/dist/b2b-core-components/p-742a18f1.entry.js +1 -0
  29. package/dist/b2b-core-components/{p-23acc468.entry.js → p-781611fb.entry.js} +1 -1
  30. package/dist/b2b-core-components/{p-0847e62e.entry.js → p-7bb6f06e.entry.js} +1 -1
  31. package/dist/b2b-core-components/p-7dd8f3cb.entry.js +1 -0
  32. package/dist/b2b-core-components/p-815d7a53.entry.js +1 -0
  33. package/dist/b2b-core-components/{p-5063e5b7.entry.js → p-850c8e01.entry.js} +1 -1
  34. package/dist/b2b-core-components/{p-e8b1fee4.entry.js → p-86ff8e6c.entry.js} +1 -1
  35. package/dist/b2b-core-components/{p-552f43c1.entry.js → p-9819f622.entry.js} +1 -1
  36. package/dist/b2b-core-components/{p-ccf78e23.entry.js → p-9dde1af0.entry.js} +1 -1
  37. package/dist/b2b-core-components/{p-24c94653.entry.js → p-9f88b476.entry.js} +1 -1
  38. package/dist/b2b-core-components/p-a155219a.entry.js +1 -0
  39. package/dist/b2b-core-components/p-a96c8ba0.entry.js +1 -0
  40. package/dist/b2b-core-components/p-b33059ab.entry.js +1 -0
  41. package/dist/b2b-core-components/p-b5fdf7df.entry.js +1 -0
  42. package/dist/b2b-core-components/p-b6a753e8.js +2 -0
  43. package/dist/b2b-core-components/p-bba0b41b.entry.js +1 -0
  44. package/dist/b2b-core-components/p-be93498d.entry.js +1 -0
  45. package/dist/b2b-core-components/p-bfbe4aff.entry.js +1 -0
  46. package/dist/b2b-core-components/p-c597637e.entry.js +1 -0
  47. package/dist/b2b-core-components/{p-eb01bb4f.entry.js → p-c67bcebc.entry.js} +1 -1
  48. package/dist/b2b-core-components/p-cb4cc427.entry.js +1 -0
  49. package/dist/b2b-core-components/{p-a63dfd99.entry.js → p-d1c8105b.entry.js} +1 -1
  50. package/dist/b2b-core-components/{p-2f9efe3f.entry.js → p-d26ec403.entry.js} +1 -1
  51. package/dist/b2b-core-components/p-d3204d75.entry.js +1 -0
  52. package/dist/b2b-core-components/p-d6457a1d.entry.js +1 -0
  53. package/dist/b2b-core-components/p-db205434.entry.js +1 -0
  54. package/dist/b2b-core-components/p-e1255160.js +1 -0
  55. package/dist/b2b-core-components/p-e520c7cf.entry.js +1 -0
  56. package/dist/b2b-core-components/p-f2fdce36.entry.js +1 -0
  57. package/dist/b2b-core-components/p-f5786cad.entry.js +1 -0
  58. package/dist/b2b-core-components/{p-58fb3508.entry.js → p-f5e9dbf4.entry.js} +1 -1
  59. package/dist/b2b-core-components/p-f9e278da.entry.js +1 -0
  60. package/dist/b2b-core-components/p-fa85955c.entry.js +1 -0
  61. package/dist/b2b-core-components/{p-eb78706f.entry.js → p-fae54521.entry.js} +1 -1
  62. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  63. package/dist/cjs/b2b-alert.cjs.entry.js +13 -15
  64. package/dist/cjs/b2b-anchor.cjs.entry.js +8 -10
  65. package/dist/cjs/b2b-background-box.cjs.entry.js +7 -10
  66. package/dist/cjs/b2b-breadcrumb-item.cjs.entry.js +10 -8
  67. package/dist/cjs/b2b-breadcrumb.cjs.entry.js +10 -9
  68. package/dist/cjs/b2b-button_2.cjs.entry.js +20 -25
  69. package/dist/cjs/b2b-card.cjs.entry.js +8 -8
  70. package/dist/cjs/b2b-checkbox-group.cjs.entry.js +15 -13
  71. package/dist/cjs/b2b-checkbox.cjs.entry.js +22 -19
  72. package/dist/cjs/b2b-chip-component_2.cjs.entry.js +24 -20
  73. package/dist/cjs/b2b-core-components.cjs.js +14 -13
  74. package/dist/cjs/b2b-date-picker-days_5.cjs.entry.js +50 -40
  75. package/dist/cjs/b2b-date-picker.cjs.entry.js +37 -36
  76. package/dist/cjs/b2b-dropdown.cjs.entry.js +26 -24
  77. package/dist/cjs/b2b-flyout-menu-option.cjs.entry.js +10 -8
  78. package/dist/cjs/b2b-flyout-menu.cjs.entry.js +9 -7
  79. package/dist/cjs/b2b-grid-col.cjs.entry.js +6 -4
  80. package/dist/cjs/b2b-grid-row.cjs.entry.js +5 -7
  81. package/dist/cjs/b2b-grid.cjs.entry.js +6 -4
  82. package/dist/cjs/b2b-headline.cjs.entry.js +5 -5
  83. package/dist/cjs/b2b-icon-100.cjs.entry.js +12 -12
  84. package/dist/cjs/b2b-icon-50.cjs.entry.js +10 -9
  85. package/dist/cjs/b2b-icon.cjs.entry.js +12 -12
  86. package/dist/cjs/b2b-input-group_2.cjs.entry.js +24 -24
  87. package/dist/cjs/b2b-input-label.cjs.entry.js +7 -6
  88. package/dist/cjs/b2b-input_2.cjs.entry.js +33 -33
  89. package/dist/cjs/b2b-label.cjs.entry.js +7 -5
  90. package/dist/cjs/b2b-modal.cjs.entry.js +16 -18
  91. package/dist/cjs/b2b-multiselect-dropdown.cjs.entry.js +27 -24
  92. package/dist/cjs/b2b-pagination.cjs.entry.js +12 -13
  93. package/dist/cjs/b2b-paragraph.cjs.entry.js +7 -10
  94. package/dist/cjs/b2b-progress-bar.cjs.entry.js +12 -9
  95. package/dist/cjs/b2b-radio-button.cjs.entry.js +19 -15
  96. package/dist/cjs/b2b-radio-group.cjs.entry.js +17 -13
  97. package/dist/cjs/b2b-required-separator.cjs.entry.js +6 -4
  98. package/dist/cjs/b2b-rounded-icon.cjs.entry.js +10 -12
  99. package/dist/cjs/b2b-scrollable-container.cjs.entry.js +6 -3
  100. package/dist/cjs/b2b-search.cjs.entry.js +10 -9
  101. package/dist/cjs/b2b-separator.cjs.entry.js +6 -4
  102. package/dist/cjs/b2b-shimmer.cjs.entry.js +9 -3
  103. package/dist/cjs/b2b-snackbar.cjs.entry.js +19 -18
  104. package/dist/cjs/b2b-tab-group.cjs.entry.js +6 -6
  105. package/dist/cjs/b2b-tab-panel.cjs.entry.js +6 -3
  106. package/dist/cjs/b2b-tab.cjs.entry.js +8 -8
  107. package/dist/cjs/b2b-table-cell_2.cjs.entry.js +30 -37
  108. package/dist/cjs/b2b-table-row.cjs.entry.js +19 -17
  109. package/dist/cjs/b2b-table-rowgroup.cjs.entry.js +16 -23
  110. package/dist/cjs/b2b-table.cjs.entry.js +10 -13
  111. package/dist/cjs/b2b-textarea.cjs.entry.js +23 -17
  112. package/dist/cjs/b2b-toggle-button.cjs.entry.js +14 -10
  113. package/dist/cjs/b2b-toggle-chip.cjs.entry.js +14 -10
  114. package/dist/cjs/b2b-toggle-group.cjs.entry.js +11 -7
  115. package/dist/cjs/b2b-toggle-switch.cjs.entry.js +15 -13
  116. package/dist/cjs/b2b-tooltip.cjs.entry.js +12 -11
  117. package/dist/cjs/b2b-wizard-icon.cjs.entry.js +9 -8
  118. package/dist/cjs/b2b-wizard-step.cjs.entry.js +8 -9
  119. package/dist/cjs/b2b-wizard.cjs.entry.js +10 -12
  120. package/dist/cjs/index-668808fd.js +2516 -0
  121. package/dist/cjs/loader.cjs.js +6 -3
  122. package/dist/cjs/{request-Dwsj-gbA.js → request-801c6ba1.js} +0 -2
  123. package/dist/cjs/{utils--ZrBSHVe.js → utils-499e9db5.js} +9 -2
  124. package/dist/collection/collection-manifest.json +2 -2
  125. package/dist/collection/components/alert/alert.e2e.js +67 -0
  126. package/dist/collection/components/alert/alert.js +12 -27
  127. package/dist/collection/components/anchor/anchor.js +9 -26
  128. package/dist/collection/components/anchor/anchor.spec.js +68 -0
  129. package/dist/collection/components/background-box/background-box.e2e.js +63 -0
  130. package/dist/collection/components/background-box/background-box.js +8 -26
  131. package/dist/collection/components/background-box/background-box.spec.js +64 -0
  132. package/dist/collection/components/breadcrumb/breadcrumb-item.js +7 -14
  133. package/dist/collection/components/breadcrumb/breadcrumb.e2e.js +50 -0
  134. package/dist/collection/components/breadcrumb/breadcrumb.js +6 -12
  135. package/dist/collection/components/button/button.e2e.js +80 -0
  136. package/dist/collection/components/button/button.js +23 -52
  137. package/dist/collection/components/card/card.e2e.js +110 -0
  138. package/dist/collection/components/card/card.js +5 -14
  139. package/dist/collection/components/card/card.spec.js +32 -0
  140. package/dist/collection/components/checkbox/checkbox.e2e.js +38 -0
  141. package/dist/collection/components/checkbox/checkbox.js +26 -50
  142. package/dist/collection/components/checkbox/checkbox.spec.js +45 -0
  143. package/dist/collection/components/checkbox-group/checkbox-group.e2e.js +83 -0
  144. package/dist/collection/components/checkbox-group/checkbox-group.js +16 -31
  145. package/dist/collection/components/checkbox-group/checkbox-group.spec.js +38 -0
  146. package/dist/collection/components/chip/chip.e2e.js +99 -0
  147. package/dist/collection/components/chip/chip.js +17 -30
  148. package/dist/collection/components/date-picker/date-picker-days-header.js +3 -6
  149. package/dist/collection/components/date-picker/date-picker-days.js +20 -44
  150. package/dist/collection/components/date-picker/date-picker-header.e2e.js +38 -0
  151. package/dist/collection/components/date-picker/date-picker-header.js +10 -15
  152. package/dist/collection/components/date-picker/date-picker-months.e2e.js +39 -0
  153. package/dist/collection/components/date-picker/date-picker-months.js +5 -9
  154. package/dist/collection/components/date-picker/date-picker-years.e2e.js +39 -0
  155. package/dist/collection/components/date-picker/date-picker-years.js +4 -5
  156. package/dist/collection/components/date-picker/date-picker.e2e.js +137 -0
  157. package/dist/collection/components/date-picker/date-picker.js +44 -76
  158. package/dist/collection/components/dropdown/dropdown.e2e.js +89 -0
  159. package/dist/collection/components/dropdown/dropdown.js +27 -46
  160. package/dist/collection/components/dropdown/dropdown.spec.js +52 -0
  161. package/dist/collection/components/flyout-menu/flyout-menu-option.js +7 -14
  162. package/dist/collection/components/flyout-menu/flyout-menu.e2e.js +97 -0
  163. package/dist/collection/components/flyout-menu/flyout-menu.js +5 -8
  164. package/dist/collection/components/grid/column.js +5 -9
  165. package/dist/collection/components/grid/grid.e2e.js +17 -0
  166. package/dist/collection/components/grid/grid.js +2 -5
  167. package/dist/collection/components/grid/row.js +6 -18
  168. package/dist/collection/components/headline/headline.e2e.js +13 -0
  169. package/dist/collection/components/headline/headline.js +3 -12
  170. package/dist/collection/components/headline/headline.spec.js +67 -0
  171. package/dist/collection/components/icon/icon.js +11 -24
  172. package/dist/collection/components/icon/icon.spec.js +21 -0
  173. package/dist/collection/components/icon-100/icon-100.e2e.js +40 -0
  174. package/dist/collection/components/icon-100/icon-100.js +11 -24
  175. package/dist/collection/components/icon-50/icon-50.e2e.js +32 -0
  176. package/dist/collection/components/icon-50/icon-50.js +8 -18
  177. package/dist/collection/components/input/input.e2e.js +84 -0
  178. package/dist/collection/components/input/input.js +33 -64
  179. package/dist/collection/components/input/input.spec.js +45 -0
  180. package/dist/collection/components/input-group/input-group.e2e.js +77 -0
  181. package/dist/collection/components/input-group/input-group.js +9 -17
  182. package/dist/collection/components/input-group/input-group.spec.js +56 -0
  183. package/dist/collection/components/input-label/input-label.e2e.js +10 -0
  184. package/dist/collection/components/input-label/input-label.js +4 -10
  185. package/dist/collection/components/input-list/input-list-option.js +3 -4
  186. package/dist/collection/components/input-list/input-list.e2e.js +242 -0
  187. package/dist/collection/components/input-list/input-list.js +17 -36
  188. package/dist/collection/components/label/label.e2e.js +17 -0
  189. package/dist/collection/components/label/label.js +3 -6
  190. package/dist/collection/components/label/label.spec.js +58 -0
  191. package/dist/collection/components/modal/modal.e2e.js +115 -0
  192. package/dist/collection/components/modal/modal.js +14 -29
  193. package/dist/collection/components/multiselect-dropdown/multiselect-dropdown.e2e.js +74 -0
  194. package/dist/collection/components/multiselect-dropdown/multiselect-dropdown.js +33 -57
  195. package/dist/collection/components/multiselect-dropdown/multiselect-option/multiselect-option.js +8 -15
  196. package/dist/collection/components/pagination/pagination.e2e.js +257 -0
  197. package/dist/collection/components/pagination/pagination.js +10 -22
  198. package/dist/collection/components/pagination/pagination.spec.js +103 -0
  199. package/dist/collection/components/paragraph/paragraph.e2e.js +13 -0
  200. package/dist/collection/components/paragraph/paragraph.js +8 -26
  201. package/dist/collection/components/progress-bar/progress-bar.e2e.js +43 -0
  202. package/dist/collection/components/progress-bar/progress-bar.js +11 -19
  203. package/dist/collection/components/radio/radio.e2e.js +45 -0
  204. package/dist/collection/components/radio/radio.js +20 -37
  205. package/dist/collection/components/radio/radio.spec.js +38 -0
  206. package/dist/collection/components/radio-group/radio-group.e2e.js +86 -0
  207. package/dist/collection/components/radio-group/radio-group.js +19 -34
  208. package/dist/collection/components/radio-group/radio-group.spec.js +31 -0
  209. package/dist/collection/components/required-separator/required-separator.e2e.js +17 -0
  210. package/dist/collection/components/required-separator/required-separator.js +2 -5
  211. package/dist/collection/components/rounded-icon/rounded-icon.js +8 -19
  212. package/dist/collection/components/scrollable-container/scrollable-container.js +1 -1
  213. package/dist/collection/components/search/search.e2e.js +98 -0
  214. package/dist/collection/components/search/search.js +9 -19
  215. package/dist/collection/components/separator/separator.e2e.js +22 -0
  216. package/dist/collection/components/separator/separator.js +2 -5
  217. package/dist/collection/components/shimmer/shimmer.e2e.js +18 -0
  218. package/dist/collection/components/shimmer/shimmer.js +9 -10
  219. package/dist/collection/components/shimmer/shimmer.spec.js +35 -0
  220. package/dist/collection/components/snackbar/snackbar.e2e.js +61 -0
  221. package/dist/collection/components/snackbar/snackbar.js +20 -38
  222. package/dist/collection/components/spinner/spinner.e2e.js +12 -0
  223. package/dist/collection/components/spinner/spinner.js +3 -9
  224. package/dist/collection/components/spinner/spinner.spec.js +41 -0
  225. package/dist/collection/components/tab/tab.e2e.js +35 -0
  226. package/dist/collection/components/tab/tab.js +5 -14
  227. package/dist/collection/components/tab/tab.spec.js +31 -0
  228. package/dist/collection/components/tab-group/tab-group.e2e.js +99 -0
  229. package/dist/collection/components/tab-group/tab-group.js +3 -7
  230. package/dist/collection/components/tab-panel/tab-panel.e2e.js +12 -0
  231. package/dist/collection/components/tab-panel/tab-panel.js +1 -1
  232. package/dist/collection/components/tab-panel/tab-panel.spec.js +10 -0
  233. package/dist/collection/components/table/table-cell/table-cell.js +17 -40
  234. package/dist/collection/components/table/table-header/table-header.js +19 -37
  235. package/dist/collection/components/table/table-row/table-row.js +18 -33
  236. package/dist/collection/components/table/table-rowgroup/table-rowgroup.js +15 -37
  237. package/dist/collection/components/table/table.e2e.js +405 -0
  238. package/dist/collection/components/table/table.js +4 -12
  239. package/dist/collection/components/textarea/textarea.e2e.js +91 -0
  240. package/dist/collection/components/textarea/textarea.js +30 -52
  241. package/dist/collection/components/toggle-button/toggle-button.e2e.js +44 -0
  242. package/dist/collection/components/toggle-button/toggle-button.js +13 -22
  243. package/dist/collection/components/toggle-chip/toggle-chip.e2e.js +47 -0
  244. package/dist/collection/components/toggle-chip/toggle-chip.js +13 -22
  245. package/dist/collection/components/toggle-group/toggle-group.e2e.js +65 -0
  246. package/dist/collection/components/toggle-group/toggle-group.js +7 -10
  247. package/dist/collection/components/toggle-switch/toggle-switch.e2e.js +50 -0
  248. package/dist/collection/components/toggle-switch/toggle-switch.js +14 -25
  249. package/dist/collection/components/tooltip/tooltip.e2e.js +64 -0
  250. package/dist/collection/components/tooltip/tooltip.js +11 -21
  251. package/dist/collection/components/wizard/wizard-step.js +5 -15
  252. package/dist/collection/components/wizard/wizard.e2e.js +149 -0
  253. package/dist/collection/components/wizard/wizard.js +7 -18
  254. package/dist/collection/components/wizard-icon/wizard-icon.js +6 -14
  255. package/dist/collection/docs/config/replace-prop-controls.spec.js +32 -0
  256. package/dist/collection/utils/utils.spec.js +15 -0
  257. package/dist/components/b2b-alert.js +13 -17
  258. package/dist/components/b2b-anchor.js +7 -11
  259. package/dist/components/b2b-background-box.js +6 -11
  260. package/dist/components/b2b-breadcrumb-item.js +9 -9
  261. package/dist/components/b2b-breadcrumb.js +9 -10
  262. package/dist/components/b2b-button.js +1 -1
  263. package/dist/components/b2b-card.js +7 -9
  264. package/dist/components/b2b-checkbox-group.js +15 -15
  265. package/dist/components/b2b-checkbox.js +1 -1
  266. package/dist/components/b2b-chip-component.js +1 -1
  267. package/dist/components/b2b-date-picker-days-header.js +1 -1
  268. package/dist/components/b2b-date-picker-days.js +1 -1
  269. package/dist/components/b2b-date-picker-header.js +1 -1
  270. package/dist/components/b2b-date-picker-months.js +1 -1
  271. package/dist/components/b2b-date-picker-years.js +1 -1
  272. package/dist/components/b2b-date-picker.js +43 -44
  273. package/dist/components/b2b-dropdown.js +26 -26
  274. package/dist/components/b2b-flyout-menu-option.js +9 -9
  275. package/dist/components/b2b-flyout-menu.js +8 -8
  276. package/dist/components/b2b-grid-col.js +5 -5
  277. package/dist/components/b2b-grid-row.js +4 -8
  278. package/dist/components/b2b-grid.js +5 -5
  279. package/dist/components/b2b-headline.js +1 -1
  280. package/dist/components/b2b-icon-100.js +1 -1
  281. package/dist/components/b2b-icon-50.js +13 -11
  282. package/dist/components/b2b-icon.js +16 -15
  283. package/dist/components/b2b-input-group.js +1 -1
  284. package/dist/components/b2b-input-label.js +1 -1
  285. package/dist/components/b2b-input-list-option.js +1 -1
  286. package/dist/components/b2b-input-list.js +1 -1
  287. package/dist/components/b2b-input.js +1 -1
  288. package/dist/components/b2b-label.js +6 -6
  289. package/dist/components/b2b-modal.js +17 -21
  290. package/dist/components/b2b-multiselect-dropdown.js +31 -30
  291. package/dist/components/b2b-multiselect-option.js +1 -1
  292. package/dist/components/b2b-pagination.js +13 -16
  293. package/dist/components/b2b-paragraph.js +6 -11
  294. package/dist/components/b2b-progress-bar.js +11 -10
  295. package/dist/components/b2b-radio-button.js +19 -17
  296. package/dist/components/b2b-radio-group.js +17 -15
  297. package/dist/components/b2b-required-separator.js +6 -6
  298. package/dist/components/b2b-rounded-icon.js +1 -1
  299. package/dist/components/b2b-scrollable-container.js +5 -4
  300. package/dist/components/b2b-search.js +18 -19
  301. package/dist/components/b2b-separator.js +1 -1
  302. package/dist/components/b2b-shimmer.js +8 -4
  303. package/dist/components/b2b-snackbar.js +19 -20
  304. package/dist/components/b2b-spinner.js +1 -1
  305. package/dist/components/b2b-tab-group.js +6 -8
  306. package/dist/components/b2b-tab-panel.js +5 -4
  307. package/dist/components/b2b-tab.js +7 -9
  308. package/dist/components/b2b-table-cell.js +1 -1
  309. package/dist/components/b2b-table-header.js +1 -1
  310. package/dist/components/b2b-table-row.js +23 -23
  311. package/dist/components/b2b-table-rowgroup.js +15 -24
  312. package/dist/components/b2b-table.js +9 -14
  313. package/dist/components/b2b-textarea.js +23 -19
  314. package/dist/components/b2b-toggle-button.js +13 -11
  315. package/dist/components/b2b-toggle-chip.js +13 -11
  316. package/dist/components/b2b-toggle-group.js +10 -8
  317. package/dist/components/b2b-toggle-switch.js +14 -14
  318. package/dist/components/b2b-tooltip.js +11 -12
  319. package/dist/components/b2b-wizard-icon.js +1 -1
  320. package/dist/components/b2b-wizard-step.js +10 -13
  321. package/dist/components/b2b-wizard.js +9 -13
  322. package/dist/components/{p-CE7t2D9r.js → button.js} +17 -23
  323. package/dist/components/{p-CLYM9t6v.js → checkbox.js} +22 -21
  324. package/dist/components/{p-ClL49BcQ.js → chip.js} +15 -13
  325. package/dist/components/{p-FI-HbnMh.js → date-picker-days-header.js} +7 -7
  326. package/dist/components/{p-0Vy4494O.js → date-picker-days.js} +24 -21
  327. package/dist/components/{p-C_U38W4s.js → date-picker-header.js} +17 -15
  328. package/dist/components/{p-1ZoTG5p9.js → date-picker-months.js} +9 -8
  329. package/dist/components/{p-dMZsx2Fh.js → date-picker-years.js} +8 -6
  330. package/dist/components/{p-Bo-B8kdb.js → headline.js} +4 -6
  331. package/dist/components/{p-B9RvgUY3.js → icon-100.js} +15 -14
  332. package/dist/components/index.js +1 -1929
  333. package/dist/components/{p-TB2jJFV6.js → input-group.js} +9 -8
  334. package/dist/components/{p-Zg4AtKjq.js → input-label.js} +6 -7
  335. package/dist/components/{p-QTGqu3he.js → input-list-option.js} +7 -5
  336. package/dist/components/{p-BacBJzW_.js → input-list.js} +21 -24
  337. package/dist/components/{p-CuUquHzL.js → input.js} +28 -32
  338. package/dist/components/{p-B7bjXySI.js → multiselect-option.js} +12 -12
  339. package/dist/{esm/request-B8W50WyB.js → components/request.js} +5 -2
  340. package/dist/components/{p-i758rnm2.js → rounded-icon.js} +9 -13
  341. package/dist/components/{p-DO7N8IC0.js → separator.js} +5 -5
  342. package/dist/components/{p-3cu_Madt.js → spinner.js} +5 -6
  343. package/dist/components/{p-9OQH2pET.js → table-cell.js} +15 -23
  344. package/dist/components/{p-BVLpVPNb.js → table-header.js} +17 -18
  345. package/dist/{esm/utils-BA6KE1BD.js → components/utils.js} +10 -3
  346. package/dist/components/{p-N6d2-6pL.js → wizard-icon.js} +10 -11
  347. package/dist/custom-elements.json +0 -24
  348. package/dist/esm/app-globals-0f993ce5.js +3 -0
  349. package/dist/esm/b2b-alert.entry.js +11 -15
  350. package/dist/esm/b2b-anchor.entry.js +6 -10
  351. package/dist/esm/b2b-background-box.entry.js +5 -10
  352. package/dist/esm/b2b-breadcrumb-item.entry.js +8 -8
  353. package/dist/esm/b2b-breadcrumb.entry.js +8 -9
  354. package/dist/esm/b2b-button_2.entry.js +18 -25
  355. package/dist/esm/b2b-card.entry.js +6 -8
  356. package/dist/esm/b2b-checkbox-group.entry.js +13 -13
  357. package/dist/esm/b2b-checkbox.entry.js +20 -19
  358. package/dist/esm/b2b-chip-component_2.entry.js +22 -20
  359. package/dist/esm/b2b-core-components.js +12 -12
  360. package/dist/esm/b2b-date-picker-days_5.entry.js +48 -40
  361. package/dist/esm/b2b-date-picker.entry.js +35 -36
  362. package/dist/esm/b2b-dropdown.entry.js +24 -24
  363. package/dist/esm/b2b-flyout-menu-option.entry.js +8 -8
  364. package/dist/esm/b2b-flyout-menu.entry.js +7 -7
  365. package/dist/esm/b2b-grid-col.entry.js +4 -4
  366. package/dist/esm/b2b-grid-row.entry.js +3 -7
  367. package/dist/esm/b2b-grid.entry.js +4 -4
  368. package/dist/esm/b2b-headline.entry.js +3 -5
  369. package/dist/esm/b2b-icon-100.entry.js +10 -12
  370. package/dist/esm/b2b-icon-50.entry.js +8 -9
  371. package/dist/esm/b2b-icon.entry.js +10 -12
  372. package/dist/esm/b2b-input-group_2.entry.js +22 -24
  373. package/dist/esm/b2b-input-label.entry.js +5 -6
  374. package/dist/esm/b2b-input_2.entry.js +31 -33
  375. package/dist/esm/b2b-label.entry.js +5 -5
  376. package/dist/esm/b2b-modal.entry.js +14 -18
  377. package/dist/esm/b2b-multiselect-dropdown.entry.js +25 -24
  378. package/dist/esm/b2b-pagination.entry.js +10 -13
  379. package/dist/esm/b2b-paragraph.entry.js +5 -10
  380. package/dist/esm/b2b-progress-bar.entry.js +10 -9
  381. package/dist/esm/b2b-radio-button.entry.js +17 -15
  382. package/dist/esm/b2b-radio-group.entry.js +15 -13
  383. package/dist/esm/b2b-required-separator.entry.js +4 -4
  384. package/dist/esm/b2b-rounded-icon.entry.js +8 -12
  385. package/dist/esm/b2b-scrollable-container.entry.js +4 -3
  386. package/dist/esm/b2b-search.entry.js +8 -9
  387. package/dist/esm/b2b-separator.entry.js +4 -4
  388. package/dist/esm/b2b-shimmer.entry.js +7 -3
  389. package/dist/esm/b2b-snackbar.entry.js +17 -18
  390. package/dist/esm/b2b-tab-group.entry.js +4 -6
  391. package/dist/esm/b2b-tab-panel.entry.js +4 -3
  392. package/dist/esm/b2b-tab.entry.js +6 -8
  393. package/dist/esm/b2b-table-cell_2.entry.js +28 -37
  394. package/dist/esm/b2b-table-row.entry.js +17 -17
  395. package/dist/esm/b2b-table-rowgroup.entry.js +14 -23
  396. package/dist/esm/b2b-table.entry.js +8 -13
  397. package/dist/esm/b2b-textarea.entry.js +21 -17
  398. package/dist/esm/b2b-toggle-button.entry.js +12 -10
  399. package/dist/esm/b2b-toggle-chip.entry.js +12 -10
  400. package/dist/esm/b2b-toggle-group.entry.js +9 -7
  401. package/dist/esm/b2b-toggle-switch.entry.js +13 -13
  402. package/dist/esm/b2b-tooltip.entry.js +10 -11
  403. package/dist/esm/b2b-wizard-icon.entry.js +7 -8
  404. package/dist/esm/b2b-wizard-step.entry.js +6 -9
  405. package/dist/esm/b2b-wizard.entry.js +8 -12
  406. package/dist/esm/index-ab9eb36d.js +2487 -0
  407. package/dist/esm/loader.js +4 -3
  408. package/dist/esm/polyfills/core-js.js +11 -0
  409. package/dist/esm/polyfills/dom.js +79 -0
  410. package/dist/esm/polyfills/es5-html-element.js +1 -0
  411. package/dist/esm/polyfills/index.js +34 -0
  412. package/dist/esm/polyfills/system.js +6 -0
  413. package/dist/{components/p-CPfvpKl5.js → esm/request-1d048f8a.js} +0 -2
  414. package/dist/{components/p-BA6KE1BD.js → esm/utils-868299de.js} +10 -3
  415. package/dist/loader/cdn.js +3 -1
  416. package/dist/loader/index.cjs.js +3 -1
  417. package/dist/loader/index.d.ts +0 -3
  418. package/dist/loader/index.es2017.js +3 -1
  419. package/dist/loader/index.js +3 -1
  420. package/dist/loader/package.json +11 -0
  421. package/dist/types/components.d.ts +0 -413
  422. package/dist/types/stencil-public-runtime.d.ts +11 -32
  423. package/dist/web-types.json +8 -7
  424. package/package.json +10 -11
  425. package/dist/b2b-core-components/p-0002d8d5.entry.js +0 -1
  426. package/dist/b2b-core-components/p-0386f660.entry.js +0 -1
  427. package/dist/b2b-core-components/p-0a08e2c8.entry.js +0 -1
  428. package/dist/b2b-core-components/p-0d8cc4eb.entry.js +0 -1
  429. package/dist/b2b-core-components/p-197dc9c0.entry.js +0 -1
  430. package/dist/b2b-core-components/p-220b8c79.entry.js +0 -1
  431. package/dist/b2b-core-components/p-2933f053.entry.js +0 -1
  432. package/dist/b2b-core-components/p-3a9f7db8.entry.js +0 -1
  433. package/dist/b2b-core-components/p-3e0919b3.entry.js +0 -1
  434. package/dist/b2b-core-components/p-42d9f79d.entry.js +0 -1
  435. package/dist/b2b-core-components/p-4bb42493.entry.js +0 -1
  436. package/dist/b2b-core-components/p-4c550170.entry.js +0 -1
  437. package/dist/b2b-core-components/p-50559efd.entry.js +0 -1
  438. package/dist/b2b-core-components/p-55db3d57.entry.js +0 -1
  439. package/dist/b2b-core-components/p-6e7abebc.entry.js +0 -1
  440. package/dist/b2b-core-components/p-7b75a0a4.entry.js +0 -1
  441. package/dist/b2b-core-components/p-7cbe33ef.entry.js +0 -1
  442. package/dist/b2b-core-components/p-8544b7e1.entry.js +0 -1
  443. package/dist/b2b-core-components/p-88037ad2.entry.js +0 -1
  444. package/dist/b2b-core-components/p-930425a1.entry.js +0 -1
  445. package/dist/b2b-core-components/p-B9l4NfeG.js +0 -1
  446. package/dist/b2b-core-components/p-BA6KE1BD.js +0 -1
  447. package/dist/b2b-core-components/p-a1a4efd4.entry.js +0 -1
  448. package/dist/b2b-core-components/p-a61eecf7.entry.js +0 -1
  449. package/dist/b2b-core-components/p-ada918c2.entry.js +0 -1
  450. package/dist/b2b-core-components/p-bb020c1c.entry.js +0 -1
  451. package/dist/b2b-core-components/p-bbb4c6f3.entry.js +0 -1
  452. package/dist/b2b-core-components/p-c0af184a.entry.js +0 -1
  453. package/dist/b2b-core-components/p-c40f7176.entry.js +0 -1
  454. package/dist/b2b-core-components/p-c6043d6a.entry.js +0 -1
  455. package/dist/b2b-core-components/p-c649c112.entry.js +0 -1
  456. package/dist/b2b-core-components/p-c69e9220.entry.js +0 -1
  457. package/dist/b2b-core-components/p-d1b46208.entry.js +0 -1
  458. package/dist/b2b-core-components/p-d2d40ae5.entry.js +0 -1
  459. package/dist/b2b-core-components/p-e8e156a4.entry.js +0 -1
  460. package/dist/b2b-core-components/p-ebcc2cce.entry.js +0 -1
  461. package/dist/b2b-core-components/p-edea84cc.entry.js +0 -1
  462. package/dist/b2b-core-components/p-f831e483.entry.js +0 -1
  463. package/dist/b2b-core-components/p-fdfb094e.entry.js +0 -1
  464. package/dist/b2b-core-components/p-zl-jO_Vq.js +0 -2
  465. package/dist/cjs/index-CIrNIFXs.js +0 -2406
  466. package/dist/esm/index-zl-jO_Vq.js +0 -2378
  467. /package/dist/b2b-core-components/{p-B8geQC3V.js → p-48608c23.js} +0 -0
  468. /package/dist/b2b-core-components/{p-BgHEmQ44.js → p-c500d93c.js} +0 -0
  469. /package/dist/cjs/{date-picker-util-VbL9p5ie.js → date-picker-util-51276571.js} +0 -0
  470. /package/dist/cjs/{wizard.types-uAv3s7tK.js → wizard.types-40a1058c.js} +0 -0
  471. /package/dist/components/{p-BsfreBZY.js → date-picker.types.js} +0 -0
  472. /package/dist/components/{p-BgHEmQ44.js → wizard.types.js} +0 -0
  473. /package/dist/esm/{date-picker-util-B8geQC3V.js → date-picker-util-44201ca6.js} +0 -0
  474. /package/dist/esm/{wizard.types-BgHEmQ44.js → wizard.types-40ae9b73.js} +0 -0
@@ -1,10 +1,6 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  export class ProgressBarComponent {
3
3
  constructor() {
4
- /** Whether the label should be displayed below or on the side of the progress bar. */
5
- this.labelType = 'below';
6
- /** Whether the label should be displayed on the right or left of the progress bar. */
7
- this.labelPosition = 'left';
8
4
  this.getProgress = () => {
9
5
  if (isNaN(this.progress) || this.progress < 0) {
10
6
  return 0;
@@ -14,14 +10,18 @@ export class ProgressBarComponent {
14
10
  }
15
11
  return this.progress;
16
12
  };
13
+ this.progress = undefined;
14
+ this.label = undefined;
15
+ this.labelType = 'below';
16
+ this.labelPosition = 'left';
17
17
  }
18
18
  render() {
19
19
  const labelExists = this.label !== undefined && this.label !== '';
20
- return (h(Host, { key: 'b0060404440e78b3a2331df11a2d56d4071c7e19' }, h("div", { key: '031bd2160763920981cd6491bc1099636f3c21fd', class: {
20
+ return (h(Host, { key: '2c21a98038eb5f9139de509825204d5536b28186' }, h("div", { key: '53b8271100890ccbf94e6452f6811f10edbbe268', class: {
21
21
  [`b2b-progress-bar__${this.labelPosition}-${this.labelType}`]: true,
22
- } }, h("div", { key: '945e5c7bf601cd8d34b0cd095245a8cc6b801cea', class: "b2b-progress-bar__wrapper" }, h("div", { key: '93086dd441221a8ff681d9de2da8ff2f2d4ae0b5', class: "b2b-progress-bar__progress", style: {
22
+ } }, h("div", { key: '2925cf1b343596249f110944f946ecfc01258556', class: "b2b-progress-bar__wrapper" }, h("div", { key: '32a8f9c88a507c697c45513037a4473736585efa', class: "b2b-progress-bar__progress", style: {
23
23
  width: `${this.getProgress()}%`,
24
- } })), h("div", { key: '82ce3cabe0897878d2715ca96a07ba8347f42590', class: {
24
+ } })), h("div", { key: 'e91835897125808aedeaed4cc4b7eda49eab2383', class: {
25
25
  'b2b-progress-bar__label': labelExists,
26
26
  'b2b-progress-bar__label-none': !labelExists,
27
27
  [`b2b-progress-bar__label__${this.labelPosition}-${this.labelType}`]: labelExists,
@@ -43,7 +43,6 @@ export class ProgressBarComponent {
43
43
  return {
44
44
  "progress": {
45
45
  "type": "number",
46
- "attribute": "progress",
47
46
  "mutable": false,
48
47
  "complexType": {
49
48
  "original": "number",
@@ -56,13 +55,11 @@ export class ProgressBarComponent {
56
55
  "tags": [],
57
56
  "text": "The percentage of progress from 0 to 100."
58
57
  },
59
- "getter": false,
60
- "setter": false,
58
+ "attribute": "progress",
61
59
  "reflect": false
62
60
  },
63
61
  "label": {
64
62
  "type": "string",
65
- "attribute": "label",
66
63
  "mutable": false,
67
64
  "complexType": {
68
65
  "original": "string",
@@ -75,13 +72,11 @@ export class ProgressBarComponent {
75
72
  "tags": [],
76
73
  "text": "The label of the progress bar."
77
74
  },
78
- "getter": false,
79
- "setter": false,
75
+ "attribute": "label",
80
76
  "reflect": false
81
77
  },
82
78
  "labelType": {
83
79
  "type": "string",
84
- "attribute": "label-type",
85
80
  "mutable": false,
86
81
  "complexType": {
87
82
  "original": "'below' | 'side'",
@@ -94,14 +89,12 @@ export class ProgressBarComponent {
94
89
  "tags": [],
95
90
  "text": "Whether the label should be displayed below or on the side of the progress bar."
96
91
  },
97
- "getter": false,
98
- "setter": false,
92
+ "attribute": "label-type",
99
93
  "reflect": false,
100
94
  "defaultValue": "'below'"
101
95
  },
102
96
  "labelPosition": {
103
97
  "type": "string",
104
- "attribute": "label-position",
105
98
  "mutable": false,
106
99
  "complexType": {
107
100
  "original": "'left' | 'right'",
@@ -114,8 +107,7 @@ export class ProgressBarComponent {
114
107
  "tags": [],
115
108
  "text": "Whether the label should be displayed on the right or left of the progress bar."
116
109
  },
117
- "getter": false,
118
- "setter": false,
110
+ "attribute": "label-position",
119
111
  "reflect": false,
120
112
  "defaultValue": "'left'"
121
113
  }
@@ -0,0 +1,45 @@
1
+ import { newE2EPage } from "@stencil/core/testing";
2
+ describe('b2b-radio', () => {
3
+ let page;
4
+ beforeEach(async () => {
5
+ page = await newE2EPage();
6
+ await page.setContent('<b2b-radio-button label="test" value="one"></b2b-radio-button>');
7
+ });
8
+ it('renders', async () => {
9
+ const element = await page.find('b2b-radio-button');
10
+ expect(element).toBeDefined();
11
+ });
12
+ it('emits when clicked', async () => {
13
+ const spy = await page.spyOnEvent('b2b-change');
14
+ const element = await page.find('b2b-radio-button');
15
+ await element.click();
16
+ await page.waitForChanges();
17
+ expect(spy).toHaveReceivedEvent();
18
+ });
19
+ it('should not emit when radio is already selected', async () => {
20
+ const spy = await page.spyOnEvent('b2b-change');
21
+ const element = await page.find('b2b-radio-button');
22
+ await element.click();
23
+ await element.click();
24
+ await page.waitForChanges();
25
+ expect(spy).toHaveReceivedEventTimes(1);
26
+ });
27
+ it('should not emit when radio is disabled', async () => {
28
+ const spy = await page.spyOnEvent('b2b-change');
29
+ const element = await page.find('b2b-radio-button');
30
+ await element.setProperty('disabled', true);
31
+ await page.waitForChanges();
32
+ await element.click();
33
+ await page.waitForChanges();
34
+ expect(spy).not.toHaveReceivedEvent();
35
+ });
36
+ it('should use label slot if provided', async () => {
37
+ const slotPage = await newE2EPage();
38
+ await slotPage.setContent(`
39
+ <b2b-radio-button value="one">
40
+ <span slot="label">Custom label</span>
41
+ </b2b-radio-button>`);
42
+ const element = await slotPage.find('span');
43
+ expect(element).toEqualText('Custom label');
44
+ });
45
+ });
@@ -1,14 +1,6 @@
1
1
  import { h, Host, } from "@stencil/core";
2
2
  export class B2bRadioButtonComponent {
3
3
  constructor() {
4
- /** Adds an asterisk at the end of the label to signify that the field is required. */
5
- this.required = false;
6
- /** Whether or not the radio button is currently checked. Per default it is false. */
7
- this.checked = false;
8
- /** Whether or not the radio button is currently disabled. Per default it is false. */
9
- this.disabled = false;
10
- /** Whether or not the radio button should be rendered with error styles. Per default it is false. */
11
- this.invalid = false;
12
4
  this.handleFormData = (event) => {
13
5
  if (this.name != undefined && this.checked) {
14
6
  const value = this.value || '';
@@ -41,6 +33,15 @@ export class B2bRadioButtonComponent {
41
33
  this.onFocus = () => {
42
34
  this.b2bFocus.emit();
43
35
  };
36
+ this.label = undefined;
37
+ this.required = false;
38
+ this.name = undefined;
39
+ this.checked = false;
40
+ this.disabled = false;
41
+ this.invalid = false;
42
+ this.value = undefined;
43
+ this.hint = undefined;
44
+ this.error = undefined;
44
45
  }
45
46
  connectedCallback() {
46
47
  const form = this.host.closest('form');
@@ -52,11 +53,11 @@ export class B2bRadioButtonComponent {
52
53
  return Array.from(document.querySelectorAll(`b2b-radio-button[name="${this.name}"]`)).filter((radio) => radio.value !== this.value);
53
54
  }
54
55
  render() {
55
- return (h(Host, { key: 'fd1084fd2df24d7de2727441f69c03f9aa497f22', onClick: this.onClick }, h("div", { key: 'a4d0e872905049f686a1d70a883aba37bc7b3823', class: {
56
+ return (h(Host, { key: '28bb8bc8c3741839657f687abed7314c8cdcf7bf', onClick: this.onClick }, h("div", { key: '6d865dff87760dcaef8be42268e73f6d90ddb1c6', class: {
56
57
  'b2b-radio': true,
57
58
  'b2b-radio--error': this.invalid && !this.disabled,
58
59
  'b2b-radio--disabled': this.disabled,
59
- } }, h("div", { key: 'e334d57a546380ae10aad7bd6c8c1688650d5107', class: "b2b-radio-items" }, h("input", { key: '20b59620275ef3c93ecec45c4c84fd8098ce47dc', class: "b2b-radio-input", "aria-labelledby": this.name, type: "radio", checked: this.checked, disabled: this.disabled, name: this.name, onBlur: this.onBlur, onFocus: this.onFocus, value: this.value }), h("b2b-input-label", { key: '71e1468f0d8046d9c80cb0bb159081a772e2b871', id: this.name, required: this.required, disabled: this.disabled }, h("slot", { key: '00b2e6022ff3cc78ef450d7a7611f08e6a5d0adb', name: "label" }, this.label))), (this.hint !== undefined && !this.invalid) ||
60
+ } }, h("div", { key: '6c5ca53c8d308e381d26c8802cb8521d6e987256', class: "b2b-radio-items" }, h("input", { key: 'a3ed2ab8d4defc593bcc69b5058e9d6fb674a626', class: "b2b-radio-input", "aria-labelledby": this.name, type: "radio", checked: this.checked, disabled: this.disabled, name: this.name, onBlur: this.onBlur, onFocus: this.onFocus, value: this.value }), h("b2b-input-label", { key: '69cb16d121d9283cc95ffbb0642a18d9744deece', id: this.name, required: this.required, disabled: this.disabled }, h("slot", { key: 'db1e57a9e65a52df671fa3ff35f1a9f372eca47b', name: "label" }, this.label))), (this.hint !== undefined && !this.invalid) ||
60
61
  (this.hint !== undefined && this.disabled) ? (h("span", null, this.hint)) : (''), this.error !== undefined && this.invalid && !this.disabled ? (h("span", null, this.error)) : (''))));
61
62
  }
62
63
  static get is() { return "b2b-radio-button"; }
@@ -75,7 +76,6 @@ export class B2bRadioButtonComponent {
75
76
  return {
76
77
  "label": {
77
78
  "type": "string",
78
- "attribute": "label",
79
79
  "mutable": false,
80
80
  "complexType": {
81
81
  "original": "string",
@@ -88,13 +88,11 @@ export class B2bRadioButtonComponent {
88
88
  "tags": [],
89
89
  "text": "The label of the radio button. This is required"
90
90
  },
91
- "getter": false,
92
- "setter": false,
91
+ "attribute": "label",
93
92
  "reflect": false
94
93
  },
95
94
  "required": {
96
95
  "type": "boolean",
97
- "attribute": "required",
98
96
  "mutable": false,
99
97
  "complexType": {
100
98
  "original": "boolean",
@@ -107,14 +105,12 @@ export class B2bRadioButtonComponent {
107
105
  "tags": [],
108
106
  "text": "Adds an asterisk at the end of the label to signify that the field is required."
109
107
  },
110
- "getter": false,
111
- "setter": false,
108
+ "attribute": "required",
112
109
  "reflect": true,
113
110
  "defaultValue": "false"
114
111
  },
115
112
  "name": {
116
113
  "type": "string",
117
- "attribute": "name",
118
114
  "mutable": false,
119
115
  "complexType": {
120
116
  "original": "string",
@@ -127,13 +123,11 @@ export class B2bRadioButtonComponent {
127
123
  "tags": [],
128
124
  "text": "The name of the radio button. Use it to group radio buttons together and assign the label to the input element for better accessibility. This is required."
129
125
  },
130
- "getter": false,
131
- "setter": false,
126
+ "attribute": "name",
132
127
  "reflect": true
133
128
  },
134
129
  "checked": {
135
130
  "type": "boolean",
136
- "attribute": "checked",
137
131
  "mutable": true,
138
132
  "complexType": {
139
133
  "original": "boolean",
@@ -146,14 +140,12 @@ export class B2bRadioButtonComponent {
146
140
  "tags": [],
147
141
  "text": "Whether or not the radio button is currently checked. Per default it is false."
148
142
  },
149
- "getter": false,
150
- "setter": false,
143
+ "attribute": "checked",
151
144
  "reflect": true,
152
145
  "defaultValue": "false"
153
146
  },
154
147
  "disabled": {
155
148
  "type": "boolean",
156
- "attribute": "disabled",
157
149
  "mutable": false,
158
150
  "complexType": {
159
151
  "original": "boolean",
@@ -166,14 +158,12 @@ export class B2bRadioButtonComponent {
166
158
  "tags": [],
167
159
  "text": "Whether or not the radio button is currently disabled. Per default it is false."
168
160
  },
169
- "getter": false,
170
- "setter": false,
161
+ "attribute": "disabled",
171
162
  "reflect": true,
172
163
  "defaultValue": "false"
173
164
  },
174
165
  "invalid": {
175
166
  "type": "boolean",
176
- "attribute": "invalid",
177
167
  "mutable": false,
178
168
  "complexType": {
179
169
  "original": "boolean",
@@ -186,14 +176,12 @@ export class B2bRadioButtonComponent {
186
176
  "tags": [],
187
177
  "text": "Whether or not the radio button should be rendered with error styles. Per default it is false."
188
178
  },
189
- "getter": false,
190
- "setter": false,
179
+ "attribute": "invalid",
191
180
  "reflect": false,
192
181
  "defaultValue": "false"
193
182
  },
194
183
  "value": {
195
184
  "type": "string",
196
- "attribute": "value",
197
185
  "mutable": false,
198
186
  "complexType": {
199
187
  "original": "string",
@@ -206,13 +194,11 @@ export class B2bRadioButtonComponent {
206
194
  "tags": [],
207
195
  "text": "The value of the radio button. This will be emitted when the radio button is clicked."
208
196
  },
209
- "getter": false,
210
- "setter": false,
197
+ "attribute": "value",
211
198
  "reflect": true
212
199
  },
213
200
  "hint": {
214
201
  "type": "string",
215
- "attribute": "hint",
216
202
  "mutable": false,
217
203
  "complexType": {
218
204
  "original": "string",
@@ -225,13 +211,11 @@ export class B2bRadioButtonComponent {
225
211
  "tags": [],
226
212
  "text": "A hint to give additional information on the radio button."
227
213
  },
228
- "getter": false,
229
- "setter": false,
214
+ "attribute": "hint",
230
215
  "reflect": false
231
216
  },
232
217
  "error": {
233
218
  "type": "string",
234
- "attribute": "error",
235
219
  "mutable": false,
236
220
  "complexType": {
237
221
  "original": "string",
@@ -244,8 +228,7 @@ export class B2bRadioButtonComponent {
244
228
  "tags": [],
245
229
  "text": "An error text. It will only show if invalid is set to true."
246
230
  },
247
- "getter": false,
248
- "setter": false,
231
+ "attribute": "error",
249
232
  "reflect": false
250
233
  }
251
234
  };
@@ -0,0 +1,38 @@
1
+ import { newSpecPage } from "@stencil/core/testing";
2
+ import { h } from "@stencil/core";
3
+ import { B2bRadioButtonComponent } from "./radio";
4
+ it('should render the radio button', async () => {
5
+ const page = await newSpecPage({
6
+ components: [B2bRadioButtonComponent],
7
+ template: () => (h("b2b-radio-button", { label: "test", name: "radio-test" })),
8
+ });
9
+ expect(page.root).toMatchSnapshot();
10
+ });
11
+ it('should disable the radio button', async () => {
12
+ const page = await newSpecPage({
13
+ components: [B2bRadioButtonComponent],
14
+ template: () => (h("b2b-radio-button", { label: "test", name: "radio-test", disabled: true })),
15
+ });
16
+ expect(page.root).toMatchSnapshot();
17
+ });
18
+ it('should render a hint message if a hint string is specified', async () => {
19
+ const page = await newSpecPage({
20
+ components: [B2bRadioButtonComponent],
21
+ template: () => (h("b2b-radio-button", { label: "test", name: "radio-test", hint: "this is a hint" })),
22
+ });
23
+ expect(page.root).toMatchSnapshot();
24
+ });
25
+ it('should apply an error style if it is marked as invalid.', async () => {
26
+ const page = await newSpecPage({
27
+ components: [B2bRadioButtonComponent],
28
+ template: () => (h("b2b-radio-button", { label: "test", name: "radio-test", error: "this is an error", invalid: true })),
29
+ });
30
+ expect(page.root).toMatchSnapshot();
31
+ });
32
+ it('should render an error message if an error is specified and it is marked as invalid', async () => {
33
+ const page = await newSpecPage({
34
+ components: [B2bRadioButtonComponent],
35
+ template: () => (h("b2b-radio-button", { label: "test", name: "radio-test", error: "this is an error", invalid: true })),
36
+ });
37
+ expect(page.root).toMatchSnapshot();
38
+ });
@@ -0,0 +1,86 @@
1
+ import { newE2EPage } from "@stencil/core/testing";
2
+ describe('B2B-Radio-Group', () => {
3
+ let page;
4
+ beforeEach(async () => {
5
+ page = await newE2EPage();
6
+ await page.setContent(`
7
+ <b2b-radio-group label="test label" name="test-group">
8
+ <b2b-radio-button label="one" value="one" name="test-group" id="one" hint="test" error="test"></b2b-radio-button>
9
+ <b2b-radio-button label="two" value="two" name="test-group" id="two"</b2b-radio-button>
10
+ </b2b-radio-group>
11
+ `);
12
+ });
13
+ it('should render the radio group component', async () => {
14
+ const element = await page.find('b2b-radio-group');
15
+ expect(element).not.toBeNull();
16
+ });
17
+ it('should have all radio buttons unchecked by default and check a radio button', async () => {
18
+ let element = await page.find('b2b-radio-button');
19
+ expect(element).not.toHaveAttribute('checked');
20
+ element.setAttribute('checked', true);
21
+ await page.waitForChanges();
22
+ element = await page.find('b2b-radio-button');
23
+ expect(element).toHaveAttribute('checked');
24
+ });
25
+ it('should receive a custom event', async () => {
26
+ const element = await page.find('b2b-radio-button >>> div > input');
27
+ expect(element).not.toBeNull();
28
+ const b2bChange = await page.spyOnEvent('b2b-change');
29
+ await element.click();
30
+ await page.waitForChanges();
31
+ expect(b2bChange).toHaveReceivedEvent();
32
+ });
33
+ it('should emit a custom event when a radio button is checked', async () => {
34
+ const element = await page.find('b2b-radio-button');
35
+ expect(element).not.toBeNull();
36
+ const b2bGroupChange = await page.spyOnEvent('b2b-group-change');
37
+ await element.click();
38
+ await page.waitForChanges();
39
+ expect(b2bGroupChange).toHaveReceivedEvent();
40
+ });
41
+ it('should not emit an event when the checked radio is already selected', async () => {
42
+ const firstRadio = await page.find('b2b-radio-button[label="one"]');
43
+ const changeSpy = await page.spyOnEvent('b2b-group-change');
44
+ await firstRadio.click();
45
+ await firstRadio.click();
46
+ await page.waitForChanges();
47
+ expect(changeSpy).toHaveReceivedEventTimes(1);
48
+ });
49
+ it('should disable all radio when the property is specified', async () => {
50
+ const parentElement = await page.find('b2b-radio-group');
51
+ let element = await page.find('b2b-radio-button >>> .b2b-radio');
52
+ expect(element).not.toHaveClass('b2b-radio--disabled');
53
+ parentElement.setProperty('disabled', true);
54
+ await page.waitForChanges();
55
+ element = await page.find('b2b-radio-button >>> .b2b-radio');
56
+ expect(element).toHaveClass('b2b-radio--disabled');
57
+ });
58
+ it('should set all radio buttons to invalid when the property is specified', async () => {
59
+ const parentElement = await page.find('b2b-radio-group');
60
+ let element = await page.find('b2b-radio-button >>> .b2b-radio');
61
+ expect(element).not.toHaveClass('b2b-radio--error');
62
+ parentElement.setProperty('invalid', true);
63
+ await page.waitForChanges();
64
+ element = await page.find('b2b-radio-button >>> .b2b-radio');
65
+ expect(element).toHaveClass('b2b-radio--error');
66
+ });
67
+ it('should remove all children hint texts when the component is rendered', async () => {
68
+ const element = await page.find('b2b-radio-button');
69
+ const error = element.error;
70
+ const hint = element.hint;
71
+ expect(hint).not.toBeDefined;
72
+ expect(error).not.toBeDefined;
73
+ });
74
+ it('should use label slot if provided ', async () => {
75
+ const slotPage = await newE2EPage();
76
+ await slotPage.setContent(`
77
+ <b2b-radio-group name="test-group">
78
+ <span slot="label">Custom label</span>
79
+ <b2b-radio-button label="one" value="one" name="test-group" id="one" hint="test" error="test"></b2b-radio-button>
80
+ <b2b-radio-button label="two" value="two" name="test-group" id="two"</b2b-radio-button>
81
+ </b2b-radio-group>
82
+ `);
83
+ const element = await slotPage.find('span');
84
+ expect(element).toEqualText('Custom label');
85
+ });
86
+ });
@@ -1,14 +1,6 @@
1
1
  import { h, Host, } from "@stencil/core";
2
2
  export class RadioButtonGroupComponent {
3
3
  constructor() {
4
- /** Adds an asterisk at the end of the label to signify that the field is required. */
5
- this.required = false;
6
- /** The alignment of the radio group. Can be vertical or horizontal, per default it is vertical. */
7
- this.alignment = 'vertical';
8
- /** Whether or not the radio group is disabled as a whole. Per default it is false. */
9
- this.disabled = false;
10
- /** Whether or not the radio group is invalid and should be rendered with error styles as a whole. Per default it is false. */
11
- this.invalid = false;
12
4
  this.toggleAllDisabled = () => {
13
5
  let nodes = this.getChildNodes();
14
6
  if (this.disabled) {
@@ -45,6 +37,15 @@ export class RadioButtonGroupComponent {
45
37
  node.hint = undefined;
46
38
  });
47
39
  };
40
+ this.name = undefined;
41
+ this.label = undefined;
42
+ this.required = false;
43
+ this.alignment = 'vertical';
44
+ this.disabled = false;
45
+ this.invalid = false;
46
+ this.hint = undefined;
47
+ this.error = undefined;
48
+ this.currentValue = undefined;
48
49
  }
49
50
  handleRadioButtonChange(ev) {
50
51
  this.currentValue = ev.detail.value;
@@ -68,11 +69,11 @@ export class RadioButtonGroupComponent {
68
69
  this.removeChildText();
69
70
  }
70
71
  render() {
71
- return (h(Host, { key: '20f0ae38a1b1553824ee2fc1ecd7a1da9e5cbe4a' }, h("div", { key: 'fa144bdedfa0ee88597c6861f6deb9374360c452', class: {
72
+ return (h(Host, { key: '5b36240943436717e043f0c25483eef6f90229f0' }, h("div", { key: 'b9d174d04e5a280beed928e37f4355d8c1edf1aa', class: {
72
73
  'b2b-radio-group': true,
73
74
  'b2b-radio-group--error': this.invalid && !this.disabled,
74
75
  [`b2b-radio-group--${this.alignment}`]: true,
75
- } }, (this.label || this.labelSlot) && (h("b2b-input-label", { key: 'd251e0b0520b3d09c855b89dec4b66f71a33e177', id: this.name, required: this.required }, h("slot", { key: 'ce19d3cc6b1318cfc078134459d25f1ecd8ddf2e', name: "label" }, this.label))), h("fieldset", { key: '49de8c71340df43099ea826deed7c4f2fd114a13' }, h("div", { key: 'e906cab5ab8c6c051406671ba1c21fa968f2fe73', class: "b2b-radio-group-options" }, h("slot", { key: '5d9b85f3290e2eb9305ad82e462a644b8f4b475b' }))), (this.hint !== undefined && !this.invalid) ||
76
+ } }, (this.label || this.labelSlot) && (h("b2b-input-label", { id: this.name, required: this.required }, h("slot", { name: "label" }, this.label))), h("fieldset", { key: 'd4e428dda283b88ed29f4259c3c7ad71d484648d' }, h("div", { key: '4ac819b081787a2dc468ebc3c0c84d8d182c7353', class: "b2b-radio-group-options" }, h("slot", { key: '4c8ee699036c8b3b672fbedbffc8efbbdaf86fa3' }))), (this.hint !== undefined && !this.invalid) ||
76
77
  (this.hint !== undefined && this.disabled) ? (h("span", null, this.hint)) : (''), this.error !== undefined && this.invalid && !this.disabled ? (h("span", null, this.error)) : (''))));
77
78
  }
78
79
  static get is() { return "b2b-radio-group"; }
@@ -91,7 +92,6 @@ export class RadioButtonGroupComponent {
91
92
  return {
92
93
  "name": {
93
94
  "type": "string",
94
- "attribute": "name",
95
95
  "mutable": false,
96
96
  "complexType": {
97
97
  "original": "string",
@@ -104,13 +104,11 @@ export class RadioButtonGroupComponent {
104
104
  "tags": [],
105
105
  "text": "The radio group name used to group them together programmatically. This is required."
106
106
  },
107
- "getter": false,
108
- "setter": false,
107
+ "attribute": "name",
109
108
  "reflect": false
110
109
  },
111
110
  "label": {
112
111
  "type": "string",
113
- "attribute": "label",
114
112
  "mutable": false,
115
113
  "complexType": {
116
114
  "original": "string",
@@ -123,13 +121,11 @@ export class RadioButtonGroupComponent {
123
121
  "tags": [],
124
122
  "text": "The radio group label. This is optional."
125
123
  },
126
- "getter": false,
127
- "setter": false,
124
+ "attribute": "label",
128
125
  "reflect": false
129
126
  },
130
127
  "required": {
131
128
  "type": "boolean",
132
- "attribute": "required",
133
129
  "mutable": false,
134
130
  "complexType": {
135
131
  "original": "boolean",
@@ -142,14 +138,12 @@ export class RadioButtonGroupComponent {
142
138
  "tags": [],
143
139
  "text": "Adds an asterisk at the end of the label to signify that the field is required."
144
140
  },
145
- "getter": false,
146
- "setter": false,
141
+ "attribute": "required",
147
142
  "reflect": false,
148
143
  "defaultValue": "false"
149
144
  },
150
145
  "alignment": {
151
146
  "type": "string",
152
- "attribute": "alignment",
153
147
  "mutable": false,
154
148
  "complexType": {
155
149
  "original": "'vertical' | 'horizontal'",
@@ -162,14 +156,12 @@ export class RadioButtonGroupComponent {
162
156
  "tags": [],
163
157
  "text": "The alignment of the radio group. Can be vertical or horizontal, per default it is vertical."
164
158
  },
165
- "getter": false,
166
- "setter": false,
159
+ "attribute": "alignment",
167
160
  "reflect": false,
168
161
  "defaultValue": "'vertical'"
169
162
  },
170
163
  "disabled": {
171
164
  "type": "boolean",
172
- "attribute": "disabled",
173
165
  "mutable": false,
174
166
  "complexType": {
175
167
  "original": "boolean",
@@ -182,14 +174,12 @@ export class RadioButtonGroupComponent {
182
174
  "tags": [],
183
175
  "text": "Whether or not the radio group is disabled as a whole. Per default it is false."
184
176
  },
185
- "getter": false,
186
- "setter": false,
177
+ "attribute": "disabled",
187
178
  "reflect": true,
188
179
  "defaultValue": "false"
189
180
  },
190
181
  "invalid": {
191
182
  "type": "boolean",
192
- "attribute": "invalid",
193
183
  "mutable": false,
194
184
  "complexType": {
195
185
  "original": "boolean",
@@ -202,14 +192,12 @@ export class RadioButtonGroupComponent {
202
192
  "tags": [],
203
193
  "text": "Whether or not the radio group is invalid and should be rendered with error styles as a whole. Per default it is false."
204
194
  },
205
- "getter": false,
206
- "setter": false,
195
+ "attribute": "invalid",
207
196
  "reflect": true,
208
197
  "defaultValue": "false"
209
198
  },
210
199
  "hint": {
211
200
  "type": "string",
212
- "attribute": "hint",
213
201
  "mutable": false,
214
202
  "complexType": {
215
203
  "original": "string",
@@ -222,13 +210,11 @@ export class RadioButtonGroupComponent {
222
210
  "tags": [],
223
211
  "text": "A group hint text."
224
212
  },
225
- "getter": false,
226
- "setter": false,
213
+ "attribute": "hint",
227
214
  "reflect": false
228
215
  },
229
216
  "error": {
230
217
  "type": "string",
231
- "attribute": "error",
232
218
  "mutable": false,
233
219
  "complexType": {
234
220
  "original": "string",
@@ -241,8 +227,7 @@ export class RadioButtonGroupComponent {
241
227
  "tags": [],
242
228
  "text": "A group error text. It will only show if invalid is set to true."
243
229
  },
244
- "getter": false,
245
- "setter": false,
230
+ "attribute": "error",
246
231
  "reflect": false
247
232
  }
248
233
  };
@@ -0,0 +1,31 @@
1
+ import { newSpecPage } from "@stencil/core/testing";
2
+ import { h } from "@stencil/core";
3
+ import { RadioButtonGroupComponent } from "./radio-group";
4
+ it('should render the checkbox group and not show a hint or an error unless specified', async () => {
5
+ const page = await newSpecPage({
6
+ components: [RadioButtonGroupComponent],
7
+ template: () => (h("b2b-radio-group", { label: "test", name: "radio-test" })),
8
+ });
9
+ expect(page.root).toMatchSnapshot();
10
+ });
11
+ it('should render a group hint if a hint string is specified', async () => {
12
+ const page = await newSpecPage({
13
+ components: [RadioButtonGroupComponent],
14
+ template: () => (h("b2b-radio-group", { label: "test", hint: "this is a test hint", name: "radio-test" })),
15
+ });
16
+ expect(page.root).toMatchSnapshot();
17
+ });
18
+ it('should render a group error if a hint string and an error are specified and the group is set to invalid', async () => {
19
+ const page = await newSpecPage({
20
+ components: [RadioButtonGroupComponent],
21
+ template: () => (h("b2b-radio-group", { label: "test", name: "radio-test", hint: "this is a test hint", error: "this is a test error", invalid: true })),
22
+ });
23
+ expect(page.root).toMatchSnapshot();
24
+ });
25
+ it('should switch to horizontal alignment if specified', async () => {
26
+ const page = await newSpecPage({
27
+ components: [RadioButtonGroupComponent],
28
+ template: () => (h("b2b-radio-group", { label: "test", name: "radio-test", alignment: "horizontal" })),
29
+ });
30
+ expect(page.root).toMatchSnapshot();
31
+ });