@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
@@ -0,0 +1,257 @@
1
+ import { newE2EPage } from "@stencil/core/testing";
2
+ describe('B2B-Pagination', () => {
3
+ let page;
4
+ const getPaginationElement = async (page) => await page.find('b2b-pagination >>> nav');
5
+ const clickBack = async (pagination) => {
6
+ const backButton = await pagination.find({
7
+ text: "\u2039" /* PaginationConstants.BACK */,
8
+ });
9
+ await backButton.click();
10
+ };
11
+ const clickNext = async (pagination) => {
12
+ const nextButton = await pagination.find({
13
+ text: "\u203A" /* PaginationConstants.NEXT */,
14
+ });
15
+ await nextButton.click();
16
+ };
17
+ const navigationItemsSelector = 'b2b-pagination >>> li.b2b-pagination--item';
18
+ it('should set next page to active when click on next button', async () => {
19
+ page = await newE2EPage();
20
+ await page.setContent(`<b2b-pagination total-pages='5' active-page='1'></b2b-pagination>`);
21
+ await page.waitForChanges();
22
+ const pagination = await getPaginationElement(page);
23
+ let firstItem = await pagination.find({ text: '1' });
24
+ expect(firstItem).toHaveAttribute('active');
25
+ await clickNext(pagination);
26
+ await page.waitForChanges();
27
+ firstItem = await pagination.find({ text: '1' });
28
+ expect(firstItem).not.toHaveAttribute('active');
29
+ const secondItem = await pagination.find({ text: '2' });
30
+ expect(secondItem).toHaveAttribute('active');
31
+ });
32
+ it('should set previous page to active when click on previous button', async () => {
33
+ page = await newE2EPage();
34
+ await page.setContent(`<b2b-pagination total-pages='5' active-page='5'></b2b-pagination>`);
35
+ await page.waitForChanges();
36
+ const pagination = await getPaginationElement(page);
37
+ let lastItem = await pagination.find({ text: '5' });
38
+ expect(lastItem).toHaveAttribute('active');
39
+ await clickBack(pagination);
40
+ await page.waitForChanges();
41
+ lastItem = await pagination.find({ text: '5' });
42
+ expect(lastItem).not.toHaveAttribute('active');
43
+ const secondItem = await pagination.find({ text: '4' });
44
+ expect(secondItem).toHaveAttribute('active');
45
+ });
46
+ it('should update the items collection when navigating forward', async () => {
47
+ page = await newE2EPage();
48
+ await page.setContent(`<b2b-pagination total-pages='7' active-page='3'></b2b-pagination>`);
49
+ await page.waitForChanges();
50
+ const pagination = await getPaginationElement(page);
51
+ let items = await page.findAll(navigationItemsSelector);
52
+ const startingItemsCollection = ['1', '2', '3', '...', '7'];
53
+ items.forEach((item, index) => {
54
+ expect(item.textContent).toBe(startingItemsCollection[index]);
55
+ });
56
+ await clickNext(pagination);
57
+ await page.waitForChanges();
58
+ items = await page.findAll(navigationItemsSelector);
59
+ const expectedNextItemCollection = ['1', '...', '3', '4', '5', '...', '7'];
60
+ items.forEach((item, index) => {
61
+ expect(item.textContent).toBe(expectedNextItemCollection[index]);
62
+ });
63
+ const nextActiveItem = await pagination.find({ text: '4' });
64
+ expect(nextActiveItem).toHaveAttribute('active');
65
+ });
66
+ it('should update the items collection when navigating back', async () => {
67
+ page = await newE2EPage();
68
+ await page.setContent(`<b2b-pagination total-pages='7' active-page='5'></b2b-pagination>`);
69
+ await page.waitForChanges();
70
+ const pagination = await getPaginationElement(page);
71
+ let items = await page.findAll(navigationItemsSelector);
72
+ const startingItemsCollection = ['1', '...', '5', '6', '7'];
73
+ items.forEach((item, index) => {
74
+ expect(item.textContent).toBe(startingItemsCollection[index]);
75
+ });
76
+ await clickBack(pagination);
77
+ await page.waitForChanges();
78
+ items = await page.findAll(navigationItemsSelector);
79
+ const expectedBackItemCollection = ['1', '...', '3', '4', '5', '...', '7'];
80
+ items.forEach((item, index) => {
81
+ expect(item.textContent).toBe(expectedBackItemCollection[index]);
82
+ });
83
+ const nextActiveItem = await pagination.find({ text: '4' });
84
+ expect(nextActiveItem).toHaveAttribute('active');
85
+ });
86
+ it('should navigate to the selected item', async () => {
87
+ page = await newE2EPage();
88
+ await page.setContent(`<b2b-pagination total-pages='7' active-page='1'></b2b-pagination>`);
89
+ await page.waitForChanges();
90
+ const pagination = await getPaginationElement(page);
91
+ let nextSelectedItem = await pagination.find({ text: '2' });
92
+ expect(nextSelectedItem).not.toHaveAttribute('active');
93
+ await nextSelectedItem.click();
94
+ await page.waitForChanges();
95
+ nextSelectedItem = await pagination.find({ text: '2' });
96
+ expect(nextSelectedItem).toHaveAttribute('active');
97
+ });
98
+ it('should jump 2 steps forward when clicking right DOTS', async () => {
99
+ page = await newE2EPage();
100
+ await page.setContent(`<b2b-pagination total-pages='10' active-page='3'></b2b-pagination>`);
101
+ await page.waitForChanges();
102
+ const pagination = await getPaginationElement(page);
103
+ // only one DOTS element in this example - right DOTS
104
+ let dotsItem = await pagination.find({ text: "..." /* PaginationConstants.DOTS */ });
105
+ await dotsItem.click();
106
+ await page.waitForChanges();
107
+ const nextItem = await pagination.find({ text: '5' });
108
+ expect(nextItem).toHaveAttribute('active');
109
+ const items = await page.findAll(navigationItemsSelector);
110
+ const expectedBackItemCollection = ['1', '...', '4', '5', '6', '...', '10'];
111
+ items.forEach((item, index) => {
112
+ expect(item.textContent).toBe(expectedBackItemCollection[index]);
113
+ });
114
+ });
115
+ it('should jump 2 steps back when clicking left DOTS', async () => {
116
+ page = await newE2EPage();
117
+ await page.setContent(`<b2b-pagination total-pages='10' active-page='8'></b2b-pagination>`);
118
+ await page.waitForChanges();
119
+ const pagination = await getPaginationElement(page);
120
+ // only one DOTS element in this example - left DOTS
121
+ let dotsItem = await pagination.find({ text: "..." /* PaginationConstants.DOTS */ });
122
+ await dotsItem.click();
123
+ await page.waitForChanges();
124
+ const nextItem = await pagination.find({ text: '6' });
125
+ expect(nextItem).toHaveAttribute('active');
126
+ const items = await page.findAll(navigationItemsSelector);
127
+ const expectedBackItemCollection = ['1', '...', '5', '6', '7', '...', '10'];
128
+ items.forEach((item, index) => {
129
+ expect(item.textContent).toBe(expectedBackItemCollection[index]);
130
+ });
131
+ });
132
+ it('back button should disappear when first page is selected ', async () => {
133
+ page = await newE2EPage();
134
+ await page.setContent(`<b2b-pagination total-pages='5' active-page='2'></b2b-pagination>`);
135
+ await page.waitForChanges();
136
+ const pagination = await getPaginationElement(page);
137
+ let backButton = await pagination.find({ text: "\u2039" /* PaginationConstants.BACK */ });
138
+ expect(backButton).not.toBeNull();
139
+ let firstPage = await pagination.find({ text: '1' });
140
+ await firstPage.click();
141
+ backButton = await pagination.find({ text: "\u2039" /* PaginationConstants.BACK */ });
142
+ expect(backButton).toBeNull();
143
+ });
144
+ it('next button should disappear when last page is selected ', async () => {
145
+ page = await newE2EPage();
146
+ await page.setContent(`<b2b-pagination total-pages='5' active-page='4'></b2b-pagination>`);
147
+ await page.waitForChanges();
148
+ const pagination = await getPaginationElement(page);
149
+ let nextButton = await pagination.find({ text: "\u203A" /* PaginationConstants.NEXT */ });
150
+ expect(nextButton).not.toBeNull();
151
+ let lastPage = await pagination.find({ text: '5' });
152
+ await lastPage.click();
153
+ nextButton = await pagination.find({ text: "\u203A" /* PaginationConstants.NEXT */ });
154
+ expect(nextButton).toBeNull();
155
+ });
156
+ it('should emit event with details when click on next button', async () => {
157
+ page = await newE2EPage();
158
+ await page.setContent(`<b2b-pagination total-pages='5' active-page='1'></b2b-pagination>`);
159
+ await page.waitForChanges();
160
+ const paginationEvent = await page.spyOnEvent('b2b-page-change');
161
+ const pagination = await getPaginationElement(page);
162
+ await clickNext(pagination);
163
+ expect(paginationEvent).toHaveReceivedEvent();
164
+ expect(paginationEvent).toHaveFirstReceivedEventDetail({
165
+ lastSelectedPage: 1,
166
+ currentPage: 2,
167
+ direction: 'NEXT',
168
+ });
169
+ });
170
+ it('should emit event with details when click on back button', async () => {
171
+ page = await newE2EPage();
172
+ await page.setContent(`<b2b-pagination total-pages='5' active-page='5'></b2b-pagination>`);
173
+ await page.waitForChanges();
174
+ const paginationEvent = await page.spyOnEvent('b2b-page-change');
175
+ const pagination = await getPaginationElement(page);
176
+ await clickBack(pagination);
177
+ expect(paginationEvent).toHaveReceivedEvent();
178
+ expect(paginationEvent).toHaveFirstReceivedEventDetail({
179
+ lastSelectedPage: 5,
180
+ currentPage: 4,
181
+ direction: 'PREVIOUS',
182
+ });
183
+ });
184
+ it('should emit event with details when click on an item', async () => {
185
+ page = await newE2EPage();
186
+ await page.setContent(`<b2b-pagination total-pages='5' active-page='1'></b2b-pagination>`);
187
+ await page.waitForChanges();
188
+ const paginationEvent = await page.spyOnEvent('b2b-page-change');
189
+ const pagination = await getPaginationElement(page);
190
+ let nextItem = await pagination.find({ text: '4' });
191
+ await nextItem.click();
192
+ await page.waitForChanges();
193
+ expect(paginationEvent).toHaveReceivedEvent();
194
+ expect(paginationEvent).toHaveFirstReceivedEventDetail({
195
+ lastSelectedPage: 1,
196
+ currentPage: 4,
197
+ });
198
+ });
199
+ it('should refresh items when total items changes dynamically', async () => {
200
+ page = await newE2EPage();
201
+ await page.setContent(`<b2b-pagination total-pages='5' active-page='1'></b2b-pagination>`);
202
+ await page.waitForChanges();
203
+ let items = await page.findAll(navigationItemsSelector);
204
+ const expectedInitialCollection = ['1', '2', '3', '4', '5'];
205
+ items.forEach((item, index) => {
206
+ expect(item.textContent).toBe(expectedInitialCollection[index]);
207
+ });
208
+ const element = await page.find('b2b-pagination');
209
+ await element.setAttribute('total-pages', 20);
210
+ await page.waitForChanges();
211
+ items = await page.findAll(navigationItemsSelector);
212
+ const expectedUpdatedCollection = ['1', '2', '3', '...', '20'];
213
+ items.forEach((item, index) => {
214
+ expect(item.textContent).toBe(expectedUpdatedCollection[index]);
215
+ });
216
+ });
217
+ it('should set selected page to total pages when total items changes dynamically and is lower than selected page', async () => {
218
+ page = await newE2EPage();
219
+ await page.setContent(`<b2b-pagination total-pages='20' active-page='10'></b2b-pagination>`);
220
+ await page.waitForChanges();
221
+ let element = await page.find('b2b-pagination');
222
+ expect(element.getAttribute('active-page')).toBe('10');
223
+ await element.setAttribute('total-pages', 5);
224
+ await page.waitForChanges();
225
+ element = await page.find('b2b-pagination');
226
+ expect(element.getAttribute('active-page')).toBe('5');
227
+ });
228
+ it('should refresh items when active page changes dynamically', async () => {
229
+ page = await newE2EPage();
230
+ await page.setContent(`<b2b-pagination total-pages='10' active-page='1'></b2b-pagination>`);
231
+ await page.waitForChanges();
232
+ let items = await page.findAll(navigationItemsSelector);
233
+ const expectedInitialCollection = ['1', '2', '3', '...', '10'];
234
+ items.forEach((item, index) => {
235
+ expect(item.textContent).toBe(expectedInitialCollection[index]);
236
+ });
237
+ const element = await page.find('b2b-pagination');
238
+ await element.setAttribute('active-page', 5);
239
+ await page.waitForChanges();
240
+ items = await page.findAll(navigationItemsSelector);
241
+ const expectedUpdatedCollection = ['1', '...', '4', '5', '6', '...', '10'];
242
+ items.forEach((item, index) => {
243
+ expect(item.textContent).toBe(expectedUpdatedCollection[index]);
244
+ });
245
+ });
246
+ it('should set selected page to total pages when selected page changes dynamically and is higher than total pages', async () => {
247
+ page = await newE2EPage();
248
+ await page.setContent(`<b2b-pagination total-pages='5' active-page='2'></b2b-pagination>`);
249
+ await page.waitForChanges();
250
+ let element = await page.find('b2b-pagination');
251
+ expect(element.getAttribute('active-page')).toBe('2');
252
+ await element.setAttribute('active-page', 20);
253
+ await page.waitForChanges();
254
+ element = await page.find('b2b-pagination');
255
+ expect(element.getAttribute('active-page')).toBe('5');
256
+ });
257
+ });
@@ -1,14 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  export class PaginationComponent {
3
3
  constructor() {
4
- /** The total number of pages to calculate the length of pagination component */
5
- this.totalPages = 1;
6
- /** Use this property to set programmatically the active page */
7
- this.activePage = 1;
8
- /** (optional) translation to 'Go to next page' */
9
- this.ariaLabelNextPage = 'Go to next page';
10
- /** (optional) translation to 'Go to previous page' */
11
- this.ariaLabelPreviousPage = 'Go to previous page';
12
4
  this.firstPageIndex = 1;
13
5
  this.navItems = [];
14
6
  this.selectNextPage = () => {
@@ -30,6 +22,10 @@ export class PaginationComponent {
30
22
  }
31
23
  this.updateState(nextActivePage);
32
24
  };
25
+ this.totalPages = 1;
26
+ this.activePage = 1;
27
+ this.ariaLabelNextPage = 'Go to next page';
28
+ this.ariaLabelPreviousPage = 'Go to previous page';
33
29
  }
34
30
  connectedCallback() {
35
31
  this.navItems = this.getNavItems();
@@ -95,10 +91,10 @@ export class PaginationComponent {
95
91
  };
96
92
  }
97
93
  render() {
98
- return (h("nav", { key: '835425d2783456b55de3948c7054da6f489a9738' }, h("ol", { key: '94eeec219c9b67f58a3600eee1bb6d8fb598d24e', class: "b2b-pagination" }, this.activePage !== 1 && (h("li", { key: '931523b89b3f71d95a5c0f15cb5a174532e49815', class: "b2b-pagination--previous" }, h("b2b-button", { key: 'a67fbe9830e29ece2833e829d3c4d5640432f41c', onClick: this.selectPreviousPage, size: "50", variant: "secondary", "aria-label": this.ariaLabelPreviousPage }, "\u2039" /* PaginationConstants.BACK */))), this.navItems.map((navItem, index) => {
94
+ return (h("nav", { key: '24405723ea4d2d6427911f1546c4edfabbf98ca0' }, h("ol", { key: 'a1af6ca952107fde2f97c26d3d152ef191142bea', class: "b2b-pagination" }, this.activePage !== 1 && (h("li", { class: "b2b-pagination--previous" }, h("b2b-button", { onClick: this.selectPreviousPage, size: "50", variant: "secondary", "aria-label": this.ariaLabelPreviousPage }, "\u2039" /* PaginationConstants.BACK */))), this.navItems.map((navItem, index) => {
99
95
  const isItemActive = this.activePage === navItem;
100
96
  return (h("li", { class: this.getItemClass(navItem) }, h("b2b-button", { onClick: () => this.setSelectedPage(navItem, index), active: isItemActive, disabled: isItemActive, size: "50", variant: "secondary" }, navItem)));
101
- }), this.activePage !== this.totalPages && (h("li", { key: '139a57f16558f969ed99a8ab683ebe87e20d2e8f', class: "b2b-pagination--next" }, h("b2b-button", { key: 'c1f63c39953d2e26ee602696566bd586ff8d0807', onClick: this.selectNextPage, size: "50", variant: "secondary", "aria-label": this.ariaLabelNextPage }, "\u203A" /* PaginationConstants.NEXT */))))));
97
+ }), this.activePage !== this.totalPages && (h("li", { class: "b2b-pagination--next" }, h("b2b-button", { onClick: this.selectNextPage, size: "50", variant: "secondary", "aria-label": this.ariaLabelNextPage }, "\u203A" /* PaginationConstants.NEXT */))))));
102
98
  }
103
99
  static get is() { return "b2b-pagination"; }
104
100
  static get encapsulation() { return "shadow"; }
@@ -116,7 +112,6 @@ export class PaginationComponent {
116
112
  return {
117
113
  "totalPages": {
118
114
  "type": "number",
119
- "attribute": "total-pages",
120
115
  "mutable": false,
121
116
  "complexType": {
122
117
  "original": "number",
@@ -129,14 +124,12 @@ export class PaginationComponent {
129
124
  "tags": [],
130
125
  "text": "The total number of pages to calculate the length of pagination component"
131
126
  },
132
- "getter": false,
133
- "setter": false,
127
+ "attribute": "total-pages",
134
128
  "reflect": false,
135
129
  "defaultValue": "1"
136
130
  },
137
131
  "activePage": {
138
132
  "type": "number",
139
- "attribute": "active-page",
140
133
  "mutable": true,
141
134
  "complexType": {
142
135
  "original": "number",
@@ -149,14 +142,12 @@ export class PaginationComponent {
149
142
  "tags": [],
150
143
  "text": "Use this property to set programmatically the active page"
151
144
  },
152
- "getter": false,
153
- "setter": false,
145
+ "attribute": "active-page",
154
146
  "reflect": true,
155
147
  "defaultValue": "1"
156
148
  },
157
149
  "ariaLabelNextPage": {
158
150
  "type": "string",
159
- "attribute": "aria-label-next-page",
160
151
  "mutable": false,
161
152
  "complexType": {
162
153
  "original": "string",
@@ -169,14 +160,12 @@ export class PaginationComponent {
169
160
  "tags": [],
170
161
  "text": "(optional) translation to 'Go to next page'"
171
162
  },
172
- "getter": false,
173
- "setter": false,
163
+ "attribute": "aria-label-next-page",
174
164
  "reflect": false,
175
165
  "defaultValue": "'Go to next page'"
176
166
  },
177
167
  "ariaLabelPreviousPage": {
178
168
  "type": "string",
179
- "attribute": "aria-label-previous-page",
180
169
  "mutable": false,
181
170
  "complexType": {
182
171
  "original": "string",
@@ -189,8 +178,7 @@ export class PaginationComponent {
189
178
  "tags": [],
190
179
  "text": "(optional) translation to 'Go to previous page'"
191
180
  },
192
- "getter": false,
193
- "setter": false,
181
+ "attribute": "aria-label-previous-page",
194
182
  "reflect": false,
195
183
  "defaultValue": "'Go to previous page'"
196
184
  }
@@ -0,0 +1,103 @@
1
+ import { newSpecPage } from "@stencil/core/testing";
2
+ import { PaginationComponent } from "./pagination";
3
+ describe('B2B-Pagination', () => {
4
+ const backAndForwardItems = 2;
5
+ const getItem = (page, itemText) => {
6
+ const allItemElements = page.root.shadowRoot.querySelectorAll('li.b2b-pagination__item b2b-button');
7
+ const allItems = Array.from(allItemElements);
8
+ return allItems.find(item => item.textContent === itemText);
9
+ };
10
+ it('active page should be 1 by default', async () => {
11
+ const page = await newSpecPage({
12
+ components: [PaginationComponent],
13
+ html: `<b2b-pagination></b2b-pagination>`,
14
+ });
15
+ expect(page.rootInstance.activePage).toBe(1);
16
+ });
17
+ it('total pages should be 1 by default', async () => {
18
+ const page = await newSpecPage({
19
+ components: [PaginationComponent],
20
+ html: `<b2b-pagination></b2b-pagination>`,
21
+ });
22
+ expect(page.rootInstance.totalPages).toBe(1);
23
+ });
24
+ it('selected element must render button as active', async () => {
25
+ const page = await newSpecPage({
26
+ components: [PaginationComponent],
27
+ html: `<b2b-pagination total-pages='5' active-page='1'></b2b-pagination>`,
28
+ });
29
+ await page.waitForChanges();
30
+ const firstItem = getItem(page, '1');
31
+ const isSelectedButtonActive = firstItem.getAttribute('active');
32
+ expect(isSelectedButtonActive).not.toBeNull();
33
+ const secondItem = getItem(page, '2');
34
+ const isSecondButtonActive = secondItem.getAttribute('active');
35
+ expect(isSecondButtonActive).toBeNull();
36
+ });
37
+ it('should show at most 5 items', async () => {
38
+ const page = await newSpecPage({
39
+ components: [PaginationComponent],
40
+ html: `<b2b-pagination total-pages='10' active-page='2'></b2b-pagination>`,
41
+ });
42
+ await page.waitForChanges();
43
+ const listElements = page.root.shadowRoot.querySelectorAll('li');
44
+ expect(listElements.length).toBe(5 + backAndForwardItems);
45
+ });
46
+ it('should show total number of pages in the last item', async () => {
47
+ const page = await newSpecPage({
48
+ components: [PaginationComponent],
49
+ html: `<b2b-pagination total-pages='10'></b2b-pagination>`,
50
+ });
51
+ await page.waitForChanges();
52
+ const lastItemNPosition = 2;
53
+ const lastItemSelector = `li.b2b-pagination__item:nth-last-of-type(${lastItemNPosition})`;
54
+ const lastItem = page.root.shadowRoot.querySelector(lastItemSelector);
55
+ expect(lastItem.textContent).toBe('10');
56
+ });
57
+ it('should show dots on the second to last item when initial items active and total pages greater than 5', async () => {
58
+ const page = await newSpecPage({
59
+ components: [PaginationComponent],
60
+ html: `<b2b-pagination total-pages='10' active-page='1'></b2b-pagination>`,
61
+ });
62
+ await page.waitForChanges();
63
+ const secondToLastItemSelector = `li.b2b-pagination__item:nth-last-of-type(3)`;
64
+ const lastItem = page.root.shadowRoot.querySelector(secondToLastItemSelector);
65
+ expect(lastItem.textContent).toBe("..." /* PaginationConstants.DOTS */);
66
+ });
67
+ it('should show dots on the second item when any of last items are active', async () => {
68
+ const page = await newSpecPage({
69
+ components: [PaginationComponent],
70
+ html: `<b2b-pagination total-pages='10' active-page='8'></b2b-pagination>`,
71
+ });
72
+ await page.waitForChanges();
73
+ const secondItemSelector = `li.b2b-pagination__item:nth-of-type(3)`;
74
+ const secondItem = page.root.shadowRoot.querySelector(secondItemSelector);
75
+ expect(secondItem.textContent).toBe("..." /* PaginationConstants.DOTS */);
76
+ });
77
+ it('should show dots on the second and second to last items when middle item is active', async () => {
78
+ const page = await newSpecPage({
79
+ components: [PaginationComponent],
80
+ html: `<b2b-pagination total-pages='10' active-page='5'></b2b-pagination>`,
81
+ });
82
+ await page.waitForChanges();
83
+ const secondItemSelector = `li.b2b-pagination__item:nth-of-type(3)`;
84
+ const secondItem = page.root.shadowRoot.querySelector(secondItemSelector);
85
+ expect(secondItem.textContent).toBe("..." /* PaginationConstants.DOTS */);
86
+ const secondToLastItemSelector = `li.b2b-pagination__item:nth-last-of-type(3)`;
87
+ const lastItem = page.root.shadowRoot.querySelector(secondToLastItemSelector);
88
+ expect(lastItem.textContent).toBe("..." /* PaginationConstants.DOTS */);
89
+ });
90
+ it('should not show dots when 5 items or less', async () => {
91
+ const page = await newSpecPage({
92
+ components: [PaginationComponent],
93
+ html: `<b2b-pagination total-pages='5' active-page='2'></b2b-pagination>`,
94
+ });
95
+ await page.waitForChanges();
96
+ const secondItemSelector = `li.b2b-pagination__item:nth-of-type(3)`;
97
+ const secondItem = page.root.shadowRoot.querySelector(secondItemSelector);
98
+ expect(secondItem.textContent).toBe('2');
99
+ const secondToLastItemSelector = `li.b2b-pagination__item:nth-last-of-type(3)`;
100
+ const lastItem = page.root.shadowRoot.querySelector(secondToLastItemSelector);
101
+ expect(lastItem.textContent).toBe('4');
102
+ });
103
+ });
@@ -0,0 +1,13 @@
1
+ import { newE2EPage } from "@stencil/core/testing";
2
+ describe('B2B-Paragraph', () => {
3
+ let page;
4
+ beforeEach(async () => {
5
+ page = await newE2EPage();
6
+ await page.setContent(`<b2b-paragraph>Paragraph</b2b-paragraph>`);
7
+ });
8
+ it('should render paragraph component', async () => {
9
+ const element = await page.find('b2b-paragraph');
10
+ expect(element).not.toBeNull();
11
+ expect(element).toEqualText('Paragraph');
12
+ });
13
+ });
@@ -5,21 +5,15 @@ import { h } from "@stencil/core";
5
5
  */
6
6
  export class ParagraphComponent {
7
7
  constructor() {
8
- /** The weight of the text. */
9
8
  this.weight = 'normal';
10
- /** The size of the text. */
11
9
  this.size = '100';
12
- /** The alignment of the text. */
13
10
  this.align = 'left';
14
- /** Whether or not the paragraph has a bottom margin. Defaults to true. */
15
11
  this.margin = true;
16
- /** The color of the paragraph. Defaults to black. */
17
12
  this.variant = 'black-100';
18
- /** The positioning of the paragraph in the page flow. Defaults to native block behavior. */
19
13
  this.display = 'block';
20
14
  }
21
15
  render() {
22
- return (h("p", { key: '91514bcdd1fa6711dc19ad07768e36173619e5a6', style: {
16
+ return (h("p", { key: 'c3781dc7215762d8dd038791943a541231731653', style: {
23
17
  display: this.display,
24
18
  }, class: {
25
19
  'b2b-paragraph': true,
@@ -28,7 +22,7 @@ export class ParagraphComponent {
28
22
  ['b2b-paragraph--align-' + this.align]: true,
29
23
  ['b2b-paragraph--no-margin']: !this.margin,
30
24
  ['b2b-paragraph--variant-' + this.variant]: true,
31
- } }, h("slot", { key: '00391f373395897a99412e5f2095ec0c10fa24d1' })));
25
+ } }, h("slot", { key: '5afb431d2d782751f50741a6c10a210df7b1e3e4' })));
32
26
  }
33
27
  static get is() { return "b2b-paragraph"; }
34
28
  static get encapsulation() { return "shadow"; }
@@ -46,7 +40,6 @@ export class ParagraphComponent {
46
40
  return {
47
41
  "weight": {
48
42
  "type": "string",
49
- "attribute": "weight",
50
43
  "mutable": false,
51
44
  "complexType": {
52
45
  "original": "'bold' | 'normal'",
@@ -59,14 +52,12 @@ export class ParagraphComponent {
59
52
  "tags": [],
60
53
  "text": "The weight of the text."
61
54
  },
62
- "getter": false,
63
- "setter": false,
55
+ "attribute": "weight",
64
56
  "reflect": false,
65
57
  "defaultValue": "'normal'"
66
58
  },
67
59
  "size": {
68
60
  "type": "string",
69
- "attribute": "size",
70
61
  "mutable": false,
71
62
  "complexType": {
72
63
  "original": "'50' | '100'",
@@ -79,14 +70,12 @@ export class ParagraphComponent {
79
70
  "tags": [],
80
71
  "text": "The size of the text."
81
72
  },
82
- "getter": false,
83
- "setter": false,
73
+ "attribute": "size",
84
74
  "reflect": false,
85
75
  "defaultValue": "'100'"
86
76
  },
87
77
  "align": {
88
78
  "type": "string",
89
- "attribute": "align",
90
79
  "mutable": false,
91
80
  "complexType": {
92
81
  "original": "'left' | 'right' | 'center'",
@@ -99,14 +88,12 @@ export class ParagraphComponent {
99
88
  "tags": [],
100
89
  "text": "The alignment of the text."
101
90
  },
102
- "getter": false,
103
- "setter": false,
91
+ "attribute": "align",
104
92
  "reflect": false,
105
93
  "defaultValue": "'left'"
106
94
  },
107
95
  "margin": {
108
96
  "type": "boolean",
109
- "attribute": "margin",
110
97
  "mutable": false,
111
98
  "complexType": {
112
99
  "original": "boolean",
@@ -119,14 +106,12 @@ export class ParagraphComponent {
119
106
  "tags": [],
120
107
  "text": "Whether or not the paragraph has a bottom margin. Defaults to true."
121
108
  },
122
- "getter": false,
123
- "setter": false,
109
+ "attribute": "margin",
124
110
  "reflect": false,
125
111
  "defaultValue": "true"
126
112
  },
127
113
  "variant": {
128
114
  "type": "string",
129
- "attribute": "variant",
130
115
  "mutable": false,
131
116
  "complexType": {
132
117
  "original": "'black-100' | 'grey-400'",
@@ -139,14 +124,12 @@ export class ParagraphComponent {
139
124
  "tags": [],
140
125
  "text": "The color of the paragraph. Defaults to black."
141
126
  },
142
- "getter": false,
143
- "setter": false,
127
+ "attribute": "variant",
144
128
  "reflect": false,
145
129
  "defaultValue": "'black-100'"
146
130
  },
147
131
  "display": {
148
132
  "type": "string",
149
- "attribute": "display",
150
133
  "mutable": false,
151
134
  "complexType": {
152
135
  "original": "'inline' | 'inline-block' | 'block'",
@@ -159,8 +142,7 @@ export class ParagraphComponent {
159
142
  "tags": [],
160
143
  "text": "The positioning of the paragraph in the page flow. Defaults to native block behavior."
161
144
  },
162
- "getter": false,
163
- "setter": false,
145
+ "attribute": "display",
164
146
  "reflect": false,
165
147
  "defaultValue": "'block'"
166
148
  }
@@ -0,0 +1,43 @@
1
+ import { newE2EPage } from "@stencil/core/testing";
2
+ describe('B2B-Progress-bar', () => {
3
+ it('should render b2b progress bar', async () => {
4
+ const page = await newE2EPage();
5
+ await page.setContent("<b2b-progress-bar progress='80' />");
6
+ const element = await page.find('b2b-progress-bar');
7
+ expect(element).not.toBeNull();
8
+ const label = await page.find('b2b-progress-bar >>> .b2b-progress-bar__label-none');
9
+ expect(label).not.toBeNull();
10
+ });
11
+ it('should render b2b progress bar with label on bottom left', async () => {
12
+ const page = await newE2EPage();
13
+ await page.setContent("<b2b-progress-bar progress='70' label='Label below to the left' label-type='below' label-position='left' />");
14
+ const element = await page.find('b2b-progress-bar');
15
+ expect(element).not.toBeNull();
16
+ const label = await page.find('b2b-progress-bar >>> .b2b-progress-bar__label__left-below');
17
+ expect(label.textContent).toBe('Label below to the left');
18
+ });
19
+ it('should render b2b progress bar with label on bottom right', async () => {
20
+ const page = await newE2EPage();
21
+ await page.setContent("<b2b-progress-bar progress='70' label='Label below to the right' label-type='below' label-position='right' />");
22
+ const element = await page.find('b2b-progress-bar');
23
+ expect(element).not.toBeNull();
24
+ const label = await page.find('b2b-progress-bar >>> .b2b-progress-bar__label__right-below');
25
+ expect(label.textContent).toBe('Label below to the right');
26
+ });
27
+ it('should render b2b progress bar with label on left side', async () => {
28
+ const page = await newE2EPage();
29
+ await page.setContent("<b2b-progress-bar progress='70' label='Label on the left side' label-type='side' label-position='left' />");
30
+ const element = await page.find('b2b-progress-bar');
31
+ expect(element).not.toBeNull();
32
+ const label = await page.find('b2b-progress-bar >>> .b2b-progress-bar__label__left-side');
33
+ expect(label.textContent).toBe('Label on the left side');
34
+ });
35
+ it('should render b2b progress bar with label on right side', async () => {
36
+ const page = await newE2EPage();
37
+ await page.setContent("<b2b-progress-bar progress='70' label='Label on the right side' label-type='side' label-position='right' />");
38
+ const element = await page.find('b2b-progress-bar');
39
+ expect(element).not.toBeNull();
40
+ const label = await page.find('b2b-progress-bar >>> .b2b-progress-bar__label__right-side');
41
+ expect(label.textContent).toBe('Label on the right side');
42
+ });
43
+ });