@brandsync/wc 0.0.11 → 0.0.12

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 (297) hide show
  1. package/custom-elements.json +3388 -598
  2. package/dist/brandsync-wc/brandsync-wc.css +20 -0
  3. package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
  4. package/dist/brandsync-wc/{p-6254dcbe.entry.js → p-09aa03d1.entry.js} +1 -1
  5. package/dist/brandsync-wc/p-0eee5477.entry.js +1 -0
  6. package/dist/brandsync-wc/p-0fa017ce.entry.js +1 -0
  7. package/dist/brandsync-wc/p-12ec9e92.entry.js +1 -0
  8. package/dist/brandsync-wc/{p-4ca15322.entry.js → p-1900f6ce.entry.js} +1 -1
  9. package/dist/brandsync-wc/{p-1bf0b2d5.entry.js → p-1adc59be.entry.js} +1 -1
  10. package/dist/brandsync-wc/p-1c6fa697.entry.js +1 -0
  11. package/dist/brandsync-wc/{p-8d78171b.entry.js → p-1cf715aa.entry.js} +1 -1
  12. package/dist/brandsync-wc/{p-84ae4420.entry.js → p-20dbc6a1.entry.js} +1 -1
  13. package/dist/brandsync-wc/{p-74a4dd91.entry.js → p-23457a21.entry.js} +1 -1
  14. package/dist/brandsync-wc/p-266f5dde.entry.js +1 -0
  15. package/dist/brandsync-wc/{p-073e5fee.entry.js → p-2a65aabb.entry.js} +1 -1
  16. package/dist/brandsync-wc/{p-030a8ba7.entry.js → p-2c51d738.entry.js} +1 -1
  17. package/dist/brandsync-wc/p-3b31f7c7.entry.js +1 -0
  18. package/dist/brandsync-wc/p-46ddc8e1.entry.js +1 -0
  19. package/dist/brandsync-wc/p-56c66448.entry.js +1 -0
  20. package/dist/brandsync-wc/{p-dd224cb3.entry.js → p-57fdbb76.entry.js} +1 -1
  21. package/dist/brandsync-wc/{p-8dff4f24.entry.js → p-64e2a7d7.entry.js} +1 -1
  22. package/dist/brandsync-wc/{p-b174403d.entry.js → p-6e854e92.entry.js} +1 -1
  23. package/dist/brandsync-wc/p-72a33f88.entry.js +1 -0
  24. package/dist/brandsync-wc/p-8049f9f2.entry.js +1 -0
  25. package/dist/brandsync-wc/{p-c6d330c3.entry.js → p-88a0abee.entry.js} +1 -1
  26. package/dist/brandsync-wc/p-8b662ee3.entry.js +1 -0
  27. package/dist/brandsync-wc/{p-41edb0a2.entry.js → p-8ded1eb6.entry.js} +1 -1
  28. package/dist/brandsync-wc/{p-DP_bvuvB.js → p-DST5-cTx.js} +2 -2
  29. package/dist/brandsync-wc/p-a5b15061.entry.js +1 -0
  30. package/dist/brandsync-wc/{p-7a605d98.entry.js → p-aba300a9.entry.js} +1 -1
  31. package/dist/brandsync-wc/p-b24a980b.entry.js +1 -0
  32. package/dist/brandsync-wc/p-b289450a.entry.js +1 -0
  33. package/dist/brandsync-wc/{p-7131d0a1.entry.js → p-b8a2f882.entry.js} +1 -1
  34. package/dist/brandsync-wc/p-c320b6b4.entry.js +1 -0
  35. package/dist/brandsync-wc/{p-d1dc2ced.entry.js → p-d4e3ca77.entry.js} +1 -1
  36. package/dist/brandsync-wc/{p-0b858120.entry.js → p-dd09d335.entry.js} +1 -1
  37. package/dist/brandsync-wc/p-ef8522b5.entry.js +1 -0
  38. package/dist/brandsync-wc/p-f04db1b0.entry.js +1 -0
  39. package/dist/cjs/brandsync-wc.cjs.js +2 -2
  40. package/dist/cjs/bs-ai-disclaimer.cjs.entry.js +3 -2
  41. package/dist/cjs/bs-ai-greeting.cjs.entry.js +2 -2
  42. package/dist/cjs/bs-ai-thinking.cjs.entry.js +2 -2
  43. package/dist/cjs/bs-attachment-list.cjs.entry.js +2 -2
  44. package/dist/cjs/bs-attachment.cjs.entry.js +3 -3
  45. package/dist/cjs/bs-badge.cjs.entry.js +1 -1
  46. package/dist/cjs/bs-button-skeleton.cjs.entry.js +2 -2
  47. package/dist/cjs/bs-button.cjs.entry.js +3 -3
  48. package/dist/cjs/bs-card.cjs.entry.js +1 -1
  49. package/dist/cjs/bs-chatbot-feedback.cjs.entry.js +2 -2
  50. package/dist/cjs/bs-chatbot-header.cjs.entry.js +2 -2
  51. package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +2 -2
  52. package/dist/cjs/bs-chatbot-sources-drawer.cjs.entry.js +2 -2
  53. package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +2 -2
  54. package/dist/cjs/bs-checkbox.cjs.entry.js +14 -3
  55. package/dist/cjs/bs-composer-status-banner.cjs.entry.js +14 -2
  56. package/dist/cjs/bs-composer.cjs.entry.js +37 -4
  57. package/dist/cjs/bs-data-table.cjs.entry.js +3 -3
  58. package/dist/cjs/bs-icon-button.cjs.entry.js +40 -0
  59. package/dist/cjs/bs-inline-tab.cjs.entry.js +69 -0
  60. package/dist/cjs/bs-input.cjs.entry.js +3 -3
  61. package/dist/cjs/bs-logo.cjs.entry.js +165 -0
  62. package/dist/cjs/bs-menu_2.cjs.entry.js +3 -3
  63. package/dist/cjs/bs-modal.cjs.entry.js +1 -1
  64. package/dist/cjs/bs-navigation-drawer-item.cjs.entry.js +104 -0
  65. package/dist/cjs/bs-navigation-drawer.cjs.entry.js +81 -0
  66. package/dist/cjs/bs-navigation-header.cjs.entry.js +44 -0
  67. package/dist/cjs/bs-radio.cjs.entry.js +49 -0
  68. package/dist/cjs/bs-slider.cjs.entry.js +191 -0
  69. package/dist/cjs/bs-source-link.cjs.entry.js +3 -3
  70. package/dist/cjs/bs-switch.cjs.entry.js +57 -0
  71. package/dist/cjs/bs-tab.cjs.entry.js +80 -0
  72. package/dist/cjs/bs-tabs.cjs.entry.js +39 -0
  73. package/dist/cjs/bs-tooltip.cjs.entry.js +2 -2
  74. package/dist/cjs/{index-CGrdFg95.js → index-B3sdhEGk.js} +1 -1
  75. package/dist/cjs/loader.cjs.js +2 -2
  76. package/dist/collection/collection-manifest.json +13 -2
  77. package/dist/collection/components/bs-ai-chatbot/bs-ai-chatbot.stories.js +26 -11
  78. package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.js +2 -1
  79. package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.js +1 -1
  80. package/dist/collection/components/bs-ai-thinking/bs-ai-thinking.js +1 -1
  81. package/dist/collection/components/bs-attachment/bs-attachment.css +12 -33
  82. package/dist/collection/components/bs-attachment/bs-attachment.js +4 -10
  83. package/dist/collection/components/bs-attachment-list/bs-attachment-list.js +1 -1
  84. package/dist/collection/components/bs-button/{bs-button.cmp.test.js → bs-button/bs-button.cmp.test.js} +26 -0
  85. package/dist/collection/components/bs-button/{bs-button.css → bs-button/bs-button.css} +57 -6
  86. package/dist/collection/components/bs-button/{bs-button.js → bs-button/bs-button.js} +10 -5
  87. package/dist/collection/components/bs-button/{bs-button.stories.js → bs-button/bs-button.stories.js} +2 -27
  88. package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.cmp.test.js +83 -0
  89. package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.css +346 -0
  90. package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.js +185 -0
  91. package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.stories.js +74 -0
  92. package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +3 -3
  93. package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.js +1 -1
  94. package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +1 -1
  95. package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +1 -1
  96. package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.js +1 -1
  97. package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js +1 -1
  98. package/dist/collection/components/bs-checkbox/bs-checkbox.cmp.test.js +10 -0
  99. package/dist/collection/components/bs-checkbox/bs-checkbox.css +7 -1
  100. package/dist/collection/components/bs-checkbox/bs-checkbox.js +32 -1
  101. package/dist/collection/components/bs-composer/bs-composer.cmp.test.js +48 -7
  102. package/dist/collection/components/bs-composer/bs-composer.css +15 -0
  103. package/dist/collection/components/bs-composer/bs-composer.js +38 -4
  104. package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.cmp.test.js +47 -1
  105. package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.js +20 -1
  106. package/dist/collection/components/bs-data-table/bs-data-table.js +2 -2
  107. package/dist/collection/components/bs-input/bs-input.js +2 -2
  108. package/dist/collection/components/bs-logo/brandsync-logo-full-dark.js +44 -0
  109. package/dist/collection/components/bs-logo/brandsync-logo-full-light.js +40 -0
  110. package/dist/collection/components/bs-logo/brandsync-logo-mark.js +17 -0
  111. package/dist/collection/components/bs-logo/bs-logo.cmp.test.js +113 -0
  112. package/dist/collection/components/bs-logo/bs-logo.css +79 -0
  113. package/dist/collection/components/bs-logo/bs-logo.js +193 -0
  114. package/dist/collection/components/bs-logo/bs-logo.stories.js +69 -0
  115. package/dist/collection/components/bs-menu/bs-menu.js +1 -1
  116. package/dist/collection/components/bs-menu-item/bs-menu-item.js +1 -1
  117. package/dist/collection/components/bs-radio/bs-radio.cmp.test.js +76 -0
  118. package/dist/collection/components/bs-radio/bs-radio.css +164 -0
  119. package/dist/collection/components/bs-radio/bs-radio.js +170 -0
  120. package/dist/collection/components/bs-radio/bs-radio.stories.js +56 -0
  121. package/dist/collection/components/bs-slider/bs-slider.cmp.test.js +139 -0
  122. package/dist/collection/components/bs-slider/bs-slider.css +409 -0
  123. package/dist/collection/components/bs-slider/bs-slider.js +499 -0
  124. package/dist/collection/components/bs-slider/bs-slider.stories.js +70 -0
  125. package/dist/collection/components/bs-source-link/bs-source-link.js +2 -2
  126. package/dist/collection/components/bs-switch/bs-switch.cmp.test.js +71 -0
  127. package/dist/collection/components/bs-switch/bs-switch.css +196 -0
  128. package/dist/collection/components/bs-switch/bs-switch.js +185 -0
  129. package/dist/collection/components/bs-switch/bs-switch.stories.js +60 -0
  130. package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.cmp.test.js +104 -0
  131. package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.css +163 -0
  132. package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +192 -0
  133. package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.stories.js +95 -0
  134. package/dist/collection/components/bs-tab/bs-tab/bs-tab.cmp.test.js +120 -0
  135. package/dist/collection/components/bs-tab/bs-tab/bs-tab.css +216 -0
  136. package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +232 -0
  137. package/dist/collection/components/bs-tab/bs-tab/bs-tab.stories.js +138 -0
  138. package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.cmp.test.js +61 -0
  139. package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.css +39 -0
  140. package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +133 -0
  141. package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.stories.js +39 -0
  142. package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
  143. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.cmp.test.js +131 -0
  144. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.css +257 -0
  145. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.js +253 -0
  146. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.stories.js +202 -0
  147. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.cmp.test.js +172 -0
  148. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.css +325 -0
  149. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.js +314 -0
  150. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.stories.js +78 -0
  151. package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.cmp.test.js +77 -0
  152. package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.css +106 -0
  153. package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.js +188 -0
  154. package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.stories.js +189 -0
  155. package/dist/components/bs-ai-disclaimer.js +1 -1
  156. package/dist/components/bs-ai-greeting.js +1 -1
  157. package/dist/components/bs-ai-thinking.js +1 -1
  158. package/dist/components/bs-attachment-list.js +1 -1
  159. package/dist/components/bs-attachment.js +1 -1
  160. package/dist/components/bs-badge.js +1 -1
  161. package/dist/components/bs-button-skeleton.js +1 -1
  162. package/dist/components/bs-button.js +1 -1
  163. package/dist/components/bs-card.js +1 -1
  164. package/dist/components/bs-chatbot-feedback.js +1 -1
  165. package/dist/components/bs-chatbot-header.js +1 -1
  166. package/dist/components/bs-chatbot-response-action.js +1 -1
  167. package/dist/components/bs-chatbot-sources-drawer.js +1 -1
  168. package/dist/components/bs-chatbot-suggestion-button.js +1 -1
  169. package/dist/components/bs-checkbox.js +1 -1
  170. package/dist/components/bs-composer-status-banner.js +1 -1
  171. package/dist/components/bs-composer.js +1 -1
  172. package/dist/components/bs-data-table.js +1 -1
  173. package/dist/components/bs-icon-button.d.ts +11 -0
  174. package/dist/components/bs-icon-button.js +1 -0
  175. package/dist/components/bs-inline-tab.d.ts +11 -0
  176. package/dist/components/bs-inline-tab.js +1 -0
  177. package/dist/components/bs-input.js +1 -1
  178. package/dist/components/bs-logo.d.ts +11 -0
  179. package/dist/components/bs-logo.js +1 -0
  180. package/dist/components/bs-menu-item.js +1 -1
  181. package/dist/components/bs-menu.js +1 -1
  182. package/dist/components/bs-modal.js +1 -1
  183. package/dist/components/bs-navigation-drawer-item.d.ts +11 -0
  184. package/dist/components/bs-navigation-drawer-item.js +1 -0
  185. package/dist/components/bs-navigation-drawer.d.ts +11 -0
  186. package/dist/components/bs-navigation-drawer.js +1 -0
  187. package/dist/components/bs-navigation-header.d.ts +11 -0
  188. package/dist/components/bs-navigation-header.js +1 -0
  189. package/dist/components/bs-radio.d.ts +11 -0
  190. package/dist/components/bs-radio.js +1 -0
  191. package/dist/components/bs-slider.d.ts +11 -0
  192. package/dist/components/bs-slider.js +1 -0
  193. package/dist/components/bs-source-link.js +1 -1
  194. package/dist/components/bs-switch.d.ts +11 -0
  195. package/dist/components/bs-switch.js +1 -0
  196. package/dist/components/bs-tab.d.ts +11 -0
  197. package/dist/components/bs-tab.js +1 -0
  198. package/dist/components/bs-tabs.d.ts +11 -0
  199. package/dist/components/bs-tabs.js +1 -0
  200. package/dist/components/bs-tooltip.js +1 -1
  201. package/dist/components/index.js +1 -1
  202. package/dist/components/p-BAOJc0V0.js +1 -0
  203. package/dist/components/{p-D1cYtKyN.js → p-Be1Pfcnm.js} +1 -1
  204. package/dist/components/{p-B9PrXIl_.js → p-BqYyMGrB.js} +1 -1
  205. package/dist/components/p-CaWqTQBZ.js +1 -0
  206. package/dist/components/{p-BUbGEXL7.js → p-DivZLd6i.js} +1 -1
  207. package/dist/components/{p-D2HDHZjz.js → p-xfx69LQx.js} +1 -1
  208. package/dist/esm/brandsync-wc.js +3 -3
  209. package/dist/esm/bs-ai-disclaimer.entry.js +3 -2
  210. package/dist/esm/bs-ai-greeting.entry.js +2 -2
  211. package/dist/esm/bs-ai-thinking.entry.js +2 -2
  212. package/dist/esm/bs-attachment-list.entry.js +2 -2
  213. package/dist/esm/bs-attachment.entry.js +3 -3
  214. package/dist/esm/bs-badge.entry.js +1 -1
  215. package/dist/esm/bs-button-skeleton.entry.js +2 -2
  216. package/dist/esm/bs-button.entry.js +3 -3
  217. package/dist/esm/bs-card.entry.js +1 -1
  218. package/dist/esm/bs-chatbot-feedback.entry.js +2 -2
  219. package/dist/esm/bs-chatbot-header.entry.js +2 -2
  220. package/dist/esm/bs-chatbot-response-action.entry.js +2 -2
  221. package/dist/esm/bs-chatbot-sources-drawer.entry.js +2 -2
  222. package/dist/esm/bs-chatbot-suggestion-button.entry.js +2 -2
  223. package/dist/esm/bs-checkbox.entry.js +14 -3
  224. package/dist/esm/bs-composer-status-banner.entry.js +14 -2
  225. package/dist/esm/bs-composer.entry.js +37 -4
  226. package/dist/esm/bs-data-table.entry.js +3 -3
  227. package/dist/esm/bs-icon-button.entry.js +38 -0
  228. package/dist/esm/bs-inline-tab.entry.js +67 -0
  229. package/dist/esm/bs-input.entry.js +3 -3
  230. package/dist/esm/bs-logo.entry.js +163 -0
  231. package/dist/esm/bs-menu_2.entry.js +3 -3
  232. package/dist/esm/bs-modal.entry.js +1 -1
  233. package/dist/esm/bs-navigation-drawer-item.entry.js +102 -0
  234. package/dist/esm/bs-navigation-drawer.entry.js +79 -0
  235. package/dist/esm/bs-navigation-header.entry.js +42 -0
  236. package/dist/esm/bs-radio.entry.js +47 -0
  237. package/dist/esm/bs-slider.entry.js +189 -0
  238. package/dist/esm/bs-source-link.entry.js +3 -3
  239. package/dist/esm/bs-switch.entry.js +55 -0
  240. package/dist/esm/bs-tab.entry.js +78 -0
  241. package/dist/esm/bs-tabs.entry.js +37 -0
  242. package/dist/esm/bs-tooltip.entry.js +2 -2
  243. package/dist/esm/{index-DP_bvuvB.js → index-DST5-cTx.js} +1 -1
  244. package/dist/esm/loader.js +3 -3
  245. package/dist/types/components/bs-attachment/bs-attachment.d.ts +3 -9
  246. package/dist/types/components/bs-button/{bs-button.d.ts → bs-button/bs-button.d.ts} +5 -0
  247. package/dist/types/components/bs-button/{bs-button.stories.d.ts → bs-button/bs-button.stories.d.ts} +0 -2
  248. package/dist/types/components/bs-button/bs-icon-button/bs-icon-button.cmp.test.d.ts +1 -0
  249. package/dist/types/components/bs-button/bs-icon-button/bs-icon-button.d.ts +51 -0
  250. package/dist/types/components/bs-button/bs-icon-button/bs-icon-button.stories.d.ts +16 -0
  251. package/dist/types/components/bs-button-skeleton/bs-button-skeleton.d.ts +1 -1
  252. package/dist/types/components/bs-button-skeleton/bs-button-skeleton.stories.d.ts +1 -1
  253. package/dist/types/components/bs-checkbox/bs-checkbox.d.ts +11 -0
  254. package/dist/types/components/bs-composer/bs-composer.d.ts +26 -2
  255. package/dist/types/components/bs-composer-status-banner/bs-composer-status-banner.d.ts +14 -0
  256. package/dist/types/components/bs-logo/brandsync-logo-full-dark.d.ts +1 -0
  257. package/dist/types/components/bs-logo/brandsync-logo-full-light.d.ts +1 -0
  258. package/dist/types/components/bs-logo/brandsync-logo-mark.d.ts +1 -0
  259. package/dist/types/components/bs-logo/bs-logo.cmp.test.d.ts +1 -0
  260. package/dist/types/components/bs-logo/bs-logo.d.ts +73 -0
  261. package/dist/types/components/bs-logo/bs-logo.stories.d.ts +17 -0
  262. package/dist/types/components/bs-radio/bs-radio.cmp.test.d.ts +1 -0
  263. package/dist/types/components/bs-radio/bs-radio.d.ts +45 -0
  264. package/dist/types/components/bs-radio/bs-radio.stories.d.ts +16 -0
  265. package/dist/types/components/bs-slider/bs-slider.cmp.test.d.ts +1 -0
  266. package/dist/types/components/bs-slider/bs-slider.d.ts +109 -0
  267. package/dist/types/components/bs-slider/bs-slider.stories.d.ts +24 -0
  268. package/dist/types/components/bs-switch/bs-switch.cmp.test.d.ts +1 -0
  269. package/dist/types/components/bs-switch/bs-switch.d.ts +45 -0
  270. package/dist/types/components/bs-switch/bs-switch.stories.d.ts +17 -0
  271. package/dist/types/components/bs-tab/bs-inline-tab/bs-inline-tab.cmp.test.d.ts +1 -0
  272. package/dist/types/components/bs-tab/bs-inline-tab/bs-inline-tab.d.ts +65 -0
  273. package/dist/types/components/bs-tab/bs-inline-tab/bs-inline-tab.stories.d.ts +22 -0
  274. package/dist/types/components/bs-tab/bs-tab/bs-tab.cmp.test.d.ts +1 -0
  275. package/dist/types/components/bs-tab/bs-tab/bs-tab.d.ts +74 -0
  276. package/dist/types/components/bs-tab/bs-tab/bs-tab.stories.d.ts +30 -0
  277. package/dist/types/components/bs-tab/bs-tabs/bs-tabs.cmp.test.d.ts +1 -0
  278. package/dist/types/components/bs-tab/bs-tabs/bs-tabs.d.ts +45 -0
  279. package/dist/types/components/bs-tab/bs-tabs/bs-tabs.stories.d.ts +13 -0
  280. package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.cmp.test.d.ts +1 -0
  281. package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.d.ts +96 -0
  282. package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.stories.d.ts +16 -0
  283. package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.cmp.test.d.ts +1 -0
  284. package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.d.ts +103 -0
  285. package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.stories.d.ts +20 -0
  286. package/dist/types/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.cmp.test.d.ts +1 -0
  287. package/dist/types/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.d.ts +60 -0
  288. package/dist/types/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.stories.d.ts +21 -0
  289. package/dist/types/components.d.ts +1842 -53
  290. package/package.json +1 -1
  291. package/dist/brandsync-wc/p-2598ca88.entry.js +0 -1
  292. package/dist/brandsync-wc/p-3c8fbaa8.entry.js +0 -1
  293. package/dist/brandsync-wc/p-3dd9b814.entry.js +0 -1
  294. package/dist/brandsync-wc/p-8c302968.entry.js +0 -1
  295. package/dist/brandsync-wc/p-93e44903.entry.js +0 -1
  296. package/dist/brandsync-wc/p-aa45d877.entry.js +0 -1
  297. /package/dist/types/components/bs-button/{bs-button.cmp.test.d.ts → bs-button/bs-button.cmp.test.d.ts} +0 -0
