@otto-de/b2b-core-components 1.5.0 → 1.6.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 (357) hide show
  1. package/dist/b2b-core-components/b2b-core-components.esm.js +1 -1
  2. package/dist/b2b-core-components/p-01fd54a1.entry.js +1 -0
  3. package/dist/b2b-core-components/{p-b95089a7.entry.js → p-04fc18cd.entry.js} +1 -1
  4. package/dist/b2b-core-components/{p-c20baf90.entry.js → p-077217b3.entry.js} +1 -1
  5. package/dist/b2b-core-components/{p-03beebf5.entry.js → p-0965b990.entry.js} +1 -1
  6. package/dist/b2b-core-components/p-0beabdb4.entry.js +1 -0
  7. package/dist/b2b-core-components/p-163466cf.entry.js +1 -0
  8. package/dist/b2b-core-components/p-197c1a6d.entry.js +1 -0
  9. package/dist/b2b-core-components/{p-75f84f53.entry.js → p-1d007eea.entry.js} +1 -1
  10. package/dist/b2b-core-components/{p-6997ceb0.entry.js → p-1e2752b2.entry.js} +1 -1
  11. package/dist/b2b-core-components/{p-06ef4c5e.entry.js → p-2328144b.entry.js} +1 -1
  12. package/dist/b2b-core-components/{p-9184036b.entry.js → p-2ad8bdb6.entry.js} +1 -1
  13. package/dist/b2b-core-components/p-2d01e68a.entry.js +1 -0
  14. package/dist/b2b-core-components/{p-60c7f6f7.entry.js → p-3c0671ef.entry.js} +1 -1
  15. package/dist/b2b-core-components/p-42e7f397.entry.js +1 -0
  16. package/dist/b2b-core-components/{p-163fe245.entry.js → p-44ccd8f4.entry.js} +1 -1
  17. package/dist/b2b-core-components/{p-38791fb9.entry.js → p-542a358a.entry.js} +1 -1
  18. package/dist/b2b-core-components/p-54fd68eb.entry.js +1 -0
  19. package/dist/b2b-core-components/p-60badad5.entry.js +1 -0
  20. package/dist/b2b-core-components/{p-e1622cb8.entry.js → p-6140304e.entry.js} +1 -1
  21. package/dist/b2b-core-components/p-62e43f91.entry.js +1 -0
  22. package/dist/b2b-core-components/{p-f0aa5e83.entry.js → p-681d6880.entry.js} +1 -1
  23. package/dist/b2b-core-components/{p-bcf36531.entry.js → p-8ad1bb92.entry.js} +1 -1
  24. package/dist/b2b-core-components/p-90a3ffed.entry.js +1 -0
  25. package/dist/b2b-core-components/p-97ef9805.entry.js +1 -0
  26. package/dist/b2b-core-components/{p-48d4d224.entry.js → p-a50ea33f.entry.js} +1 -1
  27. package/dist/b2b-core-components/{p-c8294029.entry.js → p-b3ccfc58.entry.js} +1 -1
  28. package/dist/b2b-core-components/{p-2b3a67db.entry.js → p-b6a8a06f.entry.js} +1 -1
  29. package/dist/b2b-core-components/{p-5c2db521.entry.js → p-b8049234.entry.js} +1 -1
  30. package/dist/b2b-core-components/p-c294dd0c.entry.js +1 -0
  31. package/dist/b2b-core-components/{p-5d7866e8.entry.js → p-d07210e2.entry.js} +1 -1
  32. package/dist/b2b-core-components/p-d7bb8aa1.entry.js +1 -0
  33. package/dist/b2b-core-components/{p-76e240f8.entry.js → p-d83c2084.entry.js} +1 -1
  34. package/dist/b2b-core-components/{p-dcd80266.entry.js → p-db7d2ec3.entry.js} +1 -1
  35. package/dist/b2b-core-components/{p-9facba86.entry.js → p-dd79ab5b.entry.js} +1 -1
  36. package/dist/b2b-core-components/{p-bda69b9a.entry.js → p-e5b78075.entry.js} +1 -1
  37. package/dist/b2b-core-components/{p-7b04f40b.entry.js → p-e811411a.entry.js} +1 -1
  38. package/dist/b2b-core-components/p-f190bf79.entry.js +1 -0
  39. package/dist/b2b-core-components/{p-1e1bdb50.entry.js → p-f24515bf.entry.js} +1 -1
  40. package/dist/b2b-core-components/p-f3ce95bf.js +2 -0
  41. package/dist/b2b-core-components/p-f7e9f889.entry.js +1 -0
  42. package/dist/cjs/b2b-alert.cjs.entry.js +4 -4
  43. package/dist/cjs/b2b-anchor.cjs.entry.js +1 -1
  44. package/dist/cjs/b2b-button_2.cjs.entry.js +12 -8
  45. package/dist/cjs/b2b-card.cjs.entry.js +1 -1
  46. package/dist/cjs/b2b-checkbox-group.cjs.entry.js +7 -5
  47. package/dist/cjs/{b2b-table-cell_2.cjs.entry.js → b2b-checkbox_3.cjs.entry.js} +94 -7
  48. package/dist/cjs/b2b-core-components.cjs.js +3 -3
  49. package/dist/cjs/b2b-dropdown.cjs.entry.js +3 -3
  50. package/dist/cjs/b2b-grid-col.cjs.entry.js +1 -1
  51. package/dist/cjs/b2b-grid-row.cjs.entry.js +2 -2
  52. package/dist/cjs/b2b-grid.cjs.entry.js +1 -1
  53. package/dist/cjs/b2b-headline.cjs.entry.js +1 -1
  54. package/dist/cjs/b2b-icon.cjs.entry.js +4 -4
  55. package/dist/cjs/b2b-input-group_2.cjs.entry.js +10 -21
  56. package/dist/cjs/b2b-input-label.cjs.entry.js +1 -1
  57. package/dist/cjs/b2b-input_2.cjs.entry.js +8 -7
  58. package/dist/cjs/b2b-label.cjs.entry.js +1 -1
  59. package/dist/cjs/b2b-modal.cjs.entry.js +5 -5
  60. package/dist/cjs/b2b-pagination.cjs.entry.js +5 -5
  61. package/dist/cjs/b2b-paragraph.cjs.entry.js +5 -5
  62. package/dist/cjs/b2b-radio-button.cjs.entry.js +1 -1
  63. package/dist/cjs/b2b-radio-group.cjs.entry.js +1 -1
  64. package/dist/cjs/b2b-required-separator.cjs.entry.js +3 -3
  65. package/dist/cjs/b2b-rounded-icon.cjs.entry.js +1 -1
  66. package/dist/cjs/b2b-scrollable-container.cjs.entry.js +1 -1
  67. package/dist/cjs/b2b-search.cjs.entry.js +1 -1
  68. package/dist/cjs/b2b-separator.cjs.entry.js +1 -1
  69. package/dist/cjs/b2b-tab-group.cjs.entry.js +1 -1
  70. package/dist/cjs/b2b-tab-panel.cjs.entry.js +1 -1
  71. package/dist/cjs/b2b-tab.cjs.entry.js +1 -1
  72. package/dist/cjs/b2b-table-row.cjs.entry.js +77 -21
  73. package/dist/cjs/b2b-table-rowgroup.cjs.entry.js +85 -24
  74. package/dist/cjs/b2b-table.cjs.entry.js +10 -10
  75. package/dist/cjs/b2b-textarea.cjs.entry.js +1 -1
  76. package/dist/cjs/b2b-toggle-button.cjs.entry.js +7 -7
  77. package/dist/cjs/b2b-toggle-group.cjs.entry.js +3 -3
  78. package/dist/cjs/b2b-tooltip.cjs.entry.js +4 -4
  79. package/dist/cjs/b2b-wizard-icon.cjs.entry.js +1 -1
  80. package/dist/cjs/b2b-wizard-step.cjs.entry.js +4 -4
  81. package/dist/cjs/b2b-wizard.cjs.entry.js +2 -2
  82. package/dist/cjs/{index-496aa5dd.js → index-04e07a00.js} +88 -31
  83. package/dist/cjs/loader.cjs.js +3 -3
  84. package/dist/cjs/{table.types-bb0926c7.js → table.types-00c8228a.js} +2 -2
  85. package/dist/collection/collection-manifest.json +2 -2
  86. package/dist/collection/components/alert/alert.css +7 -7
  87. package/dist/collection/components/alert/alert.e2e.js +67 -0
  88. package/dist/collection/components/alert/alert.js +2 -2
  89. package/dist/collection/components/anchor/anchor.css +2 -2
  90. package/dist/collection/components/anchor/anchor.spec.js +68 -0
  91. package/dist/collection/components/button/button.css +35 -39
  92. package/dist/collection/components/button/button.e2e.js +80 -0
  93. package/dist/collection/components/button/button.js +31 -6
  94. package/dist/collection/components/card/card.css +2 -2
  95. package/dist/collection/components/card/card.e2e.js +110 -0
  96. package/dist/collection/components/card/card.spec.js +32 -0
  97. package/dist/collection/components/checkbox/checkbox.css +34 -13
  98. package/dist/collection/components/checkbox/checkbox.e2e.js +30 -0
  99. package/dist/collection/components/checkbox/checkbox.js +81 -6
  100. package/dist/collection/components/checkbox/checkbox.spec.js +45 -0
  101. package/dist/collection/components/checkbox-group/checkbox-group.css +5 -5
  102. package/dist/collection/components/checkbox-group/checkbox-group.e2e.js +78 -0
  103. package/dist/collection/components/checkbox-group/checkbox-group.js +5 -3
  104. package/dist/collection/components/checkbox-group/checkbox-group.spec.js +38 -0
  105. package/dist/collection/components/dropdown/dropdown.css +7 -7
  106. package/dist/collection/components/dropdown/dropdown.e2e.js +48 -0
  107. package/dist/collection/components/dropdown/dropdown.js +1 -1
  108. package/dist/collection/components/dropdown/dropdown.spec.js +52 -0
  109. package/dist/collection/components/grid/grid.e2e.js +17 -0
  110. package/dist/collection/components/grid/row.js +1 -1
  111. package/dist/collection/components/headline/headline.css +2 -2
  112. package/dist/collection/components/headline/headline.e2e.js +13 -0
  113. package/dist/collection/components/headline/headline.spec.js +67 -0
  114. package/dist/collection/components/icon/icon.css +9 -9
  115. package/dist/collection/components/icon/icon.js +2 -2
  116. package/dist/collection/components/icon/icon.spec.js +21 -0
  117. package/dist/collection/components/input/input.css +14 -14
  118. package/dist/collection/components/input/input.e2e.js +43 -0
  119. package/dist/collection/components/input/input.js +26 -4
  120. package/dist/collection/components/input/input.spec.js +45 -0
  121. package/dist/collection/components/input-group/input-group.css +4 -4
  122. package/dist/collection/components/input-group/input-group.e2e.js +76 -0
  123. package/dist/collection/components/input-group/input-group.js +4 -21
  124. package/dist/collection/components/input-group/input-group.spec.js +56 -0
  125. package/dist/collection/components/input-label/input-label.e2e.js +10 -0
  126. package/dist/collection/components/input-list/input-list.css +7 -7
  127. package/dist/collection/components/input-list/input-list.e2e.js +227 -0
  128. package/dist/collection/components/input-list/input-list.js +24 -2
  129. package/dist/collection/components/label/label.css +2 -2
  130. package/dist/collection/components/label/label.e2e.js +17 -0
  131. package/dist/collection/components/label/label.spec.js +58 -0
  132. package/dist/collection/components/modal/modal.css +13 -18
  133. package/dist/collection/components/modal/modal.e2e.js +115 -0
  134. package/dist/collection/components/modal/modal.js +3 -3
  135. package/dist/collection/components/pagination/pagination.css +7 -7
  136. package/dist/collection/components/pagination/pagination.e2e.js +256 -0
  137. package/dist/collection/components/pagination/pagination.js +3 -3
  138. package/dist/collection/components/pagination/pagination.spec.js +104 -0
  139. package/dist/collection/components/paragraph/paragraph.css +9 -9
  140. package/dist/collection/components/paragraph/paragraph.e2e.js +13 -0
  141. package/dist/collection/components/paragraph/paragraph.js +3 -3
  142. package/dist/collection/components/radio/radio.css +2 -2
  143. package/dist/collection/components/radio/radio.e2e.js +36 -0
  144. package/dist/collection/components/radio/radio.spec.js +38 -0
  145. package/dist/collection/components/radio-group/radio-group.css +2 -2
  146. package/dist/collection/components/radio-group/radio-group.e2e.js +71 -0
  147. package/dist/collection/components/radio-group/radio-group.spec.js +31 -0
  148. package/dist/collection/components/required-separator/required-separator.css +4 -4
  149. package/dist/collection/components/required-separator/required-separator.e2e.js +17 -0
  150. package/dist/collection/components/required-separator/required-separator.js +1 -1
  151. package/dist/collection/components/rounded-icon/rounded-icon.css +2 -2
  152. package/dist/collection/components/scrollable-container/scrollable-container.css +2 -2
  153. package/dist/collection/components/search/search.e2e.js +97 -0
  154. package/dist/collection/components/separator/separator.css +2 -2
  155. package/dist/collection/components/separator/separator.e2e.js +22 -0
  156. package/dist/collection/components/spinner/spinner.css +2 -2
  157. package/dist/collection/components/spinner/spinner.e2e.js +12 -0
  158. package/dist/collection/components/spinner/spinner.spec.js +41 -0
  159. package/dist/collection/components/tab/tab.css +2 -2
  160. package/dist/collection/components/tab/tab.e2e.js +35 -0
  161. package/dist/collection/components/tab/tab.spec.js +31 -0
  162. package/dist/collection/components/tab-group/tab-group.e2e.js +98 -0
  163. package/dist/collection/components/tab-panel/tab-panel.css +2 -2
  164. package/dist/collection/components/tab-panel/tab-panel.e2e.js +12 -0
  165. package/dist/collection/components/tab-panel/tab-panel.spec.js +10 -0
  166. package/dist/collection/components/table/stories.data.js +6 -6
  167. package/dist/collection/components/table/table-cell/table-cell.css +2 -2
  168. package/dist/collection/components/table/table-header/table-header.css +17 -17
  169. package/dist/collection/components/table/table-header/table-header.js +4 -4
  170. package/dist/collection/components/table/table-row/table-row.css +3 -3
  171. package/dist/collection/components/table/table-row/table-row.js +185 -25
  172. package/dist/collection/components/table/table-rowgroup/table-rowgroup.css +3 -3
  173. package/dist/collection/components/table/table-rowgroup/table-rowgroup.js +118 -23
  174. package/dist/collection/components/table/table.css +2 -2
  175. package/dist/collection/components/table/table.e2e.js +370 -0
  176. package/dist/collection/components/table/table.js +8 -8
  177. package/dist/collection/components/table/table.stories.js +16 -7
  178. package/dist/collection/components/table/utils.js +18 -0
  179. package/dist/collection/components/textarea/textarea.css +2 -2
  180. package/dist/collection/components/textarea/textarea.e2e.js +91 -0
  181. package/dist/collection/components/toggle-button/toggle-button.css +9 -9
  182. package/dist/collection/components/toggle-button/toggle-button.e2e.js +44 -0
  183. package/dist/collection/components/toggle-button/toggle-button.js +5 -5
  184. package/dist/collection/components/toggle-group/toggle-group.css +3 -3
  185. package/dist/collection/components/toggle-group/toggle-group.e2e.js +65 -0
  186. package/dist/collection/components/toggle-group/toggle-group.js +1 -1
  187. package/dist/collection/components/tooltip/tooltip.css +14 -14
  188. package/dist/collection/components/tooltip/tooltip.e2e.js +64 -0
  189. package/dist/collection/components/tooltip/tooltip.js +2 -2
  190. package/dist/collection/components/wizard/wizard-step.js +2 -2
  191. package/dist/collection/components/wizard/wizard.css +3 -3
  192. package/dist/collection/components/wizard/wizard.e2e.js +149 -0
  193. package/dist/collection/components/wizard-icon/wizard-icon.css +2 -2
  194. package/dist/collection/docs/config/replace-prop-controls.spec.js +32 -0
  195. package/dist/collection/utils/types/table.types.js +5 -1
  196. package/dist/collection/utils/utils.spec.js +15 -0
  197. package/dist/components/b2b-alert.js +4 -4
  198. package/dist/components/b2b-anchor.js +1 -1
  199. package/dist/components/b2b-card.js +1 -1
  200. package/dist/components/b2b-checkbox-group.js +7 -5
  201. package/dist/components/b2b-checkbox.js +1 -99
  202. package/dist/components/b2b-dropdown.js +3 -3
  203. package/dist/components/b2b-grid-col.js +1 -1
  204. package/dist/components/b2b-grid-row.js +2 -2
  205. package/dist/components/b2b-grid.js +1 -1
  206. package/dist/components/b2b-label.js +1 -1
  207. package/dist/components/b2b-modal.js +5 -5
  208. package/dist/components/b2b-pagination.js +5 -5
  209. package/dist/components/b2b-paragraph.js +5 -5
  210. package/dist/components/b2b-radio-button.js +1 -1
  211. package/dist/components/b2b-radio-group.js +1 -1
  212. package/dist/components/b2b-required-separator.js +3 -3
  213. package/dist/components/b2b-scrollable-container.js +1 -1
  214. package/dist/components/b2b-search.js +1 -1
  215. package/dist/components/b2b-tab-group.js +1 -1
  216. package/dist/components/b2b-tab-panel.js +1 -1
  217. package/dist/components/b2b-tab.js +1 -1
  218. package/dist/components/b2b-table-row.js +97 -25
  219. package/dist/components/b2b-table-rowgroup.js +91 -27
  220. package/dist/components/b2b-table.js +9 -9
  221. package/dist/components/b2b-textarea.js +1 -1
  222. package/dist/components/b2b-toggle-button.js +7 -7
  223. package/dist/components/b2b-toggle-group.js +3 -3
  224. package/dist/components/b2b-tooltip.js +4 -4
  225. package/dist/components/b2b-wizard-step.js +4 -4
  226. package/dist/components/b2b-wizard.js +2 -2
  227. package/dist/components/button.js +13 -8
  228. package/dist/{esm/b2b-checkbox.entry.js → components/checkbox.js} +66 -13
  229. package/dist/components/headline.js +1 -1
  230. package/dist/components/icon.js +4 -4
  231. package/dist/components/input-group.js +7 -20
  232. package/dist/components/input-label.js +1 -1
  233. package/dist/components/input-list-option.js +2 -2
  234. package/dist/components/input-list.js +6 -4
  235. package/dist/components/input.js +8 -6
  236. package/dist/components/rounded-icon.js +1 -1
  237. package/dist/components/separator.js +1 -1
  238. package/dist/components/spinner.js +1 -1
  239. package/dist/components/table-cell.js +1 -1
  240. package/dist/components/table-header.js +6 -6
  241. package/dist/components/table.types.js +2 -2
  242. package/dist/components/wizard-icon.js +1 -1
  243. package/dist/custom-elements.json +22 -13
  244. package/dist/esm/b2b-alert.entry.js +4 -4
  245. package/dist/esm/b2b-anchor.entry.js +1 -1
  246. package/dist/esm/b2b-button_2.entry.js +12 -8
  247. package/dist/esm/b2b-card.entry.js +1 -1
  248. package/dist/esm/b2b-checkbox-group.entry.js +7 -5
  249. package/dist/esm/{b2b-table-cell_2.entry.js → b2b-checkbox_3.entry.js} +94 -8
  250. package/dist/esm/b2b-core-components.js +4 -4
  251. package/dist/esm/b2b-dropdown.entry.js +3 -3
  252. package/dist/esm/b2b-grid-col.entry.js +1 -1
  253. package/dist/esm/b2b-grid-row.entry.js +2 -2
  254. package/dist/esm/b2b-grid.entry.js +1 -1
  255. package/dist/esm/b2b-headline.entry.js +1 -1
  256. package/dist/esm/b2b-icon.entry.js +4 -4
  257. package/dist/esm/b2b-input-group_2.entry.js +10 -21
  258. package/dist/esm/b2b-input-label.entry.js +1 -1
  259. package/dist/esm/b2b-input_2.entry.js +8 -7
  260. package/dist/esm/b2b-label.entry.js +1 -1
  261. package/dist/esm/b2b-modal.entry.js +5 -5
  262. package/dist/esm/b2b-pagination.entry.js +5 -5
  263. package/dist/esm/b2b-paragraph.entry.js +5 -5
  264. package/dist/esm/b2b-radio-button.entry.js +1 -1
  265. package/dist/esm/b2b-radio-group.entry.js +1 -1
  266. package/dist/esm/b2b-required-separator.entry.js +3 -3
  267. package/dist/esm/b2b-rounded-icon.entry.js +1 -1
  268. package/dist/esm/b2b-scrollable-container.entry.js +1 -1
  269. package/dist/esm/b2b-search.entry.js +1 -1
  270. package/dist/esm/b2b-separator.entry.js +1 -1
  271. package/dist/esm/b2b-tab-group.entry.js +1 -1
  272. package/dist/esm/b2b-tab-panel.entry.js +1 -1
  273. package/dist/esm/b2b-tab.entry.js +1 -1
  274. package/dist/esm/b2b-table-row.entry.js +77 -21
  275. package/dist/esm/b2b-table-rowgroup.entry.js +85 -24
  276. package/dist/esm/b2b-table.entry.js +10 -10
  277. package/dist/esm/b2b-textarea.entry.js +1 -1
  278. package/dist/esm/b2b-toggle-button.entry.js +7 -7
  279. package/dist/esm/b2b-toggle-group.entry.js +3 -3
  280. package/dist/esm/b2b-tooltip.entry.js +4 -4
  281. package/dist/esm/b2b-wizard-icon.entry.js +1 -1
  282. package/dist/esm/b2b-wizard-step.entry.js +4 -4
  283. package/dist/esm/b2b-wizard.entry.js +2 -2
  284. package/dist/esm/{index-026605c2.js → index-dfdbf4b9.js} +88 -31
  285. package/dist/esm/loader.js +4 -4
  286. package/dist/esm/{table.types-9943c937.js → table.types-dd829d83.js} +2 -2
  287. package/dist/types/components/alert/alert.stories.d.ts +1 -1
  288. package/dist/types/components/anchor/anchor.stories.d.ts +1 -1
  289. package/dist/types/components/button/button.d.ts +2 -0
  290. package/dist/types/components/button/button.stories.d.ts +1 -1
  291. package/dist/types/components/card/card.stories.d.ts +1 -1
  292. package/dist/types/components/checkbox/checkbox.d.ts +8 -1
  293. package/dist/types/components/checkbox/checkbox.stories.d.ts +1 -1
  294. package/dist/types/components/checkbox-group/checkbox-group.stories.d.ts +1 -1
  295. package/dist/types/components/dropdown/dropdown.stories.d.ts +1 -1
  296. package/dist/types/components/grid/grid.stories.d.ts +1 -1
  297. package/dist/types/components/headline/headline.stories.d.ts +1 -1
  298. package/dist/types/components/icon/icon.stories.d.ts +1 -1
  299. package/dist/types/components/input/input.d.ts +2 -0
  300. package/dist/types/components/input/input.stories.d.ts +1 -1
  301. package/dist/types/components/input-group/input-group.d.ts +0 -4
  302. package/dist/types/components/input-group/input-group.stories.d.ts +1 -1
  303. package/dist/types/components/input-list/input-list.d.ts +2 -0
  304. package/dist/types/components/input-list/input-list.stories.d.ts +1 -1
  305. package/dist/types/components/label/label.stories.d.ts +1 -1
  306. package/dist/types/components/modal/modal.stories.d.ts +1 -1
  307. package/dist/types/components/pagination/pagination.stories.d.ts +1 -1
  308. package/dist/types/components/paragraph/paragraph.stories.d.ts +1 -1
  309. package/dist/types/components/radio/radio.stories.d.ts +1 -1
  310. package/dist/types/components/radio-group/radio-group.stories.d.ts +1 -1
  311. package/dist/types/components/required-separator/required-separator.stories.d.ts +1 -1
  312. package/dist/types/components/rounded-icon/rounded-icon.stories.d.ts +1 -1
  313. package/dist/types/components/scrollable-container/scrollable-container.stories.d.ts +1 -1
  314. package/dist/types/components/search/search.stories.d.ts +1 -1
  315. package/dist/types/components/separator/separator.stories.d.ts +1 -1
  316. package/dist/types/components/spinner/spinner.stories.d.ts +1 -1
  317. package/dist/types/components/tab-group/tab-group.stories.d.ts +1 -1
  318. package/dist/types/components/table/table-row/table-row.d.ts +23 -7
  319. package/dist/types/components/table/table-rowgroup/table-rowgroup.d.ts +12 -2
  320. package/dist/types/components/table/table.d.ts +1 -1
  321. package/dist/types/components/table/table.stories.d.ts +2 -1
  322. package/dist/types/components/table/utils.d.ts +4 -0
  323. package/dist/types/components/textarea/textarea.stories.d.ts +1 -1
  324. package/dist/types/components/toggle-group/toggle-group.stories.d.ts +1 -1
  325. package/dist/types/components/tooltip/tooltip.stories.d.ts +1 -1
  326. package/dist/types/components/wizard/wizard.stories.d.ts +1 -1
  327. package/dist/types/components/wizard-icon/wizard-icon.stories.d.ts +1 -1
  328. package/dist/types/components.d.ts +71 -9
  329. package/dist/types/docs/tokens/color.stories.d.ts +1 -1
  330. package/dist/types/docs/tokens/font.stories.d.ts +1 -1
  331. package/dist/types/docs/tokens/size.stories.d.ts +1 -1
  332. package/dist/types/stencil-public-runtime.d.ts +3 -0
  333. package/dist/types/utils/interfaces/content.interface.d.ts +4 -0
  334. package/dist/types/utils/interfaces/form.interface.d.ts +1 -0
  335. package/dist/types/utils/types/table.types.d.ts +7 -2
  336. package/dist/web-types.json +76 -6
  337. package/loader/index.d.ts +1 -1
  338. package/package.json +4 -4
  339. package/dist/b2b-core-components/p-0675225a.entry.js +0 -1
  340. package/dist/b2b-core-components/p-080a0741.entry.js +0 -1
  341. package/dist/b2b-core-components/p-0f8bd310.entry.js +0 -1
  342. package/dist/b2b-core-components/p-14f1b674.entry.js +0 -1
  343. package/dist/b2b-core-components/p-1eb784f9.entry.js +0 -1
  344. package/dist/b2b-core-components/p-21bfe96a.entry.js +0 -1
  345. package/dist/b2b-core-components/p-3cd9088a.entry.js +0 -1
  346. package/dist/b2b-core-components/p-42da7a57.entry.js +0 -1
  347. package/dist/b2b-core-components/p-4fc894c8.entry.js +0 -1
  348. package/dist/b2b-core-components/p-710600ca.entry.js +0 -1
  349. package/dist/b2b-core-components/p-83cb9d03.entry.js +0 -1
  350. package/dist/b2b-core-components/p-a7417890.js +0 -2
  351. package/dist/b2b-core-components/p-c9dcb35a.entry.js +0 -1
  352. package/dist/b2b-core-components/p-cf010e88.entry.js +0 -1
  353. package/dist/b2b-core-components/p-e3cd216c.entry.js +0 -1
  354. package/dist/b2b-core-components/p-fa6cd2ac.entry.js +0 -1
  355. package/dist/b2b-core-components/p-fe96d81a.entry.js +0 -1
  356. package/dist/cjs/b2b-checkbox.cjs.entry.js +0 -74
  357. /package/dist/b2b-core-components/{p-de2c1003.js → p-34eb99cb.js} +0 -0
