@brandsync/wc 0.0.12 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (310) hide show
  1. package/custom-elements.json +1672 -226
  2. package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
  3. package/dist/brandsync-wc/p-00bb9bda.entry.js +1 -0
  4. package/dist/brandsync-wc/{p-64e2a7d7.entry.js → p-0847f5c0.entry.js} +1 -1
  5. package/dist/brandsync-wc/p-0ba35c3b.entry.js +1 -0
  6. package/dist/brandsync-wc/{p-2a65aabb.entry.js → p-0f3cb0c4.entry.js} +1 -1
  7. package/dist/brandsync-wc/{p-72a33f88.entry.js → p-10f6f3cd.entry.js} +1 -1
  8. package/dist/brandsync-wc/{p-88a0abee.entry.js → p-111974df.entry.js} +1 -1
  9. package/dist/brandsync-wc/{p-ef8522b5.entry.js → p-11f3fceb.entry.js} +1 -1
  10. package/dist/brandsync-wc/p-171fed0c.entry.js +1 -0
  11. package/dist/brandsync-wc/{p-57fdbb76.entry.js → p-18813680.entry.js} +1 -1
  12. package/dist/brandsync-wc/{p-f04db1b0.entry.js → p-1b7c9928.entry.js} +1 -1
  13. package/dist/brandsync-wc/p-1ce7dd64.entry.js +1 -0
  14. package/dist/brandsync-wc/p-2063a6d6.entry.js +1 -0
  15. package/dist/brandsync-wc/{p-1900f6ce.entry.js → p-20c24179.entry.js} +1 -1
  16. package/dist/brandsync-wc/{p-6e854e92.entry.js → p-321ed4d3.entry.js} +1 -1
  17. package/dist/brandsync-wc/{p-0eee5477.entry.js → p-38aad266.entry.js} +1 -1
  18. package/dist/brandsync-wc/{p-1c6fa697.entry.js → p-43e37883.entry.js} +1 -1
  19. package/dist/brandsync-wc/{p-8049f9f2.entry.js → p-55a8d4b5.entry.js} +1 -1
  20. package/dist/brandsync-wc/p-59ac2495.entry.js +1 -0
  21. package/dist/brandsync-wc/p-5ae9e60e.entry.js +1 -0
  22. package/dist/brandsync-wc/{p-8b662ee3.entry.js → p-6b469b2d.entry.js} +1 -1
  23. package/dist/brandsync-wc/{p-56c66448.entry.js → p-6d85fba4.entry.js} +1 -1
  24. package/dist/brandsync-wc/{p-46ddc8e1.entry.js → p-6e95eb36.entry.js} +1 -1
  25. package/dist/brandsync-wc/{p-20dbc6a1.entry.js → p-73217b90.entry.js} +1 -1
  26. package/dist/brandsync-wc/p-752c04c8.entry.js +1 -0
  27. package/dist/brandsync-wc/{p-12ec9e92.entry.js → p-79af762c.entry.js} +1 -1
  28. package/dist/brandsync-wc/p-81d49240.entry.js +1 -0
  29. package/dist/brandsync-wc/{p-3b31f7c7.entry.js → p-91551e7b.entry.js} +1 -1
  30. package/dist/brandsync-wc/p-917a5bbc.entry.js +1 -0
  31. package/dist/brandsync-wc/{p-dd09d335.entry.js → p-9876e83c.entry.js} +1 -1
  32. package/dist/brandsync-wc/{p-c320b6b4.entry.js → p-9bcd99aa.entry.js} +1 -1
  33. package/dist/brandsync-wc/{p-d4e3ca77.entry.js → p-9c4768aa.entry.js} +1 -1
  34. package/dist/brandsync-wc/{p-DST5-cTx.js → p-Do3l4of3.js} +2 -2
  35. package/dist/brandsync-wc/{p-0fa017ce.entry.js → p-aa43d478.entry.js} +1 -1
  36. package/dist/brandsync-wc/{p-a5b15061.entry.js → p-c3079ad7.entry.js} +1 -1
  37. package/dist/brandsync-wc/{p-23457a21.entry.js → p-c3c383dc.entry.js} +1 -1
  38. package/dist/brandsync-wc/{p-b24a980b.entry.js → p-cc79e75f.entry.js} +1 -1
  39. package/dist/brandsync-wc/p-ce7fc368.entry.js +1 -0
  40. package/dist/brandsync-wc/{p-2c51d738.entry.js → p-d3265e70.entry.js} +1 -1
  41. package/dist/brandsync-wc/p-d55bbcec.entry.js +1 -0
  42. package/dist/brandsync-wc/{p-1adc59be.entry.js → p-e93e944b.entry.js} +1 -1
  43. package/dist/brandsync-wc/{p-aba300a9.entry.js → p-eb04c578.entry.js} +1 -1
  44. package/dist/brandsync-wc/p-f0ae2740.entry.js +1 -0
  45. package/dist/brandsync-wc/p-f4f22015.entry.js +1 -0
  46. package/dist/cjs/brandsync-wc.cjs.js +2 -2
  47. package/dist/cjs/bs-ai-disclaimer.cjs.entry.js +2 -2
  48. package/dist/cjs/bs-ai-greeting.cjs.entry.js +2 -2
  49. package/dist/cjs/bs-ai-thinking.cjs.entry.js +2 -2
  50. package/dist/cjs/bs-attachment-list.cjs.entry.js +2 -2
  51. package/dist/cjs/bs-attachment.cjs.entry.js +1 -1
  52. package/dist/cjs/bs-avatar.cjs.entry.js +60 -0
  53. package/dist/cjs/bs-badge.cjs.entry.js +1 -1
  54. package/dist/cjs/bs-breadcrumb-overflow.cjs.entry.js +56 -0
  55. package/dist/cjs/bs-breadcrumb.cjs.entry.js +33 -0
  56. package/dist/cjs/bs-breadcrumbs.cjs.entry.js +49 -0
  57. package/dist/cjs/bs-button-skeleton.cjs.entry.js +2 -2
  58. package/dist/cjs/bs-button.cjs.entry.js +2 -2
  59. package/dist/cjs/bs-card.cjs.entry.js +10 -3
  60. package/dist/cjs/bs-chatbot-feedback.cjs.entry.js +2 -2
  61. package/dist/cjs/bs-chatbot-header.cjs.entry.js +2 -2
  62. package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +2 -2
  63. package/dist/cjs/bs-chatbot-sources-drawer.cjs.entry.js +2 -2
  64. package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +2 -2
  65. package/dist/cjs/bs-checkbox-skeleton.cjs.entry.js +20 -0
  66. package/dist/cjs/bs-checkbox.cjs.entry.js +2 -2
  67. package/dist/cjs/bs-composer-status-banner.cjs.entry.js +2 -2
  68. package/dist/cjs/bs-composer.cjs.entry.js +2 -2
  69. package/dist/cjs/bs-data-table.cjs.entry.js +3 -3
  70. package/dist/cjs/bs-dialog.cjs.entry.js +110 -0
  71. package/dist/cjs/bs-icon-button.cjs.entry.js +2 -2
  72. package/dist/cjs/bs-inline-tab.cjs.entry.js +2 -2
  73. package/dist/cjs/bs-input.cjs.entry.js +24 -12
  74. package/dist/cjs/bs-logo.cjs.entry.js +1 -1
  75. package/dist/cjs/{bs-menu_2.cjs.entry.js → bs-menu-item.cjs.entry.js} +2 -15
  76. package/dist/cjs/bs-menu.cjs.entry.js +17 -0
  77. package/dist/cjs/bs-navigation-drawer-item.cjs.entry.js +3 -3
  78. package/dist/cjs/bs-navigation-drawer.cjs.entry.js +8 -2
  79. package/dist/cjs/bs-navigation-header.cjs.entry.js +2 -2
  80. package/dist/cjs/bs-pagination.cjs.entry.js +85 -0
  81. package/dist/cjs/bs-radio.cjs.entry.js +2 -2
  82. package/dist/cjs/bs-slider.cjs.entry.js +2 -2
  83. package/dist/cjs/bs-snackbar.cjs.entry.js +41 -0
  84. package/dist/cjs/bs-source-link.cjs.entry.js +3 -3
  85. package/dist/cjs/bs-switch.cjs.entry.js +2 -2
  86. package/dist/cjs/bs-tab.cjs.entry.js +2 -2
  87. package/dist/cjs/bs-tabs.cjs.entry.js +2 -2
  88. package/dist/cjs/bs-tooltip.cjs.entry.js +2 -2
  89. package/dist/cjs/{index-B3sdhEGk.js → index-DHVw-IPK.js} +1 -0
  90. package/dist/cjs/loader.cjs.js +2 -2
  91. package/dist/collection/collection-manifest.json +8 -1
  92. package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.js +1 -1
  93. package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.js +1 -1
  94. package/dist/collection/components/bs-ai-thinking/bs-ai-thinking.js +1 -1
  95. package/dist/collection/components/bs-attachment-list/bs-attachment-list.js +1 -1
  96. package/dist/collection/components/bs-avatar/bs-avatar.cmp.test.js +54 -0
  97. package/dist/collection/components/bs-avatar/bs-avatar.css +197 -0
  98. package/dist/collection/components/bs-avatar/bs-avatar.js +251 -0
  99. package/dist/collection/components/bs-avatar/bs-avatar.stories.js +67 -0
  100. package/dist/collection/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.cmp.test.js +62 -0
  101. package/dist/collection/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.css +93 -0
  102. package/dist/collection/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.js +130 -0
  103. package/dist/collection/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.cmp.test.js +118 -0
  104. package/dist/collection/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.css +125 -0
  105. package/dist/collection/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.js +192 -0
  106. package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.cmp.test.js +58 -0
  107. package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.css +18 -0
  108. package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.js +129 -0
  109. package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.stories.js +84 -0
  110. package/dist/collection/components/bs-button/bs-button/bs-button.js +1 -1
  111. package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.js +1 -1
  112. package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +1 -1
  113. package/dist/collection/components/bs-card/bs-card.cmp.test.js +19 -0
  114. package/dist/collection/components/bs-card/bs-card.css +37 -5
  115. package/dist/collection/components/bs-card/bs-card.js +18 -2
  116. package/dist/collection/components/bs-card/bs-card.stories.js +17 -1
  117. package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.js +1 -1
  118. package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +1 -1
  119. package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +1 -1
  120. package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.css +1 -1
  121. package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.js +1 -1
  122. package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js +1 -1
  123. package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.cmp.test.js +23 -0
  124. package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.css +64 -0
  125. package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.js +81 -0
  126. package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.stories.js +25 -0
  127. package/dist/collection/components/bs-checkbox/bs-checkbox.js +1 -1
  128. package/dist/collection/components/bs-checkbox/bs-checkbox.stories.js +12 -0
  129. package/dist/collection/components/bs-composer/bs-composer.js +1 -1
  130. package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.js +1 -1
  131. package/dist/collection/components/bs-data-table/bs-data-table.js +2 -2
  132. package/dist/collection/components/{bs-modal/bs-modal.cmp.test.js → bs-dialog/bs-dialog.cmp.test.js} +63 -19
  133. package/dist/collection/components/bs-dialog/bs-dialog.css +130 -0
  134. package/dist/collection/components/bs-dialog/bs-dialog.js +273 -0
  135. package/dist/collection/components/bs-dialog/bs-dialog.stories.js +115 -0
  136. package/dist/collection/components/bs-input/bs-input.cmp.test.js +20 -0
  137. package/dist/collection/components/bs-input/bs-input.css +80 -2
  138. package/dist/collection/components/bs-input/bs-input.js +28 -10
  139. package/dist/collection/components/bs-input/bs-input.stories.js +14 -11
  140. package/dist/collection/components/bs-menu/bs-menu.js +1 -1
  141. package/dist/collection/components/bs-menu-item/bs-menu-item.js +1 -1
  142. package/dist/collection/components/bs-pagination/bs-pagination.cmp.test.js +102 -0
  143. package/dist/collection/components/bs-pagination/bs-pagination.css +120 -0
  144. package/dist/collection/components/bs-pagination/bs-pagination.js +233 -0
  145. package/dist/collection/components/bs-pagination/bs-pagination.stories.js +43 -0
  146. package/dist/collection/components/bs-radio/bs-radio.js +1 -1
  147. package/dist/collection/components/bs-slider/bs-slider.js +1 -1
  148. package/dist/collection/components/bs-snackbar/bs-snackbar.cmp.test.js +77 -0
  149. package/dist/collection/components/bs-snackbar/bs-snackbar.css +321 -0
  150. package/dist/collection/components/bs-snackbar/bs-snackbar.js +172 -0
  151. package/dist/collection/components/bs-snackbar/bs-snackbar.stories.js +59 -0
  152. package/dist/collection/components/bs-source-link/bs-source-link.js +2 -2
  153. package/dist/collection/components/bs-switch/bs-switch.js +1 -1
  154. package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +1 -1
  155. package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +1 -1
  156. package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +1 -1
  157. package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
  158. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.cmp.test.js +12 -0
  159. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.js +34 -6
  160. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.stories.js +74 -2
  161. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.css +5 -5
  162. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.js +1 -1
  163. package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.js +1 -1
  164. package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.stories.js +258 -1
  165. package/dist/components/bs-ai-disclaimer.js +1 -1
  166. package/dist/components/bs-ai-greeting.js +1 -1
  167. package/dist/components/bs-ai-thinking.js +1 -1
  168. package/dist/components/bs-attachment-list.js +1 -1
  169. package/dist/components/bs-attachment.js +1 -1
  170. package/dist/components/{bs-modal.d.ts → bs-avatar.d.ts} +4 -4
  171. package/dist/components/bs-avatar.js +1 -0
  172. package/dist/components/bs-badge.js +1 -1
  173. package/dist/components/bs-breadcrumb-overflow.d.ts +11 -0
  174. package/dist/components/bs-breadcrumb-overflow.js +1 -0
  175. package/dist/components/bs-breadcrumb.d.ts +11 -0
  176. package/dist/components/bs-breadcrumb.js +1 -0
  177. package/dist/components/bs-breadcrumbs.d.ts +11 -0
  178. package/dist/components/bs-breadcrumbs.js +1 -0
  179. package/dist/components/bs-button-skeleton.js +1 -1
  180. package/dist/components/bs-button.js +1 -1
  181. package/dist/components/bs-card.js +1 -1
  182. package/dist/components/bs-chatbot-feedback.js +1 -1
  183. package/dist/components/bs-chatbot-header.js +1 -1
  184. package/dist/components/bs-chatbot-response-action.js +1 -1
  185. package/dist/components/bs-chatbot-sources-drawer.js +1 -1
  186. package/dist/components/bs-chatbot-suggestion-button.js +1 -1
  187. package/dist/components/bs-checkbox-skeleton.d.ts +11 -0
  188. package/dist/components/bs-checkbox-skeleton.js +1 -0
  189. package/dist/components/bs-checkbox.js +1 -1
  190. package/dist/components/bs-composer-status-banner.js +1 -1
  191. package/dist/components/bs-composer.js +1 -1
  192. package/dist/components/bs-data-table.js +1 -1
  193. package/dist/components/bs-dialog.d.ts +11 -0
  194. package/dist/components/bs-dialog.js +1 -0
  195. package/dist/components/bs-icon-button.js +1 -1
  196. package/dist/components/bs-inline-tab.js +1 -1
  197. package/dist/components/bs-input.js +1 -1
  198. package/dist/components/bs-logo.js +1 -1
  199. package/dist/components/bs-menu-item.js +1 -1
  200. package/dist/components/bs-menu.js +1 -1
  201. package/dist/components/bs-navigation-drawer-item.js +1 -1
  202. package/dist/components/bs-navigation-drawer.js +1 -1
  203. package/dist/components/bs-navigation-header.js +1 -1
  204. package/dist/components/bs-pagination.d.ts +11 -0
  205. package/dist/components/bs-pagination.js +1 -0
  206. package/dist/components/bs-radio.js +1 -1
  207. package/dist/components/bs-slider.js +1 -1
  208. package/dist/components/bs-snackbar.d.ts +11 -0
  209. package/dist/components/bs-snackbar.js +1 -0
  210. package/dist/components/bs-source-link.js +1 -1
  211. package/dist/components/bs-switch.js +1 -1
  212. package/dist/components/bs-tab.js +1 -1
  213. package/dist/components/bs-tabs.js +1 -1
  214. package/dist/components/bs-tooltip.js +1 -1
  215. package/dist/components/index.js +1 -1
  216. package/dist/components/{p-BAOJc0V0.js → p-BFcVSpES.js} +1 -1
  217. package/dist/components/{p-Be1Pfcnm.js → p-BJZYe7M4.js} +1 -1
  218. package/dist/components/{p-CaWqTQBZ.js → p-BKaZWFE1.js} +1 -1
  219. package/dist/components/{p-DivZLd6i.js → p-BtX5URLk.js} +1 -1
  220. package/dist/components/{p-BqYyMGrB.js → p-CgaPcyEJ.js} +1 -1
  221. package/dist/components/{p-xfx69LQx.js → p-qK1XlpTA.js} +1 -1
  222. package/dist/esm/brandsync-wc.js +3 -3
  223. package/dist/esm/bs-ai-disclaimer.entry.js +2 -2
  224. package/dist/esm/bs-ai-greeting.entry.js +2 -2
  225. package/dist/esm/bs-ai-thinking.entry.js +2 -2
  226. package/dist/esm/bs-attachment-list.entry.js +2 -2
  227. package/dist/esm/bs-attachment.entry.js +1 -1
  228. package/dist/esm/bs-avatar.entry.js +58 -0
  229. package/dist/esm/bs-badge.entry.js +1 -1
  230. package/dist/esm/bs-breadcrumb-overflow.entry.js +54 -0
  231. package/dist/esm/bs-breadcrumb.entry.js +31 -0
  232. package/dist/esm/bs-breadcrumbs.entry.js +47 -0
  233. package/dist/esm/bs-button-skeleton.entry.js +2 -2
  234. package/dist/esm/bs-button.entry.js +2 -2
  235. package/dist/esm/bs-card.entry.js +10 -3
  236. package/dist/esm/bs-chatbot-feedback.entry.js +2 -2
  237. package/dist/esm/bs-chatbot-header.entry.js +2 -2
  238. package/dist/esm/bs-chatbot-response-action.entry.js +2 -2
  239. package/dist/esm/bs-chatbot-sources-drawer.entry.js +2 -2
  240. package/dist/esm/bs-chatbot-suggestion-button.entry.js +2 -2
  241. package/dist/esm/bs-checkbox-skeleton.entry.js +18 -0
  242. package/dist/esm/bs-checkbox.entry.js +2 -2
  243. package/dist/esm/bs-composer-status-banner.entry.js +2 -2
  244. package/dist/esm/bs-composer.entry.js +2 -2
  245. package/dist/esm/bs-data-table.entry.js +3 -3
  246. package/dist/esm/bs-dialog.entry.js +108 -0
  247. package/dist/esm/bs-icon-button.entry.js +2 -2
  248. package/dist/esm/bs-inline-tab.entry.js +2 -2
  249. package/dist/esm/bs-input.entry.js +24 -12
  250. package/dist/esm/bs-logo.entry.js +1 -1
  251. package/dist/esm/{bs-menu_2.entry.js → bs-menu-item.entry.js} +3 -15
  252. package/dist/esm/bs-menu.entry.js +15 -0
  253. package/dist/esm/bs-navigation-drawer-item.entry.js +3 -3
  254. package/dist/esm/bs-navigation-drawer.entry.js +8 -2
  255. package/dist/esm/bs-navigation-header.entry.js +2 -2
  256. package/dist/esm/bs-pagination.entry.js +83 -0
  257. package/dist/esm/bs-radio.entry.js +2 -2
  258. package/dist/esm/bs-slider.entry.js +2 -2
  259. package/dist/esm/bs-snackbar.entry.js +39 -0
  260. package/dist/esm/bs-source-link.entry.js +3 -3
  261. package/dist/esm/bs-switch.entry.js +2 -2
  262. package/dist/esm/bs-tab.entry.js +2 -2
  263. package/dist/esm/bs-tabs.entry.js +2 -2
  264. package/dist/esm/bs-tooltip.entry.js +2 -2
  265. package/dist/esm/{index-DST5-cTx.js → index-Do3l4of3.js} +1 -1
  266. package/dist/esm/loader.js +3 -3
  267. package/dist/types/components/bs-avatar/bs-avatar.d.ts +67 -0
  268. package/dist/types/components/bs-avatar/bs-avatar.stories.d.ts +20 -0
  269. package/dist/types/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.cmp.test.d.ts +1 -0
  270. package/dist/types/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.d.ts +44 -0
  271. package/dist/types/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.cmp.test.d.ts +1 -0
  272. package/dist/types/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.d.ts +69 -0
  273. package/dist/types/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.cmp.test.d.ts +1 -0
  274. package/dist/types/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.d.ts +45 -0
  275. package/dist/types/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.stories.d.ts +14 -0
  276. package/dist/types/components/bs-card/bs-card.d.ts +10 -1
  277. package/dist/types/components/bs-card/bs-card.stories.d.ts +1 -0
  278. package/dist/types/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.cmp.test.d.ts +1 -0
  279. package/dist/types/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.d.ts +36 -0
  280. package/dist/types/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.stories.d.ts +10 -0
  281. package/dist/types/components/bs-checkbox/bs-checkbox.stories.d.ts +1 -0
  282. package/dist/types/components/bs-dialog/bs-dialog.cmp.test.d.ts +1 -0
  283. package/dist/types/components/bs-dialog/bs-dialog.d.ts +74 -0
  284. package/dist/types/components/{bs-modal/bs-modal.stories.d.ts → bs-dialog/bs-dialog.stories.d.ts} +5 -3
  285. package/dist/types/components/bs-input/bs-input.d.ts +8 -1
  286. package/dist/types/components/bs-pagination/bs-pagination.cmp.test.d.ts +1 -0
  287. package/dist/types/components/bs-pagination/bs-pagination.d.ts +51 -0
  288. package/dist/types/components/bs-pagination/bs-pagination.stories.d.ts +14 -0
  289. package/dist/types/components/bs-snackbar/bs-snackbar.cmp.test.d.ts +1 -0
  290. package/dist/types/components/bs-snackbar/bs-snackbar.d.ts +51 -0
  291. package/dist/types/components/bs-snackbar/bs-snackbar.stories.d.ts +16 -0
  292. package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.d.ts +13 -5
  293. package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.stories.d.ts +3 -0
  294. package/dist/types/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.stories.d.ts +4 -0
  295. package/dist/types/components.d.ts +1109 -104
  296. package/package.json +1 -1
  297. package/dist/brandsync-wc/p-09aa03d1.entry.js +0 -1
  298. package/dist/brandsync-wc/p-1cf715aa.entry.js +0 -1
  299. package/dist/brandsync-wc/p-266f5dde.entry.js +0 -1
  300. package/dist/brandsync-wc/p-8ded1eb6.entry.js +0 -1
  301. package/dist/brandsync-wc/p-b289450a.entry.js +0 -1
  302. package/dist/brandsync-wc/p-b8a2f882.entry.js +0 -1
  303. package/dist/cjs/bs-modal.cjs.entry.js +0 -69
  304. package/dist/collection/components/bs-modal/bs-modal.css +0 -66
  305. package/dist/collection/components/bs-modal/bs-modal.js +0 -198
  306. package/dist/collection/components/bs-modal/bs-modal.stories.js +0 -38
  307. package/dist/components/bs-modal.js +0 -1
  308. package/dist/esm/bs-modal.entry.js +0 -67
  309. package/dist/types/components/bs-modal/bs-modal.d.ts +0 -45
  310. /package/dist/types/components/{bs-modal/bs-modal.cmp.test.d.ts → bs-avatar/bs-avatar.cmp.test.d.ts} +0 -0
