@brandsync/wc 1.17.0 → 1.18.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 (570) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/REFERENCE.md +245 -0
  3. package/custom-elements.json +5218 -3031
  4. package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
  5. package/dist/brandsync-wc/{p-a7fb0b59.entry.js → p-0082db6a.entry.js} +1 -1
  6. package/dist/brandsync-wc/p-07e0b444.entry.js +1 -0
  7. package/dist/brandsync-wc/{p-5c61eb06.entry.js → p-08e0e704.entry.js} +1 -1
  8. package/dist/brandsync-wc/{p-35f76ea7.entry.js → p-0a6f22fe.entry.js} +1 -1
  9. package/dist/brandsync-wc/{p-b02bf1ca.entry.js → p-14b4f4c4.entry.js} +1 -1
  10. package/dist/brandsync-wc/{p-54d91ac9.entry.js → p-15f06226.entry.js} +1 -1
  11. package/dist/brandsync-wc/{p-a5659499.entry.js → p-186e3b78.entry.js} +1 -1
  12. package/dist/brandsync-wc/{p-1bd99669.entry.js → p-1a47774e.entry.js} +1 -1
  13. package/dist/brandsync-wc/{p-70c650b2.entry.js → p-1a62e5b7.entry.js} +1 -1
  14. package/dist/brandsync-wc/p-1aa0f9a3.entry.js +1 -0
  15. package/dist/brandsync-wc/{p-9d740928.entry.js → p-1d8c2ec1.entry.js} +1 -1
  16. package/dist/brandsync-wc/p-246036cd.entry.js +1 -0
  17. package/dist/brandsync-wc/{p-d25adab2.entry.js → p-31ca98c3.entry.js} +1 -1
  18. package/dist/brandsync-wc/{p-84d6d6eb.entry.js → p-344695a8.entry.js} +1 -1
  19. package/dist/brandsync-wc/{p-4f4c0c68.entry.js → p-345b5ef3.entry.js} +1 -1
  20. package/dist/brandsync-wc/{p-e0a9f2d1.entry.js → p-34851d6d.entry.js} +1 -1
  21. package/dist/brandsync-wc/{p-eb0dc5bf.entry.js → p-348fef11.entry.js} +1 -1
  22. package/dist/brandsync-wc/{p-d2a15599.entry.js → p-3e6f430a.entry.js} +1 -1
  23. package/dist/brandsync-wc/{p-065c7e7c.entry.js → p-43f8afda.entry.js} +1 -1
  24. package/dist/brandsync-wc/{p-361aef36.entry.js → p-47929dca.entry.js} +1 -1
  25. package/dist/brandsync-wc/{p-67f125e8.entry.js → p-47ce984f.entry.js} +1 -1
  26. package/dist/brandsync-wc/{p-d5a6098d.entry.js → p-4d4997af.entry.js} +1 -1
  27. package/dist/brandsync-wc/{p-d9184940.entry.js → p-4ff649f1.entry.js} +1 -1
  28. package/dist/brandsync-wc/p-50c116eb.entry.js +1 -0
  29. package/dist/brandsync-wc/{p-f3eca1ce.entry.js → p-50f60ed6.entry.js} +1 -1
  30. package/dist/brandsync-wc/p-52d61070.entry.js +1 -0
  31. package/dist/brandsync-wc/{p-43d5f708.entry.js → p-55d336da.entry.js} +1 -1
  32. package/dist/brandsync-wc/{p-f43a7f16.entry.js → p-55d97d1d.entry.js} +1 -1
  33. package/dist/brandsync-wc/{p-b142d8c9.entry.js → p-56a45582.entry.js} +1 -1
  34. package/dist/brandsync-wc/{p-07673a48.entry.js → p-58179e15.entry.js} +1 -1
  35. package/dist/brandsync-wc/{p-9396c67e.entry.js → p-5868793d.entry.js} +1 -1
  36. package/dist/brandsync-wc/{p-90ba3032.entry.js → p-5ac75555.entry.js} +1 -1
  37. package/dist/brandsync-wc/{p-f82a9f0d.entry.js → p-5cd1abc7.entry.js} +1 -1
  38. package/dist/brandsync-wc/{p-dfad8c0a.entry.js → p-5e36d46f.entry.js} +1 -1
  39. package/dist/brandsync-wc/{p-08e96f13.entry.js → p-64f8eb7e.entry.js} +1 -1
  40. package/dist/brandsync-wc/p-6b019a88.entry.js +1 -0
  41. package/dist/brandsync-wc/{p-f98dfa85.entry.js → p-6c987bc9.entry.js} +1 -1
  42. package/dist/brandsync-wc/{p-b5710db6.entry.js → p-757cd066.entry.js} +1 -1
  43. package/dist/brandsync-wc/{p-47b7fe76.entry.js → p-78114ea3.entry.js} +1 -1
  44. package/dist/brandsync-wc/p-7c29678d.entry.js +1 -0
  45. package/dist/brandsync-wc/{p-9d12b1fb.entry.js → p-7cfb1be6.entry.js} +1 -1
  46. package/dist/brandsync-wc/{p-844205d9.entry.js → p-841a80b4.entry.js} +1 -1
  47. package/dist/brandsync-wc/{p-5057e4fe.entry.js → p-87a10ee1.entry.js} +1 -1
  48. package/dist/brandsync-wc/{p-c05ee501.entry.js → p-8962abe0.entry.js} +1 -1
  49. package/dist/brandsync-wc/p-8e46a262.entry.js +1 -0
  50. package/dist/brandsync-wc/p-8f82ea7e.entry.js +1 -0
  51. package/dist/brandsync-wc/p-95c7f350.entry.js +1 -0
  52. package/dist/brandsync-wc/{p-6ea02b98.entry.js → p-9787bc0f.entry.js} +1 -1
  53. package/dist/brandsync-wc/{p-be7aac52.entry.js → p-998b95d3.entry.js} +1 -1
  54. package/dist/brandsync-wc/{p-11d80e17.entry.js → p-9bd739e5.entry.js} +1 -1
  55. package/dist/brandsync-wc/p-a424a709.entry.js +1 -0
  56. package/dist/brandsync-wc/{p-4eaa9ed4.entry.js → p-a51355d9.entry.js} +1 -1
  57. package/dist/brandsync-wc/{p-3bad5e1b.entry.js → p-a8c2855c.entry.js} +1 -1
  58. package/dist/brandsync-wc/{p-61deb48c.entry.js → p-a9d0a730.entry.js} +1 -1
  59. package/dist/brandsync-wc/{p-2bd30709.entry.js → p-ae207fd5.entry.js} +1 -1
  60. package/dist/brandsync-wc/{p-8048d033.entry.js → p-b1edc9b7.entry.js} +1 -1
  61. package/dist/brandsync-wc/{p-79fc849c.entry.js → p-b759ae72.entry.js} +1 -1
  62. package/dist/brandsync-wc/{p-e8ae626d.entry.js → p-b7bbc52f.entry.js} +1 -1
  63. package/dist/brandsync-wc/{p-aec2dfeb.entry.js → p-bd901b06.entry.js} +1 -1
  64. package/dist/brandsync-wc/{p-c835afb7.entry.js → p-be7272ce.entry.js} +1 -1
  65. package/dist/brandsync-wc/{p-857987f9.entry.js → p-bfff7cbb.entry.js} +1 -1
  66. package/dist/brandsync-wc/{p-8134f97c.entry.js → p-c020ffdf.entry.js} +1 -1
  67. package/dist/brandsync-wc/{p-3cb79512.entry.js → p-c02ed03d.entry.js} +1 -1
  68. package/dist/brandsync-wc/{p-a7fa839a.entry.js → p-cb002195.entry.js} +1 -1
  69. package/dist/brandsync-wc/{p-ffc07eb5.entry.js → p-d3fe8cea.entry.js} +1 -1
  70. package/dist/brandsync-wc/{p-ffccc1ee.entry.js → p-d42a26c1.entry.js} +1 -1
  71. package/dist/brandsync-wc/p-d985e569.entry.js +1 -0
  72. package/dist/brandsync-wc/{p-debc83cc.entry.js → p-e2491db8.entry.js} +1 -1
  73. package/dist/brandsync-wc/{p-fdc168ec.entry.js → p-e32a6df1.entry.js} +1 -1
  74. package/dist/brandsync-wc/{p-57ff14ca.entry.js → p-e3e15670.entry.js} +1 -1
  75. package/dist/brandsync-wc/{p-3c6ec5d0.entry.js → p-e4e9c961.entry.js} +1 -1
  76. package/dist/brandsync-wc/{p-d7956c51.entry.js → p-e99c0937.entry.js} +1 -1
  77. package/dist/brandsync-wc/{p-ab14a07d.entry.js → p-e9adfa44.entry.js} +1 -1
  78. package/dist/brandsync-wc/{p-32297416.entry.js → p-eb3bacb9.entry.js} +1 -1
  79. package/dist/brandsync-wc/{p-3d2c62a6.entry.js → p-ee00d3a5.entry.js} +1 -1
  80. package/dist/brandsync-wc/{p-3bdeeb9d.entry.js → p-ee63423c.entry.js} +1 -1
  81. package/dist/brandsync-wc/p-f4628861.entry.js +1 -0
  82. package/dist/brandsync-wc/{p-4b460eda.entry.js → p-f47b8673.entry.js} +1 -1
  83. package/dist/brandsync-wc/{p-8c4dfccb.entry.js → p-f6caa623.entry.js} +1 -1
  84. package/dist/brandsync-wc/p-f86b58bf.entry.js +1 -0
  85. package/dist/brandsync-wc/{p-00be9a64.entry.js → p-fa91106e.entry.js} +1 -1
  86. package/dist/brandsync-wc/{p-5b933ff4.entry.js → p-fb84002e.entry.js} +1 -1
  87. package/dist/brandsync-wc/{p-b4511ad3.entry.js → p-fbc219c6.entry.js} +1 -1
  88. package/dist/brandsync-wc/{p-0bbaef51.entry.js → p-fd78ff22.entry.js} +1 -1
  89. package/dist/cjs/brandsync-wc.cjs.js +1 -1
  90. package/dist/cjs/bs-accordion-group.cjs.entry.js +1 -1
  91. package/dist/cjs/bs-ai-disclaimer.cjs.entry.js +1 -1
  92. package/dist/cjs/bs-ai-greeting.cjs.entry.js +1 -1
  93. package/dist/cjs/bs-ai-thinking.cjs.entry.js +1 -1
  94. package/dist/cjs/bs-app-recent-item_3.cjs.entry.js +133 -0
  95. package/dist/cjs/bs-app-shell.cjs.entry.js +1 -1
  96. package/dist/cjs/bs-app-switcher.cjs.entry.js +208 -0
  97. package/dist/cjs/bs-attachment-list.cjs.entry.js +1 -1
  98. package/dist/cjs/bs-attachment.cjs.entry.js +1 -1
  99. package/dist/cjs/bs-avatar.cjs.entry.js +1 -1
  100. package/dist/cjs/bs-badge.cjs.entry.js +1 -1
  101. package/dist/cjs/bs-breadcrumb-overflow.cjs.entry.js +1 -1
  102. package/dist/cjs/bs-breadcrumb.cjs.entry.js +1 -1
  103. package/dist/cjs/bs-breadcrumbs.cjs.entry.js +1 -1
  104. package/dist/cjs/bs-button-skeleton.cjs.entry.js +1 -1
  105. package/dist/cjs/bs-button.cjs.entry.js +1 -1
  106. package/dist/cjs/bs-card.cjs.entry.js +1 -1
  107. package/dist/cjs/bs-carousel.cjs.entry.js +1 -1
  108. package/dist/cjs/bs-chatbot-feedback.cjs.entry.js +1 -1
  109. package/dist/cjs/bs-chatbot-header.cjs.entry.js +1 -1
  110. package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +1 -1
  111. package/dist/cjs/bs-chatbot-sources-drawer.cjs.entry.js +1 -1
  112. package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +1 -1
  113. package/dist/cjs/bs-checkbox-skeleton.cjs.entry.js +1 -1
  114. package/dist/cjs/bs-checkbox.cjs.entry.js +1 -1
  115. package/dist/cjs/bs-chip-filter.cjs.entry.js +1 -1
  116. package/dist/cjs/bs-chip-informative.cjs.entry.js +1 -1
  117. package/dist/cjs/bs-chip-input.cjs.entry.js +1 -1
  118. package/dist/cjs/bs-citation-preview.cjs.entry.js +1 -1
  119. package/dist/cjs/bs-command-palette.cjs.entry.js +1 -1
  120. package/dist/cjs/bs-compact-menu-block_2.cjs.entry.js +46 -0
  121. package/dist/cjs/bs-company-switcher.cjs.entry.js +211 -0
  122. package/dist/cjs/bs-composer-status-banner.cjs.entry.js +1 -1
  123. package/dist/cjs/bs-composer.cjs.entry.js +1 -1
  124. package/dist/cjs/bs-container.cjs.entry.js +1 -1
  125. package/dist/cjs/bs-data-table.cjs.entry.js +2 -2
  126. package/dist/cjs/bs-datepicker.cjs.entry.js +1 -1
  127. package/dist/cjs/bs-divider.cjs.entry.js +1 -1
  128. package/dist/cjs/bs-empty-state.cjs.entry.js +1 -1
  129. package/dist/cjs/bs-error-page.cjs.entry.js +1 -1
  130. package/dist/cjs/bs-file-upload-item.cjs.entry.js +1 -1
  131. package/dist/cjs/bs-file-upload.cjs.entry.js +1 -1
  132. package/dist/cjs/bs-global-search.cjs.entry.js +2 -2
  133. package/dist/cjs/bs-grid.cjs.entry.js +2 -2
  134. package/dist/cjs/bs-icon-button.cjs.entry.js +8 -1
  135. package/dist/cjs/bs-icon-tile.cjs.entry.js +10 -2
  136. package/dist/cjs/bs-inline-tab.cjs.entry.js +1 -1
  137. package/dist/cjs/bs-input_3.cjs.entry.js +4 -4
  138. package/dist/cjs/bs-key-caps.cjs.entry.js +1 -1
  139. package/dist/cjs/bs-key.cjs.entry.js +1 -1
  140. package/dist/cjs/bs-keyboard-shortcuts.cjs.entry.js +2 -2
  141. package/dist/cjs/bs-list-item_2.cjs.entry.js +215 -0
  142. package/dist/cjs/bs-list.cjs.entry.js +1 -1
  143. package/dist/cjs/bs-mega-menu.cjs.entry.js +70 -0
  144. package/dist/cjs/bs-message-list.cjs.entry.js +1 -1
  145. package/dist/cjs/bs-message.cjs.entry.js +1 -1
  146. package/dist/cjs/bs-navigation-drawer-item.cjs.entry.js +1 -1
  147. package/dist/cjs/bs-navigation-drawer.cjs.entry.js +2 -2
  148. package/dist/cjs/bs-navigation-header.cjs.entry.js +5 -2
  149. package/dist/cjs/bs-page-header.cjs.entry.js +66 -0
  150. package/dist/cjs/bs-pagination.cjs.entry.js +1 -1
  151. package/dist/cjs/bs-progress-linear.cjs.entry.js +2 -2
  152. package/dist/cjs/bs-progress.cjs.entry.js +2 -2
  153. package/dist/cjs/bs-qr-code.cjs.entry.js +1 -1
  154. package/dist/cjs/bs-radio.cjs.entry.js +1 -1
  155. package/dist/cjs/bs-search-item.cjs.entry.js +1 -1
  156. package/dist/cjs/bs-session-timeout.cjs.entry.js +1 -1
  157. package/dist/cjs/bs-shortcut-row.cjs.entry.js +1 -1
  158. package/dist/cjs/bs-slider.cjs.entry.js +1 -1
  159. package/dist/cjs/bs-snackbar.cjs.entry.js +1 -1
  160. package/dist/cjs/bs-source-link.cjs.entry.js +2 -2
  161. package/dist/cjs/bs-spinner.cjs.entry.js +1 -1
  162. package/dist/cjs/bs-split-pane.cjs.entry.js +1 -1
  163. package/dist/cjs/bs-stack.cjs.entry.js +1 -1
  164. package/dist/cjs/bs-stepper-step.cjs.entry.js +1 -1
  165. package/dist/cjs/bs-stepper.cjs.entry.js +1 -1
  166. package/dist/cjs/bs-switch.cjs.entry.js +1 -1
  167. package/dist/cjs/bs-tab_3.cjs.entry.js +3 -3
  168. package/dist/cjs/bs-timepicker.cjs.entry.js +2 -2
  169. package/dist/cjs/bs-toast.cjs.entry.js +1 -1
  170. package/dist/cjs/bs-tooltip-trigger.cjs.entry.js +1 -1
  171. package/dist/cjs/bs-tooltip.cjs.entry.js +1 -1
  172. package/dist/cjs/bs-tree-item.cjs.entry.js +2 -2
  173. package/dist/cjs/bs-tree.cjs.entry.js +1 -1
  174. package/dist/cjs/loader.cjs.js +1 -1
  175. package/dist/collection/collection-manifest.json +8 -0
  176. package/dist/collection/components/bs-accordion-group/bs-accordion-group.js +1 -1
  177. package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.js +1 -1
  178. package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.js +1 -1
  179. package/dist/collection/components/bs-ai-thinking/bs-ai-thinking.js +1 -1
  180. package/dist/collection/components/bs-app-recent-item/bs-app-recent-item.cmp.test.js +52 -0
  181. package/dist/collection/components/bs-app-recent-item/bs-app-recent-item.css +111 -0
  182. package/dist/collection/components/bs-app-recent-item/bs-app-recent-item.js +184 -0
  183. package/dist/collection/components/bs-app-recent-item/bs-app-recent-item.stories.js +28 -0
  184. package/dist/collection/components/bs-app-shell/bs-app-shell.js +1 -1
  185. package/dist/collection/components/bs-app-switcher/bs-app-switcher.cmp.test.js +179 -0
  186. package/dist/collection/components/bs-app-switcher/bs-app-switcher.css +173 -0
  187. package/dist/collection/components/bs-app-switcher/bs-app-switcher.js +902 -0
  188. package/dist/collection/components/bs-app-switcher/bs-app-switcher.stories.js +91 -0
  189. package/dist/collection/components/bs-app-tile/bs-app-tile.cmp.test.js +58 -0
  190. package/dist/collection/components/bs-app-tile/bs-app-tile.css +104 -0
  191. package/dist/collection/components/bs-app-tile/bs-app-tile.js +190 -0
  192. package/dist/collection/components/bs-app-tile/bs-app-tile.stories.js +43 -0
  193. package/dist/collection/components/bs-attachment/bs-attachment.js +1 -1
  194. package/dist/collection/components/bs-attachment-list/bs-attachment-list.js +1 -1
  195. package/dist/collection/components/bs-avatar/bs-avatar.css +3 -3
  196. package/dist/collection/components/bs-badge/bs-badge.js +1 -1
  197. package/dist/collection/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.js +1 -1
  198. package/dist/collection/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.js +1 -1
  199. package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.js +1 -1
  200. package/dist/collection/components/bs-button/bs-button/bs-button.js +1 -1
  201. package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.cmp.test.js +13 -0
  202. package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.js +27 -1
  203. package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +1 -1
  204. package/dist/collection/components/bs-card/bs-card.js +1 -1
  205. package/dist/collection/components/bs-carousel/bs-carousel.js +1 -1
  206. package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.js +1 -1
  207. package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +1 -1
  208. package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +1 -1
  209. package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.js +1 -1
  210. package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js +1 -1
  211. package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.js +1 -1
  212. package/dist/collection/components/bs-checkbox/bs-checkbox.js +1 -1
  213. package/dist/collection/components/bs-chip/bs-chip-filter/bs-chip-filter.js +1 -1
  214. package/dist/collection/components/bs-chip/bs-chip-informative/bs-chip-informative.js +1 -1
  215. package/dist/collection/components/bs-chip/bs-chip-input/bs-chip-input.js +1 -1
  216. package/dist/collection/components/bs-citation-preview/bs-citation-preview.js +1 -1
  217. package/dist/collection/components/bs-command-palette/bs-command-palette.js +1 -1
  218. package/dist/collection/components/bs-compact-menu-block/bs-compact-menu-block.cmp.test.js +32 -0
  219. package/dist/collection/components/bs-compact-menu-block/bs-compact-menu-block.css +43 -0
  220. package/dist/collection/components/bs-compact-menu-block/bs-compact-menu-block.js +67 -0
  221. package/dist/collection/components/bs-compact-menu-block/bs-compact-menu-block.stories.js +25 -0
  222. package/dist/collection/components/bs-company-switcher/bs-company-switcher.cmp.test.js +171 -0
  223. package/dist/collection/components/bs-company-switcher/bs-company-switcher.css +196 -0
  224. package/dist/collection/components/bs-company-switcher/bs-company-switcher.js +720 -0
  225. package/dist/collection/components/bs-company-switcher/bs-company-switcher.stories.js +78 -0
  226. package/dist/collection/components/bs-composer/bs-composer.js +1 -1
  227. package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.js +1 -1
  228. package/dist/collection/components/bs-container/bs-container.js +1 -1
  229. package/dist/collection/components/bs-data-table/bs-data-table.js +2 -2
  230. package/dist/collection/components/bs-datepicker/bs-datepicker.js +1 -1
  231. package/dist/collection/components/bs-divider/bs-divider.js +1 -1
  232. package/dist/collection/components/bs-empty-state/bs-empty-state.js +1 -1
  233. package/dist/collection/components/bs-error-page/bs-error-page.js +1 -1
  234. package/dist/collection/components/bs-file-upload/bs-file-upload.js +1 -1
  235. package/dist/collection/components/bs-file-upload-item/bs-file-upload-item.js +1 -1
  236. package/dist/collection/components/bs-global-search/bs-global-search.js +2 -2
  237. package/dist/collection/components/bs-grid/bs-grid.js +2 -2
  238. package/dist/collection/components/bs-icon-tile/bs-icon-tile.js +11 -2
  239. package/dist/collection/components/bs-input/bs-input.js +2 -2
  240. package/dist/collection/components/bs-key/bs-key.js +1 -1
  241. package/dist/collection/components/bs-key-caps/bs-key-caps.js +1 -1
  242. package/dist/collection/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.js +2 -2
  243. package/dist/collection/components/bs-list/bs-list.js +1 -1
  244. package/dist/collection/components/bs-list-item/bs-list-item.js +1 -1
  245. package/dist/collection/components/bs-mega-menu/bs-mega-menu.cmp.test.js +131 -0
  246. package/dist/collection/components/bs-mega-menu/bs-mega-menu.css +139 -0
  247. package/dist/collection/components/bs-mega-menu/bs-mega-menu.js +358 -0
  248. package/dist/collection/components/bs-mega-menu/bs-mega-menu.stories.js +188 -0
  249. package/dist/collection/components/bs-menu/bs-menu.js +1 -1
  250. package/dist/collection/components/bs-menu-block/bs-menu-block.cmp.test.js +44 -0
  251. package/dist/collection/components/bs-menu-block/bs-menu-block.css +106 -0
  252. package/dist/collection/components/bs-menu-block/bs-menu-block.js +147 -0
  253. package/dist/collection/components/bs-menu-block/bs-menu-block.stories.js +36 -0
  254. package/dist/collection/components/bs-menu-item/bs-menu-item.js +1 -1
  255. package/dist/collection/components/bs-message/bs-message.js +1 -1
  256. package/dist/collection/components/bs-message-list/bs-message-list.js +1 -1
  257. package/dist/collection/components/bs-page-header/bs-page-header.cmp.test.js +206 -0
  258. package/dist/collection/components/bs-page-header/bs-page-header.css +252 -0
  259. package/dist/collection/components/bs-page-header/bs-page-header.js +351 -0
  260. package/dist/collection/components/bs-page-header/bs-page-header.stories.js +177 -0
  261. package/dist/collection/components/bs-pagination/bs-pagination.js +1 -1
  262. package/dist/collection/components/bs-popover/bs-popover.js +1 -1
  263. package/dist/collection/components/bs-progress/bs-progress.js +2 -2
  264. package/dist/collection/components/bs-progress-linear/bs-progress-linear.js +2 -2
  265. package/dist/collection/components/bs-qr-code/bs-qr-code.js +1 -1
  266. package/dist/collection/components/bs-radio/bs-radio.js +1 -1
  267. package/dist/collection/components/bs-search-item/bs-search-item.js +1 -1
  268. package/dist/collection/components/bs-session-timeout/bs-session-timeout.js +1 -1
  269. package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.js +1 -1
  270. package/dist/collection/components/bs-skeleton/bs-skeleton.js +1 -1
  271. package/dist/collection/components/bs-slider/bs-slider.js +1 -1
  272. package/dist/collection/components/bs-snackbar/bs-snackbar.js +1 -1
  273. package/dist/collection/components/bs-source-link/bs-source-link.js +2 -2
  274. package/dist/collection/components/bs-spinner/bs-spinner.js +1 -1
  275. package/dist/collection/components/bs-split-pane/bs-split-pane.js +1 -1
  276. package/dist/collection/components/bs-stack/bs-stack.js +1 -1
  277. package/dist/collection/components/bs-stepper/bs-stepper/bs-stepper.js +1 -1
  278. package/dist/collection/components/bs-stepper/bs-stepper-step/bs-stepper-step.js +1 -1
  279. package/dist/collection/components/bs-switch/bs-switch.js +1 -1
  280. package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +1 -1
  281. package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +1 -1
  282. package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +1 -1
  283. package/dist/collection/components/bs-timepicker/bs-timepicker.js +2 -2
  284. package/dist/collection/components/bs-toast/bs-toast.js +1 -1
  285. package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
  286. package/dist/collection/components/bs-tooltip-trigger/bs-tooltip-trigger.js +1 -1
  287. package/dist/collection/components/bs-tree/bs-tree.js +1 -1
  288. package/dist/collection/components/bs-tree-item/bs-tree-item.js +2 -2
  289. package/dist/collection/components/bs-whats-new-entry/bs-whats-new-entry.js +1 -1
  290. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.js +2 -2
  291. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.js +1 -1
  292. package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.cmp.test.js +79 -0
  293. package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.css +46 -0
  294. package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.js +10 -1
  295. package/dist/components/bs-accordion-group.js +1 -1
  296. package/dist/components/bs-ai-disclaimer.js +1 -1
  297. package/dist/components/bs-ai-greeting.js +1 -1
  298. package/dist/components/bs-ai-thinking.js +1 -1
  299. package/dist/components/bs-app-recent-item.d.ts +11 -0
  300. package/dist/components/bs-app-recent-item.js +1 -0
  301. package/dist/components/bs-app-shell.js +1 -1
  302. package/dist/components/bs-app-switcher.d.ts +11 -0
  303. package/dist/components/bs-app-switcher.js +1 -0
  304. package/dist/components/bs-app-tile.d.ts +11 -0
  305. package/dist/components/bs-app-tile.js +1 -0
  306. package/dist/components/bs-attachment-list.js +1 -1
  307. package/dist/components/bs-attachment.js +1 -1
  308. package/dist/components/bs-avatar.js +1 -1
  309. package/dist/components/bs-badge.js +1 -1
  310. package/dist/components/bs-breadcrumb-overflow.js +1 -1
  311. package/dist/components/bs-breadcrumb.js +1 -1
  312. package/dist/components/bs-breadcrumbs.js +1 -1
  313. package/dist/components/bs-button-skeleton.js +1 -1
  314. package/dist/components/bs-button.js +1 -1
  315. package/dist/components/bs-card.js +1 -1
  316. package/dist/components/bs-carousel.js +1 -1
  317. package/dist/components/bs-chatbot-feedback.js +1 -1
  318. package/dist/components/bs-chatbot-header.js +1 -1
  319. package/dist/components/bs-chatbot-response-action.js +1 -1
  320. package/dist/components/bs-chatbot-sources-drawer.js +1 -1
  321. package/dist/components/bs-chatbot-suggestion-button.js +1 -1
  322. package/dist/components/bs-checkbox-skeleton.js +1 -1
  323. package/dist/components/bs-checkbox.js +1 -1
  324. package/dist/components/bs-chip-filter.js +1 -1
  325. package/dist/components/bs-chip-informative.js +1 -1
  326. package/dist/components/bs-chip-input.js +1 -1
  327. package/dist/components/bs-citation-preview.js +1 -1
  328. package/dist/components/bs-command-palette.js +1 -1
  329. package/dist/components/bs-compact-menu-block.d.ts +11 -0
  330. package/dist/components/bs-compact-menu-block.js +1 -0
  331. package/dist/components/bs-company-switcher.d.ts +11 -0
  332. package/dist/components/bs-company-switcher.js +1 -0
  333. package/dist/components/bs-composer-status-banner.js +1 -1
  334. package/dist/components/bs-composer.js +1 -1
  335. package/dist/components/bs-container.js +1 -1
  336. package/dist/components/bs-cookie-consent.js +1 -1
  337. package/dist/components/bs-data-table.js +1 -1
  338. package/dist/components/bs-datepicker.js +1 -1
  339. package/dist/components/bs-dialog.js +1 -1
  340. package/dist/components/bs-divider.js +1 -1
  341. package/dist/components/bs-empty-state.js +1 -1
  342. package/dist/components/bs-error-page.js +1 -1
  343. package/dist/components/bs-file-upload-item.js +1 -1
  344. package/dist/components/bs-file-upload.js +1 -1
  345. package/dist/components/bs-global-search.js +1 -1
  346. package/dist/components/bs-grid.js +1 -1
  347. package/dist/components/bs-icon-button.js +1 -1
  348. package/dist/components/bs-icon-tile.js +1 -1
  349. package/dist/components/bs-inline-tab.js +1 -1
  350. package/dist/components/bs-input.js +1 -1
  351. package/dist/components/bs-key-caps.js +1 -1
  352. package/dist/components/bs-key.js +1 -1
  353. package/dist/components/bs-keyboard-shortcuts.js +1 -1
  354. package/dist/components/bs-list-item.js +1 -1
  355. package/dist/components/bs-list.js +1 -1
  356. package/dist/components/bs-mega-menu.d.ts +11 -0
  357. package/dist/components/bs-mega-menu.js +1 -0
  358. package/dist/components/bs-menu-block.d.ts +11 -0
  359. package/dist/components/bs-menu-block.js +1 -0
  360. package/dist/components/bs-menu-item.js +1 -1
  361. package/dist/components/bs-menu.js +1 -1
  362. package/dist/components/bs-message-list.js +1 -1
  363. package/dist/components/bs-message.js +1 -1
  364. package/dist/components/bs-navigation-drawer-item.js +1 -1
  365. package/dist/components/bs-navigation-drawer.js +1 -1
  366. package/dist/components/bs-navigation-header.js +1 -1
  367. package/dist/components/bs-onboarding-checklist.js +1 -1
  368. package/dist/components/bs-page-header.d.ts +11 -0
  369. package/dist/components/bs-page-header.js +1 -0
  370. package/dist/components/bs-pagination.js +1 -1
  371. package/dist/components/bs-popover.js +1 -1
  372. package/dist/components/bs-product-tour.js +1 -1
  373. package/dist/components/bs-progress-linear.js +1 -1
  374. package/dist/components/bs-progress.js +1 -1
  375. package/dist/components/bs-qr-code.js +1 -1
  376. package/dist/components/bs-radio.js +1 -1
  377. package/dist/components/bs-search-item.js +1 -1
  378. package/dist/components/bs-session-timeout.js +1 -1
  379. package/dist/components/bs-shortcut-row.js +1 -1
  380. package/dist/components/bs-side-panel.js +1 -1
  381. package/dist/components/bs-skeleton.js +1 -1
  382. package/dist/components/bs-slider.js +1 -1
  383. package/dist/components/bs-snackbar.js +1 -1
  384. package/dist/components/bs-source-link.js +1 -1
  385. package/dist/components/bs-spinner.js +1 -1
  386. package/dist/components/bs-split-pane.js +1 -1
  387. package/dist/components/bs-stack.js +1 -1
  388. package/dist/components/bs-stepper-step.js +1 -1
  389. package/dist/components/bs-stepper.js +1 -1
  390. package/dist/components/bs-switch.js +1 -1
  391. package/dist/components/bs-tab.js +1 -1
  392. package/dist/components/bs-tabs.js +1 -1
  393. package/dist/components/bs-timepicker.js +1 -1
  394. package/dist/components/bs-toast.js +1 -1
  395. package/dist/components/bs-tooltip-trigger.js +1 -1
  396. package/dist/components/bs-tooltip.js +1 -1
  397. package/dist/components/bs-tree-item.js +1 -1
  398. package/dist/components/bs-tree.js +1 -1
  399. package/dist/components/bs-whats-new-entry.js +1 -1
  400. package/dist/components/bs-whats-new.js +1 -1
  401. package/dist/components/p-B6KgEbdM.js +1 -0
  402. package/dist/components/{p-DYDk73TF.js → p-B8kw9EOx.js} +1 -1
  403. package/dist/components/p-BLPNwyiT.js +1 -0
  404. package/dist/components/{p-D8bvv9QQ.js → p-BP1l6Q3Z.js} +1 -1
  405. package/dist/components/p-BS7ySxJZ.js +1 -0
  406. package/dist/components/{p-DYuzgzxI.js → p-BmdSbmFg.js} +1 -1
  407. package/dist/components/{p-CRtvJlh8.js → p-C1owRphU.js} +1 -1
  408. package/dist/components/{p-TAY9S9yG.js → p-C2rRVRIu.js} +1 -1
  409. package/dist/components/p-C3erqJFy.js +1 -0
  410. package/dist/components/{p-BcYNrEOB.js → p-Cd7p-48Q.js} +1 -1
  411. package/dist/components/{p-DtYTs9Kh.js → p-CmlzHRkn.js} +1 -1
  412. package/dist/components/{p-Bp3DIxjT.js → p-Co36mHEU.js} +1 -1
  413. package/dist/components/p-D4_8H0vn.js +1 -0
  414. package/dist/components/{p-DMLfXpva.js → p-D9dDFyPB.js} +1 -1
  415. package/dist/components/{p-DvNED6Lb.js → p-DBvhi__l.js} +1 -1
  416. package/dist/components/{p-CRM1wIX9.js → p-DFd4pP4i.js} +1 -1
  417. package/dist/components/{p-BUpnOUIM.js → p-DVjuZdjF.js} +1 -1
  418. package/dist/components/{p-D7AXo5NT.js → p-DW0Dw2LS.js} +1 -1
  419. package/dist/components/p-DcdFuKG9.js +1 -0
  420. package/dist/components/{p-CH5atin4.js → p-Deq0LzGO.js} +1 -1
  421. package/dist/components/p-DgY5pxXd.js +1 -0
  422. package/dist/components/{p-w-DkdA4O.js → p-DhhXayh6.js} +1 -1
  423. package/dist/components/p-DiORQQg3.js +1 -0
  424. package/dist/components/{p-Dt4JNhHT.js → p-Dl0FedE5.js} +1 -1
  425. package/dist/components/p-DsBToIYE.js +1 -0
  426. package/dist/components/{p-DG9eT5yi.js → p-DtbeCgXo.js} +1 -1
  427. package/dist/components/{p-DcjgRtSQ.js → p-DzvXbBvk.js} +1 -1
  428. package/dist/components/{p-CervX0wH.js → p-I1_Q3HQu.js} +1 -1
  429. package/dist/components/{p-Cpe2k7ZC.js → p-TXAiCnSZ.js} +1 -1
  430. package/dist/components/p-c-g3-oVu.js +1 -0
  431. package/dist/components/p-erdtytMq.js +1 -0
  432. package/dist/components/{p-BDnZvjlq.js → p-qXdgl7VG.js} +1 -1
  433. package/dist/esm/brandsync-wc.js +1 -1
  434. package/dist/esm/bs-accordion-group.entry.js +1 -1
  435. package/dist/esm/bs-ai-disclaimer.entry.js +1 -1
  436. package/dist/esm/bs-ai-greeting.entry.js +1 -1
  437. package/dist/esm/bs-ai-thinking.entry.js +1 -1
  438. package/dist/esm/bs-app-recent-item_3.entry.js +129 -0
  439. package/dist/esm/bs-app-shell.entry.js +1 -1
  440. package/dist/esm/bs-app-switcher.entry.js +206 -0
  441. package/dist/esm/bs-attachment-list.entry.js +1 -1
  442. package/dist/esm/bs-attachment.entry.js +1 -1
  443. package/dist/esm/bs-avatar.entry.js +1 -1
  444. package/dist/esm/bs-badge.entry.js +1 -1
  445. package/dist/esm/bs-breadcrumb-overflow.entry.js +1 -1
  446. package/dist/esm/bs-breadcrumb.entry.js +1 -1
  447. package/dist/esm/bs-breadcrumbs.entry.js +1 -1
  448. package/dist/esm/bs-button-skeleton.entry.js +1 -1
  449. package/dist/esm/bs-button.entry.js +1 -1
  450. package/dist/esm/bs-card.entry.js +1 -1
  451. package/dist/esm/bs-carousel.entry.js +1 -1
  452. package/dist/esm/bs-chatbot-feedback.entry.js +1 -1
  453. package/dist/esm/bs-chatbot-header.entry.js +1 -1
  454. package/dist/esm/bs-chatbot-response-action.entry.js +1 -1
  455. package/dist/esm/bs-chatbot-sources-drawer.entry.js +1 -1
  456. package/dist/esm/bs-chatbot-suggestion-button.entry.js +1 -1
  457. package/dist/esm/bs-checkbox-skeleton.entry.js +1 -1
  458. package/dist/esm/bs-checkbox.entry.js +1 -1
  459. package/dist/esm/bs-chip-filter.entry.js +1 -1
  460. package/dist/esm/bs-chip-informative.entry.js +1 -1
  461. package/dist/esm/bs-chip-input.entry.js +1 -1
  462. package/dist/esm/bs-citation-preview.entry.js +1 -1
  463. package/dist/esm/bs-command-palette.entry.js +1 -1
  464. package/dist/esm/bs-compact-menu-block_2.entry.js +43 -0
  465. package/dist/esm/bs-company-switcher.entry.js +209 -0
  466. package/dist/esm/bs-composer-status-banner.entry.js +1 -1
  467. package/dist/esm/bs-composer.entry.js +1 -1
  468. package/dist/esm/bs-container.entry.js +1 -1
  469. package/dist/esm/bs-data-table.entry.js +2 -2
  470. package/dist/esm/bs-datepicker.entry.js +1 -1
  471. package/dist/esm/bs-divider.entry.js +1 -1
  472. package/dist/esm/bs-empty-state.entry.js +1 -1
  473. package/dist/esm/bs-error-page.entry.js +1 -1
  474. package/dist/esm/bs-file-upload-item.entry.js +1 -1
  475. package/dist/esm/bs-file-upload.entry.js +1 -1
  476. package/dist/esm/bs-global-search.entry.js +2 -2
  477. package/dist/esm/bs-grid.entry.js +2 -2
  478. package/dist/esm/bs-icon-button.entry.js +8 -1
  479. package/dist/esm/bs-icon-tile.entry.js +11 -3
  480. package/dist/esm/bs-inline-tab.entry.js +1 -1
  481. package/dist/esm/bs-input_3.entry.js +4 -4
  482. package/dist/esm/bs-key-caps.entry.js +1 -1
  483. package/dist/esm/bs-key.entry.js +1 -1
  484. package/dist/esm/bs-keyboard-shortcuts.entry.js +2 -2
  485. package/dist/esm/bs-list-item_2.entry.js +212 -0
  486. package/dist/esm/bs-list.entry.js +1 -1
  487. package/dist/esm/bs-mega-menu.entry.js +68 -0
  488. package/dist/esm/bs-message-list.entry.js +1 -1
  489. package/dist/esm/bs-message.entry.js +1 -1
  490. package/dist/esm/bs-navigation-drawer-item.entry.js +1 -1
  491. package/dist/esm/bs-navigation-drawer.entry.js +2 -2
  492. package/dist/esm/bs-navigation-header.entry.js +5 -2
  493. package/dist/esm/bs-page-header.entry.js +64 -0
  494. package/dist/esm/bs-pagination.entry.js +1 -1
  495. package/dist/esm/bs-progress-linear.entry.js +2 -2
  496. package/dist/esm/bs-progress.entry.js +2 -2
  497. package/dist/esm/bs-qr-code.entry.js +1 -1
  498. package/dist/esm/bs-radio.entry.js +1 -1
  499. package/dist/esm/bs-search-item.entry.js +1 -1
  500. package/dist/esm/bs-session-timeout.entry.js +1 -1
  501. package/dist/esm/bs-shortcut-row.entry.js +1 -1
  502. package/dist/esm/bs-slider.entry.js +1 -1
  503. package/dist/esm/bs-snackbar.entry.js +1 -1
  504. package/dist/esm/bs-source-link.entry.js +2 -2
  505. package/dist/esm/bs-spinner.entry.js +1 -1
  506. package/dist/esm/bs-split-pane.entry.js +1 -1
  507. package/dist/esm/bs-stack.entry.js +1 -1
  508. package/dist/esm/bs-stepper-step.entry.js +1 -1
  509. package/dist/esm/bs-stepper.entry.js +1 -1
  510. package/dist/esm/bs-switch.entry.js +1 -1
  511. package/dist/esm/bs-tab_3.entry.js +3 -3
  512. package/dist/esm/bs-timepicker.entry.js +2 -2
  513. package/dist/esm/bs-toast.entry.js +1 -1
  514. package/dist/esm/bs-tooltip-trigger.entry.js +1 -1
  515. package/dist/esm/bs-tooltip.entry.js +1 -1
  516. package/dist/esm/bs-tree-item.entry.js +2 -2
  517. package/dist/esm/bs-tree.entry.js +1 -1
  518. package/dist/esm/loader.js +1 -1
  519. package/dist/types/components/bs-app-recent-item/bs-app-recent-item.cmp.test.d.ts +1 -0
  520. package/dist/types/components/bs-app-recent-item/bs-app-recent-item.d.ts +51 -0
  521. package/dist/types/components/bs-app-recent-item/bs-app-recent-item.stories.d.ts +15 -0
  522. package/dist/types/components/bs-app-switcher/bs-app-switcher.cmp.test.d.ts +1 -0
  523. package/dist/types/components/bs-app-switcher/bs-app-switcher.d.ts +159 -0
  524. package/dist/types/components/bs-app-switcher/bs-app-switcher.stories.d.ts +34 -0
  525. package/dist/types/components/bs-app-tile/bs-app-tile.cmp.test.d.ts +1 -0
  526. package/dist/types/components/bs-app-tile/bs-app-tile.d.ts +51 -0
  527. package/dist/types/components/bs-app-tile/bs-app-tile.stories.d.ts +18 -0
  528. package/dist/types/components/bs-button/bs-icon-button/bs-icon-button.d.ts +7 -0
  529. package/dist/types/components/bs-compact-menu-block/bs-compact-menu-block.cmp.test.d.ts +1 -0
  530. package/dist/types/components/bs-compact-menu-block/bs-compact-menu-block.d.ts +28 -0
  531. package/dist/types/components/bs-compact-menu-block/bs-compact-menu-block.stories.d.ts +10 -0
  532. package/dist/types/components/bs-company-switcher/bs-company-switcher.cmp.test.d.ts +1 -0
  533. package/dist/types/components/bs-company-switcher/bs-company-switcher.d.ts +130 -0
  534. package/dist/types/components/bs-company-switcher/bs-company-switcher.stories.d.ts +25 -0
  535. package/dist/types/components/bs-icon-tile/bs-icon-tile.d.ts +5 -0
  536. package/dist/types/components/bs-mega-menu/bs-mega-menu.cmp.test.d.ts +1 -0
  537. package/dist/types/components/bs-mega-menu/bs-mega-menu.d.ts +110 -0
  538. package/dist/types/components/bs-mega-menu/bs-mega-menu.stories.d.ts +55 -0
  539. package/dist/types/components/bs-menu-block/bs-menu-block.cmp.test.d.ts +1 -0
  540. package/dist/types/components/bs-menu-block/bs-menu-block.d.ts +47 -0
  541. package/dist/types/components/bs-menu-block/bs-menu-block.stories.d.ts +15 -0
  542. package/dist/types/components/bs-page-header/bs-page-header.cmp.test.d.ts +1 -0
  543. package/dist/types/components/bs-page-header/bs-page-header.d.ts +100 -0
  544. package/dist/types/components/bs-page-header/bs-page-header.stories.d.ts +41 -0
  545. package/dist/types/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.d.ts +7 -1
  546. package/dist/types/components.d.ts +2047 -24
  547. package/dist/types/svg-inline.d.ts +5 -0
  548. package/package.json +2 -1
  549. package/reference.d.ts +26 -2
  550. package/reference.json +947 -56
  551. package/dist/brandsync-wc/p-044ac86c.entry.js +0 -1
  552. package/dist/brandsync-wc/p-225148be.entry.js +0 -1
  553. package/dist/brandsync-wc/p-3789c7a5.entry.js +0 -1
  554. package/dist/brandsync-wc/p-3d7b0708.entry.js +0 -1
  555. package/dist/brandsync-wc/p-5eb5795f.entry.js +0 -1
  556. package/dist/brandsync-wc/p-7ed071fb.entry.js +0 -1
  557. package/dist/brandsync-wc/p-baa39c08.entry.js +0 -1
  558. package/dist/brandsync-wc/p-dcbeb143.entry.js +0 -1
  559. package/dist/brandsync-wc/p-e123b391.entry.js +0 -1
  560. package/dist/brandsync-wc/p-e8e22238.entry.js +0 -1
  561. package/dist/cjs/bs-list-item.cjs.entry.js +0 -66
  562. package/dist/cjs/bs-popover.cjs.entry.js +0 -153
  563. package/dist/cjs/bs-skeleton.cjs.entry.js +0 -51
  564. package/dist/components/p-B32Kl4IB.js +0 -1
  565. package/dist/components/p-BcbaiZLh.js +0 -1
  566. package/dist/components/p-CYzBTzzf.js +0 -1
  567. package/dist/components/p-ChcaPfNL.js +0 -1
  568. package/dist/esm/bs-list-item.entry.js +0 -64
  569. package/dist/esm/bs-popover.entry.js +0 -151
  570. package/dist/esm/bs-skeleton.entry.js +0 -49
