@brandsync/wc 1.15.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 (479) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/REFERENCE.md +313 -0
  3. package/custom-elements.json +4760 -1555
  4. package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
  5. package/dist/brandsync-wc/p-044ac86c.entry.js +1 -0
  6. package/dist/brandsync-wc/p-065c7e7c.entry.js +1 -0
  7. package/dist/brandsync-wc/p-07673a48.entry.js +1 -0
  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-6df48031.entry.js → p-2bd30709.entry.js} +1 -1
  14. package/dist/brandsync-wc/{p-e294f698.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-1bf8fbbb.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-ac9472ec.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-79fc849c.entry.js +1 -0
  37. package/dist/brandsync-wc/{p-5a45ef51.entry.js → p-7ed071fb.entry.js} +1 -1
  38. package/dist/brandsync-wc/{p-3c21d0bf.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-7a072e64.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-87d44938.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-b9c0b481.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-e8ae626d.entry.js +1 -0
  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-1b4c0971.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-bc97ece8.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 +66 -0
  110. package/dist/cjs/bs-list.cjs.entry.js +103 -0
  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 +94 -0
  141. package/dist/cjs/bs-tree.cjs.entry.js +197 -0
  142. package/dist/cjs/loader.cjs.js +1 -1
  143. package/dist/collection/collection-manifest.json +13 -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.cmp.test.js +99 -0
  197. package/dist/collection/components/bs-list/bs-list.css +15 -0
  198. package/dist/collection/components/bs-list/bs-list.js +241 -0
  199. package/dist/collection/components/bs-list/bs-list.stories.js +43 -0
  200. package/dist/collection/components/bs-list-item/bs-list-item.cmp.test.js +137 -0
  201. package/dist/collection/components/bs-list-item/bs-list-item.css +139 -0
  202. package/dist/collection/components/bs-list-item/bs-list-item.js +343 -0
  203. package/dist/collection/components/bs-list-item/bs-list-item.stories.js +86 -0
  204. package/dist/collection/components/bs-menu/bs-menu.js +1 -1
  205. package/dist/collection/components/bs-menu-item/bs-menu-item.cmp.test.js +6 -0
  206. package/dist/collection/components/bs-menu-item/bs-menu-item.js +1 -1
  207. package/dist/collection/components/bs-message/bs-message.js +1 -1
  208. package/dist/collection/components/bs-message-list/bs-message-list.js +1 -1
  209. package/dist/collection/components/bs-pagination/bs-pagination.js +1 -1
  210. package/dist/collection/components/bs-popover/bs-popover.js +1 -1
  211. package/dist/collection/components/bs-progress/bs-progress.js +2 -2
  212. package/dist/collection/components/bs-progress-linear/bs-progress-linear.js +2 -2
  213. package/dist/collection/components/bs-qr-code/bs-qr-code.js +1 -1
  214. package/dist/collection/components/bs-radio/bs-radio.js +1 -1
  215. package/dist/collection/components/bs-search-item/bs-search-item.cmp.test.js +147 -0
  216. package/dist/collection/components/bs-search-item/bs-search-item.css +112 -0
  217. package/dist/collection/components/bs-search-item/bs-search-item.js +222 -0
  218. package/dist/collection/components/bs-search-item/bs-search-item.stories.js +31 -0
  219. package/dist/collection/components/bs-session-timeout/bs-session-timeout.js +1 -1
  220. package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.cmp.test.js +60 -0
  221. package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.css +42 -0
  222. package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.js +154 -0
  223. package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.stories.js +24 -0
  224. package/dist/collection/components/bs-skeleton/bs-skeleton.js +1 -1
  225. package/dist/collection/components/bs-slider/bs-slider.js +1 -1
  226. package/dist/collection/components/bs-snackbar/bs-snackbar.js +1 -1
  227. package/dist/collection/components/bs-source-link/bs-source-link.js +2 -2
  228. package/dist/collection/components/bs-spinner/bs-spinner.js +1 -1
  229. package/dist/collection/components/bs-split-pane/bs-split-pane.js +1 -1
  230. package/dist/collection/components/bs-stack/bs-stack.js +1 -1
  231. package/dist/collection/components/bs-stepper/bs-stepper/bs-stepper.js +1 -1
  232. package/dist/collection/components/bs-stepper/bs-stepper-step/bs-stepper-step.js +1 -1
  233. package/dist/collection/components/bs-switch/bs-switch.js +1 -1
  234. package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +1 -1
  235. package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +1 -1
  236. package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +1 -1
  237. package/dist/collection/components/bs-timepicker/bs-timepicker.js +2 -2
  238. package/dist/collection/components/bs-toast/bs-toast.js +1 -1
  239. package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
  240. package/dist/collection/components/bs-tooltip-trigger/bs-tooltip-trigger.js +1 -1
  241. package/dist/collection/components/bs-tree/bs-tree.cmp.test.js +166 -0
  242. package/dist/collection/components/bs-tree/bs-tree.css +8 -0
  243. package/dist/collection/components/bs-tree/bs-tree.js +354 -0
  244. package/dist/collection/components/bs-tree/bs-tree.stories.js +34 -0
  245. package/dist/collection/components/bs-tree-item/bs-tree-item.cmp.test.js +187 -0
  246. package/dist/collection/components/bs-tree-item/bs-tree-item.css +161 -0
  247. package/dist/collection/components/bs-tree-item/bs-tree-item.js +305 -0
  248. package/dist/collection/components/bs-tree-item/bs-tree-item.stories.js +54 -0
  249. package/dist/collection/components/bs-whats-new-entry/bs-whats-new-entry.js +1 -1
  250. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.js +2 -2
  251. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.js +1 -1
  252. package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.js +1 -1
  253. package/dist/components/bs-accordion-group.js +1 -1
  254. package/dist/components/bs-ai-disclaimer.js +1 -1
  255. package/dist/components/bs-ai-greeting.js +1 -1
  256. package/dist/components/bs-ai-thinking.js +1 -1
  257. package/dist/components/bs-app-shell.js +1 -1
  258. package/dist/components/bs-attachment-list.js +1 -1
  259. package/dist/components/bs-attachment.js +1 -1
  260. package/dist/components/bs-breadcrumb-overflow.js +1 -1
  261. package/dist/components/bs-breadcrumbs.js +1 -1
  262. package/dist/components/bs-button-skeleton.js +1 -1
  263. package/dist/components/bs-carousel.js +1 -1
  264. package/dist/components/bs-chatbot-feedback.js +1 -1
  265. package/dist/components/bs-chatbot-header.js +1 -1
  266. package/dist/components/bs-chatbot-response-action.js +1 -1
  267. package/dist/components/bs-chatbot-sources-drawer.js +1 -1
  268. package/dist/components/bs-chatbot-suggestion-button.js +1 -1
  269. package/dist/components/bs-checkbox-skeleton.js +1 -1
  270. package/dist/components/bs-citation-preview.js +1 -1
  271. package/dist/components/bs-command-palette.d.ts +11 -0
  272. package/dist/components/bs-command-palette.js +1 -0
  273. package/dist/components/bs-composer-status-banner.js +1 -1
  274. package/dist/components/bs-composer.js +1 -1
  275. package/dist/components/bs-container.js +1 -1
  276. package/dist/components/bs-cookie-consent.js +1 -1
  277. package/dist/components/bs-data-table.js +1 -1
  278. package/dist/components/bs-datepicker.js +1 -1
  279. package/dist/components/bs-dialog.js +1 -1
  280. package/dist/components/bs-divider.js +1 -1
  281. package/dist/components/bs-empty-state.d.ts +11 -0
  282. package/dist/components/bs-empty-state.js +1 -0
  283. package/dist/components/bs-error-page.js +1 -1
  284. package/dist/components/bs-file-upload-item.js +1 -1
  285. package/dist/components/bs-file-upload.js +1 -1
  286. package/dist/components/bs-global-search.d.ts +11 -0
  287. package/dist/components/bs-global-search.js +1 -0
  288. package/dist/components/bs-grid.js +1 -1
  289. package/dist/components/bs-icon-button.js +1 -1
  290. package/dist/components/bs-icon-tile.js +1 -1
  291. package/dist/components/bs-inline-tab.js +1 -1
  292. package/dist/components/bs-input.js +1 -1
  293. package/dist/components/bs-key-caps.d.ts +11 -0
  294. package/dist/components/bs-key-caps.js +1 -0
  295. package/dist/components/bs-key.d.ts +11 -0
  296. package/dist/components/bs-key.js +1 -0
  297. package/dist/components/bs-keyboard-shortcuts.d.ts +11 -0
  298. package/dist/components/bs-keyboard-shortcuts.js +1 -0
  299. package/dist/components/bs-list-item.d.ts +11 -0
  300. package/dist/components/bs-list-item.js +1 -0
  301. package/dist/components/bs-list.d.ts +11 -0
  302. package/dist/components/bs-list.js +1 -0
  303. package/dist/components/bs-menu-item.js +1 -1
  304. package/dist/components/bs-menu.js +1 -1
  305. package/dist/components/bs-message-list.js +1 -1
  306. package/dist/components/bs-message.js +1 -1
  307. package/dist/components/bs-navigation-drawer-item.js +1 -1
  308. package/dist/components/bs-navigation-drawer.js +1 -1
  309. package/dist/components/bs-navigation-header.js +1 -1
  310. package/dist/components/bs-onboarding-checklist.js +1 -1
  311. package/dist/components/bs-pagination.js +1 -1
  312. package/dist/components/bs-popover.js +1 -1
  313. package/dist/components/bs-product-tour.js +1 -1
  314. package/dist/components/bs-progress-linear.js +1 -1
  315. package/dist/components/bs-progress.js +1 -1
  316. package/dist/components/bs-qr-code.js +1 -1
  317. package/dist/components/bs-radio.js +1 -1
  318. package/dist/components/bs-search-item.d.ts +11 -0
  319. package/dist/components/bs-search-item.js +1 -0
  320. package/dist/components/bs-session-timeout.js +1 -1
  321. package/dist/components/bs-shortcut-row.d.ts +11 -0
  322. package/dist/components/bs-shortcut-row.js +1 -0
  323. package/dist/components/bs-side-panel.js +1 -1
  324. package/dist/components/bs-skeleton.js +1 -1
  325. package/dist/components/bs-slider.js +1 -1
  326. package/dist/components/bs-snackbar.js +1 -1
  327. package/dist/components/bs-source-link.js +1 -1
  328. package/dist/components/bs-spinner.js +1 -1
  329. package/dist/components/bs-split-pane.js +1 -1
  330. package/dist/components/bs-stack.js +1 -1
  331. package/dist/components/bs-stepper-step.js +1 -1
  332. package/dist/components/bs-stepper.js +1 -1
  333. package/dist/components/bs-switch.js +1 -1
  334. package/dist/components/bs-tab.js +1 -1
  335. package/dist/components/bs-tabs.js +1 -1
  336. package/dist/components/bs-timepicker.js +1 -1
  337. package/dist/components/bs-toast.js +1 -1
  338. package/dist/components/bs-tooltip-trigger.js +1 -1
  339. package/dist/components/bs-tooltip.js +1 -1
  340. package/dist/components/bs-tree-item.d.ts +11 -0
  341. package/dist/components/bs-tree-item.js +1 -0
  342. package/dist/components/bs-tree.d.ts +11 -0
  343. package/dist/components/bs-tree.js +1 -0
  344. package/dist/components/bs-whats-new-entry.js +1 -1
  345. package/dist/components/bs-whats-new.js +1 -1
  346. package/dist/components/{p-GTDI4Ibw.js → p-B32Kl4IB.js} +1 -1
  347. package/dist/components/{p-B128GX8H.js → p-BDnZvjlq.js} +1 -1
  348. package/dist/components/{p-Bqe4waKJ.js → p-BUpnOUIM.js} +1 -1
  349. package/dist/components/p-BcYNrEOB.js +1 -0
  350. package/dist/components/{p-B80vOwH6.js → p-BcbaiZLh.js} +1 -1
  351. package/dist/components/p-Bp3DIxjT.js +1 -0
  352. package/dist/components/p-CH5atin4.js +1 -0
  353. package/dist/components/{p-kDJsWjTN.js → p-CRM1wIX9.js} +1 -1
  354. package/dist/components/{p-Mf1jorXP.js → p-CYzBTzzf.js} +1 -1
  355. package/dist/components/p-CervX0wH.js +1 -0
  356. package/dist/components/{p-ElcsxZSh.js → p-Cpe2k7ZC.js} +1 -1
  357. package/dist/components/{p-BvYkZcOU.js → p-D7AXo5NT.js} +1 -1
  358. package/dist/components/{p-B3l4WpgS.js → p-D8bvv9QQ.js} +1 -1
  359. package/dist/components/{p-ByKcHsj0.js → p-DG9eT5yi.js} +1 -1
  360. package/dist/components/{p-D0KM1R2i.js → p-DMLfXpva.js} +1 -1
  361. package/dist/components/{p-CQjSDdH7.js → p-DYDk73TF.js} +1 -1
  362. package/dist/components/{p-C7RZ6qZC.js → p-DcjgRtSQ.js} +1 -1
  363. package/dist/components/p-Dt4JNhHT.js +1 -0
  364. package/dist/components/{p-CK7fiES5.js → p-DtYTs9Kh.js} +1 -1
  365. package/dist/components/{p-BsbtyRJV.js → p-TAY9S9yG.js} +1 -1
  366. package/dist/components/{p-ByLUtXxO.js → p-w-DkdA4O.js} +1 -1
  367. package/dist/esm/brandsync-wc.js +1 -1
  368. package/dist/esm/bs-accordion-group.entry.js +1 -1
  369. package/dist/esm/bs-ai-disclaimer.entry.js +1 -1
  370. package/dist/esm/bs-ai-greeting.entry.js +1 -1
  371. package/dist/esm/bs-ai-thinking.entry.js +1 -1
  372. package/dist/esm/bs-app-shell.entry.js +1 -1
  373. package/dist/esm/bs-attachment-list.entry.js +1 -1
  374. package/dist/esm/bs-breadcrumbs.entry.js +1 -1
  375. package/dist/esm/bs-button-skeleton.entry.js +1 -1
  376. package/dist/esm/bs-chatbot-feedback.entry.js +1 -1
  377. package/dist/esm/bs-chatbot-header.entry.js +1 -1
  378. package/dist/esm/bs-chatbot-response-action.entry.js +1 -1
  379. package/dist/esm/bs-chatbot-sources-drawer.entry.js +1 -1
  380. package/dist/esm/bs-chatbot-suggestion-button.entry.js +1 -1
  381. package/dist/esm/bs-checkbox-skeleton.entry.js +1 -1
  382. package/dist/esm/bs-citation-preview.entry.js +1 -1
  383. package/dist/esm/bs-command-palette.entry.js +372 -0
  384. package/dist/esm/bs-composer-status-banner.entry.js +1 -1
  385. package/dist/esm/bs-composer.entry.js +1 -1
  386. package/dist/esm/bs-container.entry.js +1 -1
  387. package/dist/esm/bs-data-table.entry.js +2 -2
  388. package/dist/esm/bs-datepicker.entry.js +1 -1
  389. package/dist/esm/bs-divider.entry.js +1 -1
  390. package/dist/esm/bs-empty-state.entry.js +45 -0
  391. package/dist/esm/bs-error-page.entry.js +1 -1
  392. package/dist/esm/bs-file-upload-item.entry.js +1 -1
  393. package/dist/esm/bs-file-upload.entry.js +1 -1
  394. package/dist/esm/bs-global-search.entry.js +324 -0
  395. package/dist/esm/bs-grid.entry.js +2 -2
  396. package/dist/esm/bs-icon-button.entry.js +1 -1
  397. package/dist/esm/bs-icon-tile.entry.js +2 -2
  398. package/dist/esm/bs-inline-tab.entry.js +1 -1
  399. package/dist/esm/bs-input_3.entry.js +4 -4
  400. package/dist/esm/bs-key-caps.entry.js +37 -0
  401. package/dist/esm/bs-key.entry.js +26 -0
  402. package/dist/esm/bs-keyboard-shortcuts.entry.js +110 -0
  403. package/dist/esm/bs-list-item.entry.js +64 -0
  404. package/dist/esm/bs-list.entry.js +101 -0
  405. package/dist/esm/bs-message-list.entry.js +1 -1
  406. package/dist/esm/bs-message.entry.js +1 -1
  407. package/dist/esm/bs-navigation-drawer-item.entry.js +1 -1
  408. package/dist/esm/bs-navigation-drawer.entry.js +2 -2
  409. package/dist/esm/bs-navigation-header.entry.js +1 -1
  410. package/dist/esm/bs-pagination.entry.js +1 -1
  411. package/dist/esm/bs-popover.entry.js +1 -1
  412. package/dist/esm/bs-progress-linear.entry.js +2 -2
  413. package/dist/esm/bs-progress.entry.js +2 -2
  414. package/dist/esm/bs-qr-code.entry.js +1 -1
  415. package/dist/esm/bs-radio.entry.js +1 -1
  416. package/dist/esm/bs-search-item.entry.js +45 -0
  417. package/dist/esm/bs-session-timeout.entry.js +1 -1
  418. package/dist/esm/bs-shortcut-row.entry.js +25 -0
  419. package/dist/esm/bs-skeleton.entry.js +1 -1
  420. package/dist/esm/bs-slider.entry.js +1 -1
  421. package/dist/esm/bs-snackbar.entry.js +1 -1
  422. package/dist/esm/bs-source-link.entry.js +2 -2
  423. package/dist/esm/bs-spinner.entry.js +1 -1
  424. package/dist/esm/bs-split-pane.entry.js +1 -1
  425. package/dist/esm/bs-stack.entry.js +1 -1
  426. package/dist/esm/bs-stepper-step.entry.js +1 -1
  427. package/dist/esm/bs-stepper.entry.js +1 -1
  428. package/dist/esm/bs-switch.entry.js +1 -1
  429. package/dist/esm/bs-tab_3.entry.js +3 -3
  430. package/dist/esm/bs-timepicker.entry.js +2 -2
  431. package/dist/esm/bs-toast.entry.js +1 -1
  432. package/dist/esm/bs-tooltip-trigger.entry.js +1 -1
  433. package/dist/esm/bs-tooltip.entry.js +1 -1
  434. package/dist/esm/bs-tree-item.entry.js +92 -0
  435. package/dist/esm/bs-tree.entry.js +195 -0
  436. package/dist/esm/loader.js +1 -1
  437. package/dist/types/components/bs-command-palette/bs-command-palette.cmp.test.d.ts +1 -0
  438. package/dist/types/components/bs-command-palette/bs-command-palette.d.ts +172 -0
  439. package/dist/types/components/bs-command-palette/bs-command-palette.stories.d.ts +56 -0
  440. package/dist/types/components/bs-empty-state/bs-empty-state.cmp.test.d.ts +1 -0
  441. package/dist/types/components/bs-empty-state/bs-empty-state.d.ts +50 -0
  442. package/dist/types/components/bs-empty-state/bs-empty-state.stories.d.ts +13 -0
  443. package/dist/types/components/bs-global-search/bs-global-search.cmp.test.d.ts +1 -0
  444. package/dist/types/components/bs-global-search/bs-global-search.d.ts +166 -0
  445. package/dist/types/components/bs-global-search/bs-global-search.stories.d.ts +61 -0
  446. package/dist/types/components/bs-key/bs-key.cmp.test.d.ts +1 -0
  447. package/dist/types/components/bs-key/bs-key.d.ts +36 -0
  448. package/dist/types/components/bs-key/bs-key.stories.d.ts +11 -0
  449. package/dist/types/components/bs-key-caps/bs-key-caps.cmp.test.d.ts +1 -0
  450. package/dist/types/components/bs-key-caps/bs-key-caps.d.ts +31 -0
  451. package/dist/types/components/bs-key-caps/bs-key-caps.stories.d.ts +15 -0
  452. package/dist/types/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.cmp.test.d.ts +1 -0
  453. package/dist/types/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.d.ts +95 -0
  454. package/dist/types/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.stories.d.ts +43 -0
  455. package/dist/types/components/bs-list/bs-list.cmp.test.d.ts +1 -0
  456. package/dist/types/components/bs-list/bs-list.d.ts +42 -0
  457. package/dist/types/components/bs-list/bs-list.stories.d.ts +13 -0
  458. package/dist/types/components/bs-list-item/bs-list-item.cmp.test.d.ts +1 -0
  459. package/dist/types/components/bs-list-item/bs-list-item.d.ts +85 -0
  460. package/dist/types/components/bs-list-item/bs-list-item.stories.d.ts +22 -0
  461. package/dist/types/components/bs-search-item/bs-search-item.cmp.test.d.ts +1 -0
  462. package/dist/types/components/bs-search-item/bs-search-item.d.ts +61 -0
  463. package/dist/types/components/bs-search-item/bs-search-item.stories.d.ts +13 -0
  464. package/dist/types/components/bs-shortcut-row/bs-shortcut-row.cmp.test.d.ts +1 -0
  465. package/dist/types/components/bs-shortcut-row/bs-shortcut-row.d.ts +38 -0
  466. package/dist/types/components/bs-shortcut-row/bs-shortcut-row.stories.d.ts +13 -0
  467. package/dist/types/components/bs-tree/bs-tree.cmp.test.d.ts +1 -0
  468. package/dist/types/components/bs-tree/bs-tree.d.ts +53 -0
  469. package/dist/types/components/bs-tree/bs-tree.stories.d.ts +11 -0
  470. package/dist/types/components/bs-tree-item/bs-tree-item.cmp.test.d.ts +1 -0
  471. package/dist/types/components/bs-tree-item/bs-tree-item.d.ts +60 -0
  472. package/dist/types/components/bs-tree-item/bs-tree-item.stories.d.ts +19 -0
  473. package/dist/types/components.d.ts +2700 -199
  474. package/package.json +1 -1
  475. package/reference.d.ts +36 -0
  476. package/reference.json +1076 -47
  477. package/dist/brandsync-wc/p-769c5b4a.entry.js +0 -1
  478. package/dist/brandsync-wc/p-e5f50e93.entry.js +0 -1
  479. package/dist/brandsync-wc/p-e72dd05e.entry.js +0 -1
@@ -0,0 +1,326 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-BYfMRtlW.js');
4
+
5
+ const bsGlobalSearchCss = () => `:host{display:block;position:relative;box-sizing:border-box;width:var(--bs-global-search-width);max-width:100%;--bs-global-search-width:480px;--bs-global-search-panel-radius:var(--bs-border-radius-100);--bs-global-search-panel-padding:var(--bs-spacing-100);--bs-global-search-gap:var(--bs-spacing-100);--bs-global-search-panel-bg:var(--bs-surface-base);--bs-global-search-shadow:0 var(--bs-shadow-position-50) var(--bs-shadow-blur-100) 0 var(--bs-elevation-high);--bs-global-search-z-index:var(--bs-z-index-dropdown);--bs-global-search-divider-color:var(--bs-border-default);--bs-global-search-header-border-color:var(--bs-border-neutral-container);--bs-global-search-header-color:var(--bs-text-muted);--bs-global-search-hint-color:var(--bs-text-secondary)}.bs-global-search{position:relative}.bs-global-search__field bs-input{width:100%}.bs-global-search__panel{position:absolute;top:calc(100% + var(--bs-global-search-gap));left:0;right:0;z-index:var(--bs-global-search-z-index);box-sizing:border-box;display:flex;flex-direction:column;gap:var(--bs-global-search-gap);padding:var(--bs-global-search-panel-padding);overflow:clip;border-radius:var(--bs-global-search-panel-radius);background:var(--bs-global-search-panel-bg);box-shadow:var(--bs-global-search-shadow)}.bs-global-search__list{display:flex;flex-direction:column;gap:var(--bs-global-search-gap)}.bs-global-search__section{display:flex;flex-direction:column}.bs-global-search__section-header{padding:var(--bs-spacing-150) var(--bs-spacing-150) var(--bs-spacing-100);border-bottom:1px solid var(--bs-global-search-header-border-color);color:var(--bs-global-search-header-color);font-size:var(--bs-font-size-sm);font-weight:var(--bs-font-weight-medium);line-height:20px}.bs-global-search__footer{display:flex;align-items:center;gap:var(--bs-spacing-200);padding:var(--bs-spacing-100) var(--bs-spacing-100) var(--bs-spacing-50);border-top:1px solid var(--bs-global-search-divider-color)}.bs-global-search__hint{display:inline-flex;align-items:center;gap:var(--bs-spacing-50);color:var(--bs-global-search-hint-color);font-size:var(--bs-font-size-sm);line-height:20px;white-space:nowrap}.bs-global-search__spacer{flex:1 1 0}.bs-global-search__action{display:flex;align-items:center;min-height:44px;cursor:pointer}.bs-global-search__text-button{--bs-button-height-sm:32px;--bs-button-padding-x-sm:var(--bs-spacing-150);--bs-button-radius:var(--bs-border-radius-100);--bs-button-subtle-color:var(--bs-text-default)}.bs-global-search__live{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}`;
6
+
7
+ /** Sections shown per status, in display (and keyboard) order. */
8
+ const SECTIONS = {
9
+ default: ['recent', 'jump-to'],
10
+ results: ['top-matches', 'search-in'],
11
+ empty: [],
12
+ error: [],
13
+ };
14
+ const ALL_SECTIONS = ['recent', 'jump-to', 'top-matches', 'search-in'];
15
+ let uid = 0;
16
+ const svgProps = {
17
+ viewBox: '0 0 24 24',
18
+ fill: 'none',
19
+ stroke: 'currentColor',
20
+ 'stroke-width': '1.8',
21
+ 'stroke-linecap': 'round',
22
+ 'stroke-linejoin': 'round',
23
+ 'aria-hidden': 'true',
24
+ };
25
+ const BsGlobalSearch = class {
26
+ constructor(hostRef) {
27
+ index.registerInstance(this, hostRef);
28
+ this.bsInput = index.createEvent(this, "bsInput");
29
+ this.bsSearch = index.createEvent(this, "bsSearch");
30
+ this.bsSelect = index.createEvent(this, "bsSelect");
31
+ this.bsOpenChange = index.createEvent(this, "bsOpenChange");
32
+ this.bsClearRecent = index.createEvent(this, "bsClearRecent");
33
+ this.bsClearSearch = index.createEvent(this, "bsClearSearch");
34
+ this.bsSeeAll = index.createEvent(this, "bsSeeAll");
35
+ this.bsRetry = index.createEvent(this, "bsRetry");
36
+ }
37
+ get el() { return index.getElement(this); }
38
+ id = `bs-gs-${++uid}`;
39
+ itemSeq = 0;
40
+ observer;
41
+ inputEl;
42
+ /** The query. Two-way with the field. */
43
+ value = '';
44
+ /** Placeholder of the field (also its accessible name unless `label` is set). */
45
+ placeholder = 'Search customers, orders, products…';
46
+ /** Accessible name of the search field. Falls back to the placeholder. `bs-input` has no aria-label prop, so this names the combobox wrapper. */
47
+ label;
48
+ /** Disables the field; the panel cannot open. */
49
+ disabled = false;
50
+ /** Whether the dropdown panel is open. Opens on focus, click and typing; closes on Escape, outside click and selection. */
51
+ open = false;
52
+ /** Which view the panel shows. You choose it; nothing is inferred from `value`. */
53
+ status = 'default';
54
+ /** Total number of results (status `results`): shown as "See all {n} results" and announced to screen readers. */
55
+ totalResults;
56
+ /** Shows the footer (hints and the Clear recent / See all button) for the `default` and `results` views. */
57
+ showFooter = true;
58
+ /** Accessible name of the suggestions listbox. */
59
+ listLabel = 'Search suggestions';
60
+ /** Header of the `recent` section. */
61
+ recentLabel = 'Recent searches';
62
+ /** Header of the `jump-to` section. */
63
+ jumpToLabel = 'Jump to';
64
+ /** Header of the `top-matches` section. */
65
+ topMatchesLabel = 'Top matches';
66
+ /** Header of the `search-in` section. */
67
+ searchInLabel = 'Search in';
68
+ /** Footer hint text after the arrow keys. */
69
+ navigateLabel = 'Navigate';
70
+ /** Footer hint text after the Enter key (default view). */
71
+ searchLabel = 'Search';
72
+ /** Footer hint text after the Esc key. */
73
+ closeLabel = 'Close';
74
+ /** Footer hint text after the Enter key (results view). */
75
+ fullResultsLabel = 'Full results';
76
+ /** Text of the footer button that clears recent searches. */
77
+ clearRecentLabel = 'Clear recent';
78
+ /** Text of the footer button of the results view, when `totalResults` is not set. */
79
+ seeAllLabel = 'See all results';
80
+ /** Heading of the built-in empty state. */
81
+ emptyHeading = 'No results';
82
+ /** Description of the built-in empty state. */
83
+ emptyDescription = 'Try a different search.';
84
+ /** Text of the empty state's action. */
85
+ clearSearchLabel = 'Clear search';
86
+ /** Heading of the built-in error state. */
87
+ errorHeading = 'Search isn’t available right now';
88
+ /** Description of the built-in error state. */
89
+ errorDescription = 'We couldn’t reach the server. Your query is kept — try again in a moment.';
90
+ /** Text of the error state's action. */
91
+ retryLabel = 'Try again';
92
+ /** Which sections currently have content in their slot. */
93
+ filled = { recent: false, 'jump-to': false, 'top-matches': false, 'search-in': false };
94
+ /** Id of the highlighted item. */
95
+ activeId = null;
96
+ /** Fires on every keystroke with the query. The component filters nothing itself. */
97
+ bsInput;
98
+ /** Fires on Enter with no highlighted item, with the query. */
99
+ bsSearch;
100
+ /** Fires when an item is chosen (click or Enter), with its `value` and section (slot name). */
101
+ bsSelect;
102
+ /** Fires when the panel opens or closes through user interaction, with the new state. */
103
+ bsOpenChange;
104
+ /** Fires when "Clear recent" is pressed. */
105
+ bsClearRecent;
106
+ /** Fires when the empty state's "Clear search" is pressed; the value is also cleared. */
107
+ bsClearSearch;
108
+ /** Fires when "See all results" is pressed. */
109
+ bsSeeAll;
110
+ /** Fires when the error state's "Try again" is pressed. */
111
+ bsRetry;
112
+ resetActive() {
113
+ this.activeId = null;
114
+ }
115
+ componentWillLoad() {
116
+ this.readFilled();
117
+ this.prepareItems();
118
+ }
119
+ connectedCallback() {
120
+ document.addEventListener('pointerdown', this.onDocPointerDown, true);
121
+ this.observer = new MutationObserver(() => {
122
+ this.readFilled();
123
+ this.prepareItems();
124
+ this.paintActive();
125
+ });
126
+ this.observer.observe(this.el, { childList: true });
127
+ }
128
+ disconnectedCallback() {
129
+ document.removeEventListener('pointerdown', this.onDocPointerDown, true);
130
+ this.observer?.disconnect();
131
+ }
132
+ componentDidRender() {
133
+ this.prepareItems();
134
+ this.paintActive();
135
+ }
136
+ allItems() {
137
+ return Array.from(this.el.children).filter(c => c.tagName === 'BS-SEARCH-ITEM' && ALL_SECTIONS.includes(c.getAttribute('slot')));
138
+ }
139
+ /** Visible items, section by section (display order), then DOM order within a section. */
140
+ visibleItems() {
141
+ if (!this.open)
142
+ return [];
143
+ const items = this.allItems();
144
+ return (SECTIONS[this.status] ?? []).flatMap(s => items.filter(i => i.getAttribute('slot') === s));
145
+ }
146
+ enabledItems() {
147
+ return this.visibleItems().filter(i => !i.disabled);
148
+ }
149
+ readFilled() {
150
+ const next = { ...this.filled };
151
+ let changed = false;
152
+ for (const s of ALL_SECTIONS) {
153
+ const has = Array.from(this.el.children).some(c => c.getAttribute('slot') === s);
154
+ if (next[s] !== has) {
155
+ next[s] = has;
156
+ changed = true;
157
+ }
158
+ }
159
+ if (changed)
160
+ this.filled = next;
161
+ }
162
+ /** Gives every item the option role and a stable id, like `bs-list` does for its rows. */
163
+ prepareItems() {
164
+ for (const item of this.allItems()) {
165
+ if (item.selectionRole !== 'option')
166
+ item.selectionRole = 'option';
167
+ if (!item.id)
168
+ item.id = `${this.id}-opt-${++this.itemSeq}`;
169
+ }
170
+ }
171
+ paintActive() {
172
+ for (const item of this.allItems()) {
173
+ const on = !!this.activeId && item.id === this.activeId;
174
+ if (item.active !== on)
175
+ item.active = on;
176
+ }
177
+ }
178
+ setOpen(next) {
179
+ if (next && this.disabled)
180
+ return;
181
+ if (this.open === next)
182
+ return;
183
+ this.open = next;
184
+ this.bsOpenChange.emit(next);
185
+ }
186
+ setActive(item) {
187
+ this.activeId = item ? item.id : null;
188
+ this.paintActive();
189
+ item?.scrollIntoView?.({ block: 'nearest' });
190
+ }
191
+ onDocPointerDown = (ev) => {
192
+ if (!this.open)
193
+ return;
194
+ if (!ev.composedPath().includes(this.el))
195
+ this.setOpen(false);
196
+ };
197
+ onInput = (ev) => {
198
+ // The inner bs-input's own bsInput would bubble out of this host too; ours replaces it.
199
+ ev.stopPropagation();
200
+ this.value = ev.detail;
201
+ this.activeId = null;
202
+ this.bsInput.emit(ev.detail);
203
+ this.setOpen(true);
204
+ };
205
+ onKeyDown = (ev) => {
206
+ switch (ev.key) {
207
+ case 'ArrowDown':
208
+ case 'ArrowUp': {
209
+ ev.preventDefault();
210
+ if (!this.open) {
211
+ this.setOpen(true);
212
+ return;
213
+ }
214
+ const items = this.enabledItems();
215
+ if (!items.length)
216
+ return;
217
+ const idx = items.findIndex(i => i.id === this.activeId);
218
+ const down = ev.key === 'ArrowDown';
219
+ const next = down ? (idx + 1) % items.length : idx <= 0 ? items.length - 1 : idx - 1;
220
+ this.setActive(items[next]);
221
+ return;
222
+ }
223
+ case 'Enter': {
224
+ const active = this.open ? this.enabledItems().find(i => i.id === this.activeId) : undefined;
225
+ if (active) {
226
+ ev.preventDefault();
227
+ active.click();
228
+ }
229
+ else {
230
+ this.bsSearch.emit(this.value);
231
+ this.setOpen(false);
232
+ }
233
+ return;
234
+ }
235
+ case 'Escape':
236
+ if (this.open) {
237
+ // Native search fields clear themselves on Escape; the first Escape only closes.
238
+ ev.preventDefault();
239
+ ev.stopPropagation();
240
+ this.setOpen(false);
241
+ }
242
+ return;
243
+ }
244
+ };
245
+ onItemSelect(ev) {
246
+ const item = ev.target;
247
+ if (!item || item.tagName !== 'BS-SEARCH-ITEM')
248
+ return;
249
+ ev.stopPropagation();
250
+ this.bsSelect.emit({ value: ev.detail, section: item.getAttribute('slot') ?? '' });
251
+ this.setOpen(false);
252
+ }
253
+ onPanelMouseOver = (ev) => {
254
+ const item = ev.composedPath().find(n => n.tagName === 'BS-SEARCH-ITEM');
255
+ if (item && !item.disabled && item.id !== this.activeId)
256
+ this.setActive(item);
257
+ };
258
+ clearSearch = () => {
259
+ this.value = '';
260
+ this.bsClearSearch.emit();
261
+ this.inputEl?.focus();
262
+ };
263
+ sectionLabel(s) {
264
+ return { recent: this.recentLabel, 'jump-to': this.jumpToLabel, 'top-matches': this.topMatchesLabel, 'search-in': this.searchInLabel }[s];
265
+ }
266
+ renderHint(keys, label) {
267
+ return (index.h("span", { part: "hint", class: "bs-global-search__hint" }, keys, index.h("span", { class: "bs-global-search__hint-text" }, label)));
268
+ }
269
+ renderFooter() {
270
+ const hasTotal = typeof this.totalResults === 'number';
271
+ const enter = (index.h("bs-key", null, index.h("svg", { slot: "icon", ...svgProps }, index.h("path", { d: "M9 14 4 9l5-5" }), index.h("path", { d: "M4 9h10.5a5.5 5.5 0 0 1 0 11H11" }))));
272
+ if (this.status === 'results') {
273
+ return (index.h("div", { part: "footer", class: "bs-global-search__footer" }, index.h("div", { part: "see-all", class: "bs-global-search__action", onClick: this.onActionWrapperClick(() => this.seeAll()) }, index.h("bs-button", { class: "bs-global-search__text-button", variant: "subtle", size: "sm", onClick: () => this.seeAll() }, hasTotal ? `See all ${this.totalResults} results` : this.seeAllLabel)), index.h("span", { class: "bs-global-search__spacer" }), this.renderHint([enter], this.fullResultsLabel)));
274
+ }
275
+ return (index.h("div", { part: "footer", class: "bs-global-search__footer" }, this.renderHint([
276
+ index.h("bs-key", null, index.h("svg", { slot: "icon", ...svgProps }, index.h("path", { d: "M12 19V5M5 12l7-7 7 7" }))),
277
+ index.h("bs-key", null, index.h("svg", { slot: "icon", ...svgProps }, index.h("path", { d: "M12 5v14M5 12l7 7 7-7" }))),
278
+ ], this.navigateLabel), this.renderHint([enter], this.searchLabel), this.renderHint([index.h("bs-key", { label: "Esc" })], this.closeLabel), index.h("span", { class: "bs-global-search__spacer" }), this.filled.recent && (index.h("div", { part: "clear-recent", class: "bs-global-search__action", onClick: this.onActionWrapperClick(() => this.bsClearRecent.emit()) }, index.h("bs-button", { class: "bs-global-search__text-button", variant: "subtle", size: "sm", onClick: () => this.bsClearRecent.emit() }, this.clearRecentLabel)))));
279
+ }
280
+ seeAll() {
281
+ this.bsSeeAll.emit();
282
+ this.setOpen(false);
283
+ }
284
+ /** Makes the whole 44px wrapper clickable while the button itself is 32px high. */
285
+ onActionWrapperClick = (fn) => (ev) => {
286
+ if (ev.target === ev.currentTarget)
287
+ fn();
288
+ };
289
+ renderStateBlock(kind) {
290
+ const isEmpty = kind === 'empty';
291
+ return (index.h("slot", { name: kind }, index.h("bs-empty-state", { part: "empty", intent: isEmpty ? 'default' : 'error', heading: isEmpty ? this.emptyHeading : this.errorHeading, description: isEmpty ? this.emptyDescription : this.errorDescription }, isEmpty ? (index.h("svg", { slot: "icon", ...svgProps }, index.h("circle", { cx: "11", cy: "11", r: "7" }), index.h("path", { d: "m20 20-3.5-3.5" }))) : (index.h("svg", { slot: "icon", ...svgProps }, index.h("circle", { cx: "12", cy: "12", r: "9" }), index.h("path", { d: "M12 7.5v5M12 16.2v.1" }))), index.h("bs-button", { slot: "action", variant: "outlined", onClick: () => (isEmpty ? this.clearSearch() : this.bsRetry.emit()) }, isEmpty ? this.clearSearchLabel : this.retryLabel))));
292
+ }
293
+ announcement() {
294
+ if (!this.open)
295
+ return '';
296
+ if (this.status === 'results')
297
+ return typeof this.totalResults === 'number' ? `${this.totalResults} results` : '';
298
+ if (this.status === 'empty')
299
+ return this.emptyHeading;
300
+ if (this.status === 'error')
301
+ return this.errorHeading;
302
+ return '';
303
+ }
304
+ render() {
305
+ const sections = (SECTIONS[this.status] ?? []).filter(s => this.filled[s]);
306
+ const showList = sections.length > 0;
307
+ const listId = `${this.id}-listbox`;
308
+ const isList = this.status === 'default' || this.status === 'results';
309
+ const showFooter = this.showFooter && isList;
310
+ return (index.h("div", { key: 'dd4477e08b51d52d5309150c4e95f0e560411a05', class: "bs-global-search" }, index.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) }, index.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 && (index.h("div", { key: 'f85e3f63bf82a5de2648e8fa60f4fd4df288ec3b', part: "panel", class: "bs-global-search__panel", onMouseDown: (ev) => ev.preventDefault(), onMouseOver: this.onPanelMouseOver }, isList && showList && (index.h("div", { key: 'cc926315b2b1d2ad62026531a4174cb84df713a8', id: listId, class: "bs-global-search__list", role: "listbox", "aria-label": this.listLabel }, sections.map(s => {
311
+ const hid = `${this.id}-h-${s}`;
312
+ return (index.h("div", { part: "section", class: "bs-global-search__section", role: "group", "aria-labelledby": hid }, index.h("div", { part: "section-header", id: hid, class: "bs-global-search__section-header" }, this.sectionLabel(s)), index.h("slot", { name: s })));
313
+ }))), this.status === 'empty' && this.renderStateBlock('empty'), this.status === 'error' && this.renderStateBlock('error'), showFooter && this.renderFooter())), index.h("span", { key: '4bf9f7fc2a00853aee7b48328819ef0a9181d668', class: "bs-global-search__live", "aria-live": "polite" }, this.announcement())));
314
+ }
315
+ static get watchers() { return {
316
+ "status": [{
317
+ "resetActive": 0
318
+ }],
319
+ "open": [{
320
+ "resetActive": 0
321
+ }]
322
+ }; }
323
+ };
324
+ BsGlobalSearch.style = bsGlobalSearchCss();
325
+
326
+ exports.bs_global_search = BsGlobalSearch;
@@ -42,12 +42,12 @@ const BsGrid = class {
42
42
  const row = this.rowGap ? this.token(this.rowGap) : gapValue;
43
43
  const col = this.columnGap ? this.token(this.columnGap) : gapValue;
44
44
  const align = ALIGNS.includes(this.align) ? this.align : 'stretch';
45
- return (index.h("div", { key: 'a89d345eac5d88dd24b21606eb35b1f21e1b54dd', class: "bs-grid", part: "container", style: {
45
+ return (index.h("div", { key: '0799adbc2484f270db8ca5c2cadc1a0ec55ecbc0', class: "bs-grid", part: "container", style: {
46
46
  gridTemplateColumns: this.template(),
47
47
  rowGap: `var(--bs-grid-row-gap, ${row})`,
48
48
  columnGap: `var(--bs-grid-column-gap, ${col})`,
49
49
  alignItems: align,
50
- } }, index.h("slot", { key: 'f5676a0cc12cf0fafc04045b4fed50aee50d2995' })));
50
+ } }, index.h("slot", { key: '90d4940c5b1870df9eaae616f8fbe3738f025a3b' })));
51
51
  }
