@otto-de/b2b-core-components 1.30.0 → 1.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (474) hide show
  1. package/dist/b2b-core-components/b2b-core-components.esm.js +1 -1
  2. package/dist/b2b-core-components/p-00666ca7.entry.js +1 -0
  3. package/dist/b2b-core-components/p-0a63f5f8.entry.js +1 -0
  4. package/dist/b2b-core-components/{p-9cfba835.entry.js → p-0bf05f33.entry.js} +1 -1
  5. package/dist/b2b-core-components/{p-68e07419.entry.js → p-0edac105.entry.js} +1 -1
  6. package/dist/b2b-core-components/p-0ffc90ee.entry.js +1 -0
  7. package/dist/b2b-core-components/p-168c8684.entry.js +1 -0
  8. package/dist/b2b-core-components/p-19392020.js +1 -0
  9. package/dist/b2b-core-components/p-1a908833.entry.js +1 -0
  10. package/dist/b2b-core-components/{p-a37d6cea.entry.js → p-1dff8b34.entry.js} +1 -1
  11. package/dist/b2b-core-components/p-2d5df8f7.entry.js +1 -0
  12. package/dist/b2b-core-components/p-2dc0c5c0.entry.js +1 -0
  13. package/dist/b2b-core-components/p-318eb15e.entry.js +1 -0
  14. package/dist/b2b-core-components/p-33c01bb2.entry.js +1 -0
  15. package/dist/b2b-core-components/p-375cefbd.entry.js +1 -0
  16. package/dist/b2b-core-components/p-383d0a10.entry.js +1 -0
  17. package/dist/b2b-core-components/{p-08577a40.entry.js → p-400fa973.entry.js} +1 -1
  18. package/dist/b2b-core-components/p-413729d1.entry.js +1 -0
  19. package/dist/b2b-core-components/p-49bafb74.entry.js +1 -0
  20. package/dist/b2b-core-components/{p-745ad406.entry.js → p-4bc0ec9a.entry.js} +1 -1
  21. package/dist/b2b-core-components/p-564c62d0.entry.js +1 -0
  22. package/dist/b2b-core-components/{p-6040dca2.entry.js → p-6025d667.entry.js} +1 -1
  23. package/dist/b2b-core-components/p-61b2a6ad.js +1 -0
  24. package/dist/b2b-core-components/{p-54d478b6.entry.js → p-661d0249.entry.js} +1 -1
  25. package/dist/b2b-core-components/p-6dd7fd7b.entry.js +1 -0
  26. package/dist/b2b-core-components/p-6ff5114b.entry.js +1 -0
  27. package/dist/b2b-core-components/p-742a18f1.entry.js +1 -0
  28. package/dist/b2b-core-components/{p-23acc468.entry.js → p-781611fb.entry.js} +1 -1
  29. package/dist/b2b-core-components/{p-0847e62e.entry.js → p-7bb6f06e.entry.js} +1 -1
  30. package/dist/b2b-core-components/p-7dd8f3cb.entry.js +1 -0
  31. package/dist/b2b-core-components/p-815d7a53.entry.js +1 -0
  32. package/dist/b2b-core-components/{p-5063e5b7.entry.js → p-850c8e01.entry.js} +1 -1
  33. package/dist/b2b-core-components/{p-e8b1fee4.entry.js → p-86ff8e6c.entry.js} +1 -1
  34. package/dist/b2b-core-components/{p-552f43c1.entry.js → p-9819f622.entry.js} +1 -1
  35. package/dist/b2b-core-components/{p-ccf78e23.entry.js → p-9dde1af0.entry.js} +1 -1
  36. package/dist/b2b-core-components/{p-24c94653.entry.js → p-9f88b476.entry.js} +1 -1
  37. package/dist/b2b-core-components/p-a155219a.entry.js +1 -0
  38. package/dist/b2b-core-components/p-a96c8ba0.entry.js +1 -0
  39. package/dist/b2b-core-components/p-b33059ab.entry.js +1 -0
  40. package/dist/b2b-core-components/p-b5fdf7df.entry.js +1 -0
  41. package/dist/b2b-core-components/p-b6a753e8.js +2 -0
  42. package/dist/b2b-core-components/p-bba0b41b.entry.js +1 -0
  43. package/dist/b2b-core-components/p-be93498d.entry.js +1 -0
  44. package/dist/b2b-core-components/p-bfbe4aff.entry.js +1 -0
  45. package/dist/b2b-core-components/p-c597637e.entry.js +1 -0
  46. package/dist/b2b-core-components/{p-eb01bb4f.entry.js → p-c67bcebc.entry.js} +1 -1
  47. package/dist/b2b-core-components/p-cb4cc427.entry.js +1 -0
  48. package/dist/b2b-core-components/{p-a63dfd99.entry.js → p-d1c8105b.entry.js} +1 -1
  49. package/dist/b2b-core-components/{p-2f9efe3f.entry.js → p-d26ec403.entry.js} +1 -1
  50. package/dist/b2b-core-components/p-d3204d75.entry.js +1 -0
  51. package/dist/b2b-core-components/p-d6457a1d.entry.js +1 -0
  52. package/dist/b2b-core-components/p-db205434.entry.js +1 -0
  53. package/dist/b2b-core-components/p-e1255160.js +1 -0
  54. package/dist/b2b-core-components/p-e40069cd.entry.js +1 -0
  55. package/dist/b2b-core-components/p-e520c7cf.entry.js +1 -0
  56. package/dist/b2b-core-components/p-f2fdce36.entry.js +1 -0
  57. package/dist/b2b-core-components/p-f5786cad.entry.js +1 -0
  58. package/dist/b2b-core-components/{p-58fb3508.entry.js → p-f5e9dbf4.entry.js} +1 -1
  59. package/dist/b2b-core-components/p-f9e278da.entry.js +1 -0
  60. package/dist/b2b-core-components/p-fa85955c.entry.js +1 -0
  61. package/dist/b2b-core-components/{p-eb78706f.entry.js → p-fae54521.entry.js} +1 -1
  62. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  63. package/dist/cjs/b2b-alert.cjs.entry.js +13 -15
  64. package/dist/cjs/b2b-anchor.cjs.entry.js +8 -10
  65. package/dist/cjs/b2b-background-box.cjs.entry.js +7 -10
  66. package/dist/cjs/b2b-breadcrumb-item.cjs.entry.js +10 -8
  67. package/dist/cjs/b2b-breadcrumb.cjs.entry.js +10 -9
  68. package/dist/cjs/b2b-button_2.cjs.entry.js +20 -25
  69. package/dist/cjs/b2b-card.cjs.entry.js +8 -8
  70. package/dist/cjs/b2b-checkbox-group.cjs.entry.js +15 -13
  71. package/dist/cjs/b2b-checkbox.cjs.entry.js +22 -19
  72. package/dist/cjs/b2b-chip-component_2.cjs.entry.js +24 -20
  73. package/dist/cjs/b2b-core-components.cjs.js +14 -13
  74. package/dist/cjs/b2b-date-picker-days_5.cjs.entry.js +50 -40
  75. package/dist/cjs/b2b-date-picker.cjs.entry.js +37 -36
  76. package/dist/cjs/b2b-dropdown.cjs.entry.js +26 -24
  77. package/dist/cjs/b2b-flyout-menu-option.cjs.entry.js +10 -8
  78. package/dist/cjs/b2b-flyout-menu.cjs.entry.js +9 -7
  79. package/dist/cjs/b2b-grid-col.cjs.entry.js +6 -4
  80. package/dist/cjs/b2b-grid-row.cjs.entry.js +5 -7
  81. package/dist/cjs/b2b-grid.cjs.entry.js +6 -4
  82. package/dist/cjs/b2b-headline.cjs.entry.js +5 -5
  83. package/dist/cjs/b2b-icon-100.cjs.entry.js +12 -12
  84. package/dist/cjs/b2b-icon-50.cjs.entry.js +10 -9
  85. package/dist/cjs/b2b-icon.cjs.entry.js +12 -12
  86. package/dist/cjs/b2b-input-group_2.cjs.entry.js +24 -24
  87. package/dist/cjs/b2b-input-label.cjs.entry.js +7 -6
  88. package/dist/cjs/b2b-input_2.cjs.entry.js +33 -33
  89. package/dist/cjs/b2b-label.cjs.entry.js +7 -5
  90. package/dist/cjs/b2b-modal.cjs.entry.js +16 -18
  91. package/dist/cjs/b2b-multiselect-dropdown.cjs.entry.js +27 -24
  92. package/dist/cjs/b2b-pagination.cjs.entry.js +12 -13
  93. package/dist/cjs/b2b-paragraph.cjs.entry.js +7 -10
  94. package/dist/cjs/b2b-progress-bar.cjs.entry.js +12 -9
  95. package/dist/cjs/b2b-radio-button.cjs.entry.js +19 -15
  96. package/dist/cjs/b2b-radio-group.cjs.entry.js +17 -13
  97. package/dist/cjs/b2b-required-separator.cjs.entry.js +6 -4
  98. package/dist/cjs/b2b-rounded-icon.cjs.entry.js +10 -12
  99. package/dist/cjs/b2b-scrollable-container.cjs.entry.js +6 -3
  100. package/dist/cjs/b2b-search.cjs.entry.js +10 -9
  101. package/dist/cjs/b2b-separator.cjs.entry.js +6 -4
  102. package/dist/cjs/b2b-shimmer.cjs.entry.js +9 -3
  103. package/dist/cjs/b2b-snackbar.cjs.entry.js +19 -18
  104. package/dist/cjs/b2b-tab-group.cjs.entry.js +6 -6
  105. package/dist/cjs/b2b-tab-panel.cjs.entry.js +6 -3
  106. package/dist/cjs/b2b-tab.cjs.entry.js +8 -8
  107. package/dist/cjs/b2b-table-cell_2.cjs.entry.js +30 -37
  108. package/dist/cjs/b2b-table-row.cjs.entry.js +19 -17
  109. package/dist/cjs/b2b-table-rowgroup.cjs.entry.js +16 -23
  110. package/dist/cjs/b2b-table.cjs.entry.js +10 -13
  111. package/dist/cjs/b2b-textarea.cjs.entry.js +23 -17
  112. package/dist/cjs/b2b-toggle-button.cjs.entry.js +14 -10
  113. package/dist/cjs/b2b-toggle-chip.cjs.entry.js +14 -10
  114. package/dist/cjs/b2b-toggle-group.cjs.entry.js +11 -7
  115. package/dist/cjs/b2b-toggle-switch.cjs.entry.js +15 -13
  116. package/dist/cjs/b2b-tooltip.cjs.entry.js +12 -11
  117. package/dist/cjs/b2b-wizard-icon.cjs.entry.js +9 -8
  118. package/dist/cjs/b2b-wizard-step.cjs.entry.js +8 -9
  119. package/dist/cjs/b2b-wizard.cjs.entry.js +10 -12
  120. package/dist/cjs/index-668808fd.js +2516 -0
  121. package/dist/cjs/loader.cjs.js +6 -3
  122. package/dist/cjs/{request-Dwsj-gbA.js → request-801c6ba1.js} +0 -2
  123. package/dist/cjs/{utils--ZrBSHVe.js → utils-499e9db5.js} +9 -2
  124. package/dist/collection/collection-manifest.json +2 -2
  125. package/dist/collection/components/alert/alert.e2e.js +67 -0
  126. package/dist/collection/components/alert/alert.js +12 -27
  127. package/dist/collection/components/anchor/anchor.js +9 -26
  128. package/dist/collection/components/anchor/anchor.spec.js +68 -0
  129. package/dist/collection/components/background-box/background-box.e2e.js +63 -0
  130. package/dist/collection/components/background-box/background-box.js +8 -26
  131. package/dist/collection/components/background-box/background-box.spec.js +64 -0
  132. package/dist/collection/components/breadcrumb/breadcrumb-item.js +7 -14
  133. package/dist/collection/components/breadcrumb/breadcrumb.e2e.js +50 -0
  134. package/dist/collection/components/breadcrumb/breadcrumb.js +6 -12
  135. package/dist/collection/components/button/button.e2e.js +80 -0
  136. package/dist/collection/components/button/button.js +23 -52
  137. package/dist/collection/components/card/card.e2e.js +110 -0
  138. package/dist/collection/components/card/card.js +5 -14
  139. package/dist/collection/components/card/card.spec.js +32 -0
  140. package/dist/collection/components/checkbox/checkbox.e2e.js +36 -0
  141. package/dist/collection/components/checkbox/checkbox.js +26 -50
  142. package/dist/collection/components/checkbox/checkbox.spec.js +45 -0
  143. package/dist/collection/components/checkbox-group/checkbox-group.e2e.js +78 -0
  144. package/dist/collection/components/checkbox-group/checkbox-group.js +16 -31
  145. package/dist/collection/components/checkbox-group/checkbox-group.spec.js +38 -0
  146. package/dist/collection/components/chip/chip.e2e.js +99 -0
  147. package/dist/collection/components/chip/chip.js +17 -30
  148. package/dist/collection/components/date-picker/date-picker-days-header.js +3 -6
  149. package/dist/collection/components/date-picker/date-picker-days.js +20 -44
  150. package/dist/collection/components/date-picker/date-picker-header.e2e.js +38 -0
  151. package/dist/collection/components/date-picker/date-picker-header.js +10 -15
  152. package/dist/collection/components/date-picker/date-picker-months.e2e.js +39 -0
  153. package/dist/collection/components/date-picker/date-picker-months.js +5 -9
  154. package/dist/collection/components/date-picker/date-picker-years.e2e.js +39 -0
  155. package/dist/collection/components/date-picker/date-picker-years.js +4 -5
  156. package/dist/collection/components/date-picker/date-picker.e2e.js +137 -0
  157. package/dist/collection/components/date-picker/date-picker.js +44 -76
  158. package/dist/collection/components/dropdown/dropdown.e2e.js +86 -0
  159. package/dist/collection/components/dropdown/dropdown.js +27 -46
  160. package/dist/collection/components/dropdown/dropdown.spec.js +52 -0
  161. package/dist/collection/components/flyout-menu/flyout-menu-option.js +7 -14
  162. package/dist/collection/components/flyout-menu/flyout-menu.e2e.js +97 -0
  163. package/dist/collection/components/flyout-menu/flyout-menu.js +5 -8
  164. package/dist/collection/components/grid/column.js +5 -9
  165. package/dist/collection/components/grid/grid.e2e.js +17 -0
  166. package/dist/collection/components/grid/grid.js +2 -5
  167. package/dist/collection/components/grid/row.js +6 -18
  168. package/dist/collection/components/headline/headline.e2e.js +13 -0
  169. package/dist/collection/components/headline/headline.js +3 -12
  170. package/dist/collection/components/headline/headline.spec.js +67 -0
  171. package/dist/collection/components/icon/icon.js +11 -24
  172. package/dist/collection/components/icon/icon.spec.js +21 -0
  173. package/dist/collection/components/icon-100/icon-100.e2e.js +40 -0
  174. package/dist/collection/components/icon-100/icon-100.js +11 -24
  175. package/dist/collection/components/icon-50/icon-50.e2e.js +32 -0
  176. package/dist/collection/components/icon-50/icon-50.js +8 -18
  177. package/dist/collection/components/input/input.e2e.js +81 -0
  178. package/dist/collection/components/input/input.js +33 -64
  179. package/dist/collection/components/input/input.spec.js +45 -0
  180. package/dist/collection/components/input-group/input-group.e2e.js +76 -0
  181. package/dist/collection/components/input-group/input-group.js +9 -17
  182. package/dist/collection/components/input-group/input-group.spec.js +56 -0
  183. package/dist/collection/components/input-label/input-label.e2e.js +10 -0
  184. package/dist/collection/components/input-label/input-label.js +4 -10
  185. package/dist/collection/components/input-list/input-list-option.js +3 -4
  186. package/dist/collection/components/input-list/input-list.e2e.js +241 -0
  187. package/dist/collection/components/input-list/input-list.js +17 -36
  188. package/dist/collection/components/label/label.e2e.js +17 -0
  189. package/dist/collection/components/label/label.js +3 -6
  190. package/dist/collection/components/label/label.spec.js +58 -0
  191. package/dist/collection/components/modal/modal.e2e.js +115 -0
  192. package/dist/collection/components/modal/modal.js +14 -29
  193. package/dist/collection/components/multiselect-dropdown/multiselect-dropdown.e2e.js +74 -0
  194. package/dist/collection/components/multiselect-dropdown/multiselect-dropdown.js +33 -57
  195. package/dist/collection/components/multiselect-dropdown/multiselect-option/multiselect-option.js +8 -15
  196. package/dist/collection/components/pagination/pagination.e2e.js +255 -0
  197. package/dist/collection/components/pagination/pagination.js +10 -22
  198. package/dist/collection/components/pagination/pagination.spec.js +103 -0
  199. package/dist/collection/components/paragraph/paragraph.e2e.js +13 -0
  200. package/dist/collection/components/paragraph/paragraph.js +8 -26
  201. package/dist/collection/components/progress-bar/progress-bar.e2e.js +43 -0
  202. package/dist/collection/components/progress-bar/progress-bar.js +11 -19
  203. package/dist/collection/components/radio/radio.e2e.js +45 -0
  204. package/dist/collection/components/radio/radio.js +20 -37
  205. package/dist/collection/components/radio/radio.spec.js +38 -0
  206. package/dist/collection/components/radio-group/radio-group.e2e.js +83 -0
  207. package/dist/collection/components/radio-group/radio-group.js +19 -34
  208. package/dist/collection/components/radio-group/radio-group.spec.js +31 -0
  209. package/dist/collection/components/required-separator/required-separator.e2e.js +17 -0
  210. package/dist/collection/components/required-separator/required-separator.js +2 -5
  211. package/dist/collection/components/rounded-icon/rounded-icon.js +8 -19
  212. package/dist/collection/components/scrollable-container/scrollable-container.js +1 -1
  213. package/dist/collection/components/search/search.e2e.js +97 -0
  214. package/dist/collection/components/search/search.js +9 -19
  215. package/dist/collection/components/separator/separator.e2e.js +22 -0
  216. package/dist/collection/components/separator/separator.js +2 -5
  217. package/dist/collection/components/shimmer/shimmer.e2e.js +18 -0
  218. package/dist/collection/components/shimmer/shimmer.js +9 -10
  219. package/dist/collection/components/shimmer/shimmer.spec.js +35 -0
  220. package/dist/collection/components/snackbar/snackbar.e2e.js +61 -0
  221. package/dist/collection/components/snackbar/snackbar.js +20 -38
  222. package/dist/collection/components/spinner/spinner.e2e.js +12 -0
  223. package/dist/collection/components/spinner/spinner.js +3 -9
  224. package/dist/collection/components/spinner/spinner.spec.js +41 -0
  225. package/dist/collection/components/tab/tab.e2e.js +35 -0
  226. package/dist/collection/components/tab/tab.js +5 -14
  227. package/dist/collection/components/tab/tab.spec.js +31 -0
  228. package/dist/collection/components/tab-group/tab-group.e2e.js +99 -0
  229. package/dist/collection/components/tab-group/tab-group.js +3 -7
  230. package/dist/collection/components/tab-panel/tab-panel.e2e.js +12 -0
  231. package/dist/collection/components/tab-panel/tab-panel.js +1 -1
  232. package/dist/collection/components/tab-panel/tab-panel.spec.js +10 -0
  233. package/dist/collection/components/table/table-cell/table-cell.js +17 -40
  234. package/dist/collection/components/table/table-header/table-header.js +19 -37
  235. package/dist/collection/components/table/table-row/table-row.js +18 -33
  236. package/dist/collection/components/table/table-rowgroup/table-rowgroup.js +15 -37
  237. package/dist/collection/components/table/table.e2e.js +401 -0
  238. package/dist/collection/components/table/table.js +4 -12
  239. package/dist/collection/components/textarea/textarea.e2e.js +91 -0
  240. package/dist/collection/components/textarea/textarea.js +28 -51
  241. package/dist/collection/components/toggle-button/toggle-button.e2e.js +44 -0
  242. package/dist/collection/components/toggle-button/toggle-button.js +13 -22
  243. package/dist/collection/components/toggle-chip/toggle-chip.e2e.js +47 -0
  244. package/dist/collection/components/toggle-chip/toggle-chip.js +13 -22
  245. package/dist/collection/components/toggle-group/toggle-group.e2e.js +65 -0
  246. package/dist/collection/components/toggle-group/toggle-group.js +7 -10
  247. package/dist/collection/components/toggle-switch/toggle-switch.e2e.js +50 -0
  248. package/dist/collection/components/toggle-switch/toggle-switch.js +14 -25
  249. package/dist/collection/components/tooltip/tooltip.e2e.js +64 -0
  250. package/dist/collection/components/tooltip/tooltip.js +11 -21
  251. package/dist/collection/components/wizard/wizard-step.js +5 -15
  252. package/dist/collection/components/wizard/wizard.e2e.js +149 -0
  253. package/dist/collection/components/wizard/wizard.js +7 -18
  254. package/dist/collection/components/wizard-icon/wizard-icon.js +6 -14
  255. package/dist/collection/docs/config/replace-prop-controls.spec.js +32 -0
  256. package/dist/collection/utils/utils.spec.js +15 -0
  257. package/dist/components/b2b-alert.js +13 -17
  258. package/dist/components/b2b-anchor.js +7 -11
  259. package/dist/components/b2b-background-box.js +6 -11
  260. package/dist/components/b2b-breadcrumb-item.js +9 -9
  261. package/dist/components/b2b-breadcrumb.js +9 -10
  262. package/dist/components/b2b-button.js +1 -1
  263. package/dist/components/b2b-card.js +7 -9
  264. package/dist/components/b2b-checkbox-group.js +15 -15
  265. package/dist/components/b2b-checkbox.js +1 -1
  266. package/dist/components/b2b-chip-component.js +1 -1
  267. package/dist/components/b2b-date-picker-days-header.js +1 -1
  268. package/dist/components/b2b-date-picker-days.js +1 -1
  269. package/dist/components/b2b-date-picker-header.js +1 -1
  270. package/dist/components/b2b-date-picker-months.js +1 -1
  271. package/dist/components/b2b-date-picker-years.js +1 -1
  272. package/dist/components/b2b-date-picker.js +43 -44
  273. package/dist/components/b2b-dropdown.js +26 -26
  274. package/dist/components/b2b-flyout-menu-option.js +9 -9
  275. package/dist/components/b2b-flyout-menu.js +8 -8
  276. package/dist/components/b2b-grid-col.js +5 -5
  277. package/dist/components/b2b-grid-row.js +4 -8
  278. package/dist/components/b2b-grid.js +5 -5
  279. package/dist/components/b2b-headline.js +1 -1
  280. package/dist/components/b2b-icon-100.js +1 -1
  281. package/dist/components/b2b-icon-50.js +13 -11
  282. package/dist/components/b2b-icon.js +16 -15
  283. package/dist/components/b2b-input-group.js +1 -1
  284. package/dist/components/b2b-input-label.js +1 -1
  285. package/dist/components/b2b-input-list-option.js +1 -1
  286. package/dist/components/b2b-input-list.js +1 -1
  287. package/dist/components/b2b-input.js +1 -1
  288. package/dist/components/b2b-label.js +6 -6
  289. package/dist/components/b2b-modal.js +17 -21
  290. package/dist/components/b2b-multiselect-dropdown.js +31 -30
  291. package/dist/components/b2b-multiselect-option.js +1 -1
  292. package/dist/components/b2b-pagination.js +13 -16
  293. package/dist/components/b2b-paragraph.js +6 -11
  294. package/dist/components/b2b-progress-bar.js +11 -10
  295. package/dist/components/b2b-radio-button.js +19 -17
  296. package/dist/components/b2b-radio-group.js +17 -15
  297. package/dist/components/b2b-required-separator.js +6 -6
  298. package/dist/components/b2b-rounded-icon.js +1 -1
  299. package/dist/components/b2b-scrollable-container.js +5 -4
  300. package/dist/components/b2b-search.js +18 -19
  301. package/dist/components/b2b-separator.js +1 -1
  302. package/dist/components/b2b-shimmer.js +8 -4
  303. package/dist/components/b2b-snackbar.js +19 -20
  304. package/dist/components/b2b-spinner.js +1 -1
  305. package/dist/components/b2b-tab-group.js +6 -8
  306. package/dist/components/b2b-tab-panel.js +5 -4
  307. package/dist/components/b2b-tab.js +7 -9
  308. package/dist/components/b2b-table-cell.js +1 -1
  309. package/dist/components/b2b-table-header.js +1 -1
  310. package/dist/components/b2b-table-row.js +23 -23
  311. package/dist/components/b2b-table-rowgroup.js +15 -24
  312. package/dist/components/b2b-table.js +9 -14
  313. package/dist/components/b2b-textarea.js +23 -19
  314. package/dist/components/b2b-toggle-button.js +13 -11
  315. package/dist/components/b2b-toggle-chip.js +13 -11
  316. package/dist/components/b2b-toggle-group.js +10 -8
  317. package/dist/components/b2b-toggle-switch.js +14 -14
  318. package/dist/components/b2b-tooltip.js +11 -12
  319. package/dist/components/b2b-wizard-icon.js +1 -1
  320. package/dist/components/b2b-wizard-step.js +10 -13
  321. package/dist/components/b2b-wizard.js +9 -13
  322. package/dist/components/{p-CE7t2D9r.js → button.js} +17 -23
  323. package/dist/components/{p-CLYM9t6v.js → checkbox.js} +22 -21
  324. package/dist/components/{p-ClL49BcQ.js → chip.js} +15 -13
  325. package/dist/components/{p-FI-HbnMh.js → date-picker-days-header.js} +7 -7
  326. package/dist/components/{p-0Vy4494O.js → date-picker-days.js} +24 -21
  327. package/dist/components/{p-C_U38W4s.js → date-picker-header.js} +17 -15
  328. package/dist/components/{p-1ZoTG5p9.js → date-picker-months.js} +9 -8
  329. package/dist/components/{p-dMZsx2Fh.js → date-picker-years.js} +8 -6
  330. package/dist/components/{p-Bo-B8kdb.js → headline.js} +4 -6
  331. package/dist/components/{p-B9RvgUY3.js → icon-100.js} +15 -14
  332. package/dist/components/index.js +1 -1929
  333. package/dist/components/{p-TB2jJFV6.js → input-group.js} +9 -8
  334. package/dist/components/{p-Zg4AtKjq.js → input-label.js} +6 -7
  335. package/dist/components/{p-QTGqu3he.js → input-list-option.js} +7 -5
  336. package/dist/components/{p-BacBJzW_.js → input-list.js} +21 -24
  337. package/dist/components/{p-CuUquHzL.js → input.js} +28 -32
  338. package/dist/components/{p-B7bjXySI.js → multiselect-option.js} +12 -12
  339. package/dist/{esm/request-B8W50WyB.js → components/request.js} +5 -2
  340. package/dist/components/{p-i758rnm2.js → rounded-icon.js} +9 -13
  341. package/dist/components/{p-DO7N8IC0.js → separator.js} +5 -5
  342. package/dist/components/{p-3cu_Madt.js → spinner.js} +5 -6
  343. package/dist/components/{p-9OQH2pET.js → table-cell.js} +15 -23
  344. package/dist/components/{p-BVLpVPNb.js → table-header.js} +17 -18
  345. package/dist/{esm/utils-BA6KE1BD.js → components/utils.js} +10 -3
  346. package/dist/components/{p-N6d2-6pL.js → wizard-icon.js} +10 -11
  347. package/dist/custom-elements.json +0 -24
  348. package/dist/esm/app-globals-0f993ce5.js +3 -0
  349. package/dist/esm/b2b-alert.entry.js +11 -15
  350. package/dist/esm/b2b-anchor.entry.js +6 -10
  351. package/dist/esm/b2b-background-box.entry.js +5 -10
  352. package/dist/esm/b2b-breadcrumb-item.entry.js +8 -8
  353. package/dist/esm/b2b-breadcrumb.entry.js +8 -9
  354. package/dist/esm/b2b-button_2.entry.js +18 -25
  355. package/dist/esm/b2b-card.entry.js +6 -8
  356. package/dist/esm/b2b-checkbox-group.entry.js +13 -13
  357. package/dist/esm/b2b-checkbox.entry.js +20 -19
  358. package/dist/esm/b2b-chip-component_2.entry.js +22 -20
  359. package/dist/esm/b2b-core-components.js +12 -12
  360. package/dist/esm/b2b-date-picker-days_5.entry.js +48 -40
  361. package/dist/esm/b2b-date-picker.entry.js +35 -36
  362. package/dist/esm/b2b-dropdown.entry.js +24 -24
  363. package/dist/esm/b2b-flyout-menu-option.entry.js +8 -8
  364. package/dist/esm/b2b-flyout-menu.entry.js +7 -7
  365. package/dist/esm/b2b-grid-col.entry.js +4 -4
  366. package/dist/esm/b2b-grid-row.entry.js +3 -7
  367. package/dist/esm/b2b-grid.entry.js +4 -4
  368. package/dist/esm/b2b-headline.entry.js +3 -5
  369. package/dist/esm/b2b-icon-100.entry.js +10 -12
  370. package/dist/esm/b2b-icon-50.entry.js +8 -9
  371. package/dist/esm/b2b-icon.entry.js +10 -12
  372. package/dist/esm/b2b-input-group_2.entry.js +22 -24
  373. package/dist/esm/b2b-input-label.entry.js +5 -6
  374. package/dist/esm/b2b-input_2.entry.js +31 -33
  375. package/dist/esm/b2b-label.entry.js +5 -5
  376. package/dist/esm/b2b-modal.entry.js +14 -18
  377. package/dist/esm/b2b-multiselect-dropdown.entry.js +25 -24
  378. package/dist/esm/b2b-pagination.entry.js +10 -13
  379. package/dist/esm/b2b-paragraph.entry.js +5 -10
  380. package/dist/esm/b2b-progress-bar.entry.js +10 -9
  381. package/dist/esm/b2b-radio-button.entry.js +17 -15
  382. package/dist/esm/b2b-radio-group.entry.js +15 -13
  383. package/dist/esm/b2b-required-separator.entry.js +4 -4
  384. package/dist/esm/b2b-rounded-icon.entry.js +8 -12
  385. package/dist/esm/b2b-scrollable-container.entry.js +4 -3
  386. package/dist/esm/b2b-search.entry.js +8 -9
  387. package/dist/esm/b2b-separator.entry.js +4 -4
  388. package/dist/esm/b2b-shimmer.entry.js +7 -3
  389. package/dist/esm/b2b-snackbar.entry.js +17 -18
  390. package/dist/esm/b2b-tab-group.entry.js +4 -6
  391. package/dist/esm/b2b-tab-panel.entry.js +4 -3
  392. package/dist/esm/b2b-tab.entry.js +6 -8
  393. package/dist/esm/b2b-table-cell_2.entry.js +28 -37
  394. package/dist/esm/b2b-table-row.entry.js +17 -17
  395. package/dist/esm/b2b-table-rowgroup.entry.js +14 -23
  396. package/dist/esm/b2b-table.entry.js +8 -13
  397. package/dist/esm/b2b-textarea.entry.js +21 -17
  398. package/dist/esm/b2b-toggle-button.entry.js +12 -10
  399. package/dist/esm/b2b-toggle-chip.entry.js +12 -10
  400. package/dist/esm/b2b-toggle-group.entry.js +9 -7
  401. package/dist/esm/b2b-toggle-switch.entry.js +13 -13
  402. package/dist/esm/b2b-tooltip.entry.js +10 -11
  403. package/dist/esm/b2b-wizard-icon.entry.js +7 -8
  404. package/dist/esm/b2b-wizard-step.entry.js +6 -9
  405. package/dist/esm/b2b-wizard.entry.js +8 -12
  406. package/dist/esm/index-ab9eb36d.js +2487 -0
  407. package/dist/esm/loader.js +4 -3
  408. package/dist/esm/polyfills/core-js.js +11 -0
  409. package/dist/esm/polyfills/dom.js +79 -0
  410. package/dist/esm/polyfills/es5-html-element.js +1 -0
  411. package/dist/esm/polyfills/index.js +34 -0
  412. package/dist/esm/polyfills/system.js +6 -0
  413. package/dist/{components/p-CPfvpKl5.js → esm/request-1d048f8a.js} +0 -2
  414. package/dist/{components/p-BA6KE1BD.js → esm/utils-868299de.js} +10 -3
  415. package/dist/loader/cdn.js +3 -1
  416. package/dist/loader/index.cjs.js +3 -1
  417. package/dist/loader/index.d.ts +0 -3
  418. package/dist/loader/index.es2017.js +3 -1
  419. package/dist/loader/index.js +3 -1
  420. package/dist/loader/package.json +11 -0
  421. package/dist/types/components.d.ts +0 -413
  422. package/dist/types/stencil-public-runtime.d.ts +11 -32
  423. package/dist/web-types.json +7 -7
  424. package/package.json +8 -11
  425. package/dist/b2b-core-components/p-0002d8d5.entry.js +0 -1
  426. package/dist/b2b-core-components/p-0386f660.entry.js +0 -1
  427. package/dist/b2b-core-components/p-0a08e2c8.entry.js +0 -1
  428. package/dist/b2b-core-components/p-0d8cc4eb.entry.js +0 -1
  429. package/dist/b2b-core-components/p-197dc9c0.entry.js +0 -1
  430. package/dist/b2b-core-components/p-220b8c79.entry.js +0 -1
  431. package/dist/b2b-core-components/p-2933f053.entry.js +0 -1
  432. package/dist/b2b-core-components/p-3a9f7db8.entry.js +0 -1
  433. package/dist/b2b-core-components/p-3e0919b3.entry.js +0 -1
  434. package/dist/b2b-core-components/p-42d9f79d.entry.js +0 -1
  435. package/dist/b2b-core-components/p-4bb42493.entry.js +0 -1
  436. package/dist/b2b-core-components/p-4c550170.entry.js +0 -1
  437. package/dist/b2b-core-components/p-50559efd.entry.js +0 -1
  438. package/dist/b2b-core-components/p-55db3d57.entry.js +0 -1
  439. package/dist/b2b-core-components/p-6e7abebc.entry.js +0 -1
  440. package/dist/b2b-core-components/p-7b75a0a4.entry.js +0 -1
  441. package/dist/b2b-core-components/p-7cbe33ef.entry.js +0 -1
  442. package/dist/b2b-core-components/p-8544b7e1.entry.js +0 -1
  443. package/dist/b2b-core-components/p-88037ad2.entry.js +0 -1
  444. package/dist/b2b-core-components/p-930425a1.entry.js +0 -1
  445. package/dist/b2b-core-components/p-B9l4NfeG.js +0 -1
  446. package/dist/b2b-core-components/p-BA6KE1BD.js +0 -1
  447. package/dist/b2b-core-components/p-a1a4efd4.entry.js +0 -1
  448. package/dist/b2b-core-components/p-a61eecf7.entry.js +0 -1
  449. package/dist/b2b-core-components/p-ada918c2.entry.js +0 -1
  450. package/dist/b2b-core-components/p-bb020c1c.entry.js +0 -1
  451. package/dist/b2b-core-components/p-bbb4c6f3.entry.js +0 -1
  452. package/dist/b2b-core-components/p-c0af184a.entry.js +0 -1
  453. package/dist/b2b-core-components/p-c40f7176.entry.js +0 -1
  454. package/dist/b2b-core-components/p-c6043d6a.entry.js +0 -1
  455. package/dist/b2b-core-components/p-c649c112.entry.js +0 -1
  456. package/dist/b2b-core-components/p-c69e9220.entry.js +0 -1
  457. package/dist/b2b-core-components/p-d1b46208.entry.js +0 -1
  458. package/dist/b2b-core-components/p-d2d40ae5.entry.js +0 -1
  459. package/dist/b2b-core-components/p-e8e156a4.entry.js +0 -1
  460. package/dist/b2b-core-components/p-ebcc2cce.entry.js +0 -1
  461. package/dist/b2b-core-components/p-edea84cc.entry.js +0 -1
  462. package/dist/b2b-core-components/p-f831e483.entry.js +0 -1
  463. package/dist/b2b-core-components/p-fdfb094e.entry.js +0 -1
  464. package/dist/b2b-core-components/p-zl-jO_Vq.js +0 -2
  465. package/dist/cjs/index-CIrNIFXs.js +0 -2406
  466. package/dist/esm/index-zl-jO_Vq.js +0 -2378
  467. /package/dist/b2b-core-components/{p-B8geQC3V.js → p-48608c23.js} +0 -0
  468. /package/dist/b2b-core-components/{p-BgHEmQ44.js → p-c500d93c.js} +0 -0
  469. /package/dist/cjs/{date-picker-util-VbL9p5ie.js → date-picker-util-51276571.js} +0 -0
  470. /package/dist/cjs/{wizard.types-uAv3s7tK.js → wizard.types-40a1058c.js} +0 -0
  471. /package/dist/components/{p-BsfreBZY.js → date-picker.types.js} +0 -0
  472. /package/dist/components/{p-BgHEmQ44.js → wizard.types.js} +0 -0
  473. /package/dist/esm/{date-picker-util-B8geQC3V.js → date-picker-util-44201ca6.js} +0 -0
  474. /package/dist/esm/{wizard.types-BgHEmQ44.js → wizard.types-40ae9b73.js} +0 -0