@@ -0,0 +1,78 @@
1
+ import { html } from "lit";
2
+ import { componentDescription } from "../../stories-utils";
3
+ /** Sample data (invented for the stories and tests, not real organisations). */
4
+ export const COMPANIES = [
5
+ { id: 'nordic', name: 'Nordic Sports AS', orgNumber: '923 456 789', country: 'NO' },
6
+ { id: 'fjord', name: 'Fjord Logistics AS', orgNumber: '918 220 114', country: 'NO' },
7
+ { id: 'aurora', name: 'Aurora Retail Group', orgNumber: '927 003 551', country: 'NO' },
8
+ { id: 'baltic', name: 'Baltic Freight AB', orgNumber: '556 781 2340', country: 'SE' },
9
+ { id: 'kobenhavn', name: 'København Design ApS', orgNumber: '34 12 56 78', country: 'DK' },
10
+ { id: 'helsinki', name: 'Helsinki Tech Oy', orgNumber: '2847561-3', country: 'FI' },
11
+ ];
12
+ export const RECENT_IDS = ['fjord', 'aurora'];
13
+ const meta = {
14
+ excludeStories: /^[A-Z0-9_]+$/,
15
+ title: 'Components/bs-company-switcher',
16
+ parameters: { layout: 'padded', docs: { description: { component: componentDescription('bs-company-switcher') } } },
17
+ argTypes: {
18
+ currentId: { control: 'select', options: COMPANIES.map(c => c.id) },
19
+ switchingId: { control: 'select', options: [undefined, ...COMPANIES.map(c => c.id)] },
20
+ open: { control: 'boolean' },
21
+ },
22
+ args: { currentId: 'nordic', recentIds: RECENT_IDS, switchingId: undefined, open: false },
23
+ render: args => html `
24
+ <div style="min-height: 560px">
25
+ <bs-company-switcher
26
+ .companies=${COMPANIES}
27
+ .currentId=${args.currentId}
28
+ .recentIds=${args.recentIds}
29
+ .switchingId=${args.switchingId}
30
+ .open=${args.open}
31
+ ></bs-company-switcher>
32
+ </div>
33
+ `,
34
+ };
35
+ export default meta;
36
+ export const Closed = {};
37
+ export const Open = { args: { open: true } };
38
+ export const Switching = { args: { open: true, switchingId: 'fjord' } };
39
+ export const SwitchingClosed = { args: { open: false, switchingId: 'fjord' } };
40
+ /** Types a query into the search field the way a user would (the component reads `bsInput` from `bs-input`). */
41
+ const typeQuery = (query) => async ({ canvasElement }) => {
42
+ const cs = canvasElement.querySelector('bs-company-switcher');
43
+ await new Promise(r => setTimeout(r, 100));
44
+ const input = cs?.shadowRoot?.querySelector('bs-input');
45
+ input?.dispatchEvent(new CustomEvent('bsInput', { detail: query, bubbles: true, composed: true }));
46
+ };
47
+ export const Search = { args: { open: true }, play: typeQuery('nord') };
48
+ export const NoResults = { args: { open: true }, play: typeQuery('zzz') };
49
+ export const Interactive = {
50
+ args: { open: false },
51
+ render: args => {
52
+ const wrap = document.createElement('div');
53
+ wrap.style.minHeight = '560px';
54
+ const out = document.createElement('output');
55
+ out.style.cssText = 'display:block;margin-top:8px;font:14px/20px monospace;color:var(--bs-text-secondary)';
56
+ out.textContent = 'Open the switcher, search, use the arrow keys, press Enter or Esc.';
57
+ const cs = document.createElement('bs-company-switcher');
58
+ cs.companies = COMPANIES;
59
+ cs.currentId = args.currentId;
60
+ cs.recentIds = args.recentIds;
61
+ cs.addEventListener('bsCompanySwitch', e => {
62
+ const c = e.detail;
63
+ out.textContent = `bsCompanySwitch ${c.name}`;
64
+ // Simulate a 1.2 s switch: show the spinner, then make it current and close.
65
+ cs.switchingId = c.id;
66
+ setTimeout(() => {
67
+ cs.currentId = c.id;
68
+ cs.switchingId = undefined;
69
+ cs.open = false;
70
+ }, 1200);
71
+ });
72
+ for (const n of ['bsManageCompanies', 'bsAddCompanies', 'bsOpenChange']) {
73
+ cs.addEventListener(n, e => (out.textContent = `${n} ${JSON.stringify(e.detail ?? '')}`));
74
+ }
75
+ wrap.append(cs, out);
76
+ return wrap;
77
+ },
78
+ };
@@ -234,7 +234,7 @@ export class BsComposer {
234
234
  const placeholder = this.placeholder ?? DEFAULT_PLACEHOLDERS[this.variant];
235
235
  const disabled = this.state === 'disabled';
236
236
  const recording = this.state === 'recording';
237
- return (h("div", { key: 'f1ccd8ab2299efcf83dc8f858845e87ba87f9c41', class: `bs-composer bs-composer--${this.state} bs-composer--${this.variant}` }, h("div", { key: '2edd5ab5b6a67d108d2f8067a639e74b6ab4f39f', part: "attachments", class: `bs-composer__attachments-row ${this.hasAttachments ? 'bs-composer__attachments-row--visible' : ''}` }, h("slot", { key: 'a7b2acfea4b2498792749e24aaf9329e521a93df', name: "attachments", onSlotchange: this.onAttachmentsSlotchange })), h("div", { key: '0de284b100f38a60b472eadfd89f06690023a1a1', class: "bs-composer__text-row" }, h("textarea", { key: '0c46b8e4f54234b2df62af566f0b6bf9b1f978d1', ref: el => (this.inputEl = el), part: "input", class: "bs-composer__input", rows: 1, value: this.value, placeholder: placeholder, disabled: disabled, maxLength: this.maxLength, "aria-label": this.ariaLabel, onInput: this.onInput, onKeyDown: this.onInputKeydown })), h("div", { key: 'a3ca22299095e398b6dd7a62c9b6ce93a4d49dab', class: "bs-composer__controls-row" }, !this.hideAttach && (h("button", { key: 'c06cad301027ce2fdef180189945bebd2f876081', type: "button", part: "attach", class: "bs-composer__attach", "aria-label": this.attachLabel, onClick: this.onAttachClick }, h(PlusIcon, { key: 'd863cc1734ca9b67447b2cbbe19a2ba75266d169' }))), recording ? (h("span", { class: "bs-composer__waveform", "aria-hidden": "true" }, WAVEFORM_BAR_HEIGHTS.map(height => (h("span", { class: "bs-composer__waveform-bar", style: { '--bs-composer-bar-height': `${height}px` } }))))) : (h("span", { class: "bs-composer__spacer" })), !this.hideMic && (h("button", { key: 'aadf13bf18c9215045cf7ea326bbc1495ab21288', type: "button", part: "mic", class: `bs-composer__mic ${recording ? 'bs-composer__mic--recording' : ''}`, "aria-label": recording ? this.stopRecordingLabel : this.micLabel, disabled: disabled, onClick: this.onMicClick }, recording ? h(StopIcon, null) : h(MicIcon, null))), h("button", { key: '36ca7d3824349cd65473553e0a20b14c41b74b8b', type: "button", part: "action", class: `bs-composer__action bs-composer__action--${this.state}`, "aria-label": this.actionLabel(), disabled: disabled, "aria-busy": this.loading && this.state === 'idle' ? 'true' : undefined, onClick: this.onActionClick }, this.renderActionIcon()), h("slot", { key: '0965e567d4cb590d7cd072ecf72c10c2c97e1f69', name: "actions-end" }))));
237
+ return (h("div", { key: 'ec6fd11d15f862e5d5633ee153572831562f8635', class: `bs-composer bs-composer--${this.state} bs-composer--${this.variant}` }, h("div", { key: '4de8e636ad98cf8cd280f35bab8723df0c59bcee', part: "attachments", class: `bs-composer__attachments-row ${this.hasAttachments ? 'bs-composer__attachments-row--visible' : ''}` }, h("slot", { key: '8abb10aca311a2d53d1e2980f7a9985b8467e9af', name: "attachments", onSlotchange: this.onAttachmentsSlotchange })), h("div", { key: '2e8de5850afda9498f9f08bbe5e2e5fbf86005dc', class: "bs-composer__text-row" }, h("textarea", { key: '8f75958b9a04785e32f347d87e5362e0e83a7aec', ref: el => (this.inputEl = el), part: "input", class: "bs-composer__input", rows: 1, value: this.value, placeholder: placeholder, disabled: disabled, maxLength: this.maxLength, "aria-label": this.ariaLabel, onInput: this.onInput, onKeyDown: this.onInputKeydown })), h("div", { key: 'd18ad65d7aefaa3b23ee0be475cdfa97dbcea546', class: "bs-composer__controls-row" }, !this.hideAttach && (h("button", { key: 'e953064c20184d159f0ef7b352bee7b7c1a28d1d', type: "button", part: "attach", class: "bs-composer__attach", "aria-label": this.attachLabel, onClick: this.onAttachClick }, h(PlusIcon, { key: '459ac92ed2c057f2882715f3cadbbf70faf1d180' }))), recording ? (h("span", { class: "bs-composer__waveform", "aria-hidden": "true" }, WAVEFORM_BAR_HEIGHTS.map(height => (h("span", { class: "bs-composer__waveform-bar", style: { '--bs-composer-bar-height': `${height}px` } }))))) : (h("span", { class: "bs-composer__spacer" })), !this.hideMic && (h("button", { key: '4f1039338eb4ae672f32da55fdd67ccb820983be', type: "button", part: "mic", class: `bs-composer__mic ${recording ? 'bs-composer__mic--recording' : ''}`, "aria-label": recording ? this.stopRecordingLabel : this.micLabel, disabled: disabled, onClick: this.onMicClick }, recording ? h(StopIcon, null) : h(MicIcon, null))), h("button", { key: '07b8f71f8d5a9ce1288e5cd42179935389b8aef8', type: "button", part: "action", class: `bs-composer__action bs-composer__action--${this.state}`, "aria-label": this.actionLabel(), disabled: disabled, "aria-busy": this.loading && this.state === 'idle' ? 'true' : undefined, onClick: this.onActionClick }, this.renderActionIcon()), h("slot", { key: '5e14d6db5a96be5123d7374bd66d5d044ffb767d', name: "actions-end" }))));
238
238
  }
