bitboss-ui 3.0.0-beta.4 → 3.0.0-beta.41

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 (937) hide show
  1. package/README.md +317 -98
  2. package/bin/bitboss-ui-mcp.mjs +1566 -75
  3. package/bin/bitboss-ui.mjs +716 -72
  4. package/dist/ai/BbAccordion.md +178 -56
  5. package/dist/ai/BbAlert.md +140 -28
  6. package/dist/ai/BbAsterisk.md +61 -4
  7. package/dist/ai/BbAvatar.md +194 -53
  8. package/dist/ai/BbBadge.md +250 -50
  9. package/dist/ai/BbBadgeButton.md +74 -21
  10. package/dist/ai/BbBaseButton.md +132 -51
  11. package/dist/ai/BbBaseCheckboxIcon.md +118 -26
  12. package/dist/ai/BbBaseRadioIcon.md +115 -26
  13. package/dist/ai/BbBaseSwitchIcon.md +123 -28
  14. package/dist/ai/BbBreadcrumbs.md +221 -51
  15. package/dist/ai/BbButton.md +389 -107
  16. package/dist/ai/BbCalendar.md +667 -0
  17. package/dist/ai/BbCheckbox.md +242 -80
  18. package/dist/ai/BbCheckboxGroup.md +575 -66
  19. package/dist/ai/BbCollapsible.md +158 -39
  20. package/dist/ai/BbColorInput.md +322 -82
  21. package/dist/ai/BbColorPalette.md +261 -61
  22. package/dist/ai/BbConfirm.md +220 -51
  23. package/dist/ai/BbConfirmPortal.md +1 -1
  24. package/dist/ai/BbDatePicker.md +272 -37
  25. package/dist/ai/BbDatePickerInput.md +321 -92
  26. package/dist/ai/BbDialog.md +492 -87
  27. package/dist/ai/BbDropdown.md +1182 -104
  28. package/dist/ai/BbDropdownButton.md +239 -61
  29. package/dist/ai/BbDropdownGroup.md +5 -5
  30. package/dist/ai/BbDropzone.md +140 -36
  31. package/dist/ai/BbForm.md +1165 -40
  32. package/dist/ai/BbIcon.md +100 -33
  33. package/dist/ai/BbIndicator.md +79 -12
  34. package/dist/ai/BbNumberInput.md +257 -87
  35. package/dist/ai/BbOffCanvas.md +396 -91
  36. package/dist/ai/BbPagination.md +199 -32
  37. package/dist/ai/BbPopover.md +219 -54
  38. package/dist/ai/BbProgress.md +137 -71
  39. package/dist/ai/BbPtScope.md +136 -0
  40. package/dist/ai/BbRadio.md +234 -43
  41. package/dist/ai/BbRadioGroup.md +529 -91
  42. package/dist/ai/BbRating.md +243 -61
  43. package/dist/ai/BbSelect.md +690 -120
  44. package/dist/ai/BbSelectPopover.md +434 -122
  45. package/dist/ai/BbSlider.md +275 -79
  46. package/dist/ai/BbSmoothHeight.md +142 -34
  47. package/dist/ai/BbSpinner.md +179 -81
  48. package/dist/ai/BbSwitch.md +249 -63
  49. package/dist/ai/BbSwitchGroup.md +394 -65
  50. package/dist/ai/BbTable.md +1666 -222
  51. package/dist/ai/BbTabs.md +898 -178
  52. package/dist/ai/BbTabsList.md +81 -7
  53. package/dist/ai/BbTabsPanels.md +77 -0
  54. package/dist/ai/BbTabsRoot.md +16 -15
  55. package/dist/ai/BbTag.md +256 -76
  56. package/dist/ai/BbTextInput.md +480 -102
  57. package/dist/ai/BbTextarea.md +310 -96
  58. package/dist/ai/BbTimePicker.md +159 -24
  59. package/dist/ai/BbTimePickerInput.md +277 -46
  60. package/dist/ai/BbToast.md +286 -40
  61. package/dist/ai/BbToastPortal.md +3 -3
  62. package/dist/ai/BbTooltip.md +187 -34
  63. package/dist/ai/BbTree.md +260 -85
  64. package/dist/ai/ChipsBox.md +43 -2
  65. package/dist/ai/ClearableButton.md +12 -0
  66. package/dist/ai/CommaBox.md +2 -1
  67. package/dist/ai/CommonField.md +63 -0
  68. package/dist/ai/CommonFieldInput.md +90 -0
  69. package/dist/ai/CommonPopover.md +17 -12
  70. package/dist/ai/CommonTimeSelector.md +63 -0
  71. package/dist/ai/ErrorIcon.md +20 -0
  72. package/dist/ai/FlatListBox.md +41 -11
  73. package/dist/ai/GroupedListBox.md +42 -12
  74. package/dist/ai/ListBox.md +46 -11
  75. package/dist/ai/OptionsContainer.md +13 -10
  76. package/dist/ai/WarningIcon.md +20 -0
  77. package/dist/ai/changelog.json +4025 -141
  78. package/dist/ai/components.json +51872 -10136
  79. package/dist/ai/composables/useBbConfig.md +72 -11
  80. package/dist/ai/composables/useBbDropdownContext.md +168 -0
  81. package/dist/ai/composables/useBbFormContext.md +51 -24
  82. package/dist/ai/composables/useBbFormField.md +134 -0
  83. package/dist/ai/composables/useBbTableContext.md +41 -19
  84. package/dist/ai/composables/useConfirm.md +16 -8
  85. package/dist/ai/composables/useCountdown.md +1 -1
  86. package/dist/ai/composables/useId.md +10 -10
  87. package/dist/ai/composables/useMobile.md +17 -10
  88. package/dist/ai/composables/useToast.md +25 -19
  89. package/dist/ai/design-tokens.json +940 -0
  90. package/dist/ai/design-tokens.manifest.yaml +175 -0
  91. package/dist/ai/guides/agent-contract.md +168 -22
  92. package/dist/ai/guides/ai-router.md +79 -40
  93. package/dist/ai/guides/app-layout.md +8 -4
  94. package/dist/ai/guides/coherence-playbook.md +8 -8
  95. package/dist/ai/guides/component-picker.md +42 -34
  96. package/dist/ai/guides/design-language.md +274 -97
  97. package/dist/ai/guides/design-tokens.md +493 -105
  98. package/dist/ai/guides/fetch-items-playbook.md +22 -16
  99. package/dist/ai/guides/icons-policy.md +67 -35
  100. package/dist/ai/guides/inertia-helpers.md +4 -1
  101. package/dist/ai/guides/inline-edit-playbook.md +13 -6
  102. package/dist/ai/guides/installation-and-plugin-setup.md +817 -73
  103. package/dist/ai/guides/migration/components/bb-accordion.md +37 -0
  104. package/dist/ai/guides/migration/components/bb-alert.md +2 -2
  105. package/dist/ai/guides/migration/components/bb-avatar.md +13 -14
  106. package/dist/ai/guides/migration/components/bb-badge.md +5 -5
  107. package/dist/ai/guides/migration/components/bb-breadcrumbs.md +9 -8
  108. package/dist/ai/guides/migration/components/bb-button.md +80 -20
  109. package/dist/ai/guides/migration/components/bb-checkbox-group.md +116 -29
  110. package/dist/ai/guides/migration/components/bb-checkbox.md +53 -10
  111. package/dist/ai/guides/migration/components/bb-chip.md +6 -6
  112. package/dist/ai/guides/migration/components/bb-collapsible.md +5 -5
  113. package/dist/ai/guides/migration/components/bb-color-input.md +5 -5
  114. package/dist/ai/guides/migration/components/bb-color-palette.md +16 -9
  115. package/dist/ai/guides/migration/components/bb-date-picker-input.md +45 -35
  116. package/dist/ai/guides/migration/components/bb-dialog.md +69 -36
  117. package/dist/ai/guides/migration/components/bb-dropdown-button.md +7 -1
  118. package/dist/ai/guides/migration/components/bb-dropdown.md +31 -8
  119. package/dist/ai/guides/migration/components/bb-dropzone.md +8 -0
  120. package/dist/ai/guides/migration/components/bb-icon.md +7 -7
  121. package/dist/ai/guides/migration/components/bb-intersection.md +1 -1
  122. package/dist/ai/guides/migration/components/bb-offcanvas.md +29 -31
  123. package/dist/ai/guides/migration/components/bb-pagination.md +10 -0
  124. package/dist/ai/guides/migration/components/bb-popover.md +19 -11
  125. package/dist/ai/guides/migration/components/bb-radio-group.md +14 -0
  126. package/dist/ai/guides/migration/components/bb-rating.md +61 -24
  127. package/dist/ai/guides/migration/components/bb-select-popover.md +9 -1
  128. package/dist/ai/guides/migration/components/bb-select.md +21 -4
  129. package/dist/ai/guides/migration/components/bb-slider.md +14 -6
  130. package/dist/ai/guides/migration/components/bb-switch-group.md +14 -0
  131. package/dist/ai/guides/migration/components/bb-table.md +574 -33
  132. package/dist/ai/guides/migration/components/bb-tabs.md +91 -41
  133. package/dist/ai/guides/migration/components/bb-tag.md +9 -7
  134. package/dist/ai/guides/migration/components/bb-text-input.md +12 -12
  135. package/dist/ai/guides/migration/components/bb-toast.md +2 -2
  136. package/dist/ai/guides/migration/components/bb-tooltip.md +18 -0
  137. package/dist/ai/guides/migration/components/bb-tree.md +11 -9
  138. package/dist/ai/guides/migration/components/use-confirm.md +9 -1
  139. package/dist/ai/guides/migration/v2-to-v3.md +828 -240
  140. package/dist/ai/guides/migration/v3-beta-css-classes.md +751 -0
  141. package/dist/ai/guides/migration/v3-beta-tooling.md +119 -0
  142. package/dist/ai/guides/options-items-playbook.md +161 -12
  143. package/dist/ai/guides/page-shell.md +1 -1
  144. package/dist/ai/guides/passthrough.md +958 -0
  145. package/dist/ai/guides/preset-components.md +361 -0
  146. package/dist/ai/guides/ssr-prefill.md +127 -0
  147. package/dist/ai/guides/validated-forms.md +466 -55
  148. package/dist/ai/guides/validation-libraries.md +171 -0
  149. package/dist/ai/guides/validation-providers.md +113 -0
  150. package/dist/ai/index.md +45 -44
  151. package/dist/ai/recipes/inertia/approvals-inbox.md +26 -10
  152. package/dist/ai/recipes/inertia/command-palette.md +2 -2
  153. package/dist/ai/recipes/inertia/inline-edit-workspace.md +46 -30
  154. package/dist/ai/recipes/inertia/layout-scaffold.md +6 -2
  155. package/dist/ai/recipes/inertia/onboarding.md +30 -8
  156. package/dist/ai/recipes/inertia/ownership-atlas.md +72 -49
  157. package/dist/ai/recipes/inertia/record-form.md +53 -19
  158. package/dist/ai/recipes/inertia/records-workspace.md +201 -49
  159. package/dist/ai/recipes/inertia/settings-workspace.md +3809 -0
  160. package/dist/ai/recipes/inertia/upload-center.md +54 -43
  161. package/dist/ai/recipes/inertia/wizard-form.md +98 -14
  162. package/dist/ai/recipes/nuxt/approvals-inbox.md +26 -10
  163. package/dist/ai/recipes/nuxt/command-palette.md +2 -2
  164. package/dist/ai/recipes/nuxt/inline-edit-workspace.md +68 -52
  165. package/dist/ai/recipes/nuxt/layout-scaffold.md +6 -2
  166. package/dist/ai/recipes/nuxt/onboarding.md +30 -8
  167. package/dist/ai/recipes/nuxt/record-form.md +66 -22
  168. package/dist/ai/recipes/nuxt/records-workspace.md +199 -48
  169. package/dist/ai/recipes/nuxt/settings-workspace.md +3898 -0
  170. package/dist/ai/recipes/nuxt/upload-center.md +52 -41
  171. package/dist/ai/recipes/nuxt/wizard-form.md +98 -14
  172. package/dist/ai/recipes/vue/approvals-inbox.md +28 -12
  173. package/dist/ai/recipes/vue/command-palette.md +2 -2
  174. package/dist/ai/recipes/vue/inline-edit-workspace.md +69 -53
  175. package/dist/ai/recipes/vue/layout-scaffold.md +6 -2
  176. package/dist/ai/recipes/vue/onboarding.md +32 -8
  177. package/dist/ai/recipes/vue/record-form.md +81 -54
  178. package/dist/ai/recipes/vue/records-workspace.md +198 -49
  179. package/dist/ai/recipes/vue/settings-workspace.md +3836 -0
  180. package/dist/ai/recipes/vue/upload-center.md +53 -42
  181. package/dist/ai/recipes/vue/wizard-form.md +97 -14
  182. package/dist/ai/source/BbAccordion.md +90 -24
  183. package/dist/ai/source/BbAlert.md +209 -62
  184. package/dist/ai/source/BbAsterisk.md +54 -4
  185. package/dist/ai/source/BbAvatar.md +73 -16
  186. package/dist/ai/source/BbBadge.md +265 -97
  187. package/dist/ai/source/BbBadgeButton.md +218 -79
  188. package/dist/ai/source/BbBaseButton.md +108 -12
  189. package/dist/ai/source/BbBaseCheckboxIcon.md +151 -36
  190. package/dist/ai/source/BbBaseRadioIcon.md +121 -17
  191. package/dist/ai/source/BbBaseSwitchIcon.md +138 -28
  192. package/dist/ai/source/BbBreadcrumbs.md +363 -69
  193. package/dist/ai/source/BbButton.md +563 -174
  194. package/dist/ai/source/BbCalendar.md +1744 -0
  195. package/dist/ai/source/BbCheckbox.md +470 -68
  196. package/dist/ai/source/BbCheckboxGroup.md +976 -95
  197. package/dist/ai/source/BbCollapsible.md +96 -8
  198. package/dist/ai/source/BbColorInput.md +597 -67
  199. package/dist/ai/source/BbColorPalette.md +1284 -65
  200. package/dist/ai/source/BbConfirm.md +149 -7
  201. package/dist/ai/source/BbConfirmPortal.md +89 -3
  202. package/dist/ai/source/BbDatePicker.md +527 -381
  203. package/dist/ai/source/BbDatePickerInput.md +2015 -118
  204. package/dist/ai/source/BbDialog.md +531 -64
  205. package/dist/ai/source/BbDropdown.md +885 -175
  206. package/dist/ai/source/BbDropdownButton.md +377 -79
  207. package/dist/ai/source/BbDropdownGroup.md +687 -96
  208. package/dist/ai/source/BbDropzone.md +140 -31
  209. package/dist/ai/source/BbForm.md +875 -17
  210. package/dist/ai/source/BbIcon.md +130 -52
  211. package/dist/ai/source/BbIndicator.md +117 -60
  212. package/dist/ai/source/BbNumberInput.md +667 -84
  213. package/dist/ai/source/BbOffCanvas.md +1007 -261
  214. package/dist/ai/source/BbPagination.md +203 -31
  215. package/dist/ai/source/BbPopover.md +267 -90
  216. package/dist/ai/source/BbProgress.md +88 -26
  217. package/dist/ai/source/BbPtScope.md +54 -0
  218. package/dist/ai/source/BbRadio.md +388 -58
  219. package/dist/ai/source/BbRadioGroup.md +940 -109
  220. package/dist/ai/source/BbRating.md +736 -84
  221. package/dist/ai/source/BbSelect.md +1096 -96
  222. package/dist/ai/source/BbSelectPopover.md +807 -114
  223. package/dist/ai/source/BbSlider.md +1390 -98
  224. package/dist/ai/source/BbSmoothHeight.md +48 -2
  225. package/dist/ai/source/BbSpinner.md +62 -6
  226. package/dist/ai/source/BbSwitch.md +297 -60
  227. package/dist/ai/source/BbSwitchGroup.md +761 -83
  228. package/dist/ai/source/BbTable.md +6950 -1864
  229. package/dist/ai/source/BbTabs.md +368 -111
  230. package/dist/ai/source/BbTabsList.md +503 -146
  231. package/dist/ai/source/BbTabsPanels.md +625 -0
  232. package/dist/ai/source/BbTabsRoot.md +319 -100
  233. package/dist/ai/source/BbTag.md +796 -87
  234. package/dist/ai/source/BbTextInput.md +497 -68
  235. package/dist/ai/source/BbTextarea.md +550 -65
  236. package/dist/ai/source/BbTimePicker.md +395 -69
  237. package/dist/ai/source/BbTimePickerInput.md +1233 -106
  238. package/dist/ai/source/BbToast.md +250 -74
  239. package/dist/ai/source/BbToastPortal.md +210 -66
  240. package/dist/ai/source/BbTooltip.md +181 -30
  241. package/dist/ai/source/BbTree.md +76 -11
  242. package/dist/ai/source/ChipsBox.md +25 -5
  243. package/dist/ai/source/CommaBox.md +21 -6
  244. package/dist/ai/source/{BbBaseInputContainer.md → CommonField.md} +467 -250
  245. package/dist/ai/source/CommonFieldInput.md +848 -0
  246. package/dist/ai/source/CommonPopover.md +116 -30
  247. package/dist/ai/source/CommonTimeSelector.md +726 -0
  248. package/dist/ai/source/ErrorIcon.md +2 -2
  249. package/dist/ai/source/FlatListBox.md +188 -17
  250. package/dist/ai/source/GroupedListBox.md +236 -44
  251. package/dist/ai/source/GuidesComponent.md +14 -7
  252. package/dist/ai/source/ListBox.md +46 -8
  253. package/dist/ai/source/OptionsContainer.md +288 -60
  254. package/dist/ai/source/WarningIcon.md +2 -2
  255. package/dist/assets/css/reset.css_inline.js +1 -1
  256. package/dist/assets/svgs/star.svg_raw.js +4 -0
  257. package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +49 -32
  258. package/dist/components/BbAccordion/types.d.ts +35 -3
  259. package/dist/components/BbAccordion/types.js +11 -0
  260. package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +46 -30
  261. package/dist/components/BbAlert/types.d.ts +37 -3
  262. package/dist/components/BbAlert/types.js +13 -0
  263. package/dist/components/BbAsterisk/BbAsterisk.vue.d.ts +3 -1
  264. package/dist/components/BbAsterisk/BbAsterisk.vue_vue_type_script_setup_true_lang.js +23 -8
  265. package/dist/components/BbAsterisk/types.d.ts +18 -0
  266. package/dist/components/BbAsterisk/types.js +7 -0
  267. package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -1
  268. package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +57 -44
  269. package/dist/components/BbAvatar/types.d.ts +23 -0
  270. package/dist/components/BbAvatar/types.js +7 -0
  271. package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +24 -18
  272. package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +96 -53
  273. package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +27 -8
  274. package/dist/components/BbBadge/badgeButtonContext.d.ts +25 -8
  275. package/dist/components/BbBadge/types.d.ts +46 -3
  276. package/dist/components/BbBadge/types.js +13 -0
  277. package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +109 -96
  278. package/dist/components/BbBaseButton/RouterComponent.vue_vue_type_script_setup_true_lang.js +11 -11
  279. package/dist/components/BbBaseButton/types.d.ts +33 -3
  280. package/dist/components/BbBaseButton/types.js +9 -2
  281. package/dist/components/BbBaseCheckboxIcon/BbBaseCheckboxIcon.vue_vue_type_script_setup_true_lang.js +50 -18
  282. package/dist/components/BbBaseCheckboxIcon/types.d.ts +31 -2
  283. package/dist/components/BbBaseCheckboxIcon/types.js +8 -0
  284. package/dist/components/BbBaseRadioIcon/BbBaseRadioIcon.vue_vue_type_script_setup_true_lang.js +45 -15
  285. package/dist/components/BbBaseRadioIcon/types.d.ts +31 -2
  286. package/dist/components/BbBaseRadioIcon/types.js +8 -0
  287. package/dist/components/BbBaseSwitchIcon/BbBaseSwitchIcon.vue_vue_type_script_setup_true_lang.js +48 -16
  288. package/dist/components/BbBaseSwitchIcon/types.d.ts +31 -2
  289. package/dist/components/BbBaseSwitchIcon/types.js +8 -0
  290. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +187 -132
  291. package/dist/components/BbBreadcrumbs/types.d.ts +45 -3
  292. package/dist/components/BbBreadcrumbs/types.js +12 -0
  293. package/dist/components/BbButton/BbButton.vue.d.ts +5 -0
  294. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +107 -81
  295. package/dist/components/BbButton/types.d.ts +113 -2
  296. package/dist/components/BbButton/types.js +12 -0
  297. package/dist/components/BbCalendar/BbCalendar.vue.d.ts +34 -0
  298. package/dist/components/BbCalendar/BbCalendar.vue.js +6 -0
  299. package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +608 -0
  300. package/dist/components/BbCalendar/CalendarMonthPanel.vue.js +5 -0
  301. package/dist/components/BbCalendar/CalendarMonthPanel.vue_vue_type_script_setup_true_lang.js +124 -0
  302. package/dist/components/BbCalendar/CalendarYearPanel.vue.js +5 -0
  303. package/dist/components/BbCalendar/CalendarYearPanel.vue_vue_type_script_setup_true_lang.js +126 -0
  304. package/dist/components/BbCalendar/calendarHost.d.ts +29 -0
  305. package/dist/components/BbCalendar/calendarHost.js +10 -0
  306. package/dist/components/BbCalendar/types.d.ts +225 -0
  307. package/dist/components/BbCalendar/types.js +29 -0
  308. package/dist/components/{BbBaseDatePicker/useDatePickerContext.d.ts → BbCalendar/useCalendarContext.d.ts} +10 -7
  309. package/dist/components/BbCalendar/useCalendarContext.js +11 -0
  310. package/dist/components/BbCalendar/useCalendarGrid.d.ts +208 -0
  311. package/dist/components/BbCalendar/useCalendarGrid.js +274 -0
  312. package/dist/components/BbCalendar/useDayGrid.d.ts +79 -0
  313. package/dist/components/BbCalendar/useDayGrid.js +204 -0
  314. package/dist/components/BbCalendar/useToday.d.ts +23 -0
  315. package/dist/components/BbCalendar/useToday.js +21 -0
  316. package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +7 -7
  317. package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +214 -72
  318. package/dist/components/BbCheckbox/types.d.ts +180 -13
  319. package/dist/components/BbCheckbox/types.js +8 -0
  320. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +15 -3
  321. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +338 -90
  322. package/dist/components/BbCheckboxGroup/types.d.ts +195 -20
  323. package/dist/components/BbCheckboxGroup/types.js +10 -0
  324. package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +2 -1
  325. package/dist/components/BbCollapsible/BbCollapsible.vue_vue_type_script_setup_true_lang.js +41 -19
  326. package/dist/components/BbCollapsible/types.d.ts +44 -1
  327. package/dist/components/BbCollapsible/types.js +7 -0
  328. package/dist/components/BbColorInput/BbColorInput.vue.d.ts +17 -7
  329. package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +330 -86
  330. package/dist/components/BbColorInput/types.d.ts +230 -12
  331. package/dist/components/BbColorInput/types.js +24 -0
  332. package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +10 -2
  333. package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +515 -108
  334. package/dist/components/BbColorPalette/types.d.ts +76 -7
  335. package/dist/components/BbColorPalette/types.js +12 -0
  336. package/dist/components/BbConfirm/BbConfirm.vue.d.ts +2 -1
  337. package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +125 -76
  338. package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +1 -0
  339. package/dist/components/BbConfirm/types.d.ts +49 -0
  340. package/dist/components/BbConfirm/types.js +17 -0
  341. package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +16 -10
  342. package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +320 -223
  343. package/dist/components/BbDatePicker/types.d.ts +111 -17
  344. package/dist/components/BbDatePicker/types.js +33 -0
  345. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +16 -4
  346. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +1172 -87
  347. package/dist/components/BbDatePickerInput/types.d.ts +224 -19
  348. package/dist/components/BbDatePickerInput/types.js +39 -0
  349. package/dist/components/BbDialog/BbDialog.vue.d.ts +3 -3
  350. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +227 -136
  351. package/dist/components/BbDialog/types.d.ts +92 -3
  352. package/dist/components/BbDialog/types.js +16 -0
  353. package/dist/components/BbDialog/useDialogStack.d.ts +12 -0
  354. package/dist/components/BbDialog/useDialogStack.js +9 -2
  355. package/dist/components/BbDropdown/AdaptiveDropdown.vue.d.ts +2 -0
  356. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +108 -96
  357. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +10 -2
  358. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +337 -268
  359. package/dist/components/BbDropdown/BbDropdownGroup.vue.d.ts +5 -1
  360. package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +8 -2
  361. package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +377 -293
  362. package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +129 -118
  363. package/dist/components/BbDropdown/normalizeGroups.js +55 -31
  364. package/dist/components/BbDropdown/types.d.ts +288 -30
  365. package/dist/components/BbDropdown/types.js +21 -2
  366. package/dist/components/BbDropdown/useDropdownContext.d.ts +10 -4
  367. package/dist/components/BbDropdown/useDropdownGroupRegistry.d.ts +1 -0
  368. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +18 -3
  369. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +172 -40
  370. package/dist/components/BbDropdownButton/types.d.ts +137 -8
  371. package/dist/components/BbDropdownButton/types.js +35 -0
  372. package/dist/components/BbDropzone/BbDropzone.vue.d.ts +2 -2
  373. package/dist/components/BbDropzone/BbDropzone.vue_vue_type_script_setup_true_lang.js +186 -144
  374. package/dist/components/BbDropzone/types.d.ts +38 -4
  375. package/dist/components/BbDropzone/types.js +16 -0
  376. package/dist/components/BbForm/BbForm.vue.d.ts +94 -0
  377. package/dist/{validated → components/BbForm}/BbForm.vue.js +1 -1
  378. package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +317 -0
  379. package/dist/components/BbForm/BbFormCustomField.d.ts +14 -0
  380. package/dist/components/BbForm/BbFormCustomField.js +43 -0
  381. package/dist/components/BbForm/bindFormField.d.ts +16 -0
  382. package/dist/components/BbForm/bindFormField.js +85 -0
  383. package/dist/components/BbForm/formFields.d.ts +64 -0
  384. package/dist/components/BbForm/formFields.js +11 -0
  385. package/dist/components/BbForm/formSchema.d.ts +56 -0
  386. package/dist/components/BbForm/formSchema.js +196 -0
  387. package/dist/components/BbForm/standardSchema.d.ts +59 -0
  388. package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +58 -48
  389. package/dist/components/BbIcon/iconCache.d.ts +63 -0
  390. package/dist/components/BbIcon/iconCache.js +35 -0
  391. package/dist/components/BbIcon/types.d.ts +22 -2
  392. package/dist/components/BbIcon/types.js +7 -0
  393. package/dist/components/BbIndicator/BbIndicator.vue_vue_type_script_setup_true_lang.js +34 -21
  394. package/dist/components/BbIndicator/types.d.ts +24 -0
  395. package/dist/components/BbIndicator/types.js +7 -0
  396. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +12 -8
  397. package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +308 -85
  398. package/dist/components/BbNumberInput/types.d.ts +201 -18
  399. package/dist/components/BbNumberInput/types.js +8 -0
  400. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +3 -3
  401. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +311 -210
  402. package/dist/components/BbOffCanvas/types.d.ts +79 -6
  403. package/dist/components/BbOffCanvas/types.js +15 -0
  404. package/dist/components/BbPagination/BbPagination.vue.d.ts +2 -2
  405. package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +125 -90
  406. package/dist/components/BbPagination/types.d.ts +38 -0
  407. package/dist/components/BbPagination/types.js +13 -0
  408. package/dist/components/BbPopover/BbPopover.vue.d.ts +4 -4
  409. package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +219 -179
  410. package/dist/components/BbPopover/types.d.ts +51 -5
  411. package/dist/components/BbPopover/types.js +14 -0
  412. package/dist/components/BbProgress/BbProgress.vue_vue_type_script_setup_true_lang.js +29 -16
  413. package/dist/components/BbProgress/types.d.ts +25 -0
  414. package/dist/components/BbProgress/types.js +7 -0
  415. package/dist/components/BbPtScope/BbPtScope.vue.d.ts +12 -0
  416. package/dist/components/BbPtScope/BbPtScope.vue.js +5 -0
  417. package/dist/components/BbPtScope/BbPtScope.vue_vue_type_script_setup_true_lang.js +13 -0
  418. package/dist/components/BbPtScope/types.d.ts +15 -0
  419. package/dist/components/BbRadio/BbRadio.vue.d.ts +7 -7
  420. package/dist/components/BbRadio/BbRadio.vue_vue_type_script_setup_true_lang.js +172 -59
  421. package/dist/components/BbRadio/types.d.ts +152 -13
  422. package/dist/components/BbRadio/types.js +8 -0
  423. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +14 -2
  424. package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +319 -92
  425. package/dist/components/BbRadioGroup/types.d.ts +198 -22
  426. package/dist/components/BbRadioGroup/types.js +10 -0
  427. package/dist/components/BbRating/BbRating.vue.d.ts +10 -8
  428. package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +259 -78
  429. package/dist/components/BbRating/types.d.ts +174 -13
  430. package/dist/components/BbRating/types.js +21 -0
  431. package/dist/components/BbSelect/BbSelect.vue.d.ts +17 -3
  432. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +553 -83
  433. package/dist/components/BbSelect/types.d.ts +235 -20
  434. package/dist/components/BbSelect/types.js +41 -0
  435. package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +15 -1
  436. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +541 -391
  437. package/dist/components/BbSelectPopover/types.d.ts +124 -8
  438. package/dist/components/BbSelectPopover/types.js +24 -0
  439. package/dist/components/BbSlider/BbSlider.vue.d.ts +13 -8
  440. package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +472 -96
  441. package/dist/components/BbSlider/types.d.ts +202 -13
  442. package/dist/components/BbSlider/types.js +26 -0
  443. package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +1 -1
  444. package/dist/components/BbSmoothHeight/BbSmoothHeight.vue_vue_type_script_setup_true_lang.js +60 -48
  445. package/dist/components/BbSmoothHeight/types.d.ts +19 -0
  446. package/dist/components/BbSmoothHeight/types.js +7 -0
  447. package/dist/components/BbSpinner/BbSpinner.vue_vue_type_script_setup_true_lang.js +27 -14
  448. package/dist/components/BbSpinner/types.d.ts +22 -1
  449. package/dist/components/BbSpinner/types.js +7 -0
  450. package/dist/components/BbSwitch/BbSwitch.vue.d.ts +7 -7
  451. package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +220 -78
  452. package/dist/components/BbSwitch/types.d.ts +25 -10
  453. package/dist/components/BbSwitch/types.js +5 -0
  454. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +14 -2
  455. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +338 -90
  456. package/dist/components/BbSwitchGroup/types.d.ts +30 -7
  457. package/dist/components/BbSwitchGroup/types.js +5 -0
  458. package/dist/components/BbTable/BbTable.vue.d.ts +27 -6
  459. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +2013 -685
  460. package/dist/components/BbTable/BbTableDataRow.d.ts +196 -0
  461. package/dist/components/BbTable/BbTableDataRow.js +151 -0
  462. package/dist/components/BbTable/BbTableExpandRow.d.ts +84 -0
  463. package/dist/components/BbTable/BbTableExpandRow.js +62 -0
  464. package/dist/components/BbTable/BbTableSelectToggle.d.ts +120 -0
  465. package/dist/components/BbTable/BbTableSelectToggle.js +122 -0
  466. package/dist/components/BbTable/gridWidgets.d.ts +30 -0
  467. package/dist/components/BbTable/gridWidgets.js +14 -0
  468. package/dist/components/BbTable/types.d.ts +473 -123
  469. package/dist/components/BbTable/types.js +31 -0
  470. package/dist/components/BbTable/utils.d.ts +145 -4
  471. package/dist/components/BbTable/utils.js +154 -37
  472. package/dist/components/BbTabs/BbTabs.vue.d.ts +3 -1
  473. package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +62 -26
  474. package/dist/components/BbTabs/BbTabsList.vue.d.ts +3 -10
  475. package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +143 -81
  476. package/dist/components/BbTabs/BbTabsPanels.vue.d.ts +12 -0
  477. package/dist/components/{BbBaseSwitch/BbBaseSwitch.vue.js → BbTabs/BbTabsPanels.vue.js} +2 -2
  478. package/dist/components/BbTabs/BbTabsPanels.vue_vue_type_script_setup_true_lang.js +59 -0
  479. package/dist/components/BbTabs/BbTabsRoot.vue.d.ts +3 -1
  480. package/dist/components/BbTabs/BbTabsRoot.vue_vue_type_script_setup_true_lang.js +2 -1
  481. package/dist/components/BbTabs/types.d.ts +183 -23
  482. package/dist/components/BbTabs/types.js +34 -0
  483. package/dist/components/BbTag/BbTag.vue.d.ts +13 -10
  484. package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +383 -92
  485. package/dist/components/BbTag/types.d.ts +139 -14
  486. package/dist/components/BbTag/types.js +22 -0
  487. package/dist/components/BbTextInput/BbTextInput.vue.d.ts +10 -8
  488. package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +257 -84
  489. package/dist/components/BbTextInput/types.d.ts +168 -13
  490. package/dist/components/BbTextInput/types.js +8 -0
  491. package/dist/components/BbTextarea/BbTextarea.vue.d.ts +7 -7
  492. package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +291 -94
  493. package/dist/components/BbTextarea/types.d.ts +158 -14
  494. package/dist/components/BbTextarea/types.js +8 -0
  495. package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +12 -4
  496. package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +199 -122
  497. package/dist/components/BbTimePicker/types.d.ts +94 -7
  498. package/dist/components/BbTimePicker/types.js +18 -0
  499. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +14 -4
  500. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +749 -86
  501. package/dist/components/BbTimePickerInput/types.d.ts +171 -22
  502. package/dist/components/BbTimePickerInput/types.js +25 -0
  503. package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +63 -25
  504. package/dist/components/BbToast/BbToastMessage.vue.d.ts +4 -1
  505. package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +79 -76
  506. package/dist/components/BbToast/BbToastPortal.vue.d.ts +1 -0
  507. package/dist/components/BbToast/BbToastRegion.vue.d.ts +4 -1
  508. package/dist/components/BbToast/BbToastRegion.vue_vue_type_script_setup_true_lang.js +72 -64
  509. package/dist/components/BbToast/types.d.ts +54 -1
  510. package/dist/components/BbToast/types.js +28 -0
  511. package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +104 -87
  512. package/dist/components/BbTooltip/types.d.ts +40 -2
  513. package/dist/components/BbTooltip/types.js +7 -0
  514. package/dist/components/BbTree/BbTree.vue.d.ts +15 -3
  515. package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +51 -29
  516. package/dist/components/BbTree/BbTreeLevel.vue.d.ts +1 -1
  517. package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +17 -16
  518. package/dist/components/BbTree/context.d.ts +9 -1
  519. package/dist/components/BbTree/types.d.ts +40 -5
  520. package/dist/components/BbTree/types.js +7 -0
  521. package/dist/components/ChipsBox/ChipsBox.vue_vue_type_script_setup_true_lang.js +46 -44
  522. package/dist/components/ChipsBox/types.d.ts +7 -0
  523. package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +5 -5
  524. package/dist/components/CommaBox/CommaBox.vue_vue_type_script_setup_true_lang.js +11 -7
  525. package/dist/components/CommaBox/types.d.ts +7 -0
  526. package/dist/components/{BbBaseInputContainer/BbBaseInputContainer.vue.d.ts → CommonField/CommonField.vue.d.ts} +5 -5
  527. package/dist/components/{BbBaseRadio/BbBaseRadio.vue.js → CommonField/CommonField.vue.js} +2 -2
  528. package/dist/components/CommonField/CommonField.vue_vue_type_script_setup_true_lang.js +189 -0
  529. package/dist/components/CommonField/messageHeightMatrix.d.ts +2 -0
  530. package/dist/components/{BbBaseInputContainer → CommonField}/types.d.ts +52 -16
  531. package/dist/components/{CommonInputWrapper/CommonInputWrapper.vue.d.ts → CommonFieldInput/CommonFieldInput.vue.d.ts} +5 -4
  532. package/dist/components/{BbBaseRadioGroup/BbBaseRadioGroup.vue.js → CommonFieldInput/CommonFieldInput.vue.js} +2 -2
  533. package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +120 -0
  534. package/dist/components/CommonFieldInput/boxBorderMatrix.d.ts +10 -0
  535. package/dist/components/{CommonInputWrapper → CommonFieldInput}/types.d.ts +27 -8
  536. package/dist/components/CommonPopover/CommonPopover.vue.d.ts +11 -2
  537. package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +76 -63
  538. package/dist/components/CommonPopover/types.d.ts +27 -8
  539. package/dist/components/{BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue.d.ts → CommonTimeSelector/CommonTimeSelector.vue.d.ts} +21 -2
  540. package/dist/components/{BbBaseColorPalette/BbBaseColorPalette.vue.js → CommonTimeSelector/CommonTimeSelector.vue.js} +2 -2
  541. package/dist/components/CommonTimeSelector/CommonTimeSelector.vue_vue_type_script_setup_true_lang.js +232 -0
  542. package/dist/components/CommonTimeSelector/types.d.ts +6 -0
  543. package/dist/components/FlatListBox/FlatListBox.vue.d.ts +5 -1
  544. package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +165 -95
  545. package/dist/components/FlatListBox/types.d.ts +24 -2
  546. package/dist/components/GroupedListBox/GroupedListBox.vue.d.ts +5 -1
  547. package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +217 -134
  548. package/dist/components/GroupedListBox/types.d.ts +24 -2
  549. package/dist/components/ListBox/ListBox.vue.d.ts +5 -1
  550. package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +95 -69
  551. package/dist/components/ListBox/types.d.ts +24 -2
  552. package/dist/components/OptionsContainer/OptionsContainer.vue.d.ts +1 -1
  553. package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +109 -37
  554. package/dist/components/OptionsContainer/types.d.ts +53 -9
  555. package/dist/components/Transitions/ScaleFade.vue_vue_type_script_setup_true_lang.js +8 -8
  556. package/dist/components/Transitions/Slide.vue.js +1 -1
  557. package/dist/composables/useBaseOptions.d.ts +12 -1
  558. package/dist/composables/useBaseOptions.js +77 -37
  559. package/dist/composables/useBbConfig.d.ts +27 -6
  560. package/dist/composables/useBbConfig.js +8 -2
  561. package/dist/composables/useBbDropdownContext.d.ts +5 -0
  562. package/dist/composables/useBbFormContext.d.ts +131 -8
  563. package/dist/composables/useBbFormContext.js +49 -30
  564. package/dist/composables/useBbFormField.d.ts +40 -0
  565. package/dist/composables/useBbFormField.js +39 -0
  566. package/dist/composables/useBbTableContext.d.ts +45 -1
  567. package/dist/composables/useBbTableContext.js +93 -87
  568. package/dist/composables/useBbTabsContext.d.ts +15 -9
  569. package/dist/composables/useBbTabsContext.js +121 -90
  570. package/dist/composables/useClosingInert.d.ts +4 -4
  571. package/dist/composables/useCoarsePointer.js +7 -10
  572. package/dist/composables/useCoherence.js +1 -1
  573. package/dist/composables/useConfig.d.ts +59 -0
  574. package/dist/composables/useConfig.js +15 -0
  575. package/dist/composables/useConfirm.d.ts +39 -7
  576. package/dist/composables/useConfirm.js +50 -41
  577. package/dist/composables/useEscapeStackEntry.d.ts +13 -0
  578. package/dist/composables/useEscapeStackEntry.js +16 -0
  579. package/dist/composables/useFormBinding.d.ts +116 -0
  580. package/dist/composables/useFormBinding.js +34 -0
  581. package/dist/composables/useHydrated.d.ts +18 -0
  582. package/dist/composables/useHydrated.js +13 -7
  583. package/dist/composables/useId.d.ts +4 -3
  584. package/dist/composables/useId.js +1 -7
  585. package/dist/composables/useItemsGetter.d.ts +11 -0
  586. package/dist/composables/useItemsGetter.js +44 -18
  587. package/dist/composables/useKeyboardInset.d.ts +28 -0
  588. package/dist/composables/useKeyboardInset.js +32 -0
  589. package/dist/composables/useLocale.js +10 -7
  590. package/dist/composables/useMobile.js +7 -10
  591. package/dist/composables/usePassthrough.d.ts +228 -0
  592. package/dist/composables/usePassthrough.js +247 -0
  593. package/dist/composables/usePrefill.d.ts +22 -2
  594. package/dist/composables/usePrefill.js +35 -19
  595. package/dist/composables/useSafeAreaInternal.js +1 -1
  596. package/dist/composables/useSegmentedFields.d.ts +2 -2
  597. package/dist/composables/useSsrState.d.ts +20 -0
  598. package/dist/composables/useSsrState.js +13 -0
  599. package/dist/composables/useTableWidthContext.d.ts +24 -4
  600. package/dist/composables/useTableWidthContext.js +31 -28
  601. package/dist/composables/useToast.d.ts +18 -1
  602. package/dist/composables/useToast.js +31 -18
  603. package/dist/composables/useToggleInput.d.ts +44 -0
  604. package/dist/composables/useToggleInput.js +39 -0
  605. package/dist/composables/useViewportWidth.d.ts +5 -25
  606. package/dist/composables/useViewportWidth.js +14 -7
  607. package/dist/deprecation/ai-deprecations.json.d.ts +1977 -289
  608. package/dist/deprecation/ai-deprecations.json.js +1 -1
  609. package/dist/deprecation/removedProps.js +9 -4
  610. package/dist/directives/bbDropdown.d.ts +15 -4
  611. package/dist/directives/bbDropdown.js +31 -9
  612. package/dist/directives/bbTooltip.d.ts +6 -0
  613. package/dist/directives/createPopoverDirective.d.ts +62 -0
  614. package/dist/directives/createPopoverDirective.js +92 -37
  615. package/dist/i18n/index.d.ts +10 -16
  616. package/dist/i18n/locales/cs.json +9 -5
  617. package/dist/i18n/locales/da.json +9 -5
  618. package/dist/i18n/locales/de.json +9 -5
  619. package/dist/i18n/locales/el.json +9 -5
  620. package/dist/i18n/locales/en.json +9 -5
  621. package/dist/i18n/locales/es.json +9 -5
  622. package/dist/i18n/locales/fi.json +9 -5
  623. package/dist/i18n/locales/fr.json +9 -5
  624. package/dist/i18n/locales/hu.json +9 -5
  625. package/dist/i18n/locales/it.json +9 -5
  626. package/dist/i18n/locales/ja.json +9 -5
  627. package/dist/i18n/locales/ko.json +9 -5
  628. package/dist/i18n/locales/nb.json +9 -5
  629. package/dist/i18n/locales/nl.json +9 -5
  630. package/dist/i18n/locales/pl.json +9 -5
  631. package/dist/i18n/locales/pt.json +9 -5
  632. package/dist/i18n/locales/ro.json +9 -5
  633. package/dist/i18n/locales/ru.json +9 -5
  634. package/dist/i18n/locales/sv.json +9 -5
  635. package/dist/i18n/locales/tr.json +9 -5
  636. package/dist/i18n/locales/uk.json +9 -5
  637. package/dist/i18n/locales/zh-cn.json +9 -5
  638. package/dist/icon-scan.d.ts +276 -0
  639. package/dist/icon-scan.js +485 -0
  640. package/dist/icons-whitelist.d.ts +5 -4
  641. package/dist/index.d.ts +40 -21
  642. package/dist/index.js +78 -71
  643. package/dist/llms-full.txt +61164 -27972
  644. package/dist/llms-medium.txt +1482 -366
  645. package/dist/llms.txt +32 -15
  646. package/dist/locale-blueprint.json +9 -5
  647. package/dist/nuxt-auto-imports.d.ts +76 -0
  648. package/dist/nuxt-auto-imports.js +32 -0
  649. package/dist/nuxt-module.d.ts +30 -15
  650. package/dist/nuxt.js +35 -9
  651. package/dist/passthrough-deduper.js +5 -0
  652. package/dist/plugin.d.ts +10 -1
  653. package/dist/plugin.js +29 -19
  654. package/dist/project-dts.d.ts +84 -0
  655. package/dist/project-dts.js +170 -0
  656. package/dist/reset.css +1 -1
  657. package/dist/runtime/nuxt-plugin.js +34 -21
  658. package/dist/styles.css +3 -2
  659. package/dist/types/AlertVariant.d.ts +10 -1
  660. package/dist/types/BadgeVariant.d.ts +16 -5
  661. package/dist/types/ButtonVariant.d.ts +12 -1
  662. package/dist/types/ColumnName.d.ts +30 -3
  663. package/dist/types/CommonProps.d.ts +2 -2
  664. package/dist/types/Config.d.ts +94 -1
  665. package/dist/types/ConfirmVariant.d.ts +8 -1
  666. package/dist/types/DropdownItemVariant.d.ts +8 -1
  667. package/dist/types/FieldLayout.d.ts +32 -0
  668. package/dist/types/IndicatorVariant.d.ts +11 -1
  669. package/dist/types/InputVariant.d.ts +30 -0
  670. package/dist/types/ItemProps.d.ts +50 -0
  671. package/dist/types/Option.d.ts +6 -0
  672. package/dist/types/PtScope.d.ts +15 -0
  673. package/dist/types/RegistryKey.d.ts +10 -0
  674. package/dist/types/TabsVariant.d.ts +25 -0
  675. package/dist/types/ToastVariant.d.ts +12 -2
  676. package/dist/types/TooltipVariant.d.ts +8 -1
  677. package/dist/types/passthrough.d.ts +362 -0
  678. package/dist/types/passthrough.js +78 -0
  679. package/dist/types/ptComponentMap.d.ts +62 -0
  680. package/dist/utilities/functions/hasVnodeListener.d.ts +16 -0
  681. package/dist/utilities/functions/hasVnodeListener.js +12 -0
  682. package/dist/utilities/functions/isImeComposing.d.ts +7 -0
  683. package/dist/utilities/functions/isImeComposing.js +4 -0
  684. package/dist/utilities/functions/itemProps.d.ts +46 -0
  685. package/dist/utilities/functions/itemProps.js +47 -0
  686. package/dist/utilities/functions/slotKey.d.ts +13 -8
  687. package/dist/utilities/functions/slotKey.js +78 -2
  688. package/dist/utilities/functions/snapToStep.js +2 -1
  689. package/dist/utilities/functions/toggleInput.d.ts +98 -0
  690. package/dist/utilities/functions/toggleInput.js +56 -0
  691. package/dist/utilities/functions/warnRemovedAttrs.d.ts +27 -1
  692. package/dist/utilities/functions/warnRemovedAttrs.js +75 -14
  693. package/dist/utilities/misc/listboxMetrics.d.ts +9 -3
  694. package/dist/utilities/misc/listboxMetrics.js +5 -2
  695. package/dist/utilities/misc/ssrStateInjectionKey.d.ts +42 -0
  696. package/dist/utilities/misc/ssrStateInjectionKey.js +4 -0
  697. package/dist/utils/cssLayers.d.ts +91 -0
  698. package/dist/utils/cssLayers.js +43 -0
  699. package/dist/utils/injectLibraryStyles.d.ts +3 -1
  700. package/dist/utils/injectLibraryStyles.js +24 -23
  701. package/dist/utils/overlayEscapeStack.d.ts +10 -0
  702. package/dist/utils/overlayEscapeStack.js +5 -3
  703. package/dist/utils/passthrough.d.ts +67 -0
  704. package/dist/utils/passthrough.js +100 -0
  705. package/dist/utils/passthroughDeduper.d.ts +2 -0
  706. package/dist/utils/ptScope.d.ts +8 -0
  707. package/dist/utils/ptScope.js +4 -0
  708. package/dist/utils/versionCheck.d.ts +19 -0
  709. package/dist/utils/versionCheck.js +18 -0
  710. package/dist/vite-plugin.d.ts +301 -53
  711. package/dist/vite.js +547 -375
  712. package/llms.txt +33 -16
  713. package/package.json +49 -27
  714. package/scripts/lib/check-fix.mjs +129 -0
  715. package/scripts/lib/component-attr-targets.ts +123 -0
  716. package/scripts/lib/component-tree.ts +648 -0
  717. package/scripts/lib/css-class-check.mjs +326 -0
  718. package/scripts/lib/css-class-surface.mjs +292 -0
  719. package/scripts/lib/css-color-resolve.mjs +172 -0
  720. package/scripts/lib/css-local-check.mjs +267 -0
  721. package/scripts/lib/design-token-manifest.mjs +499 -0
  722. package/scripts/lib/doc-sections.mjs +248 -0
  723. package/scripts/lib/ensure-manifest.mjs +28 -5
  724. package/scripts/lib/eslint-disable.mjs +141 -0
  725. package/scripts/lib/eslint-plugin.d.ts +64 -1
  726. package/scripts/lib/eslint-plugin.mjs +1285 -30
  727. package/scripts/lib/hand-imported-styles.mjs +326 -0
  728. package/scripts/lib/hand-roll-hints.mjs +50 -6
  729. package/scripts/lib/html-attributes.mjs +353 -0
  730. package/scripts/lib/local-components.mjs +177 -0
  731. package/scripts/lib/mcp-config.mjs +87 -58
  732. package/scripts/lib/migrate-fix.mjs +62 -3
  733. package/scripts/lib/project-variant-dts.mjs +122 -0
  734. package/scripts/lib/public-type-exports.mjs +273 -0
  735. package/scripts/lib/slot-key.mjs +147 -0
  736. package/scripts/lib/slot-renames.mjs +46 -0
  737. package/scripts/lib/squashed-slot-words.mjs +133 -0
  738. package/scripts/lib/validate-bb-markup.mjs +2213 -76
  739. package/scripts/lib/wrapper-props.mjs +188 -0
  740. package/dist/ai/BbBaseCheckbox.md +0 -49
  741. package/dist/ai/BbBaseCheckboxGroup.md +0 -64
  742. package/dist/ai/BbBaseColorInput.md +0 -65
  743. package/dist/ai/BbBaseColorPalette.md +0 -39
  744. package/dist/ai/BbBaseDatePicker.md +0 -43
  745. package/dist/ai/BbBaseDatePickerInput.md +0 -73
  746. package/dist/ai/BbBaseInputContainer.md +0 -48
  747. package/dist/ai/BbBaseNumberInput.md +0 -71
  748. package/dist/ai/BbBaseRadio.md +0 -46
  749. package/dist/ai/BbBaseRadioGroup.md +0 -64
  750. package/dist/ai/BbBaseRating.md +0 -52
  751. package/dist/ai/BbBaseSelect.md +0 -88
  752. package/dist/ai/BbBaseSlider.md +0 -56
  753. package/dist/ai/BbBaseSwitch.md +0 -49
  754. package/dist/ai/BbBaseSwitchGroup.md +0 -64
  755. package/dist/ai/BbBaseTag.md +0 -68
  756. package/dist/ai/BbBaseTextInput.md +0 -75
  757. package/dist/ai/BbBaseTextarea.md +0 -62
  758. package/dist/ai/BbBaseTimePickerInput.md +0 -62
  759. package/dist/ai/BbTabsPanes.md +0 -27
  760. package/dist/ai/CommonInputWrapper.md +0 -42
  761. package/dist/ai/source/BbBaseCheckbox.md +0 -461
  762. package/dist/ai/source/BbBaseCheckboxGroup.md +0 -554
  763. package/dist/ai/source/BbBaseColorInput.md +0 -431
  764. package/dist/ai/source/BbBaseColorPalette.md +0 -942
  765. package/dist/ai/source/BbBaseDatePicker.md +0 -1448
  766. package/dist/ai/source/BbBaseDatePickerInput.md +0 -1940
  767. package/dist/ai/source/BbBaseNumberInput.md +0 -617
  768. package/dist/ai/source/BbBaseRadio.md +0 -381
  769. package/dist/ai/source/BbBaseRadioGroup.md +0 -539
  770. package/dist/ai/source/BbBaseRating.md +0 -607
  771. package/dist/ai/source/BbBaseSelect.md +0 -945
  772. package/dist/ai/source/BbBaseSlider.md +0 -1144
  773. package/dist/ai/source/BbBaseSwitch.md +0 -246
  774. package/dist/ai/source/BbBaseSwitchGroup.md +0 -302
  775. package/dist/ai/source/BbBaseTag.md +0 -694
  776. package/dist/ai/source/BbBaseTextInput.md +0 -511
  777. package/dist/ai/source/BbBaseTextarea.md +0 -504
  778. package/dist/ai/source/BbBaseTimePickerInput.md +0 -1037
  779. package/dist/ai/source/BbTabsPanes.md +0 -377
  780. package/dist/ai/source/CommonInputWrapper.md +0 -584
  781. package/dist/alert-variants.d.ts +0 -19
  782. package/dist/assets/svgs/sort.svg_raw.js +0 -4
  783. package/dist/badge-variants.d.ts +0 -19
  784. package/dist/button-variants.d.ts +0 -21
  785. package/dist/components/BbBadge/BadgeAppendIcon.vue.d.ts +0 -3
  786. package/dist/components/BbBadge/BadgeAppendIcon.vue.js +0 -5
  787. package/dist/components/BbBadge/BadgeAppendIcon.vue_vue_type_script_setup_true_lang.js +0 -22
  788. package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue.d.ts +0 -40
  789. package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue.js +0 -6
  790. package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue_vue_type_script_setup_true_lang.js +0 -145
  791. package/dist/components/BbBaseCheckbox/types.d.ts +0 -224
  792. package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue.d.ts +0 -19
  793. package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue.js +0 -6
  794. package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue_vue_type_script_setup_true_lang.js +0 -190
  795. package/dist/components/BbBaseCheckboxGroup/types.d.ts +0 -257
  796. package/dist/components/BbBaseColorInput/BbBaseColorInput.vue.d.ts +0 -43
  797. package/dist/components/BbBaseColorInput/BbBaseColorInput.vue.js +0 -6
  798. package/dist/components/BbBaseColorInput/BbBaseColorInput.vue_vue_type_script_setup_true_lang.js +0 -184
  799. package/dist/components/BbBaseColorInput/types.d.ts +0 -219
  800. package/dist/components/BbBaseColorPalette/BbBaseColorPalette.vue.d.ts +0 -13
  801. package/dist/components/BbBaseColorPalette/BbBaseColorPalette.vue_vue_type_script_setup_true_lang.js +0 -395
  802. package/dist/components/BbBaseColorPalette/types.d.ts +0 -40
  803. package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue.d.ts +0 -20
  804. package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue.js +0 -6
  805. package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue_vue_type_script_setup_true_lang.js +0 -407
  806. package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.d.ts +0 -47
  807. package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.js +0 -5
  808. package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue_vue_type_script_setup_true_lang.js +0 -318
  809. package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue.js +0 -5
  810. package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue_vue_type_script_setup_true_lang.js +0 -115
  811. package/dist/components/BbBaseDatePicker/BbBaseDatePickerYearSelector.vue.js +0 -5
  812. package/dist/components/BbBaseDatePicker/BbBaseDatePickerYearSelector.vue_vue_type_script_setup_true_lang.js +0 -116
  813. package/dist/components/BbBaseDatePicker/types.d.ts +0 -108
  814. package/dist/components/BbBaseDatePicker/useDatePickerContext.js +0 -11
  815. package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.d.ts +0 -31
  816. package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.js +0 -6
  817. package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue_vue_type_script_setup_true_lang.js +0 -737
  818. package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue.js +0 -6
  819. package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue_vue_type_script_setup_true_lang.js +0 -204
  820. package/dist/components/BbBaseDatePickerInput/types.d.ts +0 -325
  821. package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue.js +0 -6
  822. package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue_vue_type_script_setup_true_lang.js +0 -190
  823. package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue.d.ts +0 -52
  824. package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue.js +0 -6
  825. package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue_vue_type_script_setup_true_lang.js +0 -215
  826. package/dist/components/BbBaseNumberInput/types.d.ts +0 -211
  827. package/dist/components/BbBaseRadio/BbBaseRadio.vue.d.ts +0 -33
  828. package/dist/components/BbBaseRadio/BbBaseRadio.vue_vue_type_script_setup_true_lang.js +0 -113
  829. package/dist/components/BbBaseRadio/types.d.ts +0 -179
  830. package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue.d.ts +0 -19
  831. package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue_vue_type_script_setup_true_lang.js +0 -179
  832. package/dist/components/BbBaseRadioGroup/types.d.ts +0 -223
  833. package/dist/components/BbBaseRating/BbBaseRating.vue.d.ts +0 -38
  834. package/dist/components/BbBaseRating/BbBaseRating.vue.js +0 -6
  835. package/dist/components/BbBaseRating/BbBaseRating.vue_vue_type_script_setup_true_lang.js +0 -192
  836. package/dist/components/BbBaseRating/types.d.ts +0 -176
  837. package/dist/components/BbBaseSelect/BbBaseSelect.vue.d.ts +0 -19
  838. package/dist/components/BbBaseSelect/BbBaseSelect.vue.js +0 -6
  839. package/dist/components/BbBaseSelect/BbBaseSelect.vue_vue_type_script_setup_true_lang.js +0 -311
  840. package/dist/components/BbBaseSelect/types.d.ts +0 -297
  841. package/dist/components/BbBaseSlider/BbBaseSlider.vue.d.ts +0 -35
  842. package/dist/components/BbBaseSlider/BbBaseSlider.vue.js +0 -6
  843. package/dist/components/BbBaseSlider/BbBaseSlider.vue_vue_type_script_setup_true_lang.js +0 -340
  844. package/dist/components/BbBaseSlider/types.d.ts +0 -200
  845. package/dist/components/BbBaseSwitch/BbBaseSwitch.vue.d.ts +0 -35
  846. package/dist/components/BbBaseSwitch/BbBaseSwitch.vue_vue_type_script_setup_true_lang.js +0 -146
  847. package/dist/components/BbBaseSwitch/types.d.ts +0 -10
  848. package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue.d.ts +0 -19
  849. package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue.js +0 -6
  850. package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue_vue_type_script_setup_true_lang.js +0 -190
  851. package/dist/components/BbBaseSwitchGroup/types.d.ts +0 -8
  852. package/dist/components/BbBaseTag/BbBaseTag.vue.d.ts +0 -50
  853. package/dist/components/BbBaseTag/BbBaseTag.vue.js +0 -6
  854. package/dist/components/BbBaseTag/BbBaseTag.vue_vue_type_script_setup_true_lang.js +0 -266
  855. package/dist/components/BbBaseTag/types.d.ts +0 -160
  856. package/dist/components/BbBaseTextInput/BbBaseTextInput.vue.d.ts +0 -45
  857. package/dist/components/BbBaseTextInput/BbBaseTextInput.vue.js +0 -6
  858. package/dist/components/BbBaseTextInput/BbBaseTextInput.vue_vue_type_script_setup_true_lang.js +0 -200
  859. package/dist/components/BbBaseTextInput/types.d.ts +0 -209
  860. package/dist/components/BbBaseTextarea/BbBaseTextarea.vue.d.ts +0 -39
  861. package/dist/components/BbBaseTextarea/BbBaseTextarea.vue.js +0 -6
  862. package/dist/components/BbBaseTextarea/BbBaseTextarea.vue_vue_type_script_setup_true_lang.js +0 -187
  863. package/dist/components/BbBaseTextarea/types.d.ts +0 -170
  864. package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue.d.ts +0 -27
  865. package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue.js +0 -6
  866. package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue_vue_type_script_setup_true_lang.js +0 -519
  867. package/dist/components/BbBaseTimePickerInput/types.d.ts +0 -151
  868. package/dist/components/BbTabs/BbTabsPanes.vue.d.ts +0 -16
  869. package/dist/components/BbTabs/BbTabsPanes.vue.js +0 -6
  870. package/dist/components/BbTabs/BbTabsPanes.vue_vue_type_script_setup_true_lang.js +0 -35
  871. package/dist/components/CommonInputWrapper/CommonInputWrapper.vue.js +0 -6
  872. package/dist/components/CommonInputWrapper/CommonInputWrapper.vue_vue_type_script_setup_true_lang.js +0 -107
  873. package/dist/confirm-variants.d.ts +0 -17
  874. package/dist/dropdown-item-variants.d.ts +0 -17
  875. package/dist/indicator-variants.d.ts +0 -20
  876. package/dist/locale-registry.d.ts +0 -37
  877. package/dist/toast-variants.d.ts +0 -20
  878. package/dist/tooltip-variants.d.ts +0 -17
  879. package/dist/types/InputDirection.d.ts +0 -15
  880. package/dist/validated/BbCheckbox.vue.d.ts +0 -29
  881. package/dist/validated/BbCheckbox.vue.js +0 -5
  882. package/dist/validated/BbCheckbox.vue_vue_type_script_setup_true_lang.js +0 -75
  883. package/dist/validated/BbCheckboxGroup.vue.d.ts +0 -34
  884. package/dist/validated/BbCheckboxGroup.vue.js +0 -5
  885. package/dist/validated/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +0 -82
  886. package/dist/validated/BbColorInput.vue.d.ts +0 -37
  887. package/dist/validated/BbColorInput.vue.js +0 -5
  888. package/dist/validated/BbColorInput.vue_vue_type_script_setup_true_lang.js +0 -75
  889. package/dist/validated/BbDatePickerInput.vue.d.ts +0 -41
  890. package/dist/validated/BbDatePickerInput.vue.js +0 -5
  891. package/dist/validated/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +0 -90
  892. package/dist/validated/BbDropzone.vue.d.ts +0 -24
  893. package/dist/validated/BbDropzone.vue.js +0 -5
  894. package/dist/validated/BbDropzone.vue_vue_type_script_setup_true_lang.js +0 -45
  895. package/dist/validated/BbForm.vue.d.ts +0 -28
  896. package/dist/validated/BbForm.vue_vue_type_script_setup_true_lang.js +0 -42
  897. package/dist/validated/BbNumberInput.vue.d.ts +0 -36
  898. package/dist/validated/BbNumberInput.vue.js +0 -5
  899. package/dist/validated/BbNumberInput.vue_vue_type_script_setup_true_lang.js +0 -72
  900. package/dist/validated/BbRadioGroup.vue.d.ts +0 -34
  901. package/dist/validated/BbRadioGroup.vue.js +0 -5
  902. package/dist/validated/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +0 -78
  903. package/dist/validated/BbRating.vue.d.ts +0 -30
  904. package/dist/validated/BbRating.vue.js +0 -5
  905. package/dist/validated/BbRating.vue_vue_type_script_setup_true_lang.js +0 -63
  906. package/dist/validated/BbSelect.vue.d.ts +0 -46
  907. package/dist/validated/BbSelect.vue.js +0 -5
  908. package/dist/validated/BbSelect.vue_vue_type_script_setup_true_lang.js +0 -109
  909. package/dist/validated/BbSlider.vue.d.ts +0 -36
  910. package/dist/validated/BbSlider.vue.js +0 -5
  911. package/dist/validated/BbSlider.vue_vue_type_script_setup_true_lang.js +0 -69
  912. package/dist/validated/BbSwitch.vue.d.ts +0 -29
  913. package/dist/validated/BbSwitch.vue.js +0 -5
  914. package/dist/validated/BbSwitch.vue_vue_type_script_setup_true_lang.js +0 -75
  915. package/dist/validated/BbSwitchGroup.vue.d.ts +0 -34
  916. package/dist/validated/BbSwitchGroup.vue.js +0 -5
  917. package/dist/validated/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +0 -82
  918. package/dist/validated/BbTag.vue.d.ts +0 -36
  919. package/dist/validated/BbTag.vue.js +0 -5
  920. package/dist/validated/BbTag.vue_vue_type_script_setup_true_lang.js +0 -72
  921. package/dist/validated/BbTextInput.vue.d.ts +0 -36
  922. package/dist/validated/BbTextInput.vue.js +0 -5
  923. package/dist/validated/BbTextInput.vue_vue_type_script_setup_true_lang.js +0 -72
  924. package/dist/validated/BbTextarea.vue.d.ts +0 -36
  925. package/dist/validated/BbTextarea.vue.js +0 -5
  926. package/dist/validated/BbTextarea.vue_vue_type_script_setup_true_lang.js +0 -70
  927. package/dist/validated/BbTimePickerInput.vue.d.ts +0 -37
  928. package/dist/validated/BbTimePickerInput.vue.js +0 -5
  929. package/dist/validated/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +0 -81
  930. package/dist/validated/index.d.ts +0 -43
  931. package/dist/validated/useValidatedField.d.ts +0 -93
  932. package/dist/validated/useValidatedField.js +0 -51
  933. package/dist/validated.js +0 -21
  934. /package/dist/components/{BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue.d.ts → BbCalendar/CalendarMonthPanel.vue.d.ts} +0 -0
  935. /package/dist/components/{BbBaseDatePicker/BbBaseDatePickerYearSelector.vue.d.ts → BbCalendar/CalendarYearPanel.vue.d.ts} +0 -0
  936. /package/dist/{components/BbBaseDatePicker/typeahead.d.ts → composables/useTypeahead.d.ts} +0 -0
  937. /package/dist/{components/BbBaseDatePicker/typeahead.js → composables/useTypeahead.js} +0 -0
