@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
@@ -19,20 +19,20 @@ const TableSortDirections = {
19
19
  ASC: 'ascending',
20
20
  DESC: 'descending',
21
21
  };
22
- const TableRowTypes = {
22
+ const TableAccordionRowTypes = {
23
23
  PARENT: 'parent',
24
24
  CHILD: 'child',
25
- HEADER: 'header'
25
+ HEADER: 'header',
26
26
  };
27
27
  const TableColourOptions = {
28
28
  DEFAULT: 'default',
29
29
  SELECTED: 'selected',
30
- GROUP: 'group'
30
+ GROUP: 'group',
31
31
  };
32
32
 
33
33
  exports.ContentAlignment = ContentAlignment;
34
+ exports.TableAccordionRowTypes = TableAccordionRowTypes;
34
35
  exports.TableColourOptions = TableColourOptions;
35
- exports.TableRowTypes = TableRowTypes;
36
36
  exports.TableRowgroupTypes = TableRowgroupTypes;
37
37
  exports.TableSizes = TableSizes;
38
38
  exports.TableSortDirections = TableSortDirections;
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ const WizardStatus = {
4
+ DEFAULT: 'default',
5
+ COMPLETED: 'completed',
6
+ PENDING: 'pending',
7
+ DISABLED: 'disabled',
8
+ };
9
+
10
+ exports.WizardStatus = WizardStatus;
@@ -41,12 +41,14 @@
41
41
  "./components/toggle-button/toggle-button.js",
42
42
  "./components/toggle-group/toggle-group.js",
43
43
  "./components/tooltip/tooltip.js",
44
+ "./components/wizard/wizard-step.js",
45
+ "./components/wizard/wizard.js",
44
46
  "./components/wizard-icon/wizard-icon.js"
45
47
  ],
46
48
  "compiler": {
47
49
  "name": "@stencil/core",
48
- "version": "3.0.1",
49
- "typescriptVersion": "4.9.5"
50
+ "version": "3.4.2",
51
+ "typescriptVersion": "5.0.4"
50
52
  },
51
53
  "collections": [],
52
54
  "bundles": []
@@ -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 */
@@ -227,7 +226,7 @@
227
226
  .b2b-alert--info {
228
227
  background-color: var(--b2b-color-info-50);
229
228
  }
