@brandsync/wc 1.16.0 → 1.17.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 (451) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/REFERENCE.md +231 -0
  3. package/custom-elements.json +3902 -1547
  4. package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
  5. package/dist/brandsync-wc/{p-0228a584.entry.js → p-044ac86c.entry.js} +1 -1
  6. package/dist/brandsync-wc/p-065c7e7c.entry.js +1 -0
  7. package/dist/brandsync-wc/{p-e9afb553.entry.js → p-07673a48.entry.js} +1 -1
  8. package/dist/brandsync-wc/{p-54f9529f.entry.js → p-08e96f13.entry.js} +1 -1
  9. package/dist/brandsync-wc/{p-f3cc961b.entry.js → p-0bbaef51.entry.js} +1 -1
  10. package/dist/brandsync-wc/p-11d80e17.entry.js +1 -0
  11. package/dist/brandsync-wc/{p-c85fe37b.entry.js → p-1bd99669.entry.js} +1 -1
  12. package/dist/brandsync-wc/{p-f4d1d56e.entry.js → p-225148be.entry.js} +1 -1
  13. package/dist/brandsync-wc/{p-15f4c343.entry.js → p-2bd30709.entry.js} +1 -1
  14. package/dist/brandsync-wc/{p-76748795.entry.js → p-32297416.entry.js} +1 -1
  15. package/dist/brandsync-wc/{p-d165a742.entry.js → p-35f76ea7.entry.js} +1 -1
  16. package/dist/brandsync-wc/{p-4ca40386.entry.js → p-3bad5e1b.entry.js} +1 -1
  17. package/dist/brandsync-wc/{p-ed71eb02.entry.js → p-3bdeeb9d.entry.js} +1 -1
  18. package/dist/brandsync-wc/{p-67629178.entry.js → p-3c6ec5d0.entry.js} +1 -1
  19. package/dist/brandsync-wc/{p-abfa43f5.entry.js → p-3cb79512.entry.js} +1 -1
  20. package/dist/brandsync-wc/p-3d2c62a6.entry.js +1 -0
  21. package/dist/brandsync-wc/{p-23379d7c.entry.js → p-3d7b0708.entry.js} +1 -1
  22. package/dist/brandsync-wc/{p-2e285364.entry.js → p-43d5f708.entry.js} +1 -1
  23. package/dist/brandsync-wc/{p-d81c4f58.entry.js → p-4b460eda.entry.js} +1 -1
  24. package/dist/brandsync-wc/{p-b6081bba.entry.js → p-4eaa9ed4.entry.js} +1 -1
  25. package/dist/brandsync-wc/{p-c25553bc.entry.js → p-4f4c0c68.entry.js} +1 -1
  26. package/dist/brandsync-wc/{p-a56bc608.entry.js → p-5057e4fe.entry.js} +1 -1
  27. package/dist/brandsync-wc/p-54d91ac9.entry.js +1 -0
  28. package/dist/brandsync-wc/{p-65fa1b21.entry.js → p-57ff14ca.entry.js} +1 -1
  29. package/dist/brandsync-wc/{p-538d5b58.entry.js → p-5b933ff4.entry.js} +1 -1
  30. package/dist/brandsync-wc/{p-b67a0c8f.entry.js → p-5c61eb06.entry.js} +1 -1
  31. package/dist/brandsync-wc/{p-86774165.entry.js → p-5eb5795f.entry.js} +1 -1
  32. package/dist/brandsync-wc/{p-b663ee67.entry.js → p-61deb48c.entry.js} +1 -1
  33. package/dist/brandsync-wc/{p-cc4c8c1d.entry.js → p-67f125e8.entry.js} +1 -1
  34. package/dist/brandsync-wc/{p-3488c4fc.entry.js → p-6ea02b98.entry.js} +1 -1
  35. package/dist/brandsync-wc/p-70c650b2.entry.js +1 -0
  36. package/dist/brandsync-wc/{p-949a4270.entry.js → p-79fc849c.entry.js} +1 -1
  37. package/dist/brandsync-wc/{p-5a45ef51.entry.js → p-7ed071fb.entry.js} +1 -1
  38. package/dist/brandsync-wc/{p-298158da.entry.js → p-8134f97c.entry.js} +1 -1
  39. package/dist/brandsync-wc/{p-4ed00786.entry.js → p-844205d9.entry.js} +1 -1
  40. package/dist/brandsync-wc/p-84d6d6eb.entry.js +1 -0
  41. package/dist/brandsync-wc/{p-401b3d3d.entry.js → p-857987f9.entry.js} +1 -1
  42. package/dist/brandsync-wc/{p-b9c9bcba.entry.js → p-8c4dfccb.entry.js} +1 -1
  43. package/dist/brandsync-wc/{p-38ac9aad.entry.js → p-90ba3032.entry.js} +1 -1
  44. package/dist/brandsync-wc/{p-1ca8b01e.entry.js → p-9396c67e.entry.js} +1 -1
  45. package/dist/brandsync-wc/{p-e9b6b30f.entry.js → p-9d740928.entry.js} +1 -1
  46. package/dist/brandsync-wc/{p-baa3d37a.entry.js → p-a7fa839a.entry.js} +1 -1
  47. package/dist/brandsync-wc/{p-f271e1d2.entry.js → p-a7fb0b59.entry.js} +1 -1
  48. package/dist/brandsync-wc/{p-89ea6366.entry.js → p-ab14a07d.entry.js} +1 -1
  49. package/dist/brandsync-wc/{p-912629c6.entry.js → p-aec2dfeb.entry.js} +1 -1
  50. package/dist/brandsync-wc/{p-8390a155.entry.js → p-b02bf1ca.entry.js} +1 -1
  51. package/dist/brandsync-wc/{p-9beeb30c.entry.js → p-b142d8c9.entry.js} +1 -1
  52. package/dist/brandsync-wc/{p-a12691d8.entry.js → p-b4511ad3.entry.js} +1 -1
  53. package/dist/brandsync-wc/{p-5ed1f45e.entry.js → p-b5710db6.entry.js} +1 -1
  54. package/dist/brandsync-wc/{p-34b0c048.entry.js → p-baa39c08.entry.js} +1 -1
  55. package/dist/brandsync-wc/{p-0159f0da.entry.js → p-be7aac52.entry.js} +1 -1
  56. package/dist/brandsync-wc/p-c835afb7.entry.js +1 -0
  57. package/dist/brandsync-wc/{p-45986ad4.entry.js → p-d25adab2.entry.js} +1 -1
  58. package/dist/brandsync-wc/p-d2a15599.entry.js +1 -0
  59. package/dist/brandsync-wc/{p-521d0fc2.entry.js → p-d7956c51.entry.js} +1 -1
  60. package/dist/brandsync-wc/p-d9184940.entry.js +1 -0
  61. package/dist/brandsync-wc/{p-0f97fe35.entry.js → p-dcbeb143.entry.js} +1 -1
  62. package/dist/brandsync-wc/{p-cf287ff1.entry.js → p-debc83cc.entry.js} +1 -1
  63. package/dist/brandsync-wc/{p-dcacee29.entry.js → p-e0a9f2d1.entry.js} +1 -1
  64. package/dist/brandsync-wc/p-e123b391.entry.js +1 -0
  65. package/dist/brandsync-wc/{p-7dc59e0b.entry.js → p-e8ae626d.entry.js} +1 -1
  66. package/dist/brandsync-wc/p-e8e22238.entry.js +1 -0
  67. package/dist/brandsync-wc/{p-6cb21302.entry.js → p-eb0dc5bf.entry.js} +1 -1
  68. package/dist/brandsync-wc/{p-38fe9d07.entry.js → p-f43a7f16.entry.js} +1 -1
  69. package/dist/brandsync-wc/{p-7b3518b8.entry.js → p-f82a9f0d.entry.js} +1 -1
  70. package/dist/brandsync-wc/{p-f0be9125.entry.js → p-f98dfa85.entry.js} +1 -1
  71. package/dist/brandsync-wc/{p-36fe783a.entry.js → p-fdc168ec.entry.js} +1 -1
  72. package/dist/brandsync-wc/{p-42b79d95.entry.js → p-ffccc1ee.entry.js} +1 -1
  73. package/dist/cjs/brandsync-wc.cjs.js +1 -1
  74. package/dist/cjs/bs-accordion-group.cjs.entry.js +1 -1
  75. package/dist/cjs/bs-ai-disclaimer.cjs.entry.js +1 -1
  76. package/dist/cjs/bs-ai-greeting.cjs.entry.js +1 -1
  77. package/dist/cjs/bs-ai-thinking.cjs.entry.js +1 -1
  78. package/dist/cjs/bs-app-shell.cjs.entry.js +1 -1
  79. package/dist/cjs/bs-attachment-list.cjs.entry.js +1 -1
  80. package/dist/cjs/bs-breadcrumbs.cjs.entry.js +1 -1
  81. package/dist/cjs/bs-button-skeleton.cjs.entry.js +1 -1
  82. package/dist/cjs/bs-chatbot-feedback.cjs.entry.js +1 -1
  83. package/dist/cjs/bs-chatbot-header.cjs.entry.js +1 -1
  84. package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +1 -1
  85. package/dist/cjs/bs-chatbot-sources-drawer.cjs.entry.js +1 -1
  86. package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +1 -1
  87. package/dist/cjs/bs-checkbox-skeleton.cjs.entry.js +1 -1
  88. package/dist/cjs/bs-citation-preview.cjs.entry.js +1 -1
  89. package/dist/cjs/bs-command-palette.cjs.entry.js +374 -0
  90. package/dist/cjs/bs-composer-status-banner.cjs.entry.js +1 -1
  91. package/dist/cjs/bs-composer.cjs.entry.js +1 -1
  92. package/dist/cjs/bs-container.cjs.entry.js +1 -1
  93. package/dist/cjs/bs-data-table.cjs.entry.js +2 -2
  94. package/dist/cjs/bs-datepicker.cjs.entry.js +1 -1
  95. package/dist/cjs/bs-divider.cjs.entry.js +1 -1
  96. package/dist/cjs/bs-empty-state.cjs.entry.js +47 -0
  97. package/dist/cjs/bs-error-page.cjs.entry.js +1 -1
  98. package/dist/cjs/bs-file-upload-item.cjs.entry.js +1 -1
  99. package/dist/cjs/bs-file-upload.cjs.entry.js +1 -1
  100. package/dist/cjs/bs-global-search.cjs.entry.js +326 -0
  101. package/dist/cjs/bs-grid.cjs.entry.js +2 -2
  102. package/dist/cjs/bs-icon-button.cjs.entry.js +1 -1
  103. package/dist/cjs/bs-icon-tile.cjs.entry.js +2 -2
  104. package/dist/cjs/bs-inline-tab.cjs.entry.js +1 -1
  105. package/dist/cjs/bs-input_3.cjs.entry.js +4 -4
  106. package/dist/cjs/bs-key-caps.cjs.entry.js +39 -0
  107. package/dist/cjs/bs-key.cjs.entry.js +28 -0
  108. package/dist/cjs/bs-keyboard-shortcuts.cjs.entry.js +112 -0
  109. package/dist/cjs/bs-list-item.cjs.entry.js +1 -1
  110. package/dist/cjs/bs-list.cjs.entry.js +1 -1
  111. package/dist/cjs/bs-message-list.cjs.entry.js +1 -1
  112. package/dist/cjs/bs-message.cjs.entry.js +1 -1
  113. package/dist/cjs/bs-navigation-drawer-item.cjs.entry.js +1 -1
  114. package/dist/cjs/bs-navigation-drawer.cjs.entry.js +2 -2
  115. package/dist/cjs/bs-navigation-header.cjs.entry.js +1 -1
  116. package/dist/cjs/bs-pagination.cjs.entry.js +1 -1
  117. package/dist/cjs/bs-popover.cjs.entry.js +1 -1
  118. package/dist/cjs/bs-progress-linear.cjs.entry.js +2 -2
  119. package/dist/cjs/bs-progress.cjs.entry.js +2 -2
  120. package/dist/cjs/bs-qr-code.cjs.entry.js +1 -1
  121. package/dist/cjs/bs-radio.cjs.entry.js +1 -1
  122. package/dist/cjs/bs-search-item.cjs.entry.js +47 -0
  123. package/dist/cjs/bs-session-timeout.cjs.entry.js +1 -1
  124. package/dist/cjs/bs-shortcut-row.cjs.entry.js +27 -0
  125. package/dist/cjs/bs-skeleton.cjs.entry.js +1 -1
  126. package/dist/cjs/bs-slider.cjs.entry.js +1 -1
  127. package/dist/cjs/bs-snackbar.cjs.entry.js +1 -1
  128. package/dist/cjs/bs-source-link.cjs.entry.js +2 -2
  129. package/dist/cjs/bs-spinner.cjs.entry.js +1 -1
  130. package/dist/cjs/bs-split-pane.cjs.entry.js +1 -1
  131. package/dist/cjs/bs-stack.cjs.entry.js +1 -1
  132. package/dist/cjs/bs-stepper-step.cjs.entry.js +1 -1
  133. package/dist/cjs/bs-stepper.cjs.entry.js +1 -1
  134. package/dist/cjs/bs-switch.cjs.entry.js +1 -1
  135. package/dist/cjs/bs-tab_3.cjs.entry.js +3 -3
  136. package/dist/cjs/bs-timepicker.cjs.entry.js +2 -2
  137. package/dist/cjs/bs-toast.cjs.entry.js +1 -1
  138. package/dist/cjs/bs-tooltip-trigger.cjs.entry.js +1 -1
  139. package/dist/cjs/bs-tooltip.cjs.entry.js +1 -1
  140. package/dist/cjs/bs-tree-item.cjs.entry.js +2 -2
  141. package/dist/cjs/bs-tree.cjs.entry.js +1 -1
  142. package/dist/cjs/loader.cjs.js +1 -1
  143. package/dist/collection/collection-manifest.json +9 -1
  144. package/dist/collection/components/bs-accordion-group/bs-accordion-group.js +1 -1
  145. package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.js +1 -1
  146. package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.js +1 -1
  147. package/dist/collection/components/bs-ai-thinking/bs-ai-thinking.js +1 -1
  148. package/dist/collection/components/bs-app-shell/bs-app-shell.js +1 -1
  149. package/dist/collection/components/bs-attachment-list/bs-attachment-list.js +1 -1
  150. package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.js +1 -1
  151. package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.js +1 -1
  152. package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +1 -1
  153. package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.js +1 -1
  154. package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +1 -1
  155. package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +1 -1
  156. package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.js +1 -1
  157. package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js +1 -1
  158. package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.js +1 -1
  159. package/dist/collection/components/bs-citation-preview/bs-citation-preview.js +1 -1
  160. package/dist/collection/components/bs-command-palette/bs-command-palette.cmp.test.js +207 -0
  161. package/dist/collection/components/bs-command-palette/bs-command-palette.css +214 -0
  162. package/dist/collection/components/bs-command-palette/bs-command-palette.js +1114 -0
  163. package/dist/collection/components/bs-command-palette/bs-command-palette.stories.js +194 -0
  164. package/dist/collection/components/bs-composer/bs-composer.js +1 -1
  165. package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.js +1 -1
  166. package/dist/collection/components/bs-container/bs-container.js +1 -1
  167. package/dist/collection/components/bs-data-table/bs-data-table.js +2 -2
  168. package/dist/collection/components/bs-datepicker/bs-datepicker.js +1 -1
  169. package/dist/collection/components/bs-divider/bs-divider.js +1 -1
  170. package/dist/collection/components/bs-empty-state/bs-empty-state.cmp.test.js +102 -0
  171. package/dist/collection/components/bs-empty-state/bs-empty-state.css +45 -0
  172. package/dist/collection/components/bs-empty-state/bs-empty-state.js +175 -0
  173. package/dist/collection/components/bs-empty-state/bs-empty-state.stories.js +52 -0
  174. package/dist/collection/components/bs-error-page/bs-error-page.js +1 -1
  175. package/dist/collection/components/bs-file-upload/bs-file-upload.js +1 -1
  176. package/dist/collection/components/bs-file-upload-item/bs-file-upload-item.js +1 -1
  177. package/dist/collection/components/bs-global-search/bs-global-search.cmp.test.js +491 -0
  178. package/dist/collection/components/bs-global-search/bs-global-search.css +115 -0
  179. package/dist/collection/components/bs-global-search/bs-global-search.js +1024 -0
  180. package/dist/collection/components/bs-global-search/bs-global-search.stories.js +146 -0
  181. package/dist/collection/components/bs-grid/bs-grid.js +2 -2
  182. package/dist/collection/components/bs-icon-tile/bs-icon-tile.js +2 -2
  183. package/dist/collection/components/bs-input/bs-input.js +2 -2
  184. package/dist/collection/components/bs-key/bs-key.cmp.test.js +59 -0
  185. package/dist/collection/components/bs-key/bs-key.css +58 -0
  186. package/dist/collection/components/bs-key/bs-key.js +84 -0
  187. package/dist/collection/components/bs-key/bs-key.stories.js +19 -0
  188. package/dist/collection/components/bs-key-caps/bs-key-caps.cmp.test.js +60 -0
  189. package/dist/collection/components/bs-key-caps/bs-key-caps.css +28 -0
  190. package/dist/collection/components/bs-key-caps/bs-key-caps.js +120 -0
  191. package/dist/collection/components/bs-key-caps/bs-key-caps.stories.js +29 -0
  192. package/dist/collection/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.cmp.test.js +194 -0
  193. package/dist/collection/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.css +138 -0
  194. package/dist/collection/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.js +485 -0
  195. package/dist/collection/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.stories.js +111 -0
  196. package/dist/collection/components/bs-list/bs-list.js +1 -1
  197. package/dist/collection/components/bs-list-item/bs-list-item.js +1 -1
  198. package/dist/collection/components/bs-menu/bs-menu.js +1 -1
  199. package/dist/collection/components/bs-menu-item/bs-menu-item.js +1 -1
  200. package/dist/collection/components/bs-message/bs-message.js +1 -1
  201. package/dist/collection/components/bs-message-list/bs-message-list.js +1 -1
  202. package/dist/collection/components/bs-pagination/bs-pagination.js +1 -1
  203. package/dist/collection/components/bs-popover/bs-popover.js +1 -1
  204. package/dist/collection/components/bs-progress/bs-progress.js +2 -2
  205. package/dist/collection/components/bs-progress-linear/bs-progress-linear.js +2 -2
  206. package/dist/collection/components/bs-qr-code/bs-qr-code.js +1 -1
  207. package/dist/collection/components/bs-radio/bs-radio.js +1 -1
  208. package/dist/collection/components/bs-search-item/bs-search-item.cmp.test.js +147 -0
  209. package/dist/collection/components/bs-search-item/bs-search-item.css +112 -0
  210. package/dist/collection/components/bs-search-item/bs-search-item.js +222 -0
  211. package/dist/collection/components/bs-search-item/bs-search-item.stories.js +31 -0
  212. package/dist/collection/components/bs-session-timeout/bs-session-timeout.js +1 -1
  213. package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.cmp.test.js +60 -0
  214. package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.css +42 -0
  215. package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.js +154 -0
  216. package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.stories.js +24 -0
  217. package/dist/collection/components/bs-skeleton/bs-skeleton.js +1 -1
  218. package/dist/collection/components/bs-slider/bs-slider.js +1 -1
  219. package/dist/collection/components/bs-snackbar/bs-snackbar.js +1 -1
  220. package/dist/collection/components/bs-source-link/bs-source-link.js +2 -2
  221. package/dist/collection/components/bs-spinner/bs-spinner.js +1 -1
  222. package/dist/collection/components/bs-split-pane/bs-split-pane.js +1 -1
  223. package/dist/collection/components/bs-stack/bs-stack.js +1 -1
  224. package/dist/collection/components/bs-stepper/bs-stepper/bs-stepper.js +1 -1
  225. package/dist/collection/components/bs-stepper/bs-stepper-step/bs-stepper-step.js +1 -1
  226. package/dist/collection/components/bs-switch/bs-switch.js +1 -1
  227. package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +1 -1
  228. package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +1 -1
  229. package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +1 -1
  230. package/dist/collection/components/bs-timepicker/bs-timepicker.js +2 -2
  231. package/dist/collection/components/bs-toast/bs-toast.js +1 -1
  232. package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
  233. package/dist/collection/components/bs-tooltip-trigger/bs-tooltip-trigger.js +1 -1
  234. package/dist/collection/components/bs-tree/bs-tree.js +1 -1
  235. package/dist/collection/components/bs-tree-item/bs-tree-item.js +2 -2
  236. package/dist/collection/components/bs-whats-new-entry/bs-whats-new-entry.js +1 -1
  237. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.js +2 -2
  238. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.js +1 -1
  239. package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.js +1 -1
  240. package/dist/components/bs-accordion-group.js +1 -1
  241. package/dist/components/bs-ai-disclaimer.js +1 -1
  242. package/dist/components/bs-ai-greeting.js +1 -1
  243. package/dist/components/bs-ai-thinking.js +1 -1
  244. package/dist/components/bs-app-shell.js +1 -1
  245. package/dist/components/bs-attachment-list.js +1 -1
  246. package/dist/components/bs-attachment.js +1 -1
  247. package/dist/components/bs-breadcrumb-overflow.js +1 -1
  248. package/dist/components/bs-breadcrumbs.js +1 -1
  249. package/dist/components/bs-button-skeleton.js +1 -1
  250. package/dist/components/bs-carousel.js +1 -1
  251. package/dist/components/bs-chatbot-feedback.js +1 -1
  252. package/dist/components/bs-chatbot-header.js +1 -1
  253. package/dist/components/bs-chatbot-response-action.js +1 -1
  254. package/dist/components/bs-chatbot-sources-drawer.js +1 -1
  255. package/dist/components/bs-chatbot-suggestion-button.js +1 -1
  256. package/dist/components/bs-checkbox-skeleton.js +1 -1
  257. package/dist/components/bs-citation-preview.js +1 -1
  258. package/dist/components/bs-command-palette.d.ts +11 -0
  259. package/dist/components/bs-command-palette.js +1 -0
  260. package/dist/components/bs-composer-status-banner.js +1 -1
  261. package/dist/components/bs-composer.js +1 -1
  262. package/dist/components/bs-container.js +1 -1
  263. package/dist/components/bs-cookie-consent.js +1 -1
  264. package/dist/components/bs-data-table.js +1 -1
  265. package/dist/components/bs-datepicker.js +1 -1
  266. package/dist/components/bs-dialog.js +1 -1
  267. package/dist/components/bs-divider.js +1 -1
  268. package/dist/components/bs-empty-state.d.ts +11 -0
  269. package/dist/components/bs-empty-state.js +1 -0
  270. package/dist/components/bs-error-page.js +1 -1
  271. package/dist/components/bs-file-upload-item.js +1 -1
  272. package/dist/components/bs-file-upload.js +1 -1
  273. package/dist/components/bs-global-search.d.ts +11 -0
  274. package/dist/components/bs-global-search.js +1 -0
  275. package/dist/components/bs-grid.js +1 -1
  276. package/dist/components/bs-icon-button.js +1 -1
  277. package/dist/components/bs-icon-tile.js +1 -1
  278. package/dist/components/bs-inline-tab.js +1 -1
  279. package/dist/components/bs-input.js +1 -1
  280. package/dist/components/bs-key-caps.d.ts +11 -0
  281. package/dist/components/bs-key-caps.js +1 -0
  282. package/dist/components/bs-key.d.ts +11 -0
  283. package/dist/components/bs-key.js +1 -0
  284. package/dist/components/bs-keyboard-shortcuts.d.ts +11 -0
  285. package/dist/components/bs-keyboard-shortcuts.js +1 -0
  286. package/dist/components/bs-list-item.js +1 -1
  287. package/dist/components/bs-list.js +1 -1
  288. package/dist/components/bs-menu-item.js +1 -1
  289. package/dist/components/bs-menu.js +1 -1
  290. package/dist/components/bs-message-list.js +1 -1
  291. package/dist/components/bs-message.js +1 -1
  292. package/dist/components/bs-navigation-drawer-item.js +1 -1
  293. package/dist/components/bs-navigation-drawer.js +1 -1
  294. package/dist/components/bs-navigation-header.js +1 -1
  295. package/dist/components/bs-onboarding-checklist.js +1 -1
  296. package/dist/components/bs-pagination.js +1 -1
  297. package/dist/components/bs-popover.js +1 -1
  298. package/dist/components/bs-product-tour.js +1 -1
  299. package/dist/components/bs-progress-linear.js +1 -1
  300. package/dist/components/bs-progress.js +1 -1
  301. package/dist/components/bs-qr-code.js +1 -1
  302. package/dist/components/bs-radio.js +1 -1
  303. package/dist/components/bs-search-item.d.ts +11 -0
  304. package/dist/components/bs-search-item.js +1 -0
  305. package/dist/components/bs-session-timeout.js +1 -1
  306. package/dist/components/bs-shortcut-row.d.ts +11 -0
  307. package/dist/components/bs-shortcut-row.js +1 -0
  308. package/dist/components/bs-side-panel.js +1 -1
  309. package/dist/components/bs-skeleton.js +1 -1
  310. package/dist/components/bs-slider.js +1 -1
  311. package/dist/components/bs-snackbar.js +1 -1
  312. package/dist/components/bs-source-link.js +1 -1
  313. package/dist/components/bs-spinner.js +1 -1
  314. package/dist/components/bs-split-pane.js +1 -1
  315. package/dist/components/bs-stack.js +1 -1
  316. package/dist/components/bs-stepper-step.js +1 -1
  317. package/dist/components/bs-stepper.js +1 -1
  318. package/dist/components/bs-switch.js +1 -1
  319. package/dist/components/bs-tab.js +1 -1
  320. package/dist/components/bs-tabs.js +1 -1
  321. package/dist/components/bs-timepicker.js +1 -1
  322. package/dist/components/bs-toast.js +1 -1
  323. package/dist/components/bs-tooltip-trigger.js +1 -1
  324. package/dist/components/bs-tooltip.js +1 -1
  325. package/dist/components/bs-tree-item.js +1 -1
  326. package/dist/components/bs-tree.js +1 -1
  327. package/dist/components/bs-whats-new-entry.js +1 -1
  328. package/dist/components/bs-whats-new.js +1 -1
  329. package/dist/components/{p-GTDI4Ibw.js → p-B32Kl4IB.js} +1 -1
  330. package/dist/components/{p-B128GX8H.js → p-BDnZvjlq.js} +1 -1
  331. package/dist/components/{p-BdkE4auv.js → p-BUpnOUIM.js} +1 -1
  332. package/dist/components/p-BcYNrEOB.js +1 -0
  333. package/dist/components/{p-B80vOwH6.js → p-BcbaiZLh.js} +1 -1
  334. package/dist/components/p-Bp3DIxjT.js +1 -0
  335. package/dist/components/p-CH5atin4.js +1 -0
  336. package/dist/components/{p-kDJsWjTN.js → p-CRM1wIX9.js} +1 -1
  337. package/dist/components/p-CYzBTzzf.js +1 -0
  338. package/dist/components/p-CervX0wH.js +1 -0
  339. package/dist/components/{p-C93ymWm7.js → p-Cpe2k7ZC.js} +1 -1
  340. package/dist/components/{p-Bb1-2M8K.js → p-D7AXo5NT.js} +1 -1
  341. package/dist/components/{p-J9cxcDhY.js → p-D8bvv9QQ.js} +1 -1
  342. package/dist/components/{p-DFKc3lLA.js → p-DG9eT5yi.js} +1 -1
  343. package/dist/components/{p-D0KM1R2i.js → p-DMLfXpva.js} +1 -1
  344. package/dist/components/{p-CQjSDdH7.js → p-DYDk73TF.js} +1 -1
  345. package/dist/components/{p-C7RZ6qZC.js → p-DcjgRtSQ.js} +1 -1
  346. package/dist/components/p-Dt4JNhHT.js +1 -0
  347. package/dist/components/{p-CK7fiES5.js → p-DtYTs9Kh.js} +1 -1
  348. package/dist/components/{p-BsbtyRJV.js → p-TAY9S9yG.js} +1 -1
  349. package/dist/components/{p-ByLUtXxO.js → p-w-DkdA4O.js} +1 -1
  350. package/dist/esm/brandsync-wc.js +1 -1
  351. package/dist/esm/bs-accordion-group.entry.js +1 -1
  352. package/dist/esm/bs-ai-disclaimer.entry.js +1 -1
  353. package/dist/esm/bs-ai-greeting.entry.js +1 -1
  354. package/dist/esm/bs-ai-thinking.entry.js +1 -1
  355. package/dist/esm/bs-app-shell.entry.js +1 -1
  356. package/dist/esm/bs-attachment-list.entry.js +1 -1
  357. package/dist/esm/bs-breadcrumbs.entry.js +1 -1
  358. package/dist/esm/bs-button-skeleton.entry.js +1 -1
  359. package/dist/esm/bs-chatbot-feedback.entry.js +1 -1
  360. package/dist/esm/bs-chatbot-header.entry.js +1 -1
  361. package/dist/esm/bs-chatbot-response-action.entry.js +1 -1
  362. package/dist/esm/bs-chatbot-sources-drawer.entry.js +1 -1
  363. package/dist/esm/bs-chatbot-suggestion-button.entry.js +1 -1
  364. package/dist/esm/bs-checkbox-skeleton.entry.js +1 -1
  365. package/dist/esm/bs-citation-preview.entry.js +1 -1
  366. package/dist/esm/bs-command-palette.entry.js +372 -0
  367. package/dist/esm/bs-composer-status-banner.entry.js +1 -1
  368. package/dist/esm/bs-composer.entry.js +1 -1
  369. package/dist/esm/bs-container.entry.js +1 -1
  370. package/dist/esm/bs-data-table.entry.js +2 -2
  371. package/dist/esm/bs-datepicker.entry.js +1 -1
  372. package/dist/esm/bs-divider.entry.js +1 -1
  373. package/dist/esm/bs-empty-state.entry.js +45 -0
  374. package/dist/esm/bs-error-page.entry.js +1 -1
  375. package/dist/esm/bs-file-upload-item.entry.js +1 -1
  376. package/dist/esm/bs-file-upload.entry.js +1 -1
  377. package/dist/esm/bs-global-search.entry.js +324 -0
  378. package/dist/esm/bs-grid.entry.js +2 -2
  379. package/dist/esm/bs-icon-button.entry.js +1 -1
  380. package/dist/esm/bs-icon-tile.entry.js +2 -2
  381. package/dist/esm/bs-inline-tab.entry.js +1 -1
  382. package/dist/esm/bs-input_3.entry.js +4 -4
  383. package/dist/esm/bs-key-caps.entry.js +37 -0
  384. package/dist/esm/bs-key.entry.js +26 -0
  385. package/dist/esm/bs-keyboard-shortcuts.entry.js +110 -0
  386. package/dist/esm/bs-list-item.entry.js +1 -1
  387. package/dist/esm/bs-list.entry.js +1 -1
  388. package/dist/esm/bs-message-list.entry.js +1 -1
  389. package/dist/esm/bs-message.entry.js +1 -1
  390. package/dist/esm/bs-navigation-drawer-item.entry.js +1 -1
  391. package/dist/esm/bs-navigation-drawer.entry.js +2 -2
  392. package/dist/esm/bs-navigation-header.entry.js +1 -1
  393. package/dist/esm/bs-pagination.entry.js +1 -1
  394. package/dist/esm/bs-popover.entry.js +1 -1
  395. package/dist/esm/bs-progress-linear.entry.js +2 -2
  396. package/dist/esm/bs-progress.entry.js +2 -2
  397. package/dist/esm/bs-qr-code.entry.js +1 -1
  398. package/dist/esm/bs-radio.entry.js +1 -1
  399. package/dist/esm/bs-search-item.entry.js +45 -0
  400. package/dist/esm/bs-session-timeout.entry.js +1 -1
  401. package/dist/esm/bs-shortcut-row.entry.js +25 -0
  402. package/dist/esm/bs-skeleton.entry.js +1 -1
  403. package/dist/esm/bs-slider.entry.js +1 -1
  404. package/dist/esm/bs-snackbar.entry.js +1 -1
  405. package/dist/esm/bs-source-link.entry.js +2 -2
  406. package/dist/esm/bs-spinner.entry.js +1 -1
  407. package/dist/esm/bs-split-pane.entry.js +1 -1
  408. package/dist/esm/bs-stack.entry.js +1 -1
  409. package/dist/esm/bs-stepper-step.entry.js +1 -1
  410. package/dist/esm/bs-stepper.entry.js +1 -1
  411. package/dist/esm/bs-switch.entry.js +1 -1
  412. package/dist/esm/bs-tab_3.entry.js +3 -3
  413. package/dist/esm/bs-timepicker.entry.js +2 -2
  414. package/dist/esm/bs-toast.entry.js +1 -1
  415. package/dist/esm/bs-tooltip-trigger.entry.js +1 -1
  416. package/dist/esm/bs-tooltip.entry.js +1 -1
  417. package/dist/esm/bs-tree-item.entry.js +2 -2
  418. package/dist/esm/bs-tree.entry.js +1 -1
  419. package/dist/esm/loader.js +1 -1
  420. package/dist/types/components/bs-command-palette/bs-command-palette.cmp.test.d.ts +1 -0
  421. package/dist/types/components/bs-command-palette/bs-command-palette.d.ts +172 -0
  422. package/dist/types/components/bs-command-palette/bs-command-palette.stories.d.ts +56 -0
  423. package/dist/types/components/bs-empty-state/bs-empty-state.cmp.test.d.ts +1 -0
  424. package/dist/types/components/bs-empty-state/bs-empty-state.d.ts +50 -0
  425. package/dist/types/components/bs-empty-state/bs-empty-state.stories.d.ts +13 -0
  426. package/dist/types/components/bs-global-search/bs-global-search.cmp.test.d.ts +1 -0
  427. package/dist/types/components/bs-global-search/bs-global-search.d.ts +166 -0
  428. package/dist/types/components/bs-global-search/bs-global-search.stories.d.ts +61 -0
  429. package/dist/types/components/bs-key/bs-key.cmp.test.d.ts +1 -0
  430. package/dist/types/components/bs-key/bs-key.d.ts +36 -0
  431. package/dist/types/components/bs-key/bs-key.stories.d.ts +11 -0
  432. package/dist/types/components/bs-key-caps/bs-key-caps.cmp.test.d.ts +1 -0
  433. package/dist/types/components/bs-key-caps/bs-key-caps.d.ts +31 -0
  434. package/dist/types/components/bs-key-caps/bs-key-caps.stories.d.ts +15 -0
  435. package/dist/types/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.cmp.test.d.ts +1 -0
  436. package/dist/types/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.d.ts +95 -0
  437. package/dist/types/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.stories.d.ts +43 -0
  438. package/dist/types/components/bs-search-item/bs-search-item.cmp.test.d.ts +1 -0
  439. package/dist/types/components/bs-search-item/bs-search-item.d.ts +61 -0
  440. package/dist/types/components/bs-search-item/bs-search-item.stories.d.ts +13 -0
  441. package/dist/types/components/bs-shortcut-row/bs-shortcut-row.cmp.test.d.ts +1 -0
  442. package/dist/types/components/bs-shortcut-row/bs-shortcut-row.d.ts +38 -0
  443. package/dist/types/components/bs-shortcut-row/bs-shortcut-row.stories.d.ts +13 -0
  444. package/dist/types/components.d.ts +1902 -76
  445. package/package.json +1 -1
  446. package/reference.d.ts +24 -0
  447. package/reference.json +855 -76
  448. package/dist/brandsync-wc/p-769c5b4a.entry.js +0 -1
  449. package/dist/brandsync-wc/p-e5f50e93.entry.js +0 -1
  450. package/dist/brandsync-wc/p-e72dd05e.entry.js +0 -1
  451. package/dist/components/p-BaJEv6rL.js +0 -1
