@brandsync/wc 0.0.10 → 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 (300) hide show
  1. package/custom-elements.json +3584 -508
  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-b1e1b2d6.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-3dacae70.entry.js → p-1900f6ce.entry.js} +1 -1
  9. package/dist/brandsync-wc/{p-575ce905.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-dd747a12.entry.js → p-1cf715aa.entry.js} +1 -1
  12. package/dist/brandsync-wc/{p-8a78d6ea.entry.js → p-20dbc6a1.entry.js} +1 -1
  13. package/dist/brandsync-wc/{p-a34f460d.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-2a65aabb.entry.js +1 -0
  16. package/dist/brandsync-wc/{p-8d12ed96.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-18af02df.entry.js → p-57fdbb76.entry.js} +1 -1
  21. package/dist/brandsync-wc/{p-7776b57b.entry.js → p-64e2a7d7.entry.js} +1 -1
  22. package/dist/brandsync-wc/{p-805644e4.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-d682675e.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-94ed898a.entry.js → p-8ded1eb6.entry.js} +1 -1
  28. package/dist/brandsync-wc/{p-nLORuTUY.js → p-DST5-cTx.js} +2 -2
  29. package/dist/brandsync-wc/p-a5b15061.entry.js +1 -0
  30. package/dist/brandsync-wc/{p-30a0e168.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-96f374be.entry.js → p-b289450a.entry.js} +1 -1
  33. package/dist/brandsync-wc/{p-880ea3f8.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-1515498e.entry.js → p-d4e3ca77.entry.js} +1 -1
  36. package/dist/brandsync-wc/{p-ce0914a7.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 +94 -0
  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-CVh-sqA_.js → index-B3sdhEGk.js} +74 -2
  75. package/dist/cjs/loader.cjs.js +2 -2
  76. package/dist/collection/collection-manifest.json +14 -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 +117 -0
  99. package/dist/collection/components/bs-checkbox/bs-checkbox.css +199 -0
  100. package/dist/collection/components/bs-checkbox/bs-checkbox.js +265 -0
  101. package/dist/collection/components/bs-checkbox/bs-checkbox.stories.js +65 -0
  102. package/dist/collection/components/bs-composer/bs-composer.cmp.test.js +48 -7
  103. package/dist/collection/components/bs-composer/bs-composer.css +15 -0
  104. package/dist/collection/components/bs-composer/bs-composer.js +38 -4
  105. package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.cmp.test.js +47 -1
  106. package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.js +20 -1
  107. package/dist/collection/components/bs-data-table/bs-data-table.js +2 -2
  108. package/dist/collection/components/bs-input/bs-input.js +2 -2
  109. package/dist/collection/components/bs-logo/brandsync-logo-full-dark.js +44 -0
  110. package/dist/collection/components/bs-logo/brandsync-logo-full-light.js +40 -0
  111. package/dist/collection/components/bs-logo/brandsync-logo-mark.js +17 -0
  112. package/dist/collection/components/bs-logo/bs-logo.cmp.test.js +113 -0
  113. package/dist/collection/components/bs-logo/bs-logo.css +79 -0
  114. package/dist/collection/components/bs-logo/bs-logo.js +193 -0
  115. package/dist/collection/components/bs-logo/bs-logo.stories.js +69 -0
  116. package/dist/collection/components/bs-menu/bs-menu.js +1 -1
  117. package/dist/collection/components/bs-menu-item/bs-menu-item.js +1 -1
  118. package/dist/collection/components/bs-radio/bs-radio.cmp.test.js +76 -0
  119. package/dist/collection/components/bs-radio/bs-radio.css +164 -0
  120. package/dist/collection/components/bs-radio/bs-radio.js +170 -0
  121. package/dist/collection/components/bs-radio/bs-radio.stories.js +56 -0
  122. package/dist/collection/components/bs-slider/bs-slider.cmp.test.js +139 -0
  123. package/dist/collection/components/bs-slider/bs-slider.css +409 -0
  124. package/dist/collection/components/bs-slider/bs-slider.js +499 -0
  125. package/dist/collection/components/bs-slider/bs-slider.stories.js +70 -0
  126. package/dist/collection/components/bs-source-link/bs-source-link.js +2 -2
  127. package/dist/collection/components/bs-switch/bs-switch.cmp.test.js +71 -0
  128. package/dist/collection/components/bs-switch/bs-switch.css +196 -0
  129. package/dist/collection/components/bs-switch/bs-switch.js +185 -0
  130. package/dist/collection/components/bs-switch/bs-switch.stories.js +60 -0
  131. package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.cmp.test.js +104 -0
  132. package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.css +163 -0
  133. package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +192 -0
  134. package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.stories.js +95 -0
  135. package/dist/collection/components/bs-tab/bs-tab/bs-tab.cmp.test.js +120 -0
  136. package/dist/collection/components/bs-tab/bs-tab/bs-tab.css +216 -0
  137. package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +232 -0
  138. package/dist/collection/components/bs-tab/bs-tab/bs-tab.stories.js +138 -0
  139. package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.cmp.test.js +61 -0
  140. package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.css +39 -0
  141. package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +133 -0
  142. package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.stories.js +39 -0
  143. package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
  144. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.cmp.test.js +131 -0
  145. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.css +257 -0
  146. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.js +253 -0
  147. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.stories.js +202 -0
  148. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.cmp.test.js +172 -0
  149. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.css +325 -0
  150. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.js +314 -0
  151. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.stories.js +78 -0
  152. package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.cmp.test.js +77 -0
  153. package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.css +106 -0
  154. package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.js +188 -0
  155. package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.stories.js +189 -0
  156. package/dist/components/bs-ai-disclaimer.js +1 -1
  157. package/dist/components/bs-ai-greeting.js +1 -1
  158. package/dist/components/bs-ai-thinking.js +1 -1
  159. package/dist/components/bs-attachment-list.js +1 -1
  160. package/dist/components/bs-attachment.js +1 -1
  161. package/dist/components/bs-badge.js +1 -1
  162. package/dist/components/bs-button-skeleton.js +1 -1
  163. package/dist/components/bs-button.js +1 -1
  164. package/dist/components/bs-card.js +1 -1
  165. package/dist/components/bs-chatbot-feedback.js +1 -1
  166. package/dist/components/bs-chatbot-header.js +1 -1
  167. package/dist/components/bs-chatbot-response-action.js +1 -1
  168. package/dist/components/bs-chatbot-sources-drawer.js +1 -1
  169. package/dist/components/bs-chatbot-suggestion-button.js +1 -1
  170. package/dist/components/bs-checkbox.d.ts +11 -0
  171. package/dist/components/bs-checkbox.js +1 -0
  172. package/dist/components/bs-composer-status-banner.js +1 -1
  173. package/dist/components/bs-composer.js +1 -1
  174. package/dist/components/bs-data-table.js +1 -1
  175. package/dist/components/bs-icon-button.d.ts +11 -0
  176. package/dist/components/bs-icon-button.js +1 -0
  177. package/dist/components/bs-inline-tab.d.ts +11 -0
  178. package/dist/components/bs-inline-tab.js +1 -0
  179. package/dist/components/bs-input.js +1 -1
  180. package/dist/components/bs-logo.d.ts +11 -0
  181. package/dist/components/bs-logo.js +1 -0
  182. package/dist/components/bs-menu-item.js +1 -1
  183. package/dist/components/bs-menu.js +1 -1
  184. package/dist/components/bs-modal.js +1 -1
  185. package/dist/components/bs-navigation-drawer-item.d.ts +11 -0
  186. package/dist/components/bs-navigation-drawer-item.js +1 -0
  187. package/dist/components/bs-navigation-drawer.d.ts +11 -0
  188. package/dist/components/bs-navigation-drawer.js +1 -0
  189. package/dist/components/bs-navigation-header.d.ts +11 -0
  190. package/dist/components/bs-navigation-header.js +1 -0
  191. package/dist/components/bs-radio.d.ts +11 -0
  192. package/dist/components/bs-radio.js +1 -0
  193. package/dist/components/bs-slider.d.ts +11 -0
  194. package/dist/components/bs-slider.js +1 -0
  195. package/dist/components/bs-source-link.js +1 -1
  196. package/dist/components/bs-switch.d.ts +11 -0
  197. package/dist/components/bs-switch.js +1 -0
  198. package/dist/components/bs-tab.d.ts +11 -0
  199. package/dist/components/bs-tab.js +1 -0
  200. package/dist/components/bs-tabs.d.ts +11 -0
  201. package/dist/components/bs-tabs.js +1 -0
  202. package/dist/components/bs-tooltip.js +1 -1
  203. package/dist/components/index.js +1 -1
  204. package/dist/components/p-BAOJc0V0.js +1 -0
  205. package/dist/components/{p-BpvhHQSw.js → p-Be1Pfcnm.js} +1 -1
  206. package/dist/components/{p-Cz2nfz2j.js → p-BqYyMGrB.js} +1 -1
  207. package/dist/components/p-CaWqTQBZ.js +1 -0
  208. package/dist/components/{p-DndQiCMP.js → p-DivZLd6i.js} +1 -1
  209. package/dist/components/{p-DHbUF0g6.js → p-xfx69LQx.js} +1 -1
  210. package/dist/esm/brandsync-wc.js +3 -3
  211. package/dist/esm/bs-ai-disclaimer.entry.js +3 -2
  212. package/dist/esm/bs-ai-greeting.entry.js +2 -2
  213. package/dist/esm/bs-ai-thinking.entry.js +2 -2
  214. package/dist/esm/bs-attachment-list.entry.js +2 -2
  215. package/dist/esm/bs-attachment.entry.js +3 -3
  216. package/dist/esm/bs-badge.entry.js +1 -1
  217. package/dist/esm/bs-button-skeleton.entry.js +2 -2
  218. package/dist/esm/bs-button.entry.js +3 -3
  219. package/dist/esm/bs-card.entry.js +1 -1
  220. package/dist/esm/bs-chatbot-feedback.entry.js +2 -2
  221. package/dist/esm/bs-chatbot-header.entry.js +2 -2
  222. package/dist/esm/bs-chatbot-response-action.entry.js +2 -2
  223. package/dist/esm/bs-chatbot-sources-drawer.entry.js +2 -2
  224. package/dist/esm/bs-chatbot-suggestion-button.entry.js +2 -2
  225. package/dist/esm/bs-checkbox.entry.js +92 -0
  226. package/dist/esm/bs-composer-status-banner.entry.js +14 -2
  227. package/dist/esm/bs-composer.entry.js +37 -4
  228. package/dist/esm/bs-data-table.entry.js +3 -3
  229. package/dist/esm/bs-icon-button.entry.js +38 -0
  230. package/dist/esm/bs-inline-tab.entry.js +67 -0
  231. package/dist/esm/bs-input.entry.js +3 -3
  232. package/dist/esm/bs-logo.entry.js +163 -0
  233. package/dist/esm/bs-menu_2.entry.js +3 -3
  234. package/dist/esm/bs-modal.entry.js +1 -1
  235. package/dist/esm/bs-navigation-drawer-item.entry.js +102 -0
  236. package/dist/esm/bs-navigation-drawer.entry.js +79 -0
  237. package/dist/esm/bs-navigation-header.entry.js +42 -0
  238. package/dist/esm/bs-radio.entry.js +47 -0
  239. package/dist/esm/bs-slider.entry.js +189 -0
  240. package/dist/esm/bs-source-link.entry.js +3 -3
  241. package/dist/esm/bs-switch.entry.js +55 -0
  242. package/dist/esm/bs-tab.entry.js +78 -0
  243. package/dist/esm/bs-tabs.entry.js +37 -0
  244. package/dist/esm/bs-tooltip.entry.js +2 -2
  245. package/dist/esm/{index-nLORuTUY.js → index-DST5-cTx.js} +74 -2
  246. package/dist/esm/loader.js +3 -3
  247. package/dist/types/components/bs-attachment/bs-attachment.d.ts +3 -9
  248. package/dist/types/components/bs-button/{bs-button.d.ts → bs-button/bs-button.d.ts} +5 -0
  249. package/dist/types/components/bs-button/{bs-button.stories.d.ts → bs-button/bs-button.stories.d.ts} +0 -2
  250. package/dist/types/components/bs-button/bs-icon-button/bs-icon-button.cmp.test.d.ts +1 -0
  251. package/dist/types/components/bs-button/bs-icon-button/bs-icon-button.d.ts +51 -0
  252. package/dist/types/components/bs-button/bs-icon-button/bs-icon-button.stories.d.ts +16 -0
  253. package/dist/types/components/bs-button-skeleton/bs-button-skeleton.d.ts +1 -1
  254. package/dist/types/components/bs-button-skeleton/bs-button-skeleton.stories.d.ts +1 -1
  255. package/dist/types/components/bs-checkbox/bs-checkbox.cmp.test.d.ts +1 -0
  256. package/dist/types/components/bs-checkbox/bs-checkbox.d.ts +64 -0
  257. package/dist/types/components/bs-checkbox/bs-checkbox.stories.d.ts +23 -0
  258. package/dist/types/components/bs-composer/bs-composer.d.ts +26 -2
  259. package/dist/types/components/bs-composer-status-banner/bs-composer-status-banner.d.ts +14 -0
  260. package/dist/types/components/bs-logo/brandsync-logo-full-dark.d.ts +1 -0
  261. package/dist/types/components/bs-logo/brandsync-logo-full-light.d.ts +1 -0
  262. package/dist/types/components/bs-logo/brandsync-logo-mark.d.ts +1 -0
  263. package/dist/types/components/bs-logo/bs-logo.cmp.test.d.ts +1 -0
  264. package/dist/types/components/bs-logo/bs-logo.d.ts +73 -0
  265. package/dist/types/components/bs-logo/bs-logo.stories.d.ts +17 -0
  266. package/dist/types/components/bs-radio/bs-radio.cmp.test.d.ts +1 -0
  267. package/dist/types/components/bs-radio/bs-radio.d.ts +45 -0
  268. package/dist/types/components/bs-radio/bs-radio.stories.d.ts +16 -0
  269. package/dist/types/components/bs-slider/bs-slider.cmp.test.d.ts +1 -0
  270. package/dist/types/components/bs-slider/bs-slider.d.ts +109 -0
  271. package/dist/types/components/bs-slider/bs-slider.stories.d.ts +24 -0
  272. package/dist/types/components/bs-switch/bs-switch.cmp.test.d.ts +1 -0
  273. package/dist/types/components/bs-switch/bs-switch.d.ts +45 -0
  274. package/dist/types/components/bs-switch/bs-switch.stories.d.ts +17 -0
  275. package/dist/types/components/bs-tab/bs-inline-tab/bs-inline-tab.cmp.test.d.ts +1 -0
  276. package/dist/types/components/bs-tab/bs-inline-tab/bs-inline-tab.d.ts +65 -0
  277. package/dist/types/components/bs-tab/bs-inline-tab/bs-inline-tab.stories.d.ts +22 -0
  278. package/dist/types/components/bs-tab/bs-tab/bs-tab.cmp.test.d.ts +1 -0
  279. package/dist/types/components/bs-tab/bs-tab/bs-tab.d.ts +74 -0
  280. package/dist/types/components/bs-tab/bs-tab/bs-tab.stories.d.ts +30 -0
  281. package/dist/types/components/bs-tab/bs-tabs/bs-tabs.cmp.test.d.ts +1 -0
  282. package/dist/types/components/bs-tab/bs-tabs/bs-tabs.d.ts +45 -0
  283. package/dist/types/components/bs-tab/bs-tabs/bs-tabs.stories.d.ts +13 -0
  284. package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.cmp.test.d.ts +1 -0
  285. package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.d.ts +96 -0
  286. package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.stories.d.ts +16 -0
  287. package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.cmp.test.d.ts +1 -0
  288. package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.d.ts +103 -0
  289. package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.stories.d.ts +20 -0
  290. package/dist/types/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.cmp.test.d.ts +1 -0
  291. package/dist/types/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.d.ts +60 -0
  292. package/dist/types/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.stories.d.ts +21 -0
  293. package/dist/types/components.d.ts +1973 -49
  294. package/package.json +1 -1
  295. package/dist/brandsync-wc/p-0d64ea40.entry.js +0 -1
  296. package/dist/brandsync-wc/p-16a54578.entry.js +0 -1
  297. package/dist/brandsync-wc/p-bc72439a.entry.js +0 -1
  298. package/dist/brandsync-wc/p-dad4a92c.entry.js +0 -1
  299. package/dist/brandsync-wc/p-eb4d87f0.entry.js +0 -1
  300. /package/dist/types/components/bs-button/{bs-button.cmp.test.d.ts → bs-button/bs-button.cmp.test.d.ts} +0 -0
@@ -0,0 +1,216 @@
1
+ /**
2
+ * @prop --bs-tab-radius: Corner radius of the tab button. Aliased to --bs-border-radius-100.
3
+ * @prop --bs-tab-padding-y: Top/bottom padding. Aliased to --bs-spacing-150.
4
+ * @prop --bs-tab-padding-x: Left/right padding. Aliased to --bs-spacing-200.
5
+ * @prop --bs-tab-gap: Gap between icon and label, icon+text horizontal layout. Aliased to --bs-spacing-75.
6
+ * @prop --bs-tab-gap-vertical: Gap between icon and label, icon+text vertical layout. Aliased to --bs-spacing-50.
7
+ * @prop --bs-tab-color-default: Text/icon color, deselected/enabled. Aliased to --bs-text-muted.
8
+ * @prop --bs-tab-icon-color-default: Icon color, deselected/enabled. Aliased to --bs-icon-muted.
9
+ * @prop --bs-tab-color-hover: Text/icon color, deselected/hovered, focused or pressed. Aliased to --bs-text-default.
10
+ * @prop --bs-tab-icon-color-hover: Icon color, deselected/hovered, focused or pressed. Aliased to --bs-icon-default.
11
+ * @prop --bs-tab-indicator-hover: Underline color, deselected/hovered, focused or pressed. Aliased to --bs-border-neutral-hover.
12
+ * @prop --bs-tab-color-selected: Text/icon color, selected. Aliased to --bs-color-primary-default.
13
+ * @prop --bs-tab-color-selected-hover: Text/icon color, selected/hovered or focused. Aliased to --bs-color-primary-hover.
14
+ * @prop --bs-tab-color-selected-pressed: Text/icon color, selected/pressed. Aliased to --bs-color-primary-pressed.
15
+ * @prop --bs-tab-indicator-selected: Underline color, selected. Aliased to --bs-color-primary-default.
16
+ * @prop --bs-tab-indicator-selected-hover: Underline color, selected/hovered or focused. Aliased to --bs-color-primary-hover.
17
+ * @prop --bs-tab-indicator-selected-pressed: Underline color, selected/pressed. Aliased to --bs-color-primary-pressed.
18
+ * @prop --bs-tab-focus-ring-color: Focus ring color. Aliased to --bs-border-neutral-focus.
19
+ * @prop --bs-tab-color-disabled: Text/icon color, disabled. Aliased to --bs-text-on-disabled.
20
+ * @prop --bs-tab-icon-color-disabled: Icon color, disabled. Aliased to --bs-icon-disabled.
21
+ * @prop --bs-tab-font-size: Aliased to --bs-font-size-md.
22
+ * @prop --bs-tab-line-height: Aliased to --bs-line-height-body-md.
23
+ */
24
+ :host {
25
+ display: inline-block;
26
+
27
+ --bs-tab-radius: var(--bs-border-radius-100);
28
+ --bs-tab-padding-y: var(--bs-spacing-150);
29
+ --bs-tab-padding-x: var(--bs-spacing-200);
30
+ --bs-tab-gap: var(--bs-spacing-75);
31
+ --bs-tab-gap-vertical: var(--bs-spacing-50);
32
+
33
+ --bs-tab-color-default: var(--bs-text-muted);
34
+ --bs-tab-icon-color-default: var(--bs-icon-muted);
35
+
36
+ --bs-tab-color-hover: var(--bs-text-default);
37
+ --bs-tab-icon-color-hover: var(--bs-icon-default);
38
+ --bs-tab-indicator-hover: var(--bs-border-neutral-hover);
39
+
40
+ --bs-tab-color-selected: var(--bs-color-primary-default);
41
+ --bs-tab-color-selected-hover: var(--bs-color-primary-hover);
42
+ --bs-tab-color-selected-pressed: var(--bs-color-primary-pressed);
43
+ --bs-tab-indicator-selected: var(--bs-color-primary-default);
44
+ --bs-tab-indicator-selected-hover: var(--bs-color-primary-hover);
45
+ --bs-tab-indicator-selected-pressed: var(--bs-color-primary-pressed);
46
+
47
+ --bs-tab-focus-ring-color: var(--bs-border-neutral-focus);
48
+
49
+ --bs-tab-color-disabled: var(--bs-text-on-disabled);
50
+ --bs-tab-icon-color-disabled: var(--bs-icon-disabled);
51
+
52
+ --bs-tab-font-size: var(--bs-font-size-md);
53
+ --bs-tab-line-height: var(--bs-line-height-body-md);
54
+ }
55
+
56
+ .bs-tab {
57
+ box-sizing: border-box;
58
+ position: relative;
59
+ display: flex;
60
+ flex-direction: row;
61
+ align-items: center;
62
+ justify-content: center;
63
+ border: none;
64
+ cursor: pointer;
65
+ background: transparent;
66
+ color: var(--bs-tab-color-default);
67
+ font-family: inherit;
68
+ border-radius: var(--bs-tab-radius);
69
+ padding: var(--bs-tab-padding-y) var(--bs-tab-padding-x);
70
+ gap: var(--bs-tab-gap);
71
+ transition:
72
+ color var(--bs-duration-fast) var(--bs-easing-standard),
73
+ background-color var(--bs-duration-fast) var(--bs-easing-standard);
74
+ }
75
+
76
+ .bs-tab--vertical {
77
+ flex-direction: column;
78
+ gap: var(--bs-tab-gap-vertical);
79
+ }
80
+
81
+ .bs-tab:focus-visible {
82
+ outline: 2px solid var(--bs-tab-focus-ring-color);
83
+ outline-offset: 2px;
84
+ }
85
+
86
+ /* Deselected hover/focus/pressed: text/icon becomes the default (non-muted) color, and the
87
+ underline "preview" appears in a muted neutral color. */
88
+ .bs-tab:not(.bs-tab--selected):not(.bs-tab--disabled):hover,
89
+ .bs-tab:not(.bs-tab--selected):not(.bs-tab--disabled):focus-visible,
90
+ .bs-tab:not(.bs-tab--selected):not(.bs-tab--disabled):active {
91
+ color: var(--bs-tab-color-hover);
92
+ }
93
+
94
+ .bs-tab:not(.bs-tab--selected):not(.bs-tab--disabled):hover .bs-tab__icon,
95
+ .bs-tab:not(.bs-tab--selected):not(.bs-tab--disabled):focus-visible .bs-tab__icon,
96
+ .bs-tab:not(.bs-tab--selected):not(.bs-tab--disabled):active .bs-tab__icon {
97
+ color: var(--bs-tab-icon-color-hover);
98
+ }
99
+
100
+ .bs-tab:not(.bs-tab--selected):not(.bs-tab--disabled):hover .bs-tab__indicator,
101
+ .bs-tab:not(.bs-tab--selected):not(.bs-tab--disabled):focus-visible .bs-tab__indicator,
102
+ .bs-tab:not(.bs-tab--selected):not(.bs-tab--disabled):active .bs-tab__indicator {
103
+ background: var(--bs-tab-indicator-hover);
104
+ }
105
+
106
+ /* Selected: text/icon in the primary color, underline always present, in any interaction state --
107
+ darkening slightly on hover/focus/pressed. */
108
+ .bs-tab--selected {
109
+ color: var(--bs-tab-color-selected);
110
+ }
111
+
112
+ .bs-tab--selected .bs-tab__icon--has-content {
113
+ color: var(--bs-tab-color-selected);
114
+ }
115
+
116
+ .bs-tab--selected .bs-tab__indicator {
117
+ background: var(--bs-tab-indicator-selected);
118
+ }
119
+
120
+ .bs-tab--selected:not(.bs-tab--disabled):hover,
121
+ .bs-tab--selected:not(.bs-tab--disabled):focus-visible {
122
+ color: var(--bs-tab-color-selected-hover);
123
+ }
124
+
125
+ .bs-tab--selected:not(.bs-tab--disabled):hover .bs-tab__icon--has-content,
126
+ .bs-tab--selected:not(.bs-tab--disabled):focus-visible .bs-tab__icon--has-content {
127
+ color: var(--bs-tab-color-selected-hover);
128
+ }
129
+
130
+ .bs-tab--selected:not(.bs-tab--disabled):hover .bs-tab__indicator,
131
+ .bs-tab--selected:not(.bs-tab--disabled):focus-visible .bs-tab__indicator {
132
+ background: var(--bs-tab-indicator-selected-hover);
133
+ }
134
+
135
+ /* Pressed (:active) is a distinctly darker shade than hover/focus, per the Figma spec (selected
136
+ pressed uses color/primary/pressed, not color/primary/hover) -- not the same rule as above. */
137
+ .bs-tab--selected:not(.bs-tab--disabled):active {
138
+ color: var(--bs-tab-color-selected-pressed);
139
+ }
140
+
141
+ .bs-tab--selected:not(.bs-tab--disabled):active .bs-tab__icon--has-content {
142
+ color: var(--bs-tab-color-selected-pressed);
143
+ }
144
+
145
+ .bs-tab--selected:not(.bs-tab--disabled):active .bs-tab__indicator {
146
+ background: var(--bs-tab-indicator-selected-pressed);
147
+ }
148
+
149
+ .bs-tab--disabled {
150
+ color: var(--bs-tab-color-disabled);
151
+ cursor: not-allowed;
152
+ }
153
+
154
+ .bs-tab--disabled .bs-tab__icon--has-content {
155
+ color: var(--bs-tab-icon-color-disabled);
156
+ }
157
+
158
+ /* Disabled always wins over selected for the underline -- no indicator when disabled, even if the
159
+ tab is also selected. */
160
+ .bs-tab--disabled .bs-tab__indicator {
161
+ background: transparent;
162
+ }
163
+
164
+ .bs-tab__icon {
165
+ display: none;
166
+ width: 24px;
167
+ height: 24px;
168
+ flex-shrink: 0;
169
+ color: var(--bs-tab-icon-color-default);
170
+ }
171
+
172
+ .bs-tab__icon--has-content {
173
+ display: inline-flex;
174
+ align-items: center;
175
+ justify-content: center;
176
+ }
177
+
178
+ .bs-tab__icon ::slotted(svg) {
179
+ width: 24px;
180
+ height: 24px;
181
+ }
182
+
183
+ .bs-tab__label {
184
+ display: none;
185
+ font-size: var(--bs-tab-font-size);
186
+ line-height: calc(var(--bs-tab-line-height) * 1px);
187
+ white-space: nowrap;
188
+ }
189
+
190
+ .bs-tab__label--has-content {
191
+ display: inline-block;
192
+ }
193
+
194
+ .bs-tab__badge {
195
+ display: none;
196
+ }
197
+
198
+ .bs-tab__badge--has-content {
199
+ display: inline-flex;
200
+ align-items: center;
201
+ }
202
+
203
+ /* The underline indicator: a real element (not a ::after pseudo-element) so it's independently
204
+ inspectable/stylable via ::part(indicator) -- this codebase doesn't use ::after anywhere else,
205
+ and generally prefers real parts as the customization surface for anything that might need its
206
+ own styling. Absolutely positioned along the bottom edge, transparent (no fill) until an
207
+ enabled/selected/hover state above sets its background. */
208
+ .bs-tab__indicator {
209
+ position: absolute;
210
+ left: var(--bs-tab-padding-x);
211
+ right: var(--bs-tab-padding-x);
212
+ bottom: 0;
213
+ height: 2px;
214
+ background: transparent;
215
+ border-radius: var(--bs-border-radius-50, 2px);
216
+ }
@@ -0,0 +1,232 @@
1
+ import { h } from "@stencil/core";
2
+ /**
3
+ * A single tab button -- an optional icon plus a text label, rendered as a real `<button>` so it
4
+ * participates correctly in tab order and native click/keyboard activation.
5
+ *
6
+ * ## When to use
7
+ * - As one button within a tab bar, where exactly one tab is selected/active at a time.
8
+ *
9
+ * ## When not to use
10
+ * - As a standalone action button -- use `bs-button` instead, `bs-tab`'s visual language (muted
11
+ * until selected/hovered, underline indicator) only makes sense as part of a set.
12
+ *
13
+ * `selected` is NOT self-toggling -- clicking a `bs-tab` only emits `bsSelect`, it does not set its
14
+ * own `selected` prop, and it does not unselect any sibling tabs. Wrap your `<bs-tab>` elements in
15
+ * `<bs-tabs type="bs-tab">` -- it owns `role="tablist"` and coordinates selection (listening for
16
+ * `bsSelect` and setting `selected`/`false` across siblings) for you. Using `bs-tab` standalone,
17
+ * outside a `<bs-tabs>` wrapper, still means `selected` doesn't self-toggle and `role="tablist"`
18
+ * isn't provided automatically -- a consumer doing that would still need to coordinate `selected`
19
+ * and supply `role="tablist"` manually, same as `bs-radio.mdx` documents for `bs-radio`'s missing
20
+ * `bs-radio-group`. See `bs-tab.mdx`'s Accessibility section for the full requirement, including
21
+ * `role="tabpanel"` on the corresponding content panels.
22
+ *
23
+ * @slot - Default slot: the tab's label text. When empty (icon-only), no space is reserved for it.
24
+ * @slot icon - Optional icon (24x24). When empty (text-only), no space is reserved for it.
25
+ * @slot badge - Optional trailing badge, rendered after the label (e.g. an unread count). Typically
26
+ * a `bs-badge` element -- consumer's responsibility to style/populate, this component just reserves
27
+ * a slot for it. Only rendered for text-only and icon+text-horizontal layouts, per the design spec
28
+ * (not icon-only or icon+text-vertical).
29
+ * @part tab - The button element.
30
+ * @part icon - The icon wrapper.
31
+ * @part label - The label wrapper.
32
+ * @part badge - The badge wrapper.
33
+ * @part indicator - The selection/hover underline indicator.
34
+ */
35
+ // Note: this component's CSS Custom Properties (--bs-tab-*) are documented via @prop comments in
36
+ // bs-tab.css, not here -- Stencil's docs generator only parses @prop out of CSS file comments, not
37
+ // the class-level JSDoc (see bs-checkbox.tsx's/bs-radio.tsx's equivalent note).
38
+ export class BsTab {
39
+ el;
40
+ /** Whether this tab is the currently active one. NOT mutable and NOT self-toggling -- see the
41
+ * "Known gap" note in the class JSDoc. Still reflected as an attribute so consumers/CSS can
42
+ * target `bs-tab[selected]`. */
43
+ selected = false;
44
+ /** Disables the tab: sets the native `disabled` attribute, suppresses hover/focus styling, and
45
+ * prevents clicking from emitting `bsSelect`. */
46
+ disabled = false;
47
+ /** Where the icon sits relative to the label, when both `icon` and the default slot are
48
+ * populated. Ignored for icon-only/text-only layouts. */
49
+ iconPosition = 'start';
50
+ /** Accessible name for the tab. Required for icon-only usage (no visible label text via the
51
+ * default slot) so screen readers still announce what the tab does -- without it, an icon-only
52
+ * tab has no discernible name at all (axe-core flags this as a critical `button-name`
53
+ * violation). Stencil reflects this camelCase prop to the `aria-label` HTML attribute
54
+ * automatically, same as `bs-button`'s identical prop. */
55
+ ariaLabel = null;
56
+ /** Tracks whether the `icon` slot has assigned content. */
57
+ hasIcon = false;
58
+ /** Tracks whether the default (label) slot has assigned content. */
59
+ hasLabel = false;
60
+ /** Tracks whether the `badge` slot has assigned content. */
61
+ hasBadge = false;
62
+ /** Fires when the tab is clicked. Does not toggle `selected` itself -- see the class JSDoc. */
63
+ bsSelect;
64
+ /**
65
+ * Computes the initial `hasIcon`/`hasLabel`/`hasBadge` state directly from the host's light DOM
66
+ * children, before first render -- same reasoning as `bs-button.componentWillLoad` (a slot with
67
+ * zero assigned nodes from the start never fires `slotchange`).
68
+ */
69
+ componentWillLoad() {
70
+ this.hasIcon = this.hasSlottedContent('icon');
71
+ this.hasLabel = this.hasSlottedContent(null);
72
+ this.hasBadge = this.hasSlottedContent('badge');
73
+ }
74
+ hasSlottedContent(slotName) {
75
+ return Array.from(this.el.childNodes).some(node => {
76
+ if (node.nodeType === Node.ELEMENT_NODE) {
77
+ return node.getAttribute('slot') === slotName;
78
+ }
79
+ // Only elements can carry a `slot` attribute -- any other node type (text, comments) can
80
+ // only ever be assigned to the default slot.
81
+ return slotName === null;
82
+ });
83
+ }
84
+ onIconSlotchange = (ev) => {
85
+ this.hasIcon = ev.target.assignedNodes().length > 0;
86
+ };
87
+ onLabelSlotchange = (ev) => {
88
+ this.hasLabel = ev.target.assignedNodes().length > 0;
89
+ };
90
+ onBadgeSlotchange = (ev) => {
91
+ this.hasBadge = ev.target.assignedNodes().length > 0;
92
+ };
93
+ onClick = () => {
94
+ if (this.disabled)
95
+ return;
96
+ this.bsSelect.emit();
97
+ };
98
+ render() {
99
+ const iconOnly = this.hasIcon && !this.hasLabel;
100
+ const vertical = this.hasIcon && this.hasLabel && this.iconPosition === 'top';
101
+ const showBadge = this.hasBadge && !iconOnly && !vertical;
102
+ return (h("button", { key: 'de1416c9ee8414405513dd4b9a828d7a3d0ae330', type: "button", part: "tab", role: "tab", class: `bs-tab ${this.selected ? 'bs-tab--selected' : ''} ${this.disabled ? 'bs-tab--disabled' : ''} ${iconOnly ? 'bs-tab--icon-only' : ''} ${vertical ? 'bs-tab--vertical' : ''}`, disabled: this.disabled, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? 'true' : undefined, "aria-label": this.ariaLabel, onClick: this.onClick }, h("span", { key: 'd884d90267fac3ec8fc9e9bcd8b9cefc5153b47e', part: "icon", class: `bs-tab__icon ${this.hasIcon ? 'bs-tab__icon--has-content' : ''}` }, h("slot", { key: '2194a3d72bafda2d0f830e4f9f5a6a92d08c5aa3', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '181abd3f489648a7bf53a11b77bed47c56b2fd94', part: "label", class: `bs-tab__label ${this.hasLabel ? 'bs-tab__label--has-content' : ''}` }, h("slot", { key: '683020efc34ea270b700b5034631a549796510f1', onSlotchange: this.onLabelSlotchange })), h("span", { key: '02dfede0c88b1b2f805128ce11a5134fd4c83b6d', part: "badge", class: `bs-tab__badge ${showBadge ? 'bs-tab__badge--has-content' : ''}` }, h("slot", { key: 'e712da5b095aa9e3c6c8b7f8fa0bee86c0ef7b20', name: "badge", onSlotchange: this.onBadgeSlotchange })), h("span", { key: 'a743816f44a8c0cb08dbe518ae521bf05d5c5a08', part: "indicator", class: "bs-tab__indicator" })));
103
+ }
104
+ static get is() { return "bs-tab"; }
105
+ static get encapsulation() { return "shadow"; }
106
+ static get originalStyleUrls() {
107
+ return {
108
+ "$": ["bs-tab.css"]
109
+ };
110
+ }
111
+ static get styleUrls() {
112
+ return {
113
+ "$": ["bs-tab.css"]
114
+ };
115
+ }
116
+ static get properties() {
117
+ return {
118
+ "selected": {
119
+ "type": "boolean",
120
+ "mutable": false,
121
+ "complexType": {
122
+ "original": "boolean",
123
+ "resolved": "boolean",
124
+ "references": {}
125
+ },
126
+ "required": false,
127
+ "optional": false,
128
+ "docs": {
129
+ "tags": [],
130
+ "text": "Whether this tab is the currently active one. NOT mutable and NOT self-toggling -- see the\n\"Known gap\" note in the class JSDoc. Still reflected as an attribute so consumers/CSS can\ntarget `bs-tab[selected]`."
131
+ },
132
+ "getter": false,
133
+ "setter": false,
134
+ "reflect": true,
135
+ "attribute": "selected",
136
+ "defaultValue": "false"
137
+ },
138
+ "disabled": {
139
+ "type": "boolean",
140
+ "mutable": false,
141
+ "complexType": {
142
+ "original": "boolean",
143
+ "resolved": "boolean",
144
+ "references": {}
145
+ },
146
+ "required": false,
147
+ "optional": false,
148
+ "docs": {
149
+ "tags": [],
150
+ "text": "Disables the tab: sets the native `disabled` attribute, suppresses hover/focus styling, and\nprevents clicking from emitting `bsSelect`."
151
+ },
152
+ "getter": false,
153
+ "setter": false,
154
+ "reflect": false,
155
+ "attribute": "disabled",
156
+ "defaultValue": "false"
157
+ },
158
+ "iconPosition": {
159
+ "type": "string",
160
+ "mutable": false,
161
+ "complexType": {
162
+ "original": "BsTabIconPosition",
163
+ "resolved": "\"start\" | \"top\"",
164
+ "references": {
165
+ "BsTabIconPosition": {
166
+ "location": "local",
167
+ "path": "/Users/vivka/brandsync-web-components/src/components/bs-tab/bs-tab/bs-tab.tsx",
168
+ "id": "src/components/bs-tab/bs-tab/bs-tab.tsx::BsTabIconPosition"
169
+ }
170
+ }
171
+ },
172
+ "required": false,
173
+ "optional": false,
174
+ "docs": {
175
+ "tags": [],
176
+ "text": "Where the icon sits relative to the label, when both `icon` and the default slot are\npopulated. Ignored for icon-only/text-only layouts."
177
+ },
178
+ "getter": false,
179
+ "setter": false,
180
+ "reflect": false,
181
+ "attribute": "icon-position",
182
+ "defaultValue": "'start'"
183
+ },
184
+ "ariaLabel": {
185
+ "type": "string",
186
+ "mutable": false,
187
+ "complexType": {
188
+ "original": "string | null",
189
+ "resolved": "string",
190
+ "references": {}
191
+ },
192
+ "required": false,
193
+ "optional": false,
194
+ "docs": {
195
+ "tags": [],
196
+ "text": "Accessible name for the tab. Required for icon-only usage (no visible label text via the\ndefault slot) so screen readers still announce what the tab does -- without it, an icon-only\ntab has no discernible name at all (axe-core flags this as a critical `button-name`\nviolation). Stencil reflects this camelCase prop to the `aria-label` HTML attribute\nautomatically, same as `bs-button`'s identical prop."
197
+ },
198
+ "getter": false,
199
+ "setter": false,
200
+ "reflect": false,
201
+ "attribute": "aria-label",
202
+ "defaultValue": "null"
203
+ }
204
+ };
205
+ }
206
+ static get states() {
207
+ return {
208
+ "hasIcon": {},
209
+ "hasLabel": {},
210
+ "hasBadge": {}
211
+ };
212
+ }
213
+ static get events() {
214
+ return [{
215
+ "method": "bsSelect",
216
+ "name": "bsSelect",
217
+ "bubbles": true,
218
+ "cancelable": true,
219
+ "composed": true,
220
+ "docs": {
221
+ "tags": [],
222
+ "text": "Fires when the tab is clicked. Does not toggle `selected` itself -- see the class JSDoc."
223
+ },
224
+ "complexType": {
225
+ "original": "void",
226
+ "resolved": "void",
227
+ "references": {}
228
+ }
229
+ }];
230
+ }
231
+ static get elementRef() { return "el"; }
232
+ }
@@ -0,0 +1,138 @@
1
+ import { html, nothing } from "lit";
2
+ import { componentDescription, propDescription } from "../../../stories-utils";
3
+ const iconPositions = ['start', 'top'];
4
+ // `start`/`top` are the real prop values, but "Horizontal"/"Vertical" is what the layout actually
5
+ // looks like -- Storybook's select control supports a separate display-label map for this.
6
+ const iconPositionLabels = { start: 'Horizontal', top: 'Vertical' };
7
+ const homeIcon = html `
8
+ <svg slot="icon" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
9
+ <path d="M3 10.5L12 3L21 10.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
10
+ <path d="M5 9V20H19V9" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
11
+ </svg>
12
+ `;
13
+ const meta = {
14
+ title: 'Components/bs-tab/bs-tab',
15
+ parameters: { docs: { description: { component: componentDescription('bs-tab') } } },
16
+ // role="tab" is only valid ARIA inside a role="tablist" ancestor (axe-core flags a lone bs-tab
17
+ // as a critical aria-required-parent violation otherwise -- see bs-tab.mdx's Accessibility
18
+ // section). NOT display: contents -- that has a known Chromium accessibility-tree quirk where
19
+ // it can strip the element's own role. A plain block-level div has no visual effect worth
20
+ // avoiding here (each story below is a single isolated demo, not part of a larger page layout).
21
+ //
22
+ // aria-label uses lit's `nothing` sentinel below, not null/'' -- a plain (non-boolean) lit
23
+ // attribute binding renders null/'' as aria-label="" (present but empty), not an absent
24
+ // attribute. axe-core then treats the light-DOM <bs-tab> host as ARIA-meaningful in its own
25
+ // right and stops looking inside its shadow root for the real role="tab", which surfaces as an
26
+ // aria-required-children violation on the *parent* tablist -- a very confusing place to look.
27
+ render: args => html `
28
+ <div role="tablist">
29
+ <bs-tab
30
+ ?selected=${args.selected}
31
+ ?disabled=${args.disabled}
32
+ icon-position=${args.iconPosition}
33
+ aria-label=${args.ariaLabel || nothing}
34
+ >
35
+ ${args.icon ? homeIcon : ''}${args.label}
36
+ ${args.badge ? html `<bs-badge slot="badge" variant="primary">3</bs-badge>` : ''}
37
+ </bs-tab>
38
+ </div>
39
+ `,
40
+ argTypes: {
41
+ selected: { control: 'boolean', description: propDescription('bs-tab', 'selected') },
42
+ disabled: { control: 'boolean', description: propDescription('bs-tab', 'disabled') },
43
+ icon: { control: 'boolean', description: 'Toggles an icon (not a real attribute -- see the `icon` slot).' },
44
+ iconPosition: {
45
+ control: { type: 'select', labels: iconPositionLabels },
46
+ options: iconPositions,
47
+ description: propDescription('bs-tab', 'iconPosition'),
48
+ },
49
+ badge: { control: 'boolean', description: 'Toggles a trailing badge (not a real attribute -- see the `badge` slot).' },
50
+ label: { control: 'text', description: "Slotted label content (not a real attribute -- see the default slot)." },
51
+ ariaLabel: { control: 'text', description: propDescription('bs-tab', 'ariaLabel') },
52
+ },
53
+ args: {
54
+ selected: false,
55
+ disabled: false,
56
+ icon: false,
57
+ iconPosition: 'start',
58
+ badge: false,
59
+ label: 'Overview',
60
+ ariaLabel: '',
61
+ },
62
+ };
63
+ export default meta;
64
+ export const Default = {};
65
+ export const IconOnly = {
66
+ name: 'Icon only',
67
+ args: { icon: true, label: '', ariaLabel: 'Home' },
68
+ };
69
+ export const IconAndTextHorizontal = {
70
+ name: 'Icon and text (horizontal)',
71
+ args: { icon: true },
72
+ };
73
+ export const IconAndTextVertical = {
74
+ name: 'Icon and text (vertical)',
75
+ args: { icon: true, iconPosition: 'top' },
76
+ };
77
+ export const Selected = {
78
+ args: { selected: true },
79
+ };
80
+ export const Disabled = {
81
+ args: { disabled: true },
82
+ };
83
+ export const WithBadge = {
84
+ name: 'With a badge',
85
+ args: { badge: true, label: 'Inbox' },
86
+ };
87
+ const groupTabLabels = ['Overview', 'Details', 'Settings', 'Archived'];
88
+ const groupOrientations = ['horizontal', 'vertical'];
89
+ const groupOrientationLabels = { horizontal: 'Horizontal', vertical: 'Vertical' };
90
+ // A separate args shape from the single-tab stories above (this story renders 4 instances, not
91
+ // one) -- StoryObj is typed independently per export, so this doesn't need to fit BsTabArgs.
92
+ //
93
+ // `groupOrientation` is a story-only concept, not a bs-tab prop: it's the layout direction of the
94
+ // TAB BAR itself (a horizontal row of tabs across the top vs. a vertical stack, e.g. a sidebar
95
+ // tab list) -- distinct from `iconPosition`, which is about the icon/label arrangement WITHIN one
96
+ // tab. It's fed straight into <bs-tabs orientation=...>, which owns this layout.
97
+ export const Group = {
98
+ name: 'Tab group',
99
+ argTypes: {
100
+ selectedTab: {
101
+ control: 'select',
102
+ options: groupTabLabels,
103
+ description: 'Which tab is selected (Archived is disabled and cannot be selected).',
104
+ },
105
+ icon: { control: 'boolean', description: 'Toggles an icon on every tab in the group (not a real attribute -- see the `icon` slot).' },
106
+ iconPosition: {
107
+ control: { type: 'select', labels: iconPositionLabels },
108
+ options: iconPositions,
109
+ description: propDescription('bs-tab', 'iconPosition'),
110
+ },
111
+ badge: {
112
+ control: 'boolean',
113
+ description: 'Toggles a badge on every tab in the group (not a real attribute -- see the `badge` slot).',
114
+ },
115
+ groupOrientation: {
116
+ control: { type: 'select', labels: groupOrientationLabels },
117
+ options: groupOrientations,
118
+ description: 'Layout direction of the tab bar itself (not a bs-tab prop -- see the note above this story).',
119
+ },
120
+ },
121
+ args: {
122
+ selectedTab: 'Overview',
123
+ icon: false,
124
+ iconPosition: 'start',
125
+ badge: false,
126
+ groupOrientation: 'horizontal',
127
+ },
128
+ render: args => html `
129
+ <bs-tabs type="bs-tab" orientation=${args.groupOrientation}>
130
+ ${groupTabLabels.map(label => html `
131
+ <bs-tab ?selected=${label === args.selectedTab} ?disabled=${label === 'Archived'} icon-position=${args.iconPosition}>
132
+ ${args.icon ? homeIcon : ''}${label}
133
+ ${args.badge ? html `<bs-badge slot="badge" variant="primary">3</bs-badge>` : ''}
134
+ </bs-tab>
135
+ `)}
136
+ </bs-tabs>
137
+ `,
138
+ };
@@ -0,0 +1,61 @@
1
+ import { render, h, describe, it, expect } from "@stencil/vitest";
2
+ describe('bs-tabs', () => {
3
+ it('renders a wrapper with role="tablist" and part="tablist"', async () => {
4
+ const { root } = await render(h("bs-tabs", null, h("bs-tab", null, "Overview")));
5
+ const tablist = root.shadowRoot.querySelector('[part="tablist"]');
6
+ expect(tablist).not.toBeNull();
7
+ expect(tablist.getAttribute('role')).toBe('tablist');
8
+ });
9
+ it('defaults type to "bs-tab" and orientation to "horizontal", reflecting aria-orientation', async () => {
10
+ const { root } = await render(h("bs-tabs", null, h("bs-tab", null, "Overview")));
11
+ const tablist = root.shadowRoot.querySelector('[part="tablist"]');
12
+ expect(tablist).toHaveClass('bs-tabs--bs-tab');
13
+ expect(tablist).not.toHaveClass('bs-tabs--vertical');
14
+ expect(tablist).toEqualAttribute('aria-orientation', 'horizontal');
15
+ });
16
+ it('orientation="vertical" applies the vertical layout class and aria-orientation', async () => {
17
+ const { root } = await render(h("bs-tabs", { orientation: "vertical" }, h("bs-tab", null, "Overview")));
18
+ const tablist = root.shadowRoot.querySelector('[part="tablist"]');
19
+ expect(tablist).toHaveClass('bs-tabs--vertical');
20
+ expect(tablist).toEqualAttribute('aria-orientation', 'vertical');
21
+ });
22
+ it('type="bs-inline-tab" applies the inline-tab wrapper class', async () => {
23
+ const { root } = await render(h("bs-tabs", { type: "bs-inline-tab" }, h("bs-inline-tab", null, "Overview")));
24
+ const tablist = root.shadowRoot.querySelector('[part="tablist"]');
25
+ expect(tablist).toHaveClass('bs-tabs--bs-inline-tab');
26
+ });
27
+ it('coordinates selection across slotted bs-tab children on click', async () => {
28
+ const { root, waitForChanges } = await render(h("bs-tabs", null, h("bs-tab", { selected: true }, "Overview"), h("bs-tab", null, "Details"), h("bs-tab", null, "Settings")));
29
+ const tabs = Array.from(root.querySelectorAll('bs-tab'));
30
+ const [first, second, third] = tabs;
31
+ expect(first.selected).toBe(true);
32
+ const secondButton = second.shadowRoot.querySelector('[part="tab"]');
33
+ secondButton.click();
34
+ await waitForChanges();
35
+ expect(first.selected).toBe(false);
36
+ expect(second.selected).toBe(true);
37
+ expect(third.selected).toBe(false);
38
+ });
39
+ it('coordinates selection across slotted bs-inline-tab children on click', async () => {
40
+ const { root, waitForChanges } = await render(h("bs-tabs", { type: "bs-inline-tab" }, h("bs-inline-tab", { selected: true }, "Overview"), h("bs-inline-tab", null, "Details"), h("bs-inline-tab", null, "Settings")));
41
+ const tabs = Array.from(root.querySelectorAll('bs-inline-tab'));
42
+ const [first, second, third] = tabs;
43
+ expect(first.selected).toBe(true);
44
+ const thirdButton = third.shadowRoot.querySelector('[part="tab"]');
45
+ thirdButton.click();
46
+ await waitForChanges();
47
+ expect(first.selected).toBe(false);
48
+ expect(second.selected).toBe(false);
49
+ expect(third.selected).toBe(true);
50
+ });
51
+ it('does not select a disabled slotted tab on click', async () => {
52
+ const { root, waitForChanges } = await render(h("bs-tabs", null, h("bs-tab", { selected: true }, "Overview"), h("bs-tab", { disabled: true }, "Details")));
53
+ const tabs = Array.from(root.querySelectorAll('bs-tab'));
54
+ const [first, second] = tabs;
55
+ const secondButton = second.shadowRoot.querySelector('[part="tab"]');
56
+ secondButton.click();
57
+ await waitForChanges();
58
+ expect(first.selected).toBe(true);
59
+ expect(second.selected).toBe(false);
60
+ });
61
+ });