239
239
  static get is() { return "bs-composer"; }
240
240
  static get encapsulation() { return "shadow"; }
@@ -113,7 +113,7 @@ export class BsComposerStatusBanner {
113
113
  return this.type === 'error' || this.type === 'warning' ? h(WarningIcon, null) : h(ClockIcon, null);
114
114
  }
115
115
  render() {
116
- return (h("div", { key: '9a18ded6392d5374cdf4357650498f1eff8bc896', role: this.roleForType(), "aria-busy": this.loading ? 'true' : undefined, class: `bs-composer-status-banner bs-composer-status-banner--${this.type}` }, h("div", { key: '8acfc215792a889e80d01a08e86a0aa96bfe8967', class: "bs-composer-status-banner__message-group" }, this.showIcon && (h("span", { key: '2a4e0a5fe6b4f2fef30d534eae0c15009f813d33', part: "icon", class: "bs-composer-status-banner__icon" }, h("slot", { key: '5378cfaf8b1fed689eedac4f6a2bf892dda043f8', name: "icon" }, this.renderDefaultIcon()))), h("p", { key: '9fe869051bbf300c12f0ec8006d409abf4bebf56', part: "message", class: "bs-composer-status-banner__message" }, this.message)), this.showButton && (h("button", { key: '6fe2f55c57523ee917ae6d96e2a070f1006f0a44', type: "button", part: "action", class: "bs-composer-status-banner__action", onClick: this.onActionClick }, this.actionLabel)), this.allowClose && (h("button", { key: '18d5ec846134a57c11c46810bb0b35acac0a20b6', type: "button", part: "close", class: "bs-composer-status-banner__close", "aria-label": this.closeLabel, onClick: this.onCloseClick }, h(CloseIcon, { key: 'cbf7993e299eacc8a05efc55cf0dc4539ba9d424' })))));
116
+ return (h("div", { key: 'e7ee5d0dca888ba5126a292fd7ff9cefbdc47eda', role: this.roleForType(), "aria-busy": this.loading ? 'true' : undefined, class: `bs-composer-status-banner bs-composer-status-banner--${this.type}` }, h("div", { key: 'c44a8f911942a310b8cc706a10a97180f75013ff', class: "bs-composer-status-banner__message-group" }, this.showIcon && (h("span", { key: '7787871c8f6885068739d9fffd8d589b6babbd43', part: "icon", class: "bs-composer-status-banner__icon" }, h("slot", { key: 'a8dd0077f51e4a8b872ab6778d0387999022285b', name: "icon" }, this.renderDefaultIcon()))), h("p", { key: '398fb7946e36d45bd8ade95154d9d686fc5de6e1', part: "message", class: "bs-composer-status-banner__message" }, this.message)), this.showButton && (h("button", { key: '18874261ba3638533d3fdb876d19303d79c75259', type: "button", part: "action", class: "bs-composer-status-banner__action", onClick: this.onActionClick }, this.actionLabel)), this.allowClose && (h("button", { key: '187e50bbe911683937a7895cfe862028cc9f775a', type: "button", part: "close", class: "bs-composer-status-banner__close", "aria-label": this.closeLabel, onClick: this.onCloseClick }, h(CloseIcon, { key: 'c9dac11a2af23ba04d7c6836cbda7adbace51d8d' })))));
117
117
  }
