bitboss-ui 3.0.0-beta.63 → 3.0.0-beta.64

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 (377) hide show
  1. package/README.md +25 -20
  2. package/bin/bitboss-ui.mjs +73 -7
  3. package/dist/ai/BbAlert.md +10 -1
  4. package/dist/ai/BbBadge.md +35 -3
  5. package/dist/ai/BbBadgeButton.md +4 -2
  6. package/dist/ai/BbBaseButton.md +9 -3
  7. package/dist/ai/BbBreadcrumbs.md +2 -2
  8. package/dist/ai/BbButton.md +113 -8
  9. package/dist/ai/BbCheckbox.md +1 -1
  10. package/dist/ai/BbCheckboxGroup.md +94 -6
  11. package/dist/ai/BbColorInput.md +4 -1
  12. package/dist/ai/BbColorPalette.md +2 -1
  13. package/dist/ai/BbConfirm.md +7 -3
  14. package/dist/ai/BbDatePicker.md +2 -1
  15. package/dist/ai/BbDatePickerInput.md +4 -1
  16. package/dist/ai/BbDialog.md +12 -11
  17. package/dist/ai/BbDropdown.md +189 -38
  18. package/dist/ai/BbDropdownButton.md +27 -7
  19. package/dist/ai/BbForm.md +55 -22
  20. package/dist/ai/BbHost.md +2 -2
  21. package/dist/ai/BbHoverCard.md +7 -3
  22. package/dist/ai/BbIcon.md +12 -6
  23. package/dist/ai/BbIndicator.md +11 -1
  24. package/dist/ai/BbNumberInput.md +4 -1
  25. package/dist/ai/BbOffCanvas.md +37 -3
  26. package/dist/ai/BbPopover.md +2 -1
  27. package/dist/ai/BbRadio.md +1 -1
  28. package/dist/ai/BbRadioGroup.md +102 -10
  29. package/dist/ai/BbSelect.md +52 -17
  30. package/dist/ai/BbSelectPopover.md +93 -26
  31. package/dist/ai/BbSwitch.md +1 -1
  32. package/dist/ai/BbSwitchGroup.md +30 -3
  33. package/dist/ai/BbTable.md +17 -10
  34. package/dist/ai/BbTabs.md +8 -3
  35. package/dist/ai/BbTabsList.md +4 -1
  36. package/dist/ai/BbTag.md +5 -2
  37. package/dist/ai/BbTextInput.md +4 -1
  38. package/dist/ai/BbTextarea.md +4 -1
  39. package/dist/ai/BbTimePicker.md +2 -1
  40. package/dist/ai/BbTimePickerInput.md +4 -1
  41. package/dist/ai/BbToast.md +9 -3
  42. package/dist/ai/BbTooltip.md +71 -9
  43. package/dist/ai/ChipsBox.md +1 -1
  44. package/dist/ai/CommonField.md +1 -1
  45. package/dist/ai/OptionsContainer.md +42 -0
  46. package/dist/ai/changelog.json +416 -6
  47. package/dist/ai/components.json +50 -48
  48. package/dist/ai/composables/useConfirm.md +39 -1
  49. package/dist/ai/design-tokens.json +6 -6
  50. package/dist/ai/guides/agent-contract.md +2 -2
  51. package/dist/ai/guides/ai-router.md +24 -23
  52. package/dist/ai/guides/app-layout.md +5 -0
  53. package/dist/ai/guides/component-picker.md +9 -2
  54. package/dist/ai/guides/design-language.md +24 -24
  55. package/dist/ai/guides/design-tokens.md +15 -8
  56. package/dist/ai/guides/icons-policy.md +9 -2
  57. package/dist/ai/guides/inertia-helpers.md +79 -49
  58. package/dist/ai/guides/installation-and-plugin-setup.md +12 -2
  59. package/dist/ai/guides/migration/adoption-checklist.md +235 -0
  60. package/dist/ai/guides/migration/components/bb-checkbox-group.md +16 -15
  61. package/dist/ai/guides/migration/components/bb-dialog.md +9 -9
  62. package/dist/ai/guides/migration/components/bb-dropdown.md +7 -2
  63. package/dist/ai/guides/migration/components/bb-popover.md +4 -2
  64. package/dist/ai/guides/migration/components/bb-select.md +19 -0
  65. package/dist/ai/guides/migration/components/bb-table.md +1 -0
  66. package/dist/ai/guides/migration/components/bb-toast.md +4 -0
  67. package/dist/ai/guides/migration/components/bb-tooltip.md +15 -12
  68. package/dist/ai/guides/migration/components/use-confirm.md +25 -2
  69. package/dist/ai/guides/migration/v2-to-v3.md +163 -9
  70. package/dist/ai/guides/migration/v3-beta-css-classes.md +7 -3
  71. package/dist/ai/guides/options-items-playbook.md +2 -1
  72. package/dist/ai/guides/passthrough.md +147 -85
  73. package/dist/ai/guides/preset-components.md +140 -15
  74. package/dist/ai/helpers/definePreset.json +7 -0
  75. package/dist/ai/helpers/definePreset.ts +123 -11
  76. package/dist/ai/helpers/inertia/manifest.json +15 -9
  77. package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +4 -4
  78. package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +39 -24
  79. package/dist/ai/helpers/inertia/useRouteQuery.ts +10 -4
  80. package/dist/ai/index.md +1 -0
  81. package/dist/ai/manifest/common.json +0 -1
  82. package/dist/ai/manifest/components/BbAlert.json +7 -2
  83. package/dist/ai/manifest/components/BbBadge.json +13 -4
  84. package/dist/ai/manifest/components/BbBadge.tree.json +2 -0
  85. package/dist/ai/manifest/components/BbBadgeButton.json +4 -2
  86. package/dist/ai/manifest/components/BbBaseButton.json +4 -2
  87. package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
  88. package/dist/ai/manifest/components/BbButton.json +14 -3
  89. package/dist/ai/manifest/components/BbButton.tree.json +5 -1
  90. package/dist/ai/manifest/components/BbCheckboxGroup.json +13 -8
  91. package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +11 -1
  92. package/dist/ai/manifest/components/BbColorInput.json +18 -15
  93. package/dist/ai/manifest/components/BbColorPalette.json +1 -1
  94. package/dist/ai/manifest/components/BbConfirm.json +4 -2
  95. package/dist/ai/manifest/components/BbConfirm.tree.json +1 -1
  96. package/dist/ai/manifest/components/BbDatePicker.json +1 -1
  97. package/dist/ai/manifest/components/BbDatePickerInput.json +17 -14
  98. package/dist/ai/manifest/components/BbDialog.tree.json +2 -1
  99. package/dist/ai/manifest/components/BbDropdown.json +24 -19
  100. package/dist/ai/manifest/components/BbDropdown.tree.json +9 -2
  101. package/dist/ai/manifest/components/BbDropdownButton.json +33 -20
  102. package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -2
  103. package/dist/ai/manifest/components/BbForm.json +2 -2
  104. package/dist/ai/manifest/components/BbHost.tree.json +1 -1
  105. package/dist/ai/manifest/components/BbHoverCard.json +1 -1
  106. package/dist/ai/manifest/components/BbIndicator.json +8 -2
  107. package/dist/ai/manifest/components/BbNumberInput.json +5 -2
  108. package/dist/ai/manifest/components/BbOffCanvas.json +2 -2
  109. package/dist/ai/manifest/components/BbOffCanvas.tree.json +1 -1
  110. package/dist/ai/manifest/components/BbPopover.json +1 -1
  111. package/dist/ai/manifest/components/BbRadioGroup.json +17 -12
  112. package/dist/ai/manifest/components/BbRadioGroup.tree.json +8 -1
  113. package/dist/ai/manifest/components/BbSelect.json +21 -18
  114. package/dist/ai/manifest/components/BbSelect.tree.json +2 -2
  115. package/dist/ai/manifest/components/BbSelectPopover.json +10 -10
  116. package/dist/ai/manifest/components/BbSelectPopover.tree.json +3 -2
  117. package/dist/ai/manifest/components/BbSwitchGroup.json +1 -1
  118. package/dist/ai/manifest/components/BbSwitchGroup.tree.json +3 -1
  119. package/dist/ai/manifest/components/BbTable.tree.json +14 -1
  120. package/dist/ai/manifest/components/BbTabs.json +9 -6
  121. package/dist/ai/manifest/components/BbTabs.tree.json +1 -1
  122. package/dist/ai/manifest/components/BbTabsList.json +6 -3
  123. package/dist/ai/manifest/components/BbTag.json +19 -16
  124. package/dist/ai/manifest/components/BbTag.tree.json +1 -1
  125. package/dist/ai/manifest/components/BbTextInput.json +6 -3
  126. package/dist/ai/manifest/components/BbTextarea.json +6 -3
  127. package/dist/ai/manifest/components/BbTimePicker.json +1 -1
  128. package/dist/ai/manifest/components/BbTimePickerInput.json +10 -7
  129. package/dist/ai/manifest/components/BbToast.json +7 -2
  130. package/dist/ai/manifest/components/BbToast.tree.json +4 -2
  131. package/dist/ai/manifest/components/BbTooltip.json +6 -5
  132. package/dist/ai/manifest/components/ChipsBox.tree.json +1 -1
  133. package/dist/ai/manifest/components/CommonField.json +1 -1
  134. package/dist/ai/manifest/components/OptionsContainer.json +3 -1
  135. package/dist/ai/manifest/components/OptionsContainer.tree.json +38 -0
  136. package/dist/ai/manifest/index.json +3 -3
  137. package/dist/ai/manifest/meta.json +5 -3
  138. package/dist/ai/manifest/types.advanced.json +5 -2
  139. package/dist/ai/manifest/types.api.json +9 -7
  140. package/dist/ai/recipes/inertia/layout-scaffold.md +19 -6
  141. package/dist/ai/recipes/inertia/records-workspace.md +49 -13
  142. package/dist/ai/recipes/nuxt/layout-scaffold.md +19 -6
  143. package/dist/ai/recipes/nuxt/records-workspace.md +42 -12
  144. package/dist/ai/recipes/vue/layout-scaffold.md +19 -6
  145. package/dist/ai/recipes/vue/records-workspace.md +42 -12
  146. package/dist/ai/source/BbAlert.md +94 -76
  147. package/dist/ai/source/BbBadge.md +174 -72
  148. package/dist/ai/source/BbBadgeButton.md +130 -65
  149. package/dist/ai/source/BbBaseButton.md +46 -124
  150. package/dist/ai/source/BbBaseCheckboxIcon.md +38 -0
  151. package/dist/ai/source/BbBaseRadioIcon.md +18 -0
  152. package/dist/ai/source/BbBaseSwitchIcon.md +51 -0
  153. package/dist/ai/source/BbButton.md +153 -36
  154. package/dist/ai/source/BbCheckboxGroup.md +142 -18
  155. package/dist/ai/source/BbColorInput.md +240 -204
  156. package/dist/ai/source/BbColorPalette.md +7 -4
  157. package/dist/ai/source/BbConfirm.md +34 -11
  158. package/dist/ai/source/BbConfirmPortal.md +24 -9
  159. package/dist/ai/source/BbDatePicker.md +11 -7
  160. package/dist/ai/source/BbDatePickerInput.md +306 -269
  161. package/dist/ai/source/BbDialog.md +49 -14
  162. package/dist/ai/source/BbDropdown.md +314 -197
  163. package/dist/ai/source/BbDropdownButton.md +197 -31
  164. package/dist/ai/source/BbDropdownGroup.md +274 -176
  165. package/dist/ai/source/BbForm.md +50 -6
  166. package/dist/ai/source/BbHoverCard.md +12 -5
  167. package/dist/ai/source/BbIcon.md +4 -3
  168. package/dist/ai/source/BbIndicator.md +73 -52
  169. package/dist/ai/source/BbNumberInput.md +293 -257
  170. package/dist/ai/source/BbOffCanvas.md +55 -29
  171. package/dist/ai/source/BbPopover.md +14 -10
  172. package/dist/ai/source/BbRadioGroup.md +413 -297
  173. package/dist/ai/source/BbSelect.md +549 -435
  174. package/dist/ai/source/BbSelectPopover.md +128 -33
  175. package/dist/ai/source/BbSwitchGroup.md +70 -10
  176. package/dist/ai/source/BbTable.md +369 -37
  177. package/dist/ai/source/BbTabs.md +115 -39
  178. package/dist/ai/source/BbTabsList.md +106 -38
  179. package/dist/ai/source/BbTabsPanels.md +96 -36
  180. package/dist/ai/source/BbTabsRoot.md +96 -36
  181. package/dist/ai/source/BbTag.md +267 -233
  182. package/dist/ai/source/BbTextInput.md +261 -225
  183. package/dist/ai/source/BbTextarea.md +251 -215
  184. package/dist/ai/source/BbTimePicker.md +11 -7
  185. package/dist/ai/source/BbTimePickerInput.md +257 -220
  186. package/dist/ai/source/BbToast.md +73 -32
  187. package/dist/ai/source/BbToastPortal.md +65 -30
  188. package/dist/ai/source/BbTooltip.md +148 -113
  189. package/dist/ai/source/CommonPopover.md +6 -1
  190. package/dist/ai/source/FlatListBox.md +19 -9
  191. package/dist/ai/source/GroupedListBox.md +19 -9
  192. package/dist/ai/source/OptionsContainer.md +25 -9
  193. package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +61 -36
  194. package/dist/components/BbAlert/types.d.ts +9 -5
  195. package/dist/components/BbAlert/types.js +8 -3
  196. package/dist/components/BbBadge/BadgeBodyContent.vue.d.ts +3 -3
  197. package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +26 -17
  198. package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +103 -50
  199. package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +20 -15
  200. package/dist/components/BbBadge/badgeButtonContext.d.ts +12 -1
  201. package/dist/components/BbBadge/types.d.ts +45 -15
  202. package/dist/components/BbBadge/types.js +12 -3
  203. package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +89 -126
  204. package/dist/components/BbBaseButton/types.d.ts +23 -4
  205. package/dist/components/BbBaseButton/types.js +7 -1
  206. package/dist/components/BbBaseButton/useLinkState.d.ts +41 -0
  207. package/dist/components/BbBaseButton/useLinkState.js +70 -0
  208. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +130 -74
  209. package/dist/components/BbButton/types.d.ts +50 -13
  210. package/dist/components/BbButton/types.js +10 -3
  211. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +148 -95
  212. package/dist/components/BbCheckboxGroup/types.d.ts +34 -11
  213. package/dist/components/BbCheckboxGroup/types.js +9 -4
  214. package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +1 -1
  215. package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +134 -93
  216. package/dist/components/BbColorInput/types.d.ts +11 -4
  217. package/dist/components/BbColorInput/types.js +9 -3
  218. package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +82 -59
  219. package/dist/components/BbConfirm/types.d.ts +9 -4
  220. package/dist/components/BbConfirm/types.js +8 -3
  221. package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
  222. package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +68 -67
  223. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +1 -1
  224. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +259 -215
  225. package/dist/components/BbDatePickerInput/types.d.ts +12 -5
  226. package/dist/components/BbDatePickerInput/types.js +9 -3
  227. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +223 -219
  228. package/dist/components/BbDialog/useDialogStack.d.ts +1 -1
  229. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +104 -89
  230. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +1 -0
  231. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +323 -285
  232. package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +1 -0
  233. package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +411 -319
  234. package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +100 -98
  235. package/dist/components/BbDropdown/DropdownRow.vue.d.ts +4 -3
  236. package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +49 -28
  237. package/dist/components/BbDropdown/normalizeGroups.d.ts +6 -0
  238. package/dist/components/BbDropdown/normalizeGroups.js +21 -15
  239. package/dist/components/BbDropdown/types.d.ts +59 -12
  240. package/dist/components/BbDropdown/types.js +16 -3
  241. package/dist/components/BbDropdown/useDropdownContext.d.ts +6 -0
  242. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -1
  243. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +179 -68
  244. package/dist/components/BbDropdownButton/types.d.ts +44 -16
  245. package/dist/components/BbDropdownButton/types.js +28 -3
  246. package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +111 -89
  247. package/dist/components/BbForm/formSchema.d.ts +13 -0
  248. package/dist/components/BbHoverCard/BbHoverCard.vue_vue_type_script_setup_true_lang.js +100 -100
  249. package/dist/components/BbIndicator/BbIndicator.vue_vue_type_script_setup_true_lang.js +40 -25
  250. package/dist/components/BbIndicator/types.d.ts +9 -5
  251. package/dist/components/BbIndicator/types.js +8 -3
  252. package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +243 -202
  253. package/dist/components/BbNumberInput/types.d.ts +12 -5
  254. package/dist/components/BbNumberInput/types.js +9 -3
  255. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -1
  256. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +401 -399
  257. package/dist/components/BbOffCanvas/types.d.ts +6 -2
  258. package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +81 -80
  259. package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +158 -105
  260. package/dist/components/BbRadioGroup/types.d.ts +21 -7
  261. package/dist/components/BbRadioGroup/types.js +9 -4
  262. package/dist/components/BbSelect/BbSelect.vue.d.ts +4 -3
  263. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +181 -137
  264. package/dist/components/BbSelect/types.d.ts +36 -22
  265. package/dist/components/BbSelect/types.js +22 -3
  266. package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +4 -4
  267. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +543 -532
  268. package/dist/components/BbSelectPopover/knownItems.d.ts +5 -0
  269. package/dist/components/BbSelectPopover/types.d.ts +46 -12
  270. package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +1 -1
  271. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +2 -2
  272. package/dist/components/BbSwitchGroup/types.d.ts +14 -4
  273. package/dist/components/BbSwitchGroup/types.js +8 -3
  274. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1102 -995
  275. package/dist/components/BbTable/estimatedFloors.golden.d.ts +25 -0
  276. package/dist/components/BbTable/measuredFloors.d.ts +46 -0
  277. package/dist/components/BbTable/measuredFloors.js +322 -0
  278. package/dist/components/BbTable/measuredFloorsTestKit.d.ts +27 -0
  279. package/dist/components/BbTable/textRuler.d.ts +71 -0
  280. package/dist/components/BbTable/textRuler.js +121 -0
  281. package/dist/components/BbTable/utils.d.ts +113 -6
  282. package/dist/components/BbTable/utils.js +118 -65
  283. package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +53 -35
  284. package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +62 -45
  285. package/dist/components/BbTabs/types.d.ts +26 -11
  286. package/dist/components/BbTabs/types.js +23 -8
  287. package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +205 -164
  288. package/dist/components/BbTag/types.d.ts +11 -4
  289. package/dist/components/BbTag/types.js +9 -3
  290. package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +98 -57
  291. package/dist/components/BbTextInput/types.d.ts +12 -5
  292. package/dist/components/BbTextInput/types.js +9 -3
  293. package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +137 -96
  294. package/dist/components/BbTextarea/types.d.ts +12 -5
  295. package/dist/components/BbTextarea/types.js +9 -3
  296. package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +105 -104
  297. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +241 -197
  298. package/dist/components/BbTimePickerInput/types.d.ts +12 -5
  299. package/dist/components/BbTimePickerInput/types.js +9 -3
  300. package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +74 -32
  301. package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +47 -47
  302. package/dist/components/BbToast/types.d.ts +10 -5
  303. package/dist/components/BbToast/types.js +18 -3
  304. package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +85 -71
  305. package/dist/components/BbTooltip/types.d.ts +13 -8
  306. package/dist/components/BbTooltip/types.js +8 -3
  307. package/dist/components/CommonField/CommonField.vue.d.ts +1 -1
  308. package/dist/components/CommonPopover/CommonPopover.vue.d.ts +1 -1
  309. package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +69 -69
  310. package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +53 -50
  311. package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +146 -143
  312. package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +7 -2
  313. package/dist/components/OptionsContainer/types.d.ts +14 -3
  314. package/dist/composables/useBbFormContext.d.ts +4 -3
  315. package/dist/composables/useBbTabsContext.js +99 -85
  316. package/dist/composables/useChoiceIndicator.d.ts +58 -0
  317. package/dist/composables/useChoiceIndicator.js +197 -0
  318. package/dist/composables/useConfirm.d.ts +4 -4
  319. package/dist/composables/usePassthrough.d.ts +54 -1
  320. package/dist/composables/usePassthrough.js +100 -71
  321. package/dist/directives/bbTooltip.d.ts +12 -6
  322. package/dist/directives/createPopoverDirective.js +1 -1
  323. package/dist/index.d.ts +3 -1
  324. package/dist/llms-full.txt +2300 -543
  325. package/dist/llms-medium.txt +71 -53
  326. package/dist/llms.txt +2 -1
  327. package/dist/passthrough-deduper.js +6 -3
  328. package/dist/project-dts.d.ts +24 -0
  329. package/dist/project-dts.js +43 -17
  330. package/dist/styles.css +2 -2
  331. package/dist/types/AlertVariant.d.ts +14 -0
  332. package/dist/types/AlertVariant.js +9 -0
  333. package/dist/types/BadgeVariant.d.ts +14 -0
  334. package/dist/types/BadgeVariant.js +9 -0
  335. package/dist/types/ButtonVariant.d.ts +16 -0
  336. package/dist/types/ButtonVariant.js +11 -0
  337. package/dist/types/CheckboxVariant.d.ts +38 -0
  338. package/dist/types/CheckboxVariant.js +4 -0
  339. package/dist/types/CommonProps.d.ts +4 -3
  340. package/dist/types/Config.d.ts +7 -0
  341. package/dist/types/ConfirmVariant.d.ts +12 -0
  342. package/dist/types/ConfirmVariant.js +4 -0
  343. package/dist/types/DropdownItemVariant.d.ts +12 -0
  344. package/dist/types/DropdownItemVariant.js +4 -0
  345. package/dist/types/IndicatorVariant.d.ts +15 -0
  346. package/dist/types/IndicatorVariant.js +10 -0
  347. package/dist/types/InputVariant.d.ts +13 -0
  348. package/dist/types/InputVariant.js +8 -0
  349. package/dist/types/RadioVariant.d.ts +38 -0
  350. package/dist/types/RadioVariant.js +4 -0
  351. package/dist/types/TabsVariant.d.ts +13 -0
  352. package/dist/types/TabsVariant.js +8 -0
  353. package/dist/types/ToastVariant.d.ts +15 -0
  354. package/dist/types/ToastVariant.js +10 -0
  355. package/dist/types/TooltipVariant.d.ts +12 -0
  356. package/dist/types/TooltipVariant.js +4 -0
  357. package/dist/types/passthrough.d.ts +83 -15
  358. package/dist/types/passthrough.js +2 -2
  359. package/dist/types/ptComponentMap.d.ts +35 -23
  360. package/dist/utilities/functions/extractDomContainer.d.ts +20 -1
  361. package/dist/utilities/functions/extractDomContainer.js +8 -3
  362. package/dist/utils/focusVisibility.d.ts +6 -0
  363. package/dist/utils/focusVisibility.js +4 -1
  364. package/dist/utils/passthroughDeduper.d.ts +14 -0
  365. package/dist/utils/versionCheck.js +1 -1
  366. package/dist/vite-plugin.d.ts +64 -7
  367. package/dist/vite.js +385 -259
  368. package/llms.txt +2 -1
  369. package/package.json +3 -3
  370. package/scripts/lib/adoption-checklist.json +312 -0
  371. package/scripts/lib/eslint-plugin.d.ts +13 -0
  372. package/scripts/lib/eslint-plugin.mjs +75 -11
  373. package/scripts/lib/idiom-scan.mjs +65 -0
  374. package/scripts/lib/mcp-config.mjs +203 -9
  375. package/scripts/lib/migrate-fix.mjs +42 -1
  376. package/scripts/lib/project-variant-dts.mjs +18 -0
  377. package/scripts/lib/validate-bb-markup.mjs +99 -2
