@otto-de/b2b-core-components 1.30.0 → 1.31.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 (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-49bafb74.entry.js +1 -0
  20. package/dist/b2b-core-components/{p-745ad406.entry.js → p-4bc0ec9a.entry.js} +1 -1
  21. package/dist/b2b-core-components/p-564c62d0.entry.js +1 -0
  22. package/dist/b2b-core-components/{p-6040dca2.entry.js → p-6025d667.entry.js} +1 -1
  23. package/dist/b2b-core-components/p-61b2a6ad.js +1 -0
  24. package/dist/b2b-core-components/{p-54d478b6.entry.js → p-661d0249.entry.js} +1 -1
  25. package/dist/b2b-core-components/p-6dd7fd7b.entry.js +1 -0
  26. package/dist/b2b-core-components/p-6ff5114b.entry.js +1 -0
  27. package/dist/b2b-core-components/p-742a18f1.entry.js +1 -0
  28. package/dist/b2b-core-components/{p-23acc468.entry.js → p-781611fb.entry.js} +1 -1
  29. package/dist/b2b-core-components/{p-0847e62e.entry.js → p-7bb6f06e.entry.js} +1 -1
  30. package/dist/b2b-core-components/p-7dd8f3cb.entry.js +1 -0
  31. package/dist/b2b-core-components/p-815d7a53.entry.js +1 -0
  32. package/dist/b2b-core-components/{p-5063e5b7.entry.js → p-850c8e01.entry.js} +1 -1
  33. package/dist/b2b-core-components/{p-e8b1fee4.entry.js → p-86ff8e6c.entry.js} +1 -1
  34. package/dist/b2b-core-components/{p-552f43c1.entry.js → p-9819f622.entry.js} +1 -1
  35. package/dist/b2b-core-components/{p-ccf78e23.entry.js → p-9dde1af0.entry.js} +1 -1
  36. package/dist/b2b-core-components/{p-24c94653.entry.js → p-9f88b476.entry.js} +1 -1
  37. package/dist/b2b-core-components/p-a155219a.entry.js +1 -0
  38. package/dist/b2b-core-components/p-a96c8ba0.entry.js +1 -0
  39. package/dist/b2b-core-components/p-b33059ab.entry.js +1 -0
  40. package/dist/b2b-core-components/p-b5fdf7df.entry.js +1 -0
  41. package/dist/b2b-core-components/p-b6a753e8.js +2 -0
  42. package/dist/b2b-core-components/p-bba0b41b.entry.js +1 -0
  43. package/dist/b2b-core-components/p-be93498d.entry.js +1 -0
  44. package/dist/b2b-core-components/p-bfbe4aff.entry.js +1 -0
  45. package/dist/b2b-core-components/p-c597637e.entry.js +1 -0
  46. package/dist/b2b-core-components/{p-eb01bb4f.entry.js → p-c67bcebc.entry.js} +1 -1
  47. package/dist/b2b-core-components/p-cb4cc427.entry.js +1 -0
  48. package/dist/b2b-core-components/{p-a63dfd99.entry.js → p-d1c8105b.entry.js} +1 -1
  49. package/dist/b2b-core-components/{p-2f9efe3f.entry.js → p-d26ec403.entry.js} +1 -1
  50. package/dist/b2b-core-components/p-d3204d75.entry.js +1 -0
  51. package/dist/b2b-core-components/p-d6457a1d.entry.js +1 -0
  52. package/dist/b2b-core-components/p-db205434.entry.js +1 -0
  53. package/dist/b2b-core-components/p-e1255160.js +1 -0
  54. package/dist/b2b-core-components/p-e40069cd.entry.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 +36 -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 +78 -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 +86 -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 +81 -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 +76 -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 +241 -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 +255 -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 +83 -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 +97 -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 +401 -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 +28 -51
  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 +7 -7
  424. package/package.json +8 -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,18 +1,6 @@
1
1
  import { h, Host, } from "@stencil/core";
2
2
  export class CheckboxComponent {
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 checkbox is checked. Default value is false and can be set to true if the checkbox should come pre-checked. */
7
- this.checked = false;
8
- /** Whether or not the checkbox is disabled. The default value is false. */
9
- this.disabled = false;
10
- /** Whether or not the checkbox is rendered with error styles. Defaults to false. */
11
- this.invalid = false;
12
- /** If true, renders a standalone inline checkbox with no label and hint/error. */
13
- this.standalone = false;
14
- /** @internal whether the parent checkbox-group is disabled. */
15
- this.groupDisabled = false;
16
4
  this.handleFormData = (event) => {
17
5
  if (this.name != undefined && this.checked) {
18
6
  const value = this.value || 'on';
@@ -57,6 +45,18 @@ export class CheckboxComponent {
57
45
  return (h("svg", { class: "b2b-checkbox__icon", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, h("path", { d: "M11.798 25.082c-.341 0-.681-.13-.942-.389l-7.132-7.115a1.334 1.334 0 0 1 1.884-1.888l6.19 6.175L26.391 7.307a1.334 1.334 0 0 1 1.884 1.888L12.74 24.693c-.26.259-.601.389-.942.389z" })));
58
46
  }
59
47
  };
48
+ this.label = undefined;
49
+ this.required = false;
50
+ this.checked = false;
51
+ this.disabled = false;
52
+ this.indeterminate = undefined;
53
+ this.error = undefined;
54
+ this.hint = undefined;
55
+ this.name = undefined;
56
+ this.value = undefined;
57
+ this.invalid = false;
58
+ this.standalone = false;
59
+ this.groupDisabled = false;
60
60
  }
61
61
  connectedCallback() {
62
62
  const form = this.hostElement.closest('form');
@@ -65,14 +65,14 @@ export class CheckboxComponent {
65
65
  }
66
66
  }
67
67
  render() {
68
- return (h(Host, { key: 'a10090dd22742ca101009e30aafa54bf6d7fdb0c', onClick: this.onClick }, h("div", { key: '6f075970a066c5a7e7dd17188aab281481b09128', class: {
68
+ return (h(Host, { key: 'f9b0a3ab1446715b218115bb5097d7de57ae71eb', onClick: this.onClick }, h("div", { key: 'da9c2edb1f46996f8e03aedf17a52f4b2c822f0d', class: {
69
69
  'b2b-checkbox': true,
70
70
  'b2b-checkbox--error': this.invalid && !this.disabled,
71
71
  'b2b-checkbox--disabled': this.disabled || this.groupDisabled,
72
72
  'b2b-checkbox--checked': this.checked,
73
73
  'b2b-checkbox--standalone': this.standalone,
74
74
  'b2b-checkbox--indeterminate': this.indeterminate,
75
- } }, h("div", { key: '36b698070c7cdfb04785936d44037703a08351d4', class: "b2b-checkbox__items" }, this.renderIcon(), h("input", { key: '6b2bd764ded99e7d4ee275b338f7cc30a4d1cd58', class: "b2b-checkbox__input", "aria-labelledby": this.name, type: "checkbox", name: this.name, id: this.name, value: this.value, checked: this.checked, disabled: this.disabled || this.groupDisabled, onFocus: this.onFocus, onBlur: this.onBlur }), !this.standalone && (h("b2b-input-label", { key: '31ebe24861019ad9f613bf3128b24b97386d9643', id: this.name, required: this.required, disabled: this.disabled }, h("slot", { key: '0b1e25ca235379e6ce7a968502d311be9a61bbfb', name: "label" }, this.label)))), (this.hint !== undefined && !this.invalid) ||
75
+ } }, h("div", { key: 'dab97157c87fbc3a9599355113b930039afeb1d0', class: "b2b-checkbox__items" }, this.renderIcon(), h("input", { key: '253f9206dc69ce6c404c7e4b3c260da6772d2786', class: "b2b-checkbox__input", "aria-labelledby": this.name, type: "checkbox", name: this.name, id: this.name, value: this.value, checked: this.checked, disabled: this.disabled || this.groupDisabled, onFocus: this.onFocus, onBlur: this.onBlur }), !this.standalone && (h("b2b-input-label", { id: this.name, required: this.required, disabled: this.disabled }, h("slot", { name: "label" }, this.label)))), (this.hint !== undefined && !this.invalid) ||
76
76
  (this.hint !== undefined && this.disabled) ? (h("span", null, this.hint)) : (''), this.error !== undefined && this.invalid && !this.disabled ? (h("span", null, this.error)) : (''))));
77
77
  }
78
78
  static get is() { return "b2b-checkbox"; }
@@ -91,7 +91,6 @@ export class CheckboxComponent {
91
91
  return {
92
92
  "label": {
93
93
  "type": "string",
94
- "attribute": "label",
95
94
  "mutable": false,
96
95
  "complexType": {
97
96
  "original": "string",
@@ -104,13 +103,11 @@ export class CheckboxComponent {
104
103
  "tags": [],
105
104
  "text": "The checkbox label. This attribute is required."
106
105
  },
107
- "getter": false,
108
- "setter": false,
106
+ "attribute": "label",
109
107
  "reflect": false
110
108
  },
111
109
  "required": {
112
110
  "type": "boolean",
113
- "attribute": "required",
114
111
  "mutable": false,
115
112
  "complexType": {
116
113
  "original": "boolean",
@@ -123,14 +120,12 @@ export class CheckboxComponent {
123
120
  "tags": [],
124
121
  "text": "Adds an asterisk at the end of the label to signify that the field is required."
125
122
  },
126
- "getter": false,
127
- "setter": false,
123
+ "attribute": "required",
128
124
  "reflect": true,
129
125
  "defaultValue": "false"
130
126
  },
131
127
  "checked": {
132
128
  "type": "boolean",
133
- "attribute": "checked",
134
129
  "mutable": true,
135
130
  "complexType": {
136
131
  "original": "boolean",
@@ -143,14 +138,12 @@ export class CheckboxComponent {
143
138
  "tags": [],
144
139
  "text": "Whether or not the checkbox is checked. Default value is false and can be set to true if the checkbox should come pre-checked."
145
140
  },
146
- "getter": false,
147
- "setter": false,
141
+ "attribute": "checked",
148
142
  "reflect": true,
149
143
  "defaultValue": "false"
150
144
  },
151
145
  "disabled": {
152
146
  "type": "boolean",
153
- "attribute": "disabled",
154
147
  "mutable": false,
155
148
  "complexType": {
156
149
  "original": "boolean",
@@ -163,14 +156,12 @@ export class CheckboxComponent {
163
156
  "tags": [],
164
157
  "text": "Whether or not the checkbox is disabled. The default value is false."
165
158
  },
166
- "getter": false,
167
- "setter": false,
159
+ "attribute": "disabled",
168
160
  "reflect": true,
169
161
  "defaultValue": "false"
170
162
  },
171
163
  "indeterminate": {
172
164
  "type": "boolean",
173
- "attribute": "indeterminate",
174
165
  "mutable": true,
175
166
  "complexType": {
176
167
  "original": "boolean",
@@ -183,13 +174,11 @@ export class CheckboxComponent {
183
174
  "tags": [],
184
175
  "text": "If used in combination with other checkboxes, this state indicates that some checkboxes are checked, but not all. Per default, it is false."
185
176
  },
186
- "getter": false,
187
- "setter": false,
177
+ "attribute": "indeterminate",
188
178
  "reflect": false
189
179
  },
190
180
  "error": {
191
181
  "type": "string",
192
- "attribute": "error",
193
182
  "mutable": false,
194
183
  "complexType": {
195
184
  "original": "string",
@@ -202,13 +191,11 @@ export class CheckboxComponent {
202
191
  "tags": [],
203
192
  "text": "The error message. It is undefined by default. If a string is passed in, it will render the checkbox with error styles."
204
193
  },
205
- "getter": false,
206
- "setter": false,
194
+ "attribute": "error",
207
195
  "reflect": false
208
196
  },
209
197
  "hint": {
210
198
  "type": "string",
211
- "attribute": "hint",
212
199
  "mutable": false,
213
200
  "complexType": {
214
201
  "original": "string",
@@ -221,13 +208,11 @@ export class CheckboxComponent {
221
208
  "tags": [],
222
209
  "text": "The hint text belonging to the checkbox. It is undefined by default. If an error is specified, it will be shown instead of the hint."
223
210
  },
224
- "getter": false,
225
- "setter": false,
211
+ "attribute": "hint",
226
212
  "reflect": false
227
213
  },
228
214
  "name": {
229
215
  "type": "string",
230
- "attribute": "name",
231
216
  "mutable": false,
232
217
  "complexType": {
233
218
  "original": "string",
@@ -240,13 +225,11 @@ export class CheckboxComponent {
240
225
  "tags": [],
241
226
  "text": "The name of the checkbox. Per default it is undefined. Use this to programmatically group checkboxes together by giving them the same name."
242
227
  },
243
- "getter": false,
244
- "setter": false,
228
+ "attribute": "name",
245
229
  "reflect": true
246
230
  },
247
231
  "value": {
248
232
  "type": "any",
249
- "attribute": "value",
250
233
  "mutable": false,
251
234
  "complexType": {
252
235
  "original": "any",
@@ -259,13 +242,11 @@ export class CheckboxComponent {
259
242
  "tags": [],
260
243
  "text": "The value of the checkbox. This is not the same as the checked property. It is only used when the checkbox participates in a checkbox group"
261
244
  },
262
- "getter": false,
263
- "setter": false,
245
+ "attribute": "value",
264
246
  "reflect": true
265
247
  },
266
248
  "invalid": {
267
249
  "type": "boolean",
268
- "attribute": "invalid",
269
250
  "mutable": false,
270
251
  "complexType": {
271
252
  "original": "boolean",
@@ -278,14 +259,12 @@ export class CheckboxComponent {
278
259
  "tags": [],
279
260
  "text": "Whether or not the checkbox is rendered with error styles. Defaults to false."
280
261
  },
281
- "getter": false,
282
- "setter": false,
262
+ "attribute": "invalid",
283
263
  "reflect": false,
284
264
  "defaultValue": "false"
285
265
  },
286
266
  "standalone": {
287
267
  "type": "boolean",
288
- "attribute": "standalone",
289
268
  "mutable": false,
290
269
  "complexType": {
291
270
  "original": "boolean",
@@ -298,14 +277,12 @@ export class CheckboxComponent {
298
277
  "tags": [],
299
278
  "text": "If true, renders a standalone inline checkbox with no label and hint/error."
300
279
  },
301
- "getter": false,
302
- "setter": false,
280
+ "attribute": "standalone",
303
281
  "reflect": false,
304
282
  "defaultValue": "false"
305
283
  },
306
284
  "groupDisabled": {
307
285
  "type": "boolean",
308
- "attribute": "group-disabled",
309
286
  "mutable": false,
310
287
  "complexType": {
311
288
  "original": "boolean",
@@ -321,8 +298,7 @@ export class CheckboxComponent {
321
298
  }],
322
299
  "text": ""
323
300
  },
324
- "getter": false,
325
- "setter": false,
301
+ "attribute": "group-disabled",
326
302
  "reflect": false,
327
303
  "defaultValue": "false"
328
304
  }
@@ -0,0 +1,45 @@
1
+ import { newSpecPage } from "@stencil/core/testing";
2
+ import { h } from "@stencil/core";
3
+ import { CheckboxComponent } from "./checkbox";
4
+ it('should render the checkbox', async () => {
5
+ const page = await newSpecPage({
6
+ components: [CheckboxComponent],
7
+ template: () => h("b2b-checkbox", { label: "test" }),
8
+ });
9
+ expect(page.root).toMatchSnapshot();
10
+ });
11
+ it('should disable the checkbox', async () => {
12
+ const page = await newSpecPage({
13
+ components: [CheckboxComponent],
14
+ template: () => h("b2b-checkbox", { label: "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: [CheckboxComponent],
21
+ template: () => (h("b2b-checkbox", { label: "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: [CheckboxComponent],
28
+ template: () => (h("b2b-checkbox", { label: "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: [CheckboxComponent],
35
+ template: () => (h("b2b-checkbox", { label: "test", error: "this is an error", invalid: true })),
36
+ });
37
+ expect(page.root).toMatchSnapshot();
38
+ });
39
+ it('should render a hint if invalid and disabled are true at the same time', async () => {
40
+ const page = await newSpecPage({
41
+ components: [CheckboxComponent],
42
+ template: () => (h("b2b-checkbox", { label: "test", error: "This is a test error", hint: "this is a test hint", invalid: true, disabled: true })),
43
+ });
44
+ expect(page.root).toMatchSnapshot();
45
+ });
@@ -0,0 +1,78 @@
1
+ import { newE2EPage } from "@stencil/core/testing";
2
+ describe('B2B-Checkbox-Group', () => {
3
+ let page;
4
+ beforeEach(async () => {
5
+ page = await newE2EPage();
6
+ await page.setContent(`
7
+ <b2b-checkbox-group label="test label">
8
+ <b2b-checkbox label="one" value="one" error="test" hint="test"></b2b-checkbox>
9
+ <b2b-checkbox id="disabled-checkbox" label="two" value="two" error="test" hint="test" disabled></b2b-checkbox>
10
+ </b2b-checkbox-group>
11
+ `);
12
+ });
13
+ it('should render the checkbox group component', async () => {
14
+ const element = await page.find('b2b-checkbox-group');
15
+ expect(element).not.toBeNull();
16
+ });
17
+ it('should have all checkboxes unchecked by default and check a checkbox', async () => {
18
+ const element = await page.find('b2b-checkbox >>> .b2b-checkbox');
19
+ await element.click();
20
+ await page.waitForChanges();
21
+ expect(element).toHaveClass('b2b-checkbox--checked');
22
+ });
23
+ it('should receive a custom event', async () => {
24
+ const element = await page.find('b2b-checkbox');
25
+ const b2bChange = await page.spyOnEvent('b2b-change');
26
+ element.triggerEvent('b2b-change', {
27
+ detail: {
28
+ value: '',
29
+ checked: true,
30
+ },
31
+ });
32
+ await page.waitForChanges();
33
+ expect(b2bChange).toHaveReceivedEvent();
34
+ });
35
+ it('should emit a custom event when a checkbox is checked', async () => {
36
+ const element = await page.find('b2b-checkbox >>> .b2b-checkbox');
37
+ const b2bGroupChange = await page.spyOnEvent('b2b-group-change');
38
+ element.click();
39
+ await page.waitForChanges();
40
+ // currently a limitation of Puppeteer - no event details on custom events inside the shadow dom
41
+ expect(b2bGroupChange).toHaveReceivedEvent();
42
+ });
43
+ it('should disable all checkboxes when the property is specified', async () => {
44
+ const parentElement = await page.find('b2b-checkbox-group');
45
+ const element = await page.find('b2b-checkbox >>> .b2b-checkbox');
46
+ expect(element).not.toHaveClass('b2b-checkbox--disabled');
47
+ parentElement.setProperty('disabled', true);
48
+ await page.waitForChanges();
49
+ expect(element).toHaveClass('b2b-checkbox--disabled');
50
+ });
51
+ it('should set all checkboxes to invalid when the property is specified', async () => {
52
+ const parentElement = await page.find('b2b-checkbox-group');
53
+ const element = await page.find('b2b-checkbox >>> .b2b-checkbox');
54
+ expect(element).not.toHaveClass('b2b-checkbox--error');
55
+ parentElement.setProperty('invalid', true);
56
+ await page.waitForChanges();
57
+ expect(element).toHaveClass('b2b-checkbox--error');
58
+ });
59
+ it('should remove all children hint texts when the component is rendered', async () => {
60
+ const element = await page.find('b2b-checkbox');
61
+ const error = element.error;
62
+ const hint = element.hint;
63
+ expect(hint).not.toBeDefined;
64
+ expect(error).not.toBeDefined;
65
+ });
66
+ it('should disable individual elements of the group and keep their state when the group is dis- and enabled', async () => {
67
+ let checkbox = await page.find('#disabled-checkbox');
68
+ expect(await checkbox.getProperty('disabled')).toBe(true);
69
+ let group = await page.find('b2b-checkbox-group');
70
+ await group.setProperty('disabled', true);
71
+ await page.waitForChanges();
72
+ expect(await group.getProperty('disabled')).toBe(true);
73
+ await group.setProperty('disabled', false);
74
+ await page.waitForChanges();
75
+ expect(await group.getProperty('disabled')).toBe(false);
76
+ expect(await checkbox.getProperty('disabled')).toBe(true);
77
+ });
78
+ });
@@ -1,14 +1,6 @@
1
1
  import { h, Host, } from "@stencil/core";
2
2
  export class CheckboxGroupComponent {
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 checkbox group as a whole is disabled. Default state is false. */
7
- this.disabled = false;
8
- /** Whether or not the checkbox group as a whole is invalid. Set to true to display a group error. */
9
- this.invalid = false;
10
- /** The alignment of the checkbox group. Per default it is vertical */
11
- this.alignment = 'vertical';
12
4
  this.getChildNodes = () => {
13
5
  return Array.from(this.host.querySelectorAll('b2b-checkbox'));
14
6
  };
@@ -45,6 +37,13 @@ export class CheckboxGroupComponent {
45
37
  node.hint = undefined;
46
38
  });
47
39
  };
40
+ this.label = undefined;
41
+ this.required = false;
42
+ this.disabled = false;
43
+ this.invalid = false;
44
+ this.alignment = 'vertical';
45
+ this.hint = undefined;
46
+ this.error = undefined;
48
47
  }
49
48
  handleCheckboxChange(ev) {
50
49
  this.b2bGroupChange.emit({
@@ -66,11 +65,11 @@ export class CheckboxGroupComponent {
66
65
  }
67
66
  }
68
67
  render() {
69
- return (h(Host, { key: 'b8431dcf69e50e49b6e0411e39b6cd8c8c0e001b' }, h("div", { key: '9339ca43ee3b8acb4fcd43791e8329ba50f50fad', class: {
68
+ return (h(Host, { key: 'a13345395b22ac918fcb5b4186f5bb3057af8ea4' }, h("div", { key: 'b388a4b209535c47c07b2720392abeb7191b0809', class: {
70
69
  'b2b-checkbox-group': true,
71
70
  'b2b-checkbox-group--error': this.invalid && !this.disabled,
72
71
  [`b2b-checkbox-group--${this.alignment}`]: true,
73
- } }, this.label && (h("b2b-input-label", { key: '3fc15e041a85ca2ced45f5291dfaa9ab6b87c5e0', required: this.required }, this.label)), h("fieldset", { key: '31b46d349668b900d6b16fc0fd5c13e5e1b713b4' }, h("div", { key: 'adfefcce531090878b19ef43745a2351e4b06179', class: "b2b-checkbox-group__options" }, h("slot", { key: '91ed4f799618cfb3e043f61be40a23fb82fc4716' }))), (this.hint !== undefined && !this.invalid) ||
72
+ } }, this.label && (h("b2b-input-label", { required: this.required }, this.label)), h("fieldset", { key: '33ed6a29fc0742e786d7f82c93dea89fdf0127b8' }, h("div", { key: 'da3884cbef485588a36ea6dd6c92f0dc0bdff138', class: "b2b-checkbox-group__options" }, h("slot", { key: 'c4f2ef006d5c8f04e45315526d076ca69a49026e' }))), (this.hint !== undefined && !this.invalid) ||
74
73
  (this.hint !== undefined && this.disabled) ? (h("span", null, this.hint)) : (''), this.error !== undefined && this.invalid && !this.disabled ? (h("span", null, this.error)) : (''))));
75
74
  }
76
75
  static get is() { return "b2b-checkbox-group"; }
@@ -89,7 +88,6 @@ export class CheckboxGroupComponent {
89
88
  return {
90
89
  "label": {
91
90
  "type": "string",
92
- "attribute": "label",
93
91
  "mutable": false,
94
92
  "complexType": {
95
93
  "original": "string",
@@ -102,13 +100,11 @@ export class CheckboxGroupComponent {
102
100
  "tags": [],
103
101
  "text": "The label for the checkbox group. This is optional."
104
102
  },
105
- "getter": false,
106
- "setter": false,
103
+ "attribute": "label",
107
104
  "reflect": false
108
105
  },
109
106
  "required": {
110
107
  "type": "boolean",
111
- "attribute": "required",
112
108
  "mutable": false,
113
109
  "complexType": {
114
110
  "original": "boolean",
@@ -121,14 +117,12 @@ export class CheckboxGroupComponent {
121
117
  "tags": [],
122
118
  "text": "Adds an asterisk at the end of the label to signify that the field is required."
123
119
  },
124
- "getter": false,
125
- "setter": false,
120
+ "attribute": "required",
126
121
  "reflect": false,
127
122
  "defaultValue": "false"
128
123
  },
129
124
  "disabled": {
130
125
  "type": "boolean",
131
- "attribute": "disabled",
132
126
  "mutable": false,
133
127
  "complexType": {
134
128
  "original": "boolean",
@@ -141,14 +135,12 @@ export class CheckboxGroupComponent {
141
135
  "tags": [],
142
136
  "text": "Whether or not the checkbox group as a whole is disabled. Default state is false."
143
137
  },
144
- "getter": false,
145
- "setter": false,
138
+ "attribute": "disabled",
146
139
  "reflect": false,
147
140
  "defaultValue": "false"
148
141
  },
149
142
  "invalid": {
150
143
  "type": "boolean",
151
- "attribute": "invalid",
152
144
  "mutable": false,
153
145
  "complexType": {
154
146
  "original": "boolean",
@@ -161,14 +153,12 @@ export class CheckboxGroupComponent {
161
153
  "tags": [],
162
154
  "text": "Whether or not the checkbox group as a whole is invalid. Set to true to display a group error."
163
155
  },
164
- "getter": false,
165
- "setter": false,
156
+ "attribute": "invalid",
166
157
  "reflect": false,
167
158
  "defaultValue": "false"
168
159
  },
169
160
  "alignment": {
170
161
  "type": "string",
171
- "attribute": "alignment",
172
162
  "mutable": false,
173
163
  "complexType": {
174
164
  "original": "'vertical' | 'horizontal'",
@@ -181,14 +171,12 @@ export class CheckboxGroupComponent {
181
171
  "tags": [],
182
172
  "text": "The alignment of the checkbox group. Per default it is vertical"
183
173
  },
184
- "getter": false,
185
- "setter": false,
174
+ "attribute": "alignment",
186
175
  "reflect": false,
187
176
  "defaultValue": "'vertical'"
188
177
  },
189
178
  "hint": {
190
179
  "type": "string",
191
- "attribute": "hint",
192
180
  "mutable": false,
193
181
  "complexType": {
194
182
  "original": "string",
@@ -201,13 +189,11 @@ export class CheckboxGroupComponent {
201
189
  "tags": [],
202
190
  "text": "The checkbox group hint text."
203
191
  },
204
- "getter": false,
205
- "setter": false,
192
+ "attribute": "hint",
206
193
  "reflect": false
207
194
  },
208
195
  "error": {
209
196
  "type": "string",
210
- "attribute": "error",
211
197
  "mutable": false,
212
198
  "complexType": {
213
199
  "original": "string",
@@ -220,8 +206,7 @@ export class CheckboxGroupComponent {
220
206
  "tags": [],
221
207
  "text": "The checkbox group error message. Is displayed when invalid is set to true."
222
208
  },
223
- "getter": false,
224
- "setter": false,
209
+ "attribute": "error",
225
210
  "reflect": false
226
211
  }
227
212
  };
@@ -0,0 +1,38 @@
1
+ import { newSpecPage } from "@stencil/core/testing";
2
+ import { h } from "@stencil/core";
3
+ import { CheckboxGroupComponent } from "./checkbox-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: [CheckboxGroupComponent],
7
+ template: () => h("b2b-checkbox-group", { label: "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: [CheckboxGroupComponent],
14
+ template: () => (h("b2b-checkbox-group", { label: "test", hint: "this is a test hint" })),
15
+ });
16
+ expect(page.root).toMatchSnapshot();
17
+ });
18
+ it('should not render a group hint if a hint string and an error are specified and the group is set to invalid', async () => {
19
+ const page = await newSpecPage({
20
+ components: [CheckboxGroupComponent],
21
+ template: () => (h("b2b-checkbox-group", { label: "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 render a hint if invalid and disabled are true at the same time', async () => {
26
+ const page = await newSpecPage({
27
+ components: [CheckboxGroupComponent],
28
+ template: () => (h("b2b-checkbox-group", { label: "test", hint: "this is a test hint", error: "this is a test error", invalid: true, disabled: true })),
29
+ });
30
+ expect(page.root).toMatchSnapshot();
31
+ });
32
+ it('should align the checkboxes horizontally if set to horizontal', async () => {
33
+ const page = await newSpecPage({
34
+ components: [CheckboxGroupComponent],
35
+ template: () => (h("b2b-checkbox-group", { label: "test", alignment: "horizontal" })),
36
+ });
37
+ expect(page.root).toMatchSnapshot();
38
+ });
@@ -0,0 +1,99 @@
1
+ import { newE2EPage } from "@stencil/core/testing";
2
+ describe('B2B-Chip-Component', () => {
3
+ it('should render the chip component', async () => {
4
+ const page = await newE2EPage();
5
+ await page.setContent(`<b2b-chip-component label="chip"></b2b-chip-component>`);
6
+ const chip = await page.find({ text: 'chip' });
7
+ const clearIcon = await page.find('b2b-chip-component >>> button.b2b-chip__clearIcon');
8
+ expect(chip).not.toBeNull();
9
+ expect(clearIcon).not.toBeNull();
10
+ });
11
+ it('should render the chip component with success type', async () => {
12
+ const page = await newE2EPage();
13
+ await page.setContent(`<b2b-chip-component label="chip" type="success"></b2b-chip-component>`);
14
+ const chip = await page.find({ text: 'chip' });
15
+ const clearIcon = await page.find('b2b-chip-component >>> button.b2b-chip__clearIcon');
16
+ expect(chip).not.toBeNull();
17
+ expect(clearIcon).not.toBeNull();
18
+ const chipWrapper = await page.find('b2b-chip-component >>> .b2b-chip');
19
+ expect(chipWrapper).toHaveClass('b2b-chip--success');
20
+ });
21
+ it('should render the chip component with info type', async () => {
22
+ const page = await newE2EPage();
23
+ await page.setContent(`<b2b-chip-component label="chip" type="info"></b2b-chip-component>`);
24
+ const chip = await page.find({ text: 'chip' });
25
+ const clearIcon = await page.find('b2b-chip-component >>> button.b2b-chip__clearIcon');
26
+ expect(chip).not.toBeNull();
27
+ expect(clearIcon).not.toBeNull();
28
+ const chipWrapper = await page.find('b2b-chip-component >>> .b2b-chip');
29
+ expect(chipWrapper).toHaveClass('b2b-chip--info');
30
+ });
31
+ it('should render the chip component with warning type', async () => {
32
+ const page = await newE2EPage();
33
+ await page.setContent(`<b2b-chip-component label="chip" type="warn"></b2b-chip-component>`);
34
+ const chip = await page.find({ text: 'chip' });
35
+ const clearIcon = await page.find('b2b-chip-component >>> button.b2b-chip__clearIcon');
36
+ expect(chip).not.toBeNull();
37
+ expect(clearIcon).not.toBeNull();
38
+ const chipWrapper = await page.find('b2b-chip-component >>> .b2b-chip');
39
+ expect(chipWrapper).toHaveClass('b2b-chip--warn');
40
+ });
41
+ it('should render the chip component with error type', async () => {
42
+ const page = await newE2EPage();
43
+ await page.setContent(`<b2b-chip-component label="chip" type="error"></b2b-chip-component>`);
44
+ const chip = await page.find({ text: 'chip' });
45
+ const clearIcon = await page.find('b2b-chip-component >>> button.b2b-chip__clearIcon');
46
+ expect(chip).not.toBeNull();
47
+ expect(clearIcon).not.toBeNull();
48
+ const chipWrapper = await page.find('b2b-chip-component >>> .b2b-chip');
49
+ expect(chipWrapper).toHaveClass('b2b-chip--error');
50
+ });
51
+ it('should render the chip component with bold label', async () => {
52
+ const page = await newE2EPage();
53
+ await page.setContent(`<b2b-chip-component label="chip" label-style="bold"></b2b-chip-component>`);
54
+ const chip = await page.find({ text: 'chip' });
55
+ const clearIcon = await page.find('b2b-chip-component >>> button.b2b-chip__clearIcon');
56
+ expect(chip).not.toBeNull();
57
+ expect(clearIcon).not.toBeNull();
58
+ const label = await page.find('b2b-chip-component >>> .b2b-chip__label');
59
+ expect(label).toHaveClass('b2b-chip__label--bold');
60
+ });
61
+ it('should render the chip component with italic label', async () => {
62
+ const page = await newE2EPage();
63
+ await page.setContent(`<b2b-chip-component label="chip" label-style="italic"></b2b-chip-component>`);
64
+ const chip = await page.find({ text: 'chip' });
65
+ const clearIcon = await page.find('b2b-chip-component >>> button.b2b-chip__clearIcon');
66
+ expect(chip).not.toBeNull();
67
+ expect(clearIcon).not.toBeNull();
68
+ const label = await page.find('b2b-chip-component >>> .b2b-chip__label');
69
+ expect(label).toHaveClass('b2b-chip__label--italic');
70
+ });
71
+ it('should render the chip component with underlined label', async () => {
72
+ const page = await newE2EPage();
73
+ await page.setContent(`<b2b-chip-component label="chip" label-style="underline"></b2b-chip-component>`);
74
+ const chip = await page.find({ text: 'chip' });
75
+ const clearIcon = await page.find('b2b-chip-component >>> button.b2b-chip__clearIcon');
76
+ expect(chip).not.toBeNull();
77
+ expect(clearIcon).not.toBeNull();
78
+ const label = await page.find('b2b-chip-component >>> .b2b-chip__label');
79
+ expect(label).toHaveClass('b2b-chip__label--underline');
80
+ });
81
+ it('should render the chip component with strikethrough label', async () => {
82
+ const page = await newE2EPage();
83
+ await page.setContent(`<b2b-chip-component label="chip" label-style="strikethrough"></b2b-chip-component>`);
84
+ const chip = await page.find({ text: 'chip' });
85
+ const clearIcon = await page.find('b2b-chip-component >>> button.b2b-chip__clearIcon');
86
+ expect(chip).not.toBeNull();
87
+ expect(clearIcon).not.toBeNull();
88
+ const label = await page.find('b2b-chip-component >>> .b2b-chip__label');
89
+ expect(label).toHaveClass('b2b-chip__label--strikethrough');
90
+ });
91
+ it('should emit b2b-close event on clear icon click', async () => {
92
+ const page = await newE2EPage();
93
+ await page.setContent(`<b2b-chip-component label="chip"></b2b-chip-component>`);
94
+ const b2bClose = await page.spyOnEvent('b2b-close');
95
+ const clearIcon = await page.find('b2b-chip-component >>> button.b2b-chip__clearIcon');
96
+ await clearIcon.click();
97
+ expect(b2bClose).toHaveReceivedEvent();
98
+ });
99
+ });