@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,163 @@
1
+ /**
2
+ * @prop --bs-inline-tab-radius: Corner radius of the pill. Aliased to --bs-border-radius-full.
3
+ * @prop --bs-inline-tab-padding-y: Top/bottom padding. Aliased to --bs-spacing-100.
4
+ * @prop --bs-inline-tab-padding-x: Left/right padding, no icon. Aliased to --bs-spacing-200.
5
+ * @prop --bs-inline-tab-padding-left-with-icon: Left padding, icon present. Aliased to --bs-spacing-150.
6
+ * @prop --bs-inline-tab-padding-right-with-icon: Right padding, icon present. Aliased to --bs-spacing-200.
7
+ * @prop --bs-inline-tab-gap: Gap between icon and label. Aliased to --bs-spacing-50.
8
+ * @prop --bs-inline-tab-bg-default: Background, deselected/enabled. Aliased to --bs-color-neutral-container.
9
+ * @prop --bs-inline-tab-color-default: Text/icon color, deselected/enabled. Aliased to --bs-text-secondary.
10
+ * @prop --bs-inline-tab-bg-hover: Background, deselected/hovered. Aliased to --bs-color-neutral-container-hover.
11
+ * @prop --bs-inline-tab-color-hover: Text/icon color, deselected/hovered, focused or pressed. Aliased to --bs-text-default.
12
+ * @prop --bs-inline-tab-bg-focus: Background, deselected/focused. Aliased to --bs-color-neutral-container-focused.
13
+ * @prop --bs-inline-tab-bg-pressed: Background, deselected/pressed. Aliased to --bs-color-neutral-container-pressed.
14
+ * @prop --bs-inline-tab-focus-ring-color: Focus ring color. Aliased to --bs-border-neutral-focus.
15
+ * @prop --bs-inline-tab-bg-disabled: Background, disabled (wins over selected). Aliased to --bs-surface-action-disabled.
16
+ * @prop --bs-inline-tab-color-disabled: Text/icon color, disabled (wins over selected). Aliased to --bs-text-on-disabled.
17
+ * @prop --bs-inline-tab-bg-selected: Background, selected/enabled. Aliased to --bs-color-primary-default.
18
+ * @prop --bs-inline-tab-color-selected: Text/icon color, selected. Aliased to --bs-text-on-action.
19
+ * @prop --bs-inline-tab-bg-selected-hover: Background, selected/hovered. Aliased to --bs-color-primary-hover.
20
+ * @prop --bs-inline-tab-bg-selected-focus: Background, selected/focused. Aliased to --bs-color-primary-focused.
21
+ * @prop --bs-inline-tab-bg-selected-pressed: Background, selected/pressed. Aliased to --bs-color-primary-pressed.
22
+ * @prop --bs-inline-tab-font-size: Aliased to --bs-font-size-sm.
23
+ * @prop --bs-inline-tab-font-weight: Aliased to --bs-font-weight-semibold.
24
+ * @prop --bs-inline-tab-line-height: Aliased to --bs-line-height-body-sm.
25
+ */
26
+ :host {
27
+ display: inline-block;
28
+
29
+ --bs-inline-tab-radius: var(--bs-border-radius-full);
30
+ --bs-inline-tab-padding-y: var(--bs-spacing-100);
31
+ --bs-inline-tab-padding-x: var(--bs-spacing-200);
32
+ --bs-inline-tab-padding-left-with-icon: var(--bs-spacing-150);
33
+ --bs-inline-tab-padding-right-with-icon: var(--bs-spacing-200);
34
+ --bs-inline-tab-gap: var(--bs-spacing-50);
35
+
36
+ --bs-inline-tab-bg-default: var(--bs-color-neutral-container);
37
+ --bs-inline-tab-color-default: var(--bs-text-secondary);
38
+
39
+ --bs-inline-tab-bg-hover: var(--bs-color-neutral-container-hover);
40
+ --bs-inline-tab-color-hover: var(--bs-text-default);
41
+
42
+ --bs-inline-tab-bg-focus: var(--bs-color-neutral-container-focused);
43
+ --bs-inline-tab-bg-pressed: var(--bs-color-neutral-container-pressed);
44
+
45
+ --bs-inline-tab-focus-ring-color: var(--bs-border-neutral-focus);
46
+
47
+ --bs-inline-tab-bg-disabled: var(--bs-surface-action-disabled);
48
+ --bs-inline-tab-color-disabled: var(--bs-text-on-disabled);
49
+
50
+ --bs-inline-tab-bg-selected: var(--bs-color-primary-default);
51
+ --bs-inline-tab-color-selected: var(--bs-text-on-action);
52
+ --bs-inline-tab-bg-selected-hover: var(--bs-color-primary-hover);
53
+ --bs-inline-tab-bg-selected-focus: var(--bs-color-primary-focused);
54
+ --bs-inline-tab-bg-selected-pressed: var(--bs-color-primary-pressed);
55
+
56
+ --bs-inline-tab-font-size: var(--bs-font-size-sm);
57
+ --bs-inline-tab-font-weight: var(--bs-font-weight-semibold);
58
+ --bs-inline-tab-line-height: var(--bs-line-height-body-sm);
59
+ }
60
+
61
+ .bs-inline-tab {
62
+ box-sizing: border-box;
63
+ display: inline-flex;
64
+ align-items: center;
65
+ justify-content: center;
66
+ border: none;
67
+ cursor: pointer;
68
+ font-family: inherit;
69
+ border-radius: var(--bs-inline-tab-radius);
70
+ padding: var(--bs-inline-tab-padding-y) var(--bs-inline-tab-padding-x);
71
+ background: var(--bs-inline-tab-bg-default);
72
+ color: var(--bs-inline-tab-color-default);
73
+ transition:
74
+ color var(--bs-duration-fast) var(--bs-easing-standard),
75
+ background-color var(--bs-duration-fast) var(--bs-easing-standard);
76
+ }
77
+
78
+ .bs-inline-tab--has-icon {
79
+ padding-top: var(--bs-inline-tab-padding-y);
80
+ padding-bottom: var(--bs-inline-tab-padding-y);
81
+ padding-left: var(--bs-inline-tab-padding-left-with-icon);
82
+ padding-right: var(--bs-inline-tab-padding-right-with-icon);
83
+ gap: var(--bs-inline-tab-gap);
84
+ }
85
+
86
+ .bs-inline-tab:focus-visible {
87
+ outline: 2px solid var(--bs-inline-tab-focus-ring-color);
88
+ outline-offset: 2px;
89
+ }
90
+
91
+ /* Deselected hover/focus/pressed. */
92
+ .bs-inline-tab:not(.bs-inline-tab--selected):not(.bs-inline-tab--disabled):hover {
93
+ background: var(--bs-inline-tab-bg-hover);
94
+ color: var(--bs-inline-tab-color-hover);
95
+ }
96
+
97
+ .bs-inline-tab:not(.bs-inline-tab--selected):not(.bs-inline-tab--disabled):focus-visible {
98
+ background: var(--bs-inline-tab-bg-focus);
99
+ color: var(--bs-inline-tab-color-hover);
100
+ }
101
+
102
+ .bs-inline-tab:not(.bs-inline-tab--selected):not(.bs-inline-tab--disabled):active {
103
+ background: var(--bs-inline-tab-bg-pressed);
104
+ color: var(--bs-inline-tab-color-hover);
105
+ }
106
+
107
+ /* Selected: primary-filled pill, in any interaction state -- darkening slightly on
108
+ hover/focus/pressed. */
109
+ .bs-inline-tab--selected {
110
+ background: var(--bs-inline-tab-bg-selected);
111
+ color: var(--bs-inline-tab-color-selected);
112
+ }
113
+
114
+ .bs-inline-tab--selected:not(.bs-inline-tab--disabled):hover {
115
+ background: var(--bs-inline-tab-bg-selected-hover);
116
+ }
117
+
118
+ .bs-inline-tab--selected:not(.bs-inline-tab--disabled):focus-visible {
119
+ background: var(--bs-inline-tab-bg-selected-focus);
120
+ }
121
+
122
+ .bs-inline-tab--selected:not(.bs-inline-tab--disabled):active {
123
+ background: var(--bs-inline-tab-bg-selected-pressed);
124
+ }
125
+
126
+ /* Disabled always wins over selected -- no distinct "selected+disabled" treatment defined in the
127
+ Figma spec, so disabled's own bg/text applies unconditionally regardless of `selected`. */
128
+ .bs-inline-tab--disabled {
129
+ background: var(--bs-inline-tab-bg-disabled);
130
+ color: var(--bs-inline-tab-color-disabled);
131
+ cursor: not-allowed;
132
+ }
133
+
134
+ .bs-inline-tab__icon {
135
+ display: none;
136
+ width: 24px;
137
+ height: 24px;
138
+ flex-shrink: 0;
139
+ color: inherit;
140
+ }
141
+
142
+ .bs-inline-tab__icon--has-content {
143
+ display: inline-flex;
144
+ align-items: center;
145
+ justify-content: center;
146
+ }
147
+
148
+ .bs-inline-tab__icon ::slotted(svg) {
149
+ width: 24px;
150
+ height: 24px;
151
+ }
152
+
153
+ .bs-inline-tab__label {
154
+ display: none;
155
+ font-size: var(--bs-inline-tab-font-size);
156
+ font-weight: var(--bs-inline-tab-font-weight);
157
+ line-height: calc(var(--bs-inline-tab-line-height) * 1px);
158
+ white-space: nowrap;
159
+ }
160
+
161
+ .bs-inline-tab__label--has-content {
162
+ display: inline-block;
163
+ }
@@ -0,0 +1,192 @@
1
+ import { h } from "@stencil/core";
2
+ /**
3
+ * A pill-shaped tab button -- an optional leading icon plus a text label, rendered as a real
4
+ * `<button>` so it participates correctly in tab order and native click/keyboard activation.
5
+ * Unlike `bs-tab`'s underline indicator, selection here is communicated entirely by the pill's
6
+ * background fill color -- there is no separate indicator element.
7
+ *
8
+ * ## When to use
9
+ * - As one button within a segmented-control-style tab bar, where exactly one tab is
10
+ * selected/active at a time.
11
+ *
12
+ * ## When not to use
13
+ * - As a standalone action button -- use `bs-button` instead, `bs-inline-tab`'s visual language
14
+ * (muted pill until selected/hovered) only makes sense as part of a set.
15
+ *
16
+ * `selected` is NOT self-toggling -- clicking a `bs-inline-tab` only emits `bsSelect`, it does not
17
+ * set its own `selected` prop, and it does not unselect any sibling tabs. Wrap your
18
+ * `<bs-inline-tab>` elements in `<bs-tabs type="bs-inline-tab">` -- it owns `role="tablist"` and
19
+ * coordinates selection (listening for `bsSelect` and setting `selected`/`false` across siblings)
20
+ * for you. Using `bs-inline-tab` standalone, outside a `<bs-tabs>` wrapper, still means `selected`
21
+ * doesn't self-toggle and `role="tablist"` isn't provided automatically -- a consumer doing that
22
+ * would still need to coordinate `selected` and supply `role="tablist"` manually, same as
23
+ * `bs-tab.mdx`/`bs-radio.mdx` document for their own components. See `bs-inline-tab.mdx`'s
24
+ * Accessibility section for the full requirement, including `role="tabpanel"` on the corresponding
25
+ * content panels.
26
+ *
27
+ * @slot - Default slot: the tab's label text. When empty (icon-only), no space is reserved for it.
28
+ * @slot icon - Optional leading icon (24x24). When empty (text-only), no space is reserved for it.
29
+ * @part tab - The button element.
30
+ * @part icon - The icon wrapper.
31
+ * @part label - The label wrapper.
32
+ */
33
+ // Note: this component's CSS Custom Properties (--bs-inline-tab-*) are documented via @prop
34
+ // comments in bs-inline-tab.css, not here -- Stencil's docs generator only parses @prop out of CSS
35
+ // file comments, not the class-level JSDoc (see bs-tab.tsx's equivalent note).
36
+ export class BsInlineTab {
37
+ el;
38
+ /** Whether this tab is the currently active one. NOT mutable and NOT self-toggling -- see the
39
+ * "Known gap" note in the class JSDoc. Still reflected as an attribute so consumers/CSS can
40
+ * target `bs-inline-tab[selected]`. */
41
+ selected = false;
42
+ /** Disables the tab: sets the native `disabled` attribute, suppresses hover/focus styling, and
43
+ * prevents clicking from emitting `bsSelect`. */
44
+ disabled = false;
45
+ /** Accessible name for the tab. Required for icon-only usage (no visible label text via the
46
+ * default slot) so screen readers still announce what the tab does -- without it, an icon-only
47
+ * tab has no discernible name at all (axe-core flags this as a critical `button-name`
48
+ * violation). Stencil reflects this camelCase prop to the `aria-label` HTML attribute
49
+ * automatically, same as `bs-tab`'s identical prop. */
50
+ ariaLabel = null;
51
+ /** Tracks whether the `icon` slot has assigned content. */
52
+ hasIcon = false;
53
+ /** Tracks whether the default (label) slot has assigned content. */
54
+ hasLabel = false;
55
+ /** Fires when the tab is clicked. Does not toggle `selected` itself -- see the class JSDoc. */
56
+ bsSelect;
57
+ /**
58
+ * Computes the initial `hasIcon`/`hasLabel` state directly from the host's light DOM children,
59
+ * before first render -- same reasoning as `bs-tab.componentWillLoad` (a slot with zero assigned
60
+ * nodes from the start never fires `slotchange`).
61
+ */
62
+ componentWillLoad() {
63
+ this.hasIcon = this.hasSlottedContent('icon');
64
+ this.hasLabel = this.hasSlottedContent(null);
65
+ }
66
+ hasSlottedContent(slotName) {
67
+ return Array.from(this.el.childNodes).some(node => {
68
+ if (node.nodeType === Node.ELEMENT_NODE) {
69
+ return node.getAttribute('slot') === slotName;
70
+ }
71
+ // Only elements can carry a `slot` attribute -- any other node type (text, comments) can
72
+ // only ever be assigned to the default slot.
73
+ return slotName === null;
74
+ });
75
+ }
76
+ onIconSlotchange = (ev) => {
77
+ this.hasIcon = ev.target.assignedNodes().length > 0;
78
+ };
79
+ onLabelSlotchange = (ev) => {
80
+ this.hasLabel = ev.target.assignedNodes().length > 0;
81
+ };
82
+ onClick = () => {
83
+ if (this.disabled)
84
+ return;
85
+ this.bsSelect.emit();
86
+ };
87
+ render() {
88
+ const iconOnly = this.hasIcon && !this.hasLabel;
89
+ return (h("button", { key: 'a0a20d6cb582852ae0276ae2dd91bc5c7708cbfa', type: "button", part: "tab", role: "tab", class: `bs-inline-tab ${this.selected ? 'bs-inline-tab--selected' : ''} ${this.disabled ? 'bs-inline-tab--disabled' : ''} ${iconOnly ? 'bs-inline-tab--icon-only' : ''} ${this.hasIcon ? 'bs-inline-tab--has-icon' : ''}`, disabled: this.disabled, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? 'true' : undefined, "aria-label": this.ariaLabel, onClick: this.onClick }, h("span", { key: 'e2fea17db42da65d9ff8ff6d59749572a25c3eb2', part: "icon", class: `bs-inline-tab__icon ${this.hasIcon ? 'bs-inline-tab__icon--has-content' : ''}` }, h("slot", { key: '4551fc4b092105be399277e42bf343390ae18ff8', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '99de7b930a840f482e0ad2c5e6eaf1b759c6f9ed', part: "label", class: `bs-inline-tab__label ${this.hasLabel ? 'bs-inline-tab__label--has-content' : ''}` }, h("slot", { key: 'dbedcadbb5b1b51c47d0fa44b8a41f67d6ef4ef0', onSlotchange: this.onLabelSlotchange }))));
90
+ }
91
+ static get is() { return "bs-inline-tab"; }
92
+ static get encapsulation() { return "shadow"; }
93
+ static get originalStyleUrls() {
94
+ return {
95
+ "$": ["bs-inline-tab.css"]
96
+ };
97
+ }
98
+ static get styleUrls() {
99
+ return {
100
+ "$": ["bs-inline-tab.css"]
101
+ };
102
+ }
103
+ static get properties() {
104
+ return {
105
+ "selected": {
106
+ "type": "boolean",
107
+ "mutable": false,
108
+ "complexType": {
109
+ "original": "boolean",
110
+ "resolved": "boolean",
111
+ "references": {}
112
+ },
113
+ "required": false,
114
+ "optional": false,
115
+ "docs": {
116
+ "tags": [],
117
+ "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-inline-tab[selected]`."
118
+ },
119
+ "getter": false,
120
+ "setter": false,
121
+ "reflect": true,
122
+ "attribute": "selected",
123
+ "defaultValue": "false"
124
+ },
125
+ "disabled": {
126
+ "type": "boolean",
127
+ "mutable": false,
128
+ "complexType": {
129
+ "original": "boolean",
130
+ "resolved": "boolean",
131
+ "references": {}
132
+ },
133
+ "required": false,
134
+ "optional": false,
135
+ "docs": {
136
+ "tags": [],
137
+ "text": "Disables the tab: sets the native `disabled` attribute, suppresses hover/focus styling, and\nprevents clicking from emitting `bsSelect`."
138
+ },
139
+ "getter": false,
140
+ "setter": false,
141
+ "reflect": false,
142
+ "attribute": "disabled",
143
+ "defaultValue": "false"
144
+ },
145
+ "ariaLabel": {
146
+ "type": "string",
147
+ "mutable": false,
148
+ "complexType": {
149
+ "original": "string | null",
150
+ "resolved": "string",
151
+ "references": {}
152
+ },
153
+ "required": false,
154
+ "optional": false,
155
+ "docs": {
156
+ "tags": [],
157
+ "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-tab`'s identical prop."
158
+ },
159
+ "getter": false,
160
+ "setter": false,
161
+ "reflect": false,
162
+ "attribute": "aria-label",
163
+ "defaultValue": "null"
164
+ }
165
+ };
166
+ }
167
+ static get states() {
168
+ return {
169
+ "hasIcon": {},
170
+ "hasLabel": {}
171
+ };
172
+ }
173
+ static get events() {
174
+ return [{
175
+ "method": "bsSelect",
176
+ "name": "bsSelect",
177
+ "bubbles": true,
178
+ "cancelable": true,
179
+ "composed": true,
180
+ "docs": {
181
+ "tags": [],
182
+ "text": "Fires when the tab is clicked. Does not toggle `selected` itself -- see the class JSDoc."
183
+ },
184
+ "complexType": {
185
+ "original": "void",
186
+ "resolved": "void",
187
+ "references": {}
188
+ }
189
+ }];
190
+ }
191
+ static get elementRef() { return "el"; }
192
+ }
@@ -0,0 +1,95 @@
1
+ import { html, nothing } from "lit";
2
+ import { componentDescription, propDescription } from "../../../stories-utils";
3
+ const homeIcon = html `
4
+ <svg slot="icon" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
5
+ <path d="M3 10.5L12 3L21 10.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
6
+ <path d="M5 9V20H19V9" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
7
+ </svg>
8
+ `;
9
+ const meta = {
10
+ title: 'Components/bs-tab/bs-inline-tab',
11
+ parameters: { docs: { description: { component: componentDescription('bs-inline-tab') } } },
12
+ // role="tab" is only valid ARIA inside a role="tablist" ancestor (axe-core flags a lone
13
+ // bs-inline-tab as a critical aria-required-parent violation otherwise -- see
14
+ // bs-inline-tab.mdx's Accessibility section). NOT display: contents -- that has a known
15
+ // Chromium accessibility-tree quirk where it can strip the element's own role. A plain
16
+ // block-level div has no visual effect worth avoiding here (each story below is a single
17
+ // isolated demo, not part of a larger page layout).
18
+ //
19
+ // aria-label uses lit's `nothing` sentinel below, not null/'' -- a plain (non-boolean) lit
20
+ // attribute binding renders null/'' as aria-label="" (present but empty), not an absent
21
+ // attribute. axe-core then treats the light-DOM <bs-inline-tab> host as ARIA-meaningful in its
22
+ // own right and stops looking inside its shadow root for the real role="tab", which surfaces as
23
+ // an aria-required-children violation on the *parent* tablist -- a very confusing place to look.
24
+ render: args => html `
25
+ <div role="tablist">
26
+ <bs-inline-tab ?selected=${args.selected} ?disabled=${args.disabled} aria-label=${args.ariaLabel || nothing}>
27
+ ${args.icon ? homeIcon : ''}${args.label}
28
+ </bs-inline-tab>
29
+ </div>
30
+ `,
31
+ argTypes: {
32
+ selected: { control: 'boolean', description: propDescription('bs-inline-tab', 'selected') },
33
+ disabled: { control: 'boolean', description: propDescription('bs-inline-tab', 'disabled') },
34
+ icon: { control: 'boolean', description: 'Toggles a leading icon (not a real attribute -- see the `icon` slot).' },
35
+ label: { control: 'text', description: "Slotted label content (not a real attribute -- see the default slot)." },
36
+ ariaLabel: { control: 'text', description: propDescription('bs-inline-tab', 'ariaLabel') },
37
+ },
38
+ args: {
39
+ selected: false,
40
+ disabled: false,
41
+ icon: false,
42
+ label: 'Overview',
43
+ ariaLabel: '',
44
+ },
45
+ };
46
+ export default meta;
47
+ export const Default = {};
48
+ export const WithIcon = {
49
+ name: 'With icon',
50
+ args: { icon: true },
51
+ };
52
+ export const IconOnly = {
53
+ name: 'Icon only',
54
+ args: { icon: true, label: '', ariaLabel: 'Home' },
55
+ };
56
+ export const Selected = {
57
+ args: { selected: true },
58
+ };
59
+ export const SelectedWithIcon = {
60
+ name: 'Selected with icon',
61
+ args: { selected: true, icon: true },
62
+ };
63
+ export const Disabled = {
64
+ args: { disabled: true },
65
+ };
66
+ const groupTabLabels = ['Overview', 'Details', 'Settings', 'Archived'];
67
+ // A separate args shape from the single-tab stories above (this story renders 4 instances, not
68
+ // one) -- StoryObj is typed independently per export, so this doesn't need to fit BsInlineTabArgs.
69
+ export const Group = {
70
+ name: 'Tab group',
71
+ argTypes: {
72
+ selectedTab: {
73
+ control: 'select',
74
+ options: groupTabLabels,
75
+ description: 'Which tab is selected (Archived is disabled and cannot be selected).',
76
+ },
77
+ icon: { control: 'boolean', description: 'Toggles a leading icon on every tab in the group (not a real attribute -- see the `icon` slot).' },
78
+ },
79
+ args: {
80
+ selectedTab: 'Overview',
81
+ icon: false,
82
+ },
83
+ // The group bar itself (background, pill-shaped padding/radius) is now owned by <bs-tabs
84
+ // type="bs-inline-tab">, not styled by hand here -- see bs-tabs.mdx for the redline this
85
+ // reproduces.
86
+ render: args => html `
87
+ <bs-tabs type="bs-inline-tab">
88
+ ${groupTabLabels.map(label => html `
89
+ <bs-inline-tab ?selected=${label === args.selectedTab} ?disabled=${label === 'Archived'}>
90
+ ${args.icon ? homeIcon : ''}${label}
91
+ </bs-inline-tab>
92
+ `)}
93
+ </bs-tabs>
94
+ `,
95
+ };
@@ -0,0 +1,120 @@
1
+ import { render, h, describe, it, expect } from "@stencil/vitest";
2
+ describe('bs-tab', () => {
3
+ it('renders a button with role="tab" and part="tab"', async () => {
4
+ const { root } = await render(h("bs-tab", null, "Overview"));
5
+ const button = root.shadowRoot.querySelector('[part="tab"]');
6
+ expect(button).not.toBeNull();
7
+ expect(button.tagName).toBe('BUTTON');
8
+ expect(button.getAttribute('role')).toBe('tab');
9
+ expect(button.getAttribute('type')).toBe('button');
10
+ });
11
+ it('reflects ariaLabel to the aria-label attribute, for icon-only accessible names', async () => {
12
+ const { root } = await render(h("bs-tab", { ariaLabel: "Home" }, h("span", { slot: "icon" }, "ICON")));
13
+ const button = root.shadowRoot.querySelector('[part="tab"]');
14
+ expect(button).toEqualAttribute('aria-label', 'Home');
15
+ });
16
+ it('does not set aria-label when ariaLabel is not provided', async () => {
17
+ const { root } = await render(h("bs-tab", null, "Overview"));
18
+ const button = root.shadowRoot.querySelector('[part="tab"]');
19
+ expect(button).not.toHaveAttribute('aria-label');
20
+ });
21
+ describe('layout variants', () => {
22
+ it('text-only: renders the label, no icon space reserved', async () => {
23
+ const { root } = await render(h("bs-tab", null, "Overview"));
24
+ expect(root).toHaveTextContent('Overview');
25
+ const icon = root.shadowRoot.querySelector('[part="icon"]');
26
+ expect(icon).not.toHaveClass('bs-tab__icon--has-content');
27
+ expect(getComputedStyle(icon).display).toBe('none');
28
+ const label = root.shadowRoot.querySelector('[part="label"]');
29
+ expect(label).toHaveClass('bs-tab__label--has-content');
30
+ });
31
+ it('icon-only: renders the icon, no label space reserved', async () => {
32
+ const { root } = await render(h("bs-tab", null, h("span", { slot: "icon" }, "ICON")));
33
+ const icon = root.shadowRoot.querySelector('[part="icon"]');
34
+ expect(icon).toHaveClass('bs-tab__icon--has-content');
35
+ const label = root.shadowRoot.querySelector('[part="label"]');
36
+ expect(label).not.toHaveClass('bs-tab__label--has-content');
37
+ expect(getComputedStyle(label).display).toBe('none');
38
+ const button = root.shadowRoot.querySelector('[part="tab"]');
39
+ expect(button).toHaveClass('bs-tab--icon-only');
40
+ });
41
+ it('icon + text horizontal (default iconPosition): row layout, not vertical', async () => {
42
+ const { root } = await render(h("bs-tab", null, h("span", { slot: "icon" }, "ICON"), "Overview"));
43
+ const button = root.shadowRoot.querySelector('[part="tab"]');
44
+ expect(button).not.toHaveClass('bs-tab--vertical');
45
+ expect(button).not.toHaveClass('bs-tab--icon-only');
46
+ });
47
+ it('icon + text vertical (iconPosition="top"): column layout', async () => {
48
+ const { root } = await render(h("bs-tab", { iconPosition: "top" }, h("span", { slot: "icon" }, "ICON"), "Overview"));
49
+ const button = root.shadowRoot.querySelector('[part="tab"]');
50
+ expect(button).toHaveClass('bs-tab--vertical');
51
+ });
52
+ });
53
+ describe('badge slot', () => {
54
+ it('does not reserve badge space when empty', async () => {
55
+ const { root } = await render(h("bs-tab", null, "Overview"));
56
+ const badge = root.shadowRoot.querySelector('[part="badge"]');
57
+ expect(badge).not.toHaveClass('bs-tab__badge--has-content');
58
+ expect(getComputedStyle(badge).display).toBe('none');
59
+ });
60
+ it('reserves badge space in a text-only tab when populated', async () => {
61
+ const { root } = await render(h("bs-tab", null, "Overview", h("span", { slot: "badge" }, "3")));
62
+ const badge = root.shadowRoot.querySelector('[part="badge"]');
63
+ expect(badge).toHaveClass('bs-tab__badge--has-content');
64
+ });
65
+ it('does not reserve badge space in an icon-only tab, even when populated', async () => {
66
+ const { root } = await render(h("bs-tab", null, h("span", { slot: "icon" }, "ICON"), h("span", { slot: "badge" }, "3")));
67
+ const badge = root.shadowRoot.querySelector('[part="badge"]');
68
+ expect(badge).not.toHaveClass('bs-tab__badge--has-content');
69
+ });
70
+ it('does not reserve badge space in an icon+text vertical tab, even when populated', async () => {
71
+ const { root } = await render(h("bs-tab", { iconPosition: "top" }, h("span", { slot: "icon" }, "ICON"), "Overview", h("span", { slot: "badge" }, "3")));
72
+ const badge = root.shadowRoot.querySelector('[part="badge"]');
73
+ expect(badge).not.toHaveClass('bs-tab__badge--has-content');
74
+ });
75
+ });
76
+ describe('selected', () => {
77
+ it('applies selected styling and reflects the attribute, but is false by default', async () => {
78
+ const { root } = await render(h("bs-tab", null, "Overview"));
79
+ const button = root.shadowRoot.querySelector('[part="tab"]');
80
+ expect(button).not.toHaveClass('bs-tab--selected');
81
+ expect(button).toEqualAttribute('aria-selected', 'false');
82
+ });
83
+ it('reflects selected as an attribute and applies selected styling', async () => {
84
+ const { root } = await render(h("bs-tab", { selected: true }, "Overview"));
85
+ expect(root).toHaveAttribute('selected');
86
+ const button = root.shadowRoot.querySelector('[part="tab"]');
87
+ expect(button).toHaveClass('bs-tab--selected');
88
+ expect(button).toEqualAttribute('aria-selected', 'true');
89
+ });
90
+ it('does not self-toggle selected on click', async () => {
91
+ const { root, waitForChanges } = await render(h("bs-tab", null, "Overview"));
92
+ const button = root.shadowRoot.querySelector('[part="tab"]');
93
+ button.click();
94
+ await waitForChanges();
95
+ expect(root.selected).toBe(false);
96
+ expect(button).not.toHaveClass('bs-tab--selected');
97
+ });
98
+ });
99
+ it('emits bsSelect when clicked', async () => {
100
+ const { root, spyOnEvent } = await render(h("bs-tab", null, "Overview"));
101
+ const selectSpy = spyOnEvent('bsSelect');
102
+ root.shadowRoot.querySelector('[part="tab"]').click();
103
+ expect(selectSpy).toHaveReceivedEventTimes(1);
104
+ });
105
+ describe('disabled', () => {
106
+ it('applies disabled styling, sets the native disabled attribute and aria-disabled', async () => {
107
+ const { root } = await render(h("bs-tab", { disabled: true }, "Overview"));
108
+ const button = root.shadowRoot.querySelector('[part="tab"]');
109
+ expect(button).toHaveClass('bs-tab--disabled');
110
+ expect(button).toHaveAttribute('disabled');
111
+ expect(button).toEqualAttribute('aria-disabled', 'true');
112
+ });
113
+ it('does not emit bsSelect when clicked while disabled', async () => {
114
+ const { root, spyOnEvent } = await render(h("bs-tab", { disabled: true }, "Overview"));
115
+ const selectSpy = spyOnEvent('bsSelect');
116
+ root.shadowRoot.querySelector('[part="tab"]').click();
117
+ expect(selectSpy).toHaveReceivedEventTimes(0);
118
+ });
119
+ });
120
+ });