52
52
  };
53
53
  BsGrid.style = bsGridCss();
@@ -49,7 +49,7 @@ const BsIconButton = class {
49
49
  form.reset();
50
50
  };
51
51
  render() {
52
- return (index.h("button", { key: '285e98b32bc33089125e07f14c84b8c72cdc853b', class: `bs-icon-button bs-icon-button--${this.variant} bs-icon-button--${this.size}`, type: this.type, disabled: this.disabled, "aria-label": this.ariaLabel, onClick: this.onClick }, index.h("span", { key: 'd91ec40e2d3e99ee3894e5c5c58f5b209b2ef545', part: "icon", class: "bs-icon-button__icon" }, index.h("slot", { key: '6718a31a0f5f20bed9a5c682ddf0e6d1b703748b' }))));
52
+ return (index.h("button", { key: '75325bed02f38716052a4341a971ed429355d615', class: `bs-icon-button bs-icon-button--${this.variant} bs-icon-button--${this.size}`, type: this.type, disabled: this.disabled, "aria-label": this.ariaLabel, onClick: this.onClick }, index.h("span", { key: 'a427c213e0bbf3ee96698917ffc127d1d4d15de8', part: "icon", class: "bs-icon-button__icon" }, index.h("slot", { key: 'b46bf34d3fb24e9b899ba52fbd2ca39a49c634d3' }))));
53
53
  }
