@otto-de/b2b-core-components 1.4.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (398) hide show
  1. package/dist/b2b-core-components/b2b-core-components.css +1 -1
  2. package/dist/b2b-core-components/b2b-core-components.esm.js +1 -1
  3. package/dist/b2b-core-components/p-01fd54a1.entry.js +1 -0
  4. package/dist/b2b-core-components/p-04fc18cd.entry.js +1 -0
  5. package/dist/b2b-core-components/p-06aa96a8.entry.js +1 -0
  6. package/dist/b2b-core-components/p-077217b3.entry.js +1 -0
  7. package/dist/b2b-core-components/p-0965b990.entry.js +1 -0
  8. package/dist/b2b-core-components/p-0beabdb4.entry.js +1 -0
  9. package/dist/b2b-core-components/p-163466cf.entry.js +1 -0
  10. package/dist/b2b-core-components/{p-c2bcf0a8.entry.js → p-197c1a6d.entry.js} +1 -1
  11. package/dist/b2b-core-components/p-1d007eea.entry.js +1 -0
  12. package/dist/b2b-core-components/{p-400b3111.entry.js → p-1e2752b2.entry.js} +1 -1
  13. package/dist/b2b-core-components/p-2328144b.entry.js +1 -0
  14. package/dist/b2b-core-components/{p-9184036b.entry.js → p-2ad8bdb6.entry.js} +1 -1
  15. package/dist/b2b-core-components/p-2d01e68a.entry.js +1 -0
  16. package/dist/b2b-core-components/{p-34f6555e.entry.js → p-3c0671ef.entry.js} +1 -1
  17. package/dist/b2b-core-components/p-42e7f397.entry.js +1 -0
  18. package/dist/b2b-core-components/p-44ccd8f4.entry.js +1 -0
  19. package/dist/b2b-core-components/p-542a358a.entry.js +1 -0
  20. package/dist/b2b-core-components/p-54fd68eb.entry.js +1 -0
  21. package/dist/b2b-core-components/p-60badad5.entry.js +1 -0
  22. package/dist/b2b-core-components/p-6140304e.entry.js +1 -0
  23. package/dist/b2b-core-components/{p-f0aa5e83.entry.js → p-681d6880.entry.js} +1 -1
  24. package/dist/b2b-core-components/p-8ad1bb92.entry.js +1 -0
  25. package/dist/b2b-core-components/p-90a3ffed.entry.js +1 -0
  26. package/dist/b2b-core-components/p-97ef9805.entry.js +1 -0
  27. package/dist/b2b-core-components/{p-48d4d224.entry.js → p-a50ea33f.entry.js} +1 -1
  28. package/dist/b2b-core-components/p-b3ccfc58.entry.js +1 -0
  29. package/dist/b2b-core-components/p-b6a8a06f.entry.js +1 -0
  30. package/dist/b2b-core-components/p-b8049234.entry.js +1 -0
  31. package/dist/b2b-core-components/p-bb5e7c53.js +1 -0
  32. package/dist/b2b-core-components/p-c294dd0c.entry.js +1 -0
  33. package/dist/b2b-core-components/p-d07210e2.entry.js +1 -0
  34. package/dist/b2b-core-components/p-d7bb8aa1.entry.js +1 -0
  35. package/dist/b2b-core-components/p-d83c2084.entry.js +1 -0
  36. package/dist/b2b-core-components/p-db7d2ec3.entry.js +1 -0
  37. package/dist/b2b-core-components/{p-9facba86.entry.js → p-dd79ab5b.entry.js} +1 -1
  38. package/dist/b2b-core-components/p-e5b78075.entry.js +1 -0
  39. package/dist/b2b-core-components/p-e811411a.entry.js +1 -0
  40. package/dist/b2b-core-components/p-f190bf79.entry.js +1 -0
  41. package/dist/b2b-core-components/p-f24515bf.entry.js +1 -0
  42. package/dist/b2b-core-components/p-f3ce95bf.js +2 -0
  43. package/dist/b2b-core-components/p-f7e9f889.entry.js +1 -0
  44. package/dist/cjs/b2b-alert.cjs.entry.js +4 -4
  45. package/dist/cjs/b2b-anchor.cjs.entry.js +2 -2
  46. package/dist/cjs/b2b-button_2.cjs.entry.js +13 -9
  47. package/dist/cjs/b2b-card.cjs.entry.js +2 -2
  48. package/dist/cjs/b2b-checkbox-group.cjs.entry.js +7 -5
  49. package/dist/cjs/b2b-checkbox_3.cjs.entry.js +206 -0
  50. package/dist/cjs/b2b-core-components.cjs.js +3 -3
  51. package/dist/cjs/b2b-dropdown.cjs.entry.js +3 -3
  52. package/dist/cjs/b2b-grid-col.cjs.entry.js +1 -1
  53. package/dist/cjs/b2b-grid-row.cjs.entry.js +2 -2
  54. package/dist/cjs/b2b-grid.cjs.entry.js +1 -1
  55. package/dist/cjs/b2b-headline.cjs.entry.js +2 -2
  56. package/dist/cjs/b2b-icon.cjs.entry.js +4 -4
  57. package/dist/cjs/b2b-input-group_2.cjs.entry.js +12 -9
  58. package/dist/cjs/b2b-input-label.cjs.entry.js +1 -1
  59. package/dist/cjs/b2b-input_2.cjs.entry.js +8 -7
  60. package/dist/cjs/b2b-label.cjs.entry.js +2 -2
  61. package/dist/cjs/b2b-modal.cjs.entry.js +5 -5
  62. package/dist/cjs/b2b-pagination.cjs.entry.js +5 -5
  63. package/dist/cjs/b2b-paragraph.cjs.entry.js +5 -5
  64. package/dist/cjs/b2b-radio-button.cjs.entry.js +2 -2
  65. package/dist/cjs/b2b-radio-group.cjs.entry.js +2 -2
  66. package/dist/cjs/b2b-required-separator.cjs.entry.js +3 -3
  67. package/dist/cjs/b2b-rounded-icon.cjs.entry.js +4 -2
  68. package/dist/cjs/b2b-scrollable-container.cjs.entry.js +2 -2
  69. package/dist/cjs/b2b-search.cjs.entry.js +6 -1
  70. package/dist/cjs/b2b-separator.cjs.entry.js +2 -2
  71. package/dist/cjs/b2b-tab-group.cjs.entry.js +1 -1
  72. package/dist/cjs/b2b-tab-panel.cjs.entry.js +2 -2
  73. package/dist/cjs/b2b-tab.cjs.entry.js +2 -2
  74. package/dist/cjs/b2b-table-row.cjs.entry.js +78 -23
  75. package/dist/cjs/b2b-table-rowgroup.cjs.entry.js +87 -26
  76. package/dist/cjs/b2b-table.cjs.entry.js +13 -13
  77. package/dist/cjs/b2b-textarea.cjs.entry.js +2 -2
  78. package/dist/cjs/b2b-toggle-button.cjs.entry.js +7 -7
  79. package/dist/cjs/b2b-toggle-group.cjs.entry.js +3 -3
  80. package/dist/cjs/b2b-tooltip.cjs.entry.js +4 -4
  81. package/dist/cjs/b2b-wizard-icon.cjs.entry.js +6 -4
  82. package/dist/cjs/b2b-wizard-step.cjs.entry.js +26 -0
  83. package/dist/cjs/b2b-wizard.cjs.entry.js +61 -0
  84. package/dist/cjs/{index-496aa5dd.js → index-04e07a00.js} +100 -35
  85. package/dist/cjs/loader.cjs.js +3 -3
  86. package/dist/cjs/{types-ef85a0bf.js → table.types-00c8228a.js} +4 -4
  87. package/dist/cjs/wizard.types-690c64bb.js +10 -0
  88. package/dist/collection/collection-manifest.json +4 -2
  89. package/dist/collection/components/alert/alert.css +8 -9
  90. package/dist/collection/components/alert/alert.e2e.js +67 -0
  91. package/dist/collection/components/alert/alert.js +2 -2
  92. package/dist/collection/components/anchor/anchor.css +3 -4
  93. package/dist/collection/components/anchor/anchor.spec.js +68 -0
  94. package/dist/collection/components/button/button.css +36 -41
  95. package/dist/collection/components/button/button.e2e.js +80 -0
  96. package/dist/collection/components/button/button.js +31 -6
  97. package/dist/collection/components/card/card.css +3 -4
  98. package/dist/collection/components/card/card.e2e.js +110 -0
  99. package/dist/collection/components/card/card.spec.js +32 -0
  100. package/dist/collection/components/checkbox/checkbox.css +36 -16
  101. package/dist/collection/components/checkbox/checkbox.e2e.js +30 -0
  102. package/dist/collection/components/checkbox/checkbox.js +81 -6
  103. package/dist/collection/components/checkbox/checkbox.spec.js +45 -0
  104. package/dist/collection/components/checkbox-group/checkbox-group.css +7 -8
  105. package/dist/collection/components/checkbox-group/checkbox-group.e2e.js +78 -0
  106. package/dist/collection/components/checkbox-group/checkbox-group.js +5 -3
  107. package/dist/collection/components/checkbox-group/checkbox-group.spec.js +38 -0
  108. package/dist/collection/components/dropdown/dropdown.css +9 -10
  109. package/dist/collection/components/dropdown/dropdown.e2e.js +48 -0
  110. package/dist/collection/components/dropdown/dropdown.js +1 -1
  111. package/dist/collection/components/dropdown/dropdown.spec.js +52 -0
  112. package/dist/collection/components/grid/grid.e2e.js +17 -0
  113. package/dist/collection/components/grid/row.js +1 -1
  114. package/dist/collection/components/headline/headline.css +3 -4
  115. package/dist/collection/components/headline/headline.e2e.js +13 -0
  116. package/dist/collection/components/headline/headline.spec.js +67 -0
  117. package/dist/collection/components/icon/icon.css +10 -11
  118. package/dist/collection/components/icon/icon.js +2 -2
  119. package/dist/collection/components/icon/icon.spec.js +21 -0
  120. package/dist/collection/components/input/input.css +16 -17
  121. package/dist/collection/components/input/input.e2e.js +43 -0
  122. package/dist/collection/components/input/input.js +26 -4
  123. package/dist/collection/components/input/input.spec.js +45 -0
  124. package/dist/collection/components/input-group/input-group.css +6 -7
  125. package/dist/collection/components/input-group/input-group.e2e.js +76 -0
  126. package/dist/collection/components/input-group/input-group.js +6 -4
  127. package/dist/collection/components/input-group/input-group.spec.js +56 -0
  128. package/dist/collection/components/input-label/input-label.e2e.js +10 -0
  129. package/dist/collection/components/input-list/input-list.css +8 -9
  130. package/dist/collection/components/input-list/input-list.e2e.js +227 -0
  131. package/dist/collection/components/input-list/input-list.js +24 -2
  132. package/dist/collection/components/label/label.css +4 -5
  133. package/dist/collection/components/label/label.e2e.js +17 -0
  134. package/dist/collection/components/label/label.spec.js +58 -0
  135. package/dist/collection/components/modal/modal.css +14 -20
  136. package/dist/collection/components/modal/modal.e2e.js +115 -0
  137. package/dist/collection/components/modal/modal.js +3 -3
  138. package/dist/collection/components/pagination/pagination.css +8 -9
  139. package/dist/collection/components/pagination/pagination.e2e.js +256 -0
  140. package/dist/collection/components/pagination/pagination.js +3 -3
  141. package/dist/collection/components/pagination/pagination.spec.js +104 -0
  142. package/dist/collection/components/paragraph/paragraph.css +11 -12
  143. package/dist/collection/components/paragraph/paragraph.e2e.js +13 -0
  144. package/dist/collection/components/paragraph/paragraph.js +3 -3
  145. package/dist/collection/components/radio/radio.css +4 -5
  146. package/dist/collection/components/radio/radio.e2e.js +36 -0
  147. package/dist/collection/components/radio/radio.spec.js +38 -0
  148. package/dist/collection/components/radio-group/radio-group.css +4 -5
  149. package/dist/collection/components/radio-group/radio-group.e2e.js +71 -0
  150. package/dist/collection/components/radio-group/radio-group.spec.js +31 -0
  151. package/dist/collection/components/required-separator/required-separator.css +5 -6
  152. package/dist/collection/components/required-separator/required-separator.e2e.js +17 -0
  153. package/dist/collection/components/required-separator/required-separator.js +1 -1
  154. package/dist/collection/components/rounded-icon/rounded-icon.css +4 -5
  155. package/dist/collection/components/rounded-icon/rounded-icon.js +19 -0
  156. package/dist/collection/components/scrollable-container/scrollable-container.css +3 -4
  157. package/dist/collection/components/search/search.e2e.js +97 -0
  158. package/dist/collection/components/search/search.js +14 -0
  159. package/dist/collection/components/separator/separator.css +3 -4
  160. package/dist/collection/components/separator/separator.e2e.js +22 -0
  161. package/dist/collection/components/spinner/spinner.css +3 -4
  162. package/dist/collection/components/spinner/spinner.e2e.js +12 -0
  163. package/dist/collection/components/spinner/spinner.spec.js +41 -0
  164. package/dist/collection/components/tab/tab.css +3 -4
  165. package/dist/collection/components/tab/tab.e2e.js +35 -0
  166. package/dist/collection/components/tab/tab.spec.js +31 -0
  167. package/dist/collection/components/tab-group/tab-group.e2e.js +98 -0
  168. package/dist/collection/components/tab-panel/tab-panel.css +3 -4
  169. package/dist/collection/components/tab-panel/tab-panel.e2e.js +12 -0
  170. package/dist/collection/components/tab-panel/tab-panel.spec.js +10 -0
  171. package/dist/collection/components/table/stories.data.js +6 -6
  172. package/dist/collection/components/table/table-cell/table-cell.css +3 -4
  173. package/dist/collection/components/table/table-cell/table-cell.js +4 -4
  174. package/dist/collection/components/table/table-header/table-header.css +18 -19
  175. package/dist/collection/components/table/table-header/table-header.js +7 -7
  176. package/dist/collection/components/table/table-row/table-row.css +4 -5
  177. package/dist/collection/components/table/table-row/table-row.js +187 -28
  178. package/dist/collection/components/table/table-rowgroup/table-rowgroup.css +4 -5
  179. package/dist/collection/components/table/table-rowgroup/table-rowgroup.js +119 -24
  180. package/dist/collection/components/table/table.css +3 -4
  181. package/dist/collection/components/table/table.e2e.js +370 -0
  182. package/dist/collection/components/table/table.js +10 -10
  183. package/dist/collection/components/table/table.stories.js +17 -8
  184. package/dist/collection/components/table/utils.js +18 -0
  185. package/dist/collection/components/textarea/textarea.css +4 -5
  186. package/dist/collection/components/textarea/textarea.e2e.js +91 -0
  187. package/dist/collection/components/toggle-button/toggle-button.css +10 -11
  188. package/dist/collection/components/toggle-button/toggle-button.e2e.js +44 -0
  189. package/dist/collection/components/toggle-button/toggle-button.js +5 -5
  190. package/dist/collection/components/toggle-group/toggle-group.css +4 -5
  191. package/dist/collection/components/toggle-group/toggle-group.e2e.js +65 -0
  192. package/dist/collection/components/toggle-group/toggle-group.js +1 -1
  193. package/dist/collection/components/tooltip/tooltip.css +16 -17
  194. package/dist/collection/components/tooltip/tooltip.e2e.js +64 -0
  195. package/dist/collection/components/tooltip/tooltip.js +2 -2
  196. package/dist/collection/components/wizard/wizard-step.js +95 -0
  197. package/dist/collection/components/wizard/wizard.css +240 -0
  198. package/dist/collection/components/wizard/wizard.e2e.js +149 -0
  199. package/dist/collection/components/wizard/wizard.js +125 -0
  200. package/dist/collection/components/wizard/wizard.stories.js +44 -0
  201. package/dist/collection/components/wizard-icon/wizard-icon.css +3 -4
  202. package/dist/collection/components/wizard-icon/wizard-icon.js +38 -8
  203. package/dist/collection/components/wizard-icon/wizard-icon.stories.js +14 -3
  204. package/dist/collection/docs/config/replace-prop-controls.spec.js +32 -0
  205. package/dist/collection/{components/table/types.js → utils/types/table.types.js} +7 -3
  206. package/dist/collection/utils/types/wizard.types.js +6 -0
  207. package/dist/collection/utils/utils.spec.js +15 -0
  208. package/dist/components/b2b-alert.js +4 -4
  209. package/dist/components/b2b-anchor.js +2 -2
  210. package/dist/components/b2b-card.js +2 -2
  211. package/dist/components/b2b-checkbox-group.js +7 -5
  212. package/dist/components/b2b-checkbox.js +1 -99
  213. package/dist/components/b2b-dropdown.js +3 -3
  214. package/dist/components/b2b-grid-col.js +1 -1
  215. package/dist/components/b2b-grid-row.js +2 -2
  216. package/dist/components/b2b-grid.js +1 -1
  217. package/dist/components/b2b-label.js +2 -2
  218. package/dist/components/b2b-modal.js +5 -5
  219. package/dist/components/b2b-pagination.js +5 -5
  220. package/dist/components/b2b-paragraph.js +5 -5
  221. package/dist/components/b2b-radio-button.js +2 -2
  222. package/dist/components/b2b-radio-group.js +2 -2
  223. package/dist/components/b2b-required-separator.js +3 -3
  224. package/dist/components/b2b-scrollable-container.js +2 -2
  225. package/dist/components/b2b-search.js +7 -2
  226. package/dist/components/b2b-tab-group.js +1 -1
  227. package/dist/components/b2b-tab-panel.js +2 -2
  228. package/dist/components/b2b-tab.js +2 -2
  229. package/dist/components/b2b-table-row.js +97 -26
  230. package/dist/components/b2b-table-rowgroup.js +91 -27
  231. package/dist/components/b2b-table.js +11 -11
  232. package/dist/components/b2b-textarea.js +2 -2
  233. package/dist/components/b2b-toggle-button.js +7 -7
  234. package/dist/components/b2b-toggle-group.js +3 -3
  235. package/dist/components/b2b-tooltip.js +4 -4
  236. package/dist/components/b2b-wizard-icon.js +1 -47
  237. package/dist/components/b2b-wizard-step.d.ts +11 -0
  238. package/dist/components/b2b-wizard-step.js +62 -0
  239. package/dist/components/b2b-wizard.d.ts +11 -0
  240. package/dist/components/b2b-wizard.js +79 -0
  241. package/dist/components/button.js +13 -8
  242. package/dist/components/checkbox.js +123 -0
  243. package/dist/components/headline.js +2 -2
  244. package/dist/components/icon.js +4 -4
  245. package/dist/components/input-group.js +8 -6
  246. package/dist/components/input-label.js +1 -1
  247. package/dist/components/input-list-option.js +2 -2
  248. package/dist/components/input-list.js +6 -4
  249. package/dist/components/input.js +8 -6
  250. package/dist/components/rounded-icon.js +5 -2
  251. package/dist/components/separator.js +2 -2
  252. package/dist/components/spinner.js +2 -2
  253. package/dist/components/table-cell.js +3 -3
  254. package/dist/components/table-header.js +7 -7
  255. package/dist/components/{types.js → table.types.js} +4 -4
  256. package/dist/components/wizard-icon.js +52 -0
  257. package/dist/components/wizard.types.js +8 -0
  258. package/dist/custom-elements.json +132 -13
  259. package/dist/esm/b2b-alert.entry.js +4 -4
  260. package/dist/esm/b2b-anchor.entry.js +2 -2
  261. package/dist/esm/b2b-button_2.entry.js +13 -9
  262. package/dist/esm/b2b-card.entry.js +2 -2
  263. package/dist/esm/b2b-checkbox-group.entry.js +7 -5
  264. package/dist/esm/b2b-checkbox_3.entry.js +200 -0
  265. package/dist/esm/b2b-core-components.js +4 -4
  266. package/dist/esm/b2b-dropdown.entry.js +3 -3
  267. package/dist/esm/b2b-grid-col.entry.js +1 -1
  268. package/dist/esm/b2b-grid-row.entry.js +2 -2
  269. package/dist/esm/b2b-grid.entry.js +1 -1
  270. package/dist/esm/b2b-headline.entry.js +2 -2
  271. package/dist/esm/b2b-icon.entry.js +4 -4
  272. package/dist/esm/b2b-input-group_2.entry.js +12 -9
  273. package/dist/esm/b2b-input-label.entry.js +1 -1
  274. package/dist/esm/b2b-input_2.entry.js +8 -7
  275. package/dist/esm/b2b-label.entry.js +2 -2
  276. package/dist/esm/b2b-modal.entry.js +5 -5
  277. package/dist/esm/b2b-pagination.entry.js +5 -5
  278. package/dist/esm/b2b-paragraph.entry.js +5 -5
  279. package/dist/esm/b2b-radio-button.entry.js +2 -2
  280. package/dist/esm/b2b-radio-group.entry.js +2 -2
  281. package/dist/esm/b2b-required-separator.entry.js +3 -3
  282. package/dist/esm/b2b-rounded-icon.entry.js +4 -2
  283. package/dist/esm/b2b-scrollable-container.entry.js +2 -2
  284. package/dist/esm/b2b-search.entry.js +6 -1
  285. package/dist/esm/b2b-separator.entry.js +2 -2
  286. package/dist/esm/b2b-tab-group.entry.js +1 -1
  287. package/dist/esm/b2b-tab-panel.entry.js +2 -2
  288. package/dist/esm/b2b-tab.entry.js +2 -2
  289. package/dist/esm/b2b-table-row.entry.js +77 -22
  290. package/dist/esm/b2b-table-rowgroup.entry.js +85 -24
  291. package/dist/esm/b2b-table.entry.js +11 -11
  292. package/dist/esm/b2b-textarea.entry.js +2 -2
  293. package/dist/esm/b2b-toggle-button.entry.js +7 -7
  294. package/dist/esm/b2b-toggle-group.entry.js +3 -3
  295. package/dist/esm/b2b-tooltip.entry.js +4 -4
  296. package/dist/esm/b2b-wizard-icon.entry.js +6 -4
  297. package/dist/esm/b2b-wizard-step.entry.js +22 -0
  298. package/dist/esm/b2b-wizard.entry.js +57 -0
  299. package/dist/esm/{index-026605c2.js → index-dfdbf4b9.js} +100 -35
  300. package/dist/esm/loader.js +4 -4
  301. package/dist/esm/{types-5aa59787.js → table.types-dd829d83.js} +4 -4
  302. package/dist/esm/wizard.types-2a03b8e0.js +8 -0
  303. package/dist/types/components/alert/alert.stories.d.ts +1 -1
  304. package/dist/types/components/anchor/anchor.stories.d.ts +1 -1
  305. package/dist/types/components/button/button.d.ts +2 -0
  306. package/dist/types/components/button/button.stories.d.ts +1 -1
  307. package/dist/types/components/card/card.stories.d.ts +1 -1
  308. package/dist/types/components/checkbox/checkbox.d.ts +8 -1
  309. package/dist/types/components/checkbox/checkbox.stories.d.ts +1 -1
  310. package/dist/types/components/checkbox-group/checkbox-group.stories.d.ts +1 -1
  311. package/dist/types/components/dropdown/dropdown.stories.d.ts +1 -1
  312. package/dist/types/components/grid/grid.stories.d.ts +1 -1
  313. package/dist/types/components/headline/headline.stories.d.ts +1 -1
  314. package/dist/types/components/icon/icon.stories.d.ts +1 -1
  315. package/dist/types/components/input/input.d.ts +2 -0
  316. package/dist/types/components/input/input.stories.d.ts +1 -1
  317. package/dist/types/components/input-group/input-group.stories.d.ts +1 -1
  318. package/dist/types/components/input-list/input-list.d.ts +2 -0
  319. package/dist/types/components/input-list/input-list.stories.d.ts +1 -1
  320. package/dist/types/components/label/label.stories.d.ts +1 -1
  321. package/dist/types/components/modal/modal.stories.d.ts +1 -1
  322. package/dist/types/components/pagination/pagination.stories.d.ts +1 -1
  323. package/dist/types/components/paragraph/paragraph.stories.d.ts +1 -1
  324. package/dist/types/components/radio/radio.stories.d.ts +1 -1
  325. package/dist/types/components/radio-group/radio-group.stories.d.ts +1 -1
  326. package/dist/types/components/required-separator/required-separator.stories.d.ts +1 -1
  327. package/dist/types/components/rounded-icon/rounded-icon.d.ts +4 -0
  328. package/dist/types/components/rounded-icon/rounded-icon.stories.d.ts +1 -1
  329. package/dist/types/components/scrollable-container/scrollable-container.stories.d.ts +1 -1
  330. package/dist/types/components/search/search.d.ts +1 -0
  331. package/dist/types/components/search/search.stories.d.ts +1 -1
  332. package/dist/types/components/separator/separator.stories.d.ts +1 -1
  333. package/dist/types/components/spinner/spinner.stories.d.ts +1 -1
  334. package/dist/types/components/tab-group/tab-group.stories.d.ts +1 -1
  335. package/dist/types/components/table/table-cell/table-cell.d.ts +1 -1
  336. package/dist/types/components/table/table-header/table-header.d.ts +1 -1
  337. package/dist/types/components/table/table-row/table-row.d.ts +23 -7
  338. package/dist/types/components/table/table-rowgroup/table-rowgroup.d.ts +13 -3
  339. package/dist/types/components/table/table.d.ts +2 -2
  340. package/dist/types/components/table/table.stories.d.ts +2 -1
  341. package/dist/types/components/table/utils.d.ts +4 -0
  342. package/dist/types/components/textarea/textarea.stories.d.ts +1 -1
  343. package/dist/types/components/toggle-group/toggle-group.stories.d.ts +1 -1
  344. package/dist/types/components/tooltip/tooltip.stories.d.ts +1 -1
  345. package/dist/types/components/wizard/wizard-step.d.ts +11 -0
  346. package/dist/types/components/wizard/wizard.d.ts +19 -0
  347. package/dist/types/components/wizard/wizard.stories.d.ts +5 -0
  348. package/dist/types/components/wizard-icon/wizard-icon.d.ts +6 -2
  349. package/dist/types/components/wizard-icon/wizard-icon.stories.d.ts +3 -1
  350. package/dist/types/components.d.ts +167 -13
  351. package/dist/types/docs/tokens/color.stories.d.ts +1 -1
  352. package/dist/types/docs/tokens/font.stories.d.ts +1 -1
  353. package/dist/types/docs/tokens/size.stories.d.ts +1 -1
  354. package/dist/types/stencil-public-runtime.d.ts +3 -0
  355. package/dist/types/utils/interfaces/content.interface.d.ts +4 -0
  356. package/dist/types/utils/interfaces/form.interface.d.ts +1 -0
  357. package/dist/types/{components/table/types.d.ts → utils/types/table.types.d.ts} +7 -2
  358. package/dist/types/utils/types/wizard.types.d.ts +8 -0
  359. package/dist/web-types.json +184 -9
  360. package/loader/index.d.ts +1 -1
  361. package/package.json +5 -5
  362. package/dist/b2b-core-components/p-08a50b6c.entry.js +0 -1
  363. package/dist/b2b-core-components/p-10414c0b.entry.js +0 -1
  364. package/dist/b2b-core-components/p-144a3c59.entry.js +0 -1
  365. package/dist/b2b-core-components/p-1493f7df.entry.js +0 -1
  366. package/dist/b2b-core-components/p-14f1b674.entry.js +0 -1
  367. package/dist/b2b-core-components/p-15a499b0.entry.js +0 -1
  368. package/dist/b2b-core-components/p-22dab2b4.entry.js +0 -1
  369. package/dist/b2b-core-components/p-4b25559c.entry.js +0 -1
  370. package/dist/b2b-core-components/p-515eb49e.entry.js +0 -1
  371. package/dist/b2b-core-components/p-541ffefb.entry.js +0 -1
  372. package/dist/b2b-core-components/p-5572aab3.entry.js +0 -1
  373. package/dist/b2b-core-components/p-5c316460.entry.js +0 -1
  374. package/dist/b2b-core-components/p-686d6598.entry.js +0 -1
  375. package/dist/b2b-core-components/p-6e0e6acc.entry.js +0 -1
  376. package/dist/b2b-core-components/p-6e3b27cd.entry.js +0 -1
  377. package/dist/b2b-core-components/p-7af1b977.entry.js +0 -1
  378. package/dist/b2b-core-components/p-7ca9b704.entry.js +0 -1
  379. package/dist/b2b-core-components/p-81a52d1a.entry.js +0 -1
  380. package/dist/b2b-core-components/p-8970ae74.entry.js +0 -1
  381. package/dist/b2b-core-components/p-925e40af.entry.js +0 -1
  382. package/dist/b2b-core-components/p-965ae161.entry.js +0 -1
  383. package/dist/b2b-core-components/p-99f8cf34.entry.js +0 -1
  384. package/dist/b2b-core-components/p-a6248754.entry.js +0 -1
  385. package/dist/b2b-core-components/p-a7417890.js +0 -2
  386. package/dist/b2b-core-components/p-b6e0a6ea.entry.js +0 -1
  387. package/dist/b2b-core-components/p-ba74cde5.entry.js +0 -1
  388. package/dist/b2b-core-components/p-bf4c58dc.entry.js +0 -1
  389. package/dist/b2b-core-components/p-d6ce3259.entry.js +0 -1
  390. package/dist/b2b-core-components/p-da6a1f55.entry.js +0 -1
  391. package/dist/b2b-core-components/p-f0c565ef.entry.js +0 -1
  392. package/dist/b2b-core-components/p-fc639b29.entry.js +0 -1
  393. package/dist/b2b-core-components/p-ff49e330.entry.js +0 -1
  394. package/dist/cjs/b2b-checkbox.cjs.entry.js +0 -74
  395. package/dist/cjs/b2b-table-cell_2.cjs.entry.js +0 -119
  396. package/dist/esm/b2b-checkbox.entry.js +0 -70
  397. package/dist/esm/b2b-table-cell_2.entry.js +0 -114
  398. /package/dist/b2b-core-components/{p-4130f1ae.js → p-34eb99cb.js} +0 -0
