@brandsync/wc 1.9.0 → 1.10.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 (229) hide show
  1. package/custom-elements.json +4520 -3613
  2. package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
  3. package/dist/brandsync-wc/{p-c4de155c.entry.js → p-0132a2d1.entry.js} +1 -1
  4. package/dist/brandsync-wc/{p-051d3064.entry.js → p-041776c0.entry.js} +1 -1
  5. package/dist/brandsync-wc/{p-a09e157f.entry.js → p-08c99a60.entry.js} +1 -1
  6. package/dist/brandsync-wc/{p-70f64b25.entry.js → p-18c3c22c.entry.js} +1 -1
  7. package/dist/brandsync-wc/p-1c3a43c7.entry.js +1 -0
  8. package/dist/brandsync-wc/{p-fddc7bd1.entry.js → p-1c427ffb.entry.js} +1 -1
  9. package/dist/brandsync-wc/{p-29027559.entry.js → p-2e958566.entry.js} +1 -1
  10. package/dist/brandsync-wc/{p-235ae012.entry.js → p-301b2455.entry.js} +1 -1
  11. package/dist/brandsync-wc/{p-8ee0153b.entry.js → p-32cd69f1.entry.js} +1 -1
  12. package/dist/brandsync-wc/p-4f2c4929.entry.js +1 -0
  13. package/dist/brandsync-wc/{p-a0d5a620.entry.js → p-50a251a4.entry.js} +1 -1
  14. package/dist/brandsync-wc/{p-0e39b9cc.entry.js → p-5f3cd501.entry.js} +1 -1
  15. package/dist/brandsync-wc/{p-fc240aa0.entry.js → p-701ebf4a.entry.js} +1 -1
  16. package/dist/brandsync-wc/{p-0eed6813.entry.js → p-763876f5.entry.js} +1 -1
  17. package/dist/brandsync-wc/{p-f7d47c17.entry.js → p-76e1c295.entry.js} +1 -1
  18. package/dist/brandsync-wc/p-790db8b3.entry.js +1 -0
  19. package/dist/brandsync-wc/{p-4e5dcaff.entry.js → p-796a1860.entry.js} +1 -1
  20. package/dist/brandsync-wc/{p-36bf37d9.entry.js → p-806a5347.entry.js} +1 -1
  21. package/dist/brandsync-wc/{p-6331de9c.entry.js → p-8eba7f90.entry.js} +1 -1
  22. package/dist/brandsync-wc/{p-6fd7dd6a.entry.js → p-96ed9386.entry.js} +1 -1
  23. package/dist/brandsync-wc/{p-cfcf3f0a.entry.js → p-9e88f19c.entry.js} +1 -1
  24. package/dist/brandsync-wc/{p-de7c946d.entry.js → p-a71d2811.entry.js} +1 -1
  25. package/dist/brandsync-wc/{p-33e44094.entry.js → p-a8e2a829.entry.js} +1 -1
  26. package/dist/brandsync-wc/{p-3b64e3cd.entry.js → p-addfa0a0.entry.js} +1 -1
  27. package/dist/brandsync-wc/{p-4574a707.entry.js → p-af2bf957.entry.js} +1 -1
  28. package/dist/brandsync-wc/{p-6bf2f116.entry.js → p-b2074a32.entry.js} +1 -1
  29. package/dist/brandsync-wc/{p-7c94e6ae.entry.js → p-c99b6a66.entry.js} +1 -1
  30. package/dist/brandsync-wc/{p-2891d40b.entry.js → p-c9a72416.entry.js} +1 -1
  31. package/dist/brandsync-wc/{p-9f65f998.entry.js → p-d3f44cb7.entry.js} +1 -1
  32. package/dist/brandsync-wc/p-d42b1c2b.entry.js +1 -0
  33. package/dist/brandsync-wc/{p-3ec74d35.entry.js → p-daab6b22.entry.js} +1 -1
  34. package/dist/brandsync-wc/{p-107b1c5d.entry.js → p-dbcbe682.entry.js} +1 -1
  35. package/dist/brandsync-wc/{p-3176d1d3.entry.js → p-e8a5b8eb.entry.js} +1 -1
  36. package/dist/brandsync-wc/{p-062cfa34.entry.js → p-ea4e20ef.entry.js} +1 -1
  37. package/dist/brandsync-wc/{p-27bbed83.entry.js → p-f370b8fa.entry.js} +1 -1
  38. package/dist/brandsync-wc/{p-05c7de28.entry.js → p-f89de457.entry.js} +1 -1
  39. package/dist/brandsync-wc/{p-114d2fd8.entry.js → p-fd254972.entry.js} +1 -1
  40. package/dist/cjs/brandsync-wc.cjs.js +1 -1
  41. package/dist/cjs/bs-ai-disclaimer.cjs.entry.js +1 -1
  42. package/dist/cjs/bs-ai-greeting.cjs.entry.js +1 -1
  43. package/dist/cjs/bs-ai-thinking.cjs.entry.js +1 -1
  44. package/dist/cjs/bs-attachment-list.cjs.entry.js +1 -1
  45. package/dist/cjs/bs-breadcrumbs.cjs.entry.js +1 -1
  46. package/dist/cjs/bs-button-skeleton.cjs.entry.js +1 -1
  47. package/dist/cjs/bs-chatbot-feedback.cjs.entry.js +1 -1
  48. package/dist/cjs/bs-chatbot-header.cjs.entry.js +1 -1
  49. package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +1 -1
  50. package/dist/cjs/bs-chatbot-sources-drawer.cjs.entry.js +1 -1
  51. package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +1 -1
  52. package/dist/cjs/bs-checkbox-skeleton.cjs.entry.js +1 -1
  53. package/dist/cjs/bs-datepicker.cjs.entry.js +410 -0
  54. package/dist/cjs/bs-file-upload-item.cjs.entry.js +1 -1
  55. package/dist/cjs/bs-file-upload.cjs.entry.js +1 -1
  56. package/dist/cjs/bs-icon-button.cjs.entry.js +1 -1
  57. package/dist/cjs/bs-inline-tab.cjs.entry.js +1 -1
  58. package/dist/cjs/{bs-input.cjs.entry.js → bs-input_2.cjs.entry.js} +37 -4
  59. package/dist/cjs/bs-menu.cjs.entry.js +1 -1
  60. package/dist/cjs/bs-navigation-drawer-item.cjs.entry.js +1 -1
  61. package/dist/cjs/bs-navigation-drawer.cjs.entry.js +2 -2
  62. package/dist/cjs/bs-navigation-header.cjs.entry.js +1 -1
  63. package/dist/cjs/bs-pagination.cjs.entry.js +1 -1
  64. package/dist/cjs/bs-progress-linear.cjs.entry.js +2 -2
  65. package/dist/cjs/bs-progress.cjs.entry.js +2 -2
  66. package/dist/cjs/bs-radio.cjs.entry.js +1 -1
  67. package/dist/cjs/bs-slider.cjs.entry.js +1 -1
  68. package/dist/cjs/bs-snackbar.cjs.entry.js +1 -1
  69. package/dist/cjs/bs-source-link.cjs.entry.js +2 -2
  70. package/dist/cjs/bs-stepper-step.cjs.entry.js +1 -1
  71. package/dist/cjs/bs-stepper.cjs.entry.js +1 -1
  72. package/dist/cjs/bs-switch.cjs.entry.js +1 -1
  73. package/dist/cjs/bs-tab.cjs.entry.js +1 -1
  74. package/dist/cjs/bs-tabs.cjs.entry.js +1 -1
  75. package/dist/cjs/bs-timepicker.cjs.entry.js +209 -0
  76. package/dist/cjs/bs-toast.cjs.entry.js +1 -1
  77. package/dist/cjs/bs-tooltip.cjs.entry.js +1 -1
  78. package/dist/cjs/loader.cjs.js +1 -1
  79. package/dist/collection/collection-manifest.json +2 -0
  80. package/dist/collection/components/bs-a11y.cmp.test.js +4 -0
  81. package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.js +1 -1
  82. package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.js +1 -1
  83. package/dist/collection/components/bs-ai-thinking/bs-ai-thinking.js +1 -1
  84. package/dist/collection/components/bs-attachment-list/bs-attachment-list.js +1 -1
  85. package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.js +1 -1
  86. package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.js +1 -1
  87. package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +1 -1
  88. package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.js +1 -1
  89. package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +1 -1
  90. package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +1 -1
  91. package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.js +1 -1
  92. package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js +1 -1
  93. package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.js +1 -1
  94. package/dist/collection/components/bs-datepicker/bs-datepicker.cmp.test.js +182 -0
  95. package/dist/collection/components/bs-datepicker/bs-datepicker.css +315 -0
  96. package/dist/collection/components/bs-datepicker/bs-datepicker.js +782 -0
  97. package/dist/collection/components/bs-datepicker/bs-datepicker.stories.js +63 -0
  98. package/dist/collection/components/bs-file-upload/bs-file-upload.js +1 -1
  99. package/dist/collection/components/bs-file-upload-item/bs-file-upload-item.js +1 -1
  100. package/dist/collection/components/bs-input/bs-input.js +7 -4
  101. package/dist/collection/components/bs-menu/bs-menu.js +1 -1
  102. package/dist/collection/components/bs-menu-item/bs-menu-item.js +1 -1
  103. package/dist/collection/components/bs-pagination/bs-pagination.js +1 -1
  104. package/dist/collection/components/bs-progress/bs-progress.js +2 -2
  105. package/dist/collection/components/bs-progress-linear/bs-progress-linear.js +2 -2
  106. package/dist/collection/components/bs-radio/bs-radio.js +1 -1
  107. package/dist/collection/components/bs-slider/bs-slider.js +1 -1
  108. package/dist/collection/components/bs-snackbar/bs-snackbar.js +1 -1
  109. package/dist/collection/components/bs-source-link/bs-source-link.js +2 -2
  110. package/dist/collection/components/bs-stepper/bs-stepper/bs-stepper.js +1 -1
  111. package/dist/collection/components/bs-stepper/bs-stepper-step/bs-stepper-step.js +1 -1
  112. package/dist/collection/components/bs-switch/bs-switch.js +1 -1
  113. package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +1 -1
  114. package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +1 -1
  115. package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +1 -1
  116. package/dist/collection/components/bs-timepicker/bs-timepicker.cmp.test.js +141 -0
  117. package/dist/collection/components/bs-timepicker/bs-timepicker.css +200 -0
  118. package/dist/collection/components/bs-timepicker/bs-timepicker.js +509 -0
  119. package/dist/collection/components/bs-timepicker/bs-timepicker.stories.js +44 -0
  120. package/dist/collection/components/bs-toast/bs-toast.js +1 -1
  121. package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
  122. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.js +2 -2
  123. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.js +1 -1
  124. package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.js +1 -1
  125. package/dist/components/bs-ai-disclaimer.js +1 -1
  126. package/dist/components/bs-ai-greeting.js +1 -1
  127. package/dist/components/bs-ai-thinking.js +1 -1
  128. package/dist/components/bs-attachment-list.js +1 -1
  129. package/dist/components/bs-attachment.js +1 -1
  130. package/dist/components/bs-breadcrumb-overflow.js +1 -1
  131. package/dist/components/bs-breadcrumbs.js +1 -1
  132. package/dist/components/bs-button-skeleton.js +1 -1
  133. package/dist/components/bs-carousel.js +1 -1
  134. package/dist/components/bs-chatbot-feedback.js +1 -1
  135. package/dist/components/bs-chatbot-header.js +1 -1
  136. package/dist/components/bs-chatbot-response-action.js +1 -1
  137. package/dist/components/bs-chatbot-sources-drawer.js +1 -1
  138. package/dist/components/bs-chatbot-suggestion-button.js +1 -1
  139. package/dist/components/bs-checkbox-skeleton.js +1 -1
  140. package/dist/components/bs-datepicker.d.ts +11 -0
  141. package/dist/components/bs-datepicker.js +1 -0
  142. package/dist/components/bs-dialog.js +1 -1
  143. package/dist/components/bs-file-upload-item.js +1 -1
  144. package/dist/components/bs-file-upload.js +1 -1
  145. package/dist/components/bs-icon-button.js +1 -1
  146. package/dist/components/bs-inline-tab.js +1 -1
  147. package/dist/components/bs-input.js +1 -1
  148. package/dist/components/bs-menu-item.js +1 -1
  149. package/dist/components/bs-menu.js +1 -1
  150. package/dist/components/bs-navigation-drawer-item.js +1 -1
  151. package/dist/components/bs-navigation-drawer.js +1 -1
  152. package/dist/components/bs-navigation-header.js +1 -1
  153. package/dist/components/bs-pagination.js +1 -1
  154. package/dist/components/bs-progress-linear.js +1 -1
  155. package/dist/components/bs-progress.js +1 -1
  156. package/dist/components/bs-radio.js +1 -1
  157. package/dist/components/bs-slider.js +1 -1
  158. package/dist/components/bs-snackbar.js +1 -1
  159. package/dist/components/bs-source-link.js +1 -1
  160. package/dist/components/bs-stepper-step.js +1 -1
  161. package/dist/components/bs-stepper.js +1 -1
  162. package/dist/components/bs-switch.js +1 -1
  163. package/dist/components/bs-tab.js +1 -1
  164. package/dist/components/bs-tabs.js +1 -1
  165. package/dist/components/bs-timepicker.d.ts +11 -0
  166. package/dist/components/bs-timepicker.js +1 -0
  167. package/dist/components/bs-toast.js +1 -1
  168. package/dist/components/bs-tooltip.js +1 -1
  169. package/dist/components/{p-BA3c9Rom.js → p-B7Icv1ho.js} +1 -1
  170. package/dist/components/{p-wei0Ija2.js → p-BTvme8CE.js} +1 -1
  171. package/dist/components/{p-BoeorHNv.js → p-BYR_ZC8v.js} +1 -1
  172. package/dist/components/p-Ba860ej1.js +1 -0
  173. package/dist/components/p-CPvqZNO8.js +1 -0
  174. package/dist/components/{p-EtXc94lJ.js → p-DkIVyFOP.js} +1 -1
  175. package/dist/components/{p-BfEyD6Ku.js → p-ZK8p5zax.js} +1 -1
  176. package/dist/components/p-jDO25SfF.js +1 -0
  177. package/dist/esm/brandsync-wc.js +1 -1
  178. package/dist/esm/bs-ai-disclaimer.entry.js +1 -1
  179. package/dist/esm/bs-ai-greeting.entry.js +1 -1
  180. package/dist/esm/bs-ai-thinking.entry.js +1 -1
  181. package/dist/esm/bs-attachment-list.entry.js +1 -1
  182. package/dist/esm/bs-breadcrumbs.entry.js +1 -1
  183. package/dist/esm/bs-button-skeleton.entry.js +1 -1
  184. package/dist/esm/bs-chatbot-feedback.entry.js +1 -1
  185. package/dist/esm/bs-chatbot-header.entry.js +1 -1
  186. package/dist/esm/bs-chatbot-response-action.entry.js +1 -1
  187. package/dist/esm/bs-chatbot-sources-drawer.entry.js +1 -1
  188. package/dist/esm/bs-chatbot-suggestion-button.entry.js +1 -1
  189. package/dist/esm/bs-checkbox-skeleton.entry.js +1 -1
  190. package/dist/esm/bs-datepicker.entry.js +408 -0
  191. package/dist/esm/bs-file-upload-item.entry.js +1 -1
  192. package/dist/esm/bs-file-upload.entry.js +1 -1
  193. package/dist/esm/bs-icon-button.entry.js +1 -1
  194. package/dist/esm/bs-inline-tab.entry.js +1 -1
  195. package/dist/esm/{bs-input.entry.js → bs-input_2.entry.js} +37 -5
  196. package/dist/esm/bs-menu.entry.js +1 -1
  197. package/dist/esm/bs-navigation-drawer-item.entry.js +1 -1
  198. package/dist/esm/bs-navigation-drawer.entry.js +2 -2
  199. package/dist/esm/bs-navigation-header.entry.js +1 -1
  200. package/dist/esm/bs-pagination.entry.js +1 -1
  201. package/dist/esm/bs-progress-linear.entry.js +2 -2
  202. package/dist/esm/bs-progress.entry.js +2 -2
  203. package/dist/esm/bs-radio.entry.js +1 -1
  204. package/dist/esm/bs-slider.entry.js +1 -1
  205. package/dist/esm/bs-snackbar.entry.js +1 -1
  206. package/dist/esm/bs-source-link.entry.js +2 -2
  207. package/dist/esm/bs-stepper-step.entry.js +1 -1
  208. package/dist/esm/bs-stepper.entry.js +1 -1
  209. package/dist/esm/bs-switch.entry.js +1 -1
  210. package/dist/esm/bs-tab.entry.js +1 -1
  211. package/dist/esm/bs-tabs.entry.js +1 -1
  212. package/dist/esm/bs-timepicker.entry.js +207 -0
  213. package/dist/esm/bs-toast.entry.js +1 -1
  214. package/dist/esm/bs-tooltip.entry.js +1 -1
  215. package/dist/esm/loader.js +1 -1
  216. package/dist/types/components/bs-datepicker/bs-datepicker.cmp.test.d.ts +1 -0
  217. package/dist/types/components/bs-datepicker/bs-datepicker.d.ts +136 -0
  218. package/dist/types/components/bs-datepicker/bs-datepicker.stories.d.ts +20 -0
  219. package/dist/types/components/bs-timepicker/bs-timepicker.cmp.test.d.ts +1 -0
  220. package/dist/types/components/bs-timepicker/bs-timepicker.d.ts +101 -0
  221. package/dist/types/components/bs-timepicker/bs-timepicker.stories.d.ts +14 -0
  222. package/dist/types/components.d.ts +515 -0
  223. package/package.json +1 -1
  224. package/dist/brandsync-wc/p-7b00dd36.entry.js +0 -1
  225. package/dist/brandsync-wc/p-ae978c9a.entry.js +0 -1
  226. package/dist/brandsync-wc/p-c10d2529.entry.js +0 -1
  227. package/dist/cjs/bs-menu-item.cjs.entry.js +0 -34
  228. package/dist/components/p-Buly0d5G.js +0 -1
  229. package/dist/esm/bs-menu-item.entry.js +0 -32