54
54
  static get delegatesFocus() { return true; }
55
55
  static get formAssociated() { return true; }
@@ -22,8 +22,8 @@ const BsIconTile = class {
22
22
  render() {
23
23
  const labelled = !!this.label;
24
24
  return [
25
- index.h("div", { key: '47586c94633cb072243559352fff92ffc178b59e', part: "container", class: "bs-icon-tile", role: labelled ? 'img' : undefined, "aria-label": labelled ? this.label : undefined, "aria-hidden": labelled ? undefined : 'true' }, index.h("span", { key: 'af1f942a94eed409beaaf6845eee09003ef70fd4', part: "icon", class: "bs-icon-tile__icon" }, index.h("slot", { key: 'be9df10596772e84a65d4de467117ea6c6a13c29', onSlotchange: (ev) => (this.hasCustomIcon = hasContent(ev.target)) }), !this.hasCustomIcon && (GLYPHS[this.intent] ?? GLYPHS.default))),
26
- index.h("span", { key: '0522505b1001e511e5c2446025a05b6e80ef0176', part: "text", class: { 'bs-icon-tile__text': true, 'bs-icon-tile__text--visible': this.hasText } }, index.h("slot", { key: '0fc0bb97e5b23a984bcd64eafc0133eb93782c2f', name: "text", onSlotchange: (ev) => (this.hasText = ev.target.assignedNodes().length > 0) })),
25
+ index.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' }, index.h("span", { key: 'e27206a1f0ef5a05183863c952c631614e44b591', part: "icon", class: "bs-icon-tile__icon" }, index.h("slot", { key: '31c4cd875c08f01b04d1fbc8b27dbb471c383129', onSlotchange: (ev) => (this.hasCustomIcon = hasContent(ev.target)) }), !this.hasCustomIcon && (GLYPHS[this.intent] ?? GLYPHS.default))),
26
+ index.h("span", { key: 'fcc4dbeff34fa2de817619963ec0ec2597d04db3', part: "text", class: { 'bs-icon-tile__text': true, 'bs-icon-tile__text--visible': this.hasText } }, index.h("slot", { key: '24509194d7cb291ee7930039f42dcea780f0bcf3', name: "text", onSlotchange: (ev) => (this.hasText = ev.target.assignedNodes().length > 0) })),
27
27
  ];
28
28
  }
29
29
  };