@@ -1,99 +1,239 @@
1
- import { useId as e } from "../../composables/useId.js";
2
- import { removedPropsFor as t } from "../../deprecation/removedProps.js";
3
- import { useLogger as n } from "../../composables/useLogger.js";
4
- import { warnRemovedAttrs as r } from "../../utilities/functions/warnRemovedAttrs.js";
5
- import i from "../BbBaseButton/BbBaseButton.vue.js";
6
- import a from "../BbIcon/BbIcon.vue.js";
7
- import { isNil as o } from "../../utilities/functions/isNil.js";
8
- import { useLocale as s } from "../../composables/useLocale.js";
9
- import { useItemsGetter as c } from "../../composables/useItemsGetter.js";
10
- import { useItemValue as l } from "../../composables/useItemValue.js";
11
- import { hash as u } from "../../utilities/functions/hash.js";
12
- import { useHashedWatcher as ee } from "../../composables/useHashedWatcher.js";
13
- import { useBbTableContextHost as te } from "../../composables/useBbTableContext.js";
1
+ import { useLogger as e } from "../../composables/useLogger.js";
2
+ import { isNil as t } from "../../utilities/functions/isNil.js";
3
+ import { usePassthrough as n } from "../../composables/usePassthrough.js";
4
+ import { hash as r } from "../../utilities/functions/hash.js";
5
+ import { useBbTableContextHost as i } from "../../composables/useBbTableContext.js";
6
+ import { useId as a } from "../../composables/useId.js";
7
+ import { escapeStackDepth as o, isTopEscapeEntry as s, pushEscapeEntry as c, removeEscapeEntry as l } from "../../utils/overlayEscapeStack.js";
8
+ import { removedPropsFor as u } from "../../deprecation/removedProps.js";
9
+ import { warnRemovedAttrs as d } from "../../utilities/functions/warnRemovedAttrs.js";
10
+ import f from "../BbBaseButton/BbBaseButton.vue.js";
11
+ import { useLocale as p } from "../../composables/useLocale.js";
12
+ import { useItemsGetter as m } from "../../composables/useItemsGetter.js";
13
+ import { useItemValue as ee } from "../../composables/useItemValue.js";
14
+ import { useHashedWatcher as te } from "../../composables/useHashedWatcher.js";
14
15
  import { clamp as ne } from "../../utilities/functions/clamp.js";
