@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,499 @@
1
+ import { h } from "@stencil/core";
2
+ /**
3
+ * A slider for picking a single numeric value (`type="default"`), a value snapped to evenly
4
+ * spaced ticks (`type="segmented"`), or a min/max pair (`type="range"`) from within a bounded
5
+ * `min`/`max` range.
6
+ *
7
+ * ## When to use
8
+ * - A numeric value that's easiest to reason about relative to its bounds (volume, brightness,
9
+ * a price range) rather than typed digit-by-digit.
10
+ * - `type="segmented"` when only a fixed number of discrete stops make sense (e.g. a 5-star
11
+ * rating-like scale) but a visual track is still preferable to discrete buttons.
12
+ * - `type="range"` for picking a min/max pair (e.g. a price range filter) with two thumbs.
13
+ *
14
+ * ## When not to use
15
+ * - A precise value where mis-dragging by a pixel matters more than the at-a-glance bounds --
16
+ * use `bs-input[type="number"]` instead.
17
+ * - A small, fixed set of mutually exclusive choices -- use a radio group instead.
18
+ *
19
+ * @part label - The "Label" text above the track.
20
+ * @part field - Each editable percentage-value field, shown top-right above the track.
21
+ * @part bound - Each static min/max bound label flanking the track itself.
22
+ * @part track - The background (inactive) track.
23
+ * @part fill - The active/filled portion of the track.
24
+ * @part control - The native range input(s) that drive the knob(s).
25
+ * @part tooltip - The value tooltip shown above a knob while focused/dragging.
26
+ */
27
+ // Note: this component's CSS Custom Properties are documented via @prop comments in
28
+ // bs-slider.css, not here.
29
+ export class BsSlider {
30
+ el;
31
+ /** Which slider shape to render. `range` uses two thumbs (`valueStart`/`valueEnd`); `default`
32
+ * and `segmented` use one thumb (`value`). `segmented` additionally draws `segments` tick marks
33
+ * along the track. */
34
+ type = 'default';
35
+ /** Shows/hides the "Label" text and editable percentage field(s) above the track, and the
36
+ * static min/max bound labels flanking it. When `false`, only the bare track (and its
37
+ * knob/knobs) renders. */
38
+ showLabel = true;
39
+ /** Label text shown above the track when `showLabel` is set. */
40
+ label = 'Label';
41
+ /** Minimum selectable value, for all `type`s. */
42
+ min = 0;
43
+ /** Maximum selectable value, for all `type`s. */
44
+ max = 100;
45
+ /** Step size between selectable values. For `type="segmented"`, the effective step is derived
46
+ * from `(max - min) / segments` instead, so the thumb always snaps to a tick. */
47
+ step = 1;
48
+ /** Current value for `type="default"`/`type="segmented"`. Ignored for `type="range"` -- use
49
+ * `valueStart`/`valueEnd` instead. Mutable so dragging the thumb updates it directly. */
50
+ value = 0;
51
+ /** Lower thumb's value for `type="range"`. Defaults to `min` when unset. Mutable so dragging the
52
+ * thumb updates it directly. */
53
+ valueStart;
54
+ /** Upper thumb's value for `type="range"`. Defaults to `max` when unset. Mutable so dragging the
55
+ * thumb updates it directly. */
56
+ valueEnd;
57
+ /** Number of equal divisions marked by tick lines along the track, for `type="segmented"` only.
58
+ * The first tick (at the very start of the track) is rendered with `opacity: 0` to keep the
59
+ * tick spacing math consistent while not visually doubling up with the track's own start edge --
60
+ * this matches the design spec, not a bug. */
61
+ segments = 10;
62
+ /** Disables the slider: sets the native `disabled` attribute on the range input(s), suppresses
63
+ * hover/focus/drag styling and the value tooltip, and prevents interaction. */
64
+ disabled = false;
65
+ /**
66
+ * Accessible name for the slider's native range input(s). Required whenever `showLabel` is
67
+ * `false` (a bare track with no visible "Label" text) -- without it, the internal native
68
+ * `<input>` has no accessible name at all. Setting `aria-label` directly on the `<bs-slider>`
69
+ * host does NOT work for this: that attribute stays on the light-DOM host and is never forwarded
70
+ * into the shadow DOM by the browser. Same pattern/reasoning as `bs-switch`'s and `bs-checkbox`'s
71
+ * identical `ariaLabel` prop. For `type="range"`, this labels the lower-bound thumb; the
72
+ * upper-bound thumb gets `"${ariaLabel} end"` (or `"End value"` when `ariaLabel` is unset).
73
+ */
74
+ ariaLabel = null;
75
+ /** Emitted when `value` changes via user interaction (dragging the thumb, or committing the
76
+ * value field), with the new value. Only fires for `type="default"`/`type="segmented"`. */
77
+ bsChange;
78
+ /** Emitted when `valueStart`/`valueEnd` changes via user interaction, with both current values.
79
+ * Only fires for `type="range"`. */
80
+ bsRangeChange;
81
+ get effectiveValueStart() {
82
+ return this.valueStart ?? this.min;
83
+ }
84
+ get effectiveValueEnd() {
85
+ return this.valueEnd ?? this.max;
86
+ }
87
+ /** Effective step for the native range input(s): `step` as-is, except for `type="segmented"`,
88
+ * where it's derived from `segments` so the thumb always lands on a tick. */
89
+ get effectiveStep() {
90
+ if (this.type === 'segmented' && this.segments > 0) {
91
+ return (this.max - this.min) / this.segments;
92
+ }
93
+ return this.step;
94
+ }
95
+ clamp(n) {
96
+ if (Number.isNaN(n))
97
+ return this.min;
98
+ return Math.min(this.max, Math.max(this.min, n));
99
+ }
100
+ percent(value) {
101
+ if (this.max === this.min)
102
+ return 0;
103
+ return ((value - this.min) / (this.max - this.min)) * 100;
104
+ }
105
+ onInputChange = (ev) => {
106
+ if (this.disabled)
107
+ return;
108
+ const next = this.clamp(parseFloat(ev.target.value));
109
+ this.value = next;
110
+ this.bsChange.emit(next);
111
+ };
112
+ clampPercent(n) {
113
+ if (Number.isNaN(n))
114
+ return 0;
115
+ return Math.min(100, Math.max(0, n));
116
+ }
117
+ /** Converts an edited percentage (0-100, from the header field) back to a raw value in
118
+ * min/max units. */
119
+ fromPercent(pct) {
120
+ return this.min + (this.clampPercent(pct) / 100) * (this.max - this.min);
121
+ }
122
+ onPercentFieldChange = (ev) => {
123
+ if (this.disabled)
124
+ return;
125
+ const next = this.clamp(this.fromPercent(parseFloat(ev.target.value)));
126
+ this.value = next;
127
+ this.bsChange.emit(next);
128
+ };
129
+ onStartInputChange = (ev) => {
130
+ if (this.disabled)
131
+ return;
132
+ let next = this.clamp(parseFloat(ev.target.value));
133
+ next = Math.min(next, this.effectiveValueEnd);
134
+ this.valueStart = next;
135
+ this.bsRangeChange.emit({ start: next, end: this.effectiveValueEnd });
136
+ };
137
+ onEndInputChange = (ev) => {
138
+ if (this.disabled)
139
+ return;
140
+ let next = this.clamp(parseFloat(ev.target.value));
141
+ next = Math.max(next, this.effectiveValueStart);
142
+ this.valueEnd = next;
143
+ this.bsRangeChange.emit({ start: this.effectiveValueStart, end: next });
144
+ };
145
+ onStartPercentFieldChange = (ev) => {
146
+ if (this.disabled)
147
+ return;
148
+ let next = this.clamp(this.fromPercent(parseFloat(ev.target.value)));
149
+ next = Math.min(next, this.effectiveValueEnd);
150
+ this.valueStart = next;
151
+ this.bsRangeChange.emit({ start: next, end: this.effectiveValueEnd });
152
+ };
153
+ onEndPercentFieldChange = (ev) => {
154
+ if (this.disabled)
155
+ return;
156
+ let next = this.clamp(this.fromPercent(parseFloat(ev.target.value)));
157
+ next = Math.max(next, this.effectiveValueStart);
158
+ this.valueEnd = next;
159
+ this.bsRangeChange.emit({ start: this.effectiveValueStart, end: next });
160
+ };
161
+ /** The editable field shown top-right (or as a pair for `type="range"`), displaying/editing
162
+ * the thumb's position as a rounded 0-100 percentage of min/max -- not the raw value -- per
163
+ * the Figma spec (every state screenshot shows this field suffixed "%", matching the same
164
+ * percentage the tooltip shows while dragging). */
165
+ renderPercentField(percentValue, onChange, ariaLabel) {
166
+ return (h("span", { part: "field", class: "bs-slider__field" }, h("input", { type: "number", class: "bs-slider__field-input", value: Math.round(this.clampPercent(percentValue)), min: 0, max: 100, disabled: this.disabled, "aria-label": ariaLabel, onChange: onChange }), h("span", { class: "bs-slider__field-suffix", "aria-hidden": "true" }, "%")));
167
+ }
168
+ renderSegmentedTicks() {
169
+ if (this.type !== 'segmented' || this.segments <= 0)
170
+ return null;
171
+ // segments+1 ticks (both track ends plus every division), per the Figma spec -- the first
172
+ // tick is invisible (opacity: 0) so the spacing math stays consistent even though it would
173
+ // otherwise sit right on top of the track's own start edge.
174
+ const tickCount = this.segments + 1;
175
+ return (h("div", { class: "bs-slider__ticks", "aria-hidden": "true" }, Array.from({ length: tickCount }).map((_, i) => (h("span", { class: `bs-slider__tick ${i === 0 ? 'bs-slider__tick--hidden' : ''}` })))));
176
+ }
177
+ renderSingleThumb() {
178
+ const fillEnd = this.percent(this.value);
179
+ return (h("div", { class: "bs-slider__track-wrapper", style: { '--bs-slider-fill-start': '0%', '--bs-slider-fill-end': `${fillEnd}%` } }, h("div", { part: "track", class: "bs-slider__track" }, h("div", { part: "fill", class: "bs-slider__track-fill" }), this.renderSegmentedTicks()), h("input", { type: "range", part: "control", class: "bs-slider__input", min: this.min, max: this.max, step: this.effectiveStep, value: this.value, disabled: this.disabled, "aria-label": this.ariaLabel ?? undefined, "aria-labelledby": !this.ariaLabel && this.showLabel ? 'bs-slider-label' : undefined, onInput: this.onInputChange, onChange: this.onInputChange }), h("span", { class: "bs-slider__tooltip", part: "tooltip", style: { left: `${fillEnd}%` }, "aria-hidden": "true" }, Math.round(this.percent(this.value)), "%")));
180
+ }
181
+ renderRangeThumbs() {
182
+ const start = this.effectiveValueStart;
183
+ const end = this.effectiveValueEnd;
184
+ const fillStart = this.percent(start);
185
+ const fillEnd = this.percent(end);
186
+ // Two thumbs can't be done with a single native <input type="range"> -- the CSS spec only
187
+ // gives a range input one thumb. This is the well-known dual-range-slider pattern instead:
188
+ // two overlapping native range inputs, each with a fully transparent track (only their thumb
189
+ // is visible/interactive -- see bs-slider.css's pointer-events rules), plus a separate
190
+ // absolutely-positioned div for the "filled" segment between them.
191
+ //
192
+ // Both inputs sit at the same z-index by default, except whichever thumb is in the upper half
193
+ // of the track gets a higher z-index -- without that, once the two thumbs are close together
194
+ // near one end, only the topmost one is reachable by click, and the topmost one is always the
195
+ // one rendered last (the end thumb) unless we compensate.
196
+ const startOnTop = this.percent(start) > 50;
197
+ return (h("div", { class: "bs-slider__track-wrapper", style: { '--bs-slider-fill-start': `${fillStart}%`, '--bs-slider-fill-end': `${fillEnd}%` } }, h("div", { part: "track", class: "bs-slider__track" }, h("div", { part: "fill", class: "bs-slider__track-fill" })), h("input", { type: "range", part: "control", class: "bs-slider__input bs-slider__input--start", style: { zIndex: startOnTop ? '4' : '3' }, min: this.min, max: this.max, step: this.step, value: start, disabled: this.disabled, "aria-label": this.ariaLabel ?? 'Start value', onInput: this.onStartInputChange, onChange: this.onStartInputChange }), h("input", { type: "range", part: "control", class: "bs-slider__input bs-slider__input--end", style: { zIndex: startOnTop ? '3' : '4' }, min: this.min, max: this.max, step: this.step, value: end, disabled: this.disabled, "aria-label": this.ariaLabel ? `${this.ariaLabel} end` : 'End value', onInput: this.onEndInputChange, onChange: this.onEndInputChange }), h("span", { class: "bs-slider__tooltip bs-slider__tooltip--start", part: "tooltip", style: { left: `${fillStart}%` }, "aria-hidden": "true" }, Math.round(this.percent(start)), "%"), h("span", { class: "bs-slider__tooltip bs-slider__tooltip--end", part: "tooltip", style: { left: `${fillEnd}%` }, "aria-hidden": "true" }, Math.round(this.percent(end)), "%")));
198
+ }
199
+ render() {
200
+ const isRange = this.type === 'range';
201
+ const rootClasses = ['bs-slider', this.disabled ? 'bs-slider--disabled' : ''].filter(Boolean).join(' ');
202
+ return (h("div", { key: '85529486524fc9859b4b1706a69e70f46537ab77', class: rootClasses }, this.showLabel && (h("div", { key: '4871263c05627057e838478048caed54554db6fc', class: "bs-slider__header" }, h("span", { key: '91ef26112441bdd1bdc7b4b0d1653c81db88bf4a', id: "bs-slider-label", part: "label", class: "bs-slider__label" }, this.label), isRange ? (h("span", { class: "bs-slider__value-fields" }, this.renderPercentField(this.percent(this.effectiveValueStart), this.onStartPercentFieldChange, this.ariaLabel ?? 'Start value'), h("span", { class: "bs-slider__separator" }, "\u2013"), this.renderPercentField(this.percent(this.effectiveValueEnd), this.onEndPercentFieldChange, this.ariaLabel ? `${this.ariaLabel} end` : 'End value'))) : (this.renderPercentField(this.percent(this.value), this.onPercentFieldChange, this.ariaLabel ? `${this.ariaLabel} value` : 'Value')))), h("div", { key: '336901d2c9195c4415fce9fe9c683c51b652feb8', class: "bs-slider__row" }, this.showLabel && (h("span", { key: '49330dd4efe29c2f4d27ded8a5ed812b5a98d6af', part: "bound", class: "bs-slider__bound" }, this.min)), isRange ? this.renderRangeThumbs() : this.renderSingleThumb(), this.showLabel && (h("span", { key: '6daa487800d4303d2d43c7d526bd457d3caddf7f', part: "bound", class: "bs-slider__bound" }, this.max)))));
203
+ }
204
+ static get is() { return "bs-slider"; }
205
+ static get encapsulation() { return "shadow"; }
206
+ static get delegatesFocus() { return true; }
207
+ static get originalStyleUrls() {
208
+ return {
209
+ "$": ["bs-slider.css"]
210
+ };
211
+ }
212
+ static get styleUrls() {
213
+ return {
214
+ "$": ["bs-slider.css"]
215
+ };
216
+ }
217
+ static get properties() {
218
+ return {
219
+ "type": {
220
+ "type": "string",
221
+ "mutable": false,
222
+ "complexType": {
223
+ "original": "BsSliderType",
224
+ "resolved": "\"default\" | \"range\" | \"segmented\"",
225
+ "references": {
226
+ "BsSliderType": {
227
+ "location": "local",
228
+ "path": "/Users/vivka/brandsync-web-components/src/components/bs-slider/bs-slider.tsx",
229
+ "id": "src/components/bs-slider/bs-slider.tsx::BsSliderType"
230
+ }
231
+ }
232
+ },
233
+ "required": false,
234
+ "optional": false,
235
+ "docs": {
236
+ "tags": [],
237
+ "text": "Which slider shape to render. `range` uses two thumbs (`valueStart`/`valueEnd`); `default`\nand `segmented` use one thumb (`value`). `segmented` additionally draws `segments` tick marks\nalong the track."
238
+ },
239
+ "getter": false,
240
+ "setter": false,
241
+ "reflect": false,
242
+ "attribute": "type",
243
+ "defaultValue": "'default'"
244
+ },
245
+ "showLabel": {
246
+ "type": "boolean",
247
+ "mutable": false,
248
+ "complexType": {
249
+ "original": "boolean",
250
+ "resolved": "boolean",
251
+ "references": {}
252
+ },
253
+ "required": false,
254
+ "optional": false,
255
+ "docs": {
256
+ "tags": [],
257
+ "text": "Shows/hides the \"Label\" text and editable percentage field(s) above the track, and the\nstatic min/max bound labels flanking it. When `false`, only the bare track (and its\nknob/knobs) renders."
258
+ },
259
+ "getter": false,
260
+ "setter": false,
261
+ "reflect": false,
262
+ "attribute": "show-label",
263
+ "defaultValue": "true"
264
+ },
265
+ "label": {
266
+ "type": "string",
267
+ "mutable": false,
268
+ "complexType": {
269
+ "original": "string",
270
+ "resolved": "string",
271
+ "references": {}
272
+ },
273
+ "required": false,
274
+ "optional": false,
275
+ "docs": {
276
+ "tags": [],
277
+ "text": "Label text shown above the track when `showLabel` is set."
278
+ },
279
+ "getter": false,
280
+ "setter": false,
281
+ "reflect": false,
282
+ "attribute": "label",
283
+ "defaultValue": "'Label'"
284
+ },
285
+ "min": {
286
+ "type": "number",
287
+ "mutable": false,
288
+ "complexType": {
289
+ "original": "number",
290
+ "resolved": "number",
291
+ "references": {}
292
+ },
293
+ "required": false,
294
+ "optional": false,
295
+ "docs": {
296
+ "tags": [],
297
+ "text": "Minimum selectable value, for all `type`s."
298
+ },
299
+ "getter": false,
300
+ "setter": false,
301
+ "reflect": false,
302
+ "attribute": "min",
303
+ "defaultValue": "0"
304
+ },
305
+ "max": {
306
+ "type": "number",
307
+ "mutable": false,
308
+ "complexType": {
309
+ "original": "number",
310
+ "resolved": "number",
311
+ "references": {}
312
+ },
313
+ "required": false,
314
+ "optional": false,
315
+ "docs": {
316
+ "tags": [],
317
+ "text": "Maximum selectable value, for all `type`s."
318
+ },
319
+ "getter": false,
320
+ "setter": false,
321
+ "reflect": false,
322
+ "attribute": "max",
323
+ "defaultValue": "100"
324
+ },
325
+ "step": {
326
+ "type": "number",
327
+ "mutable": false,
328
+ "complexType": {
329
+ "original": "number",
330
+ "resolved": "number",
331
+ "references": {}
332
+ },
333
+ "required": false,
334
+ "optional": false,
335
+ "docs": {
336
+ "tags": [],
337
+ "text": "Step size between selectable values. For `type=\"segmented\"`, the effective step is derived\nfrom `(max - min) / segments` instead, so the thumb always snaps to a tick."
338
+ },
339
+ "getter": false,
340
+ "setter": false,
341
+ "reflect": false,
342
+ "attribute": "step",
343
+ "defaultValue": "1"
344
+ },
345
+ "value": {
346
+ "type": "number",
347
+ "mutable": true,
348
+ "complexType": {
349
+ "original": "number",
350
+ "resolved": "number",
351
+ "references": {}
352
+ },
353
+ "required": false,
354
+ "optional": false,
355
+ "docs": {
356
+ "tags": [],
357
+ "text": "Current value for `type=\"default\"`/`type=\"segmented\"`. Ignored for `type=\"range\"` -- use\n`valueStart`/`valueEnd` instead. Mutable so dragging the thumb updates it directly."
358
+ },
359
+ "getter": false,
360
+ "setter": false,
361
+ "reflect": false,
362
+ "attribute": "value",
363
+ "defaultValue": "0"
364
+ },
365
+ "valueStart": {
366
+ "type": "number",
367
+ "mutable": true,
368
+ "complexType": {
369
+ "original": "number",
370
+ "resolved": "number",
371
+ "references": {}
372
+ },
373
+ "required": false,
374
+ "optional": true,
375
+ "docs": {
376
+ "tags": [],
377
+ "text": "Lower thumb's value for `type=\"range\"`. Defaults to `min` when unset. Mutable so dragging the\nthumb updates it directly."
378
+ },
379
+ "getter": false,
380
+ "setter": false,
381
+ "reflect": false,
382
+ "attribute": "value-start"
383
+ },
384
+ "valueEnd": {
385
+ "type": "number",
386
+ "mutable": true,
387
+ "complexType": {
388
+ "original": "number",
389
+ "resolved": "number",
390
+ "references": {}
391
+ },
392
+ "required": false,
393
+ "optional": true,
394
+ "docs": {
395
+ "tags": [],
396
+ "text": "Upper thumb's value for `type=\"range\"`. Defaults to `max` when unset. Mutable so dragging the\nthumb updates it directly."
397
+ },
398
+ "getter": false,
399
+ "setter": false,
400
+ "reflect": false,
401
+ "attribute": "value-end"
402
+ },
403
+ "segments": {
404
+ "type": "number",
405
+ "mutable": false,
406
+ "complexType": {
407
+ "original": "number",
408
+ "resolved": "number",
409
+ "references": {}
410
+ },
411
+ "required": false,
412
+ "optional": false,
413
+ "docs": {
414
+ "tags": [],
415
+ "text": "Number of equal divisions marked by tick lines along the track, for `type=\"segmented\"` only.\nThe first tick (at the very start of the track) is rendered with `opacity: 0` to keep the\ntick spacing math consistent while not visually doubling up with the track's own start edge --\nthis matches the design spec, not a bug."
416
+ },
417
+ "getter": false,
418
+ "setter": false,
419
+ "reflect": false,
420
+ "attribute": "segments",
421
+ "defaultValue": "10"
422
+ },
423
+ "disabled": {
424
+ "type": "boolean",
425
+ "mutable": false,
426
+ "complexType": {
427
+ "original": "boolean",
428
+ "resolved": "boolean",
429
+ "references": {}
430
+ },
431
+ "required": false,
432
+ "optional": false,
433
+ "docs": {
434
+ "tags": [],
435
+ "text": "Disables the slider: sets the native `disabled` attribute on the range input(s), suppresses\nhover/focus/drag styling and the value tooltip, and prevents interaction."
436
+ },
437
+ "getter": false,
438
+ "setter": false,
439
+ "reflect": false,
440
+ "attribute": "disabled",
441
+ "defaultValue": "false"
442
+ },
443
+ "ariaLabel": {
444
+ "type": "string",
445
+ "mutable": false,
446
+ "complexType": {
447
+ "original": "string | null",
448
+ "resolved": "string",
449
+ "references": {}
450
+ },
451
+ "required": false,
452
+ "optional": false,
453
+ "docs": {
454
+ "tags": [],
455
+ "text": "Accessible name for the slider's native range input(s). Required whenever `showLabel` is\n`false` (a bare track with no visible \"Label\" text) -- without it, the internal native\n`<input>` has no accessible name at all. Setting `aria-label` directly on the `<bs-slider>`\nhost does NOT work for this: that attribute stays on the light-DOM host and is never forwarded\ninto the shadow DOM by the browser. Same pattern/reasoning as `bs-switch`'s and `bs-checkbox`'s\nidentical `ariaLabel` prop. For `type=\"range\"`, this labels the lower-bound thumb; the\nupper-bound thumb gets `\"${ariaLabel} end\"` (or `\"End value\"` when `ariaLabel` is unset)."
456
+ },
457
+ "getter": false,
458
+ "setter": false,
459
+ "reflect": false,
460
+ "attribute": "aria-label",
461
+ "defaultValue": "null"
462
+ }
463
+ };
464
+ }
465
+ static get events() {
466
+ return [{
467
+ "method": "bsChange",
468
+ "name": "bsChange",
469
+ "bubbles": true,
470
+ "cancelable": true,
471
+ "composed": true,
472
+ "docs": {
473
+ "tags": [],
474
+ "text": "Emitted when `value` changes via user interaction (dragging the thumb, or committing the\nvalue field), with the new value. Only fires for `type=\"default\"`/`type=\"segmented\"`."
475
+ },
476
+ "complexType": {
477
+ "original": "number",
478
+ "resolved": "number",
479
+ "references": {}
480
+ }
481
+ }, {
482
+ "method": "bsRangeChange",
483
+ "name": "bsRangeChange",
484
+ "bubbles": true,
485
+ "cancelable": true,
486
+ "composed": true,
487
+ "docs": {
488
+ "tags": [],
489
+ "text": "Emitted when `valueStart`/`valueEnd` changes via user interaction, with both current values.\nOnly fires for `type=\"range\"`."
490
+ },
491
+ "complexType": {
492
+ "original": "{ start: number; end: number }",
493
+ "resolved": "{ start: number; end: number; }",
494
+ "references": {}
495
+ }
496
+ }];
497
+ }
498
+ static get elementRef() { return "el"; }
499
+ }
@@ -0,0 +1,70 @@
1
+ import { html } from "lit";
2
+ import { ifDefined } from "lit/directives/if-defined.js";
3
+ import { componentDescription, propDescription } from "../../stories-utils";
4
+ const types = ['default', 'segmented', 'range'];
5
+ const meta = {
6
+ title: 'Components/bs-slider',
7
+ parameters: { docs: { description: { component: componentDescription('bs-slider') } } },
8
+ render: args => html `
9
+ <bs-slider
10
+ type=${args.type}
11
+ show-label=${args.showLabel}
12
+ label=${args.label}
13
+ min=${args.min}
14
+ max=${args.max}
15
+ step=${args.step}
16
+ value=${args.value}
17
+ value-start=${args.valueStart}
18
+ value-end=${args.valueEnd}
19
+ segments=${args.segments}
20
+ ?disabled=${args.disabled}
21
+ aria-label=${ifDefined(args.ariaLabel || undefined)}
22
+ ></bs-slider>
23
+ `,
24
+ argTypes: {
25
+ type: { control: 'select', options: types, description: propDescription('bs-slider', 'type') },
26
+ showLabel: { control: 'boolean', description: propDescription('bs-slider', 'showLabel') },
27
+ label: { control: 'text', description: propDescription('bs-slider', 'label') },
28
+ min: { control: 'number', description: propDescription('bs-slider', 'min') },
29
+ max: { control: 'number', description: propDescription('bs-slider', 'max') },
30
+ step: { control: 'number', description: propDescription('bs-slider', 'step') },
31
+ value: { control: 'number', description: propDescription('bs-slider', 'value') },
32
+ valueStart: { control: 'number', description: propDescription('bs-slider', 'valueStart') },
33
+ valueEnd: { control: 'number', description: propDescription('bs-slider', 'valueEnd') },
34
+ segments: { control: 'number', description: propDescription('bs-slider', 'segments') },
35
+ disabled: { control: 'boolean', description: propDescription('bs-slider', 'disabled') },
36
+ ariaLabel: { control: 'text', description: propDescription('bs-slider', 'ariaLabel') },
37
+ },
38
+ args: {
39
+ type: 'default',
40
+ showLabel: true,
41
+ label: 'Label',
42
+ min: 0,
43
+ max: 100,
44
+ step: 1,
45
+ value: 40,
46
+ valueStart: 25,
47
+ valueEnd: 75,
48
+ segments: 10,
49
+ disabled: false,
50
+ ariaLabel: '',
51
+ },
52
+ };
53
+ export default meta;
54
+ export const Default = {};
55
+ export const Segmented = {
56
+ args: { type: 'segmented', value: 30 },
57
+ };
58
+ export const Range = {
59
+ args: { type: 'range' },
60
+ };
61
+ export const Disabled = {
62
+ args: { disabled: true },
63
+ };
64
+ export const BareTrack = {
65
+ name: 'showLabel=false',
66
+ // ariaLabel is required here: with showLabel false there's no visible "Label" text left to
67
+ // associate via aria-labelledby, so the native range input would otherwise have no accessible
68
+ // name at all (a real WCAG 4.1.2 violation caught via axe-core against this exact story).
69
+ args: { showLabel: false, ariaLabel: 'Volume' },
70
+ };
@@ -51,8 +51,8 @@ export class BsSourceLink {
51
51
  };
