bitboss-ui 3.0.0-beta.71 → 3.0.0-beta.72

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