230
- .b2b-alert--info-icon {
229
+ .b2b-alert--info__icon {
231
230
  color: var(--b2b-color-info-100);
232
231
  }
233
232
  .b2b-alert--warning {
@@ -240,10 +239,10 @@
240
239
  .b2b-alert--success {
241
240
  background-color: var(--b2b-color-success-50);
242
241
  }
243
- .b2b-alert--success-icon {
242
+ .b2b-alert--success__icon {
244
243
  color: var(--b2b-color-success-100);
245
244
  }
246
- .b2b-alert-close-icon {
245
+ .b2b-alert__close-icon {
247
246
  padding-top: var(--b2b-size-7);
248
247
  width: var(--b2b-size-30);
249
248
  height: var(--b2b-size-35);
@@ -251,13 +250,13 @@
251
250
  fill: var(--b2b-color-grey-400);
252
251
  flex-shrink: 0;
253
252
  }
254
- .b2b-alert-content {
253
+ .b2b-alert__content {
255
254
  display: flex;
256
255
  align-items: center;
257
256
  flex: 2;
258
257
  gap: var(--b2b-size-30);
259
258
  }
260
- .b2b-alert-content p {
259
+ .b2b-alert__content p {
261
260
  width: 100%;
262
261
  margin: 0;
263
262
  padding: var(--b2b-size-5) 0 var(--b2b-size-1) 0;
@@ -0,0 +1,67 @@
1
+ import { newE2EPage } from '@stencil/core/testing';
2
+ describe('B2B-Alert', () => {
3
+ it('should render the alert component', async () => {
4
+ const page = await newE2EPage();
5
+ await page.setContent(`<b2b-alert></alert>`);
6
+ const element = await page.find('b2b-alert');
7
+ expect(element).not.toBeNull();
8
+ });
9
+ it('should not be visible by default', async () => {
10
+ const page = await newE2EPage();
11
+ await page.setContent(`<b2b-alert></alert>`);
12
+ const element = await page.find('b2b-alert >>> div.b2b-alert');
13
+ expect(element).not.toHaveClass('b2b-alert--open');
14
+ const alert = await page.find('b2b-alert');
15
+ expect(await alert.getProperty('opened')).toBe(false);
16
+ });
17
+ it('should open the alert', async () => {
18
+ const page = await newE2EPage();
19
+ await page.setContent(`<b2b-alert opened></b2b-alert>`);
20
+ const element = await page.find('b2b-alert >>> div');
21
+ expect(await element.isVisible()).toBe(true);
22
+ });
23
+ it('should not render text in a small alert', async () => {
24
+ const page = await newE2EPage();
25
+ await page.setContent(`<b2b-alert opened>test</b2b-alert>`);
26
+ const element = await page.find('b2b-alert >>> p');
27
+ expect(element).toBeNull();
28
+ });
29
+ it('should render a large alert with text', async () => {
30
+ const page = await newE2EPage();
31
+ await page.setContent(`<b2b-alert opened size={large}>test</b2b-alert>`);
32
+ const element = await page.find({ text: 'test' });
33
+ expect(element).not.toBeNull();
34
+ });
35
+ it('should render a close button by default in a large alert', async () => {
36
+ const page = await newE2EPage();
37
+ await page.setContent(`<b2b-alert opened size="large">test</b2b-alert>`);
38
+ const alert = await page.find('b2b-alert >>> div');
39
+ const element = await page.find('b2b-alert >>> div.b2b-alert__close-icon');
40
+ expect(element).not.toBeNull();
41
+ await page.evaluate(() => {
42
+ document
43
+ .querySelector('b2b-alert')
44
+ .shadowRoot.querySelector('.b2b-alert__close-icon').click();
45
+ });
46
+ await page.waitForChanges();
47
+ expect(await alert.isVisible()).toBeFalsy();
48
+ });
49
+ it('should not render a close button on an error alert', async () => {
50
+ const page = await newE2EPage();
51
+ await page.setContent(`<b2b-alert opened size="large" type="error">test</b2b-alert>`);
52
+ const element = await page.find('b2b-alert >>> div.b2b-alert__close-icon');
53
+ expect(element).toBeNull();
54
+ });
55
+ it('should not render a close button in a small alert', async () => {
56
+ const page = await newE2EPage();
57
+ await page.setContent(`<b2b-alert opened>test</b2b-alert>`);
58
+ const element = await page.find('b2b-alert >>> div.b2b-alert__close-icon');
59
+ expect(element).toBeNull();
60
+ });
61
+ it('should render with a custom icon', async () => {
62
+ const page = await newE2EPage();
63
+ await page.setContent(`<b2b-alert opened custom-icon><b2b-icon icon="b2b_icon-menu"></b2b-icon></b2b-alert>`);
64
+ const element = await page.find('b2b-icon');
65
+ expect(element).not.toBeNull();
66
+ });
67
+ });
@@ -30,9 +30,9 @@ export class AlertComponent {
30
30
  [`b2b-alert--${this.type}`]: true,
31
31
  [`b2b-alert--${this.size}`]: true,
32
32
  'b2b-alert--open': this.opened,
33
- } }, h("div", { class: "b2b-alert-content" }, h("span", { class: { [`b2b-alert--${this.type}-icon`]: true } }, this.canCustomizeIcon() ? h("slot", null) : this.chooseIcon()), this.size === 'large' && (h("p", null, h("slot", null)))), this.canClose() && (
33
+ } }, h("div", { class: "b2b-alert__content" }, h("span", { class: { [`b2b-alert--${this.type}__icon`]: true } }, this.canCustomizeIcon() ? h("slot", null) : this.chooseIcon()), this.size === 'large' && (h("p", null, h("slot", null)))), this.canClose() && (
34
34
  //using a custom icon as this component needs an icon size that is not supported in the icon component
35
- h("div", { class: "b2b-alert-close-icon", onClick: this.close }, h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, h("path", { d: "M17.886 16l8.057-8.057a1.333 1.333 0 1 0-1.885-1.886l-8.057 8.057-8.057-8.057a1.333 1.333 0 1 0-1.886 1.886L14.115 16l-8.057 8.057a1.332 1.332 0 1 0 1.886 1.885l8.057-8.057 8.057 8.057a1.331 1.331 0 0 0 1.886 0 1.332 1.332 0 0 0 0-1.885L17.887 16z" })))))));
35
+ h("div", { class: "b2b-alert__close-icon", onClick: this.close }, h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, h("path", { d: "M17.886 16l8.057-8.057a1.333 1.333 0 1 0-1.885-1.886l-8.057 8.057-8.057-8.057a1.333 1.333 0 1 0-1.886 1.886L14.115 16l-8.057 8.057a1.332 1.332 0 1 0 1.886 1.885l8.057-8.057 8.057 8.057a1.331 1.331 0 0 0 1.886 0 1.332 1.332 0 0 0 0-1.885L17.887 16z" })))))));
36
36
  }