52
52
  render() {
53
53
  const inner = [
54
- h("span", { key: '0e55cdcd04b7d6574835c1b5b21c20ad804fc36c', class: "bs-source-link__left" }, h("span", { key: '989f52e1b6b0a353470d65f5e3d75e40486b3842', class: "bs-source-link__filename-row" }, h("span", { key: 'e21ccdb9b78d4db3b18ca07039d61632b4390d80', part: "icon", class: "bs-source-link__icon" }, h("slot", { key: 'fe35c5c3084af9ddba25db3c46c2d8bbe7e927d0', name: "icon" }, h(FileTextIcon, { key: '5612acc39809cca4d483ab22f2e0b1cb95cdb2e8' }))), h("p", { key: '39d92f5e7e7a50e943ff9a85efd314df5a2abf0b', part: "filename", class: "bs-source-link__filename" }, this.fileName)), h("span", { key: 'd2eace60d67a344cd2bf522af38950fd3275bea2', class: "bs-source-link__meta" }, this.sourceName && (h("span", { key: 'd8d3fa79fa888db77ef44f402fd8747eb2cecad1', part: "source", class: "bs-source-link__source" }, this.sourceName)), this.sourceName && this.version && h("span", { key: '738770f5c4b091e59832100a17bda2f2d251ed75', class: "bs-source-link__dot", "aria-hidden": "true" }), this.version && (h("span", { key: '56fcf72b43eebb138745d212e8bcaa680f808cd0', part: "version", class: "bs-source-link__version" }, this.version)))),
55
- h("span", { key: 'da453b51265f923c19505645cb33832c93863179', part: "arrow", class: "bs-source-link__arrow", "aria-hidden": "true" }, h(ArrowUpRightIcon, { key: 'c23d308322df780d109691f87945bb511461304f' })),
54
+ h("span", { key: '79756193e545c7bc24f6df3aa25a644294933536', class: "bs-source-link__left" }, h("span", { key: 'e3aee2ee301d383149f242ee40d681a75782a4b2', class: "bs-source-link__filename-row" }, h("span", { key: '6cc1a0f55f54a0cca0f2ca305c2f8566e3016243', part: "icon", class: "bs-source-link__icon" }, h("slot", { key: 'b61ee4c11179ce958dbc5f3eb4cf1f3a0ff90c26', name: "icon" }, h(FileTextIcon, { key: '2d94ec22dade078f3828e8d0d64adb984716fb00' }))), h("p", { key: 'a727c77f11c68b61b0307d31dd9c79e811a75406', part: "filename", class: "bs-source-link__filename" }, this.fileName)), h("span", { key: 'bec3857211075ce8ce4ff33c649ee6370b6039f5', class: "bs-source-link__meta" }, this.sourceName && (h("span", { key: '5ca4e697485e1f82d8375afe48b2ab13380efe40', part: "source", class: "bs-source-link__source" }, this.sourceName)), this.sourceName && this.version && h("span", { key: '4a69cae984e34e5329750bd19c868c9b0a83da28', class: "bs-source-link__dot", "aria-hidden": "true" }), this.version && (h("span", { key: '8abd2c99dcea7b95bc7d79d24c1ba1f6fdd10436', part: "version", class: "bs-source-link__version" }, this.version)))),
55
+ h("span", { key: 'c5ff90d23096ab0cc70f6f906b8d04d29498e735', part: "arrow", class: "bs-source-link__arrow", "aria-hidden": "true" }, h(ArrowUpRightIcon, { key: '2bfc3acc65b7d9401c30999f4dd0adbf15f8a8d3' })),
56
56
  ];
57
57
  return this.href ? (h("a", { class: "bs-source-link", href: this.href, target: this.target, rel: "noopener noreferrer", onClick: this.onClick }, inner)) : (h("button", { type: "button", class: "bs-source-link", onClick: this.onClick }, inner));
58
58
  }