@@ -74,7 +74,7 @@ export class BsChatbotHeader {
74
74
  this.bsClose.emit();
75
75
  };
76
76
  render() {
77
- return (h("div", { key: 'b67eb065f0bacc73cea6cfba97f95db26d939fef', class: "bs-chatbot-header", role: "banner", "aria-label": this.heading }, h("div", { key: '14495ee7659e6d9198799b19fe2482996acd9cb1', part: "logo", class: "bs-chatbot-header__logo", role: "img", "aria-label": this.heading, innerHTML: GENIE_LOGO_SVG }), h("div", { key: '4f90a6351c004327440e92ca32a7d5f16dc10f35', class: "bs-chatbot-header__actions" }, h("span", { key: '77a7a55d92a4844778cd2f9e968e497b6f6dc3ec', class: "bs-chatbot-header__tooltip-wrapper" }, h("button", { key: '5e7e9ad3beb2a74d05178fb3b847994284b84078', type: "button", part: "new-chat", class: "bs-chatbot-header__button", "aria-label": "New chat", onClick: this.onNewChatClick }, h("slot", { key: '71fdc53fdb397fdb45a1e05d4ecf4505f2ee6546', name: "new-chat-icon" }, h(NewChatIcon, { key: '1ca210d70f3a16869092cf681d737c698b136e52' }))), h("bs-tooltip", { key: 'ec6e597102a7bccfbe82f3d4cdd24f6e9939671c', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, "New chat")), h("span", { key: '5ab09f2170faa1e820ae43034e8d2c28263c8f9b', class: "bs-chatbot-header__tooltip-wrapper" }, h("button", { key: '457c6b31a93bc8afb9f6140283332f1e9cece997', type: "button", part: "history", class: "bs-chatbot-header__button", "aria-label": "History", onClick: this.onHistoryClick }, h("slot", { key: 'cec925b6dc90978e447ac2abe519fd39299f719d', name: "history-icon" }, h(HistoryIcon, { key: 'aec4f574f79fc80266cadb78d4db3a5e5a791af7' }))), h("bs-tooltip", { key: '76a28dd05c9648a27cb47d843a48c71b2a4736a1', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, "History")), h("span", { key: 'f77e9dfc1640fd0820f1afdc47692767307793ed', class: "bs-chatbot-header__tooltip-wrapper" }, h("button", { key: 'd6c09ae435f7c43141990ac411bbfdd48be2746d', type: "button", part: "expand", class: "bs-chatbot-header__button", "aria-label": this.expanded ? 'Collapse' : 'Expand', "aria-pressed": this.expanded ? 'true' : 'false', onClick: this.onExpandClick }, h("slot", { key: 'd98d678009f56c298289527c505eb9863a783155', name: "expand-icon" }, h(ExpandIcon, { key: 'b5717154a53b3d6745a20de74f2e2a51497f1718' }))), h("bs-tooltip", { key: 'ee742bdb2e8f948756ea1f9b13ee2a1c35d0597d', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, this.expanded ? 'Collapse' : 'Expand')), h("span", { key: '7a19e71b35be8052f206beff78531f17ff080dab', class: "bs-chatbot-header__tooltip-wrapper" }, h("button", { key: '758ddf35814919c575699bd27fdc303a80ef7307', type: "button", part: "close", class: "bs-chatbot-header__button", "aria-label": "Close", onClick: this.onCloseClick }, h("slot", { key: 'c545d1a724431ccff6593ba3047462bd9bfaefeb', name: "close-icon" }, h(CloseIcon, { key: '4ed2a585be65e2c77200ceeb2b99329afda177a3' }))), h("bs-tooltip", { key: '9ce32d5f9772d91fea7a937341a5866938d87ac5', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, "Close")))));
77
+ return (h("div", { key: 'f867f6c63e8931079fbbee1ce4dc7b74f6bf7ddd', class: "bs-chatbot-header", role: "banner", "aria-label": this.heading }, h("div", { key: 'a91afd437bbe43e9be65d64df36688d8d885916d', part: "logo", class: "bs-chatbot-header__logo", role: "img", "aria-label": this.heading, innerHTML: GENIE_LOGO_SVG }), h("div", { key: '3dddaab00c3b983b1e86be356eec9c07c415de1b', class: "bs-chatbot-header__actions" }, h("span", { key: '0f0b3388022c75ef0e04c1bb41a826fb0318764d', class: "bs-chatbot-header__tooltip-wrapper" }, h("button", { key: '7b1eb2edc2414fece90681b1d56de3a9b0c7171c', type: "button", part: "new-chat", class: "bs-chatbot-header__button", "aria-label": "New chat", onClick: this.onNewChatClick }, h("slot", { key: 'a4ff761ddc7b3dbcfe449a89f731561cb3b85d0a', name: "new-chat-icon" }, h(NewChatIcon, { key: 'b2244e10010085b85a258413f7391180f6b3a20f' }))), h("bs-tooltip", { key: 'b24f3b73d6cfca88f14e12e7bc0ad0634d3338c1', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, "New chat")), h("span", { key: '94a5bf67800ea1a608a04a0bb33d1a7aed053045', class: "bs-chatbot-header__tooltip-wrapper" }, h("button", { key: '49bb1dc0956c021becaaf562146352b9abcc415b', type: "button", part: "history", class: "bs-chatbot-header__button", "aria-label": "History", onClick: this.onHistoryClick }, h("slot", { key: 'f2c6dc057674cfc803d822d936b3fcf9d6f2f576', name: "history-icon" }, h(HistoryIcon, { key: '0ededb5c7c553f1a6723f3d20b734cb5200b2a4d' }))), h("bs-tooltip", { key: 'd533c9ac7661d89d8c8fe4865639c6d4fdab5ca3', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, "History")), h("span", { key: 'e183c44cd967d683fa8de2c53c53913b0a1a19e4', class: "bs-chatbot-header__tooltip-wrapper" }, h("button", { key: 'f3af2b7730e1410f97fc46612148c1728be67517', type: "button", part: "expand", class: "bs-chatbot-header__button", "aria-label": this.expanded ? 'Collapse' : 'Expand', "aria-pressed": this.expanded ? 'true' : 'false', onClick: this.onExpandClick }, h("slot", { key: '808dcea2f16a09615efa1e17c7cdaadb35cac494', name: "expand-icon" }, h(ExpandIcon, { key: '58487c506c21b5e4214be89ef37126ee9404550b' }))), h("bs-tooltip", { key: 'e89cd45c9c34e840bb316ac2acc281d8bbc09eb4', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, this.expanded ? 'Collapse' : 'Expand')), h("span", { key: '1ccdb12018a5e0bffb6e50fb4974799f177cf943', class: "bs-chatbot-header__tooltip-wrapper" }, h("button", { key: 'e416fe4e56f37b9c623e86764cf5e3a510e89657', type: "button", part: "close", class: "bs-chatbot-header__button", "aria-label": "Close", onClick: this.onCloseClick }, h("slot", { key: 'db32a3957b3d635e34665ea4b3022d888bd4c5c8', name: "close-icon" }, h(CloseIcon, { key: '1062922ee3b32445503c2bc81913806f1684683b' }))), h("bs-tooltip", { key: '90d5458d0eb14e99767ea5b1d0e8c9b23b51aaeb', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, "Close")))));
78
78
  }
79
79
  static get is() { return "bs-chatbot-header"; }
80
80
  static get encapsulation() { return "shadow"; }
@@ -105,7 +105,7 @@ export class BsChatbotResponseAction {
105
105
  };
106
106
  render() {
107
107
  const hasSources = !!this.sourcesCount && this.sourcesCount > 0;
108
- return (h("div", { key: '7d97251380f7e6b002eaafb3699ea981d5068555', class: "bs-chatbot-response-action" }, h("button", { key: 'd05f73b0f1d1f9f03a452397ef3206a866abcefc', type: "button", part: "like", class: "bs-chatbot-response-action__button", "aria-label": "Like", onClick: this.onLikeClick }, h("slot", { key: '30b7a9da1dd2c317ac7c4ecbdda76c0f146a3495', name: "like-icon" }, h(ThumbsUpIcon, { key: 'b5bf2e9915a5c1263e18304f4b487807cc256879' }))), h("button", { key: 'f601202a175a47978595d080d938ce48be1715d8', type: "button", part: "dislike", class: "bs-chatbot-response-action__button", "aria-label": "Dislike", onClick: this.onDislikeClick }, h("slot", { key: 'c141f978f453abc6062e8274a4fdb6e1f80ac5b2', name: "dislike-icon" }, h(ThumbsDownIcon, { key: '158799c27d18b62152937e7485cec5a23598d177' }))), h("button", { key: 'cdb6b1ab5f2bb12e43ae3ab0fa73a81e24ba1f16', type: "button", part: "copy", class: "bs-chatbot-response-action__button", "aria-label": "Copy", onClick: this.onCopyClick }, h("slot", { key: '8e9387d18ed444da1b7d20f4a6b60e7c2fae32bc', name: "copy-icon" }, h(CopyIcon, { key: '7c1cfede4ef084babd7aeeb3a2a3817ca4346663' }))), h("button", { key: 'f4e190de92eb4936594f4701c406c3b2bc1f84c8', type: "button", part: "regenerate", class: "bs-chatbot-response-action__button", "aria-label": "Regenerate", onClick: this.onRegenerateClick }, h("slot", { key: 'c52e03dc83f047125a5bd1c73cafba8b71a21fed', name: "regenerate-icon" }, h(RegenerateIcon, { key: '1564599695557eea663d770779301c34e815cbf5' }))), h("div", { key: '90a6b3c75e169be71c217ac8b711bb2ca001ee49', class: "bs-chatbot-response-action__menu-wrapper" }, h("button", { key: '2d8d25c6e183638233ef9287360bc0969f2fa2ac', type: "button", part: "menu", class: "bs-chatbot-response-action__button", "aria-label": "More options", "aria-haspopup": "menu", "aria-expanded": this.menuOpen ? 'true' : 'false', onClick: this.onMenuClick }, h("slot", { key: 'f992794d9e964c830e1780078ea83abec1be471b', name: "menu-icon" }, h(MenuIcon, { key: '4b75676316bc826b3a7cd19cba8f46b8ceacf19c' }))), this.menuOpen && (h("div", { key: 'f24430ebab56eda589f19f7cb9f3f1c31d7185cb', class: "bs-chatbot-response-action__menu-popup" }, h("slot", { key: '2978dee3a0d5521e805a4496d6e33c6b31b52fc6', name: "menu" })))), hasSources && (h("button", { key: '1ab402dd2ef3c97b5b30d86e4f1e3db4f879baf9', type: "button", part: "sources", class: "bs-chatbot-response-action__sources", onClick: this.onSourcesClick }, h("slot", { key: 'f2cf31ff9311d8c888f2b8a0130a9f82161c4b8f', name: "sources-icon" }, h(SourcesIcon, { key: '333dae604a7eb80319b8e822c332067076e4a04d' })), h("span", { key: '04929996660675c23f1a02fc1d756d6735b58b8d', class: "bs-chatbot-response-action__sources-label" }, this.sourcesCount, " ", this.sourcesCount === 1 ? 'source' : 'sources')))));
108
+ return (h("div", { key: '7bec7f4a10f842d706ae24aca5d4e265420d9ddf', class: "bs-chatbot-response-action" }, h("button", { key: '750e004f98f72f3737468bda9985484d344ebaa3', type: "button", part: "like", class: "bs-chatbot-response-action__button", "aria-label": "Like", onClick: this.onLikeClick }, h("slot", { key: '2706c270afcf0c71b94e28bef5ab803a29168508', name: "like-icon" }, h(ThumbsUpIcon, { key: '8fe6d8d403e8d2a80b37edd10e7b4f56197ad544' }))), h("button", { key: 'e807b85ddd08e2a37239fe3927f1a385371b6e60', type: "button", part: "dislike", class: "bs-chatbot-response-action__button", "aria-label": "Dislike", onClick: this.onDislikeClick }, h("slot", { key: 'd6dbcbd2ee1b7e74e05dd2cbae1c69d98e414904', name: "dislike-icon" }, h(ThumbsDownIcon, { key: 'f10796ec4a207e9f8eb55441b762e8873a2c615f' }))), h("button", { key: 'd6452d6a3cbb9aec60e65085086c312dc8723ce9', type: "button", part: "copy", class: "bs-chatbot-response-action__button", "aria-label": "Copy", onClick: this.onCopyClick }, h("slot", { key: '9f650bebcaef7cdf4797bc94c28f934887954722', name: "copy-icon" }, h(CopyIcon, { key: 'bc8fcfd2c9b2d3b0b634f3c92750ffea8b301270' }))), h("button", { key: 'f7b7fc1048a3e641c460e0708e3f751178c337da', type: "button", part: "regenerate", class: "bs-chatbot-response-action__button", "aria-label": "Regenerate", onClick: this.onRegenerateClick }, h("slot", { key: '79cc6721191aff640823fdea839668edddfb5746', name: "regenerate-icon" }, h(RegenerateIcon, { key: '4f8dcfcae578dc5d66e7707f961717a5dd513e20' }))), h("div", { key: '15282bbecdec01239855b7e6637fab4f12801122', class: "bs-chatbot-response-action__menu-wrapper" }, h("button", { key: 'f5d2b3db52c76e129e1d56a4bef819cf1e8bc5ed', type: "button", part: "menu", class: "bs-chatbot-response-action__button", "aria-label": "More options", "aria-haspopup": "menu", "aria-expanded": this.menuOpen ? 'true' : 'false', onClick: this.onMenuClick }, h("slot", { key: '8796afebcc39b15c858bbea22ae377631da8ce2e', name: "menu-icon" }, h(MenuIcon, { key: '21a189fb8e61033e7644bf6e6c3eecb2ffa8e880' }))), this.menuOpen && (h("div", { key: 'd6617d1ff68199cdbdeabda382018fb48c0a1bd9', class: "bs-chatbot-response-action__menu-popup" }, h("slot", { key: 'b4645cb0ccf01b265efa56726ffb1fd5a8ec13db', name: "menu" })))), hasSources && (h("button", { key: '736c23e7560404a0e7177b372993317a84a19bf5', type: "button", part: "sources", class: "bs-chatbot-response-action__sources", onClick: this.onSourcesClick }, h("slot", { key: 'bb5187741f2cb4e470038753df41dcee2ceaf02e', name: "sources-icon" }, h(SourcesIcon, { key: '4d488a150dc6b86d1d6045b55f16bce22c5cdd22' })), h("span", { key: '02da04e9df74b4926cf8f0d6a4c7548c1bb1e699', class: "bs-chatbot-response-action__sources-label" }, this.sourcesCount, " ", this.sourcesCount === 1 ? 'source' : 'sources')))));
109
109
  }
110
110
  static get is() { return "bs-chatbot-response-action"; }
111
111
  static get encapsulation() { return "shadow"; }
@@ -57,7 +57,7 @@ export class BsChatbotSourcesDrawer {
57
57
  };
58
58
  render() {
59
59
  const displayCount = this.count ?? this.slottedCount;
60
- return (h("div", { key: 'e71c8b6f4856092a6fd43fd6dcd8cda04d3a103e', class: "bs-chatbot-sources-drawer", role: "region", "aria-label": this.heading }, h("div", { key: 'f46a1383d8e95aeb83541b2620647839fbe4d3f9', class: "bs-chatbot-sources-drawer__header" }, h("div", { key: '62663736cb4f9e56a5b837da27b4d7d8915c1838', class: "bs-chatbot-sources-drawer__title-group" }, h("h2", { key: '765954b929796005966efaf5aa23ca68053a894e', part: "heading", class: "bs-chatbot-sources-drawer__heading" }, this.heading), displayCount > 0 && (h("span", { key: '562cfc14be64d938879fad31ab185a2f3a441e63', part: "count", class: "bs-chatbot-sources-drawer__count" }, displayCount))), h("button", { key: '8e538aa2aa31b54c8845c9c5d8ffd581cbf1028b', type: "button", part: "collapse", class: "bs-chatbot-sources-drawer__collapse", "aria-label": "Collapse sources", onClick: this.onCollapseClick }, h("slot", { key: '53b12abc52c217d3264ece6cf26daf8c5e01f84e', name: "collapse-icon" }, h(CaretRightIcon, { key: '90b61c4694fd1d908d74e47a19124327a001ce53' })))), h("div", { key: 'a7fc0ceb5b280867237ac3ce6c3bd314c7809075', part: "list", class: "bs-chatbot-sources-drawer__list" }, h("slot", { key: 'db40db9dad7f4e24c8eb0665e2286870f0800843', onSlotchange: this.onSlotchange }))));
60
+ return (h("div", { key: '8f71e38ceb897b13d7726495c8b27619e246af2b', class: "bs-chatbot-sources-drawer", role: "region", "aria-label": this.heading }, h("div", { key: 'ee57cd05934a900b71b5445f7d31caf8e038e774', class: "bs-chatbot-sources-drawer__header" }, h("div", { key: 'd9aa9f82aad30480bf52b7a701f094b9175e3a98', class: "bs-chatbot-sources-drawer__title-group" }, h("h2", { key: '913ac293e7af80ee142635ae7bd4b3339ac746b0', part: "heading", class: "bs-chatbot-sources-drawer__heading" }, this.heading), displayCount > 0 && (h("span", { key: 'ad659ddf56b745f915df9909c07a6a617e8e7d5a', part: "count", class: "bs-chatbot-sources-drawer__count" }, displayCount))), h("button", { key: '30ac395d5087496a955b956437dc9459eabcbe10', type: "button", part: "collapse", class: "bs-chatbot-sources-drawer__collapse", "aria-label": "Collapse sources", onClick: this.onCollapseClick }, h("slot", { key: 'aaa9629de257bb416c24e9b5b15ac634e71caf38', name: "collapse-icon" }, h(CaretRightIcon, { key: '9bbb6d7875cd5ce27ec63c03113a7982a6309814' })))), h("div", { key: 'aa0d81e61701b50231a802120443f0819b2b0a98', part: "list", class: "bs-chatbot-sources-drawer__list" }, h("slot", { key: 'cbfd567766318fc4d360804c4de5e591654a29c0', onSlotchange: this.onSlotchange }))));
61
61
  }
62
62
  static get is() { return "bs-chatbot-sources-drawer"; }
63
63
  static get encapsulation() { return "shadow"; }
@@ -45,7 +45,7 @@ export class BsChatbotSuggestionButton {
45
45
  this.bsSelect.emit();
46
46
  };
47
47
  render() {
48
- return (h("button", { key: 'ec0d9d02fe71438dc564a36d4e57bcf465b4395d', type: "button", part: "button", class: "bs-chatbot-suggestion-button", disabled: this.disabled, onClick: this.onClick }, h("slot", { key: '443a388996b21359df334af0319244f4c736e259' })));
48
+ return (h("button", { key: '4a8fe89091ddc9d343c58d22b35b9f8dc2691490', type: "button", part: "button", class: "bs-chatbot-suggestion-button", disabled: this.disabled, onClick: this.onClick }, h("slot", { key: 'f0295569d8aac7ad51116d3fde445dda7bcb24a6' })));
49
49
  }
50
50
  static get is() { return "bs-chatbot-suggestion-button"; }
51
51
  static get encapsulation() { return "shadow"; }
@@ -7,6 +7,16 @@ describe('bs-checkbox', () => {
7
7
  expect(input.checked).toBe(false);
8
8
  expect(root.shadowRoot.querySelector('[part="box"] [part="icon"]')).toBeNull();
9
9
  });
10
+ it('reflects ariaLabel to the native input, for label-less accessible names', async () => {
11
+ const { root } = await render(h("bs-checkbox", { ariaLabel: "Select all rows" }));
12
+ const input = root.shadowRoot.querySelector('input');
13
+ expect(input).toEqualAttribute('aria-label', 'Select all rows');
14
+ });
15
+ it('does not set aria-label on the native input when ariaLabel is not provided', async () => {
16
+ const { root } = await render(h("bs-checkbox", null));
17
+ const input = root.shadowRoot.querySelector('input');
18
+ expect(input).not.toHaveAttribute('aria-label');
19
+ });
10
20
  it('reflects the checked prop to the native input and shows the check icon', async () => {
11
21
  const { root } = await render(h("bs-checkbox", { checked: true }));
12
22
  const input = root.shadowRoot.querySelector('input');
@@ -180,10 +180,16 @@
180
180
  }
181
181
 
182
182
  .bs-checkbox__label {
183
- font-size: var(--bs-font-size-sm);
183
+ font-size: var(--bs-font-size-md);
184
184
  color: var(--bs-checkbox-label-color);
185
185
  }
186
186
 
187
+ /* Figma specs the label at fontsize/body/sm (14px) only for size="sm" -- size="md"/"lg" both use
188
+ fontsize/body/md (16px), which is the default set above. */
189
+ .bs-checkbox__box--sm ~ .bs-checkbox__label {
190
+ font-size: var(--bs-font-size-sm);
191
+ }
192
+
187
193
  .bs-checkbox--disabled .bs-checkbox__label {
188
194
  color: var(--bs-checkbox-label-color-disabled);
189
195
  }
@@ -43,6 +43,17 @@ export class BsCheckbox {
43
43
  /** Applies the error border/label-color treatment. This component's spec has no error message
44
44
  * text of its own (unlike `bs-input`'s `error: string`), so it's a plain boolean. */
45
45
  error = false;
46
+ /**
47
+ * Accessible name for the checkbox. Required whenever the default (label) slot is empty (e.g. a
48
+ * bare "select row" checkbox in a table) -- without it, the internal native `<input>` has no
49
+ * accessible name at all. Setting `aria-label` directly on the `<bs-checkbox>` host does NOT
50
+ * work for this: that attribute stays on the light-DOM host and is never forwarded into the
51
+ * shadow DOM by the browser, so the actual focusable element (the native `<input>` inside) stays
52
+ * nameless. This prop exists specifically to bridge that gap -- same pattern as `bs-button`'s and
53
+ * `bs-tab`'s identical `ariaLabel` prop, both of which explicitly bind it onto their own internal
54
+ * focusable element for the same reason.
55
+ */
56
+ ariaLabel = null;
46
57
  /** Emitted when the checked state changes via user interaction, with the new `checked` value. */
47
58
  bsChange;
48
59
  /** Keeps the native input's `.indeterminate` JS property in sync -- this can't be expressed as a
@@ -81,7 +92,7 @@ export class BsCheckbox {
81
92
  ]
82
93
  .filter(Boolean)
83
94
  .join(' ');
84
- return (h("label", { key: 'a5cae53f4a82545ce4f9146891ad3a24c90ad2cf', class: `bs-checkbox ${this.disabled ? 'bs-checkbox--disabled' : ''}` }, h("input", { key: 'b9e40a9c3347bcb8517474209febd048bd853e25', ref: el => (this.inputEl = el), class: "bs-checkbox__input", type: "checkbox", checked: this.checked, disabled: this.disabled, "aria-checked": this.indeterminate ? 'mixed' : String(this.checked), onChange: this.onChange }), h("span", { key: '60af78d14456f4cb65d6e9e7aa54f4b4bce84cfe', part: "box", class: boxClasses }, showIcon && (h("svg", { key: '5c64f14f979b866a71290584931f994fc485fb70', part: "icon", class: "bs-checkbox__icon", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, this.indeterminate ? (h("path", { d: "M3 8H13", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" })) : (h("path", { d: "M3 8.5L6.2 11.5L13 4.5", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }))))), h("span", { key: 'd0993da246362d50fc924e8e6e9e9465cbec631f', part: "label", class: "bs-checkbox__label" }, h("slot", { key: '719bb1f6c842f9a482f2672490f5df1025090d87' }))));
95
+ return (h("label", { key: '04fb1da55eb6a0e91fd705db9217f5e2c0992f89', class: `bs-checkbox ${this.disabled ? 'bs-checkbox--disabled' : ''}` }, h("input", { key: '06b83f45f7dfe52cd81eab603742d04d74135c7a', ref: el => (this.inputEl = el), class: "bs-checkbox__input", type: "checkbox", checked: this.checked, disabled: this.disabled, "aria-checked": this.indeterminate ? 'mixed' : String(this.checked), "aria-label": this.ariaLabel, onChange: this.onChange }), h("span", { key: 'a8a8b45074eef7cfcb5f579eff0fb7b27b71d25a', part: "box", class: boxClasses }, showIcon && (h("svg", { key: '78cf717b4cd7fbf8c56a76788a22c8aecf7fcc28', part: "icon", class: "bs-checkbox__icon", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, this.indeterminate ? (h("path", { d: "M3 8H13", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" })) : (h("path", { d: "M3 8.5L6.2 11.5L13 4.5", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }))))), h("span", { key: '2d78205d8091c89ac3a6d07cbb74b6d6a9c09971', part: "label", class: "bs-checkbox__label" }, h("slot", { key: '7da0c6d1f84b788b242b95b11d78e566f482b48c' }))));
85
96
  }
86
97
  static get is() { return "bs-checkbox"; }
87
98
  static get encapsulation() { return "shadow"; }
@@ -203,6 +214,26 @@ export class BsCheckbox {
203
214
  "reflect": false,
204
215
  "attribute": "error",
205
216
  "defaultValue": "false"
217
+ },
218
+ "ariaLabel": {
219
+ "type": "string",
220
+ "mutable": false,
221
+ "complexType": {
222
+ "original": "string | null",
223
+ "resolved": "string",
224
+ "references": {}
225
+ },
226
+ "required": false,
227
+ "optional": false,
228
+ "docs": {
229
+ "tags": [],
230
+ "text": "Accessible name for the checkbox. Required whenever the default (label) slot is empty (e.g. a\nbare \"select row\" checkbox in a table) -- without it, the internal native `<input>` has no\naccessible name at all. Setting `aria-label` directly on the `<bs-checkbox>` host does NOT\nwork for this: that attribute stays on the light-DOM host and is never forwarded into the\nshadow DOM by the browser, so the actual focusable element (the native `<input>` inside) stays\nnameless. This prop exists specifically to bridge that gap -- same pattern as `bs-button`'s and\n`bs-tab`'s identical `ariaLabel` prop, both of which explicitly bind it onto their own internal\nfocusable element for the same reason."
231
+ },
232
+ "getter": false,
233
+ "setter": false,
234
+ "reflect": false,
235
+ "attribute": "aria-label",
236
+ "defaultValue": "null"
206
237
  }
207
238
  };
208
239
  }
@@ -2,7 +2,7 @@ import { render, h, describe, it, expect } from "@stencil/vitest";
2
2
  describe('bs-composer', () => {
3
3
  it('renders with idle state defaults: ai variant placeholder, enabled mic/action buttons', async () => {
4
4
  const { root } = await render(h("bs-composer", null));
5
- const input = root.shadowRoot.querySelector('input');
5
+ const input = root.shadowRoot.querySelector('textarea');
6
6
  expect(input).toEqualAttribute('placeholder', 'Ask Genie something...');
7
7
  expect(input).not.toHaveAttribute('disabled');
8
8
  const mic = root.shadowRoot.querySelector('[part="mic"]');
@@ -13,22 +13,22 @@ describe('bs-composer', () => {
13
13
  });
14
14
  it('uses the human variant default placeholder', async () => {
15
15
  const { root } = await render(h("bs-composer", { variant: "human" }));
16
- const input = root.shadowRoot.querySelector('input');
16
+ const input = root.shadowRoot.querySelector('textarea');
17
17
  expect(input).toEqualAttribute('placeholder', 'Message your support agent...');
18
18
  });
19
19
  it('overrides the variant default placeholder when placeholder is set', async () => {
20
20
  const { root } = await render(h("bs-composer", { variant: "ai", placeholder: "Custom prompt" }));
21
- const input = root.shadowRoot.querySelector('input');
21
+ const input = root.shadowRoot.querySelector('textarea');
22
22
  expect(input).toEqualAttribute('placeholder', 'Custom prompt');
23
23
  });
24
24
  it('reflects the value prop to the native input', async () => {
25
25
  const { root } = await render(h("bs-composer", { value: "hello there" }));
26
- const input = root.shadowRoot.querySelector('input');
26
+ const input = root.shadowRoot.querySelector('textarea');
27
27
  expect(input.value).toBe('hello there');
28
28
  });
29
29
  it('sets aria-label on the input from the ariaLabel prop', async () => {
30
30
  const { root } = await render(h("bs-composer", { ariaLabel: "Message" }));
31
- const input = root.shadowRoot.querySelector('input');
31
+ const input = root.shadowRoot.querySelector('textarea');
32
32
  expect(input).toEqualAttribute('aria-label', 'Message');
33
33
  });
34
34
  it('renders consumer-supplied content in the actions-end slot, after the primary action button', async () => {
@@ -59,12 +59,53 @@ describe('bs-composer', () => {
59
59
  it('emits bsInput with the current value as the user types', async () => {
60
60
  const { root, spyOnEvent } = await render(h("bs-composer", null));
61
61
  const spy = spyOnEvent('bsInput');
62
- const input = root.shadowRoot.querySelector('input');
62
+ const input = root.shadowRoot.querySelector('textarea');
63
63
  input.value = 'a';
64
64
  input.dispatchEvent(new Event('input', { bubbles: true, composed: true }));
65
65
  expect(spy).toHaveReceivedEventTimes(1);
66
66
  expect(spy).toHaveReceivedEventDetail('a');
67
67
  });
68
+ describe('auto-grow', () => {
69
+ it('grows taller as multi-line content is typed', async () => {
70
+ const { root } = await render(h("bs-composer", null));
71
+ const textarea = root.shadowRoot.querySelector('textarea');
72
+ const oneLineHeight = textarea.getBoundingClientRect().height;
73
+ textarea.value = 'line one\nline two\nline three';
74
+ textarea.dispatchEvent(new Event('input', { bubbles: true, composed: true }));
75
+ const threeLineHeight = textarea.getBoundingClientRect().height;
76
+ expect(threeLineHeight).toBeGreaterThan(oneLineHeight);
77
+ });
78
+ it('caps growth at --bs-composer-input-max-lines and scrolls internally beyond that', async () => {
79
+ const { root } = await render(h("bs-composer", null));
80
+ const textarea = root.shadowRoot.querySelector('textarea');
81
+ const lineHeight = textarea.getBoundingClientRect().height;
82
+ const fifteenLines = Array.from({ length: 15 }, (_, i) => `line ${i}`).join('\n');
83
+ textarea.value = fifteenLines;
84
+ textarea.dispatchEvent(new Event('input', { bubbles: true, composed: true }));
85
+ const cappedHeight = textarea.getBoundingClientRect().height;
86
+ // 10 lines' worth of height, not 15 -- the default max-lines is 10 (see bs-composer.css).
87
+ expect(cappedHeight).toBeCloseTo(lineHeight * 10, 0);
88
+ expect(textarea.scrollHeight).toBeGreaterThan(textarea.clientHeight);
89
+ });
90
+ it('resizes to fit an initial multi-line value prop, not just user typing', async () => {
91
+ // Measure each render's height before the other render() call runs -- a second render() in
92
+ // the same test can detach the first instance from the layout tree, which would make its
93
+ // getBoundingClientRect() report 0 rather than its real (but by-then-detached) height.
94
+ const single = await render(h("bs-composer", { value: "one line" }));
95
+ const singleLineHeight = single.root.shadowRoot.querySelector('textarea').getBoundingClientRect().height;
96
+ const multi = await render(h("bs-composer", { value: 'line one\nline two\nline three' }));
97
+ const multiLineHeight = multi.root.shadowRoot.querySelector('textarea').getBoundingClientRect().height;
98
+ expect(multiLineHeight).toBeGreaterThan(singleLineHeight);
99
+ });
100
+ it('re-runs the resize when the value prop is updated programmatically (not via typing)', async () => {
101
+ const { root, setProps, waitForChanges } = await render(h("bs-composer", { value: "one line" }));
102
+ const textarea = root.shadowRoot.querySelector('textarea');
103
+ const oneLineHeight = textarea.getBoundingClientRect().height;
104
+ await setProps({ value: 'line one\nline two\nline three\nline four' });
105
+ await waitForChanges();
106
+ expect(textarea.getBoundingClientRect().height).toBeGreaterThan(oneLineHeight);
107
+ });
108
+ });
68
109
  it('emits bsAttach when the attach button is clicked', async () => {
69
110
  const { root, spyOnEvent } = await render(h("bs-composer", null));
70
111
  const spy = spyOnEvent('bsAttach');
@@ -107,7 +148,7 @@ describe('bs-composer', () => {
107
148
  describe('state="disabled"', () => {
108
149
  it('natively disables both the mic and action buttons and the text input', async () => {
109
150
  const { root } = await render(h("bs-composer", { state: "disabled" }));
110
- expect(root.shadowRoot.querySelector('input')).toHaveAttribute('disabled');
151
+ expect(root.shadowRoot.querySelector('textarea')).toHaveAttribute('disabled');
111
152
  expect(root.shadowRoot.querySelector('[part="mic"]')).toHaveAttribute('disabled');
112
153
  expect(root.shadowRoot.querySelector('[part="action"]')).toHaveAttribute('disabled');
113
154
  });
@@ -22,6 +22,8 @@
22
22
  --bs-composer-subtle-pressed: var(--bs-color-neutral-container-pressed);
23
23
 
24
24
  --bs-composer-waveform-color: var(--bs-border-default);
25
+
26
+ --bs-composer-input-max-lines: 10;
25
27
  }
26
28
 
27
29
  .bs-composer {
@@ -62,12 +64,25 @@
62
64
  .bs-composer__input {
63
65
  flex: 1;
64
66
  min-width: 0;
67
+ box-sizing: border-box;
68
+ /* Browsers apply their own default padding to <textarea> (Chromium: 2px) -- zero it out so the
69
+ auto-grow height math (line-height * number of lines) isn't thrown off by unaccounted-for
70
+ padding. */
71
+ padding: 0;
65
72
  border: none;
66
73
  outline: none;
74
+ resize: none;
67
75
  background: transparent;
68
76
  color: var(--bs-input-text);
69
77
  font-family: inherit;
70
78
  font-size: var(--bs-font-size-md);
79
+ /* Explicit, not the textarea's default line-height -- the auto-grow max-height below is computed
80
+ in terms of this exact value times --bs-composer-input-max-lines, so it has to be pinned down. */
81
+ line-height: calc(var(--bs-line-height-body-md) * 1px);
82
+ /* Grows with content (see bs-composer.tsx's resizeInput) up to this many lines' worth of height,
83
+ then scrolls internally instead of growing the whole composer further. */
84
+ max-height: calc(var(--bs-composer-input-max-lines) * var(--bs-line-height-body-md) * 1px);
85
+ overflow-y: auto;
71
86
  }
72
87
 
73
88
  .bs-composer__input::placeholder {
@@ -37,7 +37,7 @@ const WAVEFORM_BAR_HEIGHTS = [
37
37
  * roughly match `--bs-composer-button-size` to align visually.
38
38
  * @part attachments - The wrapper around the `attachments` slot.
39
39
  * @part attach - The "+" attach button.
40
- * @part input - The native text `<input>`.
40
+ * @part input - The native text `<textarea>`.
41
41
  * @part mic - The secondary icon button (microphone, or the stop-recording square while `state="recording"`).
42
42
  * @part action - The primary circular action button (send, stop, or confirm depending on `state`).
43
43
  * @prop --bs-composer-radius - Corner radius of the container. Aliased to `--bs-border-radius-150`.
@@ -57,9 +57,11 @@ const WAVEFORM_BAR_HEIGHTS = [
57
57
  * @prop --bs-composer-mic-icon-disabled - Aliased to `--bs-icon-disabled`.
58
58
  * @prop --bs-composer-subtle-hover - Background of the attach/mic buttons on hover (subtle-button treatment, same as `bs-button`'s `subtle` variant). Aliased to `--bs-color-neutral-container`.
59
59
  * @prop --bs-composer-subtle-pressed - Background of the attach/mic buttons when pressed. Aliased to `--bs-color-neutral-container-pressed`.
60
+ * @prop --bs-composer-input-max-lines - How many lines the text field grows to before scrolling internally instead of growing further. Aliased to `10`.
60
61
  */
61
62
  export class BsComposer {
62
63
  el;
64
+ inputEl;
63
65
  /**
64
66
  * Which flavor of composer this is: changes the *default* placeholder text (set `placeholder`
65
67
  * directly to override it) and, per the Figma design, renders the container border dashed
@@ -70,7 +72,12 @@ export class BsComposer {
70
72
  /** Overrides the variant's default placeholder. */
71
73
  placeholder;
72
74
  /** Current text value. Native `input` events don't cross the Shadow DOM boundary, so this
73
- * component re-dispatches them as a `bsInput` custom event instead. */
75
+ * component re-dispatches them as a `bsInput` custom event instead.
76
+ *
77
+ * The field is a `<textarea>` (not a single-line `<input>`) that grows with its content, up to
78
+ * `--bs-composer-input-max-lines` (10 by default) -- beyond that it scrolls internally instead
79
+ * of growing further. Setting `value` as a prop (not just typing) also re-triggers the resize,
80
+ * so e.g. programmatically clearing the field after submit correctly shrinks it back down. */
74
81
  value = '';
75
82
  /**
76
83
  * Which of the four mutually-exclusive composer states to render: `idle` (send, enabled),
@@ -107,11 +114,38 @@ export class BsComposer {
107
114
  componentWillLoad() {
108
115
  this.hasAttachments = Array.from(this.el.childNodes).some(node => node.nodeType === Node.ELEMENT_NODE && node.getAttribute('slot') === 'attachments');
109
116
  }
117
+ componentDidLoad() {
118
+ this.resizeInput();
119
+ }
120
+ /** Re-runs the auto-grow calculation after every re-render -- notably including a `value` prop
121
+ * change from the outside (e.g. a consumer clearing the field after submit, or pre-filling it),
122
+ * not just while the user is typing. This has to be `componentDidUpdate`, not a `@Watch('value')`
123
+ * callback: `@Watch` fires as soon as the prop is reassigned, which is BEFORE Stencil's next
124
+ * render actually pushes the new value into the textarea's DOM `.value` -- reading `scrollHeight`
125
+ * at that point still reflects the OLD content, so the resize would silently no-op. */
126
+ componentDidUpdate() {
127
+ this.resizeInput();
128
+ }
129
+ /**
130
+ * Grows the textarea to fit its content, up to `--bs-composer-input-max-lines` worth of height
131
+ * (CSS `max-height` clamps the visual result and `overflow-y: auto` takes over beyond that --
132
+ * see bs-composer.css). Resetting `height` to `auto` first is required before reading
133
+ * `scrollHeight`, otherwise a shrinking edit (e.g. deleting a line) would never shrink the
134
+ * textarea back down -- `scrollHeight` only ever reports the larger of "current height" and
135
+ * "content height" if the height isn't cleared first.
136
+ */
137
+ resizeInput() {
138
+ if (!this.inputEl)
139
+ return;
140
+ this.inputEl.style.height = 'auto';
141
+ this.inputEl.style.height = `${this.inputEl.scrollHeight}px`;
142
+ }
110
143
  onAttachmentsSlotchange = (ev) => {
111
144
  this.hasAttachments = ev.target.assignedNodes().length > 0;
112
145
  };
113
146
  onInput = (ev) => {
114
147
  const value = ev.target.value;
148
+ this.resizeInput();
115
149
  this.bsInput.emit(value);
116
150
  };
117
151
  onAttachClick = () => {
@@ -149,7 +183,7 @@ export class BsComposer {
149
183
  const placeholder = this.placeholder ?? DEFAULT_PLACEHOLDERS[this.variant];
150
184
  const disabled = this.state === 'disabled';
151
185
  const recording = this.state === 'recording';
152
- return (h("div", { key: '6215ac865d4df3984f1f0aee90ecd430d138aab3', class: `bs-composer bs-composer--${this.state} bs-composer--${this.variant}` }, h("div", { key: '93232e0bc2112d2e774b6f276aca7e392a4c9a10', part: "attachments", class: `bs-composer__attachments-row ${this.hasAttachments ? 'bs-composer__attachments-row--visible' : ''}` }, h("slot", { key: 'd169cece5b8924396dc1b0ed01b1eec34d18fa7a', name: "attachments", onSlotchange: this.onAttachmentsSlotchange })), h("div", { key: 'bbe77f36bf48b50a2555502df2d19d38e132279a', class: "bs-composer__text-row" }, h("input", { key: '1f15cd9bf4fc0861390709d1bdfc780866432601', part: "input", class: "bs-composer__input", type: "text", value: this.value, placeholder: placeholder, disabled: disabled, "aria-label": this.ariaLabel, onInput: this.onInput })), h("div", { key: '7dccc69d8182c63d0c817d0cb688df17925eb40d', class: "bs-composer__controls-row" }, h("button", { key: '30a209358b6b1a2af6412cbcf83ab6088a610ac8', type: "button", part: "attach", class: "bs-composer__attach", "aria-label": "Attach", onClick: this.onAttachClick }, h(PlusIcon, { key: '37ad5b75cc1358649fe99f68a99b391a7cf9ec04' })), 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" })), h("button", { key: '86e9ba5f61901274c12f71cdc1c2518becf37ac5', type: "button", part: "mic", class: `bs-composer__mic ${recording ? 'bs-composer__mic--recording' : ''}`, "aria-label": recording ? 'Stop recording' : 'Start voice input', disabled: disabled, onClick: this.onMicClick }, recording ? h(StopIcon, null) : h(MicIcon, null)), h("button", { key: '13d9f765e69b896cb6697fcb74c1f99efa4fe4a0', type: "button", part: "action", class: `bs-composer__action bs-composer__action--${this.state}`, "aria-label": this.actionLabel(), disabled: disabled, onClick: this.onActionClick }, this.renderActionIcon()), h("slot", { key: '4aa85ea3ba7f515095c0a8c2091a219e13de38e3', name: "actions-end" }))));
186
+ return (h("div", { key: '4d6ea6241693e45065388f34f9fe2c141eb6379f', class: `bs-composer bs-composer--${this.state} bs-composer--${this.variant}` }, h("div", { key: '952853cd4a36c5dc6057186825432616c5c99b38', part: "attachments", class: `bs-composer__attachments-row ${this.hasAttachments ? 'bs-composer__attachments-row--visible' : ''}` }, h("slot", { key: '65311f5b1f1b8fd1e6c9f33741a53c94bbe292b0', name: "attachments", onSlotchange: this.onAttachmentsSlotchange })), h("div", { key: '8699568430ff2140b0869a004a253e6c01e1984f', class: "bs-composer__text-row" }, h("textarea", { key: '5505815f7bb6ff19191ffea375fcd7fb856371fd', ref: el => (this.inputEl = el), part: "input", class: "bs-composer__input", rows: 1, value: this.value, placeholder: placeholder, disabled: disabled, "aria-label": this.ariaLabel, onInput: this.onInput })), h("div", { key: 'fd65f7928117afd583e3f1e2372cbb66305a530e', class: "bs-composer__controls-row" }, h("button", { key: '4e691d7ca567a4ece45601f47836d1ac7c5e2a1d', type: "button", part: "attach", class: "bs-composer__attach", "aria-label": "Attach", onClick: this.onAttachClick }, h(PlusIcon, { key: 'e363bbfcd346090dbceafd20d893af0903952223' })), 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" })), h("button", { key: 'e0f113e189ec7ded494c7ef7cf91fe3e13df01bc', type: "button", part: "mic", class: `bs-composer__mic ${recording ? 'bs-composer__mic--recording' : ''}`, "aria-label": recording ? 'Stop recording' : 'Start voice input', disabled: disabled, onClick: this.onMicClick }, recording ? h(StopIcon, null) : h(MicIcon, null)), h("button", { key: '3603219c2c3781a9e2894142313f84dfa52c21ed', type: "button", part: "action", class: `bs-composer__action bs-composer__action--${this.state}`, "aria-label": this.actionLabel(), disabled: disabled, onClick: this.onActionClick }, this.renderActionIcon()), h("slot", { key: '3d143aa3f254310dba537c19a6ac4c40205a405d', name: "actions-end" }))));
153
187
  }
154
188
  static get is() { return "bs-composer"; }
155
189
  static get encapsulation() { return "shadow"; }
@@ -223,7 +257,7 @@ export class BsComposer {
223
257
  "optional": false,
224
258
  "docs": {
225
259
  "tags": [],
226
- "text": "Current text value. Native `input` events don't cross the Shadow DOM boundary, so this\ncomponent re-dispatches them as a `bsInput` custom event instead."
260
+ "text": "Current text value. Native `input` events don't cross the Shadow DOM boundary, so this\ncomponent re-dispatches them as a `bsInput` custom event instead.\n\nThe field is a `<textarea>` (not a single-line `<input>`) that grows with its content, up to\n`--bs-composer-input-max-lines` (10 by default) -- beyond that it scrolls internally instead\nof growing further. Setting `value` as a prop (not just typing) also re-triggers the resize,\nso e.g. programmatically clearing the field after submit correctly shrinks it back down."
227
261
  },
228
262
  "getter": false,
229
263
  "setter": false,
@@ -1,10 +1,56 @@
1
1
  import { render, h, describe, it, expect } from "@stencil/vitest";
2
2
  describe('bs-composer-status-banner', () => {
3
- it('renders the message and a default clock icon', async () => {
3
+ it('renders the message and a default icon', async () => {
4
4
  const { root } = await render(h("bs-composer-status-banner", { message: "Something went wrong" }));
5
5
  expect(root).toHaveTextContent('Something went wrong');
6
6
  expect(root.shadowRoot.querySelector('[part="icon"] svg')).not.toBeNull();
7
7
  });
8
+ describe('accessibility', () => {
9
+ it('sets role="alert" for type="error" (the default)', async () => {
10
+ const { root } = await render(h("bs-composer-status-banner", null));
11
+ expect(root.shadowRoot.querySelector('.bs-composer-status-banner')).toEqualAttribute('role', 'alert');
12
+ });
13
+ it('sets role="alert" for type="warning"', async () => {
14
+ const { root } = await render(h("bs-composer-status-banner", { type: "warning" }));
15
+ expect(root.shadowRoot.querySelector('.bs-composer-status-banner')).toEqualAttribute('role', 'alert');
16
+ });
17
+ it('sets role="status" for type="info"', async () => {
18
+ const { root } = await render(h("bs-composer-status-banner", { type: "info" }));
19
+ expect(root.shadowRoot.querySelector('.bs-composer-status-banner')).toEqualAttribute('role', 'status');
20
+ });
21
+ it('sets role="status" for type="neutral"', async () => {
22
+ const { root } = await render(h("bs-composer-status-banner", { type: "neutral" }));
23
+ expect(root.shadowRoot.querySelector('.bs-composer-status-banner')).toEqualAttribute('role', 'status');
24
+ });
25
+ });
26
+ describe('default icon per type', () => {
27
+ it('shows the warning-triangle icon for type="error"', async () => {
28
+ const { root } = await render(h("bs-composer-status-banner", { type: "error" }));
29
+ const svg = root.shadowRoot.querySelector('[part="icon"] svg');
30
+ expect(svg.querySelector('circle[r="0.75"]')).not.toBeNull();
31
+ });
32
+ it('shows the warning-triangle icon for type="warning"', async () => {
33
+ const { root } = await render(h("bs-composer-status-banner", { type: "warning" }));
34
+ const svg = root.shadowRoot.querySelector('[part="icon"] svg');
35
+ expect(svg.querySelector('circle[r="0.75"]')).not.toBeNull();
36
+ });
37
+ it('shows the clock icon for type="info"', async () => {
38
+ const { root } = await render(h("bs-composer-status-banner", { type: "info" }));
39
+ const svg = root.shadowRoot.querySelector('[part="icon"] svg');
40
+ expect(svg.querySelector('circle[r="7.25"]')).not.toBeNull();
41
+ });
42
+ it('shows the clock icon for type="neutral"', async () => {
43
+ const { root } = await render(h("bs-composer-status-banner", { type: "neutral" }));
44
+ const svg = root.shadowRoot.querySelector('[part="icon"] svg');
45
+ expect(svg.querySelector('circle[r="7.25"]')).not.toBeNull();
46
+ });
47
+ it('a slotted icon still overrides the type-based default', async () => {
48
+ const { root } = await render(h("bs-composer-status-banner", { type: "error" }, h("svg", { slot: "icon", class: "custom-icon" })));
49
+ const slot = root.shadowRoot.querySelector('slot[name="icon"]');
50
+ expect(slot.assignedElements()).toHaveLength(1);
51
+ expect(slot.assignedElements()[0]).toHaveClass('custom-icon');
52
+ });
53
+ });
8
54
  it('does not render the icon when showIcon is false', async () => {
9
55
  const { root } = await render(h("bs-composer-status-banner", { showIcon: false }));
10
56
  expect(root.shadowRoot.querySelector('[part="icon"]')).toBeNull();
@@ -13,6 +13,13 @@ import { h } from "@stencil/core";
13
13
  * - A toast/snackbar notification unrelated to the composer -- this component is not
14
14
  * self-dismissing and has no positioning of its own (it's a static block, not an overlay).
15
15
  *
16
+ * ## Accessibility
17
+ * Sets `role="status"` for `type="info"`/`type="neutral"` and `role="alert"` for
18
+ * `type="error"`/`type="warning"` on its own root element automatically -- no opt-in prop needed.
19
+ * Both roles carry implicit ARIA live-region semantics (`status` is polite, `alert` is assertive),
20
+ * so a screen reader announces the message as soon as this banner is inserted into the DOM,
21
+ * without a consumer having to remember to add `role`/`aria-live` themselves.
22
+ *
16
23
  * @slot icon - Overrides the default leading icon. Only rendered when `showIcon` is true.
17
24
  * @part icon - The leading icon wrapper.
18
25
  * @part message - The message text.
@@ -87,8 +94,19 @@ export class BsComposerStatusBanner {
87
94
  onCloseClick = () => {
88
95
  this.bsClose.emit();
89
96
  };
97
+ /** `error`/`warning` need immediate, interrupting announcement (`alert`); `info`/`neutral` only
98
+ * need a polite one (`status`) -- matches the Figma Accessibility guidelines for this component. */
99
+ roleForType() {
100
+ return this.type === 'error' || this.type === 'warning' ? 'alert' : 'status';
101
+ }
102
+ /** Clock reads as "waiting/pending", a reasonable default for info/neutral notices -- but is a
103
+ * weak match for error/warning, which get a warning-triangle icon instead. Either default is
104
+ * still overridable via the `icon` slot. */
105
+ renderDefaultIcon() {
106
+ return this.type === 'error' || this.type === 'warning' ? h(WarningIcon, null) : h(ClockIcon, null);
107
+ }
90
108
  render() {
91
- return (h("div", { key: '9444cd90c8a529a7a3155a27303ca4af3abcb733', class: `bs-composer-status-banner bs-composer-status-banner--${this.type}` }, h("div", { key: '7a25dd42f4941c928e7d21a83e66c46bd4a28f7c', class: "bs-composer-status-banner__message-group" }, this.showIcon && (h("span", { key: 'e21ef754303df6c0bcb6cb4d6a0f9cdd2453a347', part: "icon", class: "bs-composer-status-banner__icon" }, h("slot", { key: '8df995de6f4553178552fb2905aa95290741328d', name: "icon" }, h(ClockIcon, { key: 'c2f25db5e1bb964ad4ec2ded6018c8692074bc19' })))), h("p", { key: 'a57b869260c3fc87e3ab50f9af14558047f70955', part: "message", class: "bs-composer-status-banner__message" }, this.message)), this.showButton && (h("button", { key: '6fa67847f17e3c83705f1ddf888c89e3cf9d0752', type: "button", part: "action", class: "bs-composer-status-banner__action", onClick: this.onActionClick }, this.actionLabel)), this.allowClose && (h("button", { key: '3cc3420291a3687d579d18f365154c0db1c4a79f', type: "button", part: "close", class: "bs-composer-status-banner__close", "aria-label": "Dismiss", onClick: this.onCloseClick }, h(CloseIcon, { key: '14617eacef6a6ab4e6056d115dcf8929481eeeee' })))));
109
+ return (h("div", { key: '1c8597f28e99e0900448fade97c53fd21a945b68', role: this.roleForType(), class: `bs-composer-status-banner bs-composer-status-banner--${this.type}` }, h("div", { key: 'f4d0b098780368863d92c43bac129d58cea2ccfd', class: "bs-composer-status-banner__message-group" }, this.showIcon && (h("span", { key: 'a713386fa868bdc244f9b84780fe1672c0a8f60e', part: "icon", class: "bs-composer-status-banner__icon" }, h("slot", { key: '8aa2007e7f744712c142f26d21bba54f6fa9dec7', name: "icon" }, this.renderDefaultIcon()))), h("p", { key: '000009a01e08ea49bd73f2d3490f1f13bfa9d597', part: "message", class: "bs-composer-status-banner__message" }, this.message)), this.showButton && (h("button", { key: 'd323a702a0f3f4f3cb16c23bb75d0f26a2b13b4b', type: "button", part: "action", class: "bs-composer-status-banner__action", onClick: this.onActionClick }, this.actionLabel)), this.allowClose && (h("button", { key: 'b62fa5da8b4fb8c40004f955b9368b71ae0b054c', type: "button", part: "close", class: "bs-composer-status-banner__close", "aria-label": "Dismiss", onClick: this.onCloseClick }, h(CloseIcon, { key: '4c8396f98eff345569ca9ca8940115aa4bc7c3f8' })))));
92
110
  }
93
111
  static get is() { return "bs-composer-status-banner"; }
94
112
  static get encapsulation() { return "shadow"; }
@@ -267,4 +285,5 @@ export class BsComposerStatusBanner {
267
285
  }
268
286
  }
269
287
  const ClockIcon = () => (h("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("circle", { cx: "10", cy: "10", r: "7.25", stroke: "currentColor", "stroke-width": "1.3" }), h("path", { d: "M10 5.83V10L12.5 11.67", stroke: "currentColor", "stroke-width": "1.3", "stroke-linecap": "round", "stroke-linejoin": "round" })));
288
+ const WarningIcon = () => (h("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M10 3L18 17H2L10 3Z", stroke: "currentColor", "stroke-width": "1.3", "stroke-linejoin": "round" }), h("path", { d: "M10 8V11.5", stroke: "currentColor", "stroke-width": "1.3", "stroke-linecap": "round" }), h("circle", { cx: "10", cy: "14", r: "0.75", fill: "currentColor" })));
270
289
  const CloseIcon = () => (h("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M15 5L5 15", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M15 15L5 5", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })));
@@ -54,11 +54,11 @@ export class BsDataTable {
54
54
  this.bsRowSelect.emit({ id: row.id, selected });
55
55
  };
56
56
  render() {
57
- return (h("table", { key: 'fac4ff9ccea077cebdb9a7e80759234b08f39420', part: "table", class: "bs-data-table" }, h("thead", { key: 'ffdf80f1945ac824cabaf2c405d7f46a60bada13', part: "head" }, h("tr", { key: 'a7105ca41522ffa29234058b8a77e7ecd6c51451' }, this.selectable && h("th", { key: '7388b969f17245485f096acc8eebca17a2c1295f', class: "bs-data-table__select-col" }), this.columns.map(column => {
57
+ return (h("table", { key: 'b22d3029ddc85bd7125d69b53be2ed427cc7e3c4', part: "table", class: "bs-data-table" }, h("thead", { key: '469ff536b8e09ed6f866b1a883ad06f9df75f003', part: "head" }, h("tr", { key: '8394e3bfe1259bb2342a324ded83dfac41eb8271' }, this.selectable && h("th", { key: '9d2b97169b92b9e45209f91f855431901e8897c1', class: "bs-data-table__select-col" }), this.columns.map(column => {
58
58
  const isSorted = this.sortColumn === column.key;
59
59
  const ariaSort = column.sortable ? (isSorted ? (this.sortDirection === 'asc' ? 'ascending' : 'descending') : 'none') : undefined;
60
60
  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)));
61
- }))), h("tbody", { key: '47041704bc1fcde4047a2cf73f0cab402eafbc61', 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 ? (
61
+ }))), h("tbody", { key: '8a9fa723abcb83820c489b8f07eab58ee306e491', 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 ? (
62
62
  // cellRenderer is a developer-supplied, trusted function (JS-property-only, never
63
63
  // derived from untrusted input) -- its HTML output is intentionally not escaped,
64
64
  // same trust model as React's dangerouslySetInnerHTML.
@@ -323,10 +323,10 @@ export class BsInput {
323
323
  return (h("div", { part: "field", class: `bs-input__field bs-input__field--pin ${this.disabled ? 'bs-input__field--disabled' : ''}` }, Array.from({ length: this.length }).map((_, i) => (h("input", { id: i === 0 ? 'control' : undefined, ref: el => (this.pinInputs[i] = el), part: "control", class: "bs-input__pin-cell", type: "text", inputMode: "numeric", maxLength: 1, value: this.value[i] ?? '', disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, onInput: this.onPinInput(i), onKeyDown: this.onPinKeydown(i) })))));
324
324
  }
325
325
  render() {
326
- return (h("div", { key: '8e7620323b2067d96d7222b96c3b2bcc6679246d', class: `bs-input ${this.error ? 'bs-input--error' : ''}` }, this.label && (
326
+ return (h("div", { key: '766dae0bf2565f45a9fffffc9684a83c89cea122', class: `bs-input ${this.error ? 'bs-input--error' : ''}` }, this.label && (
327
327
  // "control" is a fixed id, not a generated one -- safe because Shadow DOM scopes ids
328
328
  // to this instance's own shadow root, so it can never collide with another bs-input.
329
- h("label", { key: 'd17a27a0bd6411884cd26a401f99f18a7c32115f', part: "label", class: "bs-input__label", htmlFor: "control" }, this.label, this.required && (h("span", { key: '71508882188d22a5fab23ce65316aa8920f0612e', part: "required", class: "bs-input__required", "aria-hidden": "true" }, "*")))), this.type === 'pin' ? this.renderPinField() : this.renderField(), this.error ? (h("span", { id: "description-or-error", part: "error", class: "bs-input__error" }, h("svg", { part: "error-icon", class: "bs-input__error-icon", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, h("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", "stroke-width": "1.2" }), h("path", { d: "M8 5V8.5", stroke: "currentColor", "stroke-width": "1.2", "stroke-linecap": "round" }), h("circle", { cx: "8", cy: "11", r: "0.75", fill: "currentColor" })), this.error)) : this.description ? (h("span", { id: "description-or-error", part: "description", class: "bs-input__description" }, this.description)) : null));
329
+ h("label", { key: '7935c91837b4882a9b2a416e43f43b1e0d311c8f', part: "label", class: "bs-input__label", htmlFor: "control" }, this.label, this.required && (h("span", { key: '4db3ccc8647ebb5e0fb6635fb9c0e6050872b10c', part: "required", class: "bs-input__required", "aria-hidden": "true" }, "*")))), this.type === 'pin' ? this.renderPinField() : this.renderField(), this.error ? (h("span", { id: "description-or-error", part: "error", class: "bs-input__error" }, h("svg", { part: "error-icon", class: "bs-input__error-icon", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, h("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", "stroke-width": "1.2" }), h("path", { d: "M8 5V8.5", stroke: "currentColor", "stroke-width": "1.2", "stroke-linecap": "round" }), h("circle", { cx: "8", cy: "11", r: "0.75", fill: "currentColor" })), this.error)) : this.description ? (h("span", { id: "description-or-error", part: "description", class: "bs-input__description" }, this.description)) : null));
330
330
  }
331
331
  static get is() { return "bs-input"; }
332
332
  static get encapsulation() { return "shadow"; }