37
37
  static get is() { return "b2b-alert"; }
38
38
  static get encapsulation() { return "shadow"; }
@@ -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 */
@@ -0,0 +1,68 @@
1
+ import { newSpecPage } from '@stencil/core/testing';
2
+ import { h } from '@stencil/core';
3
+ import { AnchorComponent } from './anchor';
4
+ const testRef = 'https://www.otto.de';
5
+ it('should render the anchor component with default values', async () => {
6
+ const page = await newSpecPage({
7
+ components: [AnchorComponent],
8
+ template: () => (h("b2b-anchor", { href: testRef }, "This is a test anchor.")),
9
+ });
10
+ expect(page.root).toEqualHtml(`
11
+ <b2b-anchor>
12
+ <mock:shadow-root>
13
+ <a href="https://www.otto.de" class="b2b-anchor b2b-anchor--inherit" target="_self">
14
+ <slot></slot>
15
+ </a>
16
+ </mock:shadow-root>
17
+ This is a test anchor.
18
+ </b2b-anchor>
19
+ `);
20
+ });
21
+ it('should change the font size of the anchor component if specified', async () => {
22
+ const page = await newSpecPage({
23
+ components: [AnchorComponent],
24
+ template: () => (h("b2b-anchor", { href: testRef, size: "100" }, "This is a test anchor.")),
25
+ });
26
+ expect(page.root).toEqualHtml(`
27
+ <b2b-anchor>
28
+ <mock:shadow-root>
29
+ <a href="https://www.otto.de" class="b2b-anchor b2b-anchor--100" target="_self">
30
+ <slot></slot>
31
+ </a>
32
+ </mock:shadow-root>
33
+ This is a test anchor.
34
+ </b2b-anchor>
35
+ `);
36
+ });
37
+ it('should change the download string if specified', async () => {
38
+ const page = await newSpecPage({
39
+ components: [AnchorComponent],
40
+ template: () => (h("b2b-anchor", { href: testRef, download: "This is a test download" }, "This is a test anchor.")),
41
+ });
42
+ expect(page.root).toEqualHtml(`
43
+ <b2b-anchor>
44
+ <mock:shadow-root>
45
+ <a href="https://www.otto.de" class="b2b-anchor b2b-anchor--inherit" target="_self" download="This is a test download">
46
+ <slot></slot>
47
+ </a>
48
+ </mock:shadow-root>
49
+ This is a test anchor.
50
+ </b2b-anchor>
51
+ `);
52
+ });
53
+ it('should change the target property if specified', async () => {
54
+ const page = await newSpecPage({
55
+ components: [AnchorComponent],
56
+ template: () => (h("b2b-anchor", { href: testRef, target: "parent" }, "This is a test anchor.")),
57
+ });
58
+ expect(page.root).toEqualHtml(`
59
+ <b2b-anchor>
60
+ <mock:shadow-root>
61
+ <a href="https://www.otto.de" class="b2b-anchor b2b-anchor--inherit" target="_parent">
62
+ <slot></slot>
63
+ </a>
64
+ </mock:shadow-root>
65
+ This is a test anchor.
66
+ </b2b-anchor>
67
+ `);
68
+ });
@@ -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 */
@@ -254,40 +253,39 @@
254
253
  display: flex;
255
254
  align-items: center;
256
255
  }