118
118
  static get is() { return "bs-composer-status-banner"; }
119
119
  static get encapsulation() { return "shadow"; }
@@ -21,7 +21,7 @@ export class BsContainer {
21
21
  padding = '300';
22
22
  render() {
23
23
  const pad = SPACING_TOKENS.includes(String(this.padding)) ? String(this.padding) : '300';
24
- return (h(Host, { key: 'af5052dbda078e66b8afcf84e842f124748353b9', style: { '--bs-container-padding-token': `var(--bs-spacing-${pad})` } }, h("slot", { key: '2493e7614d7fcaf07b24e350e68a65b06fd77640' })));
24
+ return (h(Host, { key: 'c72bb071abd58c825dcd4b87351362de82a402fa', style: { '--bs-container-padding-token': `var(--bs-spacing-${pad})` } }, h("slot", { key: '341e67abd2a13b47d9d852696f212847c2624b38' })));
25
25
  }
26
26
  static get is() { return "bs-container"; }
27
27
  static get encapsulation() { return "shadow"; }
@@ -87,11 +87,11 @@ export class BsDataTable {
87
87
  }
88
88
  }
89
89
  render() {
90
- return (h("table", { key: '72d4058323ac137aa589476e5b89ed47bd8b996e', part: "table", class: "bs-data-table" }, h("thead", { key: '65e27a1aba0b9eb6892df5b0581672c9fb18ce13', part: "head" }, h("tr", { key: '690d1fab0effa5b0e9e44160ac91d77ab1290079' }, this.selectable && (h("th", { key: 'cf96e314093743b5e6341cf2fce3e0ac6b5e99ef', class: "bs-data-table__select-col" }, this.rows.length > 0 && (h("input", { key: 'fe6fe4d41420f9a37f11337044173ce5b13340d4', type: "checkbox", "aria-label": this.selectAllLabel, checked: this.selectedIds.size > 0 && this.selectedIds.size === this.rows.length, indeterminate: this.selectedIds.size > 0 && this.selectedIds.size < this.rows.length, onChange: this.onSelectAllChange })))), this.columns.map(column => {
90
+ return (h("table", { key: 'd6b278e5252570f3b97ef3fdd53b132974041e6c', part: "table", class: "bs-data-table" }, h("thead", { key: '16280faa094841550a637466fa37ec2df6950e4b', part: "head" }, h("tr", { key: 'e78510a9b1b7966257cb626218aaf9f51bde402e' }, this.selectable && (h("th", { key: '1a79de8886d8d394fc0b06f283258db94e0f3b1f', class: "bs-data-table__select-col" }, this.rows.length > 0 && (h("input", { key: 'c34bd5b47dcea30418fce8674a2aefff7f8bf601', type: "checkbox", "aria-label": this.selectAllLabel, checked: this.selectedIds.size > 0 && this.selectedIds.size === this.rows.length, indeterminate: this.selectedIds.size > 0 && this.selectedIds.size < this.rows.length, onChange: this.onSelectAllChange })))), this.columns.map(column => {
91
91
  const isSorted = this.sortColumn === column.key;
92
92
  const ariaSort = column.sortable ? (isSorted ? (this.sortDirection === 'asc' ? 'ascending' : 'descending') : 'none') : undefined;
93
93
  return (h("th", { part: "header-cell", class: "bs-data-table__header-cell", "aria-sort": ariaSort }, column.sortable ? (h("button", { type: "button", class: "bs-data-table__sort-button", onClick: () => this.onHeaderClick(column) }, column.label, isSorted && h("span", { class: "bs-data-table__sort-indicator" }, this.sortDirection === 'asc' ? ' ▲' : ' ▼'))) : (column.label)));
94
- }))), h("tbody", { key: '34e3bb93c663862d1d8b29956c22392b3c2400ac', part: "body" }, this.rows.map(row => (h("tr", { part: "row", class: "bs-data-table__row" }, this.selectable && (h("td", { class: "bs-data-table__select-col" }, h("input", { type: "checkbox", checked: this.selectedIds.has(row.id), onChange: ev => this.onRowCheckboxChange(row, ev) }))), this.columns.map(column => this.cellRenderer ? (
94
+ }))), h("tbody", { key: '80266f8d66ffdf7132bf2f331568db34ed53ed28', part: "body" }, this.rows.map(row => (h("tr", { part: "row", class: "bs-data-table__row" }, this.selectable && (h("td", { class: "bs-data-table__select-col" }, h("input", { type: "checkbox", checked: this.selectedIds.has(row.id), onChange: ev => this.onRowCheckboxChange(row, ev) }))), this.columns.map(column => this.cellRenderer ? (
95
95
  // cellRenderer is a developer-supplied, trusted function (JS-property-only, never
96
96
  // derived from untrusted input) -- its HTML output is intentionally not escaped,
97
97
  // same trust model as React's dangerouslySetInnerHTML.
@@ -340,7 +340,7 @@ export class BsDatepicker {
340
340
  : this.defaultTabbable(days);
341
341
  const isInRange = (iso) => !!selectedStart && !!previewEnd && iso > selectedStart && iso < previewEnd;
342
342
  const weekdays = this.weekdays();
343
- return (h("bs-card", { key: '280abccf2d86d04f392f4daeb9811bf34d71dc6b', part: "container", class: "bs-datepicker", surface: "raised" }, h("div", { key: '624706b13929083f05bab4210a5c8444240f8a53', class: "bs-datepicker__body" }, this.renderHeader(), h("div", { key: '69d8f66f154e0e194b77b091bede097407c43902', part: "nav", class: "bs-datepicker__nav" }, h("button", { key: '089809f514e4513624749748d639ef6da997618b', part: "prev", type: "button", class: "bs-datepicker__nav-button", "aria-label": this.previousLabel, onClick: () => this.moveView(-1) }, h("svg", { key: 'd78f4940665d866752772f69de2e8058390bf6e5', viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true" }, h("path", { key: 'f34d431a9f77b036fe4417c033f197c72780c1bf', d: "M15 18L9 12L15 6", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }))), h("div", { key: '36a37548a0bc04db3416f5e206c0990f0d1189eb', part: "title", class: "bs-datepicker__title", "aria-live": "polite" }, this.titleText()), h("button", { key: '3bf5616d93ea0d5f8968691692b2b64ce6334d0b', part: "next", type: "button", class: "bs-datepicker__nav-button", "aria-label": this.nextLabel, onClick: () => this.moveView(1) }, h("svg", { key: '5f9aac5a4e1658051908f5bad88b6c196f6dfea7', viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true" }, h("path", { key: '0515eaeb3cd01b48633675668292cb01634c134a', d: "M9 18L15 12L9 6", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), h("div", { key: '2decbaa1fc82ee83c58ae19cd19bd53c51aabe0d', part: "grid", class: "bs-datepicker__grid", role: "grid", "aria-label": this.titleText() }, h("div", { key: '4720f7dbda3ca990885a56d00860eaf4ab7689e8', class: "bs-datepicker__row", role: "row" }, weekdays.map(w => (h("div", { part: "weekday", class: "bs-datepicker__weekday", role: "columnheader" }, w)))), Array.from({ length: 6 }, (_, r) => {
343
+ return (h("bs-card", { key: 'cdb34fb56c5dd485e68fdbaf846c13ecc0547117', part: "container", class: "bs-datepicker", surface: "raised" }, h("div", { key: '348836d221ea9d88f81d74c756f6e33749185e77', class: "bs-datepicker__body" }, this.renderHeader(), h("div", { key: '19192cd83a674a876ddebb3048cf61392f5ce1b4', part: "nav", class: "bs-datepicker__nav" }, h("button", { key: '936dd7846972754b3e3e12e0b5d1ebf459f6626b', part: "prev", type: "button", class: "bs-datepicker__nav-button", "aria-label": this.previousLabel, onClick: () => this.moveView(-1) }, h("svg", { key: '8adff95c2ac4160773ba27b2bba2690376bf7b6e', viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true" }, h("path", { key: 'e07e13f74b49ef8676ef9b2b61648f2fbcd7ff26', d: "M15 18L9 12L15 6", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }))), h("div", { key: '60e2dccce60ce780002b5a37b7bce2cb77a7ded2', part: "title", class: "bs-datepicker__title", "aria-live": "polite" }, this.titleText()), h("button", { key: '4ea132ee9b1d1b7df1dd3595dc52e9cd977dc9d4', part: "next", type: "button", class: "bs-datepicker__nav-button", "aria-label": this.nextLabel, onClick: () => this.moveView(1) }, h("svg", { key: 'e648752590a0483c152a06ff2ebe1a4c7f459fd1', viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true" }, h("path", { key: '61f9ebdc93a4636284fe3215f0ff6699ef7bb8de', d: "M9 18L15 12L9 6", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), h("div", { key: 'd94bd61c202b575b3ae4b8312224f302cf13330e', part: "grid", class: "bs-datepicker__grid", role: "grid", "aria-label": this.titleText() }, h("div", { key: 'ac7713f2ebdc1d429641d14856ed597866fb5a07', class: "bs-datepicker__row", role: "row" }, weekdays.map(w => (h("div", { part: "weekday", class: "bs-datepicker__weekday", role: "columnheader" }, w)))), Array.from({ length: 6 }, (_, r) => {
344
344
  const row = days.slice(r * 7, r * 7 + 7);
345
345
  return (h("div", { class: "bs-datepicker__row", role: "row" }, row.map((d, c) => {
346
346
  const iso = toIso(d);
@@ -28,7 +28,7 @@ export class BsDivider {
28
28
  const a11y = this.decorative
29
29
  ? { role: 'none', 'aria-hidden': 'true' }
30
30
  : { role: 'separator', 'aria-orientation': orientation };
31
- return (h(Host, { key: '0146af9f63ddd328e30262cf9767222445da478b', ...a11y }, h("div", { key: 'a621923c43fd326fe5ee6e7223bd5e7103b01e9e', class: "line", part: "line" })));
31
+ return (h(Host, { key: '858582c09f3f2712a3ee9d51a80a1f53b2a29dfb', ...a11y }, h("div", { key: '184d290fbfdabab256850af57792e7d6c5ebf563', class: "line", part: "line" })));
32
32
  }
33
33
  static get is() { return "bs-divider"; }
34
34
  static get encapsulation() { return "shadow"; }
@@ -61,7 +61,7 @@ export class BsEmptyState {
61
61
  render() {
62
62
  const level = Math.min(6, Math.max(2, Math.round(Number(this.headingLevel)) || 3));
63
63
  const Heading = `h${level}`;
64
- return (h("div", { key: '0f841411b4b0f38d29487f3f52f79cb7a281f32a', part: "container", class: "bs-empty-state" }, h("bs-icon-tile", { key: '69c1e66424d966aed5e29582c2947bbfe0725cde', part: "icon", size: "lg", intent: this.intent }, this.hasIcon && h("slot", { key: '3243c54d7760d27cee1463ffe1acd1d886929a77', name: "icon" })), this.heading && (h(Heading, { key: '06075e06b4917ba28276c8b4c77e7dcc000c6f23', part: "heading", class: "bs-empty-state__heading" }, this.heading)), (this.description || this.hasDescriptionSlot) && (h("p", { key: '00dab545646803b8ed2f9723e6aa80f620f085a1', part: "description", class: "bs-empty-state__description" }, this.hasDescriptionSlot ? h("slot", null) : this.description)), this.hasAction && (h("div", { key: '1a984f1efd3bfbe6e5fd981e2f367ddd25e6f3c7', part: "action", class: "bs-empty-state__action" }, h("slot", { key: 'ea9b962f5652238d74625a11627992f0f4fb34bf', name: "action" })))));
64
+ return (h("div", { key: 'dabc994fcb254cb35958f8bde54d7935bb6ff70a', part: "container", class: "bs-empty-state" }, h("bs-icon-tile", { key: 'efec1cc06eb3447fbd81b12634c12ee96f9fd0d2', part: "icon", size: "lg", intent: this.intent }, this.hasIcon && h("slot", { key: 'd8a7482e2b32f6361b82232652edcc1aadb74a5b', name: "icon" })), this.heading && (h(Heading, { key: '6625baa3d00097951042608aeb888f7c1665e987', part: "heading", class: "bs-empty-state__heading" }, this.heading)), (this.description || this.hasDescriptionSlot) && (h("p", { key: 'c367d9d3aa154e8413c04ca47de7cd9f5eed6883', part: "description", class: "bs-empty-state__description" }, this.hasDescriptionSlot ? h("slot", null) : this.description)), this.hasAction && (h("div", { key: '7b9b78de4e71e6d07d94d4595290492542d7bf62', part: "action", class: "bs-empty-state__action" }, h("slot", { key: '7b57218ca03edfd6f972a2bb6ce458db8dc33d9a', name: "action" })))));
65
65
  }
66
66
  static get is() { return "bs-empty-state"; }
67
67
  static get encapsulation() { return "shadow"; }
@@ -65,7 +65,7 @@ export class BsErrorPage {
65
65
  const primary = this.primaryLabel ?? d.primary;
66
66
  const secondary = this.secondaryLabel ?? d.secondary;
67
67
  const level = Math.min(6, Math.max(1, Math.trunc(Number(this.headingLevel)) || 1));
68
- return (h("bs-card", { key: '376ab30f0eeaf89fb522373b375d0c68eebe8e99', part: "container", class: "bs-error-page", surface: "base" }, h("div", { key: '380013c4a4ac5208823856bb565f841e4b9aace3', class: "bs-error-page__body" }, h("div", { key: 'ce3ed8170977a0e2c4b1247140734fa3ba4c4896', class: "bs-error-page__art-group" }, h("bs-icon-tile", { key: '625d8cef3b2969f15e6ba5e94913359f54f277dd', part: "art", class: `bs-error-page__art ${d.info ? 'bs-error-page__art--info' : ''}`, intent: d.intent, size: "lg" }, h("slot", { key: 'e4415c41729cc3e9b52f1c61dfb8906a1d8dcc6a', name: "icon" }, d.glyph())), code && (h("span", { key: 'a6d8d24456746f9da3387c2acae20410382d7b62', part: "code", class: "bs-error-page__code" }, code))), h(`h${level}`, { part: 'heading', class: { 'bs-error-page__heading': true } }, heading), description && (h("p", { key: '4cace21798cbd9f40f2eb493938b5c12db43be97', part: "description", class: "bs-error-page__description" }, description)), (primary || secondary) && (h("div", { key: 'aca6cc9c414530bbb657e02c0910bbc4cae35ae6', part: "actions", class: "bs-error-page__actions" }, primary && (h("bs-button", { key: 'e5ec7c649b3b49e42e2f8132372e5b1b25f850bf', part: "primary", variant: "primary", onClick: () => this.bsPrimary.emit() }, primary)), secondary && (h("bs-button", { key: '7414d2d76186402404cf36ad662340f30e4b65aa', part: "secondary", variant: "outlined", onClick: () => this.bsSecondary.emit() }, secondary)))), this.reference && (h("p", { key: 'cf2fff2d7d2a77dd9f5a1fca1464ae0f687e4b5a', part: "reference", class: "bs-error-page__reference" }, this.reference)))));
68
+ return (h("bs-card", { key: '4214c79438721c66089be3a4ae64fcd6bdcbdea6', part: "container", class: "bs-error-page", surface: "base" }, h("div", { key: '39b2a7292d488442fc2465635a5be9dd704dc42e', class: "bs-error-page__body" }, h("div", { key: 'beb353eefb6b77b03fe7d1ea3894b6a625eebe06', class: "bs-error-page__art-group" }, h("bs-icon-tile", { key: '516a9c87ddb3ac5140d2880d4638eb5eca01db73', part: "art", class: `bs-error-page__art ${d.info ? 'bs-error-page__art--info' : ''}`, intent: d.intent, size: "lg" }, h("slot", { key: '3c3029ce78413f49c4bb839260c432848329b428', name: "icon" }, d.glyph())), code && (h("span", { key: 'fc4058b507c0b60ca417f09f7838664716b17fc3', part: "code", class: "bs-error-page__code" }, code))), h(`h${level}`, { part: 'heading', class: { 'bs-error-page__heading': true } }, heading), description && (h("p", { key: 'b914f77506217b401e26694205104d623596d270', part: "description", class: "bs-error-page__description" }, description)), (primary || secondary) && (h("div", { key: 'b6dc2e92b34960f754a54b31a659337135e63607', part: "actions", class: "bs-error-page__actions" }, primary && (h("bs-button", { key: 'e4f85bf6e86a80fbf1bd09fc77e16768c435a97b', part: "primary", variant: "primary", onClick: () => this.bsPrimary.emit() }, primary)), secondary && (h("bs-button", { key: 'a1469448cfbf1edb0bb8fe1d613101782dc87145', part: "secondary", variant: "outlined", onClick: () => this.bsSecondary.emit() }, secondary)))), this.reference && (h("p", { key: 'e8f32f0cc84051d02418bb48bc6116675ec55097', part: "reference", class: "bs-error-page__reference" }, this.reference)))));
69
69
  }
70
70
  static get is() { return "bs-error-page"; }
71
71
  static get encapsulation() { return "shadow"; }
@@ -112,7 +112,7 @@ export class BsFileUpload {
112
112
  this.handleFiles(files);
113
113
  };
114
114
  render() {
115
- return (h("div", { key: '58fece79d4fb5204ba4edadbdac4a26b5ef3186b', part: "dropzone", class: `bs-file-upload bs-file-upload--${this.direction} ${this.dragging ? 'bs-file-upload--dragging' : ''} ${this.disabled ? 'bs-file-upload--disabled' : ''}`, onDragEnter: this.onDragOver, onDragOver: this.onDragOver, onDragLeave: this.onDragLeave, onDrop: this.onDrop }, h("div", { key: '9339e7a61fd8d2d337c442518b0feca4eac56f4e', part: "icon", class: "bs-file-upload__icon" }, h("slot", { key: 'b361ea7dda65426da604485f8d00022520e96643', name: "icon" }, h(UploadIcon, { key: 'fb08c4f2ec4250293ca66ab7a84c0b77599b15b9' }))), h("div", { key: '1ee60fe58d4196a8aaf95d38e7ba1d6aaaf269fb', class: "bs-file-upload__content" }, h("div", { key: '57e91a29e74a9e02831b32e3ab674607a256e68c', class: "bs-file-upload__text" }, this.heading && (h("span", { key: '389ea949446b63bb976071fec70d3e5398d3ebef', part: "heading", class: "bs-file-upload__heading" }, this.heading)), this.description && (h("span", { key: 'f6709820df651e915ee7b0073672820478e3c483', part: "description", id: "description", class: "bs-file-upload__description" }, this.description))), h("bs-button", { key: '29abda9026efccb881b26794ca5441888ef4c02c', part: "browse", variant: "neutral", size: "sm", disabled: this.disabled, onClick: this.onBrowse }, this.buttonLabel)), h("input", { key: '3ea4af2d866795676c74138f5ce6f75f5cb13111', ref: el => (this.inputEl = el), class: "bs-file-upload__input", type: "file", hidden: true, tabindex: -1, accept: this.accept, multiple: this.multiple, disabled: this.disabled, "aria-describedby": this.description ? 'description' : undefined, onChange: this.onInputChange })));
115
+ return (h("div", { key: '5312a866a1db63fd378f265fc200a509bfd50ce1', part: "dropzone", class: `bs-file-upload bs-file-upload--${this.direction} ${this.dragging ? 'bs-file-upload--dragging' : ''} ${this.disabled ? 'bs-file-upload--disabled' : ''}`, onDragEnter: this.onDragOver, onDragOver: this.onDragOver, onDragLeave: this.onDragLeave, onDrop: this.onDrop }, h("div", { key: '7276ccfa10a086d933b5563a208393a75e0dd821', part: "icon", class: "bs-file-upload__icon" }, h("slot", { key: 'e828eaa70303c82cb2bea5e647807079946b62e7', name: "icon" }, h(UploadIcon, { key: 'bd6ee5b8b20996ee68f972cb79db7c47f645c4d3' }))), h("div", { key: '784440974685713b31ba97642b931b99e64433a3', class: "bs-file-upload__content" }, h("div", { key: 'c7568214218e02ecb794f3429b843462f88bf216', class: "bs-file-upload__text" }, this.heading && (h("span", { key: '4872f617be4f30b9ab98aeca2dca7012d9391905', part: "heading", class: "bs-file-upload__heading" }, this.heading)), this.description && (h("span", { key: 'd8f446f1f8690ec773b094aeeb66af49ec1de291', part: "description", id: "description", class: "bs-file-upload__description" }, this.description))), h("bs-button", { key: 'bb0634e3e0dcb4a4ef59fa7c5daeaacbff5bceda', part: "browse", variant: "neutral", size: "sm", disabled: this.disabled, onClick: this.onBrowse }, this.buttonLabel)), h("input", { key: 'f55602446ec222ca46b7dab95aaff26d6d5b1632', ref: el => (this.inputEl = el), class: "bs-file-upload__input", type: "file", hidden: true, tabindex: -1, accept: this.accept, multiple: this.multiple, disabled: this.disabled, "aria-describedby": this.description ? 'description' : undefined, onChange: this.onInputChange })));
116
116
  }
117
117
  static get is() { return "bs-file-upload"; }
118
118
  static get encapsulation() { return "shadow"; }
@@ -86,7 +86,7 @@ export class BsFileUploadItem {
86
86
  }
87
87
  render() {
88
88
  const removing = this.state === 'success';
89
- return (h("div", { key: '02ddff16491c33fa61626bca72275ea0a1037c14', part: "item", class: `bs-file-upload-item bs-file-upload-item--${this.state}` }, h("div", { key: 'c465a9216d363ee858933d24abb468d73d66190e', part: "thumbnail", class: "bs-file-upload-item__thumbnail" }, h("slot", { key: '5aeaec4d3e9120163dab89c9bb3ca71e8976cae3', name: "thumbnail" }, this.thumbnailSrc ? (h("img", { class: "bs-file-upload-item__image", src: this.thumbnailSrc, alt: this.thumbnailAlt })) : (h(ImageIcon, null)))), h("div", { key: '3fdf5cb05270ae986e59404758f487932da10fbe', class: "bs-file-upload-item__content" }, h("div", { key: 'eb783412a8f97eaf6d566c06283c0ca0cc735570', class: "bs-file-upload-item__meta" }, h("span", { key: 'a456cfbcbaa19329715d55d80845a6b824bb2d64', part: "name", class: "bs-file-upload-item__name" }, this.fileName), this.fileSize && (h("span", { key: '7810e2855de50d3fa42d7ee29af81e2c58ea1a42', part: "size", class: "bs-file-upload-item__size" }, this.fileSize))), this.renderStatus()), h("bs-icon-button", { key: '7be3bf3d73ec51a2ce3bc23b4e401306c2d6bcc9', part: "action", variant: "subtle", size: "lg", ariaLabel: removing ? this.removeLabel : this.cancelLabel, onClick: this.onAction }, removing ? h(TrashIcon, null) : h(CloseIcon, null))));
89
+ return (h("div", { key: '26933845798c1cee2739c2a5a3d402175244717b', part: "item", class: `bs-file-upload-item bs-file-upload-item--${this.state}` }, h("div", { key: 'b7312bfd0a7bcbeac8e098be4cb6d565283f2e0f', part: "thumbnail", class: "bs-file-upload-item__thumbnail" }, h("slot", { key: '69350d5224f540e0f4d5033e3ac92ccff397b565', name: "thumbnail" }, this.thumbnailSrc ? (h("img", { class: "bs-file-upload-item__image", src: this.thumbnailSrc, alt: this.thumbnailAlt })) : (h(ImageIcon, null)))), h("div", { key: 'fbe429e0dd56af6fe5d955ce384a335c9ce3843a', class: "bs-file-upload-item__content" }, h("div", { key: 'b45f5b5500d760dcfb0d8fe3e87638db9325ae99', class: "bs-file-upload-item__meta" }, h("span", { key: '7e5a8cd3ccca37c88182d0e430841f36f29f56e7', part: "name", class: "bs-file-upload-item__name" }, this.fileName), this.fileSize && (h("span", { key: '114e9167c4542c9e071ebb21ee77d25d5c9221b4', part: "size", class: "bs-file-upload-item__size" }, this.fileSize))), this.renderStatus()), h("bs-icon-button", { key: 'f6a9a212a6436ac50eaab6b0224b58245171a7de', part: "action", variant: "subtle", size: "lg", ariaLabel: removing ? this.removeLabel : this.cancelLabel, onClick: this.onAction }, removing ? h(TrashIcon, null) : h(CloseIcon, null))));
90
90
  }
91
91
  static get is() { return "bs-file-upload-item"; }
92
92
  static get encapsulation() { return "shadow"; }
@@ -342,10 +342,10 @@ export class BsGlobalSearch {
342
342
  const listId = `${this.id}-listbox`;
343
343
  const isList = this.status === 'default' || this.status === 'results';
344
344
  const showFooter = this.showFooter && isList;
345
- return (h("div", { key: 'dd4477e08b51d52d5309150c4e95f0e560411a05', class: "bs-global-search" }, h("div", { key: 'a37363a1076c4fab1676d4801a0f9751528b42d0', part: "field", class: "bs-global-search__field", role: "combobox", "aria-label": this.label || this.placeholder, "aria-expanded": String(this.open && showList), "aria-haspopup": "listbox", "aria-controls": this.open && showList ? listId : undefined, "aria-activedescendant": this.open && this.activeId ? this.activeId : undefined, onKeyDown: this.onKeyDown, onFocusin: () => this.setOpen(true), onClick: () => this.setOpen(true) }, h("bs-input", { key: 'c0a4d130a36937c90c95659b439eef20655a6c99', ref: el => (this.inputEl = el), type: "search", value: this.value, placeholder: this.placeholder, disabled: this.disabled, onBsInput: this.onInput })), this.open && (h("div", { key: 'f85e3f63bf82a5de2648e8fa60f4fd4df288ec3b', part: "panel", class: "bs-global-search__panel", onMouseDown: (ev) => ev.preventDefault(), onMouseOver: this.onPanelMouseOver }, isList && showList && (h("div", { key: 'cc926315b2b1d2ad62026531a4174cb84df713a8', id: listId, class: "bs-global-search__list", role: "listbox", "aria-label": this.listLabel }, sections.map(s => {
345
+ return (h("div", { key: '48912c3c2e6fdfefa05d234fa037e4b47e36cbd9', class: "bs-global-search" }, h("div", { key: 'aeb8a5d41463b5df24502aecb85290f2535184d6', part: "field", class: "bs-global-search__field", role: "combobox", "aria-label": this.label || this.placeholder, "aria-expanded": String(this.open && showList), "aria-haspopup": "listbox", "aria-controls": this.open && showList ? listId : undefined, "aria-activedescendant": this.open && this.activeId ? this.activeId : undefined, onKeyDown: this.onKeyDown, onFocusin: () => this.setOpen(true), onClick: () => this.setOpen(true) }, h("bs-input", { key: '0aec5505a09ca9fa08e152983b17e3a35619e5ce', ref: el => (this.inputEl = el), type: "search", value: this.value, placeholder: this.placeholder, disabled: this.disabled, onBsInput: this.onInput })), this.open && (h("div", { key: 'c9b1589c7602b0522a5a33d895e50e2f57ae7e66', part: "panel", class: "bs-global-search__panel", onMouseDown: (ev) => ev.preventDefault(), onMouseOver: this.onPanelMouseOver }, isList && showList && (h("div", { key: 'aa49f77c49ea3aa5337a01aa8cf2e760ac8f6125', id: listId, class: "bs-global-search__list", role: "listbox", "aria-label": this.listLabel }, sections.map(s => {
346
346
  const hid = `${this.id}-h-${s}`;
347
347
  return (h("div", { part: "section", class: "bs-global-search__section", role: "group", "aria-labelledby": hid }, h("div", { part: "section-header", id: hid, class: "bs-global-search__section-header" }, this.sectionLabel(s)), h("slot", { name: s })));
348
- }))), this.status === 'empty' && this.renderStateBlock('empty'), this.status === 'error' && this.renderStateBlock('error'), showFooter && this.renderFooter())), h("span", { key: '4bf9f7fc2a00853aee7b48328819ef0a9181d668', class: "bs-global-search__live", "aria-live": "polite" }, this.announcement())));
348
+ }))), this.status === 'empty' && this.renderStateBlock('empty'), this.status === 'error' && this.renderStateBlock('error'), showFooter && this.renderFooter())), h("span", { key: '591953d910a7986705dde045c325c3043df1387b', class: "bs-global-search__live", "aria-live": "polite" }, this.announcement())));
349
349
  }
350
350
  static get is() { return "bs-global-search"; }
351
351
  static get encapsulation() { return "shadow"; }
@@ -59,12 +59,12 @@ export class BsGrid {
59
59
  const row = this.rowGap ? this.token(this.rowGap) : gapValue;
60
60
  const col = this.columnGap ? this.token(this.columnGap) : gapValue;
61
61
  const align = ALIGNS.includes(this.align) ? this.align : 'stretch';
62
- return (h("div", { key: '0799adbc2484f270db8ca5c2cadc1a0ec55ecbc0', class: "bs-grid", part: "container", style: {
62
+ return (h("div", { key: 'd504eaf0d6db8c106094f3efb60600b65774ea4d', class: "bs-grid", part: "container", style: {
63
63
  gridTemplateColumns: this.template(),
64
64
  rowGap: `var(--bs-grid-row-gap, ${row})`,
65
65
  columnGap: `var(--bs-grid-column-gap, ${col})`,
66
66
  alignItems: align,
67
- } }, h("slot", { key: '90d4940c5b1870df9eaae616f8fbe3738f025a3b' })));
67
+ } }, h("slot", { key: 'd127b6a767777b1d2cc3fe981e1846e5a8726a60' })));
68
68
  }
69
69
  static get is() { return "bs-grid"; }
70
70
  static get encapsulation() { return "shadow"; }
@@ -24,6 +24,7 @@ import { h } from "@stencil/core";
24
24
  * @part text - The wrapper around the `text` slot (only shown when something is slotted).
25
25
  */
26
26
  export class BsIconTile {
27
+ el;
27
28
  /** Tile size: `sm` 24px, `md` 32px, `lg` 48px. */
28
29
  size = 'sm';
29
30
  /** Colour and default glyph. `brand` uses the brand colours; `information` the info palette. */
@@ -35,11 +36,18 @@ export class BsIconTile {
35
36
  hasCustomIcon = false;
36
37
  /** True while something is assigned to the `text` slot, so the text wrapper (and its gap) only exists then. */
37
38
  hasText = false;
39
+ /** `slotchange` alone is not enough: when the icon is already a child at first render (or is added in the same
40
+ * pass that upgrades this element) the event can fire before the handler is attached, leaving the default
41
+ * glyph drawn next to the slotted icon. Read the light DOM once up front. */
42
+ componentWillLoad() {
43
+ this.hasCustomIcon = Array.from(this.el.childNodes).some(n => (n.nodeType === Node.ELEMENT_NODE && !n.hasAttribute('slot')) || (n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim()));
44
+ this.hasText = Array.from(this.el.children).some(c => c.getAttribute('slot') === 'text');
45
+ }
38
46
  render() {
39
47
  const labelled = !!this.label;
40
48
  return [
41
- h("div", { key: '3fc3a9874dbadcf9ac6fa3df92f7c5cb48c4cc7b', part: "container", class: "bs-icon-tile", role: labelled ? 'img' : undefined, "aria-label": labelled ? this.label : undefined, "aria-hidden": labelled ? undefined : 'true' }, h("span", { key: 'e27206a1f0ef5a05183863c952c631614e44b591', part: "icon", class: "bs-icon-tile__icon" }, h("slot", { key: '31c4cd875c08f01b04d1fbc8b27dbb471c383129', onSlotchange: (ev) => (this.hasCustomIcon = hasContent(ev.target)) }), !this.hasCustomIcon && (GLYPHS[this.intent] ?? GLYPHS.default))),
42
- h("span", { key: 'fcc4dbeff34fa2de817619963ec0ec2597d04db3', part: "text", class: { 'bs-icon-tile__text': true, 'bs-icon-tile__text--visible': this.hasText } }, h("slot", { key: '24509194d7cb291ee7930039f42dcea780f0bcf3', name: "text", onSlotchange: (ev) => (this.hasText = ev.target.assignedNodes().length > 0) })),
49
+ h("div", { key: 'ea92c7e93e3283dccf7feb0afcc87947eb9f3087', part: "container", class: "bs-icon-tile", role: labelled ? 'img' : undefined, "aria-label": labelled ? this.label : undefined, "aria-hidden": labelled ? undefined : 'true' }, h("span", { key: '50ba78a85b831869ea60882b89739cc0ef36a6b4', part: "icon", class: "bs-icon-tile__icon" }, h("slot", { key: 'ab395f4bfc9a40be9ac74f05ebf227a241cdfca8', onSlotchange: (ev) => (this.hasCustomIcon = hasContent(ev.target)) }), !this.hasCustomIcon && (GLYPHS[this.intent] ?? GLYPHS.default))),
50
+ h("span", { key: '07ad1aa22ba646f82b8eb2782ddda0c816dc47a5', part: "text", class: { 'bs-icon-tile__text': true, 'bs-icon-tile__text--visible': this.hasText } }, h("slot", { key: 'f4209dee495bf82b95c95fcd754bdf8305d5b02f', name: "text", onSlotchange: (ev) => (this.hasText = ev.target.assignedNodes().length > 0) })),
43
51
  ];
44
52
  }
45
53
  static get is() { return "bs-icon-tile"; }
@@ -135,6 +143,7 @@ export class BsIconTile {
135
143
  "hasText": {}
136
144
  };
137
145
  }
146
+ static get elementRef() { return "el"; }
138
147
  }
139
148
  function hasContent(slot) {
140
149
  return slot.assignedNodes().some(n => n.nodeType === Node.ELEMENT_NODE || (n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim()));
@@ -397,10 +397,10 @@ export class BsInput {
397
397
  return (h("div", { part: "field", class: `bs-input__field bs-input__field--pin ${errorClass} ${disabledClass}` }, Array.from({ length: this.length }).map((_, i) => (h("input", { id: i === 0 ? 'control' : undefined, ref: el => (this.pinInputs[i] = el), part: "control", class: "bs-input__pin-cell", type: "text", inputMode: "numeric", maxLength: 1, value: this.value[i] ?? '', disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, onInput: this.onPinInput(i), onKeyDown: this.onPinKeydown(i) })))));
398
398
  }
399
399
  render() {
400
- return (h("div", { key: '99df53d78ddc715d336738a27efeb3d64140a9c7', class: `bs-input ${this.error ? 'bs-input--error' : ''}` }, this.label && (
400
+ return (h("div", { key: '3c0ea65d5b8852b14e1295d6a6a33aef95d02d01', class: `bs-input ${this.error ? 'bs-input--error' : ''}` }, this.label && (
401
401
  // "control" is a fixed id, not a generated one -- safe because Shadow DOM scopes ids
402
402
  // to this instance's own shadow root, so it can never collide with another bs-input.
403
- h("label", { key: '27f894fedaf23ded0432d9f26e80a9dd4d2bbb8e', part: "label", class: "bs-input__label", htmlFor: "control" }, this.label, this.required && (h("span", { key: '4260924b6128864a17ae809e5e54bc3f5aff5b64', part: "required", class: "bs-input__required", "aria-hidden": "true" }, "*")))), this.type === 'pin' ? this.renderPinField() : this.type === 'initials' ? this.renderInitialsField() : this.renderField(), this.error ? (h("span", { id: "description-or-error", part: "error", class: "bs-input__error" }, h("svg", { part: "error-icon", class: "bs-input__error-icon", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, h("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", "stroke-width": "1.2" }), h("path", { d: "M8 5V8.5", stroke: "currentColor", "stroke-width": "1.2", "stroke-linecap": "round" }), h("circle", { cx: "8", cy: "11", r: "0.75", fill: "currentColor" })), this.error)) : this.description ? (h("span", { id: "description-or-error", part: "description", class: "bs-input__description" }, this.description)) : null));
403
+ h("label", { key: '13e99193d9906c7c7534df1c9bd6395f1a758524', part: "label", class: "bs-input__label", htmlFor: "control" }, this.label, this.required && (h("span", { key: 'ac14aa6322a8ce40624cdc392dde96b7bad298a8', part: "required", class: "bs-input__required", "aria-hidden": "true" }, "*")))), this.type === 'pin' ? this.renderPinField() : this.type === 'initials' ? this.renderInitialsField() : this.renderField(), this.error ? (h("span", { id: "description-or-error", part: "error", class: "bs-input__error" }, h("svg", { part: "error-icon", class: "bs-input__error-icon", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, h("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", "stroke-width": "1.2" }), h("path", { d: "M8 5V8.5", stroke: "currentColor", "stroke-width": "1.2", "stroke-linecap": "round" }), h("circle", { cx: "8", cy: "11", r: "0.75", fill: "currentColor" })), this.error)) : this.description ? (h("span", { id: "description-or-error", part: "description", class: "bs-input__description" }, this.description)) : null));
404
404
  }
405
405
  static get is() { return "bs-input"; }
406
406
  static get encapsulation() { return "shadow"; }
@@ -38,7 +38,7 @@ export class BsKey {
38
38
  this.hasIcon = ev.target.assignedNodes().length > 0;
39
39
  };
40
40
  render() {
41
- return (h("kbd", { key: 'ebd13e9ce82e11cb2868adaf1d9dfc38a261bf26', part: "container", class: "bs-key" }, !this.hasIcon && (h("span", { key: 'abb27af837ff8a82bc976841a04a2ef3d0386cdd', part: "label", class: "bs-key__label" }, h("slot", { key: 'e28affc720c80cf40edba55229e7df67e79a579b' }, this.label))), h("span", { key: 'c88fb0200102cfcd6e3b3b84218de6fcfddf06b8', part: "icon", class: { 'bs-key__icon': true, 'bs-key__icon--hidden': !this.hasIcon } }, h("slot", { key: '4043e70a46538183913b6275ba569fb75c078c27', name: "icon", onSlotchange: this.onIconSlotChange }))));
41
+ return (h("kbd", { key: '45bd298f9fcf91ac4a6fd1c10c879a9373c53fae', part: "container", class: "bs-key" }, !this.hasIcon && (h("span", { key: '019bb8652eef6eafbe3d11ac0a179aa06a853e99', part: "label", class: "bs-key__label" }, h("slot", { key: '9b4e0c377ad3a6ab51125894aca36164e3f4546c' }, this.label))), h("span", { key: '2d8618a0a71f799d6b4c3c8ecd3364d2a744879d', part: "icon", class: { 'bs-key__icon': true, 'bs-key__icon--hidden': !this.hasIcon } }, h("slot", { key: '9c7bf13a4ddf4ad57fcee6c81653783eb0bde3c4', name: "icon", onSlotchange: this.onIconSlotChange }))));
42
42
  }
43
43
  static get is() { return "bs-key"; }
44
44
  static get encapsulation() { return "shadow"; }
@@ -41,7 +41,7 @@ export class BsKeyCaps {
41
41
  render() {
42
42
  const keys = this.keyList();
43
43
  const name = this.label ?? (keys.length ? keys.join(' plus ') : undefined);
44
- return (h("span", { key: 'd2396eec919fbad20d6152faf4786d1bcfac9042', part: "container", class: "bs-key-caps", role: "group", "aria-label": name, "aria-disabled": this.disabled ? 'true' : undefined }, keys.map(k => (h("bs-key", { label: k }))), h("slot", { key: '9f4facb9f8d6ce6079facc16d260a41f48e54470' })));
44
+ return (h("span", { key: 'a5a71f50df215bafb5225553a3822048470b0df6', part: "container", class: "bs-key-caps", role: "group", "aria-label": name, "aria-disabled": this.disabled ? 'true' : undefined }, keys.map(k => (h("bs-key", { label: k }))), h("slot", { key: '3efb98fca94e15103658c10444000b60665ddd31' })));
45
45
  }
46
46
  static get is() { return "bs-key-caps"; }
47
47
  static get encapsulation() { return "shadow"; }
@@ -129,10 +129,10 @@ export class BsKeyboardShortcuts {
129
129
  const headId = `${this.id}-heading`;
130
130
  const noResults = count === 0 && (this.query ?? '').trim() !== '';
131
131
  let gi = 0;
132
- return (h("bs-card", { key: '602e1b2fbeb09dc848435562c3188f784a96a26f', part: "container", class: "bs-keyboard-shortcuts", surface: "base", role: "region", "aria-labelledby": headId, onKeyDown: this.onKeyDown }, h("div", { key: '1ad1ad5d14769b755362b1c965390d929d190a81', class: "bs-keyboard-shortcuts__body" }, h("div", { key: '86e635b3e14a47fa5df69983f9fab132ab8b334c', part: "head", class: "bs-keyboard-shortcuts__head" }, h("svg", { key: '1b7c59483a38971e214126b309e2f62c7f69457c', class: "bs-keyboard-shortcuts__icon", viewBox: "0 0 24 24", width: "20", height: "20", fill: "none", stroke: "currentColor", "stroke-width": "1.8", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("rect", { key: 'e70a9a55b1fa027dbaa50870dd79d2c2b4805efd', x: "2", y: "5", width: "20", height: "14", rx: "2" }), h("path", { key: '17c1bf9e1f044b802f1538a70da58334e1b328c4', d: "M6 9h.01M10 9h.01M14 9h.01M18 9h.01M6 13h.01M18 13h.01M9 15.5h6" })), h("h4", { key: '06466a27347a74bb61ab23f0a57ec19b8fd3feb7', part: "heading", id: headId, class: "bs-keyboard-shortcuts__heading" }, h("slot", { key: '307d0611ceffa704345f1a138796e76df9101162', name: "heading" }, this.heading)), h("bs-icon-button", { key: 'a9126801a045b8e95301a2fd6cfcbae20e9ef29b', part: "close", variant: "subtle", size: "md", "aria-label": this.closeLabel, onClick: () => this.bsClose.emit() }, h("svg", { key: '472f6467736f6baadd13ed4f723107be92dc9147', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "aria-hidden": "true" }, h("path", { key: 'b20530074ac46a1764f613f02c9aca7be9771c40', d: "M6 6l12 12M18 6 6 18" })))), h("bs-input", { key: '94eb5e7ac066359e150681a0b9016da7e98d45b0', part: "search", type: "search", placeholder: this.searchPlaceholder, value: this.query, onBsInput: this.onInput }), this.showSingleKeySwitch && (h("div", { key: 'b51f32af80233153e3f2e957e364e82e8458b0d5', part: "switch", class: "bs-keyboard-shortcuts__switch" }, h("div", { key: '5c043a1b80b20fc9b636b293a3e0782807d3fa0c', class: "bs-keyboard-shortcuts__switch-text" }, h("span", { key: 'bcc7015e1084d3479ff257fdc50e12b813d90bbd', class: "bs-keyboard-shortcuts__switch-title" }, this.singleKeyLabel), h("span", { key: '43b88ef5e2368da7f1304c6c6c05c125a87132f8', class: "bs-keyboard-shortcuts__switch-caption" }, this.singleKeyDescription)), h("bs-switch", { key: 'b7d95ac144d87947f64199ea9cf83eb108a2f00c', ariaLabel: this.singleKeyLabel, checked: this.singleKeyEnabled, onBsChange: this.onSwitch }))), h("span", { key: 'd6d155b36ca413bca0978addbe1a82370d71c645', class: "bs-keyboard-shortcuts__live", "aria-live": "polite" }, `${count} shortcut${count === 1 ? '' : 's'}`), noResults ? (h("p", { part: "empty", class: "bs-keyboard-shortcuts__empty", role: "status" }, this.noResultsText)) : (h("div", { part: "groups", class: "bs-keyboard-shortcuts__groups" }, cols.map(col => (h("div", { class: "bs-keyboard-shortcuts__column" }, col.map(g => {
132
+ return (h("bs-card", { key: '7e825a3d2c214a2228c8b302bc6530ca23427b2f', part: "container", class: "bs-keyboard-shortcuts", surface: "base", role: "region", "aria-labelledby": headId, onKeyDown: this.onKeyDown }, h("div", { key: '8595c3352463214acefb820a23a9adbdd66e6b76', class: "bs-keyboard-shortcuts__body" }, h("div", { key: 'bbdb0c462e6958d6fbeca96bd5ffb5dc99bdaf19', part: "head", class: "bs-keyboard-shortcuts__head" }, h("svg", { key: '95641e98b3795b85caa6e70ebd9bd2deeecdc2aa', class: "bs-keyboard-shortcuts__icon", viewBox: "0 0 24 24", width: "20", height: "20", fill: "none", stroke: "currentColor", "stroke-width": "1.8", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("rect", { key: 'b1160b8146645716ea1b675c480f42675a4d6f29', x: "2", y: "5", width: "20", height: "14", rx: "2" }), h("path", { key: '18f2516e9113b2c335587bd3d17c49099496f1ec', d: "M6 9h.01M10 9h.01M14 9h.01M18 9h.01M6 13h.01M18 13h.01M9 15.5h6" })), h("h4", { key: '299d3fa12acc958389b7cd6b7ec9c2cefe12ed43', part: "heading", id: headId, class: "bs-keyboard-shortcuts__heading" }, h("slot", { key: '80365f19a624d950cfa678b1d2cb7a2eb7dbeb33', name: "heading" }, this.heading)), h("bs-icon-button", { key: '2e43986aac1914ab56527ac09e08889fbe6ca0ef', part: "close", variant: "subtle", size: "md", "aria-label": this.closeLabel, onClick: () => this.bsClose.emit() }, h("svg", { key: 'cd655a49a3142304b168c8a8f25c89b63c0fbc79', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "aria-hidden": "true" }, h("path", { key: '7a39bf4eb97bde3d6d81d3db53fea3589af6e8c9', d: "M6 6l12 12M18 6 6 18" })))), h("bs-input", { key: 'b86dc235443e567aede36a767ddc015481ef08fa', part: "search", type: "search", placeholder: this.searchPlaceholder, value: this.query, onBsInput: this.onInput }), this.showSingleKeySwitch && (h("div", { key: '4fe525465a7dbae779af2aa9596669d06a8c7f71', part: "switch", class: "bs-keyboard-shortcuts__switch" }, h("div", { key: '2821019a258b02c2d37679360001cd6ba390d304', class: "bs-keyboard-shortcuts__switch-text" }, h("span", { key: '58f8f4dca914d41ad2b9b8883a117d4b865b4faa', class: "bs-keyboard-shortcuts__switch-title" }, this.singleKeyLabel), h("span", { key: '41cfb03e58e546ed639a38452524b775065f1027', class: "bs-keyboard-shortcuts__switch-caption" }, this.singleKeyDescription)), h("bs-switch", { key: 'a974154d5c9388fc5fa6b4b077f148fbe37340c4', ariaLabel: this.singleKeyLabel, checked: this.singleKeyEnabled, onBsChange: this.onSwitch }))), h("span", { key: '636f5d35847c6bd0dcfc2d0f00b4d126bb764fbc', class: "bs-keyboard-shortcuts__live", "aria-live": "polite" }, `${count} shortcut${count === 1 ? '' : 's'}`), noResults ? (h("p", { part: "empty", class: "bs-keyboard-shortcuts__empty", role: "status" }, this.noResultsText)) : (h("div", { part: "groups", class: "bs-keyboard-shortcuts__groups" }, cols.map(col => (h("div", { class: "bs-keyboard-shortcuts__column" }, col.map(g => {
133
133
  const tid = `${this.id}-g${gi++}`;
134
134
  return (h("div", { part: "group", class: "bs-keyboard-shortcuts__group", role: "group", "aria-labelledby": tid }, h("div", { part: "group-title", id: tid, class: "bs-keyboard-shortcuts__group-title" }, g.title), h("div", { class: "bs-keyboard-shortcuts__rows", role: "list" }, g.shortcuts.map(s => (h("bs-shortcut-row", { part: "row", action: s.action, keys: s.keys, selectionRole: "listitem", disabled: !!s.disabled || (!this.singleKeyEnabled && isSingleKey(s)) }))))));
135
- })))))), this.showFooterHint && (h("div", { key: 'b61974f27c2909fe207e3e604b06ed408516a810', part: "footer", class: "bs-keyboard-shortcuts__footer" }, h("slot", { key: '44c2ddc9cd9e99418ee4edaf030e51f663bee47b', name: "footer" }, h("span", { key: '9679714a84380363982b4d7111bdc424547e4aa8' }, this.footerPrefix), h("bs-key", { key: '2945e09a15994b15753bad68530700020e666968', label: this.footerKey }), h("span", { key: '90fe405d4aeebb0dbd31d291e85dee48c12f6258' }, this.footerText)))))));
135
+ })))))), this.showFooterHint && (h("div", { key: '05833326cdbea5dbb994fd584bc54866c14cf615', part: "footer", class: "bs-keyboard-shortcuts__footer" }, h("slot", { key: 'eeb752068052c3f27cbfa0893f03a22f04328489', name: "footer" }, h("span", { key: '55c95afd62dae51c2b82362210e558fad904f7b7' }, this.footerPrefix), h("bs-key", { key: 'b9f8ef5cd3b3e5e2fce7a99bd2b29d751a764901', label: this.footerKey }), h("span", { key: '13b4719f50cd4d3fadc2802cb22d31f04e775798' }, this.footerText)))))));
136
136
  }
137
137
  static get is() { return "bs-keyboard-shortcuts"; }
138
138
  static get encapsulation() { return "shadow"; }
@@ -97,7 +97,7 @@ export class BsList {
97
97
  enabled[next].focus();
98
98
  }
99
99
  render() {
100
- return (h("div", { key: '82a1f810e0044095794fa797075abb025275a973', part: "list", class: "bs-list", role: this.selectable ? 'listbox' : 'list', "aria-label": this.ariaLabel ?? undefined }, h("slot", { key: '993e3311f2dd6ff26850676df5af426e574f9297', onSlotchange: () => this.sync() })));
100
+ return (h("div", { key: '3483a207be9fb42c6d6c4e2385b3d03e3351b05c', part: "list", class: "bs-list", role: this.selectable ? 'listbox' : 'list', "aria-label": this.ariaLabel ?? undefined }, h("slot", { key: 'cc497c226b4fc18f04121a3aff3fe5e10891bf82', onSlotchange: () => this.sync() })));
101
101
  }
102
102
  static get is() { return "bs-list"; }
103
103
  static get encapsulation() { return "shadow"; }
@@ -101,7 +101,7 @@ export class BsListItem {
101
101
  const role = this.selectionRole === 'option' ? 'option' : this.selectionRole === 'listitem' ? 'listitem' : this.interactive ? 'button' : undefined;
102
102
  const standaloneFocusable = this.interactive && !this.selectionRole && !this.disabled;
103
103
  const showTrailing = this.showArrow || this.hasTrailing;
104
- return (h(Host, { key: '59d3a6773689bc3c4fb99ca0b77ce1092b4ceb5b', role: role, tabindex: standaloneFocusable ? '0' : undefined, "aria-selected": this.selectionRole === 'option' ? String(this.selected) : undefined, "aria-disabled": this.disabled ? 'true' : undefined, class: { 'bs-list-item--interactive': interactive && !this.disabled } }, h("div", { key: 'bbee5cf94e2c79eaf366d086e6fff408c67a76f6', part: "container", class: "bs-list-item" }, h("div", { key: 'df128d2c35849b418e06ee7b7ce7b80264f3b89f', part: "leading", class: { 'bs-list-item__leading': true, 'bs-list-item__leading--has-content': this.hasLeading } }, h("slot", { key: 'c400cac549e869eac94234e7124869f08c20b048', name: "leading", onSlotchange: (e) => (this.hasLeading = this.slotHas(e)) })), h("div", { key: '52238416ca1baa76d4bc86b37047d1c8159f47f3', part: "content", class: "bs-list-item__content" }, !this.hasDefault && this.label && (h("div", { key: 'a71711e9f393238c02a2649aad95ce97cc07e8ce', part: "label", class: "bs-list-item__label" }, this.label)), !this.hasDefault && this.description && (h("div", { key: 'f9a73d15763f95e1b72b1a8bae00851695dbd212', part: "description", class: "bs-list-item__description" }, this.description)), !this.hasDefault && this.supportText && (h("div", { key: 'f122f30aead7789821a8a9c1920ce6714755652f', part: "support-text", class: "bs-list-item__support" }, this.supportText)), h("slot", { key: '675ab1d812dd111ea5797a1f8b84494d5f0188cf', onSlotchange: (e) => (this.hasDefault = this.slotHas(e)) })), h("div", { key: 'd62bd229a2a137a025052f1dbf6b354e52faf491', part: "trailing", class: { 'bs-list-item__trailing': true, 'bs-list-item__trailing--shown': showTrailing } }, h("slot", { key: '2e325bbc97ed61b720e64251f6f2efb10708b60f', name: "trailing", onSlotchange: (e) => (this.hasTrailing = this.slotHas(e)) }, this.showArrow && (h("svg", { key: '5dd8afe5a8dd99cec88ecaf5f537f6c8ca6acf6c', viewBox: "0 0 32 32", width: "32", height: "32", fill: "none", "aria-hidden": "true" }, h("path", { key: '3a9985b0f82f62adf59c52b37459719208e28de4', d: "M12 7L21 16L12 25", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }))))))));
104
+ return (h(Host, { key: 'eac7aeec4fedc05af55c5ca7a78efb693199de3a', role: role, tabindex: standaloneFocusable ? '0' : undefined, "aria-selected": this.selectionRole === 'option' ? String(this.selected) : undefined, "aria-disabled": this.disabled ? 'true' : undefined, class: { 'bs-list-item--interactive': interactive && !this.disabled } }, h("div", { key: '3ba832febb95adfc10481b0b1d70cc4448f0a9dd', part: "container", class: "bs-list-item" }, h("div", { key: 'd528d17243f6185d164c5f6964abe4b1d8143d5b', part: "leading", class: { 'bs-list-item__leading': true, 'bs-list-item__leading--has-content': this.hasLeading } }, h("slot", { key: '60efa1761cc46a7790986689acbada2f99d94add', name: "leading", onSlotchange: (e) => (this.hasLeading = this.slotHas(e)) })), h("div", { key: '4af6ee3b0969aeecdc2ead6b63be52b90927b713', part: "content", class: "bs-list-item__content" }, !this.hasDefault && this.label && (h("div", { key: '57481516f3d3ed73854a58fa870d40d760252b99', part: "label", class: "bs-list-item__label" }, this.label)), !this.hasDefault && this.description && (h("div", { key: 'acb37f4ec42b1c4c49d82cd21a89353a48ff3fcc', part: "description", class: "bs-list-item__description" }, this.description)), !this.hasDefault && this.supportText && (h("div", { key: 'b9e310fd74f06b1114b2ecf64b6c7de8b63a4c61', part: "support-text", class: "bs-list-item__support" }, this.supportText)), h("slot", { key: '7bb751ff77d29cd6f1852c90f5e71f855b222345', onSlotchange: (e) => (this.hasDefault = this.slotHas(e)) })), h("div", { key: '2bf6cb3dedfe1dcf868aba049f3718083ec63830', part: "trailing", class: { 'bs-list-item__trailing': true, 'bs-list-item__trailing--shown': showTrailing } }, h("slot", { key: '5cf7ede0e83b1040210346bdf7e7e6a5c7d06cfd', name: "trailing", onSlotchange: (e) => (this.hasTrailing = this.slotHas(e)) }, this.showArrow && (h("svg", { key: 'fb103f9892eebfd9a481c8d4b60e7504cb19311e', viewBox: "0 0 32 32", width: "32", height: "32", fill: "none", "aria-hidden": "true" }, h("path", { key: 'c33fa8a2aaa5a446adde56c7c8d4bfece8ef1dc9', d: "M12 7L21 16L12 25", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }))))))));
105
105
  }
106
106
  static get is() { return "bs-list-item"; }
107
107
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,131 @@
1
+ import { render, h, describe, it, expect } from "@stencil/vitest";
2
+ import axe from "axe-core";
3
+ import { userEvent } from "vitest/browser";
4
+ import { assertShadowParts, assertCssCustomProperties } from "../../test/helpers/conventions";
5
+ import { COLUMNS, COMPACT_COLUMNS, FEATURED, RECENT } from "./bs-mega-menu.stories";
6
+ const q = (el, s) => el.shadowRoot.querySelector(s);
7
+ const qa = (el, s) => Array.from(el.shadowRoot.querySelectorAll(s));
8
+ const make = async (props = {}) => {
9
+ const r = await render(h("div", { style: { width: '1100px' } }, h("bs-mega-menu", { label: "Sales menu" })));
10
+ const el = r.root.querySelector('bs-mega-menu');
11
+ Object.assign(el, { columns: COLUMNS, recent: RECENT, ...props });
12
+ await r.waitForChanges();
13
+ await new Promise(res => setTimeout(res, 80));
14
+ return { ...r, el };
15
+ };
16
+ describe('bs-mega-menu', () => {
17
+ it('is a labelled navigation with a group per column, real lists, and the parts and custom properties', async () => {
18
+ const { el } = await make();
19
+ const panel = q(el, '[part="panel"]');
20
+ expect(panel.getAttribute('role')).toBe('navigation');
21
+ expect(panel.getAttribute('aria-label')).toBe('Sales menu');
22
+ const groups = qa(el, '[part="column"]');
23
+ expect(groups.length).toBe(3);
24
+ for (const g of groups) {
25
+ expect(g.getAttribute('role')).toBe('group');
26
+ expect(el.shadowRoot.getElementById(g.getAttribute('aria-labelledby')).textContent).toBeTruthy();
27
+ expect(g.querySelector('ul > li > bs-menu-block')).not.toBeNull();
28
+ }
29
+ assertShadowParts(el.shadowRoot, ['panel', 'columns', 'column', 'heading', 'list', 'block', 'footer', 'shortcut']);
30
+ assertCssCustomProperties(el, ['--bs-mega-menu-width', '--bs-mega-menu-shadow', '--bs-mega-menu-heading-color']);
31
+ });
32
+ it('renders the item data: description, badge and icon on menu blocks', async () => {
33
+ const { el } = await make();
34
+ const blocks = qa(el, 'bs-menu-block');
35
+ expect(blocks.length).toBe(6);
36
+ const subs = blocks.find(b => b.name === 'Subscriptions');
37
+ expect(subs.badge).toBe('New');
38
+ expect(subs.description).toBe('Recurring billing for services');
39
+ expect(subs.icon).toContain('data:image/svg+xml');
40
+ });
41
+ it('compact type renders compact blocks only', async () => {
42
+ const { el } = await make({ type: 'compact', columns: COMPACT_COLUMNS });
43
+ expect(qa(el, 'bs-menu-block').length).toBe(0);
44
+ expect(qa(el, 'bs-compact-menu-block').length).toBe(14);
45
+ expect(qa(el, '[part="column"]').length).toBe(4);
46
+ });
47
+ it('gives the featured area its own grid track', async () => {
48
+ const { el, waitForChanges } = await make({ columns: COLUMNS.slice(0, 2) });
49
+ expect(q(el, '[part="featured"]')).toBeNull();
50
+ el.featured = FEATURED;
51
+ await waitForChanges();
52
+ const f = q(el, '[part="featured"]');
53
+ expect(f.textContent).toContain('Smarter payment reminders');
54
+ expect(f.getAttribute('aria-labelledby')).toBe(q(el, '[part="featured-title"]').id);
55
+ const tracks = getComputedStyle(q(el, '[part="columns"]')).gridTemplateColumns.split(' ');
56
+ expect(tracks.length).toBe(3);
57
+ });
58
+ it('shows the recently used line and the shortcut hint, both overridable by slots', async () => {
59
+ const { el } = await make();
60
+ expect(q(el, '[part="footer"]').textContent).toContain('Recently used: Invoices, Sales orders');
61
+ expect(q(el, '[part="footer"]').textContent).toContain('Can’t find it? Press');
62
+ expect(q(el, 'bs-key-caps').keys).toBe('Ctrl+K');
63
+ expect(q(el, 'slot[name="footer-start"]')).not.toBeNull();
64
+ expect(q(el, 'slot[name="footer-end"]')).not.toBeNull();
65
+ expect(q(el, 'slot[name="featured"]')).toBeNull();
66
+ });
67
+ it('fires a cancelable bsMenuSelect with the item, and Escape fires bsClose', async () => {
68
+ const { el } = await make();
69
+ const picked = [];
70
+ el.addEventListener('bsMenuSelect', (e) => {
71
+ picked.push(e.detail.id);
72
+ e.preventDefault();
73
+ });
74
+ let closed = 0;
75
+ el.addEventListener('bsClose', () => closed++);
76
+ qa(el, 'bs-menu-block')[2].shadowRoot.querySelector('button').click();
77
+ expect(picked).toEqual(['invoices']);
78
+ qa(el, 'bs-menu-block')[0].shadowRoot.querySelector('button').focus();
79
+ await userEvent.keyboard('{Escape}');
80
+ expect(closed).toBe(1);
81
+ });
82
+ describe('narrow container', () => {
83
+ const makeAt = async (width, props = {}) => {
84
+ const r = await render(h("div", { style: { width: `${width}px` } }, h("bs-mega-menu", { label: "Sales menu" })));
85
+ const el = r.root.querySelector('bs-mega-menu');
86
+ Object.assign(el, { columns: COLUMNS, recent: RECENT, ...props });
87
+ await r.waitForChanges();
88
+ await new Promise(res => setTimeout(res, 80));
89
+ return el;
90
+ };
91
+ it('is one column, with wrapping text, 44px links, and no shortcut hint below 600px', async () => {
92
+ const el = await makeAt(375, { featured: FEATURED });
93
+ expect(getComputedStyle(q(el, '[part="columns"]')).gridTemplateColumns.split(' ').length).toBe(1);
94
+ const cols = qa(el, '[part="column"]').map(c => c.getBoundingClientRect());
95
+ expect(cols[1].top).toBeGreaterThanOrEqual(cols[0].bottom);
96
+ expect(q(el, '[part="featured"]').getBoundingClientRect().top).toBeGreaterThanOrEqual(cols[cols.length - 1].bottom);
97
+ qa(el, 'bs-menu-block').forEach(b => expect(b.getBoundingClientRect().height).toBeGreaterThanOrEqual(44));
98
+ expect(getComputedStyle(qa(el, 'bs-menu-block')[0].shadowRoot.querySelector('.bs-menu-block__name')).whiteSpace).toBe('normal');
99
+ expect(getComputedStyle(q(el, '.bs-mega-menu__shortcut')).display).toBe('none');
100
+ expect(q(el, '[part="footer"]').textContent).toContain('Recently used');
101
+ expect(el.getBoundingClientRect().width).toBe(375);
102
+ });
103
+ it('makes compact links at least 44px tall', async () => {
104
+ const el = await makeAt(375, { type: 'compact', columns: COMPACT_COLUMNS });
105
+ qa(el, 'bs-compact-menu-block').forEach(b => expect(b.getBoundingClientRect().height).toBeGreaterThanOrEqual(44));
106
+ });
107
+ it('keeps the multi-column layout and the shortcut hint at 600px and wider', async () => {
108
+ const wide = await makeAt(600);
109
+ expect(getComputedStyle(q(wide, '[part="columns"]')).gridTemplateColumns.split(' ').length).toBe(3);
110
+ expect(getComputedStyle(q(wide, '.bs-mega-menu__shortcut')).display).not.toBe('none');
111
+ });
112
+ it('has no axe violations when narrow', async () => {
113
+ const el = await makeAt(375, { featured: FEATURED });
114
+ const results = await axe.run(el);
115
+ expect(results.violations.map(v => `${v.id}: ${v.help}`)).toEqual([]);
116
+ });
117
+ });
118
+ it('is hidden with the hidden attribute', async () => {
119
+ const { el, waitForChanges } = await make();
120
+ el.hidden = true;
121
+ await waitForChanges();
122
+ expect(getComputedStyle(el).display).toBe('none');
123
+ });
124
+ it('has no axe violations in any type', async () => {
125
+ for (const props of [{}, { featured: FEATURED, columns: COLUMNS.slice(0, 2) }, { type: 'compact', columns: COMPACT_COLUMNS }, { type: 'compact', columns: COMPACT_COLUMNS.slice(0, 3), featured: FEATURED }]) {
126
+ const { el } = await make(props);
127
+ const results = await axe.run(el);
128
+ expect(results.violations.map(v => `${v.id}: ${v.help}`)).toEqual([]);
129
+ }
130
+ });
131
+ });