@@ -0,0 +1,44 @@
1
+ import { newE2EPage } from '@stencil/core/testing';
2
+ describe('b2b-toggle-button', () => {
3
+ let page;
4
+ beforeEach(async () => {
5
+ page = await newE2EPage();
6
+ await page.setContent(`<b2b-toggle-button checked="false" name="toggle-1" label="Unselected" value="1"></b2b-toggle-button>`);
7
+ });
8
+ it('renders', async () => {
9
+ const element = await page.find('b2b-toggle-button');
10
+ expect(element).not.toBeNull();
11
+ });
12
+ it('checks the button when selected', async () => {
13
+ const element = await page.find('b2b-toggle-button');
14
+ await element.click();
15
+ await page.waitForChanges();
16
+ const check = await element.getProperty('checked');
17
+ expect(check).toBe(true);
18
+ });
19
+ it('emits its value when selected', async () => {
20
+ const element = await page.find('b2b-toggle-button');
21
+ const spy = await page.spyOnEvent('b2b-change');
22
+ await element.click();
23
+ await page.waitForChanges();
24
+ expect(spy).toHaveReceivedEvent();
25
+ expect(spy).toHaveReceivedEventDetail({ value: '1' });
26
+ });
27
+ it('should not emit when a button is disabled', async () => {
28
+ const element = await page.find('b2b-toggle-button');
29
+ await element.setProperty('disabled', true);
30
+ await page.waitForChanges();
31
+ const spy = await page.spyOnEvent('b2b-change');
32
+ await element.click();
33
+ await page.waitForChanges();
34
+ expect(spy).not.toHaveReceivedEvent();
35
+ });
36
+ it('should not emit when a button is already selected', async () => {
37
+ const element = await page.find('b2b-toggle-button');
38
+ const spy = await page.spyOnEvent('b2b-change');
39
+ await element.click();
40
+ await element.click();
41
+ await page.waitForChanges();
42
+ expect(spy).toHaveReceivedEventTimes(1);
43
+ });
44
+ });
@@ -35,12 +35,12 @@ export class B2bToggleButtonComponent {
35
35
  'b2b-toggle-button': true,
36
36
  'b2b-toggle-button--disabled': this.disabled,
37
37
  } }, h("input", { tabindex: 0, class: {
38
- 'b2b-toggle-button-input': true,
39
- 'b2b-toggle-button-input--disabled': this.disabled,
38
+ 'b2b-toggle-button__input': true,
39
+ 'b2b-toggle-button__input--disabled': this.disabled,
40
40
  }, "aria-labelledby": this.name, type: "radio", checked: this.checked && !this.disabled, disabled: this.disabled, name: this.name, value: this.value }), h("label", { id: this.name, tabindex: -1, class: {
41
- 'b2b-toggle-button-label': true,
42
- 'b2b-toggle-button-label--disabled': this.disabled,
43
- 'b2b-toggle-button-label--checked': this.checked && !this.disabled,
41
+ 'b2b-toggle-button__label': true,
42
+ 'b2b-toggle-button__label--disabled': this.disabled,
43
+ 'b2b-toggle-button__label--checked': this.checked && !this.disabled,
44
44
  } }, this.label))));