@@ -0,0 +1,95 @@
1
+ import { h, Host } from '@stencil/core';
2
+ import { WizardStatus } from '../../utils/types/wizard.types';
3
+ export class WizardStepComponent {
4
+ constructor() {
5
+ this.state = 'pending';
6
+ this.step = '1';
7
+ this.checkIcon = true;
8
+ }
9
+ render() {
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,
13
+ } }, h("slot", null)))));
14
+ }
15
+ static get is() { return "b2b-wizard-step"; }
16
+ static get encapsulation() { return "shadow"; }
17
+ static get originalStyleUrls() {
18
+ return {
19
+ "$": ["wizard.scss"]
20
+ };
21
+ }
22
+ static get styleUrls() {
23
+ return {
24
+ "$": ["wizard.css"]
25
+ };
26
+ }
27
+ static get properties() {
28
+ return {
29
+ "state": {
30
+ "type": "string",
31
+ "mutable": false,
32
+ "complexType": {
33
+ "original": "WizardStatus",
34
+ "resolved": "\"completed\" | \"default\" | \"disabled\" | \"pending\"",
35
+ "references": {
36
+ "WizardStatus": {
37
+ "location": "import",
38
+ "path": "../../utils/types/wizard.types"
39
+ }
40
+ }
41
+ },
42
+ "required": false,
43
+ "optional": false,
44
+ "docs": {
45
+ "tags": [],
46
+ "text": "Use when wizard has property custom true. The state of the step"
47
+ },
48
+ "attribute": "state",
49
+ "reflect": false,
50
+ "defaultValue": "'pending'"
51
+ },
52
+ "step": {
53
+ "type": "string",
54
+ "mutable": false,
55
+ "complexType": {
56
+ "original": "WizardSteps",
57
+ "resolved": "\"1\" | \"2\" | \"3\" | \"4\" | \"5\" | \"6\"",
58
+ "references": {
59
+ "WizardSteps": {
60
+ "location": "import",
61
+ "path": "../../utils/types/wizard.types"
62
+ }
63
+ }
64
+ },
65
+ "required": false,
66
+ "optional": false,
67
+ "docs": {
68
+ "tags": [],
69
+ "text": "Use when wizard has property custom true. The step number"
70
+ },
71
+ "attribute": "step",
72
+ "reflect": false,
73
+ "defaultValue": "'1'"
74
+ },
75
+ "checkIcon": {
76
+ "type": "boolean",
77
+ "mutable": false,
78
+ "complexType": {
79
+ "original": "boolean",
80
+ "resolved": "boolean",
81
+ "references": {}
82
+ },
83
+ "required": false,
84
+ "optional": false,
85
+ "docs": {
86
+ "tags": [],
87
+ "text": "Defaults to true. It will show a checkmark icon when a step is completed.\nSet as false to show the step number"
88
+ },
89
+ "attribute": "check-icon",
90
+ "reflect": false,
91
+ "defaultValue": "true"
92
+ }
93
+ };
94
+ }
95
+ }
@@ -0,0 +1,240 @@
1
+ /**
2
+ * Do not edit directly
3
+ * Generated on Tue, 22 Aug 2023 11:28:34 GMT
4
+ */
5
+ :root, :host {
6
+ --b2b-size-200: 5rem; /* 80px */
7
+ --b2b-size-160: 4rem; /* 64px */
8
+ --b2b-size-150: 3.75rem; /* 60px */
9
+ --b2b-size-140: 3.5rem; /* 56px */
10
+ --b2b-size-120: 3rem; /* 48px */
11
+ --b2b-size-100: 2.5rem; /* 40px */
12
+ --b2b-size-90: 2.25rem; /* 36px */
13
+ --b2b-size-80: 2rem; /* 32px */
14
+ --b2b-size-70: 1.75rem; /* 28px */
15
+ --b2b-size-60: 1.5rem; /* 24px */
16
+ --b2b-size-55: 1.375rem; /* 22px */
17
+ --b2b-size-53: 1.3125rem; /* 21px */
18
+ --b2b-size-50: 1.25rem; /* 20px */
19
+ --b2b-size-45: 1.125rem; /* 18px */
20
+ --b2b-size-40: 1rem; /* 16px */
21
+ --b2b-size-35: 0.875rem; /* 14px */
22
+ --b2b-size-30: 0.75rem; /* 12px */
23
+ --b2b-size-25: 0.625rem; /* 10px */
24
+ --b2b-size-20: 0.5rem; /* 8px */
25
+ --b2b-size-15: 0.375rem; /* 6px */
26
+ --b2b-size-10: 0.25rem; /* 4px */
27
+ --b2b-size-7: 0.1875rem; /* 3px */
28
+ --b2b-size-5: 0.125rem; /* 2px */
29
+ --b2b-size-1: 0.0625rem; /* 1px */
30
+ --b2b-font-weight-bold: 700;
31
+ --b2b-font-weight-normal: 400;
32
+ --b2b-font-weight-thin: 100;
33
+ --b2b-font-family-default: OttoSans, Arial, Helvetica, sans-serif;
34
+ --b2b-color-table-expand-hover: #e6f4ff;
35
+ --b2b-color-table-selected-hover: #e6f4ff;
36
+ --b2b-color-table-selected-default: #cce9ff;
37
+ --b2b-color-table-hover: #e6f4ff;
38
+ --b2b-color-background-overlay-transparent-40: rgba(34, 34, 34, 0.25);
39
+ --b2b-color-background-overlay-transparent-80: rgba(34, 34, 34, 0.5);
40
+ --b2b-color-info-100: #003264;
41
+ --b2b-color-info-50: #ccd6e0;
42
+ --b2b-color-success-100: #326400;
43
+ --b2b-color-success-50: #d6e0cc;
44
+ --b2b-color-warning-100: #ffb432;
45
+ --b2b-color-warning-50: #ffd998;
46
+ --b2b-color-error-100: #e6344b;
47
+ --b2b-color-primary: #d4021d;
48
+ --b2b-color-red-200: #bb0004;
49
+ --b2b-color-red-150: #e6344b;
50
+ --b2b-color-red-100: #d4021d;
51
+ --b2b-color-red-50: #ffdde3;
52
+ --b2b-color-grey-400: #777777;
53
+ --b2b-color-grey-300: #9e9e9e;
54
+ --b2b-color-grey-250: #b1b1b1;
55
+ --b2b-color-grey-200: #c4c4c4;
56
+ --b2b-color-grey-150: #d5d5d5;
57
+ --b2b-color-grey-100: #e6e6e6;
58
+ --b2b-color-grey-50: #eeeeee;
59
+ --b2b-color-grey-25: #f6f6f6;
60
+ --b2b-color-white-100: #ffffff;
61
+ --b2b-color-black-100: #222222;
62
+ --b2b-color-black-50: #333333;
63
+ --b2b-size-headline-line-height-400: var(--b2b-size-60);
64
+ --b2b-size-headline-line-height-200: var(--b2b-size-45);
65
+ --b2b-size-headline-line-height-100: var(--b2b-size-40);
66
+ --b2b-size-headline-400: var(--b2b-size-60);
67
+ --b2b-size-headline-200: var(--b2b-size-45);
68
+ --b2b-size-headline-100: var(--b2b-size-40);
69
+ --b2b-size-copy-line-height-300: var(--b2b-size-90);
70
+ --b2b-size-copy-line-height-200: var(--b2b-size-60);
71
+ --b2b-size-copy-line-height-125: var(--b2b-size-60);
72
+ --b2b-size-copy-line-height-100: var(--b2b-size-53); /* Will use 21px until design facelift */
73
+ --b2b-size-copy-line-height-75: var(--b2b-size-45); /* Will use 18px until design facelift */
74
+ --b2b-size-copy-line-height-50: var(--b2b-size-40);
75
+ --b2b-size-copy-300: var(--b2b-size-60);
76
+ --b2b-size-copy-200: var(--b2b-size-45);
77
+ --b2b-size-copy-125: var(--b2b-size-40);
78
+ --b2b-size-copy-100: var(--b2b-size-35);
79
+ --b2b-size-copy-50: var(--b2b-size-30);
80
+ --b2b-size-border-no-radius-bottom: var(--b2b-size-7) var(--b2b-size-7) 0 0;
81
+ --b2b-size-border-no-radius-top: 0 0 var(--b2b-size-7) var(--b2b-size-7);
82
+ --b2b-size-border-no-radius-right: var(--b2b-size-7) 0 0 var(--b2b-size-7);
83
+ --b2b-size-border-no-radius-left: 0 var(--b2b-size-7) var(--b2b-size-7) 0;
84
+ --b2b-size-border-radius-100: var(--b2b-size-7);
85
+ --b2b-size-border-width-150: var(--b2b-size-10);
86
+ --b2b-size-border-width-100: var(--b2b-size-5);
87
+ --b2b-size-border-width-50: var(--b2b-size-1);
88
+ --b2b-size-padding-175: var(--b2b-size-80);
89
+ --b2b-size-padding-150: var(--b2b-size-60);
90
+ --b2b-size-padding-100: var(--b2b-size-40);
91
+ --b2b-size-padding-50: var(--b2b-size-20);
92
+ --b2b-size-space-300: var(--b2b-size-200);
93
+ --b2b-size-space-250: var(--b2b-size-160);
94
+ --b2b-size-space-200: var(--b2b-size-100);
95
+ --b2b-size-space-175: var(--b2b-size-80);
96
+ --b2b-size-space-150: var(--b2b-size-60);
97
+ --b2b-size-space-100: var(--b2b-size-40);
98
+ --b2b-size-space-75: var(--b2b-size-30);
99
+ --b2b-size-space-50: var(--b2b-size-20);
100
+ --b2b-size-space-25: var(--b2b-size-10);
101
+ --b2b-size-icon-400: var(--b2b-size-120);
102
+ --b2b-size-icon-200: var(--b2b-size-80);
103
+ --b2b-size-icon-100: var(--b2b-size-60);
104
+ --b2b-size-icon-50: var(--b2b-size-40);
105
+ --b2b-color-table-expand-default: var(--b2b-color-grey-25);
106
+ --b2b-color-icon-inverted: var(--b2b-color-white-100);
107
+ --b2b-color-icon-secondary: var(--b2b-color-grey-400);
108
+ --b2b-color-icon-default: var(--b2b-color-black-100);
109
+ --b2b-color-headline-inverted: var(--b2b-color-white-100);
110
+ --b2b-color-headline-default: var(--b2b-color-black-100);
111
+ --b2b-color-headline-title: var(--b2b-color-red-100);
112
+ --b2b-color-copy-overlay: var(--b2b-color-white-100);
113
+ --b2b-color-copy-inverted: var(--b2b-color-white-100);
114
+ --b2b-color-copy-secondary: var(--b2b-color-grey-400);
115
+ --b2b-color-copy-default: var(--b2b-color-black-100);
116
+ --b2b-color-border-100: var(--b2b-color-grey-200);
117
+ --b2b-color-background-overlay: var(--b2b-color-black-100);
118
+ --b2b-color-background-card: var(--b2b-color-white-100);
119
+ --b2b-color-background-box: var(--b2b-color-white-100);
120
+ --b2b-color-background-page: var(--b2b-color-grey-25);
121
+ --b2b-color-error-50: var(--b2b-color-red-50);
122
+ }
123
+ /**
124
+ * Do not edit directly
125
+ * Generated on Tue, 22 Aug 2023 11:28:34 GMT
126
+ */
127
+ :root [data-theme="dark"] {
128
+ --b2b-size-200: 5rem; /* 80px */
129
+ --b2b-size-160: 4rem; /* 64px */
130
+ --b2b-size-150: 3.75rem; /* 60px */
131
+ --b2b-size-140: 3.5rem; /* 56px */
132
+ --b2b-size-120: 3rem; /* 48px */
133
+ --b2b-size-100: 2.5rem; /* 40px */
134
+ --b2b-size-90: 2.25rem; /* 36px */
135
+ --b2b-size-80: 2rem; /* 32px */
136
+ --b2b-size-70: 1.75rem; /* 28px */
137
+ --b2b-size-60: 1.5rem; /* 24px */
138
+ --b2b-size-55: 1.375rem; /* 22px */
139
+ --b2b-size-53: 1.3125rem; /* 21px */
140
+ --b2b-size-50: 1.25rem; /* 20px */
141
+ --b2b-size-45: 1.125rem; /* 18px */
142
+ --b2b-size-40: 1rem; /* 16px */
143
+ --b2b-size-35: 0.875rem; /* 14px */
144
+ --b2b-size-30: 0.75rem; /* 12px */
145
+ --b2b-size-25: 0.625rem; /* 10px */
146
+ --b2b-size-20: 0.5rem; /* 8px */
147
+ --b2b-size-15: 0.375rem; /* 6px */
148
+ --b2b-size-10: 0.25rem; /* 4px */
149
+ --b2b-size-7: 0.1875rem; /* 3px */
150
+ --b2b-size-5: 0.125rem; /* 2px */
151
+ --b2b-size-1: 0.0625rem; /* 1px */
152
+ --b2b-font-weight-bold: 700;
153
+ --b2b-font-weight-normal: 400;
154
+ --b2b-font-weight-thin: 100;
155
+ --b2b-font-family-default: OttoSans, Arial, Helvetica, sans-serif;
156
+ --b2b-color-info-100: #003264;
157
+ --b2b-color-info-50: #ccd6e0;
158
+ --b2b-color-success-100: #326400;
159
+ --b2b-color-success-50: #d6e0cc;
160
+ --b2b-color-warning-100: #ffb432;
161
+ --b2b-color-warning-50: #ffd998;
162
+ --b2b-color-error-100: #e6344b;
163
+ --b2b-color-primary: #d4021d;
164
+ --b2b-color-red-200: #bb0004;
165
+ --b2b-color-red-150: #e6344b;
166
+ --b2b-color-red-100: #d4021d;
167
+ --b2b-color-red-50: #ffdde3;
168
+ --b2b-color-grey-400: #777777;
169
+ --b2b-color-grey-300: #9e9e9e;
170
+ --b2b-color-grey-250: #b1b1b1;
171
+ --b2b-color-grey-200: #c4c4c4;
172
+ --b2b-color-grey-150: #d5d5d5;
173
+ --b2b-color-grey-100: #e6e6e6;
174
+ --b2b-color-grey-50: #eeeeee;
175
+ --b2b-color-grey-25: #f6f6f6;
176
+ --b2b-color-white-100: #ffffff;
177
+ --b2b-color-black-100: #222222;
178
+ --b2b-color-black-50: #333333;
179
+ --b2b-color-icon-inverted: var(--b2b-color-black-100);
180
+ --b2b-color-icon-secondary: var(--b2b-color-grey-400);
181
+ --b2b-color-icon-default: var(--b2b-color-white-100);
182
+ --b2b-color-headline-inverted: var(--b2b-color-black-100);
183
+ --b2b-color-headline-default: var(--b2b-color-white-100);
184
+ --b2b-color-headline-title: var(--b2b-color-red-50);
185
+ --b2b-color-copy-inverted: var(--b2b-color-black-100);
186
+ --b2b-color-copy-secondary: var(--b2b-color-grey-100);
187
+ --b2b-color-copy-default: var(--b2b-color-white-100);
188
+ --b2b-color-border-100: var(--b2b-color-white-100);
189
+ --b2b-color-background-page: var(--b2b-color-grey-100);
190
+ --b2b-color-background-card: var(--b2b-color-black-50);
191
+ --b2b-color-background-box: var(--b2b-color-black-50);
192
+ --b2b-color-error-50: var(--b2b-color-red-50);
193
+ }
194
+ @font-face {
195
+ font-family: OttoSans;
196
+ src: url("https://pattern-library.portal.otto.market/static/assets/fonts/otto-sans.ttf");
197
+ font-weight: normal;
198
+ font-style: normal;
199
+ }
200
+ @font-face {
201
+ font-family: OttoSans;
202
+ src: url("https://pattern-library.portal.otto.market/static/assets/fonts/otto-sans-bold.woff") format("woff"), url("https://pattern-library.portal.otto.market/static/assets/fonts/otto-sans-bold.ttf") format("truetype");
203
+ font-weight: bold;
204
+ font-style: normal;
205
+ }
206
+ @font-face {
207
+ font-family: OttoSans;
208
+ src: url("https://pattern-library.portal.otto.market/static/assets/fonts/otto-sans-thin.woff") format("woff"), url("https://pattern-library.portal.otto.market/static/assets/fonts/otto-sans-thin.ttf") format("truetype");
209
+ font-weight: 100;
210
+ font-style: normal;
211
+ }
212
+ @font-face {
213
+ font-family: ObcIcons;
214
+ src: url("https://pattern-library.portal.otto.market/static/assets/fonts/obc-icons.woff");
215
+ }
216
+ :host .b2b_wizard {
217
+ display: flex;
218
+ flex-wrap: wrap;
219
+ }
220
+ .b2b_wizard__step {
221
+ display: flex;
222
+ align-items: center;
223
+ gap: var(--b2b-size-space-50);
224
+ padding: var(--b2b-size-space-50) 0;
225
+ }
226
+ .b2b_wizard__step__label--default {
227
+ color: var(--b2b-color-icon-secondary);
228
+ }
229
+ ::slotted(b2b-wizard-step:not(:last-of-type)) {
230
+ display: flex;
231
+ align-items: center;
232
+ }
233
+ ::slotted(b2b-wizard-step:not(:last-of-type))::after {
234
+ content: " ";
235
+ flex-grow: 1;
236
+ height: 1px;
237
+ min-width: var(--b2b-size-space-175);
238
+ margin: 0 var(--b2b-size-space-75) 0 var(--b2b-size-space-75);
239
+ background: var(--b2b-color-icon-default);
240
+ }
@@ -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
+ });
@@ -0,0 +1,125 @@
1
+ import { h, Host } from '@stencil/core';
2
+ import { WizardStatus } from '../../utils/types/wizard.types';
3
+ export class WizardComponent {
4
+ constructor() {
5
+ this.MAX_STEP_AMOUNT = 6;
6
+ this.getChildSteps = () => {
7
+ return Array.from(this.host.querySelectorAll('b2b-wizard-step'));
8
+ };
9
+ this.setStepsState = () => {
10
+ const steps = this.getChildSteps();
11
+ steps.map((step, index) => {
12
+ step.state = this.getStepState(index + 1);
13
+ step.step = (index + 1).toString();
14
+ step.checkIcon = this.checkIcon;
15
+ });
16
+ };
17
+ this.getStepState = (step) => {
18
+ const currentStep = Number(this.activeStep);
19
+ if (currentStep == step) {
20
+ return WizardStatus.PENDING;
21
+ }
22
+ else if (step < currentStep || currentStep === 0) {
23
+ return WizardStatus.COMPLETED;
24
+ }
25
+ else {
26
+ return WizardStatus.DEFAULT;
27
+ }
28
+ };
29
+ this.activeStep = '1';
30
+ this.custom = false;
31
+ this.checkIcon = true;
32
+ }
33
+ componentWillLoad() {
34
+ const steps = this.getChildSteps();
35
+ if (Number(this.activeStep) > steps.length) {
36
+ console.error('B2B WIZARD: Active step is higher than total steps.');
37
+ }
38
+ if (steps.length > this.MAX_STEP_AMOUNT) {
39
+ console.warn(`B2B WIZARD: Please don't use more than ${this.MAX_STEP_AMOUNT} steps. If more needed get in touch with the B2B design team`);
40
+ }
41
+ }
42
+ componentWillRender() {
43
+ if (!this.custom)
44
+ this.setStepsState();
45
+ }
46
+ render() {
47
+ return (h(Host, null, h("div", { class: "b2b_wizard" }, h("slot", null))));
48
+ }
49
+ static get is() { return "b2b-wizard"; }
50
+ static get encapsulation() { return "shadow"; }
51
+ static get originalStyleUrls() {
52
+ return {
53
+ "$": ["wizard.scss"]
54
+ };
55
+ }
56
+ static get styleUrls() {
57
+ return {
58
+ "$": ["wizard.css"]
59
+ };
60
+ }
61
+ static get properties() {
62
+ return {
63
+ "activeStep": {
64
+ "type": "string",
65
+ "mutable": false,
66
+ "complexType": {
67
+ "original": "WizardSteps | '0'",
68
+ "resolved": "\"0\" | \"1\" | \"2\" | \"3\" | \"4\" | \"5\" | \"6\"",
69
+ "references": {
70
+ "WizardSteps": {
71
+ "location": "import",
72
+ "path": "../../utils/types/wizard.types"
73
+ }
74
+ }
75
+ },
76
+ "required": false,
77
+ "optional": false,
78
+ "docs": {
79
+ "tags": [],
80
+ "text": "The current active step"
81
+ },
82
+ "attribute": "active-step",
83
+ "reflect": false,
84
+ "defaultValue": "'1'"
85
+ },
86
+ "custom": {
87
+ "type": "boolean",
88
+ "mutable": false,
89
+ "complexType": {
90
+ "original": "boolean",
91
+ "resolved": "boolean",
92
+ "references": {}
93
+ },
94
+ "required": false,
95
+ "optional": false,
96
+ "docs": {
97
+ "tags": [],
98
+ "text": "By default, is false, where the wizard will handle steps states.\nIf set to true, steps state must be handled manually."
99
+ },
100
+ "attribute": "custom",
101
+ "reflect": false,
102
+ "defaultValue": "false"
103
+ },
104
+ "checkIcon": {
105
+ "type": "boolean",
106
+ "mutable": false,
107
+ "complexType": {
108
+ "original": "boolean",
109
+ "resolved": "boolean",
110
+ "references": {}
111
+ },
112
+ "required": false,
113
+ "optional": false,
114
+ "docs": {
115
+ "tags": [],
116
+ "text": "Defaults to true. It will show a checkmark icon when a step is completed.\nSet as false to show the step number"
117
+ },
118
+ "attribute": "check-icon",
119
+ "reflect": false,
120
+ "defaultValue": "true"
121
+ }
122
+ };
123
+ }
124
+ static get elementRef() { return "host"; }
125
+ }
@@ -0,0 +1,44 @@
1
+ import { html } from 'lit-html';
2
+ import wizardDocs from './wizard.docs.mdx';
3
+ import { getArgTypes } from '../../docs/config/utils';
4
+ const Template = ({ activeStep, checkIcon }) => {
5
+ return html `<b2b-wizard active-step="${activeStep}" check-icon="${checkIcon}">
6
+ <b2b-wizard-step>Step 1</b2b-wizard-step>
7
+ <b2b-wizard-step>Step 2</b2b-wizard-step>
8
+ <b2b-wizard-step>Step 3</b2b-wizard-step>
9
+ <b2b-wizard-step>Step 4</b2b-wizard-step>
10
+ </b2b-wizard>`;
11
+ };
12
+ export const story010Wizard = Template.bind({});
13
+ story010Wizard.args = { activeStep: '2', checkIcon: true };
14
+ story010Wizard.storyName = 'Default';
15
+ const StatesTemplate = ({ step }) => {
16
+ return html `
17
+ <b2b-wizard-step step="${step}" state="default">Default</b2b-wizard-step>
18
+ <b2b-wizard-step step="${step}" state="completed"
19
+ >Completed with icon</b2b-wizard-step
20
+ >
21
+ <b2b-wizard-step step="${step}" state="completed" check-icon="false"
22
+ >Completed with number</b2b-wizard-step
23
+ >
24
+ <b2b-wizard-step step="${step}" state="pending">Pending</b2b-wizard-step>
25
+ <b2b-wizard-step step="${step}" state="disabled">Disabled</b2b-wizard-step>
26
+ `;
27
+ };
28
+ export const story020WizardStates = StatesTemplate.bind({});
29
+ story020WizardStates.args = { step: '1' };
30
+ story020WizardStates.argTypes = null;
31
+ story020WizardStates.storyName = 'Wizard states';
32
+ const controls = { activeStep: 'select' };
33
+ const WizardArgs = getArgTypes('b2b-wizard', controls);
34
+ export default {
35
+ title: 'Components/Status & Feedback/Wizard',
36
+ argTypes: WizardArgs,
37
+ viewmode: 'docs',
38
+ parameters: {
39
+ controls: { expanded: true },
40
+ docs: {
41
+ page: wizardDocs,
42
+ },
43
+ },
44
+ };
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 13 Jun 2023 14:44:02 GMT
3
+ * Generated on Tue, 22 Aug 2023 11:28:34 GMT
4
4
  */