@@ -0,0 +1,408 @@
1
+ import { r as registerInstance, c as createEvent, a as getElement, h } from './index-AgoOSYvW.js';
2
+
3
+ const bsDatepickerCss = () => `:host{display:inline-block;--bs-datepicker-width:364px;--bs-datepicker-bg:var(--bs-surface-raised);--bs-datepicker-radius:var(--bs-border-radius-150);--bs-datepicker-padding:var(--bs-spacing-200);--bs-datepicker-gap:var(--bs-spacing-150);--bs-datepicker-shadow:var(--bs-shadow-md);--bs-datepicker-menu-max-height:280px;--bs-datepicker-day-size:var(--bs-spacing-550);--bs-datepicker-day-radius:var(--bs-border-radius-100);--bs-datepicker-day-gap:var(--bs-spacing-50);--bs-datepicker-band-bridge:var(--bs-spacing-50);--bs-datepicker-font-size:var(--bs-font-size-md);--bs-datepicker-line-height:var(--bs-line-height-body-md);--bs-datepicker-weekday-font-size:var(--bs-font-size-sm);--bs-datepicker-weekday-line-height:var(--bs-line-height-body-sm);--bs-datepicker-color:var(--bs-text-default);--bs-datepicker-color-muted:var(--bs-text-muted);--bs-datepicker-color-weekday:var(--bs-text-secondary);--bs-datepicker-color-disabled:var(--bs-text-on-disabled);--bs-datepicker-hover:var(--bs-surface-hover);--bs-datepicker-pressed:var(--bs-surface-pressed);--bs-datepicker-focus-bg:var(--bs-surface-focus);--bs-datepicker-selected-bg:var(--bs-color-primary-default);--bs-datepicker-selected-bg-hover:var(--bs-color-primary-hover);--bs-datepicker-selected-bg-pressed:var(--bs-color-primary-pressed);--bs-datepicker-selected-bg-focus:var(--bs-color-primary-focused);--bs-datepicker-selected-bg-disabled:var(--bs-surface-action-disabled);--bs-datepicker-selected-color:var(--bs-text-on-action);--bs-datepicker-range-bg:var(--bs-color-primary-container);--bs-datepicker-today-border:var(--bs-border-primary);--bs-datepicker-focus-ring-color:var(--bs-border-neutral-focus)}.bs-datepicker{box-sizing:border-box;display:flex;flex-direction:column;gap:var(--bs-datepicker-gap);width:var(--bs-datepicker-width);max-width:100%;padding:var(--bs-datepicker-padding);border-radius:var(--bs-datepicker-radius);background:var(--bs-datepicker-bg);box-shadow:var(--bs-datepicker-shadow);color:var(--bs-datepicker-color);font-family:inherit;font-size:var(--bs-datepicker-font-size)}.bs-datepicker__header{display:flex;align-items:flex-start;gap:var(--bs-spacing-100)}.bs-datepicker__header>bs-input{flex:1 1 0;min-width:0}.bs-datepicker__select::part(label){position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.bs-datepicker__dropdown{position:relative;flex:1 1 0;min-width:0}.bs-datepicker__dropdown bs-input{width:100%}.bs-datepicker__menu{position:absolute;top:calc(100% + var(--bs-spacing-50));inset-inline:0;z-index:2;max-height:var(--bs-datepicker-menu-max-height);overflow-y:auto;border-radius:var(--bs-border-radius-100);background:var(--bs-surface-raised);box-shadow:var(--bs-shadow-md);--bs-menu-shadow:none}.bs-datepicker__menu bs-menu-item{--bs-menu-item-color:var(--bs-datepicker-color)}.bs-datepicker__menu bs-menu-item::part(label){flex:1;text-align:start}.bs-datepicker__option{display:flex;align-items:center;justify-content:space-between;gap:var(--bs-spacing-100)}.bs-datepicker__option svg{width:20px;height:20px;flex:none}.bs-datepicker__nav{display:flex;align-items:center;justify-content:space-between}.bs-datepicker__title{font-weight:var(--bs-font-weight-semibold);line-height:calc(var(--bs-datepicker-line-height) * 1px)}.bs-datepicker__nav-button{display:flex;align-items:center;justify-content:center;width:var(--bs-spacing-600);height:var(--bs-spacing-600);padding:0;border:none;border-radius:var(--bs-datepicker-day-radius);background:transparent;color:var(--bs-icon-default);cursor:pointer}.bs-datepicker__nav-button svg{width:24px;height:24px}.bs-datepicker__nav-button:hover{background:var(--bs-datepicker-hover)}.bs-datepicker__grid{display:flex;flex-direction:column;gap:var(--bs-datepicker-day-gap)}.bs-datepicker__row{display:grid;grid-template-columns:repeat(7, var(--bs-datepicker-day-size));justify-content:space-between}.bs-datepicker__weekday{display:flex;align-items:center;justify-content:center;height:var(--bs-datepicker-day-size);color:var(--bs-datepicker-color-weekday);font-size:var(--bs-datepicker-weekday-font-size);font-weight:var(--bs-font-weight-semibold);line-height:calc(var(--bs-datepicker-weekday-line-height) * 1px)}.bs-datepicker__cell{display:flex;justify-content:center}.bs-datepicker__cell--in-range{background:var(--bs-datepicker-range-bg);box-shadow:calc(var(--bs-datepicker-band-bridge) + 1px) 0 0 var(--bs-datepicker-range-bg)}.bs-datepicker__cell--band-start{border-start-start-radius:var(--bs-datepicker-day-radius);border-end-start-radius:var(--bs-datepicker-day-radius)}.bs-datepicker__cell--band-end{border-start-end-radius:var(--bs-datepicker-day-radius);border-end-end-radius:var(--bs-datepicker-day-radius);box-shadow:none}.bs-datepicker__day{width:var(--bs-datepicker-day-size);height:var(--bs-datepicker-day-size);padding:0;border:none;border-radius:var(--bs-datepicker-day-radius);background:transparent;color:var(--bs-datepicker-color);font-family:inherit;font-size:var(--bs-datepicker-font-size);line-height:calc(var(--bs-datepicker-line-height) * 1px);cursor:pointer}.bs-datepicker__day--outside{color:var(--bs-datepicker-color-muted)}.bs-datepicker__day--today{box-shadow:inset 0 0 0 1px var(--bs-datepicker-today-border)}.bs-datepicker__day:not(:disabled):hover{background:var(--bs-datepicker-hover)}.bs-datepicker__day:not(:disabled):active{background:var(--bs-datepicker-pressed)}.bs-datepicker__day--in-range:not(:disabled):hover,.bs-datepicker__day--in-range:not(:disabled):active{background:var(--bs-datepicker-range-bg)}.bs-datepicker__day--selected,.bs-datepicker__day--selected.bs-datepicker__day--outside{background:var(--bs-datepicker-selected-bg);color:var(--bs-datepicker-selected-color)}.bs-datepicker__day--selected:not(:disabled):hover{background:var(--bs-datepicker-selected-bg-hover)}.bs-datepicker__day--selected:not(:disabled):active{background:var(--bs-datepicker-selected-bg-pressed)}.bs-datepicker__day:disabled{color:var(--bs-datepicker-color-disabled);cursor:not-allowed}.bs-datepicker__day--selected:disabled{background:var(--bs-datepicker-selected-bg-disabled)}.bs-datepicker__day:focus-visible{background:var(--bs-datepicker-focus-bg);outline:2px solid var(--bs-datepicker-focus-ring-color);outline-offset:0}.bs-datepicker__day--selected:focus-visible{background:var(--bs-datepicker-selected-bg-focus)}.bs-datepicker__nav-button:focus-visible{outline:2px solid var(--bs-datepicker-focus-ring-color);outline-offset:2px}`;
4
+
5
+ const BsDatepicker = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.bsChange = createEvent(this, "bsChange");
9
+ if (hostRef.$hostElement$["s-ei"]) {
10
+ this.internals = hostRef.$hostElement$["s-ei"];
11
+ }
12
+ else {
13
+ this.internals = hostRef.$hostElement$.attachInternals();
14
+ hostRef.$hostElement$["s-ei"] = this.internals;
15
+ }
16
+ }
17
+ get el() { return getElement(this); }
18
+ internals;
19
+ initialValue = '';
20
+ initialStart = '';
21
+ initialEnd = '';
22
+ /** The `name` the value is submitted under in a surrounding `<form>`. In `range` mode the dates
23
+ * are submitted as `<name>-start` and `<name>-end`. */
24
+ name;
25
+ /** Select a start/end range instead of a single date. */
26
+ range = false;
27
+ /** The selected date (`YYYY-MM-DD`) in single mode. Mutable so a click updates it directly;
28
+ * `bsChange` still fires for the consumer to react. Ignored when `range` is set. */
29
+ value = '';
30
+ /** The range start (`YYYY-MM-DD`) in `range` mode. */
31
+ start = '';
32
+ /** The range end (`YYYY-MM-DD`) in `range` mode. */
33
+ end = '';
34
+ /** Earliest selectable date (`YYYY-MM-DD`). Earlier days render disabled. */
35
+ min;
36
+ /** Latest selectable date (`YYYY-MM-DD`). Later days render disabled. */
37
+ max;
38
+ /** BCP 47 locale used for month names, weekday names and the title. */
39
+ locale = 'en-GB';
40
+ /** First column of the grid: `0` for Sunday (the Figma spec), `1` for Monday, ... `6`. */
41
+ firstDayOfWeek = 0;
42
+ /** Label above the start field in `range` mode. */
43
+ startLabel = 'Start date';
44
+ /** Label above the end field in `range` mode. */
45
+ endLabel = 'End date';
46
+ /** Accessible name for the month dropdown (single mode). */
47
+ monthLabel = 'Month';
48
+ /** Accessible name for the year dropdown (single mode). */
49
+ yearLabel = 'Year';
50
+ /** Accessible name for the previous-month button. */
51
+ previousLabel = 'Previous month';
52
+ /** Accessible name for the next-month button. */
53
+ nextLabel = 'Next month';
54
+ /** Fires when the user changes the selection. Single mode: `{ value }`. Range mode: `{ start,
55
+ * end }` -- fired once for the first click (with an empty `end`) and again when the range is
56
+ * completed. Not fired when the props are set programmatically. */
57
+ bsChange;
58
+ /** First day of the month currently displayed. */
59
+ viewDate = firstOfMonth(new Date());
60
+ /** The day holding the roving tabindex. */
61
+ focusedIso = '';
62
+ /** The day the pointer is over while a range is half-picked, for the live range preview. */
63
+ hoverIso = '';
64
+ /** Text the user is typing into a range field, keyed by which field. Cleared on commit. */
65
+ draft = {};
66
+ /** Which header dropdown (single mode) is open. */
67
+ openMenu = null;
68
+ shouldFocusDay = false;
69
+ menuToScroll = false;
70
+ componentWillLoad() {
71
+ this.initialValue = this.value;
72
+ this.initialStart = this.start;
73
+ this.initialEnd = this.end;
74
+ this.showSelection();
75
+ this.syncFormValue();
76
+ }
77
+ componentDidRender() {
78
+ if (this.menuToScroll) {
79
+ this.menuToScroll = false;
80
+ // Centre the current month/year in the list. Done by hand rather than scrollIntoView, which
81
+ // would also scroll the page.
82
+ const menu = this.el.shadowRoot.querySelector('.bs-datepicker__menu');
83
+ const current = menu?.querySelector('[data-current]');
84
+ if (menu && current)
85
+ menu.scrollTop = current.offsetTop - menu.clientHeight / 2 + current.offsetHeight / 2;
86
+ }
87
+ if (!this.shouldFocusDay)
88
+ return;
89
+ this.shouldFocusDay = false;
90
+ const day = this.el.shadowRoot.querySelector(`[data-date="${this.focusedIso}"]`);
91
+ day?.focus();
92
+ }
93
+ onSelectionChange() {
94
+ this.syncFormValue();
95
+ }
96
+ onSelectionJump() {
97
+ // A programmatic change should bring the new selection into view.
98
+ this.showSelection();
99
+ }
100
+ /** Called by the browser when the surrounding `<form>` is reset. */
101
+ formResetCallback() {
102
+ this.value = this.initialValue;
103
+ this.start = this.initialStart;
104
+ this.end = this.initialEnd;
105
+ this.draft = {};
106
+ }
107
+ showSelection() {
108
+ const anchor = parseIso(this.range ? this.start : this.value);
109
+ if (anchor)
110
+ this.viewDate = firstOfMonth(anchor);
111
+ }
112
+ syncFormValue() {
113
+ if (!this.internals?.setFormValue)
114
+ return;
115
+ if (this.range) {
116
+ if (!this.name) {
117
+ this.internals.setFormValue(null);
118
+ return;
119
+ }
120
+ const data = new FormData();
121
+ data.append(`${this.name}-start`, this.start ?? '');
122
+ data.append(`${this.name}-end`, this.end ?? '');
123
+ this.internals.setFormValue(data);
124
+ }
125
+ else {
126
+ this.internals.setFormValue(this.value ?? '');
127
+ }
128
+ }
129
+ // --- selection ---------------------------------------------------------------------------
130
+ isDisabled(d) {
131
+ const min = parseIso(this.min);
132
+ const max = parseIso(this.max);
133
+ return (!!min && d < min) || (!!max && d > max);
134
+ }
135
+ selectDay(d) {
136
+ if (this.isDisabled(d))
137
+ return;
138
+ const iso = toIso(d);
139
+ if (d.getMonth() !== this.viewDate.getMonth() || d.getFullYear() !== this.viewDate.getFullYear()) {
140
+ this.viewDate = firstOfMonth(d);
141
+ }
142
+ this.focusedIso = iso;
143
+ if (!this.range) {
144
+ this.value = iso;
145
+ this.bsChange.emit({ value: iso });
146
+ return;
147
+ }
148
+ // First click, or a click after a completed range, starts a new range. A click before the
149
+ // current start restarts from there rather than producing a backwards range.
150
+ if (!this.start || this.end || iso < this.start) {
151
+ this.start = iso;
152
+ this.end = '';
153
+ }
154
+ else {
155
+ this.end = iso;
156
+ }
157
+ this.hoverIso = '';
158
+ this.draft = {};
159
+ this.bsChange.emit({ start: this.start, end: this.end });
160
+ }
161
+ commitDraft(field) {
162
+ const text = this.draft[field];
163
+ if (text === undefined)
164
+ return;
165
+ const d = parseIso(text);
166
+ const next = { ...this.draft };
167
+ delete next[field];
168
+ this.draft = next;
169
+ if (!d || this.isDisabled(d))
170
+ return; // invalid text: fall back to the committed value
171
+ let start = field === 'start' ? toIso(d) : this.start;
172
+ let end = field === 'end' ? toIso(d) : this.end;
173
+ if (start && end && end < start) {
174
+ if (field === 'start')
175
+ end = '';
176
+ else
177
+ start = '';
178
+ }
179
+ this.start = start;
180
+ this.end = end;
181
+ this.showSelection();
182
+ this.bsChange.emit({ start, end });
183
+ }
184
+ // --- navigation --------------------------------------------------------------------------
185
+ moveView(months) {
186
+ const v = this.viewDate;
187
+ this.viewDate = new Date(v.getFullYear(), v.getMonth() + months, 1);
188
+ }
189
+ onKeyDown = (ev, current) => {
190
+ const step = { ArrowLeft: -1, ArrowRight: 1, ArrowUp: -7, ArrowDown: 7 };
191
+ let next;
192
+ if (ev.key in step) {
193
+ next = addDays(current, step[ev.key]);
194
+ }
195
+ else if (ev.key === 'Home' || ev.key === 'End') {
196
+ const col = (current.getDay() - this.safeFirstDay + 7) % 7;
197
+ next = addDays(current, ev.key === 'Home' ? -col : 6 - col);
198
+ }
199
+ else if (ev.key === 'PageUp' || ev.key === 'PageDown') {
200
+ const dir = ev.key === 'PageUp' ? -1 : 1;
201
+ next = addMonths(current, ev.shiftKey ? dir * 12 : dir);
202
+ }
203
+ else {
204
+ return;
205
+ }
206
+ ev.preventDefault();
207
+ this.focusedIso = toIso(next);
208
+ this.viewDate = firstOfMonth(next);
209
+ this.shouldFocusDay = true;
210
+ };
211
+ get safeFirstDay() {
212
+ const n = Math.trunc(Number(this.firstDayOfWeek));
213
+ return Number.isFinite(n) ? ((n % 7) + 7) % 7 : 0;
214
+ }
215
+ // --- rendering ---------------------------------------------------------------------------
216
+ get fmt() {
217
+ const locale = this.locale || 'en-GB';
218
+ try {
219
+ return locale;
220
+ }
221
+ catch {
222
+ return 'en-GB';
223
+ }
224
+ }
225
+ formatField(iso) {
226
+ const d = parseIso(iso);
227
+ return d ? new Intl.DateTimeFormat(this.fmt, { day: 'numeric', month: 'short', year: 'numeric' }).format(d) : '';
228
+ }
229
+ titleText() {
230
+ const selected = !this.range ? parseIso(this.value) : undefined;
231
+ if (selected) {
232
+ return new Intl.DateTimeFormat(this.fmt, { day: 'numeric', month: 'long', year: 'numeric' }).format(selected);
233
+ }
234
+ return new Intl.DateTimeFormat(this.fmt, { month: 'long', year: 'numeric' }).format(this.viewDate);
235
+ }
236
+ monthOptions() {
237
+ const f = new Intl.DateTimeFormat(this.fmt, { month: 'long' });
238
+ return Array.from({ length: 12 }, (_, m) => ({ label: f.format(new Date(2000, m, 1)), value: String(m) }));
239
+ }
240
+ yearOptions() {
241
+ const current = this.viewDate.getFullYear();
242
+ const min = parseIso(this.min)?.getFullYear() ?? current - 100;
243
+ const max = parseIso(this.max)?.getFullYear() ?? current + 100;
244
+ const options = [];
245
+ for (let y = Math.min(min, current); y <= Math.max(max, current); y++) {
246
+ options.push({ label: String(y), value: String(y) });
247
+ }
248
+ return options;
249
+ }
250
+ weekdays() {
251
+ const f = new Intl.DateTimeFormat(this.fmt, { weekday: 'short' });
252
+ // 2023-01-01 was a Sunday.
253
+ return Array.from({ length: 7 }, (_, i) => f.format(new Date(2023, 0, 1 + ((this.safeFirstDay + i) % 7))));
254
+ }
255
+ gridDays() {
256
+ const first = this.viewDate;
257
+ const lead = (first.getDay() - this.safeFirstDay + 7) % 7;
258
+ const gridStart = addDays(first, -lead);
259
+ // Always 6 rows, so the card doesn't change height from month to month (as in the Figma).
260
+ return Array.from({ length: 42 }, (_, i) => addDays(gridStart, i));
261
+ }
262
+ renderHeader() {
263
+ if (this.range) {
264
+ const field = (which, label) => (h("bs-input", { label: label, placeholder: "YYYY-MM-DD", value: this.draft[which] ?? this.formatField(this[which]), onBsInput: (ev) => (this.draft = { ...this.draft, [which]: ev.detail }), onBsChange: () => this.commitDraft(which), onFocusin: () => {
265
+ // Typing is ISO: swap the pretty "12 Sept, 2026" for something parseable on focus.
266
+ if (this.draft[which] === undefined)
267
+ this.draft = { ...this.draft, [which]: this[which] };
268
+ }, onFocusout: () => this.commitDraft(which) }));
269
+ return (h("div", { part: "header", class: "bs-datepicker__header bs-datepicker__header--range" }, field('start', this.startLabel), field('end', this.endLabel)));
270
+ }
271
+ return (h("div", { part: "header", class: "bs-datepicker__header" }, this.renderDropdown('month', this.monthLabel, this.monthOptions(), String(this.viewDate.getMonth()), (value) => (this.viewDate = new Date(this.viewDate.getFullYear(), Number(value), 1))), this.renderDropdown('year', this.yearLabel, this.yearOptions(), String(this.viewDate.getFullYear()), (value) => (this.viewDate = new Date(Number(value), this.viewDate.getMonth(), 1)))));
272
+ }
273
+ /** A `bs-input type="dropdown"` trigger with our own `bs-menu` list below it. bs-input's built-in
274
+ * menu has no checkmark or scroll limit, so it's used only as the field look: it gets no
275
+ * `options` (so renders no menu of its own) and its `bsOpen` toggles ours. */
276
+ renderDropdown(which, label, options, current, onPick) {
277
+ const open = this.openMenu === which;
278
+ const close = () => {
279
+ this.openMenu = null;
280
+ };
281
+ return (h("div", { class: "bs-datepicker__dropdown", onKeyDown: (ev) => {
282
+ if (ev.key !== 'Escape' || !open)
283
+ return;
284
+ close();
285
+ ev.currentTarget.querySelector('bs-input')?.focus();
286
+ }, onFocusout: (ev) => {
287
+ const related = ev.relatedTarget;
288
+ if (open && (!related || !ev.currentTarget.contains(related)))
289
+ close();
290
+ } }, h("bs-input", { type: "dropdown", class: "bs-datepicker__select", label: label, value: options.find(o => o.value === current)?.label ?? '', open: open, onBsOpen: () => {
291
+ this.menuToScroll = !open;
292
+ this.openMenu = open ? null : which;
293
+ } }), open && (h("bs-menu", { part: "menu", class: "bs-datepicker__menu", role: "listbox" }, options.map(o => (h("bs-menu-item", { key: o.value, "data-current": o.value === current ? '' : undefined, "aria-current": o.value === current ? 'true' : undefined, onBsSelect: () => {
294
+ onPick(o.value);
295
+ close();
296
+ this.el.shadowRoot.querySelector(`.bs-datepicker__dropdown bs-input[label="${label}"]`)?.focus();
297
+ } }, h("span", { class: "bs-datepicker__option" }, h("span", null, o.label), o.value === current && (h("svg", { viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true" }, h("path", { d: "M5 12.5L10 17.5L19 7.5", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))))))))));
298
+ }
299
+ render() {
300
+ const days = this.gridDays();
301
+ const todayIso = toIso(new Date());
302
+ const selectedStart = this.range ? this.start : this.value;
303
+ const selectedEnd = this.range ? this.end : '';
304
+ // While the range is half-picked, preview it up to the hovered day.
305
+ const previewEnd = this.range && this.start && !this.end && this.hoverIso > this.start ? this.hoverIso : selectedEnd;
306
+ const tabbable = days.some(d => toIso(d) === this.focusedIso && d.getMonth() === this.viewDate.getMonth())
307
+ ? this.focusedIso
308
+ : this.defaultTabbable(days);
309
+ const isInRange = (iso) => !!selectedStart && !!previewEnd && iso > selectedStart && iso < previewEnd;
310
+ const weekdays = this.weekdays();
311
+ return (h("div", { key: '49e2ce73c32ee98eb2c8276fb23b159392b9292a', part: "container", class: "bs-datepicker" }, this.renderHeader(), h("div", { key: 'da69881edff77ee3584b4565a4b39024ce2cd4f7', part: "nav", class: "bs-datepicker__nav" }, h("button", { key: 'f96dea3cc2821bf757afcee158c092deefe45b8b', part: "prev", type: "button", class: "bs-datepicker__nav-button", "aria-label": this.previousLabel, onClick: () => this.moveView(-1) }, h("svg", { key: '7be3e0ca1588852357d13ade50f594633f86a56a', viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true" }, h("path", { key: '513165ad97411656af1742376cf7d75eda544814', d: "M15 18L9 12L15 6", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }))), h("div", { key: 'bc55234eb1bd053c87388e7d6ebe31049f903cea', part: "title", class: "bs-datepicker__title", "aria-live": "polite" }, this.titleText()), h("button", { key: '2436e91d78710f7d0716553660c8e1fff2e7d2da', part: "next", type: "button", class: "bs-datepicker__nav-button", "aria-label": this.nextLabel, onClick: () => this.moveView(1) }, h("svg", { key: '47f183221234d91d736f45207e84b14ee57b469f', viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true" }, h("path", { key: 'bd4abceed66ef781fab224646d371b648d3c0d1d', d: "M9 18L15 12L9 6", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), h("div", { key: 'e669ad28eb8461dcf5a24191dca379ab3cbc0111', part: "grid", class: "bs-datepicker__grid", role: "grid", "aria-label": this.titleText() }, h("div", { key: '440719175dd4f4a745b9de22126029633bfe91a3', class: "bs-datepicker__row", role: "row" }, weekdays.map(w => (h("div", { part: "weekday", class: "bs-datepicker__weekday", role: "columnheader" }, w)))), Array.from({ length: 6 }, (_, r) => {
312
+ const row = days.slice(r * 7, r * 7 + 7);
313
+ return (h("div", { class: "bs-datepicker__row", role: "row" }, row.map((d, c) => {
314
+ const iso = toIso(d);
315
+ const outside = d.getMonth() !== this.viewDate.getMonth();
316
+ const isStart = iso === selectedStart;
317
+ const isEnd = !!selectedEnd && iso === selectedEnd;
318
+ const selected = isStart || isEnd;
319
+ const inRange = isInRange(iso);
320
+ // Figma: the band covers only the days between the two ends, rounded where a run
321
+ // starts/ends (also at a week boundary), with the end days sitting outside it.
322
+ const classes = {
323
+ 'bs-datepicker__cell': true,
324
+ 'bs-datepicker__cell--in-range': inRange,
325
+ 'bs-datepicker__cell--band-start': inRange && !(c > 0 && isInRange(toIso(row[c - 1]))),
326
+ 'bs-datepicker__cell--band-end': inRange && !(c < 6 && isInRange(toIso(row[c + 1]))),
327
+ };
328
+ const parts = ['day', selected && 'selected', inRange && 'in-range', outside && 'outside', iso === todayIso && 'today']
329
+ .filter(Boolean)
330
+ .join(' ');
331
+ return (h("div", { class: classes, role: "gridcell", "aria-selected": selected || inRange ? 'true' : 'false' }, h("button", { part: parts, type: "button", class: {
332
+ 'bs-datepicker__day': true,
333
+ 'bs-datepicker__day--selected': selected,
334
+ 'bs-datepicker__day--in-range': inRange,
335
+ 'bs-datepicker__day--outside': outside,
336
+ 'bs-datepicker__day--today': iso === todayIso,
337
+ }, "data-date": iso, tabindex: iso === tabbable ? 0 : -1, disabled: this.isDisabled(d), "aria-current": iso === todayIso ? 'date' : undefined, "aria-label": new Intl.DateTimeFormat(this.fmt, { weekday: 'long', day: '2-digit', month: 'long', year: 'numeric' }).format(d), onClick: () => this.selectDay(d), onKeyDown: ev => this.onKeyDown(ev, d), onMouseEnter: () => {
338
+ if (this.range && this.start && !this.end)
339
+ this.hoverIso = iso;
340
+ } }, String(d.getDate()).padStart(2, '0'))));
341
+ })));
342
+ }))));
343
+ }
344
+ /** The day that should be reachable with Tab when nothing in view has been focused yet: the
345
+ * selection if it's in the displayed month, else today if it is, else the 1st. */
346
+ defaultTabbable(days) {
347
+ const inView = (iso) => days.some(d => toIso(d) === iso && d.getMonth() === this.viewDate.getMonth());
348
+ const selected = this.range ? this.start : this.value;
349
+ if (selected && inView(selected))
350
+ return selected;
351
+ const today = toIso(new Date());
352
+ if (inView(today))
353
+ return today;
354
+ return toIso(this.viewDate);
355
+ }
356
+ static get formAssociated() { return true; }
357
+ static get watchers() { return {
358
+ "value": [{
359
+ "onSelectionChange": 0
360
+ }, {
361
+ "onSelectionJump": 0
362
+ }],
363
+ "start": [{
364
+ "onSelectionChange": 0
365
+ }, {
366
+ "onSelectionJump": 0
367
+ }],
368
+ "end": [{
369
+ "onSelectionChange": 0
370
+ }],
371
+ "range": [{
372
+ "onSelectionChange": 0
373
+ }],
374
+ "name": [{
375
+ "onSelectionChange": 0
376
+ }]
377
+ }; }
378
+ };
379
+ // --- date helpers (local time; `YYYY-MM-DD` strings) ---------------------------------------
380
+ function pad(n) {
381
+ return String(n).padStart(2, '0');
382
+ }
383
+ function toIso(d) {
384
+ return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;
385
+ }
386
+ function parseIso(s) {
387
+ const m = /^(\d{4})-(\d{2})-(\d{2})$/.exec((s ?? '').trim());
388
+ if (!m)
389
+ return undefined;
390
+ const d = new Date(Number(m[1]), Number(m[2]) - 1, Number(m[3]));
391
+ // Reject overflow such as 2026-02-31, which `Date` silently rolls into March.
392
+ return toIso(d) === `${m[1]}-${m[2]}-${m[3]}` ? d : undefined;
393
+ }
394
+ function firstOfMonth(d) {
395
+ return new Date(d.getFullYear(), d.getMonth(), 1);
396
+ }
397
+ function addDays(d, n) {
398
+ return new Date(d.getFullYear(), d.getMonth(), d.getDate() + n);
399
+ }
400
+ function addMonths(d, n) {
401
+ // Clamp so Jan 31 + 1 month is Feb 28, not Mar 3.
402
+ const target = new Date(d.getFullYear(), d.getMonth() + n, 1);
403
+ const lastDay = new Date(target.getFullYear(), target.getMonth() + 1, 0).getDate();
404
+ return new Date(target.getFullYear(), target.getMonth(), Math.min(d.getDate(), lastDay));
405
+ }
406
+ BsDatepicker.style = bsDatepickerCss();
407
+
408
+ export { BsDatepicker as bs_datepicker };
@@ -69,7 +69,7 @@ const BsFileUploadItem = class {
69
69
  }
70
70
  render() {
71
71
  const removing = this.state === 'success';
72
- return (h("div", { key: 'd26aebbbdb7858444d2ff3084c421ce1e70acd9e', part: "item", class: `bs-file-upload-item bs-file-upload-item--${this.state}` }, h("div", { key: '2bf21442cc31bc9f85178e97bdae140de59fd7ce', part: "thumbnail", class: "bs-file-upload-item__thumbnail" }, h("slot", { key: 'fb9a9d723855e6d2556e61fb5cc7414e296ddf89', name: "thumbnail" }, this.thumbnailSrc ? (h("img", { class: "bs-file-upload-item__image", src: this.thumbnailSrc, alt: this.thumbnailAlt })) : (h(ImageIcon, null)))), h("div", { key: 'ca1cab03c21d93b4fe754e8e4575bbee5c6c11bd', class: "bs-file-upload-item__content" }, h("div", { key: '072532a7cfb4a699ab9920594ed4299bd094eea3', class: "bs-file-upload-item__meta" }, h("span", { key: 'f30ec89b3af9d5a4fc3ea2cf9252713f47a68ba2', part: "name", class: "bs-file-upload-item__name" }, this.fileName), this.fileSize && (h("span", { key: '63aeb6db94d78011a649fa1a0771d488890c330b', part: "size", class: "bs-file-upload-item__size" }, this.fileSize))), this.renderStatus()), h("bs-icon-button", { key: '5434d917777db308f8b16f84e2ccd5efcfb46dc8', part: "action", variant: "subtle", size: "lg", ariaLabel: removing ? this.removeLabel : this.cancelLabel, onClick: this.onAction }, removing ? h(TrashIcon, null) : h(CloseIcon, null))));
72
+ return (h("div", { key: '6b7fc89949cfa70838cc60d94ccb91afe09f75cd', part: "item", class: `bs-file-upload-item bs-file-upload-item--${this.state}` }, h("div", { key: '55923d2fc56d8b1794a3a0d835440cd428e1e168', part: "thumbnail", class: "bs-file-upload-item__thumbnail" }, h("slot", { key: '25f93a00ba465db98c73f1bf38abc46110ae5c82', name: "thumbnail" }, this.thumbnailSrc ? (h("img", { class: "bs-file-upload-item__image", src: this.thumbnailSrc, alt: this.thumbnailAlt })) : (h(ImageIcon, null)))), h("div", { key: 'ab975fe4e7e888755f9ceae00b6633f86b856c47', class: "bs-file-upload-item__content" }, h("div", { key: '6b1c9161edd76c799f0c545e2f939907bbb1dcee', class: "bs-file-upload-item__meta" }, h("span", { key: '3b7ca85e645d19b1ef1affff55a8e2a2284aff72', part: "name", class: "bs-file-upload-item__name" }, this.fileName), this.fileSize && (h("span", { key: '70dd2e29628bd536dac520ffe653bc7651f41c33', part: "size", class: "bs-file-upload-item__size" }, this.fileSize))), this.renderStatus()), h("bs-icon-button", { key: '5ac7e596601ebdb35add9e278f17f67db4758e48', part: "action", variant: "subtle", size: "lg", ariaLabel: removing ? this.removeLabel : this.cancelLabel, onClick: this.onAction }, removing ? h(TrashIcon, null) : h(CloseIcon, null))));
73
73
  }
74
74
  };
75
75
  // Figma exports, recolored via currentColor so the CSS tokens drive the color.
@@ -98,7 +98,7 @@ const BsFileUpload = class {
98
98
  this.handleFiles(files);
99
99
  };
100
100
  render() {
101
- return (h("div", { key: 'baa70a704a4c3508cd3186f567d0887218a9c04d', part: "dropzone", class: `bs-file-upload bs-file-upload--${this.direction} ${this.dragging ? 'bs-file-upload--dragging' : ''} ${this.disabled ? 'bs-file-upload--disabled' : ''}`, onDragEnter: this.onDragOver, onDragOver: this.onDragOver, onDragLeave: this.onDragLeave, onDrop: this.onDrop }, h("div", { key: 'c5fe3207ba56506a272c42097ec23881bcf863d4', part: "icon", class: "bs-file-upload__icon" }, h("slot", { key: 'd33d8f0f7b17bab679124823c61a1b7c6d031345', name: "icon" }, h(UploadIcon, { key: 'd0356e97a031867f323de21905a2bbca57963962' }))), h("div", { key: 'a5f4fb403556b2b596291bfddad2b73b1765f91f', class: "bs-file-upload__content" }, h("div", { key: 'b99afac250a8d40e54c97f74afde42620da2ff07', class: "bs-file-upload__text" }, this.heading && (h("span", { key: '33a2ce5aac1d8bf15c55dcf8ccfe4fbce6892fd1', part: "heading", class: "bs-file-upload__heading" }, this.heading)), this.description && (h("span", { key: 'eec7f2fcc598412107e7b9c78efae30a3714c674', part: "description", id: "description", class: "bs-file-upload__description" }, this.description))), h("bs-button", { key: 'f44a5747bb0e9452aefa1fe2fc1d51b1af7da9b1', part: "browse", variant: "neutral", size: "sm", disabled: this.disabled, onClick: this.onBrowse }, this.buttonLabel)), h("input", { key: 'c8e19f95978d103f535bf26fb64c34ff69c4c7ee', ref: el => (this.inputEl = el), class: "bs-file-upload__input", type: "file", hidden: true, tabindex: -1, accept: this.accept, multiple: this.multiple, disabled: this.disabled, "aria-describedby": this.description ? 'description' : undefined, onChange: this.onInputChange })));
101
+ return (h("div", { key: 'b33535fd240d2d406118fd64fd9c227dea7ecd6e', part: "dropzone", class: `bs-file-upload bs-file-upload--${this.direction} ${this.dragging ? 'bs-file-upload--dragging' : ''} ${this.disabled ? 'bs-file-upload--disabled' : ''}`, onDragEnter: this.onDragOver, onDragOver: this.onDragOver, onDragLeave: this.onDragLeave, onDrop: this.onDrop }, h("div", { key: '38cc0d7e10cbdfd9daef5749c2b50ec7c9123f71', part: "icon", class: "bs-file-upload__icon" }, h("slot", { key: '0e9cadb8101a73f55410eb30b2ddbf9c5e2cd0ed', name: "icon" }, h(UploadIcon, { key: '3f745666d0967ab5de4a6824a0fc8b3e0f7f900b' }))), h("div", { key: '7e347497915149907ade2e90aa19bd339b013be9', class: "bs-file-upload__content" }, h("div", { key: 'ea3a760d44b38cd5397d5952dbee998ddb2bea1b', class: "bs-file-upload__text" }, this.heading && (h("span", { key: '9e00cc05d2b479964502243e1dda32eb7fa81e42', part: "heading", class: "bs-file-upload__heading" }, this.heading)), this.description && (h("span", { key: 'abb9857cdd2c85a7730101d05a5704d947c669bd', part: "description", id: "description", class: "bs-file-upload__description" }, this.description))), h("bs-button", { key: '98dea0715d7c0c641c552025403febd13fe4c32f', part: "browse", variant: "neutral", size: "sm", disabled: this.disabled, onClick: this.onBrowse }, this.buttonLabel)), h("input", { key: '0c83fdaba93b46128e4990f9d15a746fd95479f5', ref: el => (this.inputEl = el), class: "bs-file-upload__input", type: "file", hidden: true, tabindex: -1, accept: this.accept, multiple: this.multiple, disabled: this.disabled, "aria-describedby": this.description ? 'description' : undefined, onChange: this.onInputChange })));
102
102
  }
103
103
  };
104
104
  // Figma's "UploadSimple" icon (3272:50330), exported SVG, recolored via currentColor.
@@ -47,7 +47,7 @@ const BsIconButton = class {
47
47
  form.reset();
48
48
  };
49
49
  render() {
50
- return (h("button", { key: '538cd121df25e20ea7e21a7b5269e73d275f8bff', class: `bs-icon-button bs-icon-button--${this.variant} bs-icon-button--${this.size}`, type: this.type, disabled: this.disabled, "aria-label": this.ariaLabel, onClick: this.onClick }, h("span", { key: '35548fe082134edb85dbdcb0caf820ec3b5233c2', part: "icon", class: "bs-icon-button__icon" }, h("slot", { key: '7f16ef5f2c08fc5d2bb852bd5c36598be5aa1175' }))));
50
+ return (h("button", { key: '433827a167fc7ce5183358c3e8469d68dd67788a', class: `bs-icon-button bs-icon-button--${this.variant} bs-icon-button--${this.size}`, type: this.type, disabled: this.disabled, "aria-label": this.ariaLabel, onClick: this.onClick }, h("span", { key: 'e7d50a6755e7e4de39db799abef38c118d888b98', part: "icon", class: "bs-icon-button__icon" }, h("slot", { key: 'a737620ca5d0baf69abc1964a160492c32359d09' }))));
51
51
  }
52
52
  static get delegatesFocus() { return true; }
53
53
  static get formAssociated() { return true; }
@@ -67,7 +67,7 @@ const BsInlineTab = class {
67
67
  };
68
68
  render() {
69
69
  const iconOnly = this.hasIcon && !this.hasLabel;
70
- return (h("button", { key: '0d6927b0b39a7d84add287e6473681e5052b5f2d', type: "button", part: "tab", role: "tab", class: `bs-inline-tab ${this.selected ? 'bs-inline-tab--selected' : ''} ${this.disabled ? 'bs-inline-tab--disabled' : ''} ${iconOnly ? 'bs-inline-tab--icon-only' : ''} ${this.hasIcon ? 'bs-inline-tab--has-icon' : ''}`, disabled: this.disabled, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? 'true' : undefined, "aria-label": this.ariaLabel, tabIndex: this.tabbable === undefined ? undefined : this.tabbable ? 0 : -1, onClick: this.onClick }, h("span", { key: '866660f0f79927cd018df42286719f2f48262cbb', part: "icon", class: `bs-inline-tab__icon ${this.hasIcon ? 'bs-inline-tab__icon--has-content' : ''}` }, h("slot", { key: '58e11c8a0a57646644cb0b7c950d73f5cee52310', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '38d2e1df2b4e494f68d3c4b9ea34d7a317401953', part: "label", class: `bs-inline-tab__label ${this.hasLabel ? 'bs-inline-tab__label--has-content' : ''}` }, h("slot", { key: '51fb6ec04479b18af787bca4e64f8105a0b19311', onSlotchange: this.onLabelSlotchange }))));
70
+ return (h("button", { key: '2b53f8013cdcd94dd7297ece3cff679d158a86a8', type: "button", part: "tab", role: "tab", class: `bs-inline-tab ${this.selected ? 'bs-inline-tab--selected' : ''} ${this.disabled ? 'bs-inline-tab--disabled' : ''} ${iconOnly ? 'bs-inline-tab--icon-only' : ''} ${this.hasIcon ? 'bs-inline-tab--has-icon' : ''}`, disabled: this.disabled, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? 'true' : undefined, "aria-label": this.ariaLabel, tabIndex: this.tabbable === undefined ? undefined : this.tabbable ? 0 : -1, onClick: this.onClick }, h("span", { key: '4e4832cffe54b28cdd68f7c35c9741dfe001b4d5', part: "icon", class: `bs-inline-tab__icon ${this.hasIcon ? 'bs-inline-tab__icon--has-content' : ''}` }, h("slot", { key: 'ccc3225b1a9047a0a346b8fb8bf6f02a63ecc988', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '95c8ac8ba725cf9ed20887dfee0c88d0dd0ce180', part: "label", class: `bs-inline-tab__label ${this.hasLabel ? 'bs-inline-tab__label--has-content' : ''}` }, h("slot", { key: 'f9551ac1fe994a7e66fe48d23b39f2936c6b5a37', onSlotchange: this.onLabelSlotchange }))));
71
71
  }
72
72
  };
73
73
  BsInlineTab.style = bsInlineTabCss();
@@ -286,7 +286,10 @@ const BsInput = class {
286
286
  }
287
287
  renderStandardControl() {
288
288
  const nativeType = this.type === 'password' ? (this.passwordVisible ? 'text' : 'password') : this.type === 'dropdown' ? 'text' : this.type;
289
- return (h("input", { id: "control", part: "control", class: "bs-input__control", type: nativeType, value: this.value, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.type === 'dropdown', min: this.type === 'number' ? this.min : undefined, max: this.type === 'number' ? this.max : undefined, step: this.type === 'number' ? this.step : undefined, "aria-describedby": this.error || this.description ? 'description-or-error' : undefined, "aria-invalid": this.error ? 'true' : undefined, "aria-required": this.required ? 'true' : undefined, onInput: this.onInput, onChange: this.onChange }));
289
+ return (h("input", { id: "control", part: "control", class: "bs-input__control", type: nativeType, value: this.value, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.type === 'dropdown',
290
+ // The popup state belongs on the focusable control (a roleless wrapper div can't carry
291
+ // aria-haspopup/aria-expanded -- axe's aria-allowed-attr flags it).
292
+ role: this.type === 'dropdown' ? 'combobox' : undefined, "aria-haspopup": this.type === 'dropdown' ? 'listbox' : undefined, "aria-expanded": this.type === 'dropdown' ? String(this.open) : undefined, min: this.type === 'number' ? this.min : undefined, max: this.type === 'number' ? this.max : undefined, step: this.type === 'number' ? this.step : undefined, "aria-describedby": this.error || this.description ? 'description-or-error' : undefined, "aria-invalid": this.error ? 'true' : undefined, "aria-required": this.required ? 'true' : undefined, onInput: this.onInput, onChange: this.onChange }));
290
293
  }
291
294
  renderSelectControl() {
292
295
  return (h("select", { id: "control", part: "control", class: "bs-input__control", disabled: this.disabled, "aria-describedby": this.error || this.description ? 'description-or-error' : undefined, "aria-invalid": this.error ? 'true' : undefined, "aria-required": this.required ? 'true' : undefined, onInput: this.onInput, onChange: this.onChange }, this.options.map(opt => (h("option", { value: opt.value, selected: opt.value === this.value }, opt.label)))));
@@ -346,7 +349,7 @@ const BsInput = class {
346
349
  .filter(Boolean)
347
350
  .join(' ');
348
351
  const isDropdown = this.type === 'dropdown';
349
- return (h("div", { class: "bs-input__field-wrapper" }, h("div", { part: "field", class: fieldClasses, onClick: isDropdown ? this.onDropdownToggle : undefined, onKeyDown: isDropdown ? this.onDropdownKeydown : undefined, "aria-haspopup": isDropdown ? 'listbox' : undefined, "aria-expanded": isDropdown ? String(this.open) : undefined }, h("span", { part: "icon", class: `bs-input__icon ${this.showsIconArea ? 'bs-input__icon--visible' : ''}` }, this.renderIconContent()), this.renderControl(), h("span", { part: "end-icon", class: `bs-input__end-icon ${this.showsEndIconArea ? 'bs-input__end-icon--visible' : ''}` }, this.renderEndIconContent())), isDropdown && this.open && this.options.length > 0 && (h("bs-menu", { part: "menu", class: "bs-input__dropdown-menu", role: "listbox" }, this.options.map(option => (h("bs-menu-item", { key: option.value, onBsSelect: this.onDropdownOptionSelect(option) }, option.label)))))));
352
+ return (h("div", { class: "bs-input__field-wrapper" }, h("div", { part: "field", class: fieldClasses, onClick: isDropdown ? this.onDropdownToggle : undefined, onKeyDown: isDropdown ? this.onDropdownKeydown : undefined }, h("span", { part: "icon", class: `bs-input__icon ${this.showsIconArea ? 'bs-input__icon--visible' : ''}` }, this.renderIconContent()), this.renderControl(), h("span", { part: "end-icon", class: `bs-input__end-icon ${this.showsEndIconArea ? 'bs-input__end-icon--visible' : ''}` }, this.renderEndIconContent())), isDropdown && this.open && this.options.length > 0 && (h("bs-menu", { part: "menu", class: "bs-input__dropdown-menu", role: "listbox" }, this.options.map(option => (h("bs-menu-item", { key: option.value, onBsSelect: this.onDropdownOptionSelect(option) }, option.label)))))));
350
353
  }
351
354
  renderPinField() {
352
355
  this.pinInputs = [];
@@ -355,10 +358,10 @@ const BsInput = class {
355
358
  return (h("div", { part: "field", class: `bs-input__field bs-input__field--pin ${errorClass} ${disabledClass}` }, Array.from({ length: this.length }).map((_, i) => (h("input", { id: i === 0 ? 'control' : undefined, ref: el => (this.pinInputs[i] = el), part: "control", class: "bs-input__pin-cell", type: "text", inputMode: "numeric", maxLength: 1, value: this.value[i] ?? '', disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, onInput: this.onPinInput(i), onKeyDown: this.onPinKeydown(i) })))));
356
359
  }
357
360
  render() {
358
- return (h("div", { key: '1149cfe8eaa6085007a8d9a963b6c909bb6cda13', class: `bs-input ${this.error ? 'bs-input--error' : ''}` }, this.label && (
361
+ return (h("div", { key: '70497bf30b0a244e1df36075d0db77cec5345d6c', class: `bs-input ${this.error ? 'bs-input--error' : ''}` }, this.label && (
359
362
  // "control" is a fixed id, not a generated one -- safe because Shadow DOM scopes ids
360
363
  // to this instance's own shadow root, so it can never collide with another bs-input.
361
- h("label", { key: 'd737018c1e1ebcde529710d8ea58c6bed76f2abf', part: "label", class: "bs-input__label", htmlFor: "control" }, this.label, this.required && (h("span", { key: '5993b19cbfcb8725550c1292c00795c8463e554c', part: "required", class: "bs-input__required", "aria-hidden": "true" }, "*")))), this.type === 'pin' ? this.renderPinField() : this.type === 'initials' ? this.renderInitialsField() : this.renderField(), this.error ? (h("span", { id: "description-or-error", part: "error", class: "bs-input__error" }, h("svg", { part: "error-icon", class: "bs-input__error-icon", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, h("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", "stroke-width": "1.2" }), h("path", { d: "M8 5V8.5", stroke: "currentColor", "stroke-width": "1.2", "stroke-linecap": "round" }), h("circle", { cx: "8", cy: "11", r: "0.75", fill: "currentColor" })), this.error)) : this.description ? (h("span", { id: "description-or-error", part: "description", class: "bs-input__description" }, this.description)) : null));
364
+ h("label", { key: '527e0d146170d9d11a004d452fa2cb363c5cc7d2', part: "label", class: "bs-input__label", htmlFor: "control" }, this.label, this.required && (h("span", { key: '9dd54a626ec80c774d6deacc3c9dcf02d1fef8a9', part: "required", class: "bs-input__required", "aria-hidden": "true" }, "*")))), this.type === 'pin' ? this.renderPinField() : this.type === 'initials' ? this.renderInitialsField() : this.renderField(), this.error ? (h("span", { id: "description-or-error", part: "error", class: "bs-input__error" }, h("svg", { part: "error-icon", class: "bs-input__error-icon", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, h("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", "stroke-width": "1.2" }), h("path", { d: "M8 5V8.5", stroke: "currentColor", "stroke-width": "1.2", "stroke-linecap": "round" }), h("circle", { cx: "8", cy: "11", r: "0.75", fill: "currentColor" })), this.error)) : this.description ? (h("span", { id: "description-or-error", part: "description", class: "bs-input__description" }, this.description)) : null));
362
365
  }
363
366
  static get delegatesFocus() { return true; }
364
367
  static get formAssociated() { return true; }
@@ -379,4 +382,33 @@ const BsInput = class {
379
382
  };
380
383
  BsInput.style = bsInputCss();
381
384
 
382
- export { BsInput as bs_input };
385
+ const bsMenuItemCss = () => `:host{display:block;--bs-menu-item-radius:var(--bs-border-radius-100);--bs-menu-item-padding-y:var(--bs-spacing-100);--bs-menu-item-padding-x:var(--bs-spacing-150);--bs-menu-item-gap:var(--bs-spacing-100);--bs-menu-item-hover:var(--bs-color-neutral-container-hover);--bs-menu-item-pressed:var(--bs-color-neutral-container-pressed);--bs-menu-item-disabled-bg:var(--bs-surface-action-disabled);--bs-menu-item-icon-color:var(--bs-icon-default);--bs-menu-item-icon-color-disabled:var(--bs-icon-disabled);--bs-menu-item-color:var(--bs-text-muted);--bs-menu-item-color-disabled:var(--bs-text-on-disabled);--bs-menu-item-font-size:var(--bs-font-size-md);--bs-menu-item-line-height:var(--bs-line-height-body-md)}.bs-menu-item{box-sizing:border-box;display:flex;align-items:center;width:100%;height:48px;border:none;cursor:pointer;background:transparent;color:var(--bs-menu-item-color);font-family:inherit;border-radius:var(--bs-menu-item-radius);padding:var(--bs-menu-item-padding-y) var(--bs-menu-item-padding-x);gap:var(--bs-menu-item-gap);transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-menu-item:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}.bs-menu-item:hover{background:var(--bs-menu-item-hover)}.bs-menu-item:active{background:var(--bs-menu-item-pressed)}.bs-menu-item--disabled{background:var(--bs-menu-item-disabled-bg);color:var(--bs-menu-item-color-disabled);cursor:not-allowed}.bs-menu-item--disabled:hover,.bs-menu-item--disabled:active{background:var(--bs-menu-item-disabled-bg)}.bs-menu-item--disabled .bs-menu-item__icon{color:var(--bs-menu-item-icon-color-disabled)}.bs-menu-item__icon{display:none;width:24px;height:24px;flex-shrink:0;color:var(--bs-menu-item-icon-color)}.bs-menu-item__icon--has-content{display:inline-flex;align-items:center;justify-content:center}.bs-menu-item__icon ::slotted(svg){width:24px;height:24px}.bs-menu-item__label{font-size:var(--bs-menu-item-font-size);line-height:calc(var(--bs-menu-item-line-height) * 1px);white-space:nowrap}`;
386
+
387
+ const BsMenuItem = class {
388
+ constructor(hostRef) {
389
+ registerInstance(this, hostRef);
390
+ this.bsSelect = createEvent(this, "bsSelect");
391
+ }
392
+ /** Disables the item: no hover/pressed/focus styling, no pointer cursor, not reachable by
393
+ * keyboard tabbing, and clicking it does not emit `bsSelect`. */
394
+ disabled = false;
395
+ /** Tracks whether the `icon` slot has assigned content, so the icon wrapper (and its gap) only
396
+ * renders when there's actually an icon to show. */
397
+ hasIcon = false;
398
+ /** Fires when the item is clicked. */
399
+ bsSelect;
400
+ onIconSlotchange = (ev) => {
401
+ this.hasIcon = ev.target.assignedNodes().length > 0;
402
+ };
403
+ onClick = () => {
404
+ if (this.disabled)
405
+ return;
406
+ this.bsSelect.emit();
407
+ };
408
+ render() {
409
+ return (h("button", { key: '5aabea2ec3ad0181e3ff53b3f22873563da69ccd', 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: '7e180921d99d4f430d72d8dbfeda0ca00881b74a', part: "icon", class: `bs-menu-item__icon ${this.hasIcon ? 'bs-menu-item__icon--has-content' : ''}` }, h("slot", { key: '9d6d15f2d51c271de699b0101f781d8c0f3ab7e9', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '88645fe2991eb91a145e33a4f5e5e59a9ade3248', part: "label", class: "bs-menu-item__label" }, h("slot", { key: 'd3cc0ffcf0f354ffa9c48cbc88a99ec99d4f2db4' }))));
410
+ }
411
+ };
412
+ BsMenuItem.style = bsMenuItemCss();
413
+
414
+ export { BsInput as bs_input, BsMenuItem as bs_menu_item };
@@ -29,7 +29,7 @@ const BsMenu = class {
29
29
  items[next].shadowRoot?.querySelector('button')?.focus();
30
30
  }
31
31
  render() {
32
- return (h("div", { key: '4f2995d0f53f85656de8595fb6a9909833c6369d', part: "list", class: "bs-menu", role: "menu" }, h("slot", { key: '0824f2a784eb4cfa28a2868f19c056570b56ba63' })));
32
+ return (h("div", { key: '24e54ac14b17bc1e45bcd5d7d0fda3250350672a', part: "list", class: "bs-menu", role: "menu" }, h("slot", { key: '57e28eafbb83da6bb14dfe588793edd33b2b5316' })));
33
33
  }
34
34
  };
35
35
  BsMenu.style = bsMenuCss();
@@ -91,7 +91,7 @@ const BsNavigationDrawerItem = class {
91
91
  // incorrectly also toggle this parent row on every child click. Both are wrapped in a
92
92
  // `display: contents` container so render() still returns a single root node (this codebase's
93
93
  // convention, e.g. bs-input.tsx) without that wrapper affecting layout at all.
94
- return (h("div", { key: '34d31ff7c612fa135b6dc14b757d66d4b00f99e4', class: "bs-navigation-drawer-item__root" }, h("button", { key: '08e244c8ada605dc7705df5b1d45ebce80165f3e', type: "button", part: "item", class: rowClasses, "aria-expanded": this.expandable ? String(this.expanded) : undefined, "aria-label": this.ariaLabel ?? undefined, onClick: this.onClick }, !this.nested && (h("span", { key: 'a6e09b5edb35ec8f76ed6d6a78ddd1eb141f87b6', part: "icon", class: `bs-navigation-drawer-item__icon ${this.hasIcon ? 'bs-navigation-drawer-item__icon--has-content' : ''}` }, h("slot", { key: '851289379dacae965639ed7963d800c8a92472c2', name: "icon", onSlotchange: this.onIconSlotchange }))), h("span", { key: '4b46c2ca6a5bf4d5e777ae72c9ea826ffcffea02', part: "label", class: "bs-navigation-drawer-item__label" }, h("slot", { key: 'df214a2bcea435a678c18d0f461d9011c767a995' })), this.expandable && (h("span", { key: 'd12e91043617e96567acd5497a53dd98c612c6af', part: "chevron", class: `bs-navigation-drawer-item__chevron ${this.expanded ? 'bs-navigation-drawer-item__chevron--expanded' : ''}` }, h(ChevronDownIcon, { key: 'c278774ae33cf86e7d1b3f70f4e99b8c7afc4d68' })))), this.expandable && (h("span", { key: '85081ed698d078b94225c7b984eaee1edfd22b49', part: "children", class: "bs-navigation-drawer-item__children" }, h("slot", { key: '85c22788467a67f18b9cca6018c179a28d06fa19', name: "children" })))));
94
+ return (h("div", { key: 'a62142391a3302dd6379135af11aa3215786df60', class: "bs-navigation-drawer-item__root" }, h("button", { key: '859f32bb1588ec661fea55d405a60a20e803b969', type: "button", part: "item", class: rowClasses, "aria-expanded": this.expandable ? String(this.expanded) : undefined, "aria-label": this.ariaLabel ?? undefined, onClick: this.onClick }, !this.nested && (h("span", { key: '0191eb506a8fa145732fb250d52d1ad650ea9a0f', part: "icon", class: `bs-navigation-drawer-item__icon ${this.hasIcon ? 'bs-navigation-drawer-item__icon--has-content' : ''}` }, h("slot", { key: '29bfc6b85d32172ac4f92ca482ffcbf71ed2158c', name: "icon", onSlotchange: this.onIconSlotchange }))), h("span", { key: 'd5e681c8dfc6b8517a01caea2daa49089ef73994', part: "label", class: "bs-navigation-drawer-item__label" }, h("slot", { key: '6f60e5831a064caae85747d6c6b735912abc9a3c' })), this.expandable && (h("span", { key: '37eebaa53518961ac10e37abe8a6f68e1066b173', part: "chevron", class: `bs-navigation-drawer-item__chevron ${this.expanded ? 'bs-navigation-drawer-item__chevron--expanded' : ''}` }, h(ChevronDownIcon, { key: '5c212defdf0226202d710f799dbf380aca087ff6' })))), this.expandable && (h("span", { key: 'abc9eb5ca2161706511b3691c71d5fedd33ee74f', part: "children", class: "bs-navigation-drawer-item__children" }, h("slot", { key: '9b501d624d2bd055e4a71848d08dfb7198e17ece', name: "children" })))));
95
95
  }
96
96
  };
97
97
  // 16x16 native viewBox (not a 24x24 icon scaled down) -- authored directly at display size, per
@@ -172,11 +172,11 @@ const BsNavigationDrawer = class {
172
172
  };
173
173
  render() {
174
174
  const classes = ['bs-navigation-drawer', this.mobile ? 'bs-navigation-drawer--overlay' : '', this.overlayOpen ? 'bs-navigation-drawer--open' : ''].filter(Boolean).join(' ');
175
- return (h(Host, { key: '94c3fbfb2d9826979f2f90ec0c9571aadc484450', "data-overlay": this.mobile ? '' : undefined }, this.mobile && h("div", { key: 'cc8b62b02a561dfbb0a15918e4bbbf241919ea7d', part: "backdrop", class: "bs-navigation-drawer__backdrop", onClick: this.requestClose }), h("nav", { key: 'ad3e970438fca27636992cc434584bfae7888895', ref: el => (this.navRef = el), class: classes, "aria-label": this.heading,
175
+ return (h(Host, { key: 'c1e563e7b2a9474286671a3f6e1f2d3aed312620', "data-overlay": this.mobile ? '' : undefined }, this.mobile && h("div", { key: 'f6885e88df1607bb9e85a27c4e1cb616ce6b6c0d', part: "backdrop", class: "bs-navigation-drawer__backdrop", onClick: this.requestClose }), h("nav", { key: 'a3086b5203fd3724fce5fe82be394a77a6d9a1e1', ref: el => (this.navRef = el), class: classes, "aria-label": this.heading,
176
176
  // Stays a plain <nav> landmark in every state: ARIA does not allow role="dialog" on <nav>
177
177
  // (axe: aria-allowed-role). Modality is behavioral -- focus is held inside, the page behind is
178
178
  // scrimmed, Escape closes -- rather than announced through aria-modal.
179
- tabIndex: this.mobile ? -1 : undefined }, this.showLogo && (h("div", { key: '41552cc9bc1fd33081119b6b6a475e9a81281e97', part: "logo", class: "bs-navigation-drawer__logo bs-navigation-drawer__logo--full" }, h("bs-logo", { key: '96503cee7e467c535747171f46ab8b36f2d9262a', variant: "full", background: this.logoBackground }))), this.showLogo && (h("div", { key: '6b4e91b0296772ea492a2e12c1f81933be1af02b', part: "logo", class: "bs-navigation-drawer__logo bs-navigation-drawer__logo--mark" }, h("bs-logo", { key: '72c4cae8f25aebef923d2b346ee3a3224a1a4550', variant: "mark", background: this.logoBackground }))), h("div", { key: '2fde5f92e629d34321e0e0e6eaf776027614836a', class: "bs-navigation-drawer__title-row" }, h("span", { key: 'fde5717eeec30bbade48f574e44f9eec841bab36', part: "title", class: "bs-navigation-drawer__title" }, this.heading), this.collapsible && (h("button", { key: '59d514aec296c5b4eb459de259aa29d77a435ecf', type: "button", part: "collapse", class: "bs-navigation-drawer__collapse", "aria-label": this.collapsed ? 'Expand' : 'Collapse', "aria-pressed": this.collapsed ? 'true' : 'false', onClick: this.onCollapseClick }, h(CaretLeftIcon, { key: 'a992c1fcaa3e143ee9f1469958eeab12e03bce03' })))), h("div", { key: '1a74885abe2e50b3a6eccd7d4cacca4582dc5fa9', part: "search", class: "bs-navigation-drawer__search" }, h("slot", { key: 'ac98f9ca62a289e21fcbf0f005c6c0f7e02d9967', name: "search" })), h("button", { key: 'c7c50e5cf2c81ec8445a557505faf2ea40add094', type: "button", part: "search-trigger", class: "bs-navigation-drawer__search-trigger", "aria-label": "Search", onClick: this.onSearchTriggerClick }, h(SearchIcon, { key: '538bcfc474036d2c79fe821011490bf7cbd4d018' })), h("div", { key: '1a7aa824a99823b2d06309c5192a200afe378a7b', part: "items", class: "bs-navigation-drawer__items" }, h("slot", { key: '1a79d4f0e809b16a9d19efb06d36052c0539bba2' })))));
179
+ tabIndex: this.mobile ? -1 : undefined }, this.showLogo && (h("div", { key: 'c1b8700d6936ae14acf900d3cc83c6a8a7d79a20', part: "logo", class: "bs-navigation-drawer__logo bs-navigation-drawer__logo--full" }, h("bs-logo", { key: '27f4205dcdd609c4709a09dbeb7d4d59a41340db', variant: "full", background: this.logoBackground }))), this.showLogo && (h("div", { key: 'b8474734a50dbd690a9a8d8febd6cda084498d02', part: "logo", class: "bs-navigation-drawer__logo bs-navigation-drawer__logo--mark" }, h("bs-logo", { key: 'c89909a16f7255d24ddaae54ddd2c6cfca361572', variant: "mark", background: this.logoBackground }))), h("div", { key: '83b7641c3c1f8b8307bf8006bbef147ccfdc917c', class: "bs-navigation-drawer__title-row" }, h("span", { key: '97075d0df805b02f3f520c42ef4eceaa377e7064', part: "title", class: "bs-navigation-drawer__title" }, this.heading), this.collapsible && (h("button", { key: '184f4f2f35f74f145621d2854a6a50e52006ebd1', type: "button", part: "collapse", class: "bs-navigation-drawer__collapse", "aria-label": this.collapsed ? 'Expand' : 'Collapse', "aria-pressed": this.collapsed ? 'true' : 'false', onClick: this.onCollapseClick }, h(CaretLeftIcon, { key: '168c4a4f30f9cf92afd5cffc63e989e0a3d4e45a' })))), h("div", { key: 'd93ec72e4f6ba6f01d4fdc8fc3d9e0c9f0649242', part: "search", class: "bs-navigation-drawer__search" }, h("slot", { key: '3441fb753d206b84e68bb777e60ec849185882b9', name: "search" })), h("button", { key: '98b3bf5e4807afb1ba5a91e2b5238d917f584ab8', type: "button", part: "search-trigger", class: "bs-navigation-drawer__search-trigger", "aria-label": "Search", onClick: this.onSearchTriggerClick }, h(SearchIcon, { key: 'c61c32465503084caab0b3741bc95e3f0f274214' })), h("div", { key: 'f75111a609795d6ed83e3e843a433440a932b730', part: "items", class: "bs-navigation-drawer__items" }, h("slot", { key: '50f7cee1ae4e352b56561740bfc6ff035d521354' })))));
180
180
  }
181
181
  static get watchers() { return {
182
182
  "collapsed": [{