15
- import d from "../BbBaseCheckbox/BbBaseCheckbox.vue.js";
16
- import { useIndexById as f } from "../../composables/useIndexById.js";
17
- import { useBaseOptions as re } from "../../composables/useBaseOptions.js";
18
- import { usePrefill as ie } from "../../composables/usePrefill.js";
19
- import { parseCount as ae, parsePositiveInteger as p } from "../../utilities/functions/parsePaginationNumber.js";
20
- import oe from "../BbBaseRadio/BbBaseRadio.vue.js";
21
- import { when as se } from "../../utilities/functions/when.js";
22
- import { useTableWidthContext as ce } from "../../composables/useTableWidthContext.js";
23
- import le from "../../assets/svgs/sort.svg_raw.js";
24
- import { applyFixedTableColumns as ue, columnKeyToSlotName as de, mergeCellClasses as fe, mergeHeaderClasses as pe, mergeRowClasses as me } from "./utils.js";
25
- import { Fragment as m, computed as h, createBlock as he, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createTextVNode as ge, createVNode as _e, defineComponent as y, mergeModels as ve, mergeProps as ye, nextTick as be, normalizeClass as b, normalizeStyle as x, onBeforeUnmount as xe, onMounted as Se, openBlock as S, reactive as Ce, ref as C, renderList as w, renderSlot as T, resolveDynamicComponent as we, toDisplayString as E, toRef as Te, unref as D, useModel as Ee, watch as O, withCtx as De } from "vue";
16
+ import re from "../BbBaseCheckboxIcon/BbBaseCheckboxIcon.vue.js";
17
+ import { preventReadonlyClick as ie, preventReadonlyKeydown as ae, revertReadonlyChange as oe, syncCheckedToData as se, syncIndeterminate as ce, toggleInputAttrs as le } from "../../utilities/functions/toggleInput.js";
18
+ import { useToggleFocus as ue } from "../../composables/useToggleInput.js";
19
+ import { useIndexById as de } from "../../composables/useIndexById.js";
20
+ import { useBaseOptions as fe } from "../../composables/useBaseOptions.js";
21
+ import { usePrefill as pe } from "../../composables/usePrefill.js";
22
+ import { parseCount as me, parsePositiveInteger as he } from "../../utilities/functions/parsePaginationNumber.js";
23
+ import { when as ge } from "../../utilities/functions/when.js";
24
+ import { useTableWidthContext as _e } from "../../composables/useTableWidthContext.js";
25
+ import ve from "./BbTableDataRow.js";
26
+ import ye from "./BbTableExpandRow.js";
27
+ import { BB_TABLE_PT as be } from "./types.js";
28
+ import { applyFixedTableColumns as xe, columnKeyToSlotName as Se, completeColumnOrder as Ce, estimateTrack as we, fitFloors as Te, lockColumnOrder as Ee, mergeCellClasses as De, mergeHeaderClasses as Oe, mergeRowClasses as ke, moveColumnKey as Ae, orderColumns as je, readResolvedTracks as Me, reorderRange as Ne, sameColumnOrder as Pe } from "./utils.js";
29
+ import { GRID_FOCUSABLE as Fe, GRID_MANAGED_ATTR as Ie, cellWidgets as Le, restoreTabOrder as Re, takeOutOfTabOrder as ze } from "./gridWidgets.js";
30
+ import { Fragment as Be, computed as h, createBlock as Ve, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createTextVNode as He, createVNode as Ue, defineComponent as We, getCurrentInstance as Ge, guardReactiveProps as Ke, mergeModels as qe, mergeProps as y, nextTick as b, normalizeClass as Je, normalizeProps as Ye, normalizeStyle as Xe, onBeforeUnmount as Ze, onBeforeUpdate as Qe, onDeactivated as $e, onMounted as et, openBlock as x, reactive as tt, ref as S, renderList as nt, renderSlot as rt, resolveDynamicComponent as it, shallowRef as at, toDisplayString as C, toRef as ot, unref as w, useAttrs as st, useModel as ct, useSlots as lt, watch as T, watchEffect as ut, withCtx as dt, withModifiers as ft } from "vue";
31
+ import { defaultRangeExtractor as pt, elementScroll as mt, observeElementOffset as ht, observeElementRect as gt, observeWindowOffset as _t, observeWindowRect as vt, useVirtualizer as yt, windowScroll as bt } from "@tanstack/vue-virtual";
26
32
  //#region src/components/BbTable/BbTable.vue?vue&type=script&setup=true&lang.ts