@@ -69,7 +69,7 @@ const BsInlineTab = class {
69
69
  };
70
70
  render() {
71
71
  const iconOnly = this.hasIcon && !this.hasLabel;
72
- return (index.h("button", { key: '4b8df7a5f37f0aad60679cbdd3bd03cb20482ba7', type: "button", part: "tab", role: "tab", class: `bs-inline-tab ${this.selected ? 'bs-inline-tab--selected' : ''} ${this.disabled ? 'bs-inline-tab--disabled' : ''} ${iconOnly ? 'bs-inline-tab--icon-only' : ''} ${this.hasIcon ? 'bs-inline-tab--has-icon' : ''}`, disabled: this.disabled, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? 'true' : undefined, "aria-label": this.ariaLabel, tabIndex: this.tabbable === undefined ? undefined : this.tabbable ? 0 : -1, onClick: this.onClick }, index.h("span", { key: '037cdaae4331e050b5c02083d1776bb5509ff92b', part: "icon", class: `bs-inline-tab__icon ${this.hasIcon ? 'bs-inline-tab__icon--has-content' : ''}` }, index.h("slot", { key: '3b67b01e65434c35545fc9f06dab7bb871362001', name: "icon", onSlotchange: this.onIconSlotchange })), index.h("span", { key: 'd41611429e951d13df23521f938217716f2afacd', part: "label", class: `bs-inline-tab__label ${this.hasLabel ? 'bs-inline-tab__label--has-content' : ''}` }, index.h("slot", { key: '8ea82e8ecc120c9961b8288a1162ec03ac0223bf', onSlotchange: this.onLabelSlotchange }))));
72
+ return (index.h("button", { key: 'ec19773b2ad2363cb5f6dc1f3f845db3755c3d13', type: "button", part: "tab", role: "tab", class: `bs-inline-tab ${this.selected ? 'bs-inline-tab--selected' : ''} ${this.disabled ? 'bs-inline-tab--disabled' : ''} ${iconOnly ? 'bs-inline-tab--icon-only' : ''} ${this.hasIcon ? 'bs-inline-tab--has-icon' : ''}`, disabled: this.disabled, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? 'true' : undefined, "aria-label": this.ariaLabel, tabIndex: this.tabbable === undefined ? undefined : this.tabbable ? 0 : -1, onClick: this.onClick }, index.h("span", { key: '561fa96dd2f01fe03b1bdb30675be98aec9e33ef', part: "icon", class: `bs-inline-tab__icon ${this.hasIcon ? 'bs-inline-tab__icon--has-content' : ''}` }, index.h("slot", { key: 'c1f0d97a04e41fccd22fb412b3019fd0d63b0cc6', name: "icon", onSlotchange: this.onIconSlotchange })), index.h("span", { key: '07f4873273ef9e91c472344bbdf97b6915d4b14f', part: "label", class: `bs-inline-tab__label ${this.hasLabel ? 'bs-inline-tab__label--has-content' : ''}` }, index.h("slot", { key: '3bc180fa828034358155abd397aa68661f09fcf3', onSlotchange: this.onLabelSlotchange }))));
73
73
  }