45
45
  }
46
46
  static get is() { return "b2b-toggle-button"; }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Mon, 03 Jul 2023 11:38:27 GMT
3
+ * Generated on Tue, 22 Aug 2023 12:55:37 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -122,7 +122,7 @@
122
122
  }
123
123
  /**
124
124
  * Do not edit directly
125
- * Generated on Mon, 03 Jul 2023 11:38:27 GMT
125
+ * Generated on Tue, 22 Aug 2023 12:55:37 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -239,6 +239,6 @@
239
239
  ::slotted(b2b-toggle-button[disabled]:first-child) {
240
240
  --b2b-border-left: 1px solid var(--b2b-color-grey-100);
241
241
  }
242
- .b2b-toggle-group-disabled ::slotted(b2b-toggle-button[disabled]) {
242
+ .b2b-toggle-group--disabled ::slotted(b2b-toggle-button[disabled]) {
243
243
  --b2b-border-left: 1px solid var(--b2b-color-grey-100);
244
244
  }
@@ -0,0 +1,65 @@
1
+ import { newE2EPage } from '@stencil/core/testing';
2
+ describe('b2b-toggle-group', () => {
3
+ let page;
4
+ beforeEach(async () => {
5
+ page = await newE2EPage();
6
+ await page.setContent(`<b2b-toggle-group name="toggle-group-1">
7
+ <b2b-toggle-button name="toggle-group-1" value="1" label="One"></b2b-toggle-button>
8
+ <b2b-toggle-button name="toggle-group-1" value="2" label="Two"></b2b-toggle-button>
9
+ </b2b-toggle-group>`);
10
+ });
11
+ it('should render the toggle group', async () => {
12
+ const element = await page.find('b2b-toggle-group');
13
+ expect(element).not.toBeNull();
14
+ });
15
+ it('should emit an event when a button is checked', async () => {
16
+ const firstButton = await page.find({ text: 'Two' });
17
+ const changeSpy = await page.spyOnEvent('b2b-group-change');
18
+ await firstButton.click();
19
+ await page.waitForChanges();
20
+ expect(changeSpy).toHaveReceivedEvent();
21
+ expect(changeSpy).toHaveReceivedEventDetail({ value: '2' });
22
+ });
23
+ it('should not emit an event when the checked button is already selected', async () => {
24
+ const firstButton = await page.find({ text: 'Two' });
25
+ const changeSpy = await page.spyOnEvent('b2b-group-change');
26
+ await firstButton.click();
27
+ await firstButton.click();
28
+ await page.waitForChanges();
29
+ expect(changeSpy).toHaveReceivedEventTimes(1);
30
+ });
31
+ it('should not select any buttons if the group is disabled', async () => {
32
+ const element = await page.find('b2b-toggle-group');
33
+ const changeSpy = await page.spyOnEvent('b2b-group-change');
34
+ await element.setProperty('disabled', true);
35
+ await page.waitForChanges();
36
+ const button = await page.find({ text: 'One' });
37
+ await button.click();
38
+ await page.waitForChanges();
39
+ expect(changeSpy).not.toHaveReceivedEvent();
40
+ });
41
+ it('should navigate and select a button by using a keyboard', async () => {
42
+ await page.keyboard.press('Tab');
43
+ await page.waitForChanges();
44
+ await page.keyboard.press('Space');
45
+ await page.waitForChanges();
46
+ const element = await page.find('b2b-toggle-button');
47
+ const checked = await element.getProperty('checked');
48
+ expect(checked).toBe(true);
49
+ });
50
+ it('should select first element if none other is pre-selected ', async () => {
51
+ const firstButton = await page.find('b2b-toggle-button');
52
+ const isSelected = await firstButton.getProperty('checked');
53
+ expect(isSelected).toBe(true);
54
+ });
55
+ it('should not select first element if any element is pre-selected ', async () => {
56
+ page = await newE2EPage();
57
+ await page.setContent(`<b2b-toggle-group name="toggle-group-1">
58
+ <b2b-toggle-button name="toggle-group-1" value="1" label="One"></b2b-toggle-button>
59
+ <b2b-toggle-button checked name="toggle-group-1" value="2" label="Two"></b2b-toggle-button>
60
+ </b2b-toggle-group>`);
61
+ const firstButton = await page.find('b2b-toggle-button');
62
+ const isSelected = await firstButton.getProperty('checked');
63
+ expect(isSelected).toBe(false);
64
+ });
65
+ });
@@ -47,7 +47,7 @@ export class B2BToggleGroup {
47
47
  render() {
48
48
  return (h(Host, null, h("div", { class: {
49
49
  'b2b-toggle-group': true,
50
- 'b2b-toggle-group-disabled': this.disabled,
50
+ 'b2b-toggle-group--disabled': this.disabled,
51
51
  } }, h("fieldset", null, h("slot", null)))));
52
52
  }
53
53
  static get is() { return "b2b-toggle-group"; }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Mon, 03 Jul 2023 11:38:27 GMT
3
+ * Generated on Tue, 22 Aug 2023 12:55:37 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -122,7 +122,7 @@
122
122
  }
123
123
  /**
124
124
  * Do not edit directly
125
- * Generated on Mon, 03 Jul 2023 11:38:27 GMT
125
+ * Generated on Tue, 22 Aug 2023 12:55:37 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -213,15 +213,15 @@
213
213
  font-family: ObcIcons;
214
214
  src: url("https://pattern-library.portal.otto.market/static/assets/fonts/obc-icons.woff");
215
215
  }
216
- .b2b-tooltip--trigger {
216
+ .b2b-tooltip__trigger {
217
217
  position: relative;
218
218
  }
219
- .b2b-tooltip--visible.b2b-tooltip--content, .b2b-tooltip--visible.b2b-tooltip--content::before {
219
+ .b2b-tooltip--visible.b2b-tooltip__content, .b2b-tooltip--visible.b2b-tooltip__content::before {
220
220
  opacity: 1;
221
221
  visibility: visible;
222
222
  transition-delay: 100ms;
223
223
  }
224
- .b2b-tooltip--content {
224
+ .b2b-tooltip__content {
225
225
  background-color: var(--b2b-color-black-100);
226
226
  white-space: pre-wrap;
227
227
  color: var(--b2b-color-white-100);
@@ -239,7 +239,7 @@
239
239
  z-index: 1000001;
240
240
  transition: opacity 0.4s ease;
241
241
  }
242
- .b2b-tooltip--content::before {
242
+ .b2b-tooltip__content::before {
243
243
  content: "";
244
244
  position: absolute;
245
245
  z-index: 1000001;
@@ -251,40 +251,40 @@
251
251
  visibility: hidden;
252
252
  transition: opacity 0.4s ease;
253
253
  }
254
- .b2b-tooltip--left .b2b-tooltip--content {
254
+ .b2b-tooltip--left .b2b-tooltip__content {
255
255
  inset: 50% calc(100% + 8px) auto auto;
256
256
  transform: translateY(-50%);
257
257
  }
258
- .b2b-tooltip--left .b2b-tooltip--content::before {
258
+ .b2b-tooltip--left .b2b-tooltip__content::before {
259
259
  top: calc(50% - 0.375rem);
260
260
  transform: rotate(270deg);
261
261
  left: 100%;
262
262
  margin-right: -0.75rem;
263
263
  }
264
- .b2b-tooltip--right .b2b-tooltip--content {
264
+ .b2b-tooltip--right .b2b-tooltip__content {
265
265
  inset: 50% auto auto calc(100% + 8px);
266
266
  transform: translateY(-50%);
267
267
  }
268
- .b2b-tooltip--right .b2b-tooltip--content::before {
268
+ .b2b-tooltip--right .b2b-tooltip__content::before {
269
269
  top: calc(50% - 0.375rem);
270
270
  transform: rotate(90deg);
271
271
  margin-left: -0.75rem;
272
272
  right: 100%;
273
273
  }
274
- .b2b-tooltip--bottom .b2b-tooltip--content {
274
+ .b2b-tooltip--bottom .b2b-tooltip__content {
275
275
  inset: calc(150% + 0.375rem) auto auto 50%;
276
276
  transform: translateX(-50%) translateY(-0.5rem);
277
277
  }
278
- .b2b-tooltip--bottom .b2b-tooltip--content::before {
278
+ .b2b-tooltip--bottom .b2b-tooltip__content::before {
279
279
  left: calc(50% - 0.375rem);
280
280
  margin-top: -0.7rem;
281
281
  transform: rotate(180deg) translateY(0.35rem);
282
282
  }
283
- .b2b-tooltip--top .b2b-tooltip--content {
283
+ .b2b-tooltip--top .b2b-tooltip__content {
284
284
  inset: auto auto 100% 50%;
285
285
  transform: translateX(-50%) translateY(-0.5rem);
286
286
  }
287
- .b2b-tooltip--top .b2b-tooltip--content::before {
287
+ .b2b-tooltip--top .b2b-tooltip__content::before {
288
288
  left: calc(50% - 0.375rem);
289
289
  margin-bottom: -0.75rem;
290
290
  top: 100%;
@@ -0,0 +1,64 @@
1
+ import { newE2EPage } from '@stencil/core/testing';
2
+ describe('B2B Tooltip', () => {
3
+ const expectToBeVisibleAfterTransition = async (page, tooltipDiv) => {
4
+ await page.$eval('b2b-tooltip', el => {
5
+ const tooltipElm = el.shadowRoot.querySelector('div');
6
+ tooltipElm.addEventListener('transitionend', () => {
7
+ expect(tooltipDiv.isVisible()).toBe(true);
8
+ });
9
+ });
10
+ };
11
+ it('renders', async () => {
12
+ const page = await newE2EPage();
13
+ await page.setContent('<b2b-tooltip content="I am a tooltip">trigger</b2b-tooltip>');
14
+ const element = await page.find('b2b-tooltip');
15
+ expect(element).toHaveClass('hydrated');
16
+ const tooltipDiv = await page.find('b2b-tooltip >>> div');
17
+ expect(await tooltipDiv.isVisible()).toBe(false);
18
+ });
19
+ it('appears on hover when no trigger is specified', async () => {
20
+ const page = await newE2EPage();
21
+ await page.setContent('<b2b-tooltip content="I am a tooltip">trigger</b2b-tooltip>');
22
+ const trigger = await page.find('b2b-tooltip >>> span');
23
+ await trigger.hover();
24
+ await page.waitForChanges();
25
+ const tooltipDiv = await page.find('b2b-tooltip >>> div');
26
+ expect(await tooltipDiv.isVisible()).toBe(true);
27
+ });
28
+ it('appears on focus when a focusable element is slotted and the trigger is set to focus', async () => {
29
+ const page = await newE2EPage();
30
+ await page.setContent('<b2b-tooltip content="I am a tooltip" trigger="focus"><button>Focus me</button></b2b-tooltip>');
31
+ const tooltipDiv = await page.find('b2b-tooltip >>> div');
32
+ expect(await tooltipDiv.isVisible()).toBe(false);
33
+ await page.keyboard.press('Tab');
34
+ await page.waitForChanges();
35
+ await expectToBeVisibleAfterTransition(page, tooltipDiv);
36
+ });
37
+ it('does not appear on hover when the trigger is set to focus', async () => {
38
+ const page = await newE2EPage();
39
+ await page.setContent('<b2b-tooltip content="I am a tooltip" trigger="focus"><button>Focus me</button></b2b-tooltip>');
40
+ const tooltipDiv = await page.find('b2b-tooltip >>> div');
41
+ const trigger = await page.find('b2b-tooltip >>> span');
42
+ await trigger.hover();
43
+ await page.waitForChanges();
44
+ expect(await tooltipDiv.isVisible()).toBe(false);
45
+ });
46
+ it('does not appear on hover when the trigger is set to custom', async () => {
47
+ const page = await newE2EPage();
48
+ await page.setContent('<b2b-tooltip content="I am a tooltip" trigger="custom"><button>Focus me</button></b2b-tooltip>');
49
+ const tooltipDiv = await page.find('b2b-tooltip >>> div');
50
+ const trigger = await page.find('b2b-tooltip >>> span');
51
+ await trigger.hover();
52
+ await page.waitForChanges();
53
+ expect(await tooltipDiv.isVisible()).toBe(false);
54
+ });
55
+ it('appears when the trigger is set to custom and the opened property changes', async () => {
56
+ const page = await newE2EPage();
57
+ await page.setContent('<b2b-tooltip content="I am a tooltip" trigger="custom" opened="false"><button>Focus me</button></b2b-tooltip>');
58
+ const element = await page.find('b2b-tooltip');
59
+ const tooltipDiv = await page.find('b2b-tooltip >>> div');
60
+ element.setAttribute('opened', true);
61
+ await page.waitForChanges();
62
+ await expectToBeVisibleAfterTransition(page, tooltipDiv);
63
+ });
64
+ });
@@ -61,9 +61,9 @@ export class B2BTooltipComponent {
61
61
  render() {
62
62
  return (h(Host, { onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave }, h("span", { class: {
63
63
  [`b2b-tooltip--${this.position}`]: true,
64
- 'b2b-tooltip--trigger': true,
64
+ 'b2b-tooltip__trigger': true,
65
65
  } }, h("slot", null), h("div", { class: {
66
- 'b2b-tooltip--content': true,
66
+ 'b2b-tooltip__content': true,
67
67
  'b2b-tooltip--visible': this.opened,
68
68
  } }, h("slot", { name: "content" }, this.content)))));
69
69
  }
@@ -8,8 +8,8 @@ export class WizardStepComponent {
8
8
  }
9
9
  render() {
10
10
  return (h(Host, null, h("div", { class: "b2b_wizard__step" }, h("b2b-wizard-icon", { step: this.step, state: this.state, checkIcon: this.checkIcon }), h("div", { class: {
11
- 'b2b_wizard__step-label': true,
12
- 'b2b_wizard__step-label--default': this.state === WizardStatus.DEFAULT,
11
+ 'b2b_wizard__step__label': true,
12
+ 'b2b_wizard__step__label--default': this.state === WizardStatus.DEFAULT,
13
13
  } }, h("slot", null)))));
14
14
  }
15
15
  static get is() { return "b2b-wizard-step"; }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Mon, 03 Jul 2023 11:38:27 GMT
3
+ * Generated on Tue, 22 Aug 2023 12:55:37 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -122,7 +122,7 @@
122
122
  }
123
123
  /**
124
124
  * Do not edit directly
125
- * Generated on Mon, 03 Jul 2023 11:38:27 GMT
125
+ * Generated on Tue, 22 Aug 2023 12:55:37 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -223,7 +223,7 @@
223
223
  gap: var(--b2b-size-space-50);
224
224
  padding: var(--b2b-size-space-50) 0;
225
225
  }
226
- .b2b_wizard__step-label--default {
226
+ .b2b_wizard__step__label--default {
227
227
  color: var(--b2b-color-icon-secondary);
228
228
  }
229
229
  ::slotted(b2b-wizard-step:not(:last-of-type)) {
@@ -0,0 +1,149 @@
1
+ import { newE2EPage } from '@stencil/core/testing';
2
+ import { WizardStatus } from '../../utils/types/wizard.types';
3
+ describe('B2B-Wizard', () => {
4
+ let page;
5
+ it('should render wizard component', async () => {
6
+ page = await newE2EPage();
7
+ await page.setContent(`<b2b-wizard active-step="3" check-icon>
8
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
9
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
10
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
11
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
12
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
13
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
14
+ </b2b-wizard>`);
15
+ const element = await page.find('b2b-wizard');
16
+ expect(element).not.toBeNull();
17
+ });
18
+ it('should render steps in order for default mode', async () => {
19
+ page = await newE2EPage();
20
+ await page.setContent(`<b2b-wizard active-step="3" check-icon>
21
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
22
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
23
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
24
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
25
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
26
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
27
+ </b2b-wizard>`);
28
+ const steps = await page.findAll('b2b-wizard b2b-wizard-step');
29
+ steps.map(async (step, index) => {
30
+ const stepNumber = await step.getProperty('step');
31
+ const expectedStep = (index + 1).toString();
32
+ expect(stepNumber).toBe(expectedStep);
33
+ });
34
+ });
35
+ it('should render active step with pending state', async () => {
36
+ page = await newE2EPage();
37
+ await page.setContent(`<b2b-wizard active-step="3" check-icon>
38
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
39
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
40
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
41
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
42
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
43
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
44
+ </b2b-wizard>`);
45
+ const steps = await page.findAll('b2b-wizard b2b-wizard-step');
46
+ const activeStep = steps[2];
47
+ const stepState = await activeStep.getProperty('state');
48
+ expect(stepState).toBe(WizardStatus.PENDING);
49
+ });
50
+ it('should render incomplete steps with default state', async () => {
51
+ page = await newE2EPage();
52
+ await page.setContent(`<b2b-wizard active-step="3" check-icon>
53
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
54
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
55
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
56
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
57
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
58
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
59
+ </b2b-wizard>`);
60
+ const steps = await page.findAll('b2b-wizard b2b-wizard-step');
61
+ const incompleteSteps = [steps[3], steps[4], steps[5]];
62
+ incompleteSteps.map(async (step) => {
63
+ const stepState = await step.getProperty('state');
64
+ expect(stepState).toBe(WizardStatus.DEFAULT);
65
+ });
66
+ });
67
+ it('should render completed steps with completed state', async () => {
68
+ page = await newE2EPage();
69
+ await page.setContent(`<b2b-wizard active-step="3" check-icon>
70
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
71
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
72
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
73
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
74
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
75
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
76
+ </b2b-wizard>`);
77
+ const steps = await page.findAll('b2b-wizard b2b-wizard-step');
78
+ const incompleteSteps = [steps[0], steps[1]];
79
+ incompleteSteps.map(async (step) => {
80
+ const stepState = await step.getProperty('state');
81
+ expect(stepState).toBe(WizardStatus.COMPLETED);
82
+ });
83
+ });
84
+ it('should not set steps state and order for custom mode', async () => {
85
+ page = await newE2EPage();
86
+ await page.setContent(`<b2b-wizard active-step="3" check-icon custom>
87
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
88
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
89
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
90
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
91
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
92
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
93
+ </b2b-wizard>`);
94
+ const steps = await page.findAll('b2b-wizard b2b-wizard-step');
95
+ steps.map(async (step) => {
96
+ // Expect default values
97
+ const stepNumber = await step.getProperty('step');
98
+ expect(stepNumber).toBe('1');
99
+ });
100
+ steps.map(async (step) => {
101
+ const stepState = await step.getProperty('state');
102
+ expect(stepState).toBe(WizardStatus.PENDING);
103
+ });
104
+ });
105
+ it('should render all steps completed when active-step is zero', async () => {
106
+ page = await newE2EPage();
107
+ await page.setContent(`<b2b-wizard active-step="0" check-icon>
108
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
109
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
110
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
111
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
112
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
113
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
114
+ </b2b-wizard>`);
115
+ const steps = await page.findAll('b2b-wizard b2b-wizard-step');
116
+ steps.map(async (step) => {
117
+ const stepState = await step.getProperty('state');
118
+ expect(stepState).toBe(WizardStatus.COMPLETED);
119
+ });
120
+ });
121
+ it('should be emitting a warning if rendering more than 6 steps', async () => {
122
+ global.console.warn = jest.fn();
123
+ page = await newE2EPage();
124
+ await page.setContent(`<b2b-wizard>
125
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
126
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
127
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
128
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
129
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
130
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
131
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
132
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
133
+ </b2b-wizard>`);
134
+ expect(console.warn).toBeCalled();
135
+ });
136
+ it('should be emitting an error if active-step is higher than total steps', async () => {
137
+ global.console.error = jest.fn();
138
+ page = await newE2EPage();
139
+ await page.setContent(`<b2b-wizard active-step="7" check-icon>
140
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
141
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
142
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
143
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
144
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
145
+ <b2b-wizard-step>This is the text</b2b-wizard-step>
146
+ </b2b-wizard>`);
147
+ expect(console.error).toBeCalled();
148
+ });
149
+ });
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Mon, 03 Jul 2023 11:38:27 GMT
3
+ * Generated on Tue, 22 Aug 2023 12:55:37 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -122,7 +122,7 @@
122
122
  }
123
123
  /**
124
124
  * Do not edit directly
125
- * Generated on Mon, 03 Jul 2023 11:38:27 GMT
125
+ * Generated on Tue, 22 Aug 2023 12:55:37 GMT
126
126
  */