27
- var Oe = {
33
+ var xt = {
28
34
  key: 0,
29
- class: "sr-only"
30
- }, ke = ["aria-rowcount"], Ae = ["inert"], je = ["aria-rowindex"], Me = { class: "bb-table-header__content" }, Ne = { class: "bb-table-check__label-text sr-only" }, Pe = {
35
+ class: "bb-sr-only"
36
+ }, St = ["id"], Ct = ["id"], wt = {
37
+ "aria-live": "polite",
38
+ class: "bb-table-loading__text bb-sr-only",
39
+ role: "status"
40
+ }, Tt = {
41
+ "aria-live": "polite",
42
+ class: "bb-table__reorder-status bb-sr-only",
43
+ role: "status"
44
+ }, Et = ["inert"], Dt = ["aria-rowindex"], Ot = ["tabindex"], kt = { class: "bb-table-header__content" }, At = { class: "bb-table-check__label-text bb-sr-only" }, jt = {
31
45
  key: 1,
32
- class: "bb-table-radio__label-text sr-only"
33
- }, Fe = ["aria-sort"], Ie = { class: "bb-table-header__content" }, Le = {
46
+ class: "bb-table-radio__label-text bb-sr-only"
47
+ }, Mt = [
48
+ "aria-describedby",
49
+ "aria-sort",
50
+ "data-column-key",
51
+ "tabindex",
52
+ "onClick",
53
+ "onFocus",
54
+ "onKeydown"
55
+ ], Nt = { class: "bb-table-header__content" }, Pt = {
34
56
  key: 1,
35
57
  class: "bb-table-header__content"
36
- }, Re = { class: "bb-table-header__content sr-only" }, ze = ["aria-rowindex"], Be = {
37
- key: 0,
38
- class: "bb-table-skeleton__cell bb-table-skeleton__cell--select"
39
- }, Ve = {
58
+ }, Ft = ["onDblclick", "onPointerdown"], It = ["tabindex"], Lt = { class: "bb-table-header__content bb-sr-only" }, Rt = ["aria-rowindex"], zt = ["role"], Bt = ["role"], Vt = {
40
59
  key: 0,
41
60
  class: "bb-table-skeleton__cell-content"
42
- }, He = {
61
+ }, Ht = {
43
62
  key: 1,
44
63
  class: "bb-table-skeleton__avatar"
45
- }, Ue = {
64
+ }, Ut = {
46
65
  key: 2,
47
66
  class: "bb-table-skeleton__avatar-text"
48
- }, We = { class: "bb-table-skeleton__cell-content" }, Ge = {
67
+ }, Wt = { class: "bb-table-skeleton__cell-content" }, Gt = {
49
68
  key: 3,
50
69
  class: "bb-table-skeleton__image"
51
- }, Ke = {
70
+ }, Kt = {
52
71
  key: 4,
53
72
  class: "bb-table-skeleton__badge"
54
- }, qe = {
55
- key: 1,
56
- class: "bb-table-skeleton__cell bb-table-skeleton__cell--actions"
57
- }, Je = ["aria-rowindex"], Ye = ["colspan"], Xe = { class: "bb-table-no-data__text" }, Ze = [
58
- "aria-current",
59
- "aria-rowindex",
60
- "inert",
61
- "tabindex",
62
- "onClick",
63
- "onContextmenu",
64
- "onDblclick",
65
- "onFocus",
66
- "onKeydown"
67
- ], Qe = { class: "bb-table-check__label-text sr-only" }, $e = { class: "bb-table-radio__label-text sr-only" }, et = ["id", "aria-rowindex"], tt = ["colspan"], nt = ["aria-rowindex"], rt = ["colspan"], it = { class: "bb-table-loading__text sr-only" }, at = 10, k = /*@__PURE__*/ y({
73
+ }, qt = ["role"], Jt = ["aria-rowindex"], Yt = ["aria-colspan", "role"], Xt = { class: "bb-table-empty__text" }, Zt = ["data-index"], Qt = ["role"], $t = 1e3, en = 48, tn = 10, nn = "bb-table-resizing", rn = 5, an = 10, on = 500, sn = 40, cn = 12, ln = 4, un = 12, dn = "a, button:not(.bb-table-sort), input, select, textarea, [contenteditable], [role=\"button\"], .bb-table-header__resizer", fn = 12, pn = 10, mn = 600, hn = 120, gn = 6, _n = 800, vn = 120, yn = 10, E = /*@__PURE__*/ We({
74
+ inheritAttrs: !1,
68
75
  __name: "BbTable",
69
- props: /*@__PURE__*/ ve({
76
+ props: /*@__PURE__*/ qe({
77
+ "pt:root": {},
78
+ "pt:caption": {},
79
+ "pt:table": {},
80
+ "pt:head": {},
81
+ "pt:headerRow": {},
82
+ "pt:cellColumnHeader": {},
83
+ "pt:sortIcon": {},
84
+ "pt:body": {},
85
+ "pt:cell": {},
86
+ "pt:selectIcon": {},
87
+ "pt:dragIcon": {},
88
+ "pt:foot": {},
89
+ "pt:root:loading": {},
90
+ "pt:root:empty": {},
91
+ "pt:root:sorted": {},
92
+ "pt:root:sortedDesc": {},
93
+ "pt:root:expanded": {},
94
+ "pt:root:disabled": {},
95
+ "pt:root:selected": {},
96
+ "pt:root:indeterminate": {},
97
+ "pt:root:highlighted": {},
98
+ "pt:caption:loading": {},
99
+ "pt:caption:empty": {},
100
+ "pt:caption:sorted": {},
101
+ "pt:caption:sortedDesc": {},
102
+ "pt:caption:expanded": {},
103
+ "pt:caption:disabled": {},
104
+ "pt:caption:selected": {},
105
+ "pt:caption:indeterminate": {},
106
+ "pt:caption:highlighted": {},
107
+ "pt:table:loading": {},
108
+ "pt:table:empty": {},
109
+ "pt:table:sorted": {},
110
+ "pt:table:sortedDesc": {},
111
+ "pt:table:expanded": {},
112
+ "pt:table:disabled": {},
113
+ "pt:table:selected": {},
114
+ "pt:table:indeterminate": {},
115
+ "pt:table:highlighted": {},
116
+ "pt:head:loading": {},
117
+ "pt:head:empty": {},
118
+ "pt:head:sorted": {},
119
+ "pt:head:sortedDesc": {},
120
+ "pt:head:expanded": {},
121
+ "pt:head:disabled": {},
122
+ "pt:head:selected": {},
123
+ "pt:head:indeterminate": {},
124
+ "pt:head:highlighted": {},
125
+ "pt:headerRow:loading": {},
126
+ "pt:headerRow:empty": {},
127
+ "pt:headerRow:sorted": {},
128
+ "pt:headerRow:sortedDesc": {},
129
+ "pt:headerRow:expanded": {},
130
+ "pt:headerRow:disabled": {},
131
+ "pt:headerRow:selected": {},
132
+ "pt:headerRow:indeterminate": {},
133
+ "pt:headerRow:highlighted": {},
134
+ "pt:cellColumnHeader:loading": {},
135
+ "pt:cellColumnHeader:empty": {},
136
+ "pt:cellColumnHeader:sorted": {},
137
+ "pt:cellColumnHeader:sortedDesc": {},
138
+ "pt:cellColumnHeader:expanded": {},
139
+ "pt:cellColumnHeader:disabled": {},
140
+ "pt:cellColumnHeader:selected": {},
141
+ "pt:cellColumnHeader:indeterminate": {},
142
+ "pt:cellColumnHeader:highlighted": {},
143
+ "pt:sortIcon:loading": {},
144
+ "pt:sortIcon:empty": {},
145
+ "pt:sortIcon:sorted": {},
146
+ "pt:sortIcon:sortedDesc": {},
147
+ "pt:sortIcon:expanded": {},
148
+ "pt:sortIcon:disabled": {},
149
+ "pt:sortIcon:selected": {},
150
+ "pt:sortIcon:indeterminate": {},
151
+ "pt:sortIcon:highlighted": {},
152
+ "pt:body:loading": {},
153
+ "pt:body:empty": {},
154
+ "pt:body:sorted": {},
155
+ "pt:body:sortedDesc": {},
156
+ "pt:body:expanded": {},
157
+ "pt:body:disabled": {},
158
+ "pt:body:selected": {},
159
+ "pt:body:indeterminate": {},
160
+ "pt:body:highlighted": {},
161
+ "pt:row:loading": {},
162
+ "pt:row:empty": {},
163
+ "pt:row:sorted": {},
164
+ "pt:row:sortedDesc": {},
165
+ "pt:row:expanded": {},
166
+ "pt:row:disabled": {},
167
+ "pt:row:selected": {},
168
+ "pt:row:indeterminate": {},
169
+ "pt:row:highlighted": {},
170
+ "pt:cell:loading": {},
171
+ "pt:cell:empty": {},
172
+ "pt:cell:sorted": {},
173
+ "pt:cell:sortedDesc": {},
174
+ "pt:cell:expanded": {},
175
+ "pt:cell:disabled": {},
176
+ "pt:cell:selected": {},
177
+ "pt:cell:indeterminate": {},
178
+ "pt:cell:highlighted": {},
179
+ "pt:selectIcon:loading": {},
180
+ "pt:selectIcon:empty": {},
181
+ "pt:selectIcon:sorted": {},
182
+ "pt:selectIcon:sortedDesc": {},
183
+ "pt:selectIcon:expanded": {},
184
+ "pt:selectIcon:disabled": {},
185
+ "pt:selectIcon:selected": {},
186
+ "pt:selectIcon:indeterminate": {},
187
+ "pt:selectIcon:highlighted": {},
188
+ "pt:dragIcon:loading": {},
189
+ "pt:dragIcon:empty": {},
190
+ "pt:dragIcon:sorted": {},
191
+ "pt:dragIcon:sortedDesc": {},
192
+ "pt:dragIcon:expanded": {},
193
+ "pt:dragIcon:disabled": {},
194
+ "pt:dragIcon:selected": {},
195
+ "pt:dragIcon:indeterminate": {},
196
+ "pt:dragIcon:highlighted": {},
197
+ "pt:foot:loading": {},
198
+ "pt:foot:empty": {},
199
+ "pt:foot:sorted": {},
200
+ "pt:foot:sortedDesc": {},
201
+ "pt:foot:expanded": {},
202
+ "pt:foot:disabled": {},
203
+ "pt:foot:selected": {},
204
+ "pt:foot:indeterminate": {},
205
+ "pt:foot:highlighted": {},
206
+ "pt:row": {},
207
+ pt: {},
70
208
  accessibleLabel: {},
71
- actions: { type: Boolean },
72
209
  actionsText: {},
73
210
  align: { default: "left" },
74
- id: {},
75
- inheritColumnWidths: { type: [Boolean, String] },
76
- disableSelectAll: { type: Boolean },
77
211
  caption: {},
78
212
  compact: { type: Boolean },
79
213
  dependencies: { default: () => [] },
80
214
  depsDebounceTime: { default: 0 },
81
215
  disabled: { type: Boolean },
82
- enforceCoherence: { type: Boolean },
216
+ disableSelectAll: { type: Boolean },
83
217
  displayCaption: { type: Boolean },
218
+ enforceCoherence: { type: Boolean },
219
+ expandedItems: {},
84
220
  fixed: { type: Boolean },
85
- fixedColumns: { default: () => [] },
221
+ fixedActions: { type: Boolean },
86
222
  fixedHeaders: { type: Boolean },
223
+ fixedSelect: { type: Boolean },
224
+ headerRowClass: {},
87
225
  highlighted: {},
226
+ id: {},
227
+ inheritColumnWidths: { type: [Boolean, String] },
228
+ interactiveWhileLoading: { type: Boolean },
88
229
  items: {
89
230
  type: [Array, Function],
90
231
  default: () => []
91
232
  },
92
- keyboardNavigation: { type: Boolean },
93
233
  itemValue: {},
234
+ keyboardNavigation: { type: Boolean },
94
235
  legend: {},
95
236
  loading: { type: Boolean },
96
- interactiveWhileLoading: { type: Boolean },
97
237
  loadingText: {},
98
238
  max: { default: Infinity },
99
239
  modelValue: { default: () => [] },
@@ -102,23 +242,25 @@ var Oe = {
102
242
  default: !0
103
243
  },
104
244
  name: {},
105
- noDataText: {},
245
+ emptyText: {},
246
+ order: {},
106
247
  page: {},
107
248
  perPage: {},
108
249
  readonly: { type: Boolean },
250
+ reorderable: { type: Boolean },
251
+ resizable: { type: Boolean },
109
252
  rowClass: {},
110
- headerRowClass: {},
111
- selectAll: { type: Boolean },
112
253
  selectable: { type: [Boolean, Function] },
113
- sort: {},
114
- expandedItems: {},
254
+ selectAll: { type: Boolean },
115
255
  selectAllLabel: {},
116
256
  selectText: {},
257
+ sort: {},
117
258
  tdClass: {},
118
259
  thClass: {},
119
260
  totalItems: {},
120
261
  totalPages: {},
121
262
  unselectedItems: { default: () => [] },
263
+ virtual: { type: Boolean },
122
264
  columns: { default: () => [] }
123
265
  }, {
124
266
  selectAll: {
@@ -132,6 +274,11 @@ var Oe = {
132
274
  default: () => []
133
275
  },
134
276
  sortModifiers: {},
277
+ order: {
278
+ required: !1,
279
+ default: () => []
280
+ },
281
+ orderModifiers: {},
135
282
  highlighted: {
136
283
  required: !1,
137
284
  default: void 0
@@ -143,7 +290,7 @@ var Oe = {
143
290
  },
144
291
  expandedItemsModifiers: {}
145
292
  }),
146
- emits: /*@__PURE__*/ ve([
293
+ emits: /*@__PURE__*/ qe([
147
294
  "click:row",
148
295
  "contextmenu:row",
149
296
  "dblclick:row",
@@ -151,6 +298,9 @@ var Oe = {
151
298
  "update:modelValue",
152
299
  "update:selectAll",
153
300
  "update:sort",
301
+ "update:order",
302
+ "resize:column",
303
+ "hide:column",
154
304
  "update:expandedItems",
155
305
  "update:unselectedItems",
156
306
  "item:selected",
@@ -158,752 +308,1930 @@ var Oe = {
158
308
  ], [
159
309
  "update:selectAll",
160
310
  "update:sort",
311
+ "update:order",
161
312
  "update:highlighted",
162
313
  "update:expandedItems"
163
314
  ]),
164
- setup(y, { emit: ve }) {
165
- let k = Ee(y, "selectAll"), A = Ee(y, "sort"), j = Ee(y, "highlighted"), M = Ee(y, "expandedItems"), N = y, P = ve;
166
- process.env.NODE_ENV !== "production" && r("BbTable", t("BbTable"));
167
- let { getItemValue: ot } = l(), st = e().id.value;
168
- N.multiple && !Array.isArray(N.modelValue) && n().throw("BbTable is set for multiple selection but modelValue is not an array.");
169
- let ct = ["actions", "select"];
315
+ setup(We, { emit: qe }) {
316
+ let E = ct(We, "selectAll"), D = ct(We, "sort"), O = ct(We, "order"), k = ct(We, "highlighted"), bn = ct(We, "expandedItems"), A = We, j = qe, M = lt(), N = n({
317
+ component: "BbTable",
318
+ attrs: st(),
319
+ props: A,
320
+ parts: be.parts,
321
+ states: be.states,
322
+ active: {
323
+ loading: () => xa.value,
324
+ empty: () => !Z.value.length
325
+ }
326
+ }), xn = (e) => ({
327
+ sorted: !!e,
328
+ sortedDesc: e === "desc"
329
+ });
330
+ process.env.NODE_ENV !== "production" && d("BbTable", u("BbTable"), { slotKeys: () => (A.columns ?? []).map((e) => e.key) });
331
+ let P = S(!!M.actions), Sn = S(!!M.expand), Cn = S(!!M.tbody), wn = S(!!M.thead);
332
+ Qe(() => {
333
+ let e = !!M.actions;
334
+ e !== P.value && (P.value = e), !!M.expand !== Sn.value && (Sn.value = !!M.expand), !!M.tbody !== Cn.value && (Cn.value = !!M.tbody), !!M.thead !== wn.value && (wn.value = !!M.thead);
335
+ });
336
+ let F = h(() => !!A.keyboardNavigation && !Cn.value), Tn = h(() => F.value && Sn.value), En = h(() => Tn.value ? "treegrid" : F.value ? "grid" : "table"), Dn = h(() => F.value ? "gridcell" : "cell"), On = h(() => new Set(A.columns.filter((e) => e.rowHeader).map((e) => String(e.key)))), kn = h(() => F.value && !wn.value), { getItemValue: An } = ee(), jn = a().id.value, Mn = (e) => `expanded_${jn}_${e}`;
337
+ A.multiple && !Array.isArray(A.modelValue) && e().throw("BbTable is set for multiple selection but modelValue is not an array.");
338
+ let Nn = ["actions", "select"], Pn = ["prepend", "append"], Fn = (e) => Pn.includes(e);
170
339
  if (process.env.NODE_ENV !== "production") {
171
- let e = N.columns.filter((e) => ct.includes(e.key));
172
- for (let t of e) n().warn(`BbTable: \`{ key: '${String(t.key)}' }\` is a reserved column and must not appear in \`columns\`. ` + (t.key === "actions" ? "Set the `actions` prop and fill the `#actions` slot instead." : "Selection is controlled by the `selectable` prop."));
340
+ let t = A.columns.filter((e) => Nn.includes(e.key));
341
+ for (let n of t) e().warn(`BbTable: \`{ key: '${String(n.key)}' }\` is a reserved column and must not appear in \`columns\`. ` + (n.key === "actions" ? "Fill the `#actions` slot instead — the slot creates the column." : "Selection is controlled by the `selectable` prop."));
342
+ for (let t of A.columns) {
343
+ let n = Se(t.key);
344
+ Fn(n) && e().warn(`BbTable: column key '${String(t.key)}' normalizes to the slot name '${n}', which collides with the table-wide \`#header:${n}\` slot. That name keeps its table-wide meaning and per-column header slots are unavailable for this column.`);
345
+ }
173
346
  }
174
- let { t: F } = s(), I = C(), L = C(), { id: lt, parentId: R, parentNode: ut, cssVars: dt, parentVar: ft, setTracks: pt } = ce({
175
- id: () => N.id,
176
- container: () => L.value,
177
- inheritFrom: () => typeof N.inheritColumnWidths == "string" ? N.inheritColumnWidths : void 0
178
- }), { data: mt } = f({ items: h(() => o(j.value) ? [] : [j.value]) }), z = (e) => {
179
- let t = e.valueHash in mt.value;
180
- j.value = t ? null : e.value;
181
- }, ht = (e, t) => {
182
- e.target instanceof Element && (e.target.closest("a, button, input, label, select, textarea, [contenteditable], [role=\"button\"]") || window.getSelection()?.toString() || z(t));
183
- }, gt = (e) => A.value.find(([t]) => t === e)?.[1] ?? null, _t = (e) => {
184
- let t = gt(e);
185
- t === null ? A.value = [...A.value, [e, "asc"]] : t === "asc" ? A.value = A.value.map((t) => t[0] === e ? [e, "desc"] : t) : A.value = A.value.filter(([t]) => t !== e);
186
- }, { state: B, isReady: vt } = te(() => lt.value, {
347
+ let { t: I } = p(), L = S(), R = S(), { id: In, parentId: Ln, parentNode: Rn, node: zn, cssVars: Bn, parentVar: Vn, setTracks: Hn } = _e({
348
+ id: () => A.id,
349
+ container: () => R.value,
350
+ inheritFrom: () => typeof A.inheritColumnWidths == "string" ? A.inheritColumnWidths : void 0
351
+ }), Un = h(() => `${In.value}__caption`), Wn = h(() => `${In.value}__header_instructions`), Gn = h(() => !!(A.reorderable || A.resizable)), Kn = S(/* @__PURE__ */ new Set()), qn = h(() => {
352
+ let e = new Set(Kn.value);
353
+ for (let t of A.columns) t.hidden && e.add(String(t.key));
354
+ return e;
355
+ }), Jn = h(() => {
356
+ let e = qn.value;
357
+ return e.size ? A.columns.filter((t) => !e.has(String(t.key))) : A.columns;
358
+ }), Yn = (e) => {
359
+ if (qn.value.has(e)) return;
360
+ let t = sr(e), n = V.value.indexOf(e), r = !!t && t.contains(document.activeElement) && (Gn.value || kn.value);
361
+ Kn.value = /* @__PURE__ */ new Set([...Kn.value, e]), j("hide:column", e), r && b(() => cr(n));
362
+ };
363
+ T(() => A.columns.map((e) => [String(e.key), !!e.hidden]), (e, t) => {
364
+ if (!t || !Kn.value.size) return;
365
+ let n = new Map(t), r = Kn.value, i = e.filter(([e, t]) => n.has(e) && n.get(e) !== t && r.has(e) && !t);
366
+ if (!i.length) return;
367
+ let a = new Set(r);
368
+ for (let [e] of i) a.delete(e);
369
+ Kn.value = a;
370
+ });
371
+ let Xn = h(() => A.columns.map((e) => String(e.key))), Zn = h(() => new Set(A.columns.filter((e) => e.reorderable === !1).map((e) => String(e.key)))), Qn = (e) => Zn.value.size ? Ee(Ce(e, Xn.value), Xn.value, Zn.value) : Ce(e, Xn.value), z = S(null), B = h(() => {
372
+ let e = Jn.value, t = z.value ?? O.value;
373
+ if (!t.length) return e;
374
+ let n = je(e, Zn.value.size ? Qn(t) : t);
375
+ return n.every((t, n) => t === e[n]) ? e : n;
376
+ }), V = h(() => B.value.map((e) => String(e.key))), $n = (e, t) => {
377
+ let n = Qn(O.value), r = er(e, t);
378
+ if (r === null) return null;
379
+ let i = Ae(n, Xn.value, e, r, qn.value);
380
+ return Pe(i, n) ? null : i;
381
+ }, er = (e, t) => {
382
+ let n = V.value, r = Ne(n, n.indexOf(e), Zn.value);
383
+ return r ? Math.max(r.min, Math.min(r.max, t)) : null;
384
+ }, tr = S("");
385
+ T(() => A.reorderable, () => {
386
+ tr.value = "";
387
+ });
388
+ let nr = (e, t) => {
389
+ let n = B.value, r = n.findIndex((t) => String(t.key) === e);
390
+ r < 0 || r === t || (tr.value = I("table.columnMoved", n[r].label, r + 1, n.length).value);
391
+ }, rr = S(null), ir = h(() => {
392
+ let e = V.value, t = rr.value;
393
+ return t !== null && e.includes(t) ? t : e[0] ?? null;
394
+ }), ar = (e, t) => {
395
+ if (!t.sortable) return;
396
+ let n = e.target;
397
+ if (!(n instanceof Element)) return;
398
+ let r = e.currentTarget;
399
+ if (n.closest(".bb-table-sort")) return;
400
+ let i = n.closest(dn);
401
+ i && r.contains(i) || window.getSelection()?.toString() || fi(t.key);
402
+ }, or = (e) => {
403
+ Gn.value && (rr.value = e);
404
+ }, sr = (e) => L.value?.querySelector(`:scope > .bb-table__head > .bb-table__header-row > [data-column-key="${CSS.escape(e)}"]`) ?? null, cr = (e) => {
405
+ let t = V.value, n = t[Math.max(0, Math.min(t.length - 1, e))];
406
+ n && (rr.value = n, sr(n)?.focus());
407
+ }, lr = async (e, t) => {
408
+ let n = kn.value;
409
+ if (!Gn.value && !n) return;
410
+ let r = e.currentTarget, i = e.target;
411
+ if (!(i instanceof Element) || i !== r && !i.closest(".bb-table-sort")) return;
412
+ let a = getComputedStyle(r).direction === "rtl";
413
+ if (e.altKey && !e.ctrlKey && !e.metaKey) {
414
+ if (!fr.value || e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
415
+ e.preventDefault();
416
+ let n = e.key === "ArrowRight" !== a, i = H.value[t] ?? r.getBoundingClientRect().width;
417
+ xr({ [t]: i + (n ? 1 : -1) * tn });
418
+ return;
419
+ }
420
+ if (e.ctrlKey || e.metaKey) return;
421
+ let o = V.value, s = o.indexOf(t);
422
+ if (s < 0) return;
423
+ let c;
424
+ switch (e.key) {
425
+ case "ArrowLeft":
426
+ c = a ? s + 1 : s - 1;
427
+ break;
428
+ case "ArrowRight":
429
+ c = a ? s - 1 : s + 1;
430
+ break;
431
+ case "Home":
432
+ c = 0;
433
+ break;
434
+ case "End":
435
+ c = o.length - 1;
436
+ break;
437
+ case "Enter":
438
+ case " ":
439
+ if (i !== r || !B.value[s]?.sortable) return;
440
+ e.preventDefault(), fi(t);
441
+ return;
442
+ default: return;
443
+ }
444
+ if (n && (!e.shiftKey || !A.reorderable)) return;
445
+ if (e.preventDefault(), !e.shiftKey) {
446
+ cr(c);
447
+ return;
448
+ }
449
+ if (!A.reorderable) return;
450
+ let l = $n(t, c);
451
+ l && (tr.value = "", O.value = l, rr.value = t, await b(), ur(t, n), dr = V.value.indexOf(t) === l.indexOf(t) ? null : {
452
+ key: t,
453
+ index: l.indexOf(t),
454
+ inGrid: n,
455
+ until: Date.now() + $t
456
+ }, nr(t, s));
457
+ }, ur = (e, t) => {
458
+ let n = sr(e);
459
+ n?.focus(), n && t && n.parentElement && (oo.value = {
460
+ key: null,
461
+ row: -1,
462
+ col: Array.prototype.indexOf.call(n.parentElement.children, n)
463
+ });
464
+ }, dr = null;
465
+ T(V, (e) => {
466
+ let t = dr;
467
+ if (!t) return;
468
+ if (Date.now() > t.until) {
469
+ dr = null;
470
+ return;
471
+ }
472
+ if (e.indexOf(t.key) !== t.index) return;
473
+ dr = null;
474
+ let n = document.activeElement, r = L.value;
475
+ (!n || n === document.body || r?.contains(n)) && n !== sr(t.key) && ur(t.key, t.inGrid);
476
+ }, { flush: "post" }), process.env.NODE_ENV !== "production" && (T(O, (t) => {
477
+ new Set(t).size !== t.length && e().warn("BbTable: `order` lists a key more than once — the first occurrence wins.");
478
+ }, { immediate: !0 }), T(() => A.columns.some((e) => e.snap != null) && (!!A.reorderable || B.value !== A.columns), (t) => {
479
+ t && e().warn("BbTable: `snap` names a PARENT column and the child renders in its own order — it does not compose with `order` / `reorderable` / a `hidden` column on the snapped table itself. Order and hide on the parent (a key-snapped child follows it), or drop the snaps.");
480
+ }, { immediate: !0 }));
481
+ let fr = h(() => !!A.resizable && !q.value), H = S({}), pr = S(null), mr = S(null), hr = (e) => {
482
+ let t = String(e.key);
483
+ return pr.value?.[t] ?? H.value[t] ?? e.width ?? (J.value ? Y.value[t] : void 0);
484
+ }, gr = (e) => {
485
+ let t = String(e.key);
486
+ return pr.value?.[t] !== void 0 || t in H.value;
487
+ }, _r = h(() => Object.keys(pr.value ?? {}).join(" ")), vr = h(() => /* @__PURE__ */ new Set([...Object.keys(H.value), ..._r.value.split(" ").filter(Boolean)])), yr = h(() => {
488
+ let e = /* @__PURE__ */ new Map(), t = vr.value, n = J.value, r = Y.value;
489
+ for (let i of B.value) {
490
+ let a = String(i.key), o = n && i.width == null, s = [];
491
+ o && s.push("bb-table__cell--nowrap"), t.has(a) && s.push("bb-table__cell--resized"), (t.has(a) || o && a in r) && s.push("bb-table__cell--clip"), s.length && e.set(a, s.join(" "));
492
+ }
493
+ return e;
494
+ }), br = h(() => pr.value !== null || Object.keys(H.value).length > 0), xr = (e) => {
495
+ let t = { ...H.value }, n = [];
496
+ for (let [r, i] of Object.entries(e)) {
497
+ let e = Math.max(en, Math.round(i));
498
+ t[r] !== e && (t[r] = e, n.push([r, e]));
499
+ }
500
+ if (n.length) {
501
+ H.value = t;
502
+ for (let [e, t] of n) j("resize:column", e, t);
503
+ }
504
+ }, Sr = (e) => {
505
+ if (!(e in H.value)) return;
506
+ let { [e]: t, ...n } = H.value;
507
+ H.value = n, j("resize:column", e, null);
508
+ };
509
+ T(() => A.columns.map((e) => [String(e.key), e.width]), (e, t) => {
510
+ if (!t || !Object.keys(H.value).length) return;
511
+ let n = new Map(t), r = H.value, i = e.filter(([e, t]) => n.has(e) && n.get(e) !== t && e in r && t !== r[e]);
512
+ if (!i.length) return;
513
+ let a = { ...r };
514
+ for (let [e] of i) delete a[e];
515
+ H.value = a;
516
+ });
517
+ let U = null, Cr = () => {
518
+ document.removeEventListener("pointermove", Tr), document.removeEventListener("pointerup", Er), document.removeEventListener("pointercancel", Dr), document.removeEventListener("keydown", Or, !0), window.removeEventListener("blur", Dr);
519
+ }, wr = () => {
520
+ if (Cr(), U) try {
521
+ U.handle.releasePointerCapture(U.pointerId);
522
+ } catch {}
523
+ document.documentElement.classList.remove(nn), U = null, pr.value = null, mr.value = null, L.value && (L.value.style.gridTemplateColumns = Zi.value);
524
+ }, Tr = (e) => {
525
+ if (!U || e.pointerId !== U.pointerId) return;
526
+ let t = (e.clientX - U.x0) * (U.rtl ? -1 : 1);
527
+ t = Math.max(en - U.startWidth, t);
528
+ let { neighbour: n } = U;
529
+ if (e.shiftKey && n) {
530
+ t = Math.min(n.startWidth - en, t), pr.value = {
531
+ [U.key]: Math.round(U.startWidth + t),
532
+ [n.key]: Math.round(n.startWidth - t)
533
+ };
534
+ return;
535
+ }
536
+ pr.value = { [U.key]: Math.round(U.startWidth + t) };
537
+ }, Er = (e) => {
538
+ if (!U || e.pointerId !== U.pointerId) return;
539
+ let { key: t, startWidth: n, neighbour: r } = U, i = pr.value;
540
+ if (wr(), !i) return;
541
+ let a = {};
542
+ i[t] !== Math.round(n) && (a[t] = i[t]), r && i[r.key] !== void 0 && i[r.key] !== Math.round(r.startWidth) && (a[r.key] = i[r.key]), xr(a);
543
+ }, Dr = (e) => {
544
+ U && (e instanceof PointerEvent && e.pointerId !== U.pointerId || wr());
545
+ }, Or = (e) => {
546
+ !U || e.key !== "Escape" || (e.preventDefault(), e.stopImmediatePropagation(), wr());
547
+ }, kr = (e, t) => {
548
+ if (!fr.value || Sa.value || U || !e.isPrimary || e.button !== 0) return;
549
+ let n = sr(t);
550
+ if (!n) return;
551
+ e.preventDefault();
552
+ let r = e.currentTarget;
553
+ try {
554
+ r.setPointerCapture(e.pointerId);
555
+ } catch {}
556
+ document.documentElement.classList.add(nn);
557
+ let i = V.value, a = i[i.indexOf(t) + 1], o = a ? sr(a) : null;
558
+ U = {
559
+ pointerId: e.pointerId,
560
+ handle: r,
561
+ key: t,
562
+ x0: e.clientX,
563
+ startWidth: n.getBoundingClientRect().width,
564
+ neighbour: a && o ? {
565
+ key: a,
566
+ startWidth: o.getBoundingClientRect().width
567
+ } : null,
568
+ rtl: getComputedStyle(n).direction === "rtl"
569
+ }, mr.value = t, document.addEventListener("pointermove", Tr), document.addEventListener("pointerup", Er), document.addEventListener("pointercancel", Dr), document.addEventListener("keydown", Or, !0), window.addEventListener("blur", Dr);
570
+ };
571
+ Ze(wr);
572
+ let W = S("idle"), Ar = S(null), jr = S(""), Mr = S(), Nr = Symbol("bb-table-column-drag"), G = null, Pr = (e) => Math.max(0, Math.min(1, e)), Fr = () => {
573
+ let e = bi.value ? R.value?.parentElement ?? null : R.value ?? null;
574
+ for (; e;) {
575
+ let t = getComputedStyle(e).overflowX;
576
+ if (t === "auto" || t === "scroll") return e;
577
+ e = e.parentElement;
578
+ }
579
+ return null;
580
+ }, Ir = () => {
581
+ let e = G?.scrollport?.getBoundingClientRect(), t = Math.max(e?.left ?? 0, 0), n = Math.min(e?.right ?? window.innerWidth, window.innerWidth);
582
+ return {
583
+ left: t,
584
+ right: Math.max(t + 1, n)
585
+ };
586
+ }, Lr = (e) => Array.from(e.children).filter((e) => e instanceof HTMLElement && e.classList.contains("bb-table__cell-column-header") && !!e.dataset.columnKey), Rr = () => {
587
+ let e = Mr.value;
588
+ e?.isConnected && !e.matches(":popover-open") && e.showPopover();
589
+ }, zr = () => {
590
+ let e = Mr.value;
591
+ e && e.matches(":popover-open") && e.hidePopover();
592
+ }, Br = (e, t) => {
593
+ let n = Mr.value;
594
+ n && (n.style.translate = `${e + un}px ${t + un}px`);
595
+ }, Vr = (e) => {
596
+ if (!G || W.value !== "dragging") return;
597
+ let t = Ir(), n = Math.max(t.left, Math.min(e, t.right - 1)), r = Lr(G.row);
598
+ if (r.length < 2) return;
599
+ let i = (e) => e.style.position === "sticky", a = new Map(r.map((e) => [e, e.getBoundingClientRect()])), o = [...r.filter(i), ...r.filter((e) => !i(e))].filter((e) => e.dataset.columnKey !== G.key), s = V.value, c = s.indexOf(G.key);
600
+ if (c < 0) return;
601
+ let l = Infinity, u = -Infinity;
602
+ for (let e of a.values()) l = Math.min(l, e.left), u = Math.max(u, e.right);
603
+ let d, f;
604
+ if (n < l) d = "\0start", f = G.rtl ? s.length - 1 : 0;
605
+ else if (n >= u) d = "\0end", f = G.rtl ? 0 : s.length - 1;
606
+ else {
607
+ let e = o.find((e) => {
608
+ let t = a.get(e);
609
+ return n >= t.left && n < t.right;
610
+ });
611
+ if (!e) return;
612
+ d = e.dataset.columnKey, f = s.indexOf(d);
613
+ }
614
+ if (f < 0 || (f = er(G.key, f) ?? c, f === c)) return;
615
+ let p = f > c;
616
+ if (G.target?.key === d && G.target.after === p) return;
617
+ let m = Ae(G.base, Xn.value, G.key, f, qn.value);
618
+ if (Pe(m, z.value ?? G.base)) {
619
+ G.target = {
620
+ key: d,
621
+ after: p
622
+ };
623
+ return;
624
+ }
625
+ ((G.rtl ? !p : p) ? n <= G.lastMoveX + ln : n >= G.lastMoveX - ln) || (G.target = {
626
+ key: d,
627
+ after: p
628
+ }, G.lastMoveX = n, z.value = m);
629
+ }, Hr = () => {
630
+ if (!G || W.value !== "dragging" || !G.scrollDirection) {
631
+ G && (G.raf = void 0);
632
+ return;
633
+ }
634
+ let e = Ir(), t = G.scrollDirection < 0 ? G.lastX - e.left : e.right - G.lastX, n = Math.ceil(cn * (1 - Pr(t / sn))), r = G.scrollport ?? document.scrollingElement;
635
+ r && (r.scrollLeft += G.scrollDirection * n), Vr(G.lastX), G.raf = requestAnimationFrame(Hr);
636
+ }, Ur = () => {
637
+ if (!G) return;
638
+ let e = Ir(), t = G.lastX - e.left, n = e.right - G.lastX;
639
+ G.scrollDirection = t < sn ? -1 : +(n < sn), G.scrollDirection && G.raf === void 0 && (G.raf = requestAnimationFrame(Hr));
640
+ }, Wr = () => {
641
+ document.removeEventListener("pointermove", Jr), document.removeEventListener("pointerup", Yr), document.removeEventListener("pointercancel", Xr), document.removeEventListener("keydown", Qr, !0), document.removeEventListener("dragstart", $r), document.removeEventListener("contextmenu", $r, !0), window.removeEventListener("blur", Xr), G?.row.removeEventListener("lostpointercapture", Zr);
642
+ }, Gr = () => {
643
+ if (G) {
644
+ clearTimeout(G.timer), G.raf !== void 0 && cancelAnimationFrame(G.raf), Wr();
645
+ try {
646
+ G.row.hasPointerCapture(G.pointerId) && G.row.releasePointerCapture(G.pointerId);
647
+ } catch {}
648
+ zr(), l(Nr), Ar.value = null, z.value = null, W.value = "idle", G = null;
649
+ }
650
+ }, Kr = () => {
651
+ G && (G.raf !== void 0 && cancelAnimationFrame(G.raf), G.raf = void 0, G.scrollDirection = 0, zr(), l(Nr), Ar.value = null, z.value = null, W.value = "cancelled");
652
+ }, qr = () => {
653
+ if (!(!G || W.value !== "armed")) {
654
+ clearTimeout(G.timer), G.timer = void 0;
655
+ try {
656
+ G.row.setPointerCapture(G.pointerId);
657
+ } catch {}
658
+ G.row.addEventListener("lostpointercapture", Zr), G.base = Qn(O.value), G.rtl = getComputedStyle(G.row).direction === "rtl", G.scrollport = Fr(), G.lastMoveX = G.x0, G.target = null, z.value = G.base, Ar.value = G.key, jr.value = G.label, W.value = "dragging", c(Nr), Rr(), Br(G.lastX, G.lastY), Vr(G.lastX), Ur();
659
+ }
660
+ }, Jr = (e) => {
661
+ if (!(!G || e.pointerId !== G.pointerId)) {
662
+ if (G.lastX = e.clientX, G.lastY = e.clientY, W.value === "armed") {
663
+ let t = Math.hypot(e.clientX - G.x0, e.clientY - G.y0);
664
+ if (G.pointerType === "touch") {
665
+ t >= an && Gr();
666
+ return;
667
+ }
668
+ if (t < rn) return;
669
+ qr();
670
+ return;
671
+ }
672
+ W.value === "dragging" && (Br(e.clientX, e.clientY), Vr(e.clientX), Ur());
673
+ }
674
+ }, Yr = (e) => {
675
+ if (!G || e.pointerId !== G.pointerId) return;
676
+ let { key: t } = G, n = G.base ? G.base.filter((e) => Xn.value.includes(e) && !qn.value.has(e)).indexOf(t) : -1, r = W.value === "dragging" && z.value !== null && !Pe(z.value, G.base) ? z.value : null;
677
+ Gr(), r && (tr.value = "", O.value = r, b(() => nr(t, n)));
678
+ }, Xr = (e) => {
679
+ G && (e instanceof PointerEvent && e.pointerId !== G.pointerId || Gr());
680
+ }, Zr = () => {
681
+ G && W.value === "dragging" && Gr();
682
+ }, Qr = (e) => {
683
+ !G || W.value !== "dragging" || e.key !== "Escape" || !s(Nr) || (e.preventDefault(), e.stopImmediatePropagation(), Kr());
684
+ }, $r = (e) => {
685
+ G && W.value !== "idle" && e.preventDefault();
686
+ }, ei = (e) => {
687
+ if (!A.reorderable || Sa.value || M.thead || !e.isPrimary || e.button !== 0 || G || B.value.length < 2) return;
688
+ let t = e.target;
689
+ if (!(t instanceof Element)) return;
690
+ let n = e.currentTarget, r = t.closest(".bb-table__cell-column-header");
691
+ if (!r || r.parentElement !== n || !r.dataset.columnKey) return;
692
+ let i = t.closest(dn);
693
+ if (i && r.contains(i)) return;
694
+ let a = r.dataset.columnKey, o = B.value.find((e) => String(e.key) === a);
695
+ o && (Zn.value.has(a) || (G = {
696
+ pointerId: e.pointerId,
697
+ pointerType: e.pointerType,
698
+ key: a,
699
+ label: o.label,
700
+ row: n,
701
+ x0: e.clientX,
702
+ y0: e.clientY,
703
+ lastX: e.clientX,
704
+ lastY: e.clientY,
705
+ lastMoveX: e.clientX,
706
+ rtl: !1,
707
+ base: [],
708
+ scrollport: null,
709
+ target: null,
710
+ timer: void 0,
711
+ raf: void 0,
712
+ scrollDirection: 0
713
+ }, W.value = "armed", document.addEventListener("pointermove", Jr), document.addEventListener("pointerup", Yr), document.addEventListener("pointercancel", Xr), document.addEventListener("keydown", Qr, !0), document.addEventListener("dragstart", $r), document.addEventListener("contextmenu", $r, !0), window.addEventListener("blur", Xr), e.pointerType === "touch" && (G.timer = setTimeout(qr, on))));
714
+ }, ti = (e) => {
715
+ G && (W.value === "dragging" || W.value === "cancelled") && e.cancelable && e.preventDefault();
716
+ };
717
+ Ze(Gr);
718
+ let { data: ni } = de({ items: h(() => t(k.value) ? [] : [k.value]) }), { data: ri } = de({ items: bn }), ii = h(() => k.value !== void 0 || K.highlighted !== void 0), ai = Ge(), oi = () => {
719
+ let e = ai?.vnode.props ?? {};
720
+ return "highlighted" in e || "onUpdate:highlighted" in e;
721
+ };
722
+ process.env.NODE_ENV !== "production" && T(() => k.value === void 0 && oi(), (t) => {
723
+ t && e().warn("BbTable: `highlighted` is bound but its value is `undefined`, so the highlight mechanic stays off. Initialise it to `null` — `ref(null)`, not `ref()` — to be considered bound. `undefined` means \"never initialised\" and switches highlight off entirely; `null` means \"initialised and currently empty\".");
724
+ }, { immediate: !0 });
725
+ let si = !1, ci = () => {
726
+ process.env.NODE_ENV !== "production" && (si || (si = !0, e().warn("BbTable: `toggleHighlighted` was called from a slot, but highlight is not connected, so nothing happened. Bind `v-model:highlighted` (initialised to `null`), or seed `highlighted` through `useBbTableContext(id, { highlighted })`, or drop the call — with nothing bound the table has nowhere to put the value.")));
727
+ }, li = (e, { viaSlot: t = !1 } = {}) => {
728
+ if (!ii.value) {
729
+ t && ci();
730
+ return;
731
+ }
732
+ let n = e.valueHash in ni.value;
733
+ k.value = n ? null : e.value;
734
+ }, ui = (e, t) => {
735
+ e.target instanceof Element && (e.target.closest("a, button, input, label, select, textarea, [contenteditable], [role=\"button\"]") || window.getSelection()?.toString() || li(t));
736
+ }, di = (e) => D.value.find(([t]) => t === e)?.[1] ?? null, fi = (e) => {
737
+ let t = di(e);
738
+ t === null ? D.value = [...D.value, [e, "asc"]] : t === "asc" ? D.value = D.value.map((t) => t[0] === e ? [e, "desc"] : t) : D.value = D.value.filter(([t]) => t !== e);
739
+ }, { state: K, isReady: pi } = i(() => In.value, {
187
740
  selected: {
188
- get: () => N.modelValue,
189
- set: (e) => P("update:modelValue", e)
741
+ get: () => A.modelValue,
742
+ set: (e) => j("update:modelValue", e)
190
743
  },
191
744
  unselected: {
192
- get: () => N.unselectedItems,
193
- set: (e) => P("update:unselectedItems", e)
745
+ get: () => A.unselectedItems,
746
+ set: (e) => j("update:unselectedItems", e)
194
747
  },
195
748
  all: {
196
- get: () => k.value,
749
+ get: () => E.value,
197
750
  set: (e) => {
198
- k.value = e;
751
+ E.value = e;
199
752
  }
200
753
  },
201
754
  sort: {
202
- get: () => A.value,
755
+ get: () => D.value,
203
756
  set: (e) => {
204
- A.value = e;
757
+ D.value = e;
758
+ }
759
+ },
760
+ order: {
761
+ get: () => O.value,
762
+ set: (e) => {
763
+ O.value = e;
205
764
  }
206
765
  },
207
766
  highlighted: {
208
- get: () => j.value ?? null,
767
+ get: () => k.value,
209
768
  set: (e) => {
210
- j.value = e;
769
+ k.value = e;
211
770
  }
212
771
  },
213
- page: { get: () => N.page === void 0 ? void 0 : p(N.page, 1) },
772
+ page: { get: () => A.page === void 0 ? A.virtual ? 1 : void 0 : he(A.page, 1) },
214
773
  perPage: {
215
- get: () => ae(N.perPage),
216
- infer: () => Array.isArray(N.items) ? N.items.length : void 0
774
+ get: () => me(A.perPage),
775
+ infer: () => Array.isArray(A.items) ? A.items.length : void 0
217
776
  },
218
777
  totalItems: {
219
- get: () => ae(N.totalItems),
220
- infer: () => Array.isArray(N.items) ? N.items.length : void 0
778
+ get: () => me(A.totalItems),
779
+ infer: () => Array.isArray(A.items) ? A.items.length : void 0
221
780
  },
222
- totalPages: { get: () => N.totalPages === void 0 ? void 0 : p(N.totalPages, 1) }
223
- }), yt = h(() => N.columns.some((e) => e.snap != null)), V = h(() => !!N.inheritColumnWidths || yt.value), H = h(() => N.fixed || yt.value || N.columns.some((e) => e.width != null) || V.value && !!R.value), bt = h(() => V.value && !!R.value), xt = bt, St = (e) => {
781
+ totalPages: { get: () => A.totalPages === void 0 ? void 0 : he(A.totalPages, 1) }
782
+ }), mi = h(() => A.columns.some((e) => e.snap != null)), hi = h(() => !!A.inheritColumnWidths || mi.value), gi = h(() => A.fixed || mi.value || Jn.value.some((e) => e.width != null) || br.value || hi.value && !!Ln.value), q = h(() => hi.value && !!Ln.value);
783
+ ut(() => {
784
+ zn.ordered = !!A.reorderable || O.value.length > 0;
785
+ });
786
+ let J = h(() => !!A.virtual && !q.value && !M.tbody), Y = S({}), X = S({}), _i = S(""), vi = h(() => J.value && !!_i.value && Ji.value.every((e) => !e.contentSized)), yi = (e) => J.value && e.width == null && !gr(e) && String(e.key) in Y.value, bi = q, xi = (e) => {
224
787
  if (typeof e == "number") return `${e}px`;
225
788
  let t = e.trim();
226
789
  return /^-?\d*\.?\d+$/.test(t) ? `${t}px` : t;
227
- }, Ct = h(() => {
228
- let e = ut.value?.tracks;
229
- return e ? Object.keys(e).filter((e) => /^\d+$/.test(e)).length : 0;
230
- }), wt = h(() => {
231
- let e = ut.value?.tracks ?? {}, t = [];
232
- "select" in e && t.push("select");
233
- for (let e = 0; e < Ct.value; e++) t.push(String(e));
234
- return "actions" in e && t.push("actions"), t;
235
- }), Tt = h(() => +("select" in (ut.value?.tracks ?? {}))), Et = h(() => Tt.value + Ct.value), Dt = h(() => wt.value.length), Ot = (e) => {
236
- let t = wt.value[e];
237
- return t ? ft(t, "0px") : "0px";
238
- }, kt = (e, t) => {
239
- if (!R.value || t - e <= 1e-6) return null;
790
+ }, Si = h(() => Rn.value?.keys ?? []), Ci = h(() => +(Si.value[0] === "select")), wi = h(() => Si.value.length), Ti = h(() => {
791
+ let e = Si.value;
792
+ return e[e.length - 1] === "actions" ? e.length - 1 : e.length;
793
+ }), Ei = (e) => Si.value.indexOf(e), Di = (e) => {
794
+ let t = Si.value[e];
795
+ return t ? Vn(t, "0px") : "0px";
796
+ }, Oi = (e, t) => {
797
+ if (!Ln.value || t - e <= 1e-6) return null;
240
798
  let n = [];
241
799
  for (let r = Math.floor(e); r < Math.ceil(t - 1e-6); r++) {
242
800
  let i = Math.min(t, r + 1) - Math.max(e, r);
243
801
  if (i <= 1e-6) continue;
244
- let a = Ot(r);
802
+ let a = Di(r);
245
803
  n.push(i >= .999999 ? a : `${Number(i.toFixed(4))} * ${a}`);
246
804
  }
247
805
  return n.length ? n.length === 1 && !n[0].includes("*") ? n[0] : `calc(${n.join(" + ")})` : null;
248
- }, At = h(() => {
249
- let e = N.columns, t = e.map((e) => typeof e.snap == "number" ? e.snap : Array.isArray(e.snap) ? e.snap[0] : null), n = Tt.value;
250
- return e.map((e, r) => {
251
- let i = t[r] ?? n, a;
252
- if (Array.isArray(e.snap)) a = e.snap[1] === -1 ? Et.value : e.snap[1];
253
- else {
254
- let e = t[r + 1];
255
- a = e != null && e > i ? e : Math.floor(i) + 1;
256
- }
257
- return n = a, {
258
- start: i,
259
- end: a
806
+ }, ki = (e) => {
807
+ let t = /^(.+)\.(\d+)$/.exec(e);
808
+ return t ? {
809
+ key: t[1],
810
+ fraction: Number(`0.${t[2]}`)
811
+ } : {
812
+ key: e,
813
+ fraction: 0
814
+ };
815
+ }, Ai = (e) => {
816
+ if (Array.isArray(e)) {
817
+ let t = ki(e[0]), n = ki(e[1]), r = Ei(t.key), i = Ei(n.key);
818
+ if (r < 0 || i < 0) return null;
819
+ let a = r + t.fraction, o = n.fraction > 0 ? i + n.fraction : i + 1;
820
+ return o > a ? {
821
+ start: a,
822
+ end: o,
823
+ explicit: !0
824
+ } : null;
825
+ }
826
+ let t = ki(e), n = Ei(t.key);
827
+ if (n < 0) {
828
+ let t = Ei(e);
829
+ return t < 0 ? null : {
830
+ start: t,
831
+ end: t + 1,
832
+ explicit: !1
260
833
  };
834
+ }
835
+ return {
836
+ start: n,
837
+ end: n + 1,
838
+ explicit: !1
839
+ };
840
+ }, ji = h(() => !!Rn.value?.ordered), Mi = h(() => {
841
+ let e = B.value, t = Ci.value, n = Ti.value, r = wi.value, i = ji.value, a = e.map(() => null), o = /* @__PURE__ */ new Set(), s = (e) => {
842
+ for (let t = Math.floor(e.start); t < e.end - 1e-6; t++) o.add(t);
843
+ };
844
+ i || (e.forEach((e, t) => {
845
+ if (e.snap == null) return;
846
+ let n = Ai(e.snap);
847
+ n && (a[t] = {
848
+ ...n,
849
+ overflow: !1
850
+ }, s(a[t]));
851
+ }), e.forEach((e, r) => {
852
+ if (a[r] || e.snap != null) return;
853
+ let i = Ei(String(e.key));
854
+ i < t || i >= n || o.has(i) || (a[r] = {
855
+ start: i,
856
+ end: i + 1,
857
+ explicit: !1,
858
+ overflow: !1
859
+ }, o.add(i));
860
+ }));
861
+ let c = 0, l = 0, u = e.map((i, s) => {
862
+ let u = a[s], d;
863
+ if (u && u.start + 1e-6 < c && (a[s] = null, u = null, d = String(i.key)), !u) {
864
+ let i = Math.max(c, t), f = n;
865
+ for (let t = s + 1; t < e.length; t++) {
866
+ let e = a[t];
867
+ e && (f = Math.min(f, e.start));
868
+ }
869
+ let p = Math.max(Math.floor(i), t);
870
+ for (; p < f && o.has(p);) p++;
871
+ if (p < f && p + 1e-6 >= i) o.add(p), u = {
872
+ start: i,
873
+ end: p + 1,
874
+ explicit: !1,
875
+ overflow: !1
876
+ };
877
+ else if (p < f) o.add(p), u = {
878
+ start: i,
879
+ end: p + 1,
880
+ explicit: !1,
881
+ overflow: !1
882
+ };
883
+ else {
884
+ let e = Math.max(r, n) + l++;
885
+ u = {
886
+ start: e,
887
+ end: e + 1,
888
+ explicit: !1,
889
+ overflow: !0
890
+ };
891
+ }
892
+ d && (u.demoted = d);
893
+ }
894
+ return c = Math.max(c, u.end), u;
261
895
  });
262
- }), jt = (e) => bt.value && e.start >= Et.value, Mt = h(() => At.value.some(jt)), Nt = (e) => N.columns[e]?.width == null && !bt.value, Pt = h(() => {
263
- if (!bt.value) return -1;
264
- for (let e = N.columns.length - 1; e >= 0; e--) {
265
- let t = N.columns[e];
266
- if (t.width == null && t.snap == null) return e;
896
+ return u.forEach((t, r) => {
897
+ if (t.overflow || t.explicit) return;
898
+ let i = u[r + 1];
899
+ i && !i.overflow && i.start > t.end && (t.end = i.start), r === e.length - 1 && e[r].width == null && (t.end = Math.max(t.end, n));
900
+ }), u;
901
+ }), Ni = (e) => q.value && e.overflow;
902
+ process.env.NODE_ENV !== "production" && (T(() => mi.value && ji.value, (t) => {
903
+ t && e().warn("BbTable: `snap` targets are ignored under a parent that uses `order` / `reorderable` — the parent's columns can move, so the child inherits by position. Keep the parent's order static (no `reorderable`, an empty `order`) to snap by key.");
904
+ }, { immediate: !0 }), T(() => Mi.value.find((e) => e.demoted)?.demoted ?? null, (t) => {
905
+ t !== null && e().warn(`BbTable: column '${t}' snaps to a parent column that sits BEFORE the column preceding it — the child's order disagrees with the parent's, so the snap cannot tile and the column flows into the next free parent track instead. Declare the child's columns in the parent's order.`);
906
+ }, { immediate: !0 }));
907
+ let Pi = h(() => Mi.value.some(Ni)), Fi = (e) => {
908
+ let t = B.value[e];
909
+ return (t ? hr(t) : null) == null && !q.value;
910
+ }, Ii = h(() => {
911
+ if (!q.value) return -1;
912
+ let e = B.value;
913
+ for (let t = e.length - 1; t >= 0; t--) {
914
+ let n = e[t];
915
+ if (n.width == null && n.snap == null) return t;
267
916
  }
268
917
  return -1;
269
- }), Ft = h(() => {
270
- let e = At.value[0];
271
- if (!V.value || !R.value || !e) return null;
272
- let t = kt(0, e.start), n = N.selectable ? U.select : null;
273
- return n ? `calc(${t ?? "0px"} - ${n})` : t;
274
- }), It = h(() => {
275
- let e = At.value, t = e[e.length - 1];
276
- if (!V.value || !R.value || !t || Mt.value || Pt.value === N.columns.length - 1) return null;
277
- let n = kt(t.end, Dt.value), r = N.actions ? U.actions : null;
278
- return r ? `calc(${n ?? "0px"} - ${r})` : n;
279
- }), Lt = h(() => Ft.value !== null), Rt = h(() => It.value !== null), U = Ce({
280
- select: null,
281
- actions: null
282
- }), zt = h(() => {
283
- let e = (e) => V.value ? ft(e) : "auto", t = (t) => H.value && U[t] ? U[t] : e(t), n = [];
284
- N.selectable && n.push({
918
+ }), Li = h(() => {
919
+ let e = Mi.value[0];
920
+ return !hi.value || !Ln.value || !e ? null : Oi(0, e.start);
921
+ }), Ri = h(() => {
922
+ let e = Mi.value, t = e[e.length - 1];
923
+ return !hi.value || !Ln.value || !t || Pi.value ? null : Oi(t.end, wi.value);
924
+ }), zi = (e) => zn.tracks[e] ?? null, Bi = (e, t, n) => !hi.value || !Ln.value ? null : n ? t ? `calc(${e ?? "0px"} - ${t})` : null : e, Vi = h(() => Bi(Li.value, A.selectable ? zi("select") : null, !!A.selectable)), Hi = h(() => Pi.value ? null : Bi(Ri.value, P.value ? zi("actions") : null, P.value)), Ui = h(() => Vi.value !== null), Wi = h(() => Hi.value !== null), Gi = (e, t) => {
925
+ let n = J.value ? X.value[t] : null;
926
+ return n == null ? e && Ki.value ? `minmax(${e}, max-content)` : "max-content" : `${n}px`;
927
+ }, Ki = h(() => Object.keys(Rn.value?.tracks ?? {}).length > 0), qi = (e) => /^(auto|min-content|max-content|(fit-content|minmax)\(.*\)|-?[\d.]+fr)$/.test(e.trim()), Ji = h(() => {
928
+ let e = [];
929
+ A.selectable && e.push({
285
930
  key: "select",
286
- width: t("select")
931
+ width: Gi(Li.value, "select"),
932
+ contentSized: X.value.select == null
287
933
  });
288
- let r = N.columns.length - 1;
289
- return N.columns.forEach((e, t) => {
290
- let i = String(t), a = e.width == null ? null : St(e.width), o = At.value[t];
291
- if (t === Pt.value && !Mt.value) {
292
- n.push({
293
- key: i,
294
- width: "auto"
934
+ let t = B.value, n = t.length - 1, r = !q.value && t.length > 0 && t.every((e) => e.width != null);
935
+ return t.forEach((t, i) => {
936
+ let a = String(t.key), o = hr(t), s = o == null ? null : xi(o), c = Mi.value[i], l = null, u = null;
937
+ if (s != null && qi(s) ? u = s : s != null && r && !gr(t) ? u = `minmax(${s}, ${parseFloat(s) || 1}fr)` : s != null && yi(t) ? u = `minmax(${s}, 1fr)` : s == null ? Fi(i) ? u = A.fixed ? "minmax(0, 1fr)" : "auto" : Ki.value ? Ni(c) ? u = "min-content" : (l = Oi(c.start, c.end), l === null && (u = "auto")) : u = "max-content" : l = s, u !== null) {
938
+ e.push({
939
+ key: a,
940
+ width: u,
941
+ contentSized: /^(auto|min-content|max-content)$/.test(u)
295
942
  });
296
943
  return;
297
944
  }
298
- let s;
299
- s = a ?? (Nt(t) ? H.value && Kt.value[t] || null : jt(o) ? qt.value[t] ?? null : kt(o.start, o.end));
300
- let c = [];
301
- t === 0 && Lt.value && c.push("var(--offset-internal-start, 0px)"), t === r && Rt.value && c.push("var(--offset-internal-end, 0px)");
302
- let l = c.length ? `calc(${[...c, s ?? "0px"].join(" + ")})` : s ?? "auto";
303
- n.push({
304
- key: i,
305
- width: l
945
+ let d = [];
946
+ i === 0 && Ui.value && d.push("var(--offset-internal-start, 0px)"), i === n && Wi.value && d.push("var(--offset-internal-end, 0px)");
947
+ let f = d.length ? `calc(${[...d, l].join(" + ")})` : l, p = i === Ii.value && !Pi.value ? `minmax(${f}, 1fr)` : f;
948
+ e.push({
949
+ key: a,
950
+ width: p,
951
+ contentSized: !1
306
952
  });
307
- }), N.actions && n.push({
953
+ }), P.value && e.push({
308
954
  key: "actions",
309
- width: t("actions")
310
- }), n;
311
- }), Bt = h(() => {
955
+ width: Gi(Ri.value, "actions"),
956
+ contentSized: X.value.actions == null
957
+ }), e;
958
+ }), Yi = h(() => {
959
+ let e = B.value, t = [];
960
+ for (let n of Ji.value) n.contentSized || e.some((e) => String(e.key) === n.key) && t.push(n.key);
961
+ return t.join(" ");
962
+ }), Xi = h(() => new Set(Yi.value.split(" ").filter(Boolean))), Zi = h(() => Ji.value.map((e) => e.width).join(" ")), Qi = S(Zi.value), $i = h(() => `grid-template-columns: ${Qi.value}`);
963
+ T(Zi, (e) => {
964
+ if (U && L.value) {
965
+ L.value.style.gridTemplateColumns = e;
966
+ return;
967
+ }
968
+ Qi.value = e;
969
+ }, { flush: "sync" });
970
+ let ea = h(() => {
312
971
  let e = {};
313
- return Ft.value && (e["--offset-start"] = Ft.value), It.value && (e["--offset-end"] = It.value), e;
314
- }), Vt = h(() => {
315
- let e = {
316
- ...dt.value,
317
- ...Bt.value
318
- };
319
- return Jt.value && (e["--natural-width"] = Jt.value), W.value > 0 && (e["--fill"] = `${W.value}px`), e;
320
- }), Ht = () => Array.from(I.value?.querySelectorAll(":scope > thead > tr.bb-table-header-row > th") ?? []), Ut = () => {
321
- let e = zt.value.map((e) => e.key), t = {};
322
- Ht().forEach((n, r) => {
323
- let i = e[r];
324
- i != null && (t[i] = `${n.getBoundingClientRect().width}px`);
325
- }), pt(t);
326
- }, Wt = () => {
327
- let e = I.value;
328
- if (!e) return;
329
- let t = [
330
- "block",
331
- "flex",
332
- "grid",
333
- "flow-root",
334
- "list-item"
335
- ], n = [
336
- "BUTTON",
337
- "INPUT",
338
- "SELECT",
339
- "TEXTAREA",
340
- "IMG",
341
- "svg",
342
- "VIDEO",
343
- "CANVAS"
344
- ], r = (e) => {
345
- let i = getComputedStyle(e), a = i.display.includes("flex") || i.display.includes("grid"), o = 0, s = 0;
346
- if (e.querySelectorAll(":scope > *").forEach((e) => {
347
- let i = getComputedStyle(e);
348
- if (i.position === "absolute" || i.position === "fixed") return;
349
- let c = parseFloat(i.marginLeft) + parseFloat(i.marginRight), l = !a && !n.includes(e.tagName) && i.cssFloat === "none" && t.includes(i.display) ? r(e) + parseFloat(i.paddingLeft) + parseFloat(i.paddingRight) + parseFloat(i.borderLeftWidth) + parseFloat(i.borderRightWidth) : e.getBoundingClientRect().width;
350
- o += l + (c || 0), s += 1;
351
- }), s === 0) {
352
- let t = document.createRange();
353
- return t.selectNodeContents(e), t.getBoundingClientRect().width;
354
- }
355
- if (s > 1) {
356
- let e = parseFloat(i.columnGap);
357
- e && (o += e * (s - 1));
972
+ return Vi.value && (e["--offset-start"] = Vi.value), Hi.value && (e["--offset-end"] = Hi.value), e;
973
+ }), ta = S({}), na = [
974
+ .62,
975
+ .42,
976
+ .78,
977
+ .52
978
+ ], ra = (e) => {
979
+ let t = ["transparent 0"], n = 0;
980
+ return e.forEach((e, r) => {
981
+ let i = na[r % na.length], a = Math.round((e - fn * 2) * i);
982
+ if (a >= pn) {
983
+ let e = Math.round(n + fn);
984
+ t.push(`transparent ${e}px`, `currentColor ${e}px ${e + a}px`, `transparent ${e + a}px`);
358
985
  }
359
- return o;
360
- }, i = (t) => {
361
- let n = 0;
362
- return e.querySelectorAll(t).forEach((e) => {
363
- let t = getComputedStyle(e), i = parseFloat(t.paddingLeft) + parseFloat(t.paddingRight);
364
- n = Math.max(n, r(e) + i);
365
- }), n > 0 ? `${Math.ceil(n)}px` : null;
366
- };
367
- U.select = N.selectable ? i(":scope > thead > tr > th.bb-table-header--select, :scope > tbody > tr > td.bb-table-data__cell--select") : null, U.actions = N.actions ? i(":scope > thead > tr > th.bb-table-header--actions, :scope > tbody > tr > td.bb-table__cell--actions") : null;
368
- }, Gt = () => {
369
- Wt(), Ut();
370
- }, Kt = C([]), qt = C([]), W = C(0), Jt = C(null), Yt = () => {
371
- let e = L.value;
372
- if (!e || !H.value || !N.columns.some((e) => e.width != null) && !Mt.value && Pt.value < 0) return;
373
- let t = e.offsetWidth, n = +!!N.selectable, r = U.select ? parseFloat(U.select) : 0, i = U.actions ? parseFloat(U.actions) : 0, a = Ht(), o = 0, s = 0;
374
- N.columns.forEach((e, t) => {
375
- let r = a[n + t]?.getBoundingClientRect().width ?? 0;
376
- e.width != null && (o += r), Nt(t) || (s += r);
986
+ n += e;
987
+ }), `linear-gradient(90deg, ${t.join(",")})`;
988
+ }, ia = (e) => {
989
+ if (!J.value) {
990
+ ta.value["--placeholder-bars"] && (ta.value = {});
991
+ return;
992
+ }
993
+ let t = e.map((e) => parseFloat(e));
994
+ t.some((e) => !(e >= 0)) || (ta.value = {
995
+ ...ta.value,
996
+ "--placeholder-bars": ra(t)
377
997
  });
378
- let c = document.createElement("div");
379
- c.style.cssText = [
380
- "position:absolute",
381
- "top:-9999px",
382
- "left:-9999px",
383
- "visibility:hidden",
384
- "pointer-events:none",
385
- `width:${t}px`,
386
- `height:${e.offsetHeight}px`,
387
- "overflow:visible"
388
- ].join(";");
389
- let l = e.cloneNode(!0);
390
- l.classList.remove("bb-table--fixed"), l.querySelectorAll(".bb-table-expand__row").forEach((e) => e.remove());
391
- let u = Array.from(l.querySelectorAll("col"));
392
- N.columns.forEach((e, t) => {
393
- if (e.width == null) {
394
- let e = u[n + t];
395
- e && (e.style.width = "");
396
- }
998
+ }, aa = () => {
999
+ if (!J.value) return;
1000
+ let e = Math.round(Fo.value || vo.value);
1001
+ if (!(e > 0)) return;
1002
+ let t = `${e}px`;
1003
+ ta.value["--row-h"] !== t && (ta.value = {
1004
+ ...ta.value,
1005
+ "--row-h": t
397
1006
  });
398
- let ee = l.querySelector("table");
399
- ee && (ee.style.width = "min-content", ee.style.minWidth = "0"), c.appendChild(l), document.body.appendChild(c);
400
- let te = c.querySelector("table thead tr.bb-table-header-row"), ne = te ? Array.from(te.querySelectorAll(":scope > th")) : [], d = N.columns.map((e, t) => {
401
- if (e.width != null) return 0;
402
- let r = ne[n + t];
403
- return r ? r.getBoundingClientRect().width : 0;
1007
+ }, oa = h(() => ({
1008
+ ...Bn.value,
1009
+ ...ea.value,
1010
+ ...ta.value,
1011
+ ...A.fixedHeaders || J.value ? { "--stuck-head-h": `${la.value}px` } : null,
1012
+ ...vi.value ? { "--virtual-row-tracks": _i.value } : null
1013
+ })), sa = () => {
1014
+ let e = L.value, t = Ji.value.length;
1015
+ if (!e || !t) return [];
1016
+ let n = e.querySelector(":scope > .bb-table__head > .bb-table__header-row"), r = [...n ? [n] : [], ...Array.from(e.querySelectorAll(":scope > .bb-table__head > [role=\"row\"], :scope > .bb-table__body > [role=\"row\"]"))].find((e) => e.children.length >= t);
1017
+ return r ? Array.from(r.children) : [];
1018
+ }, ca = "", la = S(0), ua = () => {
1019
+ let e = L.value;
1020
+ if (!e) return;
1021
+ if (A.fixedHeaders || J.value) {
1022
+ let t = e.querySelector(":scope > .bb-table__head"), n = t ? Math.round(t.getBoundingClientRect().height) : 0;
1023
+ n !== la.value && (la.value = n);
1024
+ }
1025
+ let t = Me(e);
1026
+ if (!t) return;
1027
+ let n = Ji.value.map((e) => e.key);
1028
+ if (t.length !== n.length) return;
1029
+ let r = t.join(" "), i = `${_a.value}|${r}`, a = nc.value !== da;
1030
+ if (i === ca) {
1031
+ a && fa(e, t);
1032
+ return;
1033
+ }
1034
+ ca = i;
1035
+ let o = {};
1036
+ n.forEach((e, n) => {
1037
+ o[e] = t[n];
404
1038
  });
405
- document.body.removeChild(c);
406
- let f = N.columns.reduce((e, t, n) => e + (Nt(n) ? d[n] : 0), 0), re = t - s - r - i, ie = (e) => `${Number(e.toFixed(3))}px`;
407
- if (Kt.value = N.columns.map((e, t) => {
408
- if (!Nt(t)) return null;
409
- let n = d[t];
410
- if (f <= 0) return ie(n);
411
- let r = re > 0 ? n / f * re : 0;
412
- return ie(Math.max(n, r));
413
- }), qt.value = d.map((e) => e > 0 ? ie(e) : null), Pt.value >= 0) {
414
- let e = Object.values(ut.value?.tracks ?? {}).reduce((e, t) => e + (parseFloat(t) || 0), 0), t = a.reduce((e, t) => e + t.getBoundingClientRect().width, 0);
415
- W.value = Math.max(0, e - t + W.value);
416
- } else W.value = 0;
417
- let ae = d.reduce((e, t) => e + t, 0), p = o + ae + r + i;
418
- Jt.value = p > 0 ? `${Math.ceil(p)}px` : null;
419
- }, G = null, Xt, Zt = C(!1), Qt = !1, $t = () => {
420
- let e = L.value, t = I.value;
421
- Qt = !!e && !!t && t.getBoundingClientRect().width > e.clientWidth + 1;
422
- }, en = () => {
423
- G !== null && clearTimeout(G), G = setTimeout(() => {
424
- G = null, Yt(), be(() => {
425
- Zt.value = !1, $t();
426
- });
427
- }, 200);
428
- }, K, tn, nn = () => {
429
- K && (K.disconnect(), Ht().forEach((e) => K?.observe(e)), Gt());
1039
+ let s = V.value, c = s[0], l = s[s.length - 1], u = Vi.value, d = Hi.value;
1040
+ u && c && o[c] && (o[c] = `calc(${o[c]} - (${u}))`, !A.selectable && Li.value && (o.select = Li.value)), d && l && o[l] && (o[l] = `calc(${o[l]} - (${d}))`, !P.value && Ri.value && (o.actions = Ri.value));
1041
+ let f = [
1042
+ ..."select" in o ? ["select"] : [],
1043
+ ...s,
1044
+ ..."actions" in o ? ["actions"] : []
1045
+ ];
1046
+ Qo(t), ia(t), J.value && (_i.value = r), pa = t, Hn(o, f), (tc.value.length || a) && fa(e, t);
1047
+ }, da = "", fa = (e, t) => {
1048
+ xe(e, tc.value, t) && (da = nc.value);
1049
+ }, pa = null, ma, ha = () => {
1050
+ if (!ma) return;
1051
+ ma.disconnect();
1052
+ let e = sa();
1053
+ e.forEach((e) => ma?.observe(e)), e.length && ua();
430
1054
  };
431
- Se(() => {
432
- K = new ResizeObserver(() => Gt()), nn(), be(Yt), I.value && (Xt = new MutationObserver(en), Xt.observe(I.value, {
433
- childList: !0,
434
- subtree: !0,
435
- characterData: !0
436
- })), L.value && (tn = new ResizeObserver(() => {
437
- Qt || (Zt.value = !0), en();
438
- }), tn.observe(L.value));
439
- }), xe(() => {
440
- K?.disconnect(), tn?.disconnect(), Xt?.disconnect(), G !== null && clearTimeout(G);
441
- }), O(zt, () => be(nn), { flush: "post" });
442
- let rn = (e, t) => N.accessibleLabel ? N.accessibleLabel(e, t) : [F("table.select").value, ...e.map((e) => e.content)].join(" "), an = h(() => N.selectable ? "fieldset" : "div"), on = h(() => N.legend || N.caption || F("table.selectableLegend").value), q = h(() => N.loading || pn.value), sn = h(() => q.value && !N.interactiveWhileLoading), J = h(() => vt.value && !o(B.page) && !o(B.perPage) && !o(B.totalItems) && B.page >= 1 && B.perPage > 0 && B.totalItems >= 0), cn = h(() => ({
1055
+ et(() => {
1056
+ ma = new ResizeObserver(ua), ha();
1057
+ }), Ze(() => {
1058
+ ma?.disconnect();
1059
+ });
1060
+ let ga = h(() => Ji.value.map((e) => e.key).join(" ")), _a = h(() => V.value.join(" "));
1061
+ T([ga, _a], () => {
1062
+ b(ha), requestAnimationFrame(() => {
1063
+ L.value && ua();
1064
+ });
1065
+ }, { flush: "post" });
1066
+ let va = (e, t) => A.accessibleLabel ? A.accessibleLabel(e, t) : [I("table.select").value, ...e.map((e) => e.content)].join(" "), ya = h(() => A.selectable ? "fieldset" : "div"), ba = h(() => A.legend || A.caption || I("table.selectableLegend").value), xa = h(() => A.loading || ja.value), Sa = h(() => xa.value && !A.interactiveWhileLoading), Ca = h(() => pi.value && !t(K.page) && !t(K.perPage) && !t(K.totalItems) && K.page >= 1 && K.perPage > 0 && K.totalItems >= 0), wa = h(() => ({
443
1067
  "bb-table": !0,
444
- [`bb-table--align-${N.align}`]: !0,
445
- "bb-table--compact": N.compact,
446
- "bb-table--fixed": H.value,
447
- "bb-table--inherit-widths": xt.value,
448
- "bb-table--fixed-header": N.fixedHeaders,
449
- "bb-table--loading": q.value,
450
- "bb-table--empty": !Y.value.length,
451
- "bb-table--selectable": !!N.selectable,
452
- "bb-table--measuring": Zt.value,
1068
+ [`bb-table--align-${A.align}`]: !0,
1069
+ "bb-table--compact": A.compact,
1070
+ "bb-table--reorderable": !!A.reorderable,
1071
+ "bb-table--resizable": fr.value,
1072
+ "bb-table--fixed": gi.value,
1073
+ "bb-table--inherit-widths": bi.value,
1074
+ "bb-table--fixed-header": A.fixedHeaders || J.value,
1075
+ "bb-table--virtual": J.value,
1076
+ "bb-table--virtual-flat": vi.value,
1077
+ "bb-table--loading": xa.value,
1078
+ "bb-table--empty": !Z.value.length,
1079
+ "bb-table--selectable": !!A.selectable,
453
1080
  "scrollbar-border": !0
454
- })), ln = h(() => N.columns.length + Number(!!N.selectable) + Number(!!N.actions)), un = h(() => Object.fromEntries(N.columns.map((e) => [e.key, de(e.key)]))), { getter: dn, items: fn, loading: pn } = c({ items: Te(N, "items") }), { hasPrefilled: mn } = ie({
1081
+ })), Ta = h(() => Jn.value.length + Number(!!A.selectable) + Number(P.value)), Ea = h(() => Object.fromEntries(A.columns.map((e) => [e.key, Se(e.key)]))), { getter: Da, clientReproducible: Oa, hydratedFromSsr: ka, items: Aa, loading: ja } = m({ items: ot(A, "items") }), { hasPrefilled: Ma, whenPrefilled: Na } = pe({
1082
+ alreadyLoaded: ka,
1083
+ clientReproducible: Oa,
455
1084
  trigger: !0,
456
1085
  fn: async (e) => {
457
- await dn(e, B.selected), yn();
1086
+ await Da(e, K.selected), Ra();
458
1087
  }
459
- }), { data: hn } = f({ items: h(() => B.selected) }), { options: Y, baseOptions: gn } = re({
460
- disabled: Te(N, "disabled"),
461
- items: fn,
1088
+ }), { data: Pa } = de({ items: h(() => {
1089
+ let e = K.selected;
1090
+ return A.multiple ? e ?? [] : e == null ? [] : [e];
1091
+ }) }), { options: Z, baseOptions: Fa } = fe({
1092
+ disabled: ot(A, "disabled"),
1093
+ items: Aa,
462
1094
  itemText: void 0,
463
- itemValue: N.itemValue,
464
- max: N.max,
1095
+ itemValue: A.itemValue,
1096
+ max: ot(A, "max"),
465
1097
  selectable: !0,
466
- selectedIndexedByHash: hn
467
- }), _n = async (e) => {
468
- N.multiple ? B.selected = (B.selected ?? []).concat(e.value) : B.selected = e.value;
469
- }, vn = async (e) => {
470
- if (N.multiple) {
471
- let t = { ...hn.value };
472
- delete t[e.valueHash], B.selected = Object.values(t);
473
- } else B.selected = null;
1098
+ selectedIndexedByHash: Pa
1099
+ }), Ia = async (e) => {
1100
+ A.multiple ? K.selected = (K.selected ?? []).concat(e.value) : K.selected = e.value;
1101
+ }, La = async (e) => {
1102
+ if (A.multiple) {
1103
+ let t = { ...Pa.value };
1104
+ delete t[e.valueHash], K.selected = Object.values(t);
1105
+ } else K.selected = null;
474
1106
  };
475
- ee(() => [
476
- N.dependencies,
477
- N.items,
478
- typeof N.items == "function" ? [B.page, B.perPage] : void 0
1107
+ te(() => [
1108
+ A.dependencies,
1109
+ A.items,
1110
+ typeof A.items == "function" ? [K.page, K.perPage] : void 0
479
1111
  ], async () => {
480
- mn.value && (await dn(!0, B.selected), yn());
481
- }, { debounce: N.depsDebounceTime });
482
- let yn = () => {
483
- if (!N.enforceCoherence) return;
484
- let e = new Set(Y.value.map((e) => e.valueHash)), t = (t) => e.has(u(t));
485
- if (N.multiple) {
486
- let e = B.selected ?? [];
487
- e.every(t) || (B.selected = e.filter(t));
488
- } else !o(B.selected) && !t(B.selected) && (B.selected = null);
489
- let n = B.unselected ?? [];
490
- n.every(t) || (B.unselected = n.filter(t)), !o(j.value) && !t(j.value) && (j.value = null), M.value.every(t) || (M.value = M.value.filter(t));
491
- }, bn = (e, t) => {
492
- let n = un.value[e.key], r = e.align ?? "left", i = ot(t.item, e.key);
493
- return e.formatter && (!o(i) || e.formatOnNull !== !1) && (i = e.formatter(i, e.key, t.item)), e.placeholder && o(i) && (i = e.placeholder), {
494
- align: r,
495
- classes: fe([`bb-table-data__cell--${r}`], N.tdClass, e.tdClass, i, e.key, t.item),
496
- content: i,
1112
+ Ma.value || await Na(), Ma.value && (await Da(!0, K.selected), Ra());
1113
+ }, { debounce: A.depsDebounceTime });
1114
+ let Ra = () => {
1115
+ if (!A.enforceCoherence) return;
1116
+ let e = new Set(Z.value.map((e) => e.valueHash)), n = (t) => e.has(r(t));
1117
+ if (A.multiple) {
1118
+ let e = K.selected ?? [];
1119
+ e.every(n) || (K.selected = e.filter(n));
1120
+ } else !t(K.selected) && !n(K.selected) && (K.selected = null);
1121
+ let i = K.unselected ?? [];
1122
+ i.every(n) || (K.unselected = i.filter(n)), !t(k.value) && !n(k.value) && (k.value = null), bn.value.every(n) || (bn.value = bn.value.filter(n));
1123
+ }, za = (e, n) => {
1124
+ let r = Ea.value[e.key], i = e.align ?? "left", a = An(n.item, e.key);
1125
+ return e.formatter && (!t(a) || e.formatOnNull !== !1) && (a = e.formatter(a, e.key, n.item)), e.placeholder && t(a) && (a = e.placeholder), {
1126
+ align: i,
1127
+ get classes() {
1128
+ return De(Ha.value.has(String(e.key)) ? [`bb-table__cell--${i}`, "bb-table__cell--fluid"] : [`bb-table__cell--${i}`], A.tdClass, e.tdClass, a, e.key, n.item);
1129
+ },
1130
+ content: a,
497
1131
  key: e.key,
498
1132
  label: e.label,
499
- slotName: n
1133
+ slotName: r
500
1134
  };
501
- }, xn = h(() => N.columns.map((e) => {
502
- let t = e.align ?? "left", n = `header:${un.value[e.key]}`, r = gt(e.key), i = r ?? e.sorted, a = i ? i === "asc" ? "ascending" : "descending" : void 0;
1135
+ }, Ba = h(() => {
1136
+ let e = {};
1137
+ if (A.fixed || q.value || J.value || M.thead) return e;
1138
+ let n = (Aa.value ?? []).slice(0, 200), r = Ua.value?.padEm ?? 1.5;
1139
+ for (let i of B.value) {
1140
+ if (hr(i) != null || M[Ea.value[i.key]]) continue;
1141
+ let a = n.map((e) => {
1142
+ let n = An(e, i.key);
1143
+ return i.formatter && (!t(n) || i.formatOnNull !== !1) && (n = i.formatter(n, i.key, e)), i.placeholder && t(n) && (n = i.placeholder), t(n) ? "" : String(n);
1144
+ });
1145
+ e[String(i.key)] = we(a, i.label ?? "", r, i.sortable ? 1.3 : 0);
1146
+ }
1147
+ return e;
1148
+ }), Va = h(() => Object.keys(Ba.value).join(" ")), Ha = h(() => new Set(Va.value.split(" ").filter(Boolean))), Ua = S(null), Wa = h(() => {
1149
+ let e = Ua.value;
1150
+ if (!e) return 0;
1151
+ let t = B.value.reduce((e, t) => {
1152
+ let n = hr(t), r = n == null ? "" : xi(n);
1153
+ return e + (/^[\d.]+px$/.test(r) ? parseFloat(r) : 0);
1154
+ }, 0);
1155
+ return Math.max(0, (e.width - t) / e.em);
1156
+ }), Ga = h(() => {
1157
+ let e = Te(Ba.value, Wa.value), t = Ua.value, n = t?.padEm ?? 1.5, r = {};
1158
+ for (let i in e) {
1159
+ let a = Math.max(0, e[i] - n);
1160
+ r[i] = { "--floor": t ? `${Math.floor(a * t.em)}px` : `${a.toFixed(2)}rem` };
1161
+ }
1162
+ return r;
1163
+ }), Ka, qa = 0;
1164
+ et(() => {
1165
+ let e = R.value, t = L.value;
1166
+ if (!e || !t || typeof ResizeObserver > "u") return;
1167
+ let n = () => {
1168
+ let n = getComputedStyle(t), r = parseFloat(n.fontSize) || 16, i = 2 * (parseFloat(n.getPropertyValue("--px")) || 12) / r, a = e.clientWidth, o = Ua.value;
1169
+ (o?.width !== a || o.em !== r || o.padEm !== i) && (Ua.value = {
1170
+ width: a,
1171
+ em: r,
1172
+ padEm: i
1173
+ });
1174
+ };
1175
+ Ka = new ResizeObserver(() => {
1176
+ cancelAnimationFrame(qa), qa = requestAnimationFrame(n);
1177
+ }), Ka.observe(e);
1178
+ }), Ze(() => {
1179
+ Ka?.disconnect(), cancelAnimationFrame(qa);
1180
+ });
1181
+ let Ja = h(() => B.value.map((e) => {
1182
+ let t = e.align ?? "left", n = Ea.value[e.key], r = Fn(n) ? `header:${n} (shadowed)` : `header:${n}`, i = di(e.key), a = i ?? e.sorted, o = a ? a === "asc" ? "ascending" : "descending" : void 0;
503
1183
  return {
504
1184
  align: t,
505
1185
  key: e.key,
506
1186
  label: e.label,
507
- slotName: n,
508
- classes: pe([`bb-table-header--${t}`], N.thClass, e.thClass),
1187
+ slotName: r,
1188
+ classes: Oe([`bb-table__cell-column-header--${t}`], A.thClass, e.thClass),
509
1189
  sortable: !!e.sortable,
510
- sortDirection: a,
511
- sortOrder: r
1190
+ sortDirection: o,
1191
+ sortOrder: i
512
1192
  };
513
- })), Sn = (e, t) => {
514
- let n = Y.value[e];
515
- return n && n.valueHash === t ? n : Y.value.find((e) => e.valueHash === t);
516
- }, Cn = h(() => gn.value.map((e, t) => {
517
- let n = N.columns.map((t) => bn(t, e));
1193
+ })), Ya = (e, t) => {
1194
+ let n = Ea.value[e];
1195
+ return (Fn(n) ? void 0 : M[`header:${n}:${t}`]) ?? M[`header:${t}`];
1196
+ }, Xa = (e) => ({
1197
+ classes: e.classes,
1198
+ columnKey: e.key,
1199
+ items: Aa.value,
1200
+ label: e.label,
1201
+ sortable: e.sortable,
1202
+ sortOrder: e.sortOrder,
1203
+ toggleSort: () => fi(e.key),
1204
+ hideColumn: () => Yn(e.key)
1205
+ }), Za = (e, t) => {
1206
+ let n = Z.value[e];
1207
+ return n && n.valueHash === t ? n : Z.value.find((e) => e.valueHash === t);
1208
+ }, Qa = (e) => {
1209
+ let t = Fa.value[e], n = B.value.map((e) => za(e, t));
518
1210
  return {
519
- accessibleLabel: rn(n, e.item),
1211
+ accessibleLabel: va(n, t.item),
520
1212
  cols: n,
521
- rowClasses: me(N.rowClass, N.columns, n, e.item),
1213
+ get rowClasses() {
1214
+ return ke(A.rowClass, B.value, n, t.item);
1215
+ },
522
1216
  onRowClick: (n) => {
523
- let r = Sn(t, e.valueHash);
524
- r && (ht(n, r), P("click:row", n, r, !!r.selected));
1217
+ let r = Za(e, t.valueHash);
1218
+ r && (ui(n, r), j("click:row", n, r.item));
525
1219
  },
526
1220
  onRowContextMenu: (n) => {
527
- let r = Sn(t, e.valueHash);
528
- r && P("contextmenu:row", n, r, !!r.selected);
1221
+ let r = Za(e, t.valueHash);
1222
+ r && j("contextmenu:row", n, r.item);
529
1223
  },
530
1224
  onRowDblClick: (n) => {
531
- let r = Sn(t, e.valueHash);
532
- r && P("dblclick:row", n, r, !!r.selected);
1225
+ let r = Za(e, t.valueHash);
1226
+ r && j("dblclick:row", n, r.item);
1227
+ },
1228
+ item: t.item,
1229
+ get text() {
1230
+ return t.text;
533
1231
  },
534
- item: e.item,
535
- text: e.text,
536
- valueHash: e.valueHash,
537
- value: e.value
1232
+ valueHash: t.valueHash,
1233
+ value: t.value
538
1234
  };
539
- })), wn = h(() => {
540
- let e = 0, t = ((B.page ?? 0) - 1) * (B.perPage ?? 0);
541
- return Cn.value.map((n, r) => {
542
- let i = Y.value[r], a = !N.selectable || typeof N.selectable == "function" && !N.selectable(n.item) || !!i.disabled, o = r + 1, s = t + 1 + o + e, c = kn.value[n.valueHash] ?? !1;
543
- return c && e++, {
544
- ...n,
545
- expanded: c,
546
- highlighted: n.valueHash in mt.value,
547
- rowIndex: s,
548
- selected: i.selected,
549
- disabled: a
1235
+ }, $a = h(() => {
1236
+ Fa.value, Ea.value, A.tdClass, A.rowClass, A.accessibleLabel;
1237
+ for (let e of B.value) e.align, e.formatOnNull, e.formatter, e.key, e.label, e.placeholder, e.tdClass;
1238
+ return /* @__PURE__ */ new Map();
1239
+ }), eo = (e) => {
1240
+ if (!(!J.value || e.size <= mn)) {
1241
+ for (let t of e.keys()) if (e.delete(t), e.size <= mn) break;
1242
+ }
1243
+ }, to = (e) => {
1244
+ let t = $a.value, n = t.get(e);
1245
+ if (n) return n;
1246
+ let r = Qa(e);
1247
+ return t.set(e, r), eo(t), r;
1248
+ }, no = h(() => ($a.value, Q.value, Z.value, ni.value, A.selectable, /* @__PURE__ */ new Map())), ro = /* @__PURE__ */ new Map(), io = /* @__PURE__ */ new WeakMap(), ao = (e) => {
1249
+ let t = no.value, n = t.get(e.index);
1250
+ if (n) return n;
1251
+ let r = to(e.index), i = Z.value[e.index], a = !!i.disabled, o = () => !A.selectable || typeof A.selectable == "function" && !A.selectable(r.item) || a, s = r.valueHash in ni.value, c = ro.get(r.valueHash);
1252
+ if (c && c.item === r.item && c.cols === r.cols && c.onRowClick === r.onRowClick && c.expanded === e.expanded && c.rowIndex === e.rowIndex && c.selected === i.selected && io.get(c) === a && c.highlighted === s) return t.set(e.index, c), eo(t), c;
1253
+ let l = {
1254
+ accessibleLabel: r.accessibleLabel,
1255
+ cols: r.cols,
1256
+ item: r.item,
1257
+ onRowClick: r.onRowClick,
1258
+ onRowContextMenu: r.onRowContextMenu,
1259
+ onRowDblClick: r.onRowDblClick,
1260
+ get rowClasses() {
1261
+ return r.rowClasses;
1262
+ },
1263
+ get text() {
1264
+ return r.text;
1265
+ },
1266
+ value: r.value,
1267
+ valueHash: r.valueHash,
1268
+ expanded: e.expanded,
1269
+ highlighted: s,
1270
+ rowIndex: e.rowIndex,
1271
+ selected: i.selected,
1272
+ get disabled() {
1273
+ return o();
1274
+ },
1275
+ expandProps: {},
1276
+ toggleExpanded: () => Ms(r.valueHash),
1277
+ toggleHighlighted: () => li(r, { viaSlot: !0 }),
1278
+ toggleSelected: () => Ws(l)
1279
+ };
1280
+ return l.expandProps = js(l), io.set(l, a), t.set(e.index, l), eo(t), ro.delete(r.valueHash), ro.set(r.valueHash, l), ro.size > mn && ro.delete(ro.keys().next().value), l;
1281
+ }, oo = at({
1282
+ key: null,
1283
+ row: 0,
1284
+ col: null
1285
+ }), so = h(() => {
1286
+ if (!F.value) return null;
1287
+ let e = /* @__PURE__ */ new Map();
1288
+ for (let t of Q.value) e.set(t.key, t.virtualIndex);
1289
+ return e;
1290
+ }), co = h(() => {
1291
+ if (!F.value) return null;
1292
+ let e = Q.value.length, t = oo.value, n;
1293
+ if (n = !e || t.row < 0 ? kn.value ? -1 : e ? 0 : null : (t.key === null ? void 0 : so.value?.get(t.key)) ?? ne(t.row, 0, e - 1), n === null) return null;
1294
+ let r = t.col === null && (!Tn.value || n < 0) ? 0 : t.col;
1295
+ return {
1296
+ row: n,
1297
+ col: r
1298
+ };
1299
+ }), lo = (e) => {
1300
+ let t = co.value;
1301
+ return !t || t.row !== e ? -2 : t.col ?? -1;
1302
+ }, uo = (e) => {
1303
+ if (!kn.value) return;
1304
+ let t = co.value;
1305
+ return !t || t.row !== -1 ? -1 : Math.min(t.col ?? 0, Ta.value - 1) === e ? 0 : -1;
1306
+ }, Q = h(() => {
1307
+ let e = [], t = 0, n = ((K.page ?? 0) - 1) * (K.perPage ?? 0);
1308
+ return Fa.value.forEach((r, i) => {
1309
+ let a = r.valueHash in ri.value, o = n + 1 + i + 1 + t;
1310
+ e.push({
1311
+ kind: "row",
1312
+ index: i,
1313
+ key: `r:${r.valueHash}`,
1314
+ virtualIndex: e.length,
1315
+ expanded: a,
1316
+ rowIndex: o
1317
+ }), a && (t++, e.push({
1318
+ kind: "expand",
1319
+ index: i,
1320
+ key: `x:${r.valueHash}`,
1321
+ virtualIndex: e.length,
1322
+ expanded: a,
1323
+ rowIndex: o
1324
+ }));
1325
+ }), e;
1326
+ }), fo = (e, t, n, r) => {
1327
+ let i;
1328
+ return {
1329
+ kind: t,
1330
+ index: e.index,
1331
+ key: n,
1332
+ virtualIndex: e.virtualIndex,
1333
+ height: r,
1334
+ get item() {
1335
+ return i ??= ao(e);
1336
+ }
1337
+ };
1338
+ }, po = at(null), mo = S(0), ho = S(null), go = (e) => /^(auto|scroll)$/.test(getComputedStyle(e).overflowY), _o = () => {
1339
+ let e = R.value, t = ho.value, n = L.value;
1340
+ if (!J.value || !e || !t || !n) {
1341
+ po.value = null;
1342
+ return;
1343
+ }
1344
+ let r = e.getBoundingClientRect(), i = n.getBoundingClientRect().bottom - r.top, a = getComputedStyle(e).maxHeight !== "none" || e.scrollHeight > e.clientHeight + 1 || e.clientHeight > i + 1, o = window;
1345
+ if (a) o = e;
1346
+ else {
1347
+ let t = e.parentElement;
1348
+ for (; t && t !== document.body && t !== document.documentElement;) {
1349
+ if (go(t)) {
1350
+ o = t;
1351
+ break;
1352
+ }
1353
+ t = t.parentElement;
1354
+ }
1355
+ }
1356
+ let s = t.getBoundingClientRect().top, c = o === window ? s + window.scrollY : s - o.getBoundingClientRect().top + o.scrollTop;
1357
+ mo.value !== c && (mo.value = c), po.value !== o && (po.value = o);
1358
+ }, vo = S(37), yo = () => {
1359
+ let e = R.value;
1360
+ if (!e) return;
1361
+ let t = parseFloat(getComputedStyle(e).getPropertyValue("--cell-h"));
1362
+ t > 0 && (vo.value = t + 1);
1363
+ }, bo = S(null), xo = (e) => {
1364
+ if (!J.value || !ho.value) return;
1365
+ let t = e.target;
1366
+ for (; t && t.parentElement !== ho.value;) t = t.parentElement;
1367
+ let n = Number(t?.dataset.index);
1368
+ bo.value = Number.isInteger(n) ? n : null;
1369
+ }, So = (e) => {
1370
+ if (!J.value) return;
1371
+ let t = e.relatedTarget;
1372
+ (!t || !ho.value?.contains(t)) && (bo.value = null);
1373
+ }, Co = S(0), wo = 0, To = S(!1), Eo, Do = {
1374
+ offset: 0,
1375
+ time: 0
1376
+ }, Oo = 0, ko = /* @__PURE__ */ new Set(), Ao = null, jo = 0, Mo = (e) => {
1377
+ jo = jo ? jo * .7 + e * .3 : e;
1378
+ }, No = () => {
1379
+ clearTimeout(Eo), Eo = void 0, To.value && (To.value = !1, Ho());
1380
+ }, Po = (e) => {
1381
+ let t = performance.now(), n = t - Do.time, r = e - Do.offset;
1382
+ if (Do = {
1383
+ offset: e,
1384
+ time: t
1385
+ }, Oo > 0) return;
1386
+ let i = Ao;
1387
+ if (n > 0 && n < 250 && i && jo) {
1388
+ let e = zo?.scrollRect?.height ?? 0, t = (i.end - i.start + e) / 2;
1389
+ Math.abs(r) / n * jo > t && (To.value = !0);
1390
+ }
1391
+ clearTimeout(Eo), Eo = setTimeout(No, vn);
1392
+ }, Fo = S(0), Io = -1, Lo = !1, Ro = () => {
1393
+ let e = zo?.itemSizeCache;
1394
+ if (!e?.size || e.size === Io) return;
1395
+ if (Io = e.size, Lo) {
1396
+ aa();
1397
+ return;
1398
+ }
1399
+ let t = /* @__PURE__ */ new Map(), n = 0;
1400
+ for (let [r, i] of e) {
1401
+ if (typeof r != "string" || !r.startsWith("r:")) continue;
1402
+ let e = Math.round(i);
1403
+ t.set(e, (t.get(e) ?? 0) + 1), n++;
1404
+ }
1405
+ if (n >= 5) {
1406
+ let e = 0, r = -1;
1407
+ for (let [n, i] of t) (i > r || i === r && n < e) && (r = i, e = n);
1408
+ e > 0 && !Lo && (Fo.value = e, n >= 20 && (Lo = !0));
1409
+ }
1410
+ aa();
1411
+ }, zo = null, Bo = !1;
1412
+ T(J, (e) => {
1413
+ Bo = e;
1414
+ }, { immediate: !0 });
1415
+ let Vo = at([]), Ho = (e = !1) => {
1416
+ if (wo &&= (cancelAnimationFrame(wo), 0), !zo) return;
1417
+ let t = J.value ? zo.getVirtualItems() : [];
1418
+ Co.value = zo.getTotalSize();
1419
+ let n = [], r = null;
1420
+ if (t.length) {
1421
+ let e = zo.measurementsCache, i = Q.value.length, a = zo.range, o = a ? a.startIndex : t[0].index, s = a ? a.endIndex : t[t.length - 1].index;
1422
+ for (let e of t) n.push({
1423
+ index: e.index,
1424
+ start: e.start,
1425
+ end: e.end,
1426
+ size: e.size
1427
+ });
1428
+ let c = e?.[Math.max(0, o - gn)], l = e?.[Math.min(i - 1, s + gn)] ?? c;
1429
+ c && l && (r = {
1430
+ start: c.start,
1431
+ end: l.end
1432
+ });
1433
+ }
1434
+ let i = !Uo || !r || Uo.start !== r.start || Uo.end !== r.end;
1435
+ if (Uo = r, Vo.value = n, !r) return;
1436
+ if (!e || !i) {
1437
+ Ao = r;
1438
+ return;
1439
+ }
1440
+ let a = performance.now(), o = r;
1441
+ b(() => {
1442
+ Mo(performance.now() - a), Ao = o;
1443
+ });
1444
+ }, Uo = null, Wo = () => {
1445
+ wo ||= requestAnimationFrame(() => {
1446
+ wo = 0, Ro(), Ho();
1447
+ });
1448
+ }, Go = (e, t) => {
1449
+ t ? (Po(e.getScrollOffset()), Ho(!0)) : Wo();
1450
+ }, Ko = (e) => Q.value[e]?.key ?? e, qo = (e) => (Q.value[e]?.kind === "expand" ? 3 : 1) * (Fo.value || vo.value), Jo = yt(h(() => {
1451
+ let e = po.value, t = typeof window < "u" && e === window, n = bo.value, r = co.value?.row, i = r != null && r >= 0 ? r : null;
1452
+ return {
1453
+ onChange: Go,
1454
+ count: J.value ? Q.value.length : 0,
1455
+ enabled: J.value,
1456
+ getScrollElement: () => e,
1457
+ estimateSize: qo,
1458
+ getItemKey: Ko,
1459
+ overscan: gn,
1460
+ scrollMargin: mo.value,
1461
+ initialRect: {
1462
+ width: 0,
1463
+ height: _n
1464
+ },
1465
+ rangeExtractor: (e) => {
1466
+ let t = pt(e.endIndex - e.startIndex > hn ? {
1467
+ ...e,
1468
+ endIndex: e.startIndex + hn
1469
+ } : e), r = [n, i].filter((n) => n != null && n < e.count && !t.includes(n));
1470
+ return r.length ? [.../* @__PURE__ */ new Set([...t, ...r])].sort((e, t) => e - t) : t;
1471
+ },
1472
+ observeElementRect: t ? vt : gt,
1473
+ observeElementOffset: t ? _t : ht,
1474
+ scrollToFn: t ? bt : mt
1475
+ };
1476
+ }));
1477
+ zo = Jo.value, Ho();
1478
+ let Yo = (e) => {
1479
+ Bo && zo?.measureElement(e);
1480
+ }, Xo = (e) => {
1481
+ let t = [], n = 0, r = gn;
1482
+ for (let i = 0; i < e.length && t.length < hn && !(n >= _n && r-- <= 0); i++) {
1483
+ let e = qo(i);
1484
+ t.push({
1485
+ index: i,
1486
+ start: n,
1487
+ end: n + e,
1488
+ size: e
1489
+ }), n += e;
1490
+ }
1491
+ return t;
1492
+ }, Zo = h(() => {
1493
+ let e = Q.value;
1494
+ if (no.value, !J.value) return e.map((e) => fo(e, e.kind, e.key, 0));
1495
+ let t = Vo.value.length ? Vo.value : Xo(e);
1496
+ if (!t.length) return [];
1497
+ let n = [], r = mo.value, i = To.value, a = r, o;
1498
+ for (let r of t) {
1499
+ let t = e[r.index];
1500
+ if (!t) continue;
1501
+ let s = r.start - a;
1502
+ s > .5 && n.push(fo(t, "spacer", `s:${t.key}`, s)), i && t.kind === "row" && !ko.has(t.key) ? n.push(fo(t, "placeholder", `p:${t.key}`, r.size)) : n.push(fo(t, t.kind, t.key, 0)), a = r.end, o = t;
1503
+ }
1504
+ let s = Co.value - (a - r);
1505
+ return s > .5 && o && n.push(fo(o, "spacer", "s:end", s)), n;
1506
+ });
1507
+ T(Zo, (e) => {
1508
+ if (J.value) for (let t of e) (t.kind === "row" || t.kind === "expand") && ko.add(t.key);
1509
+ }, { flush: "post" });
1510
+ let Qo = (e) => {
1511
+ let t = L.value;
1512
+ if (!J.value || !t || !t.querySelector(":scope > .bb-table__body > .bb-table__row")) return;
1513
+ let n = B.value, r = null, i = null;
1514
+ if (Ji.value.forEach((t, a) => {
1515
+ if (t.key === "select" || t.key === "actions") {
1516
+ if (t.key in X.value) return;
1517
+ let n = parseFloat(e[a]);
1518
+ if (!(n > 0)) return;
1519
+ (i ??= { ...X.value })[t.key] = n;
1520
+ return;
1521
+ }
1522
+ let o = n.find((e) => String(e.key) === t.key);
1523
+ if (!o || o.width != null) return;
1524
+ let s = String(o.key);
1525
+ if (s in Y.value || s in (r ?? {})) return;
1526
+ let c = parseFloat(e[a]);
1527
+ c > 0 && ((r ??= { ...Y.value })[s] = c);
1528
+ }), !r && !i || $o) return;
1529
+ let a = r, o = i;
1530
+ $o = requestAnimationFrame(() => {
1531
+ $o = 0, a && (Y.value = {
1532
+ ...Y.value,
1533
+ ...a
1534
+ }), o && (X.value = {
1535
+ ...X.value,
1536
+ ...o
1537
+ });
1538
+ });
1539
+ }, $o = 0;
1540
+ T([() => J.value, () => Z.value.length === 0], ([e, t]) => {
1541
+ (!e || t) && (Object.keys(Y.value).length && (Y.value = {}), Object.keys(X.value).length && (X.value = {}), _i.value = "");
1542
+ }), T(vo, () => {
1543
+ J.value && Jo.value.measure();
1544
+ });
1545
+ let es, ts, ns = () => {
1546
+ es?.disconnect(), es = void 0, ts?.(), ts = void 0;
1547
+ let e = R.value;
1548
+ if (!J.value || !e) return;
1549
+ let t = 0, n = () => {
1550
+ t ||= requestAnimationFrame(() => {
1551
+ t = 0, _o();
1552
+ });
1553
+ };
1554
+ if (po.value === e) es = new ResizeObserver(() => _o()), es.observe(e);
1555
+ else {
1556
+ window.addEventListener("resize", n);
1557
+ let e = new ResizeObserver(n);
1558
+ e.observe(document.documentElement), ts = () => {
1559
+ window.removeEventListener("resize", n), e.disconnect(), t && cancelAnimationFrame(t);
550
1560
  };
1561
+ }
1562
+ };
1563
+ T(po, ns), T(() => [J.value, Q.value.length], () => {
1564
+ b(() => {
1565
+ yo(), _o(), ns(), ko = /* @__PURE__ */ new Set(), Io = -1, Lo = !1, Ho();
551
1566
  });
552
- }), X = C(0);
553
- O(() => wn.value.length, (e) => {
554
- X.value = ne(X.value, 0, Math.max(0, e - 1));
1567
+ }, { flush: "post" });
1568
+ let rs = () => {
1569
+ !J.value || !Object.keys(Y.value).length || (Y.value = {}, b(() => requestAnimationFrame(() => {
1570
+ let e = L.value, t = e ? Me(e) : null;
1571
+ t && Qo(t);
1572
+ })));
1573
+ }, is, as = () => {
1574
+ let e = typeof document < "u" ? document.fonts : void 0;
1575
+ !e || is || (e.status !== "loaded" && e.ready.then(rs), e.addEventListener("loadingdone", rs), is = () => e.removeEventListener("loadingdone", rs));
1576
+ };
1577
+ et(() => {
1578
+ yo(), aa(), _o(), ns(), Ho(), J.value && as();
1579
+ }), T(J, (e) => {
1580
+ e && as(), pa && ia(pa), aa();
1581
+ }), Ze(() => {
1582
+ es?.disconnect(), ts?.(), is?.(), wo && cancelAnimationFrame(wo);
555
1583
  });
556
- let Tn = () => I.value?.querySelectorAll(":scope > tbody > tr.bb-table-data__row"), En = (e) => {
557
- X.value = e;
558
- let t = Tn()?.[e];
559
- t?.focus(), t?.scrollIntoView({ block: "nearest" });
560
- }, Dn = (e) => {
561
- N.keyboardNavigation && (X.value = e);
562
- }, On = (e, t) => {
563
- if (!N.keyboardNavigation || e.target !== e.currentTarget) return;
564
- let n = wn.value.length - 1;
565
- if (n < 0) return;
566
- let r = (t) => {
567
- e.preventDefault(), En(ne(t, 0, n));
1584
+ let os = () => new Promise((e) => requestAnimationFrame(() => e())), ss = () => L.value?.querySelector(":scope > .bb-table__head > .bb-table__header-row") ?? null, cs = (e) => ho.value?.querySelector(`:scope > [role="row"][data-index="${e}"]`) ?? null, ls = (e, t) => {
1585
+ let n = e < 0 ? ss() : cs(e);
1586
+ if (!n || t === null) return n;
1587
+ let r = n.children;
1588
+ return r[Math.min(t, r.length - 1)] ?? null;
1589
+ }, us = (e) => e >= 0 && Q.value[e]?.kind === "expand" ? 1 : Ta.value, ds = (e) => {
1590
+ let t = L.value;
1591
+ if (!t || !(e instanceof Element) || !t.contains(e)) return null;
1592
+ let n = null;
1593
+ for (let r = e; r && r !== t;) {
1594
+ let i = r.parentElement;
1595
+ if (i && i.parentElement === t && r.getAttribute("role") === "row") {
1596
+ let t = r, a = i.classList.contains("bb-table__head");
1597
+ if ((a ? !kn.value : i !== ho.value) || a && !t.classList.contains("bb-table__header-row")) return null;
1598
+ let o = a ? -1 : Number(t.dataset.index);
1599
+ if (!Number.isInteger(o)) return null;
1600
+ if (!n) return {
1601
+ row: o,
1602
+ rowEl: t,
1603
+ cell: null,
1604
+ col: -1,
1605
+ inside: !1
1606
+ };
1607
+ let s = n;
1608
+ return {
1609
+ row: o,
1610
+ rowEl: t,
1611
+ cell: s,
1612
+ col: Array.prototype.indexOf.call(t.children, s),
1613
+ inside: s !== e
1614
+ };
1615
+ }
1616
+ n = r, r = i;
1617
+ }
1618
+ return null;
1619
+ }, fs = async (e, t) => {
1620
+ oo.value = {
1621
+ key: e < 0 ? null : Q.value[e]?.key ?? null,
1622
+ row: e,
1623
+ col: t
568
1624
  };
569
- switch (e.key) {
570
- case "ArrowDown":
571
- r(t + 1);
572
- break;
573
- case "ArrowUp":
574
- r(t - 1);
575
- break;
576
- case "PageDown":
577
- r(t + at);
578
- break;
579
- case "PageUp":
580
- r(t - at);
581
- break;
582
- case "Home":
583
- r(0);
584
- break;
585
- case "End":
586
- r(n);
587
- break;
1625
+ let n = ls(e, t);
1626
+ if (!n && e >= 0 && J.value) {
1627
+ Oo++, No();
1628
+ try {
1629
+ for (let r = 0; r < 8 && !n; r++) Jo.value.scrollToIndex(e, { align: "auto" }), await os(), await b(), n = ls(e, t);
1630
+ } finally {
1631
+ Oo--;
1632
+ }
1633
+ }
1634
+ if (n && (n.focus(), n.scrollIntoView({
1635
+ block: "nearest",
1636
+ inline: "nearest"
1637
+ }), J.value && e >= 0)) for (let e = 0; e < 4; e++) {
1638
+ let e = n.getBoundingClientRect().top;
1639
+ if (await os(), n.scrollIntoView({
1640
+ block: "nearest",
1641
+ inline: "nearest"
1642
+ }), Math.abs(n.getBoundingClientRect().top - e) < .5) break;
1643
+ }
1644
+ }, ps = null, ms = 0, hs = (e) => {
1645
+ if (e.closest("[data-bb-table-id]") !== R.value) return !1;
1646
+ let t = ds(e);
1647
+ return !!t?.inside && t.cell !== ps;
1648
+ }, gs = (e) => {
1649
+ let t = e.querySelectorAll(Fe);
1650
+ e.matches("a[href], area[href], button, input:not([type=\"hidden\"]), select, textarea, iframe, summary, audio[controls], video[controls], [contenteditable]:not([contenteditable=\"false\"]), [tabindex]") && hs(e) && ze(e);
1651
+ for (let e of t) hs(e) && ze(e);
1652
+ }, _s = (e) => {
1653
+ for (let t of e.querySelectorAll(`[${Ie}]`)) t.closest("[data-bb-table-id]") === R.value && Re(t);
1654
+ }, vs = (e) => {
1655
+ ps !== e && (ys(), ps = e, ms = o(), _s(e));
1656
+ }, ys = () => {
1657
+ let e = ps;
1658
+ ps = null, e?.isConnected && F.value && gs(e);
1659
+ }, bs = (e) => {
1660
+ let t = Le(e)[0];
1661
+ return t ? (vs(e), t.focus(), !0) : !1;
1662
+ }, xs = null, Ss = () => {
1663
+ xs?.disconnect(), xs = null;
1664
+ let e = L.value;
1665
+ if (e) {
1666
+ if (!F.value) {
1667
+ ps = null, _s(e);
1668
+ return;
1669
+ }
1670
+ gs(e), xs = new MutationObserver((e) => {
1671
+ for (let t of e) {
1672
+ if (t.type === "childList") {
1673
+ for (let e of t.addedNodes) e instanceof Element && gs(e);
1674
+ continue;
1675
+ }
1676
+ let e = t.target;
1677
+ e.getAttribute("tabindex") !== "-1" && (e.removeAttribute(Ie), gs(e));
1678
+ }
1679
+ }), xs.observe(e, {
1680
+ childList: !0,
1681
+ subtree: !0,
1682
+ attributes: !0,
1683
+ attributeFilter: ["tabindex"]
1684
+ });
1685
+ }
1686
+ };
1687
+ et(Ss), T(F, () => b(Ss)), Ze(() => xs?.disconnect());
1688
+ let Cs = (e) => {
1689
+ let t = ds(e.target);
1690
+ if (!t) return;
1691
+ t.inside && t.cell ? vs(t.cell) : ys();
1692
+ let n = co.value, r = t.cell ?? t.rowEl;
1693
+ n && n.row === t.row && ls(n.row, n.col) === r || (oo.value = {
1694
+ key: t.row < 0 ? null : Q.value[t.row]?.key ?? null,
1695
+ row: t.row,
1696
+ col: t.cell ? t.col : null
1697
+ });
1698
+ }, ws = (e) => {
1699
+ F.value && Cs(e);
1700
+ };
1701
+ T(L, (e, t) => {
1702
+ t?.removeEventListener("focusin", ws), e?.addEventListener("focusin", ws);
1703
+ }, { flush: "sync" }), Ze(() => L.value?.removeEventListener("focusin", ws));
1704
+ let Ts = (e) => {
1705
+ let t = e.relatedTarget;
1706
+ ps && !(t instanceof Node && ps.contains(t)) && ys();
1707
+ }, Es = (e) => {
1708
+ let t = Q.value[e];
1709
+ !A.selectable || !t || t.kind !== "row" || ao(t).toggleSelected();
1710
+ }, Ds = () => !A.selectable || !Ls() ? !1 : (Fs.value?.click(), !0), Os = (e) => {
1711
+ e.row >= 0 && Q.value[e.row]?.kind === "row" && e.rowEl.click();
1712
+ }, ks = (e) => {
1713
+ if (e.defaultPrevented) return;
1714
+ let t = ds(e.target);
1715
+ if (!t) return;
1716
+ let n = e.key;
1717
+ if (t.inside) {
1718
+ if (!t.cell || !(n === "F2" || n === "Escape" && o() <= ms) || e.altKey || e.ctrlKey || e.metaKey) return;
1719
+ e.preventDefault(), e.stopPropagation(), t.cell.focus();
1720
+ return;
1721
+ }
1722
+ if ((e.ctrlKey || e.metaKey) && !e.altKey && n.toLowerCase() === "a") {
1723
+ Ds() && e.preventDefault();
1724
+ return;
1725
+ }
1726
+ if (e.altKey || e.metaKey || e.shiftKey && n !== " ") return;
1727
+ let r = e.ctrlKey, i = getComputedStyle(t.rowEl).direction === "rtl", a = i ? "ArrowLeft" : "ArrowRight", s = i ? "ArrowRight" : "ArrowLeft", c = Q.value.length - 1, l = kn.value ? -1 : 0, u = Tn.value, d = (n, r) => {
1728
+ e.preventDefault(), !(n === t.row && r === (t.cell ? t.col : null)) && fs(n, r);
1729
+ }, f = () => e.preventDefault();
1730
+ if (!t.cell) {
1731
+ if (!u) return;
1732
+ let r = Q.value[t.row], i = r?.kind === "row";
1733
+ switch (n) {
1734
+ case "ArrowDown": return d(Math.min(t.row + 1, c), null);
1735
+ case "ArrowUp": return d(Math.max(t.row - 1, 0), null);
1736
+ case "PageDown": return d(Math.min(t.row + yn, c), null);
1737
+ case "PageUp": return d(Math.max(t.row - yn, 0), null);
1738
+ case "Home": return d(0, null);
1739
+ case "End": return d(c, null);
1740
+ case a:
1741
+ if (i && !r.expanded) {
1742
+ f(), Ms(Fa.value[r.index].valueHash);
1743
+ return;
1744
+ }
1745
+ return d(t.row, 0);
1746
+ case s:
1747
+ f(), i && r.expanded && Ms(Fa.value[r.index].valueHash);
1748
+ return;
1749
+ case "Enter":
1750
+ case " ":
1751
+ f(), e.shiftKey && n === " " ? Es(t.row) : Os(t);
1752
+ return;
1753
+ }
1754
+ return;
1755
+ }
1756
+ let p = co.value, m = p && p.row === t.row && p.col !== null ? p.col : t.col, ee = (e) => us(e) - 1, te = !!A.selectable && t.col === 0;
1757
+ switch (n) {
1758
+ case a: return d(t.row, Math.min(t.col + 1, ee(t.row)));
1759
+ case s: return t.col > 0 ? d(t.row, t.col - 1) : u && t.row >= 0 ? d(t.row, null) : f();
1760
+ case "ArrowDown": return d(Math.max(Math.min(t.row + 1, c), t.row), m);
1761
+ case "ArrowUp": return d(Math.max(t.row - 1, l), m);
1762
+ case "PageDown": return d(c < 0 ? t.row : ne(t.row + yn, 0, c), m);
1763
+ case "PageUp": return d(t.row < 0 ? t.row : Math.max(t.row - yn, 0), m);
1764
+ case "Home": return r ? d(l, u ? m : 0) : d(t.row, 0);
1765
+ case "End": {
1766
+ if (!r) return d(t.row, ee(t.row));
1767
+ let e = c < 0 ? t.row : c;
1768
+ return d(e, u ? m : ee(e));
1769
+ }
1770
+ case "F2":
1771
+ f(), bs(t.cell);
1772
+ return;
588
1773
  case "Enter":
589
- case " ":
590
- e.preventDefault(), e.currentTarget.click();
591
- break;
1774
+ case " ": {
1775
+ if (f(), t.row < 0) {
1776
+ te && !e.shiftKey ? Ds() : n === "Enter" && bs(t.cell);
1777
+ return;
1778
+ }
1779
+ if (n === " " && e.shiftKey) {
1780
+ Es(t.row);
1781
+ return;
1782
+ }
1783
+ let r = Q.value[t.row]?.kind === "row";
1784
+ if (te && r) {
1785
+ Es(t.row);
1786
+ return;
1787
+ }
1788
+ if (n === "Enter" && bs(t.cell)) return;
1789
+ Os(t);
1790
+ return;
1791
+ }
592
1792
  }
593
- }, { data: kn } = f({ items: M }), An = (e, t) => {
594
- e.target instanceof HTMLElement && (e.target instanceof HTMLButtonElement || e.key !== "Enter" && e.key !== " " || (e.preventDefault(), Z(t)));
595
- }, jn = (e) => ({
596
- "aria-controls": o(kn.value[e.valueHash]) ? void 0 : `expanded_${e.valueHash}`,
1793
+ }, As = (e, t) => {
1794
+ e.target instanceof HTMLElement && (e.target instanceof HTMLButtonElement || e.key !== "Enter" && e.key !== " " || (e.preventDefault(), Ms(t)));
1795
+ }, js = (e) => ({
1796
+ "aria-controls": t(ri.value[e.valueHash]) ? void 0 : Mn(e.valueHash),
597
1797
  "aria-expanded": e.expanded ? "true" : "false",
598
1798
  onClick: (t) => {
599
- t.stopPropagation(), Z(e.valueHash);
1799
+ t.stopPropagation(), Ms(e.valueHash);
600
1800
  },
601
- onKeydown: (t) => An(t, e.valueHash)
602
- }), Z = (e) => {
603
- let t = Y.value.find((t) => t.valueHash === e);
604
- t && (e in kn.value ? M.value = M.value.filter((t) => u(t) !== e) : M.value = [...M.value, t.value]);
1801
+ onKeydown: (t) => As(t, e.valueHash)
1802
+ }), Ms = (e) => {
1803
+ let t = Z.value.find((t) => t.valueHash === e);
1804
+ t && (e in ri.value ? bn.value = bn.value.filter((t) => r(t) !== e) : bn.value = [...bn.value, t.value]);
605
1805
  };
606
- O(k, () => {
607
- Q.clear(), B.unselected = [], B.selected = [];
1806
+ T(E, () => {
1807
+ Ps.clear(), K.unselected = [], K.selected = [];
608
1808
  });
609
- let Mn = h(() => {
610
- let e = Array.isArray(B.selected) ? B.selected.length : 0;
611
- return !!(N.multiple && e > 0 && !k.value || k.value && Q.size > 0);
612
- }), Q = Ce(/* @__PURE__ */ new Set());
613
- O(() => B.unselected, (e) => {
614
- Q.clear(), (e ?? []).forEach((e) => {
615
- Q.add(u(e));
1809
+ let $ = h(() => {
1810
+ let e = Array.isArray(K.selected) ? K.selected.length : 0;
1811
+ return !!(A.multiple && e > 0 && !E.value || E.value && Ps.size > 0);
1812
+ }), Ns = h(() => N.part("selectIcon", {
1813
+ selected: !!E.value && !$.value,
1814
+ indeterminate: $.value,
1815
+ disabled: !!A.disabled
1816
+ })), Ps = tt(/* @__PURE__ */ new Set());
1817
+ T(() => K.unselected, (e) => {
1818
+ Ps.clear(), (e ?? []).forEach((e) => {
1819
+ Ps.add(r(e));
616
1820
  });
617
1821
  }, { immediate: !0 });
618
- let Nn = (e) => {
619
- let t = B.unselected ?? [];
620
- if ($(e)) {
621
- vn(e), P("item:unselected", e.value), Q.add(e.valueHash), B.unselected = [...t, e.value];
1822
+ let Fs = S(null), Is = ue(), Ls = () => !A.disableSelectAll && A.multiple;
1823
+ T([() => $.value, Ls], () => Is.onBlur());
1824
+ let Rs = {
1825
+ onBlur: () => Is.onBlur(),
1826
+ onChange: (e) => {
1827
+ if (e.target instanceof HTMLInputElement) {
1828
+ if (oe(e.target, A.readonly, !!E.value)) {
1829
+ ce(Fs.value, $.value);
1830
+ return;
1831
+ }
1832
+ ce(Fs.value, $.value), E.value = e.target.checked, se(() => Fs.value, () => !!E.value, () => $.value);
1833
+ }
1834
+ },
1835
+ onFocus: Is.onFocus,
1836
+ onClick: (e) => ie(e, A.readonly),
1837
+ onKeydown: (e) => ae(e, A.readonly)
1838
+ }, zs = h(() => ({
1839
+ ...le("checkbox", {
1840
+ checked: !!E.value,
1841
+ disabled: A.disabled,
1842
+ indeterminate: $.value,
1843
+ name: `select_all_${A.name || ""}`,
1844
+ readonly: A.readonly,
1845
+ required: !1,
1846
+ value: !0
1847
+ }),
1848
+ ...Rs
1849
+ })), Bs = (e) => {
1850
+ let t = K.unselected ?? [];
1851
+ if (Vs(e)) {
1852
+ La(e), j("item:unselected", e.value), Ps.add(e.valueHash), K.unselected = [...t, e.value];
622
1853
  return;
623
1854
  }
624
- k.value || _n(e), P("item:selected", e.value), Q.delete(e.valueHash), B.unselected = t.filter((t) => u(t) !== u(e.value));
625
- }, $ = (e) => Q.has(e.valueHash) ? !1 : e.selected || k.value, Pn = (e) => {
626
- if (N.disabled || N.readonly || typeof N.selectable == "function" && !N.selectable(e.item)) return !0;
627
- let t = Y.value.find((t) => t.valueHash === e.valueHash);
1855
+ E.value || Ia(e), j("item:selected", e.value), Ps.delete(e.valueHash), K.unselected = t.filter((t) => r(t) !== r(e.value));
1856
+ }, Vs = (e) => E.value && Ps.has(e.valueHash) ? !1 : e.selected || E.value, Hs = h(() => {
1857
+ let e = /* @__PURE__ */ new Map();
1858
+ for (let t of Z.value) e.set(t.valueHash, t);
1859
+ return e;
1860
+ }), Us = (e) => {
1861
+ if (A.disabled || A.readonly || typeof A.selectable == "function" && !A.selectable(e.item)) return !0;
1862
+ let t = Hs.value.get(e.valueHash);
628
1863
  return !t || !!t.disabled;
629
- }, Fn = (e) => {
630
- Pn(e) || Nn(e);
631
- }, In = se((e) => typeof e != "string", JSON.stringify), Ln = h(() => [].concat(B.selected ?? []).map((e) => ({
632
- disabled: N.disabled,
633
- name: N.name,
1864
+ }, Ws = (e) => {
1865
+ Us(e) || Bs(e);
1866
+ }, Gs = ge((e) => typeof e != "string", JSON.stringify), Ks = h(() => [].concat(K.selected ?? []).map((e) => ({
1867
+ disabled: A.disabled,
1868
+ name: A.name,
634
1869
  type: "hidden",
635
- value: In(e)
636
- }))), Rn = [
1870
+ value: Gs(e)
1871
+ }))), qs = [
637
1872
  70,
638
1873
  45,
639
1874
  85,
640
1875
  55
641
- ], zn = h(() => ne(Y.value.length || N.columns.length || 1, 4, 10));
642
- return O(() => [wn.value, N.fixedColumns], () => {
643
- I.value && N.fixedColumns?.length && ue(I.value, N.fixedColumns);
644
- }, { flush: "post" }), (e, t) => (S(), he(we(an.value), {
645
- id: e.id,
646
- ref_key: "containerRef",
647
- ref: L,
648
- "aria-busy": q.value,
649
- class: b(cn.value),
650
- "data-bb-table-id": D(lt),
651
- inert: e.disabled,
652
- style: x(Vt.value)
653
- }, {
654
- default: De(() => [
655
- e.selectable ? (S(), _("legend", Oe, E(on.value), 1)) : g("", !0),
656
- v("table", {
657
- ref_key: "tableRef",
658
- ref: I,
659
- "aria-rowcount": J.value ? D(B).totalItems : void 0
660
- }, [
661
- e.caption ? (S(), _("caption", {
662
- key: 0,
663
- class: b(["bb-table-caption", { "sr-only": !e.displayCaption }])
664
- }, E(e.caption), 3)) : g("", !0),
665
- v("colgroup", null, [(S(!0), _(m, null, w(zt.value, (e) => (S(), _("col", {
666
- key: e.key,
667
- style: x({ width: e.width })
668
- }, null, 4))), 128))]),
669
- v("thead", { inert: sn.value }, [T(e.$slots, "thead", {}, () => [v("tr", {
670
- "aria-rowindex": J.value ? 1 : void 0,
671
- class: b(["bb-table-header-row", e.headerRowClass])
672
- }, [
673
- e.selectable ? (S(), _("th", {
1876
+ ], Js = h(() => ne(Z.value.length || A.columns.length || 1, 4, 10)), Ys = h(() => {
1877
+ let e = /* @__PURE__ */ new Map();
1878
+ for (let [t, n] of D.value) e.has(t) || e.set(t, n);
1879
+ return e;
1880
+ }), Xs = h(() => Xe([$i.value, N.table.style])), Zs = h(() => {
1881
+ let { style: e, ...t } = N.table;
1882
+ return {
1883
+ ...y({
1884
+ ref: L,
1885
+ class: "bb-table__table",
1886
+ role: En.value,
1887
+ "aria-labelledby": A.caption ? Un.value : void 0,
1888
+ "aria-multiselectable": F.value && A.selectable && A.multiple ? "true" : void 0,
1889
+ "aria-rowcount": Ca.value && K.totalItems != null ? K.totalItems + 1 : void 0,
1890
+ ...F.value ? {
1891
+ onKeydown: ks,
1892
+ onFocusout: Ts
1893
+ } : {}
1894
+ }, t),
1895
+ style: Xs.value
1896
+ };
1897
+ }), Qs = h(() => Xe([oa.value, N.rootAttrs.style])), $s = h(() => {
1898
+ let { style: e, ...t } = N.rootAttrs;
1899
+ return {
1900
+ ...y({
1901
+ id: A.id,
1902
+ ref: R,
1903
+ "aria-busy": xa.value,
1904
+ class: wa.value,
1905
+ "data-bb-table-id": In.value,
1906
+ inert: A.disabled
1907
+ }, t),
1908
+ style: Qs.value
1909
+ };
1910
+ }), ec = h(() => ({
1911
+ passthrough: N,
1912
+ slots: M,
1913
+ selectable: A.selectable,
1914
+ multiple: !!A.multiple,
1915
+ readonly: !!A.readonly,
1916
+ actions: P.value,
1917
+ grid: F.value,
1918
+ treegrid: Tn.value,
1919
+ cellRole: Dn.value,
1920
+ rowHeaderKeys: On.value,
1921
+ contentInert: Sa.value,
1922
+ hasRowIndex: Ca.value,
1923
+ rowOffset: Ca.value ? ((K.page ?? 1) - 1) * (K.perPage ?? 0) : 0,
1924
+ setSize: Ca.value ? K.totalItems ?? void 0 : void 0,
1925
+ columnSpan: Ta.value,
1926
+ inputName: jn,
1927
+ tdClass: A.tdClass,
1928
+ cellClasses: yr.value,
1929
+ sortOrders: Ys.value,
1930
+ measureRow: Yo,
1931
+ expandRegionId: Mn
1932
+ })), tc = h(() => {
1933
+ let e = [], t = +!!A.selectable;
1934
+ return A.selectable && A.fixedSelect && e.push({
1935
+ index: 0,
1936
+ position: "left"
1937
+ }), B.value.forEach((n, r) => {
1938
+ n.fixed && e.push({
1939
+ index: r + t,
1940
+ position: n.fixed
1941
+ });
1942
+ }), P.value && A.fixedActions && e.push({
1943
+ index: B.value.length + t,
1944
+ position: "right"
1945
+ }), e;
1946
+ }), nc = h(() => tc.value.map((e) => typeof e == "number" ? `${e}:left` : `${e.index}:${e.position}`).join(","));
1947
+ return T(() => [
1948
+ Zo.value,
1949
+ nc.value,
1950
+ ga.value
1951
+ ], ([, e, t], n) => {
1952
+ let r = n?.[1], i = tc.value;
1953
+ if (L.value && (e.length || r?.length)) {
1954
+ let a = e === r && t === n?.[2];
1955
+ xe(L.value, i, a ? pa : null, a) && (da = e);
1956
+ }
1957
+ M.thead && b(ha);
1958
+ }, { flush: "post" }), $e(() => {
1959
+ wr(), Gr();
1960
+ }), (e, t) => (x(), Ve(it(ya.value), Ye(Ke($s.value)), {
1961
+ default: dt(() => [
1962
+ e.selectable ? (x(), _("legend", xt, C(ba.value), 1)) : g("", !0),
1963
+ e.caption ? (x(), _("div", y({
1964
+ key: 1,
1965
+ id: Un.value,
1966
+ class: ["bb-table__caption", { "bb-sr-only": !e.displayCaption }]
1967
+ }, w(N).caption), C(e.caption), 17, St)) : g("", !0),
1968
+ e.reorderable || e.resizable ? (x(), _("div", {
1969
+ key: 2,
1970
+ id: Wn.value,
1971
+ class: "bb-sr-only"
1972
+ }, [e.reorderable ? (x(), _(Be, { key: 0 }, [He(C(w(I)("table.reorderInstructions").value), 1)], 64)) : g("", !0), e.resizable && !q.value ? (x(), _(Be, { key: 1 }, [He(C(w(I)("table.resizeInstructions").value), 1)], 64)) : g("", !0)], 8, Ct)) : g("", !0),
1973
+ v("span", wt, C(xa.value ? e.loadingText || w(I)("common.loadingText").value : ""), 1),
1974
+ e.reorderable ? (x(), _(Be, { key: 3 }, [v("span", Tt, C(tr.value), 1), v("div", {
1975
+ ref_key: "ghostRef",
1976
+ ref: Mr,
1977
+ "aria-hidden": "true",
1978
+ class: "bb-table-column-ghost",
1979
+ popover: "manual"
1980
+ }, [(x(), _("svg", y({
1981
+ "aria-hidden": "true",
1982
+ class: "bb-table__drag-icon",
1983
+ fill: "none",
1984
+ height: "1em",
1985
+ stroke: "currentColor",
1986
+ "stroke-linecap": "round",
1987
+ "stroke-linejoin": "round",
1988
+ "stroke-width": "2",
1989
+ viewBox: "0 0 24 24",
1990
+ width: "1em"
1991
+ }, w(N).dragIcon), t[0] ||= [v("path", { d: "M12 2v20M2 12h20M5 9l-3 3 3 3M9 5l3-3 3 3M15 19l-3 3-3-3M19 9l3 3-3 3" }, null, -1)], 16)), v("span", null, C(jr.value), 1)], 512)], 64)) : g("", !0),
1992
+ v("div", Ye(Ke(Zs.value)), [
1993
+ v("div", y({
1994
+ class: ["bb-table__head", {
1995
+ "bb-table__head--dragging": W.value === "dragging",
1996
+ "bb-table__head--resizing": mr.value !== null
1997
+ }],
1998
+ inert: Sa.value,
1999
+ role: "rowgroup"
2000
+ }, w(N).head), [rt(e.$slots, "thead", {}, () => [v("div", y({
2001
+ "aria-rowindex": Ca.value ? 1 : void 0,
2002
+ class: ["bb-table__header-row", e.headerRowClass],
2003
+ role: "row",
2004
+ onPointerdown: ei,
2005
+ onTouchmove: ti
2006
+ }, w(N).headerRow), [
2007
+ e.selectable ? (x(), _("div", y({
674
2008
  key: 0,
675
- class: b(["bb-table-header bb-table-header--select", e.thClass]),
676
- scope: "col"
677
- }, [T(e.$slots, "header:select", {
2009
+ class: ["bb-table__cell-column-header bb-table__cell-column-header--select", e.thClass],
2010
+ role: "columnheader",
2011
+ tabindex: uo(0)
2012
+ }, w(N).cellColumnHeader), [rt(e.$slots, "header:select", {
678
2013
  multiple: e.multiple,
679
- selectAll: !!k.value,
680
- text: e.selectText || D(F)("table.selectText").value
681
- }, () => [v("span", Me, [!e.disableSelectAll && e.multiple ? (S(), _("label", {
2014
+ selectAll: !!E.value,
2015
+ text: e.selectText || w(I)("table.selectText").value
2016
+ }, () => [v("span", kt, [!e.disableSelectAll && e.multiple ? (x(), _("label", {
682
2017
  key: 0,
683
- class: b(["bb-table-check__label", { "bb-table-check__label--disabled": e.disabled }])
684
- }, [(S(), he(d, {
685
- key: Mn.value.toString(),
686
- modelValue: k.value,
687
- "onUpdate:modelValue": t[0] ||= (e) => k.value = e,
688
- checked: !!k.value,
689
- class: "bb-table-check",
690
- disabled: e.disabled,
691
- indeterminate: Mn.value,
692
- name: `select_all_${e.name || ""}`,
693
- readonly: e.readonly
694
- }, null, 8, [
695
- "modelValue",
2018
+ class: Je(["bb-table-check__label", { "bb-table-check__label--disabled": e.disabled }])
2019
+ }, [(x(), _("span", {
2020
+ key: $.value.toString(),
2021
+ class: "bb-table-check"
2022
+ }, [v("input", y({
2023
+ ref_key: "selectAllInput",
2024
+ ref: Fs
2025
+ }, zs.value), null, 16), Ue(re, y({
2026
+ checked: !!E.value,
2027
+ class: "bb-table__select-icon",
2028
+ disabled: !!e.disabled,
2029
+ "focus-visible": w(Is).focusVisible.value,
2030
+ focused: w(Is).focused.value,
2031
+ "has-errors": !1,
2032
+ "has-warnings": !1,
2033
+ indeterminate: !!$.value,
2034
+ readonly: !!e.readonly
2035
+ }, Ns.value), null, 16, [
696
2036
  "checked",
697
2037
  "disabled",
2038
+ "focus-visible",
2039
+ "focused",
698
2040
  "indeterminate",
699
- "name",
700
2041
  "readonly"
701
- ])), v("span", Ne, E(e.selectAllLabel || D(F)("table.selectAllLabel").value), 1)], 2)) : e.multiple ? g("", !0) : (S(), _("span", Pe, E(e.selectText || D(F)("table.selectText").value), 1))])])], 2)) : g("", !0),
702
- (S(!0), _(m, null, w(xn.value, (t, n) => (S(), _("th", {
703
- key: t.key,
704
- "aria-sort": t.sortDirection ?? (t.sortable ? "none" : void 0),
705
- class: b(["bb-table-header", [t.classes, {
706
- "bb-table-header--edge-start": n === 0,
707
- "bb-table-header--edge-end": n === xn.value.length - 1
708
- }]]),
709
- scope: "col"
710
- }, [T(e.$slots, t.slotName, {
711
- classes: t.classes,
712
- items: D(fn),
713
- label: t.label,
714
- sortOrder: t.sortOrder,
715
- sortable: t.sortable,
716
- toggleSort: () => _t(t.key)
717
- }, () => [t.sortable ? (S(), he(i, {
718
- key: 0,
719
- class: b(["bb-table-sort", {
720
- "bb-table-sort--asc": t.sortOrder === "asc",
721
- "bb-table-sort--desc": t.sortOrder === "desc"
722
- }]),
723
- type: "button",
724
- onClick: () => _t(t.key)
725
- }, {
726
- default: De(() => [v("span", Ie, E(t.label), 1), _e(a, {
727
- class: "bb-table-sort__icon",
728
- icon: D(le),
729
- size: "sm"
730
- }, null, 8, ["icon"])]),
731
- _: 2
732
- }, 1032, ["class", "onClick"])) : (S(), _("span", Le, E(t.label), 1))])], 10, Fe))), 128)),
733
- e.actions ? (S(), _("th", {
2042
+ ])])), v("span", At, C(e.selectAllLabel || w(I)("table.selectAllLabel").value), 1)], 2)) : e.multiple ? g("", !0) : (x(), _("span", jt, C(e.selectText || w(I)("table.selectText").value), 1))])])], 16, Ot)) : g("", !0),
2043
+ (x(!0), _(Be, null, nt(Ja.value, (n, r) => (x(), _("div", y({
2044
+ key: n.key,
2045
+ "aria-describedby": Gn.value ? Wn.value : void 0,
2046
+ "aria-sort": n.sortDirection ?? (n.sortable ? "none" : void 0),
2047
+ class: ["bb-table__cell-column-header", [n.classes, {
2048
+ "bb-table__cell-column-header--edge-start": r === 0,
2049
+ "bb-table__cell-column-header--edge-end": r === Ja.value.length - 1,
2050
+ "bb-table__cell-column-header--clip": Xi.value.has(n.key),
2051
+ "bb-table__cell-column-header--dragging": Ar.value === n.key,
2052
+ "bb-table__cell-column-header--locked": e.reorderable && Zn.value.has(n.key),
2053
+ "bb-table__cell-column-header--sortable": n.sortable,
2054
+ "bb-table__cell-column-header--sorted": !!n.sortOrder,
2055
+ "bb-table__cell-column-header--sorted-desc": n.sortOrder === "desc",
2056
+ "bb-table__cell-column-header--resizing": mr.value === n.key,
2057
+ "bb-table__cell-column-header--floored": n.key in Ga.value
2058
+ }]],
2059
+ style: Ga.value[n.key],
2060
+ "data-column-key": Gn.value || kn.value ? n.key : void 0,
2061
+ role: "columnheader",
2062
+ tabindex: kn.value ? uo(r + Number(!!e.selectable)) : Gn.value ? n.key === ir.value ? 0 : -1 : void 0,
2063
+ onClick: (e) => ar(e, n),
2064
+ onFocus: (e) => or(n.key),
2065
+ onKeydown: (e) => lr(e, n.key),
2066
+ ref_for: !0
2067
+ }, w(N).part("cellColumnHeader", xn(n.sortOrder))), [
2068
+ Ya(n.key, "prepend") ? (x(), Ve(it(Ya(n.key, "prepend")), y({
2069
+ key: 0,
2070
+ ref_for: !0
2071
+ }, Xa(n)), null, 16)) : g("", !0),
2072
+ rt(e.$slots, n.slotName, {
2073
+ classes: n.classes,
2074
+ hideColumn: () => Yn(n.key),
2075
+ items: w(Aa),
2076
+ label: n.label,
2077
+ sortOrder: n.sortOrder,
2078
+ sortable: n.sortable,
2079
+ toggleSort: () => fi(n.key)
2080
+ }, () => [n.sortable ? (x(), Ve(f, {
2081
+ key: 0,
2082
+ class: Je(["bb-table-sort", {
2083
+ "bb-table-sort--asc": n.sortOrder === "asc",
2084
+ "bb-table-sort--desc": n.sortOrder === "desc"
2085
+ }]),
2086
+ tabindex: Gn.value || kn.value ? -1 : void 0,
2087
+ type: "button",
2088
+ onClick: () => fi(n.key)
2089
+ }, {
2090
+ default: dt(() => [v("span", Nt, C(n.label), 1), (x(), _("svg", y({
2091
+ "aria-hidden": "true",
2092
+ class: "bb-table__sort-icon",
2093
+ fill: "none",
2094
+ height: "1em",
2095
+ stroke: "currentColor",
2096
+ "stroke-linecap": "round",
2097
+ "stroke-linejoin": "round",
2098
+ "stroke-width": "2",
2099
+ viewBox: "0 0 24 24",
2100
+ width: "1em",
2101
+ ref_for: !0
2102
+ }, w(N).part("sortIcon", xn(n.sortOrder))), t[1] ||= [v("path", { d: "M12 20V4m-7 7l7-7l7 7" }, null, -1)], 16))]),
2103
+ _: 2
2104
+ }, 1032, [
2105
+ "class",
2106
+ "tabindex",
2107
+ "onClick"
2108
+ ])) : (x(), _("span", Pt, C(n.label), 1))]),
2109
+ Ya(n.key, "append") ? (x(), Ve(it(Ya(n.key, "append")), y({
2110
+ key: 1,
2111
+ ref_for: !0
2112
+ }, Xa(n)), null, 16)) : g("", !0),
2113
+ e.resizable && !q.value ? (x(), _("div", {
2114
+ key: 2,
2115
+ "aria-hidden": "true",
2116
+ class: "bb-table-header__resizer",
2117
+ onDblclick: ft((e) => Sr(n.key), ["stop"]),
2118
+ onPointerdown: (e) => kr(e, n.key)
2119
+ }, null, 40, Ft)) : g("", !0)
2120
+ ], 16, Mt))), 128)),
2121
+ P.value ? (x(), _("div", y({
734
2122
  key: 1,
735
- class: b(["bb-table-header bb-table-header--actions", e.thClass]),
736
- scope: "col"
737
- }, [T(e.$slots, "header:actions", { text: e.actionsText || D(F)("table.actionsText").value }, () => [v("span", Re, E(e.actionsText || D(F)("table.actionsText").value), 1)])], 2)) : g("", !0)
738
- ], 10, je)])], 8, Ae),
739
- v("tbody", null, [q.value && !D(Y).length ? T(e.$slots, "loading", {
2123
+ class: ["bb-table__cell-column-header bb-table__cell-column-header--actions", e.thClass],
2124
+ role: "columnheader",
2125
+ tabindex: uo(Ta.value - 1)
2126
+ }, w(N).cellColumnHeader), [rt(e.$slots, "header:actions", { text: e.actionsText || w(I)("table.actionsText").value }, () => [v("span", Lt, C(e.actionsText || w(I)("table.actionsText").value), 1)])], 16, It)) : g("", !0)
2127
+ ], 16, Dt)])], 16, Et),
2128
+ v("div", y({
2129
+ ref_key: "bodyRef",
2130
+ ref: ho,
2131
+ class: "bb-table__body",
2132
+ role: "rowgroup",
2133
+ onFocusin: xo,
2134
+ onFocusout: So
2135
+ }, w(N).body), [xa.value && !w(Z).length ? rt(e.$slots, "loading", {
740
2136
  key: 0,
741
- items: D(fn)
742
- }, () => [(S(!0), _(m, null, w(zn.value, (n, r) => (S(), _("tr", {
2137
+ items: w(Aa)
2138
+ }, () => [(x(!0), _(Be, null, nt(Js.value, (n, r) => (x(), _("div", {
743
2139
  key: r,
744
- "aria-rowindex": J.value ? r + 2 : void 0,
745
- class: "bb-table-skeleton__row"
2140
+ "aria-rowindex": Ca.value ? r + 2 : void 0,
2141
+ class: "bb-table-skeleton__row",
2142
+ role: "row"
746
2143
  }, [
747
- e.selectable ? (S(), _("td", Be, t[1] ||= [v("div", { class: "bb-table-skeleton__placeholder" }, null, -1)])) : g("", !0),
748
- (S(!0), _(m, null, w(N.columns, (e, n) => (S(), _("td", {
2144
+ e.selectable ? (x(), _("div", {
2145
+ key: 0,
2146
+ class: "bb-table-skeleton__cell bb-table-skeleton__cell--select",
2147
+ role: Dn.value
2148
+ }, t[2] ||= [v("div", { class: "bb-table-skeleton__placeholder" }, null, -1)], 8, zt)) : g("", !0),
2149
+ (x(!0), _(Be, null, nt(B.value, (e, n) => (x(), _("div", {
749
2150
  key: e.key,
750
- class: b(["bb-table-skeleton__cell", [`bb-table-skeleton__cell--${e.skeleton ?? "text"}`]])
751
- }, [!e.skeleton || e.skeleton === "text" ? (S(), _("div", Ve, [v("div", {
2151
+ class: Je(["bb-table-skeleton__cell", [`bb-table-skeleton__cell--${e.skeleton ?? "text"}`]]),
2152
+ role: Dn.value
2153
+ }, [!e.skeleton || e.skeleton === "text" ? (x(), _("div", Vt, [v("div", {
752
2154
  class: "bb-table-skeleton__line",
753
- style: x({ width: `${Rn[(r + n) % 4]}%` })
2155
+ style: Xe({ width: `${qs[(r + n) % 4]}%` })
754
2156
  }, null, 4), v("div", {
755
2157
  class: "bb-table-skeleton__line",
756
- style: x({ width: `${Rn[(r + n + 2) % 4]}%` })
757
- }, null, 4)])) : e.skeleton === "avatar" ? (S(), _("div", He)) : e.skeleton === "avatar-text" ? (S(), _("div", Ue, [t[2] ||= v("div", { class: "bb-table-skeleton__avatar" }, null, -1), v("div", We, [v("div", {
2158
+ style: Xe({ width: `${qs[(r + n + 2) % 4]}%` })
2159
+ }, null, 4)])) : e.skeleton === "avatar" ? (x(), _("div", Ht)) : e.skeleton === "avatar-text" ? (x(), _("div", Ut, [t[3] ||= v("div", { class: "bb-table-skeleton__avatar" }, null, -1), v("div", Wt, [v("div", {
758
2160
  class: "bb-table-skeleton__line",
759
- style: x({ width: `${Rn[(r + n) % 4]}%` })
2161
+ style: Xe({ width: `${qs[(r + n) % 4]}%` })
760
2162
  }, null, 4), v("div", {
761
2163
  class: "bb-table-skeleton__line",
762
- style: x({ width: `${Rn[(r + n + 2) % 4]}%` })
763
- }, null, 4)])])) : e.skeleton === "image" ? (S(), _("div", Ge)) : e.skeleton === "badge" ? (S(), _("div", Ke)) : g("", !0)], 2))), 128)),
764
- e.actions ? (S(), _("td", qe, t[3] ||= [v("div", { class: "bb-table-skeleton__placeholder" }, null, -1)])) : g("", !0)
765
- ], 8, ze))), 128))]) : D(Y).length ? T(e.$slots, "tbody", { key: 2 }, () => [(S(!0), _(m, null, w(wn.value, (t, n) => (S(), _(m, { key: t.valueHash }, [v("tr", {
766
- "aria-current": t.highlighted ? "true" : void 0,
767
- "aria-rowindex": J.value && t.rowIndex ? t.rowIndex : void 0,
768
- class: b(["bb-table-data__row", [t.rowClasses, { "bb-table-data__row--highlighted": t.highlighted }]]),
769
- inert: sn.value,
770
- tabindex: e.keyboardNavigation ? n === X.value ? 0 : -1 : void 0,
771
- onClick: t.onRowClick,
772
- onContextmenu: t.onRowContextMenu,
773
- onDblclick: t.onRowDblClick,
774
- onFocus: () => Dn(n),
775
- onKeydown: (e) => On(e, n)
776
- }, [
777
- e.selectable ? (S(), _("td", {
778
- key: 0,
779
- class: b(["bb-table-data__cell bb-table-data__cell--select", e.tdClass])
780
- }, [T(e.$slots, "select", {
781
- checked: $(t),
782
- disabled: Pn(t),
783
- inputName: D(st),
784
- item: t.item,
785
- readonly: !!e.readonly,
786
- toggleSelected: () => Fn(t),
787
- value: t.value
788
- }, () => [e.multiple ? (S(), _("label", {
789
- key: 0,
790
- class: b(["bb-table-check__label", { "bb-table-check__label--disabled": t.disabled }])
791
- }, [_e(d, {
792
- checked: $(t),
793
- class: "bb-table-check",
794
- disabled: t.disabled,
795
- readonly: e.readonly,
796
- onChange: () => Nn(t)
797
- }, null, 8, [
798
- "checked",
799
- "disabled",
800
- "readonly",
801
- "onChange"
802
- ]), v("span", Qe, E(t.accessibleLabel), 1)], 2)) : (S(), _("label", {
2164
+ style: Xe({ width: `${qs[(r + n + 2) % 4]}%` })
2165
+ }, null, 4)])])) : e.skeleton === "image" ? (x(), _("div", Gt)) : e.skeleton === "badge" ? (x(), _("div", Kt)) : g("", !0)], 10, Bt))), 128)),
2166
+ P.value ? (x(), _("div", {
803
2167
  key: 1,
804
- class: b(["bb-table-radio__label", { "bb-table-radio__label--disabled": t.disabled }])
805
- }, [_e(oe, {
806
- checked: t.selected,
807
- class: "bb-table-radio",
808
- disabled: t.disabled,
809
- name: D(st),
810
- readonly: e.readonly,
811
- value: t.value,
812
- onChange: () => Nn(t)
813
- }, null, 8, [
814
- "checked",
815
- "disabled",
816
- "name",
817
- "readonly",
818
- "value",
819
- "onChange"
820
- ]), v("span", $e, E(t.accessibleLabel), 1)], 2))])], 2)) : g("", !0),
821
- (S(!0), _(m, null, w(t.cols, (n, r) => (S(), _("td", {
822
- key: n.key,
823
- class: b(["bb-table-data__cell", [n.classes, {
824
- "bb-table-data__cell--edge-start": r === 0,
825
- "bb-table-data__cell--edge-end": r === t.cols.length - 1
826
- }]])
827
- }, [T(e.$slots, n.slotName, {
828
- classes: n.classes,
829
- content: n.content,
830
- expandProps: jn(t),
831
- expanded: t.expanded,
832
- highlighted: t.highlighted,
833
- item: t.item,
834
- selected: $(t),
835
- sortOrder: gt(n.key),
836
- toggleExpanded: () => Z(t.valueHash),
837
- toggleHighlighted: () => z(t),
838
- toggleSelected: () => Fn(t),
839
- value: t.value
840
- }, () => [ge(E(n.content), 1)])], 2))), 128)),
841
- e.actions ? (S(), _("td", {
842
- key: 1,
843
- class: b(["bb-table__cell bb-table__cell--actions", e.tdClass])
844
- }, [T(e.$slots, "actions", {
845
- expandProps: jn(t),
846
- expanded: t.expanded,
847
- highlighted: t.highlighted,
848
- item: t.item,
849
- selected: $(t),
850
- toggleExpanded: () => Z(t.valueHash),
851
- toggleHighlighted: () => z(t),
852
- toggleSelected: () => Fn(t),
853
- value: t.value
854
- })], 2)) : g("", !0)
855
- ], 42, Ze), t.expanded ? (S(), _("tr", {
2168
+ class: "bb-table-skeleton__cell bb-table-skeleton__cell--actions",
2169
+ role: Dn.value
2170
+ }, t[4] ||= [v("div", { class: "bb-table-skeleton__placeholder" }, null, -1)], 8, qt)) : g("", !0)
2171
+ ], 8, Rt))), 128))]) : w(Z).length ? rt(e.$slots, "tbody", { key: 2 }, () => [(x(!0), _(Be, null, nt(Zo.value, (e) => (x(), _(Be, { key: e.key }, [e.kind === "spacer" ? (x(), _("div", {
856
2172
  key: 0,
857
- id: `expanded_${t.valueHash}`,
858
- "aria-rowindex": J.value && t.rowIndex ? t.rowIndex + 1 : void 0,
859
- class: b(["bb-table-expand__row", { "bb-table-expand__row--highlighted": t.highlighted }])
860
- }, [v("td", {
861
- class: "bb-table-expand__cell",
862
- colspan: ln.value
863
- }, [T(e.$slots, "expand", {
864
- expandProps: jn(t),
865
- expanded: t.expanded,
866
- highlighted: t.highlighted,
867
- item: t.item,
868
- selected: $(t),
869
- toggleExpanded: () => Z(t.valueHash),
870
- toggleHighlighted: () => z(t),
871
- toggleSelected: () => Fn(t),
872
- value: t.value
873
- })], 8, tt)], 10, et)) : g("", !0)], 64))), 128))]) : (S(), _("tr", {
2173
+ "aria-hidden": "true",
2174
+ class: "bb-table-spacer__row bb-table-placeholder__row",
2175
+ style: Xe({ height: `${e.height}px` })
2176
+ }, null, 4)) : e.kind === "placeholder" ? (x(), _("div", {
874
2177
  key: 1,
875
- "aria-rowindex": J.value ? 2 : void 0,
876
- class: "bb-table-no-data__row"
877
- }, [v("td", {
878
- class: "bb-table-no-data__cell",
879
- colspan: ln.value
880
- }, [T(e.$slots, "no-data", {}, () => [v("span", Xe, E(e.noDataText || D(F)("common.noDataText").value), 1)])], 8, Ye)], 8, Je)), q.value ? (S(), _("tr", {
2178
+ "aria-hidden": "true",
2179
+ class: "bb-table-placeholder__row bb-table-placeholder__row--pending",
2180
+ "data-index": e.virtualIndex,
2181
+ style: Xe({ height: `${e.height}px` })
2182
+ }, null, 12, Zt)) : e.kind === "row" ? (x(), Ve(w(ve), {
2183
+ key: 2,
2184
+ context: ec.value,
2185
+ index: e.index,
2186
+ item: e.item,
2187
+ "select-blocked": Us(e.item),
2188
+ selected: Vs(e.item),
2189
+ stop: lo(e.virtualIndex),
2190
+ "virtual-index": e.virtualIndex
2191
+ }, null, 8, [
2192
+ "context",
2193
+ "index",
2194
+ "item",
2195
+ "select-blocked",
2196
+ "selected",
2197
+ "stop",
2198
+ "virtual-index"
2199
+ ])) : (x(), Ve(w(ye), {
881
2200
  key: 3,
882
- "aria-rowindex": J.value && !D(Y).length ? zn.value + 2 : void 0,
883
- class: "bb-table-loading__row bb-table-loading__row--sr-only"
884
- }, [v("td", {
885
- "aria-live": "polite",
886
- class: "bb-table-loading__cell",
887
- colspan: ln.value,
888
- role: "status"
889
- }, [v("span", it, E(e.loadingText || D(F)("common.loadingText").value), 1)], 8, rt)], 8, nt)) : g("", !0)]),
890
- v("tfoot", null, [T(e.$slots, "tfoot", { columnCount: ln.value })])
891
- ], 8, ke),
892
- (S(!0), _(m, null, w(Ln.value, (e) => (S(), _("input", ye({
2201
+ context: ec.value,
2202
+ item: e.item,
2203
+ selected: Vs(e.item),
2204
+ stop: lo(e.virtualIndex),
2205
+ "virtual-index": e.virtualIndex
2206
+ }, null, 8, [
2207
+ "context",
2208
+ "item",
2209
+ "selected",
2210
+ "stop",
2211
+ "virtual-index"
2212
+ ]))], 64))), 128))]) : (x(), _("div", {
2213
+ key: 1,
2214
+ "aria-rowindex": Ca.value ? 2 : void 0,
2215
+ class: "bb-table-empty__row",
2216
+ role: "row"
2217
+ }, [v("div", {
2218
+ "aria-colspan": Ta.value,
2219
+ class: "bb-table-empty__cell",
2220
+ role: Dn.value
2221
+ }, [rt(e.$slots, "empty", {}, () => [v("span", Xt, C(e.emptyText || w(I)("common.emptyText").value), 1)])], 8, Yt)], 8, Jt))], 16),
2222
+ v("div", y({
2223
+ class: "bb-table__foot",
2224
+ role: M.tfoot ? "rowgroup" : void 0
2225
+ }, w(N).foot), [rt(e.$slots, "tfoot", { columnCount: Ta.value })], 16, Qt)
2226
+ ], 16),
2227
+ (x(!0), _(Be, null, nt(Ks.value, (e) => (x(), _("input", y({
893
2228
  key: e.value,
894
2229
  ref_for: !0
895
2230
  }, e), null, 16))), 128))
896
2231
  ]),
897
2232
  _: 3
898
- }, 8, [
899
- "id",
900
- "aria-busy",
901
- "class",
902
- "data-bb-table-id",
903
- "inert",
904
- "style"
905
- ]));
2233
+ }, 16));
906
2234
  }
907
2235
  });
908
2236
  //#endregion
909
- export { k as default };
2237
+ export { E as default };