@@ -0,0 +1,194 @@
1
+ import { html, nothing } from "lit";
2
+ import { componentDescription } from "../../stories-utils";
3
+ /** Inline icon paths (no external URLs). */
4
+ export const ICON_PATHS = {
5
+ users: '<circle cx="9" cy="8" r="3.5" /><path d="M2.5 20a6.5 6.5 0 0 1 13 0" /><path d="M16 4.6a3.5 3.5 0 0 1 0 6.8M18 14a6.5 6.5 0 0 1 3.5 6" />',
6
+ invoice: '<path d="M7 3h8l4 4v14H7V3Z" /><path d="M15 3v4h4M10 12h6M10 16h6" />',
7
+ plus: '<path d="M12 5v14M5 12h14" />',
8
+ package: '<path d="M21 8 12 3 3 8v8l9 5 9-5V8Z" /><path d="m3 8 9 5 9-5M12 13v8" />',
9
+ store: '<path d="M4 9 5.5 4h13L20 9M4 9h16v11H4V9Z" /><path d="M9 20v-6h6v6" />',
10
+ arrow: '<path d="M5 12h14M13 6l6 6-6 6" />',
11
+ moon: '<path d="M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5Z" />',
12
+ sun: '<circle cx="12" cy="12" r="4" /><path d="M12 3v2M12 19v2M3 12h2M19 12h2M5.6 5.6 7 7M17 17l1.4 1.4M5.6 18.4 7 17M17 7l1.4-1.4" />',
13
+ monitor: '<path d="M3 4h18v12H3V4ZM8 20h8M12 16v4" />',
14
+ download: '<path d="M12 4v11M7 11l5 5 5-5M5 20h14" />',
15
+ search: '<circle cx="11" cy="11" r="7" /><path d="m20 20-3.5-3.5" />',
16
+ list: '<path d="M8 6h12M8 12h12M8 18h12M4 6h.01M4 12h.01M4 18h.01" />',
17
+ };
18
+ /** Figma "Command Palette" data, shared by the stories and the tests. */
19
+ export const DEFAULT_ROWS = [
20
+ { value: 'c-nordic', section: 'recent', label: 'Nordic Sports AS', trailing: 'Customer', icon: 'users' },
21
+ { value: 'i-20931', section: 'recent', label: 'INV-20931', trailing: 'Invoice', icon: 'invoice' },
22
+ { value: 'cmd-invoice', section: 'suggested', label: 'Create Invoice', keys: 'Ctrl+N', icon: 'plus' },
23
+ { value: 'cmd-product', section: 'suggested', label: 'Add product', keys: 'Ctrl+Shift+P', icon: 'package' },
24
+ { value: 'cmd-store', section: 'suggested', label: 'Switch store', keys: 'Ctrl+Ctrl+Ctrl', icon: 'store' },
25
+ { value: 'nav-dashboard', section: 'navigation', label: 'Go to Dashboard', keys: 'G+D', icon: 'arrow' },
26
+ { value: 'nav-settings', section: 'navigation', label: 'Go to Settings', keys: 'G+S', icon: 'arrow' },
27
+ ];
28
+ export const SEARCHING_ROWS = [
29
+ { value: 'cmd-invoice', section: 'commands', label: '', match: 'Create Invo', rest: 'ice', keys: 'Ctrl+N', icon: 'plus' },
30
+ { value: 'cmd-export', section: 'commands', label: '', match: 'Export invo', rest: 'ices to CSV', icon: 'download' },
31
+ { value: 'nav-invoices', section: 'navigation', label: '', match: 'Go to Invo', rest: 'ices', keys: 'G+I', icon: 'arrow' },
32
+ { value: 'i-20931', section: 'records', label: '', match: 'INV', rest: '-20931 · Nordic Sports AS', description: 'Due 30 Oct · NOK 12 480', trailing: 'Invoice', icon: 'invoice' },
33
+ { value: 'i-20877', section: 'records', label: '', match: 'INV', rest: '-20877 · Bergen Sko AS', description: 'Paid · NOK 4 150', trailing: 'Invoice', icon: 'invoice' },
34
+ ];
35
+ export const COMMANDS_ONLY_ROWS = [
36
+ { value: 'theme-dark', section: 'commands', label: 'Switch to dark ', match: 'theme', icon: 'moon' },
37
+ { value: 'theme-light', section: 'commands', label: 'Switch to light theme', trailing: 'Current', icon: 'sun' },
38
+ { value: 'theme-system', section: 'commands', label: 'Use system theme', icon: 'monitor' },
39
+ ];
40
+ export const TRY_INSTEAD_ROWS = [
41
+ { value: 'try-records', section: 'try-instead', label: 'Search records for “thme”', icon: 'search' },
42
+ { value: 'try-commands', section: 'try-instead', label: 'Browse all commands', icon: 'list' },
43
+ ];
44
+ const svg = (name) => {
45
+ const t = document.createElement('template');
46
+ t.innerHTML = `<svg slot="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${ICON_PATHS[name]}</svg>`;
47
+ return t.content.firstElementChild;
48
+ };
49
+ const rowTemplate = (r) => html `<bs-search-item slot=${r.section} value=${r.value} trailing=${r.trailing ?? nothing}>
50
+ ${svg(r.icon)}${r.match && !r.rest ? nothing : r.label}${r.match ? html `<strong>${r.match}</strong>` : nothing}${r.rest ?? ''}
51
+ ${r.description ? html `<span slot="description">${r.description}</span>` : nothing}
52
+ ${r.keys ? html `<bs-key-caps slot="trailing" keys=${r.keys}></bs-key-caps>` : nothing}
53
+ </bs-search-item>`;
54
+ const meta = {
55
+ // The shared story data constants are exported for the tests; keep them out of the sidebar.
56
+ excludeStories: /^[A-Z0-9_]+$/,
57
+ title: 'Components/bs-command-palette',
58
+ parameters: { layout: 'fullscreen', docs: { description: { component: componentDescription('bs-command-palette') }, story: { inline: false, iframeHeight: 640 } } },
59
+ argTypes: {
60
+ open: { control: 'boolean' },
61
+ value: { control: 'text' },
62
+ status: { control: 'select', options: ['default', 'results', 'empty', 'loading'] },
63
+ placeholder: { control: 'text' },
64
+ showFooter: { control: 'boolean' },
65
+ keepOpenOnSelect: { control: 'boolean' },
66
+ hotkey: { control: 'text' },
67
+ scopeLabel: { control: 'text' },
68
+ emptyHeading: { control: 'text' },
69
+ emptyDescription: { control: 'text' },
70
+ didYouMean: { control: 'text' },
71
+ },
72
+ args: {
73
+ open: true,
74
+ value: '',
75
+ status: 'default',
76
+ placeholder: 'Type a command or search…',
77
+ showFooter: true,
78
+ keepOpenOnSelect: false,
79
+ hotkey: '',
80
+ emptyHeading: 'No commands or records',
81
+ emptyDescription: 'Check the spelling, or search records instead.',
82
+ },
83
+ render: args => html `
84
+ <div style="min-height: 640px">
85
+ <bs-command-palette
86
+ .open=${args.open}
87
+ .value=${args.value}
88
+ .status=${args.status}
89
+ .placeholder=${args.placeholder}
90
+ .showFooter=${args.showFooter}
91
+ .keepOpenOnSelect=${args.keepOpenOnSelect}
92
+ .hotkey=${args.hotkey}
93
+ .scopeLabel=${args.scopeLabel}
94
+ .emptyHeading=${args.emptyHeading}
95
+ .emptyDescription=${args.emptyDescription}
96
+ .didYouMean=${args.didYouMean}
97
+ >
98
+ ${DEFAULT_ROWS.map(rowTemplate)}
99
+ </bs-command-palette>
100
+ </div>
101
+ `,
102
+ };
103
+ export default meta;
104
+ export const Closed = {
105
+ args: { open: false },
106
+ render: () => html `
107
+ <div style="min-height: 640px; padding: 16px">
108
+ <bs-button @click=${(e) => e.currentTarget.nextElementSibling.show()}>Open palette</bs-button>
109
+ <bs-command-palette hotkey="mod+k">${DEFAULT_ROWS.map(rowTemplate)}</bs-command-palette>
110
+ </div>
111
+ `,
112
+ };
113
+ export const Default = {};
114
+ export const Searching = {
115
+ args: { value: 'invo', status: 'results' },
116
+ render: args => html `
117
+ <div style="min-height: 640px">
118
+ <bs-command-palette .open=${args.open} .value=${args.value} .status=${args.status}>${SEARCHING_ROWS.map(rowTemplate)}</bs-command-palette>
119
+ </div>
120
+ `,
121
+ };
122
+ export const CommandsOnly = {
123
+ args: { value: '> theme', status: 'results' },
124
+ render: args => html `
125
+ <div style="min-height: 640px">
126
+ <bs-command-palette .open=${args.open} .value=${args.value} .status=${args.status}>${COMMANDS_ONLY_ROWS.map(rowTemplate)}</bs-command-palette>
127
+ </div>
128
+ `,
129
+ };
130
+ export const NoResults = {
131
+ args: { value: 'thme', status: 'empty' },
132
+ render: args => html `
133
+ <div style="min-height: 640px">
134
+ <bs-command-palette
135
+ .open=${args.open}
136
+ .value=${args.value}
137
+ status="empty"
138
+ empty-heading="No commands or records for “thme”"
139
+ did-you-mean="theme"
140
+ >
141
+ ${TRY_INSTEAD_ROWS.map(rowTemplate)}
142
+ </bs-command-palette>
143
+ </div>
144
+ `,
145
+ };
146
+ export const Loading = {
147
+ args: { value: 'invo', status: 'loading' },
148
+ render: args => html `
149
+ <div style="min-height: 640px">
150
+ <bs-command-palette .open=${args.open} .value=${args.value} status="loading"></bs-command-palette>
151
+ </div>
152
+ `,
153
+ };
154
+ export const Interactive = {
155
+ args: { open: false },
156
+ render: () => {
157
+ const wrap = document.createElement('div');
158
+ wrap.style.cssText = 'min-height: 640px; padding: 16px';
159
+ const out = document.createElement('output');
160
+ out.style.cssText = 'display:block;margin-top:8px;font:14px/20px monospace;color:var(--bs-text-secondary)';
161
+ out.textContent = 'Press Ctrl/Cmd+K, type, use the arrow keys, Enter or Esc.';
162
+ const btn = document.createElement('bs-button');
163
+ btn.textContent = 'Open palette (Ctrl/Cmd+K)';
164
+ const cp = document.createElement('bs-command-palette');
165
+ cp.setAttribute('hotkey', 'mod+k');
166
+ const render = (rows) => {
167
+ cp.innerHTML = rows
168
+ .map(r => `<bs-search-item slot="${r.section}" value="${r.value}"${r.trailing ? ` trailing="${r.trailing}"` : ''}>${r.match && !r.rest ? '' : r.label}${r.match ? `<strong>${r.match}</strong>` : ''}${r.rest ?? ''}${r.description ? `<span slot="description">${r.description}</span>` : ''}${r.keys ? `<bs-key-caps slot="trailing" keys="${r.keys}"></bs-key-caps>` : ''}</bs-search-item>`)
169
+ .join('');
170
+ };
171
+ render(DEFAULT_ROWS);
172
+ // The app owns the filtering.
173
+ cp.addEventListener('bsInput', e => {
174
+ const d = e.detail;
175
+ const all = [...DEFAULT_ROWS, ...SEARCHING_ROWS, ...COMMANDS_ONLY_ROWS].filter((r, i, a) => a.findIndex(x => x.value === r.value) === i);
176
+ if (!d.query && !d.commandsOnly) {
177
+ cp.status = 'default';
178
+ render(DEFAULT_ROWS);
179
+ }
180
+ else {
181
+ const rows = all.filter(r => (!d.commandsOnly || ['commands', 'suggested', 'navigation'].includes(r.section)) && `${r.label}${r.match ?? ''}${r.rest ?? ''}`.toLowerCase().includes(d.query.toLowerCase()));
182
+ render(rows);
183
+ cp.status = rows.length ? 'results' : 'empty';
184
+ }
185
+ out.textContent = `bsInput ${JSON.stringify(d)}`;
186
+ });
187
+ for (const n of ['bsSelect', 'bsSuggestion', 'bsOpenChange', 'bsScopeExit']) {
188
+ cp.addEventListener(n, e => (out.textContent = `${n} ${JSON.stringify(e.detail ?? null)}`));
189
+ }
190
+ btn.addEventListener('click', () => cp.show());
191
+ wrap.append(btn, out, cp);
192
+ return wrap;
193
+ },
194
+ };
@@ -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: '2ce76ec3bd4b265f11bb99dee3a3c90d9172597c', class: `bs-composer bs-composer--${this.state} bs-composer--${this.variant}` }, h("div", { key: '413304d4f29b85642bf75beb879a9551d5be8263', part: "attachments", class: `bs-composer__attachments-row ${this.hasAttachments ? 'bs-composer__attachments-row--visible' : ''}` }, h("slot", { key: 'e548c8e0f26f25748f4873c22ad97431f9de3ce8', name: "attachments", onSlotchange: this.onAttachmentsSlotchange })), h("div", { key: '1df76f515366b9ef952714b8454b6aa36fd905c8', class: "bs-composer__text-row" }, h("textarea", { key: '27f0367c0eb47824e66f41cd6d90838e18116b7a', 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: 'b27a014146d993fc41d80c233365964de65cf34c', class: "bs-composer__controls-row" }, !this.hideAttach && (h("button", { key: 'b1fe110b360b29a371a68626a1507213e11facf1', type: "button", part: "attach", class: "bs-composer__attach", "aria-label": this.attachLabel, onClick: this.onAttachClick }, h(PlusIcon, { key: 'b925e8b4e010f17594edf604401423b00ff72cba' }))), 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: '52248240911d69cbb69d11ef2368a9dbce2d545a', 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: '653e4a36899abaddb91ebf975e53514b400d2497', 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: 'de551ed30be4f5008c58c4ec441daf8842209edd', name: "actions-end" }))));
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" }))));
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: '7ddbbad5af14adf35a87097ce7e7644fd9e50ec3', role: this.roleForType(), "aria-busy": this.loading ? 'true' : undefined, class: `bs-composer-status-banner bs-composer-status-banner--${this.type}` }, h("div", { key: '1fb9a5fb707db89056115ec0992484b310a47590', class: "bs-composer-status-banner__message-group" }, this.showIcon && (h("span", { key: 'c9cf1d3be7dd33b73f8a2813295ed90e2dbc865a', part: "icon", class: "bs-composer-status-banner__icon" }, h("slot", { key: '86735a463ca03af8359ef17d971a63d5c518f587', name: "icon" }, this.renderDefaultIcon()))), h("p", { key: '046dad63d8a6b12c5c4fe766edef811d945b427f', part: "message", class: "bs-composer-status-banner__message" }, this.message)), this.showButton && (h("button", { key: '3c8d3d824413b32ff596f63b579c8b7ce683af81', type: "button", part: "action", class: "bs-composer-status-banner__action", onClick: this.onActionClick }, this.actionLabel)), this.allowClose && (h("button", { key: '3d5dbe65b4ba7e04202fc260b0ca665a4eb3b516', type: "button", part: "close", class: "bs-composer-status-banner__close", "aria-label": this.closeLabel, onClick: this.onCloseClick }, h(CloseIcon, { key: '86efc37f964fd1440ac10cc47077605dbc0664ce' })))));
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' })))));
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: '001d2089d9e69657dad10a4d95c550900bdb5252', style: { '--bs-container-padding-token': `var(--bs-spacing-${pad})` } }, h("slot", { key: '8f983ed8ad608a386d84468682296d9318089d28' })));
24
+ return (h(Host, { key: 'af5052dbda078e66b8afcf84e842f124748353b9', style: { '--bs-container-padding-token': `var(--bs-spacing-${pad})` } }, h("slot", { key: '2493e7614d7fcaf07b24e350e68a65b06fd77640' })));
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: '5b61e4f581c2ab0da069cabf9a612285f98b0865', part: "table", class: "bs-data-table" }, h("thead", { key: 'c3bed54d42e2e2c3d54cfa9754251ab0d34c55fd', part: "head" }, h("tr", { key: '8f0aaa90b06650719423de98e05f39ffce407a67' }, this.selectable && (h("th", { key: 'ed065c125b50493c621c8922cdd3d7ca26222b8e', class: "bs-data-table__select-col" }, this.rows.length > 0 && (h("input", { key: '0e4f29de07f7818e7024714281f5faadcd288c88', 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: '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 => {
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: 'b993a2e1c22d094936c49ad33486b2ecc02861c8', 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: '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 ? (
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: 'd2794a112b72b3dc871360b1e57273c9ef097fc4', part: "container", class: "bs-datepicker", surface: "raised" }, h("div", { key: 'bee55a1cd06aa44171f40babae77b1f2f742d160', class: "bs-datepicker__body" }, this.renderHeader(), h("div", { key: 'd4ab1cfd76fcea8b64daeb951da7b36300c036f0', part: "nav", class: "bs-datepicker__nav" }, h("button", { key: '5fcbb3f928db51049fd034beb3519400afe4f128', part: "prev", type: "button", class: "bs-datepicker__nav-button", "aria-label": this.previousLabel, onClick: () => this.moveView(-1) }, h("svg", { key: '18889f8f9dd9364bd73595635b72515b91d35ade', viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true" }, h("path", { key: '3d648cd4be611ef4de37cc08f9017809388d36e3', d: "M15 18L9 12L15 6", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }))), h("div", { key: 'c0647871f1c140472807ae51e04604c6d87ccaa4', part: "title", class: "bs-datepicker__title", "aria-live": "polite" }, this.titleText()), h("button", { key: 'ec3d33aeea146534d6640ac336905a002d0e7dc2', part: "next", type: "button", class: "bs-datepicker__nav-button", "aria-label": this.nextLabel, onClick: () => this.moveView(1) }, h("svg", { key: '5cbac8630a30064d940e5f03ce767b525c09dd7c', viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true" }, h("path", { key: '2c47ca0911b8b42cd3590ff053905df327363e9f', d: "M9 18L15 12L9 6", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), h("div", { key: '91a6942792287f3044962fd278e36ed04ec03878', part: "grid", class: "bs-datepicker__grid", role: "grid", "aria-label": this.titleText() }, h("div", { key: '445e0548f0913426fe2eb730f291423d9165f839', 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: '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) => {
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: '72be86556d663c54fde0d585ae5850b236389b23', ...a11y }, h("div", { key: 'a08f191d8f900bc88fc0c44be08da1a7d8eb2e3c', class: "line", part: "line" })));
31
+ return (h(Host, { key: '0146af9f63ddd328e30262cf9767222445da478b', ...a11y }, h("div", { key: 'a621923c43fd326fe5ee6e7223bd5e7103b01e9e', class: "line", part: "line" })));
32
32
  }
33
33
  static get is() { return "bs-divider"; }
34
34
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,102 @@
1
+ import { render, h, describe, it, expect } from "@stencil/vitest";
2
+ import { assertShadowParts, runAxeCheck } from "../../test/helpers/conventions";
3
+ const q = (el, s) => el.shadowRoot.querySelector(s);
4
+ describe('bs-empty-state', () => {
5
+ it('has the Figma geometry', async () => {
6
+ const { root } = await render(h("bs-empty-state", { heading: "No results", description: "Try again", style: { width: '480px' } }, h("svg", { slot: "icon", viewBox: "0 0 24 24" }), h("bs-button", { slot: "action", variant: "outlined" }, "Clear")));
7
+ const c = getComputedStyle(q(root, '[part="container"]'));
8
+ expect(c.paddingTop).toBe('56px');
9
+ expect(c.paddingLeft).toBe('24px');
10
+ expect(c.rowGap).toBe('12px');
11
+ expect(c.alignItems).toBe('center');
12
+ expect(c.textAlign).toBe('center');
13
+ const tile = q(root, '[part="icon"]');
14
+ expect(tile.getAttribute('size')).toBe('lg');
15
+ expect(Math.round(tile.shadowRoot.querySelector('[part="container"]').getBoundingClientRect().width)).toBe(48);
16
+ const hd = getComputedStyle(q(root, '[part="heading"]'));
17
+ expect(hd.fontSize).toBe('20px');
18
+ expect(hd.lineHeight).toBe('24px');
19
+ expect(hd.fontWeight).toBe('700');
20
+ const ds = getComputedStyle(q(root, '[part="description"]'));
21
+ expect(ds.fontSize).toBe('14px');
22
+ expect(ds.lineHeight).toBe('20px');
23
+ // description fills the container width (480 - 2 * 24)
24
+ expect(Math.round(q(root, '[part="description"]').getBoundingClientRect().width)).toBe(432);
25
+ assertShadowParts(root.shadowRoot, ['container', 'icon', 'heading', 'description', 'action']);
26
+ });
27
+ it('renders an h3 by default and honours headingLevel (clamped to 2-6)', async () => {
28
+ const { root, waitForChanges } = await render(h("bs-empty-state", { heading: "H" }));
29
+ expect(q(root, '[part="heading"]').tagName).toBe('H3');
30
+ root.headingLevel = 5;
31
+ await waitForChanges();
32
+ expect(q(root, '[part="heading"]').tagName).toBe('H5');
33
+ root.headingLevel = 1;
34
+ await waitForChanges();
35
+ expect(q(root, '[part="heading"]').tagName).toBe('H2');
36
+ root.headingLevel = 9;
37
+ await waitForChanges();
38
+ expect(q(root, '[part="heading"]').tagName).toBe('H6');
39
+ });
40
+ it('passes intent to the icon tile and has no role', async () => {
41
+ const { root, waitForChanges } = await render(h("bs-empty-state", { heading: "H" }));
42
+ expect(q(root, '[part="icon"]').getAttribute('intent')).toBe('default');
43
+ expect(root.hasAttribute('role')).toBe(false);
44
+ expect(q(root, '[part="container"]').hasAttribute('role')).toBe(false);
45
+ root.setAttribute('intent', 'error');
46
+ await waitForChanges();
47
+ expect(q(root, '[part="icon"]').getAttribute('intent')).toBe('error');
48
+ });
49
+ it('only renders the action wrapper when the action slot is filled, and the default slot replaces the description', async () => {
50
+ const { root, waitForChanges } = await render(h("bs-empty-state", { heading: "H", description: "Prop text" }));
51
+ expect(q(root, '[part="action"]')).toBeNull();
52
+ expect(q(root, '[part="description"]').textContent).toBe('Prop text');
53
+ const btn = document.createElement('bs-button');
54
+ btn.setAttribute('slot', 'action');
55
+ root.appendChild(btn);
56
+ const rich = document.createElement('span');
57
+ rich.textContent = 'Slotted';
58
+ root.appendChild(rich);
59
+ await new Promise(r => setTimeout(r, 50));
60
+ await waitForChanges();
61
+ expect(q(root, '[part="action"]')).not.toBeNull();
62
+ const slot = q(root, '[part="description"] slot');
63
+ expect(slot.assignedNodes()[0]).toBe(rich);
64
+ });
65
+ it('shows the slotted icon inside the tile', async () => {
66
+ const { root } = await render(h("bs-empty-state", { heading: "H" }, h("svg", { slot: "icon", viewBox: "0 0 24 24" })));
67
+ const tile = q(root, '[part="icon"]');
68
+ const slot = q(root, '[part="icon"] slot[name="icon"]');
69
+ expect(slot.assignedElements()[0].tagName.toLowerCase()).toBe('svg');
70
+ expect(tile).not.toBeNull();
71
+ });
72
+ it('uses the light and dark heading colour from tokens', async () => {
73
+ const { root } = await render(h("bs-empty-state", { heading: "H" }));
74
+ const light = getComputedStyle(q(root, '[part="heading"]')).color;
75
+ document.documentElement.setAttribute('data-theme', 'dark');
76
+ try {
77
+ await new Promise(r => setTimeout(r, 100));
78
+ expect(getComputedStyle(q(root, '[part="heading"]')).color).not.toBe(light);
79
+ }
80
+ finally {
81
+ document.documentElement.removeAttribute('data-theme');
82
+ }
83
+ });
84
+ it('passes axe', async () => {
85
+ const { root } = await render(h("bs-empty-state", { heading: "No results", description: "Try again", intent: "error" }, h("svg", { slot: "icon", viewBox: "0 0 24 24" }), h("bs-button", { slot: "action", variant: "outlined" }, "Retry")));
86
+ await runAxeCheck(root);
87
+ });
88
+ it('shows the description prop even when formatted markup puts whitespace text nodes in the default slot', async () => {
89
+ const { root } = await render(h("div", null));
90
+ root.innerHTML = `
91
+ <bs-empty-state heading="No results" description="Try a wider date range.">
92
+ <svg slot="icon" viewBox="0 0 24 24"></svg>
93
+ <bs-button slot="action" variant="outlined">Clear</bs-button>
94
+ </bs-empty-state>`;
95
+ const es = root.querySelector('bs-empty-state');
96
+ await new Promise(r => setTimeout(r, 200));
97
+ const d = q(es, '[part="description"]');
98
+ expect(d).not.toBeNull();
99
+ expect(d.textContent.trim()).toBe('Try a wider date range.');
100
+ expect(d.getBoundingClientRect().height).toBeGreaterThan(0);
101
+ });
102
+ });
@@ -0,0 +1,45 @@
1
+ :host {
2
+ display: block;
3
+ box-sizing: border-box;
4
+ --bs-empty-state-padding-y: var(--bs-spacing-700);
5
+ /* Figma: 24px; --bs-spacing-300 is 24px. */
6
+ --bs-empty-state-padding-x: var(--bs-spacing-300);
7
+ --bs-empty-state-gap: var(--bs-spacing-150);
8
+ --bs-empty-state-heading-color: var(--bs-text-default);
9
+ --bs-empty-state-description-color: var(--bs-text-secondary);
10
+ }
11
+
12
+ .bs-empty-state {
13
+ box-sizing: border-box;
14
+ display: flex;
15
+ flex-direction: column;
16
+ align-items: center;
17
+ gap: var(--bs-empty-state-gap);
18
+ padding: var(--bs-empty-state-padding-y) var(--bs-empty-state-padding-x);
19
+ text-align: center;
20
+ }
21
+
22
+ .bs-empty-state__heading {
23
+ margin: 0;
24
+ align-self: stretch;
25
+ color: var(--bs-empty-state-heading-color);
26
+ font-family: inherit;
27
+ font-size: var(--bs-font-size-xl);
28
+ font-weight: var(--bs-font-weight-bold);
29
+ line-height: 24px;
30
+ }
31
+
32
+ .bs-empty-state__description {
33
+ margin: 0;
34
+ align-self: stretch;
35
+ color: var(--bs-empty-state-description-color);
36
+ font-family: inherit;
37
+ font-size: var(--bs-font-size-sm);
38
+ font-weight: var(--bs-font-weight-regular);
39
+ line-height: 20px;
40
+ }
41
+
42
+ .bs-empty-state__action {
43
+ display: flex;
44
+ justify-content: center;
45
+ }
@@ -0,0 +1,175 @@
1
+ import { h } from "@stencil/core";
2
+ /**
3
+ * A centered "nothing to show" block: an icon tile, a heading, a description and an optional action.
4
+ * Used for empty lists, "no results" and error states inside a panel, card or page section.
5
+ *
6
+ * Built from `bs-icon-tile` (and, in your `action` slot, usually a `bs-button`).
7
+ *
8
+ * The component has no role. Live regions belong on a wrapper you control (e.g. `role="status"` on the
9
+ * element that stays in the DOM while this block appears and disappears).
10
+ *
11
+ * ## When to use
12
+ * - A list, table or search result that has nothing to show, or failed to load.
13
+ *
14
+ * ## When not to use
15
+ * - A full-page error with a status code -- use `bs-error-page`.
16
+ * - A transient message -- use `bs-toast` or `bs-snackbar`.
17
+ *
18
+ * @slot icon - The glyph inside the icon tile (24px, `currentColor`). Falls back to the tile's intent glyph.
19
+ * @slot - The description (overrides the `description` prop).
20
+ * @slot action - An optional action, e.g. `<bs-button variant="outlined">`.
21
+ * @part container - The centered column.
22
+ * @part icon - The icon tile (`bs-icon-tile`).
23
+ * @part heading - The heading element.
24
+ * @part description - The description paragraph.
25
+ * @part action - The action wrapper (only rendered while the `action` slot is filled).
26
+ * @prop --bs-empty-state-padding-y - Vertical padding. Aliased to `--bs-spacing-700` (56px).
27
+ * @prop --bs-empty-state-padding-x - Horizontal padding. Aliased to `--bs-spacing-300` (24px).
28
+ * @prop --bs-empty-state-gap - Gap between tile, heading, description and action. Aliased to `--bs-spacing-150`.
29
+ * @prop --bs-empty-state-heading-color - Aliased to `--bs-text-default`.
30
+ * @prop --bs-empty-state-description-color - Aliased to `--bs-text-secondary`.
31
+ */
32
+ export class BsEmptyState {
33
+ el;
34
+ /** The heading text. */
35
+ heading;
36
+ /** The description text. The default slot overrides it. */
37
+ description;
38
+ /** Colour and default glyph of the icon tile. Use `error` for failures. */
39
+ intent = 'default';
40
+ /** Heading level, 2 to 6 (renders `h2`..`h6`). Pick the one that fits the page outline. */
41
+ headingLevel = 3;
42
+ hasIcon = false;
43
+ hasDescriptionSlot = false;
44
+ hasAction = false;
45
+ observer;
46
+ componentWillLoad() {
47
+ this.readSlots();
48
+ this.observer = new MutationObserver(() => this.readSlots());
49
+ this.observer.observe(this.el, { childList: true, subtree: false, characterData: false });
50
+ }
51
+ disconnectedCallback() {
52
+ this.observer?.disconnect();
53
+ }
54
+ readSlots() {
55
+ const nodes = Array.from(this.el.childNodes);
56
+ const slotOf = (n) => (n.nodeType === Node.ELEMENT_NODE ? n.getAttribute('slot') : null);
57
+ this.hasIcon = nodes.some(n => slotOf(n) === 'icon');
58
+ this.hasAction = nodes.some(n => slotOf(n) === 'action');
59
+ this.hasDescriptionSlot = nodes.some(n => !slotOf(n) && (n.nodeType === Node.ELEMENT_NODE || (n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim())));
60
+ }
61
+ render() {
62
+ const level = Math.min(6, Math.max(2, Math.round(Number(this.headingLevel)) || 3));
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" })))));
65
+ }
66
+ static get is() { return "bs-empty-state"; }
67
+ static get encapsulation() { return "shadow"; }
68
+ static get originalStyleUrls() {
69
+ return {
70
+ "$": ["bs-empty-state.css"]
71
+ };
72
+ }
73
+ static get styleUrls() {
74
+ return {
75
+ "$": ["bs-empty-state.css"]
76
+ };
77
+ }
78
+ static get properties() {
79
+ return {
80
+ "heading": {
81
+ "type": "string",
82
+ "mutable": false,
83
+ "complexType": {
84
+ "original": "string",
85
+ "resolved": "string",
86
+ "references": {}
87
+ },
88
+ "required": false,
89
+ "optional": true,
90
+ "docs": {
91
+ "tags": [],
92
+ "text": "The heading text."
93
+ },
94
+ "getter": false,
95
+ "setter": false,
96
+ "reflect": false,
97
+ "attribute": "heading"
98
+ },
99
+ "description": {
100
+ "type": "string",
101
+ "mutable": false,
102
+ "complexType": {
103
+ "original": "string",
104
+ "resolved": "string",
105
+ "references": {}
106
+ },
107
+ "required": false,
108
+ "optional": true,
109
+ "docs": {
110
+ "tags": [],
111
+ "text": "The description text. The default slot overrides it."
112
+ },
113
+ "getter": false,
114
+ "setter": false,
115
+ "reflect": false,
116
+ "attribute": "description"
117
+ },
118
+ "intent": {
119
+ "type": "string",
120
+ "mutable": false,
121
+ "complexType": {
122
+ "original": "BsIconTileIntent",
123
+ "resolved": "\"brand\" | \"default\" | \"error\" | \"information\" | \"success\" | \"warning\"",
124
+ "references": {
125
+ "BsIconTileIntent": {
126
+ "location": "import",
127
+ "path": "../bs-icon-tile/bs-icon-tile",
128
+ "id": "src/components/bs-icon-tile/bs-icon-tile.tsx::BsIconTileIntent",
129
+ "referenceLocation": "BsIconTileIntent"
130
+ }
131
+ }
132
+ },
133
+ "required": false,
134
+ "optional": false,
135
+ "docs": {
136
+ "tags": [],
137
+ "text": "Colour and default glyph of the icon tile. Use `error` for failures."
138
+ },
139
+ "getter": false,
140
+ "setter": false,
141
+ "reflect": true,
142
+ "attribute": "intent",
143
+ "defaultValue": "'default'"
144
+ },
145
+ "headingLevel": {
146
+ "type": "number",
147
+ "mutable": false,
148
+ "complexType": {
149
+ "original": "2 | 3 | 4 | 5 | 6",
150
+ "resolved": "2 | 3 | 4 | 5 | 6",
151
+ "references": {}
152
+ },
153
+ "required": false,
154
+ "optional": false,
155
+ "docs": {
156
+ "tags": [],
157
+ "text": "Heading level, 2 to 6 (renders `h2`..`h6`). Pick the one that fits the page outline."
158
+ },
159
+ "getter": false,
160
+ "setter": false,
161
+ "reflect": false,
162
+ "attribute": "heading-level",
163
+ "defaultValue": "3"
164
+ }
165
+ };
166
+ }
167
+ static get states() {
168
+ return {
169
+ "hasIcon": {},
170
+ "hasDescriptionSlot": {},
171
+ "hasAction": {}
172
+ };
173
+ }
174
+ static get elementRef() { return "el"; }
175
+ }