74
74
  };
75
75
  BsInlineTab.style = bsInlineTabCss();
@@ -368,10 +368,10 @@ const BsInput = class {
368
368
  return (index.h("div", { part: "field", class: `bs-input__field bs-input__field--pin ${errorClass} ${disabledClass}` }, Array.from({ length: this.length }).map((_, i) => (index.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) })))));
369
369
  }
370
370
  render() {
371
- return (index.h("div", { key: 'ec191e3590785654e3701c7c49b1643f671dcc16', class: `bs-input ${this.error ? 'bs-input--error' : ''}` }, this.label && (
371
+ return (index.h("div", { key: '99df53d78ddc715d336738a27efeb3d64140a9c7', class: `bs-input ${this.error ? 'bs-input--error' : ''}` }, this.label && (
372
372
  // "control" is a fixed id, not a generated one -- safe because Shadow DOM scopes ids
373
373
  // to this instance's own shadow root, so it can never collide with another bs-input.
374
- index.h("label", { key: '264558031d7bdf104254724ad1891c893668da60', part: "label", class: "bs-input__label", htmlFor: "control" }, this.label, this.required && (index.h("span", { key: '225d41e84484f1f160765a9f01e49a0bd850650c', part: "required", class: "bs-input__required", "aria-hidden": "true" }, "*")))), this.type === 'pin' ? this.renderPinField() : this.type === 'initials' ? this.renderInitialsField() : this.renderField(), this.error ? (index.h("span", { id: "description-or-error", part: "error", class: "bs-input__error" }, index.h("svg", { part: "error-icon", class: "bs-input__error-icon", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, index.h("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", "stroke-width": "1.2" }), index.h("path", { d: "M8 5V8.5", stroke: "currentColor", "stroke-width": "1.2", "stroke-linecap": "round" }), index.h("circle", { cx: "8", cy: "11", r: "0.75", fill: "currentColor" })), this.error)) : this.description ? (index.h("span", { id: "description-or-error", part: "description", class: "bs-input__description" }, this.description)) : null));
374
+ index.h("label", { key: '27f894fedaf23ded0432d9f26e80a9dd4d2bbb8e', part: "label", class: "bs-input__label", htmlFor: "control" }, this.label, this.required && (index.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 ? (index.h("span", { id: "description-or-error", part: "error", class: "bs-input__error" }, index.h("svg", { part: "error-icon", class: "bs-input__error-icon", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, index.h("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", "stroke-width": "1.2" }), index.h("path", { d: "M8 5V8.5", stroke: "currentColor", "stroke-width": "1.2", "stroke-linecap": "round" }), index.h("circle", { cx: "8", cy: "11", r: "0.75", fill: "currentColor" })), this.error)) : this.description ? (index.h("span", { id: "description-or-error", part: "description", class: "bs-input__description" }, this.description)) : null));
375
375
  }
376
376
  static get delegatesFocus() { return true; }
377
377
  static get formAssociated() { return true; }
@@ -422,7 +422,7 @@ const BsMenu = class {
422
422
  items[next].shadowRoot?.querySelector('button')?.focus();
423
423
  }
424
424
  render() {
425
- return (index.h("div", { key: 'e886c7df63af6d741175aa81bc6390be600e371b', part: "list", class: "bs-menu", role: "menu" }, index.h("slot", { key: '365eae17c25fd6a3cc69c9ff01a28ce81eca11f8' })));
425
+ return (index.h("div", { key: '8acfe07941922ce4ad0bbb5eef11bb6eecba2c08', part: "list", class: "bs-menu", role: "menu" }, index.h("slot", { key: 'a3482ba2653512937d3c1f2b4fa798f1bd81859c' })));
426
426
  }
427
427
  };
428
428
  BsMenu.style = bsMenuCss();
@@ -451,7 +451,7 @@ const BsMenuItem = class {
451
451
  this.bsSelect.emit();
452
452
  };
453
453
  render() {
454
- return (index.h("button", { key: '2d4a54df61b047dab4531362aee81f5d9728818b', type: "button", part: "item", role: "menuitem", class: `bs-menu-item ${this.disabled ? 'bs-menu-item--disabled' : ''}`, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : undefined, onClick: this.onClick }, index.h("span", { key: '5ddaa17999d79962d279b927d659f592a2dccc81', part: "icon", class: `bs-menu-item__icon ${this.hasIcon ? 'bs-menu-item__icon--has-content' : ''}` }, index.h("slot", { key: '41033aa1950751d8565eec3d04af3570120cda58', name: "icon", onSlotchange: this.onIconSlotchange })), index.h("span", { key: 'eb077b5082815adee640c53fa4396cccf1d81cad', part: "label", class: "bs-menu-item__label" }, index.h("slot", { key: 'cfb15ca71fd157aebfb0380e2eaac791bd50b051' }))));
454
+ return (index.h("button", { key: '09c4e8582ce6a31ff4aa293e20c3d7f1caa6e845', type: "button", part: "item", role: "menuitem", class: `bs-menu-item ${this.disabled ? 'bs-menu-item--disabled' : ''}`, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : undefined, onClick: this.onClick }, index.h("span", { key: 'ecfc57bc3eab836edd5f0ef0d009da8ccbbce563', part: "icon", class: `bs-menu-item__icon ${this.hasIcon ? 'bs-menu-item__icon--has-content' : ''}` }, index.h("slot", { key: '8eb2a0b480c7fbe7aa17ec5cd193764353a394e9', name: "icon", onSlotchange: this.onIconSlotchange })), index.h("span", { key: 'e67b7512fd58b0e0847b5d3d14658cfc1bd4a00c', part: "label", class: "bs-menu-item__label" }, index.h("slot", { key: '466a45cb85e7cdadde2fb994243689873482d65c' }))));
455
455
  }
456
456
  };
457
457
  BsMenuItem.style = bsMenuItemCss();
@@ -0,0 +1,39 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-BYfMRtlW.js');
4
+
5
+ const bsKeyCapsCss = () => `:host{display:inline-block;--bs-key-caps-gap:var(--bs-spacing-100);--bs-key-caps-separator-color:var(--bs-text-muted);--bs-key-caps-disabled-opacity:0.38}.bs-key-caps{display:inline-flex;align-items:center;gap:var(--bs-key-caps-gap)}.bs-key-caps bs-key:not(:first-child)::before,::slotted(bs-key:not(:first-child))::before{content:'+';color:var(--bs-key-caps-separator-color);font-size:var(--bs-font-size-xs);line-height:calc(var(--bs-line-height-caption-sm) * 1px)}:host([disabled]) .bs-key-caps{opacity:var(--bs-key-caps-disabled-opacity)}`;
6
+
7
+ const BsKeyCaps = class {
8
+ constructor(hostRef) {
9
+ index.registerInstance(this, hostRef);
10
+ }
11
+ /**
12
+ * The keys as text. A string is split on `+` (`"Ctrl+K"`); use an array to include a literal
13
+ * plus key. Ignored when `bs-key` elements are slotted instead. Figma defines one to four keys.
14
+ */
15
+ keys;
16
+ /** Dims the whole shortcut and marks it `aria-disabled`. */
17
+ disabled = false;
18
+ /** Accessible name of the shortcut, e.g. "Control plus K". Defaults to the keys joined with " plus ". */
19
+ label;
20
+ keyList() {
21
+ if (Array.isArray(this.keys))
22
+ return this.keys.filter(k => k !== '');
23
+ if (typeof this.keys === 'string') {
24
+ return this.keys
25
+ .split('+')
26
+ .map(k => k.trim())
27
+ .filter(Boolean);
28
+ }
29
+ return [];
30
+ }
31
+ render() {
32
+ const keys = this.keyList();
33
+ const name = this.label ?? (keys.length ? keys.join(' plus ') : undefined);
34
+ return (index.h("span", { key: 'd2396eec919fbad20d6152faf4786d1bcfac9042', part: "container", class: "bs-key-caps", role: "group", "aria-label": name, "aria-disabled": this.disabled ? 'true' : undefined }, keys.map(k => (index.h("bs-key", { label: k }))), index.h("slot", { key: '9f4facb9f8d6ce6079facc16d260a41f48e54470' })));
35
+ }
36
+ };
37
+ BsKeyCaps.style = bsKeyCapsCss();
38
+
39
+ exports.bs_key_caps = BsKeyCaps;
@@ -0,0 +1,28 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-BYfMRtlW.js');
4
+
5
+ const bsKeyCss = () => `:host{display:inline-flex;align-items:center;gap:var(--bs-spacing-100);--bs-key-bg:var(--bs-surface-base);--bs-key-border-color:var(--bs-border-default);--bs-key-radius:var(--bs-border-radius-50);--bs-key-padding-x:var(--bs-spacing-75);--bs-key-padding-y:var(--bs-spacing-50);--bs-key-min-width:25px;--bs-key-color:var(--bs-text-secondary);--bs-key-font-size:var(--bs-font-size-xs);--bs-key-icon-size:16px}.bs-key{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-width:var(--bs-key-min-width);padding:var(--bs-key-padding-y) var(--bs-key-padding-x);background:var(--bs-key-bg);border:1px solid var(--bs-key-border-color);border-radius:var(--bs-key-radius);color:var(--bs-key-color);font-family:inherit;font-size:var(--bs-key-font-size);font-weight:var(--bs-font-weight-regular);line-height:calc(var(--bs-line-height-caption-sm) * 1px);text-align:center;white-space:nowrap}.bs-key__label{display:block}.bs-key__icon{display:inline-flex;align-items:center;justify-content:center;width:var(--bs-key-icon-size);height:var(--bs-key-icon-size)}.bs-key__icon--hidden{display:none}.bs-key__icon ::slotted(*){display:block;width:100%;height:100%}`;
6
+
7
+ const BsKey = class {
8
+ constructor(hostRef) {
9
+ index.registerInstance(this, hostRef);
10
+ }
11
+ get el() { return index.getElement(this); }
12
+ /** The key's text, e.g. `Ctrl`. The default slot overrides it. */
13
+ label;
14
+ /** Tracks whether the `icon` slot has content, so the label is replaced by the icon. */
15
+ hasIcon = false;
16
+ componentWillLoad() {
17
+ this.hasIcon = Array.from(this.el.children).some(c => c.getAttribute('slot') === 'icon');
18
+ }
19
+ onIconSlotChange = (ev) => {
20
+ this.hasIcon = ev.target.assignedNodes().length > 0;
21
+ };
22
+ render() {
23
+ return (index.h("kbd", { key: 'ebd13e9ce82e11cb2868adaf1d9dfc38a261bf26', part: "container", class: "bs-key" }, !this.hasIcon && (index.h("span", { key: 'abb27af837ff8a82bc976841a04a2ef3d0386cdd', part: "label", class: "bs-key__label" }, index.h("slot", { key: 'e28affc720c80cf40edba55229e7df67e79a579b' }, this.label))), index.h("span", { key: 'c88fb0200102cfcd6e3b3b84218de6fcfddf06b8', part: "icon", class: { 'bs-key__icon': true, 'bs-key__icon--hidden': !this.hasIcon } }, index.h("slot", { key: '4043e70a46538183913b6275ba569fb75c078c27', name: "icon", onSlotchange: this.onIconSlotChange }))));
24
+ }
25
+ };
26
+ BsKey.style = bsKeyCss();
27
+
28
+ exports.bs_key = BsKey;
@@ -0,0 +1,112 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-BYfMRtlW.js');
4
+
5
+ const bsKeyboardShortcutsCss = () => `:host{display:block;width:var(--bs-keyboard-shortcuts-width);min-width:var(--bs-keyboard-shortcuts-width);box-sizing:border-box;--bs-keyboard-shortcuts-width:720px;--bs-keyboard-shortcuts-bg:var(--bs-surface-base);--bs-keyboard-shortcuts-radius:var(--bs-border-radius-150);--bs-keyboard-shortcuts-padding:var(--bs-spacing-200);--bs-keyboard-shortcuts-gap:var(--bs-spacing-200);--bs-keyboard-shortcuts-shadow:0 var(--bs-shadow-position-100) var(--bs-shadow-blur-100) 0 var(--bs-elevation-higher);--bs-keyboard-shortcuts-column-gap:var(--bs-spacing-600);--bs-keyboard-shortcuts-color:var(--bs-text-default);--bs-keyboard-shortcuts-color-secondary:var(--bs-text-secondary)}.bs-keyboard-shortcuts{display:block;--bs-card-bg:var(--bs-keyboard-shortcuts-bg);--bs-card-radius:var(--bs-keyboard-shortcuts-radius);--bs-card-padding:var(--bs-keyboard-shortcuts-padding);--bs-card-shadow:var(--bs-keyboard-shortcuts-shadow);--bs-card-overflow:visible;color:var(--bs-keyboard-shortcuts-color)}.bs-keyboard-shortcuts__body{display:flex;flex-direction:column;gap:var(--bs-keyboard-shortcuts-gap)}.bs-keyboard-shortcuts__head{display:flex;align-items:center;gap:var(--bs-spacing-100)}.bs-keyboard-shortcuts__icon{flex-shrink:0;color:var(--bs-keyboard-shortcuts-color)}.bs-keyboard-shortcuts__heading{flex:1;margin:0;color:var(--bs-keyboard-shortcuts-color);font-size:var(--bs-font-size-2xl);font-weight:var(--bs-font-weight-bold);line-height:calc(var(--bs-line-height-heading-h4) * 1px)}.bs-keyboard-shortcuts__switch{display:flex;align-items:center;gap:var(--bs-spacing-200)}.bs-keyboard-shortcuts__switch-text{flex:1;display:flex;flex-direction:column;gap:var(--bs-spacing-25)}.bs-keyboard-shortcuts__switch-title{color:var(--bs-keyboard-shortcuts-color);font-size:var(--bs-font-size-sm);font-weight:var(--bs-font-weight-medium);line-height:calc(var(--bs-line-height-body-sm) * 1px)}.bs-keyboard-shortcuts__switch-caption{color:var(--bs-keyboard-shortcuts-color-secondary);font-size:var(--bs-font-size-xs);line-height:calc(var(--bs-line-height-caption-sm) * 1px)}.bs-keyboard-shortcuts__live{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.bs-keyboard-shortcuts__groups{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));column-gap:var(--bs-keyboard-shortcuts-column-gap);align-items:start}.bs-keyboard-shortcuts__column{display:flex;flex-direction:column;gap:var(--bs-spacing-200);min-width:0}.bs-keyboard-shortcuts__group{display:flex;flex-direction:column;gap:var(--bs-spacing-25)}.bs-keyboard-shortcuts__group-title{color:var(--bs-keyboard-shortcuts-color-secondary);font-size:var(--bs-font-size-xs);font-weight:var(--bs-font-weight-semibold);line-height:calc(var(--bs-line-height-caption-sm) * 1px)}.bs-keyboard-shortcuts__rows{display:flex;flex-direction:column;gap:var(--bs-spacing-25)}.bs-keyboard-shortcuts__empty{margin:0;color:var(--bs-keyboard-shortcuts-color-secondary);font-size:var(--bs-font-size-sm);line-height:calc(var(--bs-line-height-body-sm) * 1px)}.bs-keyboard-shortcuts__footer{display:flex;align-items:center;gap:var(--bs-spacing-75);color:var(--bs-keyboard-shortcuts-color-secondary);font-size:var(--bs-font-size-xs);line-height:calc(var(--bs-line-height-caption-sm) * 1px);white-space:nowrap}`;
6
+
7
+ let uid = 0;
8
+ const keyList = (keys) => Array.isArray(keys)
9
+ ? keys.filter(k => k !== '')
10
+ : String(keys ?? '')
11
+ .split('+')
12
+ .map(k => k.trim())
13
+ .filter(Boolean);
14
+ const isSingleKey = (s) => {
15
+ if (s.singleKey !== undefined)
16
+ return s.singleKey;
17
+ const k = keyList(s.keys);
18
+ return k.length === 1 && k[0].length === 1;
19
+ };
20
+ const BsKeyboardShortcuts = class {
21
+ constructor(hostRef) {
22
+ index.registerInstance(this, hostRef);
23
+ this.bsClose = index.createEvent(this, "bsClose");
24
+ this.bsQueryChange = index.createEvent(this, "bsQueryChange");
25
+ this.bsSingleKeyChange = index.createEvent(this, "bsSingleKeyChange");
26
+ }
27
+ id = `bs-ks-${++uid}`;
28
+ /** Property only: the shortcut groups. */
29
+ groups = [];
30
+ /** Heading text. The `heading` slot overrides it. */
31
+ heading = 'Keyboard shortcuts';
32
+ /** Accessible name of the close button. */
33
+ closeLabel = 'Close';
34
+ /** Search field placeholder (also its accessible name: `bs-input` has no aria-label prop). */
35
+ searchPlaceholder = 'Search for an action';
36
+ /** Current search text. Filters by action or keys text, case-insensitively. */
37
+ query = '';
38
+ /** Shows the single-key switch row. */
39
+ showSingleKeySwitch = true;
40
+ /** Whether single-key shortcuts are on. When off they are shown dimmed. */
41
+ singleKeyEnabled = true;
42
+ /** Switch title. */
43
+ singleKeyLabel = 'Single-key shortcuts';
44
+ /** Switch caption. */
45
+ singleKeyDescription = 'Turn off if they clash with a screen reader or other tools.';
46
+ /** Shows the footer hint. */
47
+ showFooterHint = true;
48
+ /** The key shown in the footer hint. */
49
+ footerKey = '?';
50
+ /** Footer text after the key. */
51
+ footerText = 'anywhere to open this list. On Mac: Cmd instead of Ctrl.';
52
+ /** Text before the footer key. */
53
+ footerPrefix = 'Press';
54
+ /** Line shown when the query matches nothing. */
55
+ noResultsText = 'No shortcuts match';
56
+ /** Emitted by the close button and by Escape. */
57
+ bsClose;
58
+ /** Emitted when the search text changes, with the new text. */
59
+ bsQueryChange;
60
+ /** Emitted when the single-key switch changes, with the new value. */
61
+ bsSingleKeyChange;
62
+ visibleGroups() {
63
+ const q = (this.query ?? '').trim().toLowerCase();
64
+ const groups = this.groups ?? [];
65
+ if (!q)
66
+ return groups.filter(g => g.shortcuts?.length);
67
+ return groups
68
+ .map(g => ({
69
+ ...g,
70
+ shortcuts: (g.shortcuts ?? []).filter(s => s.action.toLowerCase().includes(q) || keyList(s.keys).join('+').toLowerCase().includes(q)),
71
+ }))
72
+ .filter(g => g.shortcuts.length);
73
+ }
74
+ /** Greedy column split: a group stays in column 1 while countBefore + size/2 <= total/2. */
75
+ columns(groups) {
76
+ const total = groups.reduce((n, g) => n + g.shortcuts.length, 0);
77
+ const cols = [[], []];
78
+ let before = 0;
79
+ for (const g of groups) {
80
+ cols[before + g.shortcuts.length / 2 <= total / 2 ? 0 : 1].push(g);
81
+ before += g.shortcuts.length;
82
+ }
83
+ return cols[1].length ? cols : [cols[0]];
84
+ }
85
+ onKeyDown = (ev) => {
86
+ if (ev.key === 'Escape')
87
+ this.bsClose.emit();
88
+ };
89
+ onInput = (ev) => {
90
+ this.query = ev.detail;
91
+ this.bsQueryChange.emit(ev.detail);
92
+ };
93
+ onSwitch = (ev) => {
94
+ this.singleKeyEnabled = ev.detail;
95
+ this.bsSingleKeyChange.emit(ev.detail);
96
+ };
97
+ render() {
98
+ const groups = this.visibleGroups();
99
+ const count = groups.reduce((n, g) => n + g.shortcuts.length, 0);
100
+ const cols = this.columns(groups);
101
+ const headId = `${this.id}-heading`;
102
+ const noResults = count === 0 && (this.query ?? '').trim() !== '';
103
+ let gi = 0;
104
+ return (index.h("bs-card", { key: '602e1b2fbeb09dc848435562c3188f784a96a26f', part: "container", class: "bs-keyboard-shortcuts", surface: "base", role: "region", "aria-labelledby": headId, onKeyDown: this.onKeyDown }, index.h("div", { key: '1ad1ad5d14769b755362b1c965390d929d190a81', class: "bs-keyboard-shortcuts__body" }, index.h("div", { key: '86e635b3e14a47fa5df69983f9fab132ab8b334c', part: "head", class: "bs-keyboard-shortcuts__head" }, index.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" }, index.h("rect", { key: 'e70a9a55b1fa027dbaa50870dd79d2c2b4805efd', x: "2", y: "5", width: "20", height: "14", rx: "2" }), index.h("path", { key: '17c1bf9e1f044b802f1538a70da58334e1b328c4', d: "M6 9h.01M10 9h.01M14 9h.01M18 9h.01M6 13h.01M18 13h.01M9 15.5h6" })), index.h("h4", { key: '06466a27347a74bb61ab23f0a57ec19b8fd3feb7', part: "heading", id: headId, class: "bs-keyboard-shortcuts__heading" }, index.h("slot", { key: '307d0611ceffa704345f1a138796e76df9101162', name: "heading" }, this.heading)), index.h("bs-icon-button", { key: 'a9126801a045b8e95301a2fd6cfcbae20e9ef29b', part: "close", variant: "subtle", size: "md", "aria-label": this.closeLabel, onClick: () => this.bsClose.emit() }, index.h("svg", { key: '472f6467736f6baadd13ed4f723107be92dc9147', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "aria-hidden": "true" }, index.h("path", { key: 'b20530074ac46a1764f613f02c9aca7be9771c40', d: "M6 6l12 12M18 6 6 18" })))), index.h("bs-input", { key: '94eb5e7ac066359e150681a0b9016da7e98d45b0', part: "search", type: "search", placeholder: this.searchPlaceholder, value: this.query, onBsInput: this.onInput }), this.showSingleKeySwitch && (index.h("div", { key: 'b51f32af80233153e3f2e957e364e82e8458b0d5', part: "switch", class: "bs-keyboard-shortcuts__switch" }, index.h("div", { key: '5c043a1b80b20fc9b636b293a3e0782807d3fa0c', class: "bs-keyboard-shortcuts__switch-text" }, index.h("span", { key: 'bcc7015e1084d3479ff257fdc50e12b813d90bbd', class: "bs-keyboard-shortcuts__switch-title" }, this.singleKeyLabel), index.h("span", { key: '43b88ef5e2368da7f1304c6c6c05c125a87132f8', class: "bs-keyboard-shortcuts__switch-caption" }, this.singleKeyDescription)), index.h("bs-switch", { key: 'b7d95ac144d87947f64199ea9cf83eb108a2f00c', ariaLabel: this.singleKeyLabel, checked: this.singleKeyEnabled, onBsChange: this.onSwitch }))), index.h("span", { key: 'd6d155b36ca413bca0978addbe1a82370d71c645', class: "bs-keyboard-shortcuts__live", "aria-live": "polite" }, `${count} shortcut${count === 1 ? '' : 's'}`), noResults ? (index.h("p", { part: "empty", class: "bs-keyboard-shortcuts__empty", role: "status" }, this.noResultsText)) : (index.h("div", { part: "groups", class: "bs-keyboard-shortcuts__groups" }, cols.map(col => (index.h("div", { class: "bs-keyboard-shortcuts__column" }, col.map(g => {
105
+ const tid = `${this.id}-g${gi++}`;
106
+ return (index.h("div", { part: "group", class: "bs-keyboard-shortcuts__group", role: "group", "aria-labelledby": tid }, index.h("div", { part: "group-title", id: tid, class: "bs-keyboard-shortcuts__group-title" }, g.title), index.h("div", { class: "bs-keyboard-shortcuts__rows", role: "list" }, g.shortcuts.map(s => (index.h("bs-shortcut-row", { part: "row", action: s.action, keys: s.keys, selectionRole: "listitem", disabled: !!s.disabled || (!this.singleKeyEnabled && isSingleKey(s)) }))))));
107
+ })))))), this.showFooterHint && (index.h("div", { key: 'b61974f27c2909fe207e3e604b06ed408516a810', part: "footer", class: "bs-keyboard-shortcuts__footer" }, index.h("slot", { key: '44c2ddc9cd9e99418ee4edaf030e51f663bee47b', name: "footer" }, index.h("span", { key: '9679714a84380363982b4d7111bdc424547e4aa8' }, this.footerPrefix), index.h("bs-key", { key: '2945e09a15994b15753bad68530700020e666968', label: this.footerKey }), index.h("span", { key: '90fe405d4aeebb0dbd31d291e85dee48c12f6258' }, this.footerText)))))));
108
+ }
109
+ };
110
+ BsKeyboardShortcuts.style = bsKeyboardShortcutsCss();
111
+
112
+ exports.bs_keyboard_shortcuts = BsKeyboardShortcuts;