127
127
  :root [data-theme="dark"] {
128
128
  --b2b-size-200: 5rem; /* 80px */
@@ -0,0 +1,32 @@
1
+ import { replacePropControls } from './replace-prop-controls';
2
+ describe('Get Args for Storybook', () => {
3
+ const mockComponentDocs = {
4
+ someProp: {
5
+ options: ['option1', 'option2'],
6
+ control: { type: 'radio' },
7
+ },
8
+ };
9
+ it('should override controls for props defined in controls param', () => {
10
+ const overrideControls = { someProp: 'select' };
11
+ const docs = replacePropControls(mockComponentDocs, overrideControls);
12
+ expect(docs['someProp'].control.type).toEqual('select');
13
+ });
14
+ it('should return undefined if component docs is undefined', () => {
15
+ const overrideControls = { someProp: 'select' };
16
+ const docs = replacePropControls(undefined, overrideControls);
17
+ expect(docs).toEqual(undefined);
18
+ });
19
+ it('should handle missing props', () => {
20
+ const overrideControls = { otherProp: 'select' };
21
+ const docs = replacePropControls(mockComponentDocs, overrideControls);
22
+ expect(docs).toEqual(mockComponentDocs);
23
+ });
24
+ it('should return default docs if controls is empty', () => {
25
+ const docs = replacePropControls(mockComponentDocs, {});
26
+ expect(docs).toEqual(mockComponentDocs);
27
+ });
28
+ it('should return default docs if controls is undefined', () => {
29
+ const docs = replacePropControls(mockComponentDocs);
30
+ expect(docs).toEqual(mockComponentDocs);
31
+ });
32
+ });
@@ -17,11 +17,15 @@ export const TableSortDirections = {
17
17
  ASC: 'ascending',
18
18
  DESC: 'descending',
19
19
  };
20
- export const TableRowTypes = {
20
+ export const TableAccordionRowTypes = {
21
21
  PARENT: 'parent',
22
22
  CHILD: 'child',
23
23
  HEADER: 'header',
24
24
  };
25
+ export const TableCheckboxTypes = {
26
+ HEADER: 'header',
27
+ ROW: 'row',
28
+ };
25
29
  export const TableColourOptions = {
26
30
  DEFAULT: 'default',
27
31
  SELECTED: 'selected',
@@ -0,0 +1,15 @@
1
+ import { format } from './utils';
2
+ describe('format', () => {
3
+ it('returns empty string for no names defined', () => {
4
+ expect(format(undefined, undefined, undefined)).toEqual('');
5
+ });
6
+ it('formats just first names', () => {
7
+ expect(format('Joseph', undefined, undefined)).toEqual('Joseph');
8
+ });
9
+ it('formats first and last names', () => {
10
+ expect(format('Joseph', undefined, 'Publique')).toEqual('Joseph Publique');
11
+ });
12
+ it('formats first, middle and last names', () => {
13
+ expect(format('Joseph', 'Quincy', 'Publique')).toEqual('Joseph Quincy Publique');
14
+ });
15
+ });