@@ -97,26 +97,27 @@ export const Required = {
97
97
  args: { required: true },
98
98
  };
99
99
  export const Search = {
100
- render: () => html `<bs-input type="search" label="Search" placeholder="Search..."></bs-input>`,
100
+ render: args => html `<bs-input type="search" label="Search" placeholder="Search..." error=${args.error}></bs-input>`,
101
101
  };
102
102
  export const NumberInput = {
103
103
  name: 'Number',
104
- render: () => html `<bs-input type="number" label="Quantity" value="1" min="0" max="10" step="1"></bs-input>`,
104
+ render: args => html `<bs-input type="number" label="Quantity" value="1" min="0" max="10" step="1" error=${args.error}></bs-input>`,
105
105
  };
106
106
  export const Password = {
107
- render: () => html `<bs-input type="password" label="Password" placeholder="Enter your password"></bs-input>`,
107
+ render: args => html `<bs-input type="password" label="Password" placeholder="Enter your password" error=${args.error}></bs-input>`,
108
108
  };
109
109
  export const DateInput = {
110
110
  name: 'Date',
111
- render: () => html `<bs-input type="date" label="Date of birth"></bs-input>`,
111
+ render: args => html `<bs-input type="date" label="Date of birth" error=${args.error}></bs-input>`,
112
112
  };