257
- :host button.primary,
258
- :host a.primary {
256
+ :host button.b2b-button--primary,
257
+ :host a.b2b-button--primary {
259
258
  color: var(--b2b-color-white-100);
260
259
  background-color: var(--b2b-color-red-100);
261
260
  border: 1px solid var(--b2b-color-red-100);
262
261
  }
263
- :host button.primary:hover,
264
- :host a.primary:hover {
262
+ :host button.b2b-button--primary:hover,
263
+ :host a.b2b-button--primary:hover {
265
264
  background-color: var(--b2b-color-red-200);
266
265
  }
267
- :host button.primary.loading::after,
268
- :host a.primary.loading::after {
266
+ :host button.b2b-button--primary.loading::after,
267
+ :host a.b2b-button--primary.loading::after {
269
268
  border: 0.125rem solid rgba(255, 255, 255, 0.5);
270
269
  border-top: 0.125rem solid var(--b2b-color-red-100);
271
270
  }
272
- :host button.secondary,
273
- :host a.secondary {
271
+ :host button.b2b-button--secondary,
272
+ :host a.b2b-button--secondary {
274
273
  color: var(--b2b-color-copy-default);
275
274
  background-color: var(--b2b-button-secondary-background-color);
276
275
  border: 1px solid var(--b2b-button-secondary-border-color);
277
276
  border-right: var(--b2b-border-right);
278
277
  }
279
- :host button.secondary:hover,
280
- :host a.secondary:hover {
278
+ :host button.b2b-button--secondary:hover,
279
+ :host a.b2b-button--secondary:hover {
281
280
  background-color: var(--b2b-button-secondary-hover-background-color);
282
281
  }
283
- :host button.secondary.loading::after,
284
- :host a.secondary.loading::after {
282
+ :host button.b2b-button--secondary.loading::after,
283
+ :host a.b2b-button--secondary.loading::after {
285
284
  border: 0.125rem solid rgba(51, 51, 51, 0.2);
286
285
  border-top: 0.125rem solid var(--b2b-color-copy-default);
287
286
  }
288
- :host button:disabled, :host button.disabled,
289
- :host a:disabled,
290
- :host a.disabled {
287
+ :host button:disabled,
288
+ :host a:disabled {
291
289
  cursor: default;
292
290
  pointer-events: none;
293
291
  background-color: var(--b2b-color-grey-50);
@@ -296,32 +294,29 @@
296
294
  color: var(--b2b-color-grey-250);
297
295
  }
298
296
  :host button:disabled [slot=start],
299
- :host button:disabled [slot=end], :host button.disabled [slot=start],
300
- :host button.disabled [slot=end],
297
+ :host button:disabled [slot=end],
301
298
  :host a:disabled [slot=start],
302
- :host a:disabled [slot=end],
303
- :host a.disabled [slot=start],
304
- :host a.disabled [slot=end] {
299
+ :host a:disabled [slot=end] {
305
300
  fill: var(--b2b-color-grey-250);
306
301
  }
307
302
  :host button:focus,
308
303
  :host a:focus {
309
304
  z-index: 10;
310
305
  }
311
- :host(.loading) button,
312
- :host(.loading) a {
306
+ :host(.b2b-button--loading) button,
307
+ :host(.b2b-button--loading) a {
313
308
  color: transparent;
314
309
  position: relative;
315
310
  cursor: default;
316
311
  pointer-events: none;
317
312
  }
318
- :host(.loading).primary::after, :host(.loading).primary:hover {
313
+ :host(.b2b-button--loading).b2b-button--primary::after, :host(.b2b-button--loading).b2b-button--primary:hover {
319
314
  color: var(--b2b-color-white-100);
320
315
  }
321
- :host(.loading).secondary::after, :host(.loading).secondary:hover {
316
+ :host(.b2b-button--loading).b2b-button--secondary::after, :host(.b2b-button--loading).b2b-button--secondary:hover {
322
317
  color: var(--b2b-color-copy-default);
323
318
  }
324
- :host(.loading) .button-spinner {
319
+ :host(.b2b-button--loading) .b2b-button__spinner {
325
320
  box-sizing: border-box;
326
321
  display: inline;
327
322
  position: absolute !important;
@@ -330,32 +325,32 @@
330
325
  margin-top: -0.625rem;
331
326
  margin-left: -0.625rem;
332
327
  }
333
- :host(.loading) [slot=start],
334
- :host(.loading) [slot=end] {
328
+ :host(.b2b-button--loading) [slot=start],
329
+ :host(.b2b-button--loading) [slot=end] {
335
330
  visibility: hidden;
336
331
  }
337
- :host(.button-50) button,
338
- :host(.button-50) a {
332
+ :host(.b2b-button--50) button,
333
+ :host(.b2b-button--50) a {
339
334
  height: 1.875rem;
340
335
  max-width: 100%;
341
336
  }
342
- :host(.button-100) button,
343
- :host(.button-100) a {
337
+ :host(.b2b-button--100) button,
338
+ :host(.b2b-button--100) a {
344
339
  height: 2.25rem;
345
340
  }
346
- :host(.button-active) button,
347
- :host(.button-active) a {
341
+ :host(.b2b-button--active) button,
342
+ :host(.b2b-button--active) a {
348
343
  background-color: var(--b2b-color-black-100);
349
344
  color: var(--b2b-color-white-100);
350
345
  border: 1px solid var(--b2b-button-secondary-border-color);
351
346
  border-right: var(--b2b-border-right);
352
347
  }
353
- :host(.button-active) button:hover,
354
- :host(.button-active) a:hover {
348
+ :host(.b2b-button--active) button:hover,
349
+ :host(.b2b-button--active) a:hover {
355
350
  background-color: var(--b2b-color-black-100);
356
351
  }
357
- :host(.icon-only) button,
358
- :host(.icon-only) a {
352
+ :host(.b2b-button--icon-only) button,
353
+ :host(.b2b-button--icon-only) a {
359
354
  padding: 0 var(--b2b-size-20);
360
355
  }
361
356
  ::slotted(*[slot=start]) {
@@ -0,0 +1,80 @@
1
+ import { newE2EPage } from '@stencil/core/testing';
2
+ describe('B2B-Button', () => {
3
+ let page;
4
+ beforeEach(async () => {
5
+ page = await newE2EPage();
6
+ await page.setContent(`<b2b-button>Hello World</b2b-button>`);
7
+ });
8
+ it('should render the button component', async () => {
9
+ const element = await page.find('b2b-button');
10
+ expect(element).not.toBeNull();
11
+ });
12
+ it('should display text', async () => {
13
+ const element = await page.find('b2b-button');
14
+ expect(element).toEqualText('Hello World');
15
+ });
16
+ it('should emit click event when clicked', async () => {
17
+ const eventSpy = await page.spyOnEvent('click');
18
+ await page.click('b2b-button');
19
+ expect(eventSpy).toHaveReceivedEvent();
20
+ });
21
+ it('should not be able to click when disabled', async () => {
22
+ page = await newE2EPage();
23
+ await page.setContent(`<b2b-button disabled={true}>Hello World</b2b-button>`);
24
+ const eventSpy = await page.spyOnEvent('click');
25
+ await page.click('b2b-button');
26
+ expect(eventSpy).not.toHaveReceivedEvent();
27
+ });
28
+ it('should not be able to click when loading', async () => {
29
+ page = await newE2EPage();
30
+ await page.setContent(`<b2b-button loading={true}>Hello World</b2b-button>`);
31
+ const eventSpy = await page.spyOnEvent('click');
32
+ await page.click('b2b-button');
33
+ expect(eventSpy).not.toHaveReceivedEvent();
34
+ });
35
+ it('should support form submission from shadow dom', async () => {
36
+ const form = `
37
+ <form>
38
+ <b2b-button type='submit'>Hello World</b2b-button>
39
+ </form>
40
+ `;
41
+ page = await newE2EPage();
42
+ await page.setContent(form);
43
+ const submitEventSpy = await page.spyOnEvent('submit');
44
+ const formdataEventSpy = await page.spyOnEvent('formdata');
45
+ await page.click('b2b-button');
46
+ expect(submitEventSpy).toHaveReceivedEvent();
47
+ expect(formdataEventSpy).toHaveReceivedEvent();
48
+ });
49
+ it('should reduce padding on the button if there is only an icon', async () => {
50
+ page = await newE2EPage();
51
+ await page.setContent(`<b2b-button variant="primary" size="100">
52
+ <b2b-icon slot="end" icon="b2b_icon-check" size="100"></b2b-icon>
53
+ </b2b-button>`);
54
+ const button = await page.find('b2b-button');
55
+ expect(button).toHaveClass('b2b-button--icon-only');
56
+ });
57
+ it('should not reduce padding on the button if there is text', async () => {
58
+ page = await newE2EPage();
59
+ await page.setContent(`<b2b-button variant="primary" size="100">
60
+ <span>Hello World</span>
61
+ <b2b-icon slot="end" icon="b2b_icon-check" size="100"></b2b-icon>
62
+ </b2b-button>`);
63
+ const button = await page.find('b2b-button');
64
+ expect(button).not.toHaveClass('b2b-button--icon-only');
65
+ });
66
+ it('should not submit a form when the button is not of type submit', async () => {
67
+ const form = `
68
+ <form>
69
+ <b2b-button>Hello World</b2b-button>
70
+ </form>
71
+ `;
72
+ page = await newE2EPage();
73
+ await page.setContent(form);
74
+ const submitEventSpy = await page.spyOnEvent('submit');
75
+ const button = await page.find({ text: 'Hello World' });
76
+ await button.click();
77
+ page.waitForChanges();
78
+ expect(submitEventSpy).not.toHaveReceivedEvent();
79
+ });
80
+ });
@@ -28,6 +28,7 @@ export class ButtonComponent {
28
28
  this.href = undefined;
29
29
  this.target = 'self';
30
30
  this.download = undefined;
31
+ this.groupDisabled = false;
31
32
  }
32
33
  /** Manually set focus to button element */
33
34
  async setFocus() {
@@ -54,15 +55,18 @@ export class ButtonComponent {
54
55
  }
55
56
  spinner() {
56
57
  const spinnerColor = this.variant === 'primary' ? 'inverse' : 'secondary';
57
- return (h("div", { class: "button-spinner" }, h("b2b-spinner", { color: spinnerColor, size: "50" })));
58
+ return (h("div", { class: "b2b-button__spinner" }, h("b2b-spinner", { color: spinnerColor, size: "50" })));
58
59
  }
59
60
  render() {
60
61
  return (h(Host, { class: {
61
- loading: this.canLoad(),
62
- [`button-${this.size}`]: true,
63
- [`button-active`]: this.active,
64
- [`icon-only`]: this.checkIcon(),
65
- } }, this.href !== undefined ? (h("a", { href: this.href, target: `_${this.target}`, download: this.download, class: { disabled: this.disabled, [this.variant]: true }, ref: el => (this.focusableElement = el) }, h("span", null, h("slot", { name: "start" }), h("slot", null), h("slot", { name: "end" })), this.canLoad() ? this.spinner() : null)) : (h("button", { class: { [this.variant]: true }, disabled: this.disabled, type: this.type, ref: el => (this.focusableElement = el) }, h("span", null, h("slot", { name: "start" }), h("slot", null), h("slot", { name: "end" })), this.canLoad() ? this.spinner() : null))));
62
+ [`b2b-button--loading`]: this.canLoad(),
63
+ [`b2b-button--${this.size}`]: true,
64
+ [`b2b-button--active`]: this.active,
65
+ [`b2b-button--icon-only`]: this.checkIcon(),
66
+ } }, this.href !== undefined ? (h("a", { href: this.href, target: `_${this.target}`, download: this.download, class: {
67
+ disabled: this.disabled || this.groupDisabled,
68
+ [`b2b-button--${this.variant}`]: true,
69
+ }, ref: el => (this.focusableElement = el) }, h("span", null, h("slot", { name: "start" }), h("slot", null), h("slot", { name: "end" })), this.canLoad() ? this.spinner() : null)) : (h("button", { disabled: this.disabled || this.groupDisabled, class: { [`b2b-button--${this.variant}`]: true }, type: this.type, ref: el => (this.focusableElement = el) }, h("span", null, h("slot", { name: "start" }), h("slot", null), h("slot", { name: "end" })), this.canLoad() ? this.spinner() : null))));
66
70
  }
67
71
  static get is() { return "b2b-button"; }
68
72
  static get encapsulation() { return "shadow"; }
@@ -237,6 +241,27 @@ export class ButtonComponent {
237
241
  },
238
242
  "attribute": "download",
239
243
  "reflect": false
244
+ },
245
+ "groupDisabled": {
246
+ "type": "boolean",
247
+ "mutable": false,
248
+ "complexType": {
249
+ "original": "boolean",
250
+ "resolved": "boolean",
251
+ "references": {}
252
+ },
253
+ "required": false,
254
+ "optional": false,
255
+ "docs": {
256
+ "tags": [{
257
+ "name": "internal",
258
+ "text": "Whether the parent input group is disabled. Per default, it is false."
259
+ }],
260
+ "text": ""
261
+ },
262
+ "attribute": "group-disabled",
263
+ "reflect": false,
264
+ "defaultValue": "false"
240
265
  }
241
266
  };
242
267
  }
@@ -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 */