@@ -1,21 +1,6 @@
1
1
  import { h, Host, } from "@stencil/core";
2
2
  export class DropdownComponent {
3
3
  constructor() {
4
- /** Adds an asterisk at the end of the label to signify that the field is required. */
5
- this.required = false;
6
- /** Placeholder text for the dropdown. */
7
- this.placeholder = 'Select an option...';
8
- /** Value for the placeholder. Defaults to an empty string but can be customized. */
9
- this.placeholderValue = '';
10
- /** Whether the select as a whole is disabled. Per default it is false. */
11
- this.disabled = false;
12
- /** Whether the select is currently invalid. Per default it is false. */
13
- this.invalid = false;
14
- this.isOpen = false;
15
- this.focused = false;
16
- this.selectedValue = '';
17
- this.selectedText = '';
18
- this.options = [];
19
4
  this.truncatedText = '';
20
5
  this.onClickOutside = (ev) => {
21
6
  if (!this.hostElement.contains(ev.target))
@@ -71,6 +56,20 @@ export class DropdownComponent {
71
56
  }
72
57
  this.truncatedText = truncated + '…';
73
58
  };
59
+ this.label = undefined;
60
+ this.required = false;
61
+ this.name = undefined;
62
+ this.placeholder = 'Select an option...';
63
+ this.placeholderValue = '';
64
+ this.disabled = false;
65
+ this.invalid = false;
66
+ this.hint = undefined;
67
+ this.error = undefined;
68
+ this.isOpen = false;
69
+ this.focused = false;
70
+ this.selectedValue = '';
71
+ this.selectedText = '';
72
+ this.options = [];
74
73
  }
75
74
  /** Method to programmatically clear selection of the dropdown. */
76
75
  async clearSelection() {
@@ -139,19 +138,19 @@ export class DropdownComponent {
139
138
  const hasError = this.invalid && !this.disabled;
140
139
  const showHint = this.hint && (!this.invalid || this.disabled);
141
140
  const showError = this.error && hasError;
142
- return (h(Host, { key: '8246ad9949e10247030c17933a0f19e6c86eec14', class: {
141
+ return (h(Host, { key: 'a2b06d84969c61375e9768f7f6c268e33f3d3d3b', class: {
143
142
  'b2b-dropdown': true,
144
143
  'b2b-dropdown--error': hasError,
145
144
  'b2b-dropdown--disabled': this.disabled,
146
- } }, this.label && (h("b2b-input-label", { key: 'aed053349b3c29eb83f0dfac3a258762f8fa8860', id: this.name, required: this.required }, this.label)), h("div", { key: '635667aac3de6b75dcdffd0fa3c81f56f02c9d8d', class: "b2b-dropdown__wrapper", onFocus: this.onFocus, onBlur: this.onBlur }, h("div", { key: '98b367fdff59a1b659def3083daa6d5bd65a8c87', class: {
145
+ } }, this.label && (h("b2b-input-label", { id: this.name, required: this.required }, this.label)), h("div", { key: '22f461ff3cde097705ef0832fe24178678a5ac90', class: "b2b-dropdown__wrapper", onFocus: this.onFocus, onBlur: this.onBlur }, h("div", { key: '937e9b977f1259375cb86c8e7f96c62bad6dac2d', class: {
147
146
  'b2b-dropdown__select': true,
148
147
  'b2b-dropdown__select--open': this.isOpen,
149
148
  'b2b-dropdown__select--focused': this.focused,
150
- }, ref: el => (this.selectEl = el), onClick: this.toggleDropdown, role: "combobox", "aria-expanded": `${this.isOpen}`, "aria-labelledby": this.name }, this.selectedText ? this.truncatedText : this.placeholder), this.isOpen && (h("div", { key: 'db94ce372b150ae49b4ae1c1f52467274c72ce49', class: "b2b-dropdown__options", role: "listbox" }, this.options.map(option => (h("div", { key: option.value, class: {
149
+ }, ref: el => (this.selectEl = el), onClick: this.toggleDropdown, role: "combobox", "aria-expanded": `${this.isOpen}`, "aria-labelledby": this.name }, this.selectedText ? this.truncatedText : this.placeholder), this.isOpen && (h("div", { class: "b2b-dropdown__options", role: "listbox" }, this.options.map(option => (h("div", { key: option.value, class: {
151
150
  'b2b-dropdown__option': true,
152
151
  'b2b-dropdown__option--selected': option.selected,
153
152
  'b2b-dropdown__option--disabled': option.disabled,
154
- }, "data-value": option.value, onClick: !option.disabled ? this.onSelect : undefined, role: "option", "aria-selected": option.selected ? 'true' : 'false', "aria-disabled": option.disabled ? 'true' : 'false' }, option.label)))))), showHint && h("span", { key: 'df5cb03de7c4aff4c49b6b9ae24668f5a813488c' }, this.hint), showError && h("span", { key: '6ad4af4d3bc657eb2cd0e9c171f0373f19a485a1' }, this.error)));
153
+ }, "data-value": option.value, onClick: !option.disabled ? this.onSelect : undefined, role: "option", "aria-selected": option.selected ? 'true' : 'false', "aria-disabled": option.disabled ? 'true' : 'false' }, option.label)))))), showHint && h("span", null, this.hint), showError && h("span", null, this.error)));
155
154
  }
156
155
  static get is() { return "b2b-dropdown"; }
157
156
  static get encapsulation() { return "shadow"; }
@@ -169,7 +168,6 @@ export class DropdownComponent {
169
168
  return {
170
169
  "label": {
171
170
  "type": "string",
172
- "attribute": "label",
173
171
  "mutable": false,
174
172
  "complexType": {
175
173
  "original": "string",
@@ -182,13 +180,11 @@ export class DropdownComponent {
182
180
  "tags": [],
183
181
  "text": "The dropdown label."
184
182
  },
185
- "getter": false,
186
- "setter": false,
183
+ "attribute": "label",
187
184
  "reflect": false
188
185
  },
189
186
  "required": {
190
187
  "type": "boolean",
191
- "attribute": "required",
192
188
  "mutable": false,
193
189
  "complexType": {
194
190
  "original": "boolean",
@@ -201,14 +197,12 @@ export class DropdownComponent {
201
197
  "tags": [],
202
198
  "text": "Adds an asterisk at the end of the label to signify that the field is required."
203
199
  },
204
- "getter": false,
205
- "setter": false,
200
+ "attribute": "required",
206
201
  "reflect": true,
207
202
  "defaultValue": "false"
208
203
  },
209
204
  "name": {
210
205
  "type": "string",
211
- "attribute": "name",
212
206
  "mutable": false,
213
207
  "complexType": {
214
208
  "original": "string",
@@ -221,13 +215,11 @@ export class DropdownComponent {
221
215
  "tags": [],
222
216
  "text": "The name of the select. This is used to associate the label to the dropdown element. It is important for accessibility."
223
217
  },
224
- "getter": false,
225
- "setter": false,
218
+ "attribute": "name",
226
219
  "reflect": true
227
220
  },
228
221
  "placeholder": {
229
222
  "type": "string",
230
- "attribute": "placeholder",
231
223
  "mutable": false,
232
224
  "complexType": {
233
225
  "original": "string",
@@ -240,14 +232,12 @@ export class DropdownComponent {
240
232
  "tags": [],
241
233
  "text": "Placeholder text for the dropdown."
242
234
  },
243
- "getter": false,
244
- "setter": false,
235
+ "attribute": "placeholder",
245
236
  "reflect": false,
246
237
  "defaultValue": "'Select an option...'"
247
238
  },
248
239
  "placeholderValue": {
249
240
  "type": "string",
250
- "attribute": "placeholder-value",
251
241
  "mutable": false,
252
242
  "complexType": {
253
243
  "original": "string",
@@ -260,14 +250,12 @@ export class DropdownComponent {
260
250
  "tags": [],
261
251
  "text": "Value for the placeholder. Defaults to an empty string but can be customized."
262
252
  },
263
- "getter": false,
264
- "setter": false,
253
+ "attribute": "placeholder-value",
265
254
  "reflect": false,
266
255
  "defaultValue": "''"
267
256
  },
268
257
  "disabled": {
269
258
  "type": "boolean",
270
- "attribute": "disabled",
271
259
  "mutable": false,
272
260
  "complexType": {
273
261
  "original": "boolean",
@@ -280,14 +268,12 @@ export class DropdownComponent {
280
268
  "tags": [],
281
269
  "text": "Whether the select as a whole is disabled. Per default it is false."
282
270
  },
283
- "getter": false,
284
- "setter": false,
271
+ "attribute": "disabled",
285
272
  "reflect": true,
286
273
  "defaultValue": "false"
287
274
  },
288
275
  "invalid": {
289
276
  "type": "boolean",
290
- "attribute": "invalid",
291
277
  "mutable": false,
292
278
  "complexType": {
293
279
  "original": "boolean",
@@ -300,14 +286,12 @@ export class DropdownComponent {
300
286
  "tags": [],
301
287
  "text": "Whether the select is currently invalid. Per default it is false."
302
288
  },
303
- "getter": false,
304
- "setter": false,
289
+ "attribute": "invalid",
305
290
  "reflect": true,
306
291
  "defaultValue": "false"
307
292
  },
308
293
  "hint": {
309
294
  "type": "string",
310
- "attribute": "hint",
311
295
  "mutable": false,
312
296
  "complexType": {
313
297
  "original": "string",
@@ -320,13 +304,11 @@ export class DropdownComponent {
320
304
  "tags": [],
321
305
  "text": "An optional hint text for the dropdown."
322
306
  },
323
- "getter": false,
324
- "setter": false,
307
+ "attribute": "hint",
325
308
  "reflect": false
326
309
  },
327
310
  "error": {
328
311
  "type": "string",
329
- "attribute": "error",
330
312
  "mutable": false,
331
313
  "complexType": {
332
314
  "original": "string",
@@ -339,8 +321,7 @@ export class DropdownComponent {
339
321
  "tags": [],
340
322
  "text": "An optional error message for the dropdown. This will only appear if invalid is set to true."
341
323
  },
342
- "getter": false,
343
- "setter": false,
324
+ "attribute": "error",
344
325
  "reflect": false
345
326
  }
346
327
  };
@@ -0,0 +1,52 @@
1
+ import { newSpecPage } from "@stencil/core/testing";
2
+ import { h } from "@stencil/core";
3
+ import { DropdownComponent } from "./dropdown";
4
+ it('should render the dropdown', async () => {
5
+ const page = await newSpecPage({
6
+ components: [DropdownComponent],
7
+ template: () => h("b2b-dropdown", { label: "test" }),
8
+ });
9
+ expect(page.root).toMatchSnapshot();
10
+ });
11
+ it('should render the dropdown with options', async () => {
12
+ const page = await newSpecPage({
13
+ components: [DropdownComponent],
14
+ template: () => (h("b2b-dropdown", { label: "test" }, h("option", null, "An option"))),
15
+ });
16
+ expect(page.root).toMatchSnapshot();
17
+ });
18
+ it('should render a hint if a hint string is specified', async () => {
19
+ const page = await newSpecPage({
20
+ components: [DropdownComponent],
21
+ template: () => (h("b2b-dropdown", { label: "test", hint: "This is a test hint" })),
22
+ });
23
+ expect(page.root).toMatchSnapshot();
24
+ });
25
+ it('should disable the dropdown', async () => {
26
+ const page = await newSpecPage({
27
+ components: [DropdownComponent],
28
+ template: () => h("b2b-dropdown", { label: "test", disabled: true }),
29
+ });
30
+ expect(page.root).toMatchSnapshot();
31
+ });
32
+ it('should apply an error style to the host element if an error is specified and the select is set to invalid', async () => {
33
+ const page = await newSpecPage({
34
+ components: [DropdownComponent],
35
+ template: () => (h("b2b-dropdown", { label: "test", error: "This is a test error", invalid: true })),
36
+ });
37
+ expect(page.root).toMatchSnapshot();
38
+ });
39
+ it('should render an error message if an error is specified and the select is set to invalid', async () => {
40
+ const page = await newSpecPage({
41
+ components: [DropdownComponent],
42
+ template: () => (h("b2b-dropdown", { label: "test", error: "This is a test error", invalid: true })),
43
+ });
44
+ expect(page.root).toMatchSnapshot();
45
+ });
46
+ it('should render a hint if invalid and disabled are true at the same time', async () => {
47
+ const page = await newSpecPage({
48
+ components: [DropdownComponent],
49
+ template: () => (h("b2b-dropdown", { label: "test", error: "This is a test error", hint: "this is a test hint", invalid: true, disabled: true })),
50
+ });
51
+ expect(page.root).toMatchSnapshot();
52
+ });
@@ -1,15 +1,14 @@
1
1
  import { h, Host, } from "@stencil/core";
2
2
  export class FlyoutMenuOptionComponent {
3
3
  constructor() {
4
- /** Whether the option is disabled. Per default it is false. If disabled is true, the option cannot be selected. */
5
- this.disabled = false;
6
- /** Whether the option has a separator at the bottom. Per default it is false. */
7
- this.separator = false;
8
4
  this.handleClick = () => {
9
5
  if (!this.disabled) {
10
6
  this.b2bOptionSelected.emit({ selectedOption: this.option });
11
7
  }
12
8
  };
9
+ this.option = undefined;
10
+ this.disabled = false;
11
+ this.separator = false;
13
12
  }
14
13
  handleKeyDown(event) {
15
14
  if (event.key === 'Enter' && !this.disabled) {
@@ -17,7 +16,7 @@ export class FlyoutMenuOptionComponent {
17
16
  }
18
17
  }
19
18
  render() {
20
- return (h(Host, { key: '9c6ea495d271dfe68887762cf6325017c740c068', class: {
19
+ return (h(Host, { key: '091032b33e9695886e133e065d4b5c72480373e8', class: {
21
20
  'b2b-flyout-menu__option': true,
22
21
  'b2b-flyout-menu__option--disabled': this.disabled,
23
22
  'b2b-flyout-menu__option--separator': this.separator,
@@ -39,7 +38,6 @@ export class FlyoutMenuOptionComponent {
39
38
  return {
40
39
  "option": {
41
40
  "type": "string",
42
- "attribute": "option",
43
41
  "mutable": false,
44
42
  "complexType": {
45
43
  "original": "string",
@@ -52,13 +50,11 @@ export class FlyoutMenuOptionComponent {
52
50
  "tags": [],
53
51
  "text": "The option name."
54
52
  },
55
- "getter": false,
56
- "setter": false,
53
+ "attribute": "option",
57
54
  "reflect": false
58
55
  },
59
56
  "disabled": {
60
57
  "type": "boolean",
61
- "attribute": "disabled",
62
58
  "mutable": false,
63
59
  "complexType": {
64
60
  "original": "boolean",
@@ -71,14 +67,12 @@ export class FlyoutMenuOptionComponent {
71
67
  "tags": [],
72
68
  "text": "Whether the option is disabled. Per default it is false. If disabled is true, the option cannot be selected."
73
69
  },
74
- "getter": false,
75
- "setter": false,
70
+ "attribute": "disabled",
76
71
  "reflect": true,
77
72
  "defaultValue": "false"
78
73
  },
79
74
  "separator": {
80
75
  "type": "boolean",
81
- "attribute": "separator",
82
76
  "mutable": false,
83
77
  "complexType": {
84
78
  "original": "boolean",
@@ -91,8 +85,7 @@ export class FlyoutMenuOptionComponent {
91
85
  "tags": [],
92
86
  "text": "Whether the option has a separator at the bottom. Per default it is false."
93
87
  },
94
- "getter": false,
95
- "setter": false,
88
+ "attribute": "separator",
96
89
  "reflect": false,
97
90
  "defaultValue": "false"
98
91
  }
@@ -0,0 +1,97 @@
1
+ import { newE2EPage } from "@stencil/core/testing";
2
+ describe('B2B-FlyoutMenu', () => {
3
+ let page;
4
+ beforeEach(async () => {
5
+ page = await newE2EPage();
6
+ await page.setContent(`
7
+ <b2b-flyout-menu>
8
+ <b2b-icon-100 icon="b2b_icon-ellipsis" slot='trigger' clickable focusable></b2b-icon-100>
9
+ <b2b-flyout-menu-option slot='option' option='option1' >
10
+ </b2b-flyout-menu-option>
11
+ <b2b-flyout-menu-option slot='option' option='option2' >
12
+ </b2b-flyout-menu-option>
13
+ <b2b-flyout-menu-option slot='option' option='option3' disabled >
14
+ </b2b-flyout-menu-option>
15
+ <b2b-flyout-menu-option slot='option' option='option4' separator >
16
+ </b2b-flyout-menu-option>
17
+ </b2b-flyout-menu>
18
+ `);
19
+ });
20
+ it('should display the flyout menu component along with the custom icon', async () => {
21
+ const flyoutMenu = await page.find('b2b-flyout-menu');
22
+ const icon = flyoutMenu.icon;
23
+ expect(flyoutMenu).not.toBeNull();
24
+ expect(icon).not.toBeNull();
25
+ });
26
+ it('should show the menu when icon is clicked', async () => {
27
+ const iconContainer = await page.find('b2b-icon-100');
28
+ iconContainer.click();
29
+ await page.waitForChanges();
30
+ const flyoutMenuOption = await page.find('b2b-flyout-menu-option');
31
+ expect(await flyoutMenuOption.isVisible()).toBe(true);
32
+ });
33
+ it('should hide the menu when it loses focus', async () => {
34
+ const iconContainer = await page.find('b2b-icon-100');
35
+ iconContainer.click();
36
+ await page.waitForChanges();
37
+ const flyoutMenuOption = await page.find('b2b-flyout-menu-option');
38
+ expect(await flyoutMenuOption.isVisible()).toBe(true);
39
+ await page.keyboard.press('Tab');
40
+ await page.waitForChanges();
41
+ const container = await page.find('b2b-flyout-menu >>> div.b2b-flyout-menu__options__container');
42
+ expect(container).not.toHaveClass('b2b-flyout-menu__options__container--on');
43
+ });
44
+ /** Test is extremely flaky due to unknown global interaction. Test suite runs fine in isolation, so skipping for now. */
45
+ xit('should emit the selected event when a menu option is clicked', async () => {
46
+ const optionSelectedEventSpy = await page.spyOnEvent('b2b-option-selected');
47
+ const icon = await page.find('b2b-icon-100 >>> div');
48
+ await icon.click();
49
+ await page.waitForChanges();
50
+ const flyoutMenuOption = await page.find('b2b-flyout-menu-option');
51
+ await flyoutMenuOption.click();
52
+ await page.waitForChanges();
53
+ expect(flyoutMenuOption).not.toBeNull();
54
+ expect(optionSelectedEventSpy).toHaveReceivedEvent();
55
+ expect(optionSelectedEventSpy).toHaveReceivedEventDetail({
56
+ selectedOption: 'option1',
57
+ });
58
+ });
59
+ it('should disable an option when disabled is true', async () => {
60
+ const optionSelectedEventSpy = await page.spyOnEvent('b2b-option-selected');
61
+ const icon = await page.find('b2b-icon-100');
62
+ icon.click();
63
+ await page.waitForChanges();
64
+ const flyoutMenuOption = await page.find('b2b-flyout-menu-option[option="option3"]');
65
+ flyoutMenuOption.click();
66
+ await page.waitForChanges();
67
+ expect(flyoutMenuOption).not.toBeNull();
68
+ expect(optionSelectedEventSpy).not.toHaveReceivedEvent();
69
+ });
70
+ it('should display separator after an option when separator is true', async () => {
71
+ const icon = await page.find('b2b-icon-100');
72
+ icon.click();
73
+ await page.waitForChanges();
74
+ const flyoutMenuOptions = await page.findAll('b2b-flyout-menu-option');
75
+ const flyoutMenuOption4 = flyoutMenuOptions[3];
76
+ const separator = await flyoutMenuOption4.getProperty('separator');
77
+ expect(separator).toBe(true);
78
+ });
79
+ it('should emit the selected event when a menu option is navigated to using a keyboard', async () => {
80
+ const optionSelectedEventSpy = await page.spyOnEvent('b2b-option-selected');
81
+ await page.keyboard.press('Tab');
82
+ await page.waitForChanges();
83
+ await page.keyboard.press('Enter');
84
+ await page.waitForChanges();
85
+ const flyoutMenuOption = await page.find('b2b-flyout-menu-option');
86
+ expect(flyoutMenuOption).not.toBeNull();
87
+ expect(await flyoutMenuOption.isVisible()).toBe(true);
88
+ await page.keyboard.press('ArrowDown');
89
+ await page.waitForChanges();
90
+ await page.keyboard.press('Enter');
91
+ await page.waitForChanges();
92
+ expect(optionSelectedEventSpy).toHaveReceivedEvent();
93
+ expect(optionSelectedEventSpy).toHaveReceivedEventDetail({
94
+ selectedOption: 'option1',
95
+ });
96
+ });
97
+ });
@@ -9,8 +9,6 @@ const keys = {
9
9
  };
10
10
  export class FlyoutMenuComponent {
11
11
  constructor() {
12
- /** @internal if the menu is opened. */
13
- this.opened = false;
14
12
  this.getCurrentOption = () => {
15
13
  const options = this.getAllOptions();
16
14
  return options.find(el => el.getAttribute('tabindex') === '0');
@@ -54,6 +52,7 @@ export class FlyoutMenuComponent {
54
52
  this.closeMenu();
55
53
  }, 150);
56
54
  };
55
+ this.opened = false;
57
56
  }
58
57
  connectedCallback() {
59
58
  // Check if there are any HTML elements slotted.
@@ -145,12 +144,12 @@ export class FlyoutMenuComponent {
145
144
  options[index].focus();
146
145
  }
147
146
  render() {
148
- return (h(Host, { key: '86197f7c99c7cae4370969a02bbf995b2791fbad' }, h("div", { key: '8a9d868d297ffe6db37ee35ce37aa57eb209de96', class: {
147
+ return (h(Host, { key: '2c09480c749bcee0f8fd7807deb41b4862c1221e' }, h("div", { key: 'a087ad4e5ff06f7fdc586b415f2cc1196daae515', class: {
149
148
  'b2b-flyout-menu': true,
150
- } }, h("div", { key: 'd6dcafdd23a713b6e348ef473e3b16d307994fe0', class: "b2b-flyout-menu__trigger" }, h("slot", { key: 'b3335d43c60e4b7a73f54d6f92593a24f60b9279', name: "trigger" })), h("div", { key: 'bc161697cfb1cb94289ea1312b11feaf1e4cfdcb', onFocusout: this.blurMenu, class: {
149
+ } }, h("div", { key: 'e36aff2c778c2277e5d5d90c13d7f7d92ef7e04c', class: "b2b-flyout-menu__trigger" }, h("slot", { key: '1581b6010ef02e5745b726d0f73fd3cc8caf67fe', name: "trigger" })), h("div", { key: '3d2f97df8aad17d0963601f62c4c18b488393d6d', onFocusout: this.blurMenu, class: {
151
150
  'b2b-flyout-menu__options__container': true,
152
151
  'b2b-flyout-menu__options__container--on': this.opened,
153
- } }, h("div", { key: '7e9e9ed4f53398472921ab3f08fc067b1c56156f', class: "b2b-flyout-menu__arrow" }), h("slot", { key: '671aedaa471bf4171ad1e9de5c376a1cc91309d8', name: "option" })))));
152
+ } }, h("div", { key: 'db72e397e2dde6129468e657aaf49fdf5a470426', class: "b2b-flyout-menu__arrow" }), h("slot", { key: 'ac802410833c596abdf5056f8a6e09bc12f885a6', name: "option" })))));
154
153
  }
155
154
  static get is() { return "b2b-flyout-menu"; }
156
155
  static get encapsulation() { return "shadow"; }
@@ -168,7 +167,6 @@ export class FlyoutMenuComponent {
168
167
  return {
169
168
  "opened": {
170
169
  "type": "boolean",
171
- "attribute": "opened",
172
170
  "mutable": true,
173
171
  "complexType": {
174
172
  "original": "boolean",
@@ -184,8 +182,7 @@ export class FlyoutMenuComponent {
184
182
  }],
185
183
  "text": ""
186
184
  },
187
- "getter": false,
188
- "setter": false,
185
+ "attribute": "opened",
189
186
  "reflect": false,
190
187
  "defaultValue": "false"
191
188
  }
@@ -1,8 +1,6 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  export class B2bGridColumnComponent {
3
3
  constructor() {
4
- /** The alignment of text placed inside a column. Note that this will apply to all children. */
5
- this.textAlign = 'left';
6
4
  this.calculateGrowDimension = (span) => {
7
5
  if (span !== undefined) {
8
6
  const flex = (span / 12) * 100;
@@ -11,9 +9,11 @@ export class B2bGridColumnComponent {
11
9
  };
12
10
  }
13
11
  };
12
+ this.span = undefined;
13
+ this.textAlign = 'left';
14
14
  }
15
15
  render() {
16
- return (h(Host, { key: '67a94192e9ced1899e411caebf2f4577f42825d5', style: Object.assign(Object.assign({}, this.calculateGrowDimension(this.span)), { ['text-align']: `${this.textAlign}` }) }, h("slot", { key: 'f01dbd6379f5338ee1ad3de51bef24f4c6754d52' })));
16
+ return (h(Host, { key: '935d5d42d247393cdcf7d247212182bb040998da', style: Object.assign(Object.assign({}, this.calculateGrowDimension(this.span)), { ['text-align']: `${this.textAlign}` }) }, h("slot", { key: 'd3d0ce4a59f9d17b2b5dc9bdae249135c31b771c' })));
17
17
  }
18
18
  static get is() { return "b2b-grid-col"; }
19
19
  static get encapsulation() { return "shadow"; }
@@ -21,7 +21,6 @@ export class B2bGridColumnComponent {
21
21
  return {
22
22
  "span": {
23
23
  "type": "number",
24
- "attribute": "span",
25
24
  "mutable": false,
26
25
  "complexType": {
27
26
  "original": "| 1\n | 2\n | 3\n | 4\n | 5\n | 6\n | 7\n | 8\n | 9\n | 10\n | 11\n | 12",
@@ -34,13 +33,11 @@ export class B2bGridColumnComponent {
34
33
  "tags": [],
35
34
  "text": "How many columns the width of the col element should be. If not specified, the col will take up all available space in one row. We recommend explicitly defining the span in scenarios where the distribution of 12 spans across columns is clear. Up to single 12 columns fit in one row."
36
35
  },
37
- "getter": false,
38
- "setter": false,
36
+ "attribute": "span",
39
37
  "reflect": true
40
38
  },
41
39
  "textAlign": {
42
40
  "type": "string",
43
- "attribute": "text-align",
44
41
  "mutable": false,
45
42
  "complexType": {
46
43
  "original": "'left' | 'center' | 'right'",
@@ -53,8 +50,7 @@ export class B2bGridColumnComponent {
53
50
  "tags": [],
54
51
  "text": "The alignment of text placed inside a column. Note that this will apply to all children."
55
52
  },
56
- "getter": false,
57
- "setter": false,
53
+ "attribute": "text-align",
58
54
  "reflect": false,
59
55
  "defaultValue": "'left'"
60
56
  }
@@ -0,0 +1,17 @@
1
+ import { newE2EPage } from "@stencil/core/testing";
2
+ describe('B2B Grid', () => {
3
+ it('should render the grid and children', async () => {
4
+ const page = await newE2EPage();
5
+ await page.setContent(`<b2b-grid>
6
+ <b2b-grid-row>
7
+ <b2b-grid-col></b2b-grid-col>
8
+ </b2b-grid-row>
9
+ </b2b-grid>`);
10
+ const grid = await page.find('b2b-grid');
11
+ expect(grid).not.toBeNull();
12
+ const row = await page.find('b2b-grid-row');
13
+ expect(row).not.toBeNull();
14
+ const col = await page.find('b2b-grid-col');
15
+ expect(col).not.toBeNull();
16
+ });
17
+ });
@@ -1,11 +1,10 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  export class B2bGridComponent {
3
3
  constructor() {
4
- /** The inner padding of the grid container measured in px. */
5
4
  this.margin = 24;
6
5
  }
7
6
  render() {
8
- return (h(Host, { key: '01c49117233665062bbce4d1a4ab29b30361f6db', style: { ['padding']: `${this.margin}px` }, class: "b2b-grid" }, h("slot", { key: '2ece9c35fce484e130bd00c01b5ae6aec8ec9056' })));
7
+ return (h(Host, { key: 'a07f27f3ed6961913c048630d3860ba7a9668cc8', style: { ['padding']: `${this.margin}px` }, class: "b2b-grid" }, h("slot", { key: '6390574c52c986c73c84912586d073383ee035d8' })));
9
8
  }
10
9
  static get is() { return "b2b-grid"; }
11
10
  static get encapsulation() { return "shadow"; }
@@ -23,7 +22,6 @@ export class B2bGridComponent {
23
22
  return {
24
23
  "margin": {
25
24
  "type": "number",
26
- "attribute": "margin",
27
25
  "mutable": false,
28
26
  "complexType": {
29
27
  "original": "number",
@@ -36,8 +34,7 @@ export class B2bGridComponent {
36
34
  "tags": [],
37
35
  "text": "The inner padding of the grid container measured in px."
38
36
  },
39
- "getter": false,
40
- "setter": false,
37
+ "attribute": "margin",
41
38
  "reflect": false,
42
39
  "defaultValue": "24"
43
40
  }