@@ -0,0 +1,71 @@
1
+ import { render, h, describe, it, expect } from "@stencil/vitest";
2
+ describe('bs-switch', () => {
3
+ it('renders an unchecked native switch input by default', async () => {
4
+ const { root } = await render(h("bs-switch", null));
5
+ const input = root.shadowRoot.querySelector('input');
6
+ expect(input).toEqualAttribute('type', 'checkbox');
7
+ expect(input).toEqualAttribute('role', 'switch');
8
+ expect(input.checked).toBe(false);
9
+ expect(root.shadowRoot.querySelector('[part="track"]')).not.toHaveClass('bs-switch__track--checked');
10
+ });
11
+ it('reflects ariaLabel to the native input, for label-less accessible names', async () => {
12
+ const { root } = await render(h("bs-switch", { ariaLabel: "Enable notifications" }));
13
+ const input = root.shadowRoot.querySelector('input');
14
+ expect(input).toEqualAttribute('aria-label', 'Enable notifications');
15
+ });
16
+ it('does not set aria-label on the native input when ariaLabel is not provided', async () => {
17
+ const { root } = await render(h("bs-switch", null));
18
+ const input = root.shadowRoot.querySelector('input');
19
+ expect(input).not.toHaveAttribute('aria-label');
20
+ });
21
+ it('reflects the checked prop to the native input and the track', async () => {
22
+ const { root } = await render(h("bs-switch", { checked: true }));
23
+ const input = root.shadowRoot.querySelector('input');
24
+ expect(input.checked).toBe(true);
25
+ expect(root.shadowRoot.querySelector('[part="track"]')).toHaveClass('bs-switch__track--checked');
26
+ });
27
+ it('clicking the input toggles checked and emits bsChange with the new value', async () => {
28
+ const { root, waitForChanges, spyOnEvent } = await render(h("bs-switch", null));
29
+ const bsChangeSpy = spyOnEvent('bsChange');
30
+ const input = root.shadowRoot.querySelector('input');
31
+ input.click();
32
+ await waitForChanges();
33
+ expect(input.checked).toBe(true);
34
+ expect(bsChangeSpy).toHaveReceivedEventTimes(1);
35
+ expect(bsChangeSpy).toHaveReceivedEventDetail(true);
36
+ input.click();
37
+ await waitForChanges();
38
+ expect(input.checked).toBe(false);
39
+ expect(bsChangeSpy).toHaveReceivedEventTimes(2);
40
+ expect(bsChangeSpy).toHaveReceivedEventDetail(false);
41
+ });
42
+ describe('disabled', () => {
43
+ it('sets the disabled attribute on the native input', async () => {
44
+ const { root } = await render(h("bs-switch", { disabled: true }));
45
+ const input = root.shadowRoot.querySelector('input');
46
+ expect(input).toHaveAttribute('disabled');
47
+ });
48
+ it('prevents toggling via click', async () => {
49
+ const { root, waitForChanges, spyOnEvent } = await render(h("bs-switch", { disabled: true }));
50
+ const bsChangeSpy = spyOnEvent('bsChange');
51
+ const input = root.shadowRoot.querySelector('input');
52
+ input.click();
53
+ await waitForChanges();
54
+ expect(input.checked).toBe(false);
55
+ expect(bsChangeSpy).toHaveReceivedEventTimes(0);
56
+ });
57
+ });
58
+ ['md', 'lg'].forEach(size => {
59
+ it(`renders size="${size}" with the matching track modifier class`, async () => {
60
+ const { root } = await render(h("bs-switch", { size: size }));
61
+ const track = root.shadowRoot.querySelector('[part="track"]');
62
+ expect(track).toHaveClass(`bs-switch__track--${size}`);
63
+ });
64
+ });
65
+ it('renders label slot content', async () => {
66
+ const { root } = await render(h("bs-switch", null, "Enable notifications"));
67
+ expect(root).toHaveTextContent('Enable notifications');
68
+ const label = root.shadowRoot.querySelector('[part="label"]');
69
+ expect(label.querySelector('slot')).not.toBeNull();
70
+ });
71
+ });