@@ -1,52 +1,54 @@
1
1
  import { useLogger as e } from "../../composables/useLogger.js";
2
2
  import { usePassthrough as t } from "../../composables/usePassthrough.js";
3
3
  import { useConfig as n } from "../../composables/useConfig.js";
4
- import { registerStandInClose as r, useOverlayNavigation as ee } from "../../composables/useOverlayNavigation.js";
5
- import { useId as te } from "../../composables/useId.js";
6
- import { escapeStackDepth as ne, insertEscapeEntry as re, isTopEscapeEntry as ie, pushEscapeEntry as ae, removeEscapeEntry as oe } from "../../utils/overlayEscapeStack.js";
7
- import { useUntil as se } from "../../composables/useUntil.js";
8
- import { removedPropsFor as ce } from "../../deprecation/removedProps.js";
9
- import { warnRemovedAttrs as le } from "../../utilities/functions/warnRemovedAttrs.js";
10
- import { transitions as i } from "../../utilities/misc/transitions.js";
11
- import { overlaySurfaceIsolation as ue } from "../../utils/overlaySurfaceIsolation.js";
12
- import { provideOverlaySubmitGuard as de } from "../../composables/formSubmitLock.js";
13
- import { useMobile as fe } from "../../composables/useMobile.js";
14
- import { wait as pe } from "../../utilities/functions/wait.js";
15
- import { useLocale as me } from "../../composables/useLocale.js";
16
- import { parseSize as he } from "../../utilities/functions/parseSize.js";
17
- import { viewportHeight as ge, viewportWidth as _e } from "../../composables/useViewportWidth.js";
18
- import { useBreakpoint as ve } from "../../composables/useBreakpoint.js";
19
- import { animationsSettled as ye } from "../../utilities/functions/animationsSettled.js";
20
- import be from "../CloseIcon/CloseButton.vue.js";
21
- import { useHostCloseLabel as xe } from "./hostCloseLabel.js";
22
- import { useOffCanvasStack as Se } from "./useOffCanvasStack.js";
23
- import { createVelocityTracker as Ce, pickStop as we, resolveSnapPoints as Te, rubberBand as Ee, stopIndexOf as De } from "./sheetSnap.js";
24
- import { registerTopLayerHost as Oe } from "../../composables/useTopLayer.js";
25
- import { useBodyScrollLock as ke } from "../../composables/useBodyScrollLock.js";
26
- import { BB_OFF_CANVAS_PT as Ae } from "./types.js";
27
- import { useKeyboardInset as je } from "../../composables/useKeyboardInset.js";
28
- import { useRefusedCloseAnnouncement as Me } from "../../composables/useRefusedCloseAnnouncement.js";
29
- import { isOverlayStandIn as Ne, rootElementOf as Pe, routeNativeCommand as Fe, useOverlayHost as Ie } from "../../composables/overlayRegistry.js";
30
- import { Fragment as Le, computed as a, createBlock as Re, createCommentVNode as o, createElementBlock as s, createElementVNode as ze, createTextVNode as Be, defineComponent as Ve, getCurrentInstance as He, mergeModels as c, mergeProps as l, nextTick as Ue, onBeforeUnmount as We, onDeactivated as Ge, onMounted as Ke, openBlock as u, ref as d, renderSlot as f, toDisplayString as qe, toHandlers as Je, unref as p, useAttrs as Ye, useModel as Xe, useSlots as Ze, watch as m, withModifiers as Qe } from "vue";
31
- import { useSwipe as $e } from "@vueuse/core";
4
+ import { hydrationGate as r } from "../../composables/useHydrated.js";
5
+ import { registerStandInClose as ee, useOverlayNavigation as te } from "../../composables/useOverlayNavigation.js";
6
+ import { useId as ne } from "../../composables/useId.js";
7
+ import { escapeStackDepth as re, insertEscapeEntry as ie, isTopEscapeEntry as ae, pushEscapeEntry as oe, removeEscapeEntry as se } from "../../utils/overlayEscapeStack.js";
8
+ import { useUntil as ce } from "../../composables/useUntil.js";
9
+ import { removedPropsFor as le } from "../../deprecation/removedProps.js";
10
+ import { warnRemovedAttrs as ue } from "../../utilities/functions/warnRemovedAttrs.js";
11
+ import { transitions as de } from "../../utilities/misc/transitions.js";
12
+ import { overlaySurfaceIsolation as fe } from "../../utils/overlaySurfaceIsolation.js";
13
+ import { provideOverlaySubmitGuard as pe } from "../../composables/formSubmitLock.js";
14
+ import { useMobile as me } from "../../composables/useMobile.js";
15
+ import { wait as he } from "../../utilities/functions/wait.js";
16
+ import { firstFocusableMatch as ge } from "../../utils/focusVisibility.js";
17
+ import { useLocale as _e } from "../../composables/useLocale.js";
18
+ import { parseSize as ve } from "../../utilities/functions/parseSize.js";
19
+ import { viewportHeight as ye, viewportWidth as be } from "../../composables/useViewportWidth.js";
20
+ import { useBreakpoint as xe } from "../../composables/useBreakpoint.js";
21
+ import { animationsSettled as Se } from "../../utilities/functions/animationsSettled.js";
22
+ import Ce from "../CloseIcon/CloseButton.vue.js";
23
+ import { useHostCloseLabel as we } from "./hostCloseLabel.js";
24
+ import { useOffCanvasStack as Te } from "./useOffCanvasStack.js";
25
+ import { createVelocityTracker as Ee, pickStop as De, resolveSnapPoints as Oe, rubberBand as ke, stopIndexOf as Ae } from "./sheetSnap.js";
26
+ import { registerTopLayerHost as je } from "../../composables/useTopLayer.js";
27
+ import { useBodyScrollLock as Me } from "../../composables/useBodyScrollLock.js";
28
+ import { BB_OFF_CANVAS_PT as Ne } from "./types.js";
29
+ import { useKeyboardInset as Pe } from "../../composables/useKeyboardInset.js";
30
+ import { useRefusedCloseAnnouncement as Fe } from "../../composables/useRefusedCloseAnnouncement.js";
31
+ import { isOverlayStandIn as Ie, rootElementOf as Le, routeNativeCommand as Re, useOverlayHost as ze } from "../../composables/overlayRegistry.js";
32
+ import { Fragment as Be, computed as i, createBlock as Ve, createCommentVNode as a, createElementBlock as o, createElementVNode as He, createTextVNode as Ue, defineComponent as We, getCurrentInstance as Ge, mergeModels as s, mergeProps as c, nextTick as Ke, onBeforeUnmount as qe, onDeactivated as Je, onMounted as Ye, openBlock as l, ref as u, renderSlot as d, toDisplayString as Xe, toHandlers as Ze, unref as f, useAttrs as Qe, useModel as $e, useSlots as et, watch as p, withModifiers as tt } from "vue";
33
+ import { useSwipe as nt } from "@vueuse/core";
32
34
  //#region src/components/BbOffCanvas/BbOffCanvas.vue?vue&type=script&setup=true&lang.ts