5
5
  :root, :host {
6
6
  --b2b-size-200: 5rem; /* 80px */
@@ -76,8 +76,7 @@
76
76
  --b2b-size-copy-200: var(--b2b-size-45);
77
77
  --b2b-size-copy-125: var(--b2b-size-40);
78
78
  --b2b-size-copy-100: var(--b2b-size-35);
79
- --b2b-size-copy-75: var(--b2b-size-30);
80
- --b2b-size-copy-50: var(--b2b-size-25);
79
+ --b2b-size-copy-50: var(--b2b-size-30);
81
80
  --b2b-size-border-no-radius-bottom: var(--b2b-size-7) var(--b2b-size-7) 0 0;
82
81
  --b2b-size-border-no-radius-top: 0 0 var(--b2b-size-7) var(--b2b-size-7);
83
82
  --b2b-size-border-no-radius-right: var(--b2b-size-7) 0 0 var(--b2b-size-7);
@@ -123,7 +122,7 @@
123
122
  }
124
123
  /**
125
124
  * Do not edit directly
126
- * Generated on Tue, 13 Jun 2023 14:44:02 GMT
125
+ * Generated on Tue, 22 Aug 2023 11:28:34 GMT
127
126
  */
128
127
  :root [data-theme="dark"] {
129
128
  --b2b-size-200: 5rem; /* 80px */