113
113
  export const Dropdown = {
114
- render: () => html `
114
+ render: args => html `
115
115
  <bs-input
116
116
  type="dropdown"
117
117
  label="Country"
118
118
  placeholder="Select a country"
119
119
  value="Denmark"
120
+ error=${args.error}
120
121
  .options=${[
121
122
  { label: 'Denmark', value: 'dk' },
122
123
  { label: 'Sweden', value: 'se' },
@@ -126,10 +127,11 @@ export const Dropdown = {
126
127
  `,
127
128
  };
128
129
  export const Select = {
129
- render: () => html `
130
+ render: args => html `
130
131
  <bs-input
131
132
  type="select"
132
133
  label="Role"
134
+ error=${args.error}
133
135
  .options=${[
134
136
  { label: 'Admin', value: 'admin' },
135
137
  { label: 'Editor', value: 'editor' },
@@ -140,19 +142,20 @@ export const Select = {
140
142
  };
141
143
  export const TextArea = {
142
144
  name: 'Text area',
143
- render: () => html `<bs-input type="textarea" label="Comments" rows="4" placeholder="Type your comments here..."></bs-input>`,
145
+ render: args => html `<bs-input type="textarea" label="Comments" rows="4" placeholder="Type your comments here..." error=${args.error}></bs-input>`,
144
146
  };
145
147
  export const Chip = {
146
- render: () => html `<bs-input type="chip" label="Tags" .chips=${['design', 'frontend']} placeholder="Add a tag..."></bs-input>`,
148
+ render: args => html `<bs-input type="chip" label="Tags" .chips=${['design', 'frontend']} placeholder="Add a tag..." error=${args.error}></bs-input>`,
147
149
  };
148
150
  export const Initials = {
149
- render: () => html `<bs-input type="initials" label="Name" .titleOptions=${['Mrs.', 'Mr.', 'Dr.']} placeholder="Full name"></bs-input>`,
151
+ render: args => html `<bs-input type="initials" label="Name" .titleOptions=${['Mrs.', 'Mr.', 'Dr.']} placeholder="Full name" error=${args.error}></bs-input>`,
150
152
  };
151
153
  export const Country = {
152
- render: () => html `
154
+ render: args => html `
153
155
  <bs-input
154
156
  type="country"
155
157
  label="Phone number"
158
+ error=${args.error}
156
159
  .countryOptions=${[
157
160
  { code: 'DK', label: 'Denmark' },
158
161
  { code: 'US', label: 'United States' },
@@ -163,5 +166,5 @@ export const Country = {
163
166
  `,
164
167
  };
165
168
  export const Pin = {
166
- render: () => html `<bs-input type="pin" label="Verification code" length="4"></bs-input>`,
169
+ render: args => html `<bs-input type="pin" label="Verification code" length="4" error=${args.error}></bs-input>`,
167
170
  };
@@ -22,7 +22,7 @@ import { h } from "@stencil/core";
22
22
  */
23
23
  export class BsMenu {
24
24
  render() {
25
- return (h("div", { key: 'b39f37927ff53201d71b40612720ceb8bb0eda27', part: "list", class: "bs-menu", role: "menu" }, h("slot", { key: 'b6a89f46892cf4e204edc58fe61ab69837514571' })));
25
+ return (h("div", { key: 'bc71082acfa568690283c2ec3b63aae4a20324a5', part: "list", class: "bs-menu", role: "menu" }, h("slot", { key: 'febe3b20843441e630d68a215191f2b73b3aab20' })));
26
26
  }
27
27
  static get is() { return "bs-menu"; }
28
28
  static get encapsulation() { return "shadow"; }
@@ -47,7 +47,7 @@ export class BsMenuItem {
47
47
  this.bsSelect.emit();
48
48
  };
49
49
  render() {
50
- return (h("button", { key: '1ca79f8c38bb2d8b4dc0d6edfaeafa4b7be1aee9', type: "button", part: "item", role: "menuitem", class: `bs-menu-item ${this.disabled ? 'bs-menu-item--disabled' : ''}`, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : undefined, onClick: this.onClick }, h("span", { key: '2efc2485a3ae52e3ee5ca4b622ca853aa6ce8abf', part: "icon", class: `bs-menu-item__icon ${this.hasIcon ? 'bs-menu-item__icon--has-content' : ''}` }, h("slot", { key: '8e426c1974fd8c9d1bd6fb97eb62ccb8e1770f05', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '2b799a8cfc0a546b53cbe2f65847b255e53b4dcc', part: "label", class: "bs-menu-item__label" }, h("slot", { key: '0babde24dcc1265ef9a9e1517701c913a70a6f78' }))));
50
+ return (h("button", { key: 'c9334385fe956335f2ed9d55338a2198f16f1712', type: "button", part: "item", role: "menuitem", class: `bs-menu-item ${this.disabled ? 'bs-menu-item--disabled' : ''}`, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : undefined, onClick: this.onClick }, h("span", { key: 'a00e7ce2d8d632442736d975149a6d7b449779bb', part: "icon", class: `bs-menu-item__icon ${this.hasIcon ? 'bs-menu-item__icon--has-content' : ''}` }, h("slot", { key: '568de93e2c15385c3244cb79cba8b0982d9469b0', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '85954b9c36d0418af5468a7514ca3e0d2d51619c', part: "label", class: "bs-menu-item__label" }, h("slot", { key: '72d5df4c8c3201418e634ffb28a80b3830ca2a65' }))));
51
51
  }
52
52
  static get is() { return "bs-menu-item"; }
53
53
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,102 @@
1
+ import { render, h, describe, it, expect } from "@stencil/vitest";
2
+ describe('bs-pagination', () => {
3
+ it('defaults to page 1 of 1', async () => {
4
+ const { root } = await render(h("bs-pagination", null));
5
+ expect(root).toEqualAttribute('current-page', '1');
6
+ const pages = root.shadowRoot.querySelectorAll('[part~="page"]');
7
+ expect(pages.length).toBe(1);
8
+ expect(pages[0]).toHaveTextContent('1');
9
+ });
10
+ it('matches the Figma spec exactly: page 1 of 12 shows 1 2 3 ... 12', async () => {
11
+ const { root } = await render(h("bs-pagination", { totalPages: 12, currentPage: 1 }));
12
+ const items = Array.from(root.shadowRoot.querySelectorAll('[part="list"] > li')).map(li => li.textContent.trim());
13
+ // First and last <li> are the prev/next buttons (no text content, icon-only).
14
+ expect(items).toEqual(['', '1', '2', '3', '', '12', '']);
15
+ });
16
+ it('renders every page number with no ellipsis when totalPages is small', async () => {
17
+ const { root } = await render(h("bs-pagination", { totalPages: 5, currentPage: 1 }));
18
+ expect(root.shadowRoot.querySelectorAll('[part="ellipsis"]').length).toBe(0);
19
+ const pages = Array.from(root.shadowRoot.querySelectorAll('[part~="page"]')).map(el => el.textContent.trim());
20
+ expect(pages).toEqual(['1', '2', '3', '4', '5']);
21
+ });
22
+ it('shows both ellipses when the current page is in the middle', async () => {
23
+ const { root } = await render(h("bs-pagination", { totalPages: 12, currentPage: 6 }));
24
+ expect(root.shadowRoot.querySelectorAll('[part="ellipsis"]').length).toBe(2);
25
+ const pages = Array.from(root.shadowRoot.querySelectorAll('[part~="page"]')).map(el => el.textContent.trim());
26
+ expect(pages).toEqual(['1', '5', '6', '7', '12']);
27
+ });
28
+ it('shows only a leading ellipsis when the current page is near the end', async () => {
29
+ const { root } = await render(h("bs-pagination", { totalPages: 12, currentPage: 12 }));
30
+ const pages = Array.from(root.shadowRoot.querySelectorAll('[part~="page"]')).map(el => el.textContent.trim());
31
+ expect(pages).toEqual(['1', '10', '11', '12']);
32
+ expect(root.shadowRoot.querySelectorAll('[part="ellipsis"]').length).toBe(1);
33
+ });
34
+ it('marks the current page with aria-current and the "current" part', async () => {
35
+ const { root } = await render(h("bs-pagination", { totalPages: 3, currentPage: 2 }));
36
+ const current = root.shadowRoot.querySelector('[part~="current"]');
37
+ expect(current).not.toBeNull();
38
+ expect(current).toEqualAttribute('aria-current', 'page');
39
+ expect(current.textContent.trim()).toBe('2');
40
+ });
41
+ it('disables the previous button on the first page and the next button on the last page', async () => {
42
+ const { root } = await render(h("bs-pagination", { totalPages: 3, currentPage: 1 }));
43
+ expect(root.shadowRoot.querySelector('[part="prev"]')).toHaveAttribute('disabled');
44
+ expect(root.shadowRoot.querySelector('[part="next"]')).not.toHaveAttribute('disabled');
45
+ });
46
+ it('updates currentPage and emits bsPageChange when a page button is clicked', async () => {
47
+ const { root, spyOnEvent, waitForChanges } = await render(h("bs-pagination", { totalPages: 3, currentPage: 1 }));
48
+ const changeSpy = spyOnEvent('bsPageChange');
49
+ const pageButtons = root.shadowRoot.querySelectorAll('[part~="page"]');
50
+ pageButtons[1].click();
51
+ await waitForChanges();
52
+ expect(root).toEqualAttribute('current-page', '2');
53
+ expect(changeSpy).toHaveReceivedEventDetail(2);
54
+ });
55
+ it('advances/retreats a page via the next/prev buttons and emits bsPageChange', async () => {
56
+ const { root, spyOnEvent, waitForChanges } = await render(h("bs-pagination", { totalPages: 3, currentPage: 2 }));
57
+ const changeSpy = spyOnEvent('bsPageChange');
58
+ root.shadowRoot.querySelector('[part="next"]').click();
59
+ await waitForChanges();
60
+ expect(root).toEqualAttribute('current-page', '3');
61
+ expect(changeSpy).toHaveReceivedEventDetail(3);
62
+ root.shadowRoot.querySelector('[part="prev"]').click();
63
+ await waitForChanges();
64
+ expect(root).toEqualAttribute('current-page', '2');
65
+ expect(changeSpy).toHaveReceivedEventDetail(2);
66
+ });
67
+ it('does not emit bsPageChange when clicking the already-current page', async () => {
68
+ const { root, spyOnEvent, waitForChanges } = await render(h("bs-pagination", { totalPages: 3, currentPage: 2 }));
69
+ const changeSpy = spyOnEvent('bsPageChange');
70
+ const current = root.shadowRoot.querySelector('[part~="current"]');
71
+ current.click();
72
+ await waitForChanges();
73
+ expect(changeSpy).toHaveReceivedEventTimes(0);
74
+ });
75
+ describe('invalid input hardening', () => {
76
+ it('falls back to the default siblingCount when the attribute is an empty string', async () => {
77
+ // Reproduces a real bug: a Storybook control left unset produced `sibling-count=""` (Stencil
78
+ // can't parse that as a number), which corrupted the page list into two adjacent `...`s with
79
+ // pages 2/3 missing entirely, instead of falling back to siblingCount's own default of 1.
80
+ const container = document.createElement('div');
81
+ container.innerHTML = '<bs-pagination total-pages="12" current-page="1" sibling-count=""></bs-pagination>';
82
+ document.body.appendChild(container);
83
+ const el = container.querySelector('bs-pagination');
84
+ await new Promise(resolve => requestAnimationFrame(resolve));
85
+ await new Promise(resolve => requestAnimationFrame(resolve));
86
+ const pages = Array.from(el.shadowRoot.querySelectorAll('[part~="page"]')).map(node => node.textContent.trim());
87
+ expect(pages).toEqual(['1', '2', '3', '12']);
88
+ expect(el.shadowRoot.querySelectorAll('[part="ellipsis"]').length).toBe(1);
89
+ container.remove();
90
+ });
91
+ it('treats a non-finite totalPages as 1 rather than producing NaN comparisons', async () => {
92
+ const { root } = await render(h("bs-pagination", { totalPages: NaN, currentPage: 1 }));
93
+ const pages = Array.from(root.shadowRoot.querySelectorAll('[part~="page"]')).map(el => el.textContent.trim());
94
+ expect(pages).toEqual(['1']);
95
+ });
96
+ });
97
+ it('reflects custom previousLabel/nextLabel as aria-label', async () => {
98
+ const { root } = await render(h("bs-pagination", { previousLabel: "Go back", nextLabel: "Go forward" }));
99
+ expect(root.shadowRoot.querySelector('[part="prev"]')).toEqualAttribute('aria-label', 'Go back');
100
+ expect(root.shadowRoot.querySelector('[part="next"]')).toEqualAttribute('aria-label', 'Go forward');
101
+ });
102
+ });
@@ -0,0 +1,120 @@
1
+ /**
2
+ * @prop --bs-pagination-gap: Gap between items. Aliased to --bs-spacing-50.
3
+ * @prop --bs-pagination-size: Width/height of each control (prev/next/page/ellipsis). Aliased to --bs-spacing-550 (44px, exact match to Figma).
4
+ * @prop --bs-pagination-radius: Corner radius of each control. Aliased to --bs-border-radius-100.
5
+ * @prop --bs-pagination-font-size: Aliased to --bs-font-size-md.
6
+ * @prop --bs-pagination-line-height: Aliased to --bs-line-height-body-md.
7
+ * @prop --bs-pagination-color: Icon/page-number color, unselected. Aliased to --bs-text-secondary.
8
+ * @prop --bs-pagination-color-disabled: Prev/next icon color when at the first/last page. Aliased to --bs-icon-disabled.
9
+ * @prop --bs-pagination-hover: Background of an unselected page button on hover. Aliased to --bs-color-neutral-container-hover.
10
+ * @prop --bs-pagination-pressed: Background of an unselected page button when pressed. Aliased to --bs-color-neutral-container-pressed.
11
+ * @prop --bs-pagination-current-bg: Background of the current page's button. Aliased to --bs-color-primary-default.
12
+ * @prop --bs-pagination-current-bg-hover: Background of the current page's button on hover. Aliased to --bs-color-primary-hover.
13
+ * @prop --bs-pagination-current-bg-pressed: Background of the current page's button when pressed. Aliased to --bs-color-primary-pressed.
14
+ * @prop --bs-pagination-current-color: Text color of the current page's button. Aliased to --bs-text-on-action.
15
+ * @prop --bs-pagination-focus-ring-color: Focus ring color. Aliased to --bs-border-neutral-focus.
16
+ */
17
+ :host {
18
+ display: inline-block;
19
+
20
+ --bs-pagination-gap: var(--bs-spacing-50);
21
+ --bs-pagination-size: var(--bs-spacing-550);
22
+ --bs-pagination-radius: var(--bs-border-radius-100);
23
+
24
+ --bs-pagination-font-size: var(--bs-font-size-md);
25
+ --bs-pagination-line-height: var(--bs-line-height-body-md);
26
+
27
+ --bs-pagination-color: var(--bs-text-secondary);
28
+ --bs-pagination-color-disabled: var(--bs-icon-disabled);
29
+ --bs-pagination-hover: var(--bs-color-neutral-container-hover);
30
+ --bs-pagination-pressed: var(--bs-color-neutral-container-pressed);
31
+
32
+ --bs-pagination-current-bg: var(--bs-color-primary-default);
33
+ --bs-pagination-current-bg-hover: var(--bs-color-primary-hover);
34
+ --bs-pagination-current-bg-pressed: var(--bs-color-primary-pressed);
35
+ --bs-pagination-current-color: var(--bs-text-on-action);
36
+
37
+ --bs-pagination-focus-ring-color: var(--bs-border-neutral-focus);
38
+ }
39
+
40
+ .bs-pagination__list {
41
+ display: flex;
42
+ align-items: center;
43
+ flex-wrap: wrap;
44
+ margin: 0;
45
+ padding: 0;
46
+ list-style: none;
47
+ gap: var(--bs-pagination-gap);
48
+ font-family: inherit;
49
+ }
50
+
51
+ .bs-pagination__item {
52
+ display: flex;
53
+ }
54
+
55
+ .bs-pagination__control {
56
+ display: flex;
57
+ align-items: center;
58
+ justify-content: center;
59
+ width: var(--bs-pagination-size);
60
+ height: var(--bs-pagination-size);
61
+ padding: 0;
62
+ border: none;
63
+ border-radius: var(--bs-pagination-radius);
64
+ background: transparent;
65
+ color: var(--bs-pagination-color);
66
+ font-family: inherit;
67
+ font-size: var(--bs-pagination-font-size);
68
+ line-height: calc(var(--bs-pagination-line-height) * 1px);
69
+ cursor: pointer;
70
+ }
71
+
72
+ .bs-pagination__control svg {
73
+ width: 24px;
74
+ height: 24px;
75
+ }
76
+
77
+ .bs-pagination__control:disabled {
78
+ color: var(--bs-pagination-color-disabled);
79
+ cursor: not-allowed;
80
+ }
81
+
82
+ .bs-pagination__page:not(:disabled):hover {
83
+ background: var(--bs-pagination-hover);
84
+ }
85
+
86
+ .bs-pagination__page:not(:disabled):active {
87
+ background: var(--bs-pagination-pressed);
88
+ }
89
+
90
+ .bs-pagination__control:focus-visible {
91
+ outline: 2px solid var(--bs-pagination-focus-ring-color);
92
+ outline-offset: 2px;
93
+ }
94
+
95
+ .bs-pagination__page--current {
96
+ background: var(--bs-pagination-current-bg);
97
+ color: var(--bs-pagination-current-color);
98
+ }
99
+
100
+ .bs-pagination__page--current:hover {
101
+ background: var(--bs-pagination-current-bg-hover);
102
+ }
103
+
104
+ .bs-pagination__page--current:active {
105
+ background: var(--bs-pagination-current-bg-pressed);
106
+ }
107
+
108
+ .bs-pagination__ellipsis {
109
+ display: flex;
110
+ align-items: center;
111
+ justify-content: center;
112
+ width: var(--bs-pagination-size);
113
+ height: var(--bs-pagination-size);
114
+ color: var(--bs-pagination-color);
115
+ }
116
+
117
+ .bs-pagination__ellipsis svg {
118
+ width: 24px;
119
+ height: 24px;
120
+ }
@@ -0,0 +1,233 @@
1
+ import { h } from "@stencil/core";
2
+ /**
3
+ * A numbered page control -- previous/next chevrons, page-number buttons, and `...` overflow for
4
+ * large page counts. Matches the Figma "Pagination" component's "Default" type (the classic
5
+ * numbered pagination); its other type ("jumper" -- a rows-per-page dropdown plus a page-jump
6
+ * input) is a structurally different composite widget and isn't covered by this component.
7
+ *
8
+ * `totalPages`/`currentPage` drive everything -- this computes which page numbers to show and
9
+ * where to collapse into `...` itself, the consumer never builds the button list by hand.
10
+ *
11
+ * ## When to use
12
+ * - Paging through a large, ordered result set (a table, a search results list) where jumping
13
+ * directly to a specific page number is useful.
14
+ *
15
+ * ## When not to use
16
+ * - Infinite-scroll or "load more" patterns -- those don't have a fixed, addressable page number.
17
+ * - A huge page count where users realistically only ever go forward/back one page at a time --
18
+ * plain prev/next controls (no numbers) are simpler there.
19
+ *
20
+ * @part list - The `<ul>` element.
21
+ * @part item - Each `<li>` in the list.
22
+ * @part prev - The previous-page button.
23
+ * @part next - The next-page button.
24
+ * @part page - Each page-number button.
25
+ * @part current - The current page's button (in addition to `page`).
26
+ * @part ellipsis - Each collapsed-range indicator.
27
+ */
28
+ export class BsPagination {
29
+ /** Total number of pages. Must be a positive integer -- there's always at least one page. */
30
+ totalPages = 1;
31
+ /** The active page (1-indexed). Mutable + reflected so clicking a page button updates it
32
+ * directly, the same way `bs-modal`'s `open` self-manages, while `bsPageChange` still fires for
33
+ * the consumer to react to (e.g. fetching that page's data). */
34
+ currentPage = 1;
35
+ /** How many page numbers to show on each side of the current page before collapsing the rest
36
+ * into `...`. `1` (the default) reproduces the Figma spec's example exactly (page 1 of 12 shows
37
+ * `1 2 3 ... 12`). */
38
+ siblingCount = 1;
39
+ /** Accessible name for the previous-page button. */
40
+ previousLabel = 'Previous page';
41
+ /** Accessible name for the next-page button. */
42
+ nextLabel = 'Next page';
43
+ /** Fires whenever the active page changes as a result of the user clicking a page/prev/next
44
+ * button -- not when `currentPage` is set programmatically from outside. */
45
+ bsPageChange;
46
+ // Defends against any non-finite/negative input reaching the render/list-building logic below --
47
+ // e.g. an HTML attribute that failed to parse as a number resolves to an empty string, which
48
+ // Stencil can't coerce into a valid `number` prop, leaving it `undefined`/`null` rather than
49
+ // falling back to the class field's own default. `undefined * 2` is `NaN`, which silently
50
+ // corrupted every comparison in `getPageList` (confirmed: it rendered as two adjacent `...`s with
51
+ // pages 2/3 missing, not a crash) -- exactly the kind of quiet, hard-to-notice breakage a boundary
52
+ // check here prevents outright. Computed once and reused by both `getPageList` and `render`'s
53
+ // disabled checks, rather than repeating the same fallback logic in two places.
54
+ get safeTotalPages() {
55
+ return Number.isFinite(this.totalPages) && this.totalPages >= 1 ? this.totalPages : 1;
56
+ }
57
+ get safeSiblingCount() {
58
+ return Number.isFinite(this.siblingCount) && this.siblingCount >= 0 ? this.siblingCount : 1;
59
+ }
60
+ goToPage(page) {
61
+ if (page === this.currentPage || page < 1 || page > this.safeTotalPages)
62
+ return;
63
+ this.currentPage = page;
64
+ this.bsPageChange.emit(page);
65
+ }
66
+ getPageList() {
67
+ const { currentPage } = this;
68
+ const totalPages = this.safeTotalPages;
69
+ const siblingCount = this.safeSiblingCount;
70
+ const totalNumbersToShowBeforeCollapsing = siblingCount * 2 + 5;
71
+ if (totalNumbersToShowBeforeCollapsing >= totalPages) {
72
+ return range(1, totalPages);
73
+ }
74
+ const leftSiblingIndex = Math.max(currentPage - siblingCount, 1);
75
+ const rightSiblingIndex = Math.min(currentPage + siblingCount, totalPages);
76
+ const showLeftEllipsis = leftSiblingIndex > 2;
77
+ const showRightEllipsis = rightSiblingIndex < totalPages - 1;
78
+ if (!showLeftEllipsis && showRightEllipsis) {
79
+ const leftItemCount = siblingCount * 2 + 1;
80
+ return [...range(1, leftItemCount), 'ellipsis', totalPages];
81
+ }
82
+ if (showLeftEllipsis && !showRightEllipsis) {
83
+ const rightItemCount = siblingCount * 2 + 1;
84
+ return [1, 'ellipsis', ...range(totalPages - rightItemCount + 1, totalPages)];
85
+ }
86
+ return [1, 'ellipsis', ...range(leftSiblingIndex, rightSiblingIndex), 'ellipsis', totalPages];
87
+ }
88
+ render() {
89
+ const pageList = this.getPageList();
90
+ return (h("nav", { key: '5c11c5d41a0ea748a6564dd6afe95acd1e1f7233', "aria-label": "Pagination" }, h("ul", { key: 'bbb88ec648d773e31cdfb5afadba74f465510acb', part: "list", class: "bs-pagination__list" }, h("li", { key: '7eb6c6c6b4e4f129d1b0ad09d6ad33bd1e529c39', part: "item", class: "bs-pagination__item" }, h("button", { key: '1b30bbf87077802e5fb70d0b5d5bde9b1556efbe', part: "prev", type: "button", class: "bs-pagination__control", "aria-label": this.previousLabel, disabled: this.currentPage <= 1, onClick: () => this.goToPage(this.currentPage - 1) }, h(ChevronLeftIcon, { key: 'e5f834332744d5caace2ff2da50dc9ea0fad6c51' }))), pageList.map((item, index) => item === 'ellipsis' ? (h("li", { part: "item", class: "bs-pagination__item", key: `ellipsis-${index}` }, h("span", { part: "ellipsis", class: "bs-pagination__ellipsis", "aria-hidden": "true" }, h(EllipsisIcon, null)))) : (h("li", { part: "item", class: "bs-pagination__item", key: item }, h("button", { part: item === this.currentPage ? 'page current' : 'page', type: "button", class: `bs-pagination__control bs-pagination__page ${item === this.currentPage ? 'bs-pagination__page--current' : ''}`, "aria-label": `Go to page ${item}`, "aria-current": item === this.currentPage ? 'page' : undefined, onClick: () => this.goToPage(item) }, item)))), h("li", { key: '5e52c579ff5c2501470af0749f44dddf97bf268c', part: "item", class: "bs-pagination__item" }, h("button", { key: '6ae764d141460b432834dc79be6e094149e6f7c5', part: "next", type: "button", class: "bs-pagination__control", "aria-label": this.nextLabel, disabled: this.currentPage >= this.safeTotalPages, onClick: () => this.goToPage(this.currentPage + 1) }, h(ChevronRightIcon, { key: 'c4e25fa5b69848ca35b9e907b0f90d0a2d8fbf14' }))))));
91
+ }
92
+ static get is() { return "bs-pagination"; }
93
+ static get encapsulation() { return "shadow"; }
94
+ static get originalStyleUrls() {
95
+ return {
96
+ "$": ["bs-pagination.css"]
97
+ };
98
+ }
99
+ static get styleUrls() {
100
+ return {
101
+ "$": ["bs-pagination.css"]
102
+ };
103
+ }
104
+ static get properties() {
105
+ return {
106
+ "totalPages": {
107
+ "type": "number",
108
+ "mutable": false,
109
+ "complexType": {
110
+ "original": "number",
111
+ "resolved": "number",
112
+ "references": {}
113
+ },
114
+ "required": false,
115
+ "optional": false,
116
+ "docs": {
117
+ "tags": [],
118
+ "text": "Total number of pages. Must be a positive integer -- there's always at least one page."
119
+ },
120
+ "getter": false,
121
+ "setter": false,
122
+ "reflect": false,
123
+ "attribute": "total-pages",
124
+ "defaultValue": "1"
125
+ },
126
+ "currentPage": {
127
+ "type": "number",
128
+ "mutable": true,
129
+ "complexType": {
130
+ "original": "number",
131
+ "resolved": "number",
132
+ "references": {}
133
+ },
134
+ "required": false,
135
+ "optional": false,
136
+ "docs": {
137
+ "tags": [],
138
+ "text": "The active page (1-indexed). Mutable + reflected so clicking a page button updates it\ndirectly, the same way `bs-modal`'s `open` self-manages, while `bsPageChange` still fires for\nthe consumer to react to (e.g. fetching that page's data)."
139
+ },
140
+ "getter": false,
141
+ "setter": false,
142
+ "reflect": true,
143
+ "attribute": "current-page",
144
+ "defaultValue": "1"
145
+ },
146
+ "siblingCount": {
147
+ "type": "number",
148
+ "mutable": false,
149
+ "complexType": {
150
+ "original": "number",
151
+ "resolved": "number",
152
+ "references": {}
153
+ },
154
+ "required": false,
155
+ "optional": false,
156
+ "docs": {
157
+ "tags": [],
158
+ "text": "How many page numbers to show on each side of the current page before collapsing the rest\ninto `...`. `1` (the default) reproduces the Figma spec's example exactly (page 1 of 12 shows\n`1 2 3 ... 12`)."
159
+ },
160
+ "getter": false,
161
+ "setter": false,
162
+ "reflect": false,
163
+ "attribute": "sibling-count",
164
+ "defaultValue": "1"
165
+ },
166
+ "previousLabel": {
167
+ "type": "string",
168
+ "mutable": false,
169
+ "complexType": {
170
+ "original": "string",
171
+ "resolved": "string",
172
+ "references": {}
173
+ },
174
+ "required": false,
175
+ "optional": false,
176
+ "docs": {
177
+ "tags": [],
178
+ "text": "Accessible name for the previous-page button."
179
+ },
180
+ "getter": false,
181
+ "setter": false,
182
+ "reflect": false,
183
+ "attribute": "previous-label",
184
+ "defaultValue": "'Previous page'"
185
+ },
186
+ "nextLabel": {
187
+ "type": "string",
188
+ "mutable": false,
189
+ "complexType": {
190
+ "original": "string",
191
+ "resolved": "string",
192
+ "references": {}
193
+ },
194
+ "required": false,
195
+ "optional": false,
196
+ "docs": {
197
+ "tags": [],
198
+ "text": "Accessible name for the next-page button."
199
+ },
200
+ "getter": false,
201
+ "setter": false,
202
+ "reflect": false,
203
+ "attribute": "next-label",
204
+ "defaultValue": "'Next page'"
205
+ }
206
+ };
207
+ }
208
+ static get events() {
209
+ return [{
210
+ "method": "bsPageChange",
211
+ "name": "bsPageChange",
212
+ "bubbles": true,
213
+ "cancelable": true,
214
+ "composed": true,
215
+ "docs": {
216
+ "tags": [],
217
+ "text": "Fires whenever the active page changes as a result of the user clicking a page/prev/next\nbutton -- not when `currentPage` is set programmatically from outside."
218
+ },
219
+ "complexType": {
220
+ "original": "number",
221
+ "resolved": "number",
222
+ "references": {}
223
+ }
224
+ }];
225
+ }
226
+ }
227
+ function range(start, end) {
228
+ const length = end - start + 1;
229
+ return Array.from({ length }, (_, i) => start + i);
230
+ }
231
+ const ChevronLeftIcon = () => (h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M15 18L9 12L15 6", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })));
232
+ const ChevronRightIcon = () => (h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M9 18L15 12L9 6", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })));
233
+ const EllipsisIcon = () => (h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M19 13C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11C18.4477 11 18 11.4477 18 12C18 12.5523 18.4477 13 19 13Z", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M5 13C5.55228 13 6 12.5523 6 12C6 11.4477 5.55228 11 5 11C4.44772 11 4 11.4477 4 12C4 12.5523 4.44772 13 5 13Z", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })));
@@ -0,0 +1,43 @@
1
+ import { html } from "lit";
2
+ import { componentDescription, propDescription } from "../../stories-utils";
3
+ const meta = {
4
+ title: 'Components/bs-pagination',
5
+ parameters: { docs: { description: { component: componentDescription('bs-pagination') } } },
6
+ render: args => html `
7
+ <bs-pagination
8
+ total-pages=${args.totalPages}
9
+ current-page=${args.currentPage}
10
+ sibling-count=${args.siblingCount}
11
+ @bsPageChange=${(ev) => console.log('bsPageChange', ev.detail)}
12
+ ></bs-pagination>
13
+ `,
14
+ argTypes: {
15
+ totalPages: { control: { type: 'number', min: 1 }, description: propDescription('bs-pagination', 'totalPages') },
16
+ currentPage: { control: { type: 'number', min: 1 }, description: propDescription('bs-pagination', 'currentPage') },
17
+ siblingCount: { control: { type: 'number', min: 0 }, description: propDescription('bs-pagination', 'siblingCount') },
18
+ },
19
+ args: {
20
+ totalPages: 12,
21
+ currentPage: 1,
22
+ siblingCount: 1,
23
+ },
24
+ };
25
+ export default meta;
26
+ // Matches the Figma spec's own example exactly: 1 2 3 ... 12.
27
+ export const Default = {};
28
+ export const MiddlePage = {
29
+ name: 'Middle page (both ellipses)',
30
+ args: { currentPage: 6 },
31
+ };
32
+ export const LastPage = {
33
+ name: 'Last page',
34
+ args: { currentPage: 12 },
35
+ };
36
+ export const FewPages = {
37
+ name: 'Few pages (no ellipsis)',
38
+ args: { totalPages: 5, currentPage: 1 },
39
+ };
40
+ export const WiderSiblingCount = {
41
+ name: 'Wider sibling count',
42
+ args: { currentPage: 6, siblingCount: 2 },
43
+ };
@@ -51,7 +51,7 @@ export class BsRadio {
51
51
  }
52
52
  };
53
53
  render() {
54
- return (h("label", { key: 'da5cdc3a3661ed9d2f10741e46f87cc9beb9dbfd', class: `bs-radio ${this.disabled ? 'bs-radio--disabled' : ''}` }, h("input", { key: '431a861dbbd5ea993272714e5c366eaea3a0bd8d', class: "bs-radio__input", type: "radio", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, onChange: this.onChange }), h("span", { key: '525d9b9d3d980a70af93a7ee800043ce0ba8d98e', class: "bs-radio__hit-area" }, h("span", { key: '8c19cc4f2eb771fe82d4cb20376563b61da0f69e', class: "bs-radio__state-layer" }, h("span", { key: '33829a5a6c179a8bc3289f4a25fe65ddbcce5c96', part: "circle", class: `bs-radio__circle ${this.checked ? 'bs-radio__circle--selected' : ''}` }, this.checked && h("span", { key: '36fc0fa7d46a6bd32879c83a3d084afb282fd39d', part: "dot", class: "bs-radio__dot" })))), h("span", { key: 'efc3e222bae86289767794a23ede57b349567238', part: "label", class: "bs-radio__label" }, h("slot", { key: 'd4842d16ecade0d79572bf53a37549f017f846dd' }))));
54
+ return (h("label", { key: '4c6ce599b279240445e60b89fc909f55e105cc69', class: `bs-radio ${this.disabled ? 'bs-radio--disabled' : ''}` }, h("input", { key: '26ca5de7011a9c0b1d2d61c35e8859ebe5e2041f', class: "bs-radio__input", type: "radio", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, onChange: this.onChange }), h("span", { key: '3cd825f6153e79c6aede28a9ebb9f4d9ee3b2d6e', class: "bs-radio__hit-area" }, h("span", { key: '3a1e5b58a14a6f94770ae9dca5a541ade38efcfc', class: "bs-radio__state-layer" }, h("span", { key: '83391c2364a58a1cb1582fca112abd77886e5b10', part: "circle", class: `bs-radio__circle ${this.checked ? 'bs-radio__circle--selected' : ''}` }, this.checked && h("span", { key: '799e979b2b299f05b535a66604fa7c975fd43456', part: "dot", class: "bs-radio__dot" })))), h("span", { key: '89271b1d0c8460b4fce80a21b3c3fe2029630046', part: "label", class: "bs-radio__label" }, h("slot", { key: 'e5401f3f384330a51e51b7309a459bcb237e9034' }))));
55
55
  }
56
56
  static get is() { return "bs-radio"; }
57
57
  static get encapsulation() { return "shadow"; }
@@ -199,7 +199,7 @@ export class BsSlider {
199
199
  render() {
200
200
  const isRange = this.type === 'range';
201
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)))));
202
+ return (h("div", { key: '94e7804dd4e03881c5b53e3eb60ad6d4908b3c6d', class: rootClasses }, this.showLabel && (h("div", { key: '5a175e2c755c316e31637a99f32bbee4529a060e', class: "bs-slider__header" }, h("span", { key: '31c8b1ee83e4f86d9df201bb3e98be143c1bb4fb', 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: '3e76e43398df4e013544e14cda18d61297f586c1', class: "bs-slider__row" }, this.showLabel && (h("span", { key: '68b68fb76315c024e8a58ef6e69ef5d3bcef8b8a', part: "bound", class: "bs-slider__bound" }, this.min)), isRange ? this.renderRangeThumbs() : this.renderSingleThumb(), this.showLabel && (h("span", { key: '37cd8e768c6c374f972ab7e00893193eeaaa14ec', part: "bound", class: "bs-slider__bound" }, this.max)))));
203
203
  }
204
204
  static get is() { return "bs-slider"; }
205
205
  static get encapsulation() { return "shadow"; }