33
- var et = [
35
+ var rt = [
34
36
  "id",
35
37
  "aria-describedby",
36
38
  "aria-labelledby",
37
39
  "inert"
38
- ], tt = { class: "bb-offcanvas__body-content" }, nt = [
40
+ ], it = { class: "bb-offcanvas__body-content" }, at = [
39
41
  "aria-label",
40
42
  "aria-valuemax",
41
43
  "aria-valuenow",
42
44
  "aria-valuetext"
43
- ], rt = {
45
+ ], ot = {
44
46
  "aria-live": "polite",
45
47
  class: "bb-sr-only"
46
- }, it = 4, at = 50, h = 8, ot = 500, st = "cubic-bezier(0.32, 0.72, 0, 1)", g = /*@__PURE__*/ Ve({
48
+ }, st = 4, ct = 50, lt = 8, m = 500, ut = "cubic-bezier(0.32, 0.72, 0, 1)", h = /*@__PURE__*/ We({
47
49
  inheritAttrs: !1,
48
50
  __name: "BbOffCanvas",
49
- props: /*@__PURE__*/ c({
51
+ props: /*@__PURE__*/ s({
50
52
  "pt:root": {},
51
53
  "pt:header": {},
52
54
  "pt:title": {},
@@ -93,7 +95,7 @@ var et = [
93
95
  hideClose: { type: Boolean },
94
96
  size: { default: "sm" },
95
97
  title: {},
96
- transitionDuration: { default: i.medium },
98
+ transitionDuration: { default: de.medium },
97
99
  side: { default: "left" }
98
100
  }, {
99
101
  modelValue: {
@@ -104,409 +106,409 @@ var et = [
104
106
  snap: {},
105
107
  snapModifiers: {}
106
108
  }),
107
- emits: /*@__PURE__*/ c([
109
+ emits: /*@__PURE__*/ s([
108
110
  "show",
109
111
  "hide",
110
112
  "shown",
111
113
  "hidden"
112
114
  ], ["update:modelValue", "update:snap"]),
113
- setup(i, { emit: Ve }) {
114
- let c = Xe(i, "modelValue"), g = Xe(i, "snap"), _ = i, ct = Ve, lt = Ze(), ut = He(), dt = Ne(), v = Ie("offCanvas", {
115
- id: () => _.id,
116
- model: c,
117
- element: () => Pe(ut),
118
- enabled: !dt,
119
- defaultData: () => _.defaultData
115
+ setup(de, { emit: We }) {
116
+ let s = $e(de, "modelValue"), h = $e(de, "snap"), g = de, dt = We, ft = et(), pt = Ge(), mt = Ie(), _ = ze("offCanvas", {
117
+ id: () => g.id,
118
+ model: s,
119
+ element: () => Le(pt),
120
+ enabled: !mt,
121
+ defaultData: () => g.defaultData
120
122
  });
121
- dt ? r(() => Ut("escape")) : _.navigation && v.onDemand && process.env.NODE_ENV !== "production" && e().warn("BbOffCanvas: `navigation` is ignored on a panel opened on demand: it has no place in the page URL. For a URL panel, render the wrapper in the page and open it by id."), ee({
123
+ mt ? ee(() => Gt("escape")) : g.navigation && _.onDemand && process.env.NODE_ENV !== "production" && e().warn("BbOffCanvas: `navigation` is ignored on a panel opened on demand: it has no place in the page URL. For a URL panel, render the wrapper in the page and open it by id."), te({
122
124
  component: "BbOffCanvas",
123
- enabled: () => !!_.navigation && !dt && !v.onDemand,
124
- key: () => _.queryKey,
125
- replace: () => !!_.replace,
126
- id: () => _.id,
127
- model: c,
128
- requestClose: () => Ut("escape")
125
+ enabled: () => !!g.navigation && !mt && !_.onDemand,
126
+ key: () => g.queryKey,
127
+ replace: () => !!g.replace,
128
+ id: () => g.id,
129
+ model: s,
130
+ requestClose: () => Gt("escape")
129
131
  });
130
- let ft = Ye(), y = t({
132
+ let ht = Qe(), v = t({
131
133
  component: "BbOffCanvas",
132
- attrs: ft,
133
- props: _,
134
- parts: Ae.parts,
135
- states: Ae.states,
134
+ attrs: ht,
135
+ props: g,
136
+ parts: Ne.parts,
137
+ states: Ne.states,
136
138
  active: {
137
- open: () => c.value,
138
- fullscreen: () => Jt.value
139
+ open: () => s.value,
140
+ fullscreen: () => Yt.value
139
141
  }
140
- }), pt = a(() => l({
142
+ }), gt = i(() => c({
141
143
  class: "bb-offcanvas__close",
142
144
  onClick: j
143
- }, y.close)), mt = n();
144
- process.env.NODE_ENV !== "production" && le("BbOffCanvas", ce("BbOffCanvas"));
145
- let { t: b } = me(), ht = xe(), gt = a(() => ht() ?? b("offCanvas.closeLabel").value), _t = () => !!_.title || !!lt.title, vt = () => _t() || !!lt.header || Tt(), yt = de(), bt = a(() => _.preventClose ?? (yt() || v.completing.value)), x = a(() => bt.value || !!_.persistent), xt = () => typeof document < "u", S = d(null), C = je({
146
- active: () => c.value,
147
- container: () => S.value
148
- }), St = se(() => c.value || _.eager, { initialValue: c.value || _.eager }), Ct = a(() => !!_.eager || c.value || D.value), w = d(0);
149
- m(c, (e, t) => {
150
- e && !t && !_.eager && w.value++;
145
+ }, v.close)), _t = n();
146
+ process.env.NODE_ENV !== "production" && ue("BbOffCanvas", le("BbOffCanvas"));
147
+ let { t: y } = _e(), vt = we(), yt = i(() => vt() ?? y("offCanvas.closeLabel").value), bt = () => !!g.title || !!ft.title, xt = () => bt() || !!ft.header || Ot(), St = pe(), Ct = i(() => g.preventClose ?? (St() || _.completing.value)), b = i(() => Ct.value || !!g.persistent), wt = () => typeof document < "u", x = u(null), S = Pe({
148
+ active: () => s.value,
149
+ container: () => x.value
150
+ }), Tt = ce(() => s.value || g.eager, { initialValue: s.value || g.eager }), Et = i(() => !!g.eager || s.value || E.value), C = u(0);
151
+ p(s, (e, t) => {
152
+ e && !t && !g.eager && C.value++;
151
153
  }, { flush: "sync" });
152
- let T = `title_${te().id.value}`, wt = `desc_${te().id.value}`, Tt = () => !!_.description || !!lt.description, E = d(0), D = d(!1);
153
- ke(D);
154
- let Et = d(null), Dt = () => {
155
- Et.value = null;
156
- }, Ot = (e) => {
157
- Et.value = {
154
+ let w = `title_${ne().id.value}`, Dt = `desc_${ne().id.value}`, Ot = () => !!g.description || !!ft.description, T = u(0), E = u(!1);
155
+ Me(E);
156
+ let kt = u(null), At = () => {
157
+ kt.value = null;
158
+ }, jt = (e) => {
159
+ kt.value = {
158
160
  startX: e.clientX,
159
161
  startY: e.clientY,
160
162
  startedOnBackdrop: e.target === e.currentTarget
161
163
  };
162
- }, kt = (e) => {
163
- let t = Et.value;
164
- Dt(), !(t && !t.startedOnBackdrop) && (t && (Math.abs(e.clientX - t.startX) > it || Math.abs(e.clientY - t.startY) > it) || Ht(e, "backdrop"));
165
- }, At, jt = Me(() => b("dialog.closeRefused").value), O = (e) => {
166
- jt.announce(), clearTimeout(At), Gt.value = !0, At = setTimeout(() => {
167
- Gt.value = !1;
164
+ }, Mt = (e) => {
165
+ let t = kt.value;
166
+ At(), !(t && !t.startedOnBackdrop) && (t && (Math.abs(e.clientX - t.startX) > st || Math.abs(e.clientY - t.startY) > st) || Wt(e, "backdrop"));
167
+ }, Nt, Pt = Fe(() => y("dialog.closeRefused").value), D = (e) => {
168
+ Pt.announce(), clearTimeout(Nt), qt.value = !0, Nt = setTimeout(() => {
169
+ qt.value = !1;
168
170
  }, e);
169
- }, Mt = Symbol("bb-off-canvas-escape"), Nt = ne(), Pt = !1, Ft = () => {
170
- let e = { element: () => S.value };
171
- Pt ? re(Mt, Nt, e) : ae(Mt, e), xt() && document.addEventListener("keydown", Rt, { capture: !0 });
172
- }, It = () => {
173
- oe(Mt), xt() && document.removeEventListener("keydown", Rt, { capture: !0 });
174
- }, Lt = () => {
175
- if (!_.focusTarget) return;
176
- let e = S.value?.querySelector(_.focusTarget);
177
- e instanceof HTMLElement && e.focus();
178
- }, Rt = (e) => {
179
- if (e.key === "Escape" && !un.value && ie(Mt) && (e.stopImmediatePropagation(), x.value)) return e.preventDefault(), O(200), !1;
180
- }, k = null, zt = async (e) => {
171
+ }, O = Symbol("bb-off-canvas-escape"), Ft = re(), It = !1, Lt = () => {
172
+ let e = { element: () => x.value };
173
+ It ? ie(O, Ft, e) : oe(O, e), wt() && document.addEventListener("keydown", Bt, { capture: !0 });
174
+ }, Rt = () => {
175
+ se(O), wt() && document.removeEventListener("keydown", Bt, { capture: !0 });
176
+ }, zt = () => {
177
+ g.focusTarget && ge(x.value, g.focusTarget)?.focus();
178
+ }, Bt = (e) => {
179
+ if (e.key === "Escape" && !fn.value && ae(O) && (e.stopImmediatePropagation(), b.value)) return e.preventDefault(), D(200), !1;
180
+ }, k = null, Vt = async (e) => {
181
181
  if (e) {
182
- ct("show"), E.value++, Ft(), await Ue(), D.value = !0, S.value && !S.value.open && S.value.showModal(), cn(), S.value && (k = Oe(S.value)), Lt();
183
- let e = E.value;
184
- await pe(_.transitionDuration), await ye(S.value), e === E.value && c.value && ct("shown");
182
+ N.value = M(g.side), dt("show"), T.value++, Lt(), await Ke(), E.value = !0, x.value && !x.value.open && x.value.showModal(), un(), x.value && (k = je(x.value)), zt();
183
+ let e = T.value;
184
+ await he(g.transitionDuration), await Se(x.value), e === T.value && s.value && dt("shown");
185
185
  } else {
186
- ct("hide", v.closingResult()), ln();
187
- let e = E.value;
188
- if (await pe(_.transitionDuration), e !== E.value) return;
189
- It(), S.value?.close(), k?.(), k = null, D.value = !1, B = !1, vn.value = !1, En(), v.afterHidden(), ct("hidden");
186
+ dt("hide", _.closingResult()), dn();
187
+ let e = T.value;
188
+ if (await he(g.transitionDuration), e !== T.value) return;
189
+ Rt(), x.value?.close(), k?.(), k = null, E.value = !1, V = !1, bn.value = !1, kn(), _.afterHidden(), dt("hidden");
190
190
  }
191
- }, Bt = () => {
192
- process.env.NODE_ENV !== "production" && (!lt.header || _.title || (ft["aria-labelledby"] ?? Ue(() => {
193
- !S.value || document.getElementById(T) || e().warn(`BbOffCanvas: the #header slot does not contain an element with id="${T}", so aria-labelledby points at nothing and the panel announces as unnamed. Bind the slot's \`titleId\` to your heading: <template #header="{ titleId }"><h2 :id="titleId">…</h2></template>.`);
191
+ }, Ht = () => {
192
+ process.env.NODE_ENV !== "production" && (!ft.header || g.title || (ht["aria-labelledby"] ?? Ke(() => {
193
+ !x.value || document.getElementById(w) || e().warn(`BbOffCanvas: the #header slot does not contain an element with id="${w}", so aria-labelledby points at nothing and the panel announces as unnamed. Bind the slot's \`titleId\` to your heading: <template #header="{ titleId }"><h2 :id="titleId">…</h2></template>.`);
194
194
  })));
195
195
  };
196
- m(c, zt), Ke(() => {
197
- c.value && (Pt = !0, zt(!0), Pt = !1);
198
- }), m(St, (e) => {
199
- e && Bt();
196
+ p(s, Vt), Ye(() => {
197
+ s.value && (It = !0, Vt(!0), It = !1);
198
+ }), p(Tt, (e) => {
199
+ e && Ht();
200
200
  }, {
201
201
  immediate: !0,
202
202
  flush: "post"
203
- }), We(() => {
204
- clearTimeout(At), It(), R.value?.removeEventListener("scroll", bn), V?.disconnect(), V = null, ln(), S.value?.open && S.value.close(), k?.(), k = null;
203
+ }), qe(() => {
204
+ clearTimeout(Nt), Rt(), z.value?.removeEventListener("scroll", Cn), H?.disconnect(), H = null, dn(), x.value?.open && x.value.close(), k?.(), k = null;
205
205
  });
206
- let Vt = a(() => {
207
- if (Jt.value) return "100%";
208
- let e = qt(_.size);
209
- return e === "auto" ? "fit-content" : he(e, mt.offCanvasDefaultSizes);
210
- }), Ht = (e, t = "escape") => {
211
- if (e.preventDefault(), !Ut(t)) return !1;
212
- }, Ut = (e) => x.value ? (O(300), !1) : (A(e), !0), A = (e) => {
213
- v.record(e), c.value = !1;
206
+ let Ut = i(() => {
207
+ if (Yt.value) return "100%";
208
+ let e = M(g.size);
209
+ return e === "auto" ? "fit-content" : ve(e, _t.offCanvasDefaultSizes);
210
+ }), Wt = (e, t = "escape") => {
211
+ if (e.preventDefault(), !Gt(t)) return !1;
212
+ }, Gt = (e) => b.value ? (D(300), !1) : (A(e), !0), A = (e) => {
213
+ _.record(e), s.value = !1;
214
214
  }, j = () => {
215
- if (bt.value) {
216
- O(300);
215
+ if (Ct.value) {
216
+ D(300);
217
217
  return;
218
218
  }
219
219
  A("close");
220
- }, Wt = (e) => Fe(e, {
221
- show: v.show,
220
+ }, Kt = (e) => Re(e, {
221
+ show: _.show,
222
222
  close: j,
223
- open: () => c.value
224
- }), Gt = d(!1), { isMobile: Kt } = fe(), { resolve: qt } = ve(), Jt = a(() => _.fullscreen === !0 || _.fullscreen === "mobile" && Kt.value), M = Symbol("bb-offcanvas"), { stacks: Yt, push: Xt, setSize: Zt, remove: Qt, offset: $t, openOrder: N, registerOpen: en, deregisterOpen: tn } = Se(), P = a(() => _.side === "left" || _.side === "right" ? "x" : "y"), F = a(() => _.side === "right" || _.side === "bottom" ? 1 : -1), nn = `bb-offcanvas-${te().id.value}`, I = a(() => _.stack || nn), L = null, rn = () => {
225
- let e = S.value?.getBoundingClientRect();
226
- return e ? P.value === "x" ? e.width : e.height : 0;
227
- }, an = null, on = () => {
228
- typeof ResizeObserver > "u" || !S.value || (an = new ResizeObserver(() => {
229
- L !== null && Zt(L, M, rn());
230
- }), an.observe(S.value));
231
- }, sn = () => {
232
- an?.disconnect(), an = null;
233
- }, cn = () => {
234
- L = I.value, Xt(L, M, _.side, rn(), _.stackGap), en(M), on();
223
+ open: () => s.value
224
+ }), qt = u(!1), { isMobile: Jt } = me(), { resolve: M } = xe(), N = u(M(g.side));
225
+ p(() => JSON.stringify(g.side), () => N.value = M(g.side)), p(r, () => N.value = M(g.side));
226
+ let Yt = i(() => g.fullscreen === !0 || g.fullscreen === "mobile" && Jt.value), P = Symbol("bb-offcanvas"), { stacks: Xt, push: Zt, setSize: Qt, remove: $t, offset: en, openOrder: tn, registerOpen: nn, deregisterOpen: rn } = Te(), F = i(() => N.value === "left" || N.value === "right" ? "x" : "y"), I = i(() => N.value === "right" || N.value === "bottom" ? 1 : -1), an = `bb-offcanvas-${ne().id.value}`, L = i(() => g.stack || an), R = null, on = () => {
227
+ let e = x.value?.getBoundingClientRect();
228
+ return e ? F.value === "x" ? e.width : e.height : 0;
229
+ }, sn = null, cn = () => {
230
+ typeof ResizeObserver > "u" || !x.value || (sn = new ResizeObserver(() => {
231
+ R !== null && Qt(R, P, on());
232
+ }), sn.observe(x.value));
235
233
  }, ln = () => {
236
- sn(), tn(M), L !== null && (Qt(L, M), L = null);
237
- }, un = a(() => {
238
- let e = N.value.indexOf(M);
239
- return D.value && e !== -1 && e < N.value.length - 1;
240
- }), dn = d(!1);
241
- m(() => N.value.indexOf(M), (e) => {
242
- e !== -1 && (dn.value = e > 0);
234
+ sn?.disconnect(), sn = null;
235
+ }, un = () => {
236
+ R = L.value, Zt(R, P, N.value, on(), g.stackGap), nn(P), cn();
237
+ }, dn = () => {
238
+ ln(), rn(P), R !== null && ($t(R, P), R = null);
239
+ }, fn = i(() => {
240
+ let e = tn.value.indexOf(P);
241
+ return E.value && e !== -1 && e < tn.value.length - 1;
242
+ }), pn = u(!1);
243
+ p(() => tn.value.indexOf(P), (e) => {
244
+ e !== -1 && (pn.value = e > 0);
243
245
  }, { immediate: !0 });
244
- let fn = a(() => {
245
- let e = N.value.indexOf(M);
246
- return e === -1 ? D.value && dn.value : e > 0;
246
+ let mn = i(() => {
247
+ let e = tn.value.indexOf(P);
248
+ return e === -1 ? E.value && pn.value : e > 0;
247
249
  });
248
- m([
249
- I,
250
- () => _.side,
251
- () => _.stackGap
250
+ p([
251
+ L,
252
+ () => N.value,
253
+ () => g.stackGap
252
254
  ], ([e]) => {
253
- L !== null && (Qt(L, M), L = e, Xt(e, M, _.side, rn(), _.stackGap));
255
+ R !== null && ($t(R, P), R = e, Zt(e, P, N.value, on(), g.stackGap));
254
256
  });
255
- let pn = a(() => Kt.value ? 14 : 20), mn = a(() => {
256
- Yt.value;
257
- let e = P.value === "x" ? _e.value : ge.value, t = $t(I.value, M, e, pn.value);
257
+ let hn = i(() => Jt.value ? 14 : 20), gn = i(() => {
258
+ Xt.value;
259
+ let e = F.value === "x" ? be.value : ye.value, t = en(L.value, P, e, hn.value);
258
260
  return {
259
- [P.value === "x" ? "--stack-x" : "--stack-y"]: `${-F.value * t}px`,
261
+ [F.value === "x" ? "--stack-x" : "--stack-y"]: `${-I.value * t}px`,
260
262
  "--stack-fill": `${t}px`
261
263
  };
262
- }), hn = d(!1), gn = 0, _n = () => {
263
- let e = Yt.value[I.value];
264
+ }), _n = u(!1), vn = 0, yn = () => {
265
+ let e = Xt.value[L.value];
264
266
  if (!e) return !1;
265
- let t = e.filter((e) => e.direction === _.side), n = t.findIndex((e) => e.id === M);
267
+ let t = e.filter((e) => e.direction === N.value), n = t.findIndex((e) => e.id === P);
266
268
  return n !== -1 && n !== t.length - 1;
267
269
  };
268
- m(() => Yt.value[I.value], (e) => {
269
- let t = e?.length ?? 0, n = t > 0 && t === gn;
270
- gn = t, hn.value = n && _n(), hn.value && Ue(() => hn.value = !1);
270
+ p(() => Xt.value[L.value], (e) => {
271
+ let t = e?.length ?? 0, n = t > 0 && t === vn;
272
+ vn = t, _n.value = n && yn(), _n.value && Ke(() => _n.value = !1);
271
273
  });
272
- let R = d(null), z = d(!1), vn = d(!1), B = !1, V = null, yn = !1, H = !1, U = !1, W = !1, G = () => {
273
- R.value?.style.removeProperty("touch-action");
274
- }, bn = () => G();
275
- m(R, (e, t) => {
276
- t?.removeEventListener("scroll", bn), V?.disconnect(), V = null, e && (e.addEventListener("scroll", bn, { passive: !0 }), typeof ResizeObserver < "u" && (V = new ResizeObserver(() => G()), V.observe(e)), G());
277
- }, { flush: "post" }), m([
278
- () => _.draggable,
279
- () => _.side,
280
- D
274
+ let z = u(null), B = u(!1), bn = u(!1), V = !1, H = null, xn = !1, U = !1, Sn = !1, W = !1, G = () => {
275
+ z.value?.style.removeProperty("touch-action");
276
+ }, Cn = () => G();
277
+ p(z, (e, t) => {
278
+ t?.removeEventListener("scroll", Cn), H?.disconnect(), H = null, e && (e.addEventListener("scroll", Cn, { passive: !0 }), typeof ResizeObserver < "u" && (H = new ResizeObserver(() => G()), H.observe(e)), G());
279
+ }, { flush: "post" }), p([
280
+ () => g.draggable,
281
+ () => N.value,
282
+ E
281
283
  ], () => G());
282
- let xn = () => P.value === "y" ? F.value === 1 ? -Nn.value : Nn.value : F.value === 1 ? -Mn.value : Mn.value, Sn = () => {
283
- S.value && (S.value.style.transition = "none"), R.value && P.value === "y" && (R.value.style.touchAction = "none");
284
- }, Cn = (e) => {
285
- let t = S.value;
284
+ let wn = () => F.value === "y" ? I.value === 1 ? -In.value : In.value : I.value === 1 ? -Fn.value : Fn.value, Tn = () => {
285
+ x.value && (x.value.style.transition = "none"), z.value && F.value === "y" && (z.value.style.touchAction = "none");
286
+ }, En = (e) => {
287
+ let t = x.value;
286
288
  if (!t) return;
287
- let n = e > 0 ? e * F.value : 0;
288
- t.style.transform = P.value === "x" ? `translate3d(${n}px, 0, 0)` : `translate3d(0, ${n}px, 0)`;
289
- }, wn = () => {
290
- let e = S.value;
291
- e && (e.style.transform = _.side === "bottom" ? "translate3d(0, 100%, 0)" : _.side === "top" ? "translate3d(0, -100%, 0)" : _.side === "left" ? "translate3d(-100%, 0, 0)" : "translate3d(100%, 0, 0)");
292
- }, Tn = (e) => {
293
- let t = S.value;
289
+ let n = e > 0 ? e * I.value : 0;
290
+ t.style.transform = F.value === "x" ? `translate3d(${n}px, 0, 0)` : `translate3d(0, ${n}px, 0)`;
291
+ }, Dn = () => {
292
+ let e = x.value;
293
+ e && (e.style.transform = N.value === "bottom" ? "translate3d(0, 100%, 0)" : N.value === "top" ? "translate3d(0, -100%, 0)" : N.value === "left" ? "translate3d(-100%, 0, 0)" : "translate3d(100%, 0, 0)");
294
+ }, On = (e) => {
295
+ let t = x.value;
294
296
  if (t) {
295
297
  if (e) {
296
- t.style.transition = `transform ${ot}ms ${st}`, t.style.transform = "translate3d(0, 0, 0)", window.setTimeout(() => {
297
- !t.isConnected || B || (t.style.removeProperty("transform"), t.style.removeProperty("transition"), G());
298
- }, ot);
298
+ t.style.transition = `transform ${m}ms ${ut}`, t.style.transform = "translate3d(0, 0, 0)", window.setTimeout(() => {
299
+ !t.isConnected || V || (t.style.removeProperty("transform"), t.style.removeProperty("transition"), G());
300
+ }, m);
299
301
  return;
300
302
  }
301
303
  t.style.transition = "", G();
302
304
  }
303
- }, En = () => {
304
- let e = S.value;
305
- e && (B || (e.style.removeProperty("transition"), e.style.removeProperty("transform")));
306
- }, Dn = async () => {
307
- let e = S.value;
305
+ }, kn = () => {
306
+ let e = x.value;
307
+ e && (V || (e.style.removeProperty("transition"), e.style.removeProperty("transform")));
308
+ }, An = async () => {
309
+ let e = x.value;
308
310
  if (!e) {
309
311
  A("swipe");
310
312
  return;
311
313
  }
312
- if (B = !0, vn.value = !0, e.style.transition = `transform ${ot}ms ${st}`, wn(), await pe(ot), !c.value) {
313
- B = !1, vn.value = !1, e.style.removeProperty("transform"), e.style.removeProperty("transition"), G();
314
+ if (V = !0, bn.value = !0, e.style.transition = `transform ${m}ms ${ut}`, Dn(), await he(m), !s.value) {
315
+ V = !1, bn.value = !1, e.style.removeProperty("transform"), e.style.removeProperty("transition"), G();
314
316
  return;
315
317
  }
316
- e.style.transition = "none", wn(), A("swipe");
317
- }, On = (e) => {
318
+ e.style.transition = "none", Dn(), A("swipe");
319
+ }, jn = (e) => {
318
320
  let { overflowY: t } = getComputedStyle(e);
319
321
  return t !== "auto" && t !== "scroll" ? !1 : e.scrollHeight > e.clientHeight + 1;
320
- }, kn = (e) => F.value === 1 ? e.scrollTop <= 1 : e.scrollTop + e.clientHeight >= e.scrollHeight - 1, An = (e) => {
321
- let t = S.value;
322
+ }, Mn = (e) => I.value === 1 ? e.scrollTop <= 1 : e.scrollTop + e.clientHeight >= e.scrollHeight - 1, Nn = (e) => {
323
+ let t = x.value;
322
324
  if (!t) return !1;
323
325
  let n = e;
324
326
  for (; n && n !== t;) {
325
- if (n instanceof HTMLElement && On(n) && !kn(n)) return !0;
327
+ if (n instanceof HTMLElement && jn(n) && !Mn(n)) return !0;
326
328
  n = n.parentElement;
327
329
  }
328
330
  return !1;
329
- }, jn = () => {
330
- yn = !1, H = !1, U = !1, W = !1, z.value = !1;
331
- }, { lengthX: Mn, lengthY: Nn } = $e(S, {
332
- threshold: h,
331
+ }, Pn = () => {
332
+ xn = !1, U = !1, Sn = !1, W = !1, B.value = !1;
333
+ }, { lengthX: Fn, lengthY: In } = nt(x, {
334
+ threshold: lt,
333
335
  passive: !1,
334
336
  onSwipeStart: (e) => {
335
- if (jn(), !_.draggable || !D.value || e.target === S.value) return;
337
+ if (Pn(), !g.draggable || !E.value || e.target === x.value) return;
336
338
  let t = e.target;
337
- t instanceof Element && (t.closest("[data-bb-no-drag]") || (yn = !0, H = !!t.closest(".bb-offcanvas__content"), W = H && !zn() && An(t), K.value && or()));
339
+ t instanceof Element && (t.closest("[data-bb-no-drag]") || (xn = !0, U = !!t.closest(".bb-offcanvas__content"), W = U && !Hn() && Nn(t), K.value && lr()));
338
340
  },
339
341
  onSwipe: (e) => {
340
- if (!yn || !_.draggable || W) return;
342
+ if (!xn || !g.draggable || W) return;
341
343
  if (K.value) {
342
- ur(e);
344
+ pr(e);
343
345
  return;
344
346
  }
345
- let t = xn();
346
- if (!U) {
347
- if (H && t < -8) {
347
+ let t = wn();
348
+ if (!Sn) {
349
+ if (U && t < -8) {
348
350
  W = !0;
349
351
  return;
350
352
  }
351
- if (t < h) return;
352
- U = !0, z.value = !0, Sn();
353
+ if (t < lt) return;
354
+ Sn = !0, B.value = !0, Tn();
353
355
  }
354
- e.preventDefault(), Cn(t);
356
+ e.preventDefault(), En(t);
355
357
  },
356
358
  onSwipeEnd: (e) => {
357
359
  if (K.value) {
358
- fr(e.timeStamp);
360
+ hr(e.timeStamp);
359
361
  return;
360
362
  }
361
- if (!U) {
362
- jn();
363
+ if (!Sn) {
364
+ Pn();
363
365
  return;
364
366
  }
365
- let t = xn();
366
- if (jn(), t >= at && !x.value) {
367
- Dn();
367
+ let t = wn();
368
+ if (Pn(), t >= ct && !b.value) {
369
+ An();
368
370
  return;
369
371
  }
370
- Tn(!0), t >= at && O(300);
372
+ On(!0), t >= ct && D(300);
371
373
  }
372
- }), K = a(() => _.side === "bottom" && _.draggable && !Jt.value && !!_.snapPoints?.length), Pn = d(0), Fn = () => {
373
- if (!xt()) return;
374
+ }), K = i(() => N.value === "bottom" && g.draggable && !Yt.value && !!g.snapPoints?.length), Ln = u(0), Rn = () => {
375
+ if (!wt()) return;
374
376
  let e = document.createElement("div");
375
- e.style.cssText = "position:fixed;visibility:hidden;height:env(safe-area-inset-top,0px)", document.body.append(e), Pn.value = e.getBoundingClientRect().height, e.remove();
376
- }, q = a(() => Math.max(0, ge.value - C.value - Pn.value - pn.value)), In = /* @__PURE__ */ new Set(), J = a(() => K.value ? Te(_.snapPoints, q.value, (t) => {
377
- process.env.NODE_ENV !== "production" && (In.has(t) || (In.add(t), e().warn(`BbOffCanvas: snap point ${JSON.stringify(t)} is not a stop. Use a fraction of the screen in (0, 1] or a pixel height like '240px'.`)));
378
- }) : []), Y = d(0), Ln = a(() => J.value[J.value.length - 1]?.height ?? 0), Rn = (e) => Ln.value - (J.value[e]?.height ?? 0), zn = () => K.value && Y.value < J.value.length - 1, Bn = () => {
379
- let e = De(J.value, g.value);
377
+ e.style.cssText = "position:fixed;visibility:hidden;height:env(safe-area-inset-top,0px)", document.body.append(e), Ln.value = e.getBoundingClientRect().height, e.remove();
378
+ }, q = i(() => Math.max(0, ye.value - S.value - Ln.value - hn.value)), zn = /* @__PURE__ */ new Set(), J = i(() => K.value ? Oe(g.snapPoints, q.value, (t) => {
379
+ process.env.NODE_ENV !== "production" && (zn.has(t) || (zn.add(t), e().warn(`BbOffCanvas: snap point ${JSON.stringify(t)} is not a stop. Use a fraction of the screen in (0, 1] or a pixel height like '240px'.`)));
380
+ }) : []), Y = u(0), Bn = i(() => J.value[J.value.length - 1]?.height ?? 0), Vn = (e) => Bn.value - (J.value[e]?.height ?? 0), Hn = () => K.value && Y.value < J.value.length - 1, Un = () => {
381
+ let e = Ae(J.value, h.value);
380
382
  if (e !== -1) return e;
381
- if (g.value !== void 0) {
382
- let [e] = Te([g.value], q.value), t = e ? J.value.findIndex((t) => Math.abs(t.height - e.height) < 1) : -1;
383
+ if (h.value !== void 0) {
384
+ let [e] = Oe([h.value], q.value), t = e ? J.value.findIndex((t) => Math.abs(t.height - e.height) < 1) : -1;
383
385
  if (t !== -1) return t;
384
386
  }
385
387
  return 0;
386
- }, X = d(null), Vn = (e) => {
387
- S.value?.style.setProperty("--snap-y", `${e}px`);
388
- }, Hn = () => parseFloat(S.value?.style.getPropertyValue("--snap-y") || "0") || 0, Z, Un = 0, Wn = (e) => {
389
- clearTimeout(Z), Y.value = e, X.value = "instant", Vn(Rn(e)), cancelAnimationFrame(Un), Un = requestAnimationFrame(() => {
388
+ }, X = u(null), Wn = (e) => {
389
+ x.value?.style.setProperty("--snap-y", `${e}px`);
390
+ }, Gn = () => parseFloat(x.value?.style.getPropertyValue("--snap-y") || "0") || 0, Z, Kn = 0, qn = (e) => {
391
+ clearTimeout(Z), Y.value = e, X.value = "instant", Wn(Vn(e)), cancelAnimationFrame(Kn), Kn = requestAnimationFrame(() => {
390
392
  X.value === "instant" && (X.value = null);
391
393
  });
392
394
  }, Q = (e, { report: t = !0 } = {}) => {
393
395
  let n = J.value[e];
394
- n && (X.value === "settle" && Math.abs(sr() - Hn()) < 1 && Jn(), clearTimeout(Z), S.value?.removeEventListener("transitionend", Yn), Y.value = e, X.value = "settle", Vn(Rn(e)), Gn = t ? n.value : void 0, qn = t, S.value?.addEventListener("transitionend", Yn), Z = setTimeout(Jn, 550));
395
- }, Gn, Kn, qn = !1;
396
- function Jn() {
397
- clearTimeout(Z), S.value?.removeEventListener("transitionend", Yn), X.value === "settle" && (X.value = null), qn && g.value !== Gn && (Kn = Gn, g.value = Gn), qn = !1, G();
396
+ n && (X.value === "settle" && Math.abs(ur() - Gn()) < 1 && Zn(), clearTimeout(Z), x.value?.removeEventListener("transitionend", Qn), Y.value = e, X.value = "settle", Wn(Vn(e)), Jn = t ? n.value : void 0, Xn = t, x.value?.addEventListener("transitionend", Qn), Z = setTimeout(Zn, 550));
397
+ }, Jn, Yn, Xn = !1;
398
+ function Zn() {
399
+ clearTimeout(Z), x.value?.removeEventListener("transitionend", Qn), X.value === "settle" && (X.value = null), Xn && h.value !== Jn && (Yn = Jn, h.value = Jn), Xn = !1, G();
398
400
  }
399
- function Yn(e) {
400
- e.target !== S.value || e.propertyName !== "translate" || Jn();
401
+ function Qn(e) {
402
+ e.target !== x.value || e.propertyName !== "translate" || Zn();
401
403
  }
402
- let Xn = () => {
403
- let e = ut?.vnode.props;
404
+ let $n = () => {
405
+ let e = pt?.vnode.props;
404
406
  return !!e && ("snap" in e || "onUpdate:snap" in e);
405
- }, Zn = () => {
406
- K.value && (Fn(), clearTimeout(Z), X.value = null, Y.value = Xn() ? Bn() : 0, Vn(Rn(Y.value)));
407
+ }, er = () => {
408
+ K.value && (Rn(), clearTimeout(Z), X.value = null, Y.value = $n() ? Un() : 0, Wn(Vn(Y.value)));
407
409
  };
408
- m(c, (e) => {
409
- e && Zn();
410
- }), Ke(() => {
411
- c.value && Zn();
412
- }), m(g, (e) => {
413
- if (e !== void 0 && e === Kn) {
414
- Kn = void 0;
410
+ p(s, (e) => {
411
+ e && er();
412
+ }), Ye(() => {
413
+ s.value && er();
414
+ }), p(h, (e) => {
415
+ if (e !== void 0 && e === Yn) {
416
+ Yn = void 0;
415
417
  return;
416
418
  }
417
- if (Kn = void 0, !c.value || !K.value || X.value === "drag") return;
418
- let t = Bn();
419
+ if (Yn = void 0, !s.value || !K.value || X.value === "drag") return;
420
+ let t = Un();
419
421
  (t !== Y.value || X.value === "settle") && Q(t, { report: !1 });
420
- }), m(() => J.value.map((e) => e.height).join(), () => {
421
- if (!c.value || !K.value || X.value === "drag") return;
422
+ }), p(() => J.value.map((e) => e.height).join(), () => {
423
+ if (!s.value || !K.value || X.value === "drag") return;
422
424
  let e = J.value.length - 1;
423
- Wn(Math.min(Y.value, Math.max(0, e)));
425
+ qn(Math.min(Y.value, Math.max(0, e)));
424
426
  });
425
- let Qn = null;
426
- m(() => C.value > 0, (e) => {
427
- if (!c.value || !K.value) return;
427
+ let tr = null;
428
+ p(() => S.value > 0, (e) => {
429
+ if (!s.value || !K.value) return;
428
430
  let t = J.value.length - 1;
429
- e && Y.value < t ? (Qn = Y.value, Q(t)) : !e && Qn !== null && (Y.value === t && Q(Qn), Qn = null);
431
+ e && Y.value < t ? (tr = Y.value, Q(t)) : !e && tr !== null && (Y.value === t && Q(tr), tr = null);
430
432
  });
431
- let $n = Ce(), er = 0, tr = 0, nr = 0, $ = !1, rr = !1, ir = () => Rn(0), ar = (e) => {
432
- let t = tr + e;
433
- if (t < 0) return -Ee(-t, q.value);
434
- let n = ir();
435
- return x.value && t > n ? n + Ee(t - n, q.value) : t;
436
- }, or = (e = 0) => {
437
- $n.reset(), $ = !1, rr = !1, er = Y.value, tr = Hn(), nr = e;
438
- }, sr = () => {
439
- let e = S.value;
433
+ let nr = Ee(), rr = 0, ir = 0, ar = 0, $ = !1, or = !1, sr = () => Vn(0), cr = (e) => {
434
+ let t = ir + e;
435
+ if (t < 0) return -ke(-t, q.value);
436
+ let n = sr();
437
+ return b.value && t > n ? n + ke(t - n, q.value) : t;
438
+ }, lr = (e = 0) => {
439
+ nr.reset(), $ = !1, or = !1, rr = Y.value, ir = Gn(), ar = e;
440
+ }, ur = () => {
441
+ let e = x.value;
440
442
  if (!e) return 0;
441
- let t = ge.value - C.value;
442
- return e.getBoundingClientRect().top - (t - Ln.value);
443
- }, cr = () => {
444
- X.value === "settle" && (tr = sr()), $ = !0, rr = !0, clearTimeout(Z), X.value = "drag", z.value = !0, R.value && (R.value.style.touchAction = "none");
445
- }, lr = (e, t) => {
446
- Vn(ar(e)), $n.add(t, -e);
447
- }, ur = (e) => {
448
- let t = -Nn.value;
443
+ let t = ye.value - S.value;
444
+ return e.getBoundingClientRect().top - (t - Bn.value);
445
+ }, dr = () => {
446
+ X.value === "settle" && (ir = ur()), $ = !0, or = !0, clearTimeout(Z), X.value = "drag", B.value = !0, z.value && (z.value.style.touchAction = "none");
447
+ }, fr = (e, t) => {
448
+ Wn(cr(e)), nr.add(t, -e);
449
+ }, pr = (e) => {
450
+ let t = -In.value;
449
451
  if (!$) {
450
- if (H && !zn() && t < -8) {
452
+ if (U && !Hn() && t < -8) {
451
453
  W = !0;
452
454
  return;
453
455
  }
454
- if (Math.abs(t) < h) return;
455
- if (Math.abs(Mn.value) > Math.abs(t)) {
456
- yn = !1;
456
+ if (Math.abs(t) < lt) return;
457
+ if (Math.abs(Fn.value) > Math.abs(t)) {
458
+ xn = !1;
457
459
  return;
458
460
  }
459
- cr();
461
+ dr();
460
462
  }
461
- e.preventDefault(), lr(t, e.timeStamp);
462
- }, dr = (e) => {
463
- let t = Hn(), n = J.value, r = we({
463
+ e.preventDefault(), fr(t, e.timeStamp);
464
+ }, mr = (e) => {
465
+ let t = Gn(), n = J.value, r = De({
464
466
  heights: n.map((e) => e.height),
465
- height: Ln.value - t,
466
- velocity: $n.velocity(e),
467
- startIndex: er
467
+ height: Bn.value - t,
468
+ velocity: nr.velocity(e),
469
+ startIndex: rr
468
470
  });
469
- if (z.value = !1, r === -1) {
470
- if (x.value) {
471
- O(300), Q(0);
471
+ if (B.value = !1, r === -1) {
472
+ if (b.value) {
473
+ D(300), Q(0);
472
474
  return;
473
475
  }
474
- X.value = null, Dn();
476
+ X.value = null, An();
475
477
  return;
476
478
  }
477
479
  Q(r);
478
- }, fr = (e) => {
480
+ }, hr = (e) => {
479
481
  let t = $;
480
- $ = !1, jn(), t && dr(e);
481
- }, pr = null, mr = (e) => {
482
+ $ = !1, Pn(), t && mr(e);
483
+ }, gr = null, _r = (e) => {
482
484
  if (!(e.pointerType === "touch" || e.button !== 0)) {
483
- pr = e.pointerId;
485
+ gr = e.pointerId;
484
486
  try {
485
487
  e.currentTarget.setPointerCapture(e.pointerId);
486
488
  } catch {}
487
- or(e.clientY);
489
+ lr(e.clientY);
488
490
  }
489
- }, hr = (e) => {
490
- if (e.pointerId !== pr) return;
491
- let t = e.clientY - nr;
491
+ }, vr = (e) => {
492
+ if (e.pointerId !== gr) return;
493
+ let t = e.clientY - ar;
492
494
  if (!$) {
493
- if (Math.abs(t) < h) return;
494
- cr();
495
+ if (Math.abs(t) < lt) return;
496
+ dr();
495
497
  }
496
- lr(t, e.timeStamp);
497
- }, gr = (e) => {
498
- if (e.pointerId !== pr) return;
499
- pr = null;
498
+ fr(t, e.timeStamp);
499
+ }, yr = (e) => {
500
+ if (e.pointerId !== gr) return;
501
+ gr = null;
500
502
  let t = $;
501
- $ = !1, t && dr(e.timeStamp);
502
- }, _r = () => {
503
- if (rr) {
504
- rr = !1;
503
+ $ = !1, t && mr(e.timeStamp);
504
+ }, br = () => {
505
+ if (or) {
506
+ or = !1;
505
507
  return;
506
508
  }
507
509
  let e = (Y.value + 1) % J.value.length;
508
510
  Q(e);
509
- }, vr = (e) => {
511
+ }, xr = (e) => {
510
512
  let t = J.value.length - 1, n = {
511
513
  ArrowUp: Y.value + 1,
512
514
  ArrowRight: Y.value + 1,
@@ -521,147 +523,147 @@ var et = [
521
523
  e.preventDefault();
522
524
  let r = Math.min(t, Math.max(0, n[e.key]));
523
525
  r !== Y.value && Q(r);
524
- }, yr = a(() => J.value.length > 1), br = a(() => {
526
+ }, Sr = i(() => J.value.length > 1), Cr = i(() => {
525
527
  let e = J.value.length, t = Y.value, n = J.value[t];
526
- return t === e - 1 && n && q.value - n.height < 1 ? b("offCanvas.snapFull").value : b("offCanvas.snapValue", t + 1, e).value;
527
- }), xr = (e) => {
528
- if (!zn() || X.value === "drag") return;
528
+ return t === e - 1 && n && q.value - n.height < 1 ? y("offCanvas.snapFull").value : y("offCanvas.snapValue", t + 1, e).value;
529
+ }), wr = (e) => {
530
+ if (!Hn() || X.value === "drag") return;
529
531
  let t = e.target;
530
532
  if (!(t instanceof HTMLElement) || !t.closest(".bb-offcanvas__content")) return;
531
- let n = (S.value?.querySelector(".bb-offcanvas__footer"))?.getBoundingClientRect().top ?? ge.value;
533
+ let n = (x.value?.querySelector(".bb-offcanvas__footer"))?.getBoundingClientRect().top ?? ye.value;
532
534
  t.getBoundingClientRect().bottom > n + 1 && Q(J.value.length - 1);
533
- }, Sr = a(() => K.value ? {
534
- "--snap-h": `${Ln.value}px`,
535
- "--snap-floor": `${ir()}px`
535
+ }, Tr = i(() => K.value ? {
536
+ "--snap-h": `${Bn.value}px`,
537
+ "--snap-floor": `${sr()}px`
536
538
  } : {});
537
- return We(() => {
538
- clearTimeout(Z), cancelAnimationFrame(Un);
539
- }), Ge(() => A("unmounted")), (e, t) => (u(), s("dialog", l({
540
- id: p(v).domId.value || void 0,
539
+ return qe(() => {
540
+ clearTimeout(Z), cancelAnimationFrame(Kn);
541
+ }), Je(() => A("unmounted")), (e, t) => (l(), o("dialog", c({
542
+ id: f(_).domId.value || void 0,
541
543
  ref_key: "dialog",
542
- ref: S,
543
- "aria-describedby": Ct.value && Tt() ? wt : void 0,
544
- "aria-labelledby": Ct.value && (_t() || e.$slots.header) ? T : void 0,
544
+ ref: x,
545
+ "aria-describedby": Et.value && Ot() ? Dt : void 0,
546
+ "aria-labelledby": Et.value && (bt() || e.$slots.header) ? w : void 0,
545
547
  class: ["bb-offcanvas", [{
546
- "bb-offcanvas--open": c.value,
547
- "bb-offcanvas--visible": D.value,
548
- "bb-offcanvas--fullscreen": Jt.value,
549
- "bb-offcanvas--deny-close": Gt.value,
550
- "bb-offcanvas--dragging": z.value,
551
- "bb-offcanvas--swipe-exit": vn.value,
552
- "bb-offcanvas--instant-stack": hn.value,
553
- "bb-offcanvas--covered": un.value,
554
- "bb-offcanvas--stacked": fn.value,
548
+ "bb-offcanvas--open": s.value,
549
+ "bb-offcanvas--visible": E.value,
550
+ "bb-offcanvas--fullscreen": Yt.value,
551
+ "bb-offcanvas--deny-close": qt.value,
552
+ "bb-offcanvas--dragging": B.value,
553
+ "bb-offcanvas--swipe-exit": bn.value,
554
+ "bb-offcanvas--instant-stack": _n.value,
555
+ "bb-offcanvas--covered": fn.value,
556
+ "bb-offcanvas--above": mn.value,
555
557
  "bb-offcanvas--has-handle": e.draggable,
556
- "bb-offcanvas--no-header": !vt(),
557
- "bb-offcanvas--keyboard": p(C) > 0,
558
+ "bb-offcanvas--no-header": !xt(),
559
+ "bb-offcanvas--keyboard": f(S) > 0,
558
560
  "bb-offcanvas--snap": K.value,
559
- "bb-offcanvas--snap-low": zn(),
561
+ "bb-offcanvas--snap-low": Hn(),
560
562
  "bb-offcanvas--snap-settling": X.value === "settle",
561
563
  "bb-offcanvas--snap-instant": X.value === "instant",
562
- [`bb-offcanvas--${_.side}`]: !0
564
+ [`bb-offcanvas--${N.value}`]: !0
563
565
  }].flat()],
564
- inert: !c.value && !D.value || un.value,
566
+ inert: !s.value && !E.value || fn.value,
565
567
  style: {
566
- "--max-size": Vt.value,
567
- "--transition-duration": `${_.transitionDuration}ms`,
568
- "--stack-gap": `${_.stackGap}px`,
569
- "--keyboard": `${p(C)}px`,
570
- ...mn.value,
571
- ...Sr.value
568
+ "--max-size": Ut.value,
569
+ "--transition-duration": `${g.transitionDuration}ms`,
570
+ "--stack-gap": `${g.stackGap}px`,
571
+ "--keyboard": `${f(S)}px`,
572
+ ...gn.value,
573
+ ...Tr.value
572
574
  }
573
- }, Je(p(ue), !0), {
574
- onCancel: Qe(Ht, ["self"]),
575
- onCommand: Wt,
576
- onClick: Qe(kt, ["self"]),
577
- onFocusin: xr,
578
- onPointercancel: Dt,
579
- onPointerdown: Ot
580
- }, p(y).rootAttrs), [
581
- Ct.value ? (u(), s(Le, { key: 0 }, [
582
- e.draggable && !yr.value ? (u(), s("div", {
583
- key: `body-1-${w.value}`,
575
+ }, Ze(f(fe), !0), {
576
+ onCancel: tt(Wt, ["self"]),
577
+ onCommand: Kt,
578
+ onClick: tt(Mt, ["self"]),
579
+ onFocusin: wr,
580
+ onPointercancel: At,
581
+ onPointerdown: jt
582
+ }, f(v).rootAttrs), [
583
+ Et.value ? (l(), o(Be, { key: 0 }, [
584
+ e.draggable && !Sr.value ? (l(), o("div", {
585
+ key: `body-1-${C.value}`,
584
586
  "aria-hidden": "true",
585
587
  class: "bb-offcanvas__handle"
586
- })) : o("", !0),
587
- vt() ? (u(), s("div", l({
588
- key: `body-2-${w.value}`,
588
+ })) : a("", !0),
589
+ xt() ? (l(), o("div", c({
590
+ key: `body-2-${C.value}`,
589
591
  class: "bb-offcanvas__header"
590
- }, p(y).header), [f(e.$slots, "header", {
592
+ }, f(v).header), [d(e.$slots, "header", {
591
593
  close: j,
592
- complete: p(v).complete,
593
- data: p(v).data.value,
594
- reset: p(v).reset,
594
+ complete: f(_).complete,
595
+ data: f(_).data.value,
596
+ reset: f(_).reset,
595
597
  title: e.title,
596
- titleId: T
598
+ titleId: w
597
599
  }, () => [
598
- _t() ? (u(), s("span", l({
600
+ bt() ? (l(), o("span", c({
599
601
  key: 0,
600
- id: T,
602
+ id: w,
601
603
  class: "bb-offcanvas__title"
602
- }, p(y).title), [f(e.$slots, "title", {
603
- data: p(v).data.value,
604
+ }, f(v).title), [d(e.$slots, "title", {
605
+ data: f(_).data.value,
604
606
  text: e.title
605
- }, () => [Be(qe(e.title), 1)])], 16)) : o("", !0),
606
- Tt() ? (u(), s("p", l({
607
+ }, () => [Ue(Xe(e.title), 1)])], 16)) : a("", !0),
608
+ Ot() ? (l(), o("p", c({
607
609
  key: 1,
608
- id: wt,
610
+ id: Dt,
609
611
  class: "bb-offcanvas__description"
610
- }, p(y).description), [f(e.$slots, "description", {
611
- data: p(v).data.value,
612
+ }, f(v).description), [d(e.$slots, "description", {
613
+ data: f(_).data.value,
612
614
  text: e.description
613
- }, () => [Be(qe(e.description), 1)])], 16)) : o("", !0),
614
- e.hideClose ? o("", !0) : (u(), Re(be, l({
615
+ }, () => [Ue(Xe(e.description), 1)])], 16)) : a("", !0),
616
+ e.hideClose ? a("", !0) : (l(), Ve(Ce, c({
615
617
  key: 2,
616
- "aria-label": gt.value
617
- }, pt.value), null, 16, ["aria-label"]))
618
- ])], 16)) : o("", !0),
619
- (u(), s("div", l({
620
- key: `body-3-${w.value}`,
618
+ "aria-label": yt.value
619
+ }, gt.value), null, 16, ["aria-label"]))
620
+ ])], 16)) : a("", !0),
621
+ (l(), o("div", c({
622
+ key: `body-3-${C.value}`,
621
623
  ref_key: "body",
622
- ref: R,
624
+ ref: z,
623
625
  class: "bb-offcanvas__content scrollbar-border"
624
- }, p(y).content), [ze("div", tt, [f(e.$slots, "default", {
626
+ }, f(v).content), [He("div", it, [d(e.$slots, "default", {
625
627
  close: j,
626
- complete: p(v).complete,
627
- data: p(v).data.value,
628
- reset: p(v).reset
629
- }), !vt() && !e.hideClose ? (u(), Re(be, l({
628
+ complete: f(_).complete,
629
+ data: f(_).data.value,
630
+ reset: f(_).reset
631
+ }), !xt() && !e.hideClose ? (l(), Ve(Ce, c({
630
632
  key: 0,
631
- "aria-label": gt.value
632
- }, pt.value), null, 16, ["aria-label"])) : o("", !0)])], 16)),
633
- (u(), s("div", l({
634
- key: `body-4-${w.value}`,
633
+ "aria-label": yt.value
634
+ }, gt.value), null, 16, ["aria-label"])) : a("", !0)])], 16)),
635
+ (l(), o("div", c({
636
+ key: `body-4-${C.value}`,
635
637
  class: "bb-offcanvas__footer"
636
- }, p(y).footer), [f(e.$slots, "footer", {
638
+ }, f(v).footer), [d(e.$slots, "footer", {
637
639
  close: j,
638
- complete: p(v).complete,
639
- data: p(v).data.value,
640
- reset: p(v).reset
640
+ complete: f(_).complete,
641
+ data: f(_).data.value,
642
+ reset: f(_).reset
641
643
  })], 16))
642
- ], 64)) : o("", !0),
643
- Ct.value && yr.value ? (u(), s("div", {
644
+ ], 64)) : a("", !0),
645
+ Et.value && Sr.value ? (l(), o("div", {
644
646
  key: 1,
645
- "aria-label": p(b)("offCanvas.snapLabel").value,
647
+ "aria-label": f(y)("offCanvas.snapLabel").value,
646
648
  "aria-orientation": "vertical",
647
649
  "aria-valuemax": J.value.length,
648
650
  "aria-valuemin": "1",
649
651
  "aria-valuenow": Y.value + 1,
650
- "aria-valuetext": br.value,
652
+ "aria-valuetext": Cr.value,
651
653
  class: "bb-offcanvas__handle bb-offcanvas__handle--slider",
652
654
  role: "slider",
653
655
  tabindex: "0",
654
- onClick: _r,
655
- onKeydown: vr,
656
- onLostpointercapture: gr,
657
- onPointercancel: gr,
658
- onPointerdown: mr,
659
- onPointermove: hr,
660
- onPointerup: gr
661
- }, null, 40, nt)) : o("", !0),
662
- ze("span", rt, qe(p(jt).text.value), 1)
663
- ], 16, et));
656
+ onClick: br,
657
+ onKeydown: xr,
658
+ onLostpointercapture: yr,
659
+ onPointercancel: yr,
660
+ onPointerdown: _r,
661
+ onPointermove: vr,
662
+ onPointerup: yr
663
+ }, null, 40, at)) : a("", !0),
664
+ He("span", ot, Xe(f(Pt).text.value), 1)
665
+ ], 16, rt));
664
666
  }
665
667
  });
666
668
  //#endregion
667
- export { g as default };
669
+ export { h as default };