bitboss-ui 2.1.135 → 3.0.0-alpha.4
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.
- package/LICENSE +21 -0
- package/README.md +274 -24
- package/bin/bitboss-ui-mcp.mjs +662 -0
- package/bin/bitboss-ui.mjs +710 -0
- package/bin/bitboss-ui.node.test.mjs +113 -0
- package/dist/ai/BbAccordion.md +528 -113
- package/dist/ai/BbAlert.md +380 -197
- package/dist/ai/BbAsterisk.md +46 -0
- package/dist/ai/BbAvatar.md +458 -178
- package/dist/ai/BbBadge.md +697 -225
- package/dist/ai/BbBadgeButton.md +54 -0
- package/dist/ai/BbBaseButton.md +491 -0
- package/dist/ai/BbBaseCheckbox.md +49 -0
- package/dist/ai/BbBaseCheckboxGroup.md +64 -0
- package/dist/ai/BbBaseCheckboxIcon.md +176 -0
- package/dist/ai/BbBaseColorInput.md +64 -0
- package/dist/ai/BbBaseColorPalette.md +39 -0
- package/dist/ai/BbBaseDatePicker.md +42 -0
- package/dist/ai/BbBaseDatePickerInput.md +73 -0
- package/dist/ai/BbBaseInputContainer.md +48 -0
- package/dist/ai/BbBaseNumberInput.md +71 -0
- package/dist/ai/BbBaseRadio.md +46 -0
- package/dist/ai/BbBaseRadioGroup.md +64 -0
- package/dist/ai/BbBaseRadioIcon.md +191 -0
- package/dist/ai/BbBaseRating.md +51 -0
- package/dist/ai/BbBaseSelect.md +88 -0
- package/dist/ai/BbBaseSlider.md +56 -0
- package/dist/ai/BbBaseSwitch.md +49 -0
- package/dist/ai/BbBaseSwitchGroup.md +64 -0
- package/dist/ai/BbBaseSwitchIcon.md +186 -0
- package/dist/ai/BbBaseTag.md +68 -0
- package/dist/ai/BbBaseTextInput.md +75 -0
- package/dist/ai/BbBaseTextarea.md +62 -0
- package/dist/ai/BbBaseTimePickerInput.md +62 -0
- package/dist/ai/BbBreadcrumbs.md +553 -503
- package/dist/ai/BbButton.md +841 -636
- package/dist/ai/BbCheckbox.md +585 -254
- package/dist/ai/BbCheckboxGroup.md +573 -361
- package/dist/ai/BbCollapsible.md +425 -103
- package/dist/ai/BbColorInput.md +536 -323
- package/dist/ai/BbColorPalette.md +569 -330
- package/dist/ai/BbConfirm.md +659 -136
- package/dist/ai/BbConfirmPortal.md +28 -0
- package/dist/ai/BbDatePicker.md +244 -0
- package/dist/ai/BbDatePickerInput.md +720 -388
- package/dist/ai/BbDialog.md +778 -99
- package/dist/ai/BbDropdown.md +1072 -763
- package/dist/ai/BbDropdownButton.md +525 -614
- package/dist/ai/BbDropdownGroup.md +34 -0
- package/dist/ai/BbDropzone.md +1206 -436
- package/dist/ai/BbForm.md +239 -0
- package/dist/ai/BbIcon.md +382 -212
- package/dist/ai/BbIndicator.md +283 -0
- package/dist/ai/BbNumberInput.md +717 -355
- package/dist/ai/BbOffCanvas.md +897 -498
- package/dist/ai/BbPagination.md +489 -535
- package/dist/ai/BbPopover.md +591 -546
- package/dist/ai/BbProgress.md +462 -69
- package/dist/ai/BbRadio.md +352 -229
- package/dist/ai/BbRadioGroup.md +437 -353
- package/dist/ai/BbRating.md +372 -225
- package/dist/ai/BbSelect.md +1399 -536
- package/dist/ai/BbSelectPopover.md +1255 -1578
- package/dist/ai/BbSlider.md +500 -256
- package/dist/ai/BbSmoothHeight.md +485 -139
- package/dist/ai/BbSpinner.md +718 -131
- package/dist/ai/BbSwitch.md +573 -119
- package/dist/ai/BbSwitchGroup.md +521 -214
- package/dist/ai/BbTable.md +1996 -2365
- package/dist/ai/BbTabs.md +1147 -0
- package/dist/ai/BbTabsList.md +29 -0
- package/dist/ai/BbTabsPanes.md +27 -0
- package/dist/ai/BbTabsRoot.md +57 -0
- package/dist/ai/BbTag.md +416 -292
- package/dist/ai/BbTextInput.md +878 -333
- package/dist/ai/BbTextarea.md +850 -255
- package/dist/ai/BbTimePicker.md +231 -0
- package/dist/ai/BbTimePickerInput.md +200 -0
- package/dist/ai/BbToast.md +669 -196
- package/dist/ai/BbToastPortal.md +28 -0
- package/dist/ai/BbTooltip.md +453 -346
- package/dist/ai/BbTree.md +993 -234
- package/dist/ai/ChipsBox.md +27 -199
- package/dist/ai/ClearableButton.md +21 -55
- package/dist/ai/CommaBox.md +25 -200
- package/dist/ai/CommonInputWrapper.md +42 -0
- package/dist/ai/CommonPopover.md +30 -510
- package/dist/ai/ErrorIcon.md +19 -56
- package/dist/ai/FlatListBox.md +35 -379
- package/dist/ai/GroupedListBox.md +37 -535
- package/dist/ai/GuidesComponent.md +21 -0
- package/dist/ai/ListBox.md +38 -231
- package/dist/ai/OptionsContainer.md +34 -253
- package/dist/ai/WarningIcon.md +21 -0
- package/dist/ai/components.json +15897 -0
- package/dist/ai/composables/useBbConfig.md +80 -0
- package/dist/ai/composables/useBbFormContext.md +110 -0
- package/dist/ai/composables/useBbTableContext.md +167 -0
- package/dist/ai/composables/useBbTabsContext.md +118 -0
- package/dist/ai/composables/useBroadcastChannelInstance.md +97 -0
- package/dist/ai/composables/useConfirm.md +313 -0
- package/dist/ai/composables/useCountdown.md +86 -0
- package/dist/ai/composables/useId.md +60 -0
- package/dist/ai/composables/useMobile.md +85 -0
- package/dist/ai/composables/useToast.md +238 -0
- package/dist/ai/guides/agent-contract.md +165 -0
- package/dist/ai/guides/ai-router.md +113 -0
- package/dist/ai/guides/app-layout.md +318 -0
- package/dist/ai/guides/coherence-playbook.md +136 -0
- package/dist/ai/guides/component-picker.md +236 -0
- package/dist/ai/guides/design-language.md +478 -0
- package/dist/ai/guides/design-tokens.md +450 -0
- package/dist/ai/guides/fetch-items-playbook.md +161 -0
- package/dist/ai/guides/floating-bottom-panel.md +130 -0
- package/dist/ai/guides/icons-policy.md +257 -0
- package/dist/ai/guides/inertia-helpers.md +1443 -0
- package/dist/ai/guides/inline-edit-playbook.md +267 -0
- package/dist/ai/guides/installation-and-plugin-setup.md +440 -0
- package/dist/ai/guides/migration/components/bb-alert.md +37 -0
- package/dist/ai/guides/migration/components/bb-avatar.md +24 -0
- package/dist/ai/guides/migration/components/bb-badge.md +110 -0
- package/dist/ai/guides/migration/components/bb-breadcrumbs.md +26 -0
- package/dist/ai/guides/migration/components/bb-button.md +55 -0
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +54 -0
- package/dist/ai/guides/migration/components/bb-checkbox.md +45 -0
- package/dist/ai/guides/migration/components/bb-chip.md +35 -0
- package/dist/ai/guides/migration/components/bb-collapsible.md +26 -0
- package/dist/ai/guides/migration/components/bb-color-input.md +23 -0
- package/dist/ai/guides/migration/components/bb-color-palette.md +31 -0
- package/dist/ai/guides/migration/components/bb-date-picker-input.md +84 -0
- package/dist/ai/guides/migration/components/bb-dialog.md +46 -0
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +31 -0
- package/dist/ai/guides/migration/components/bb-dropdown.md +36 -0
- package/dist/ai/guides/migration/components/bb-dropzone.md +27 -0
- package/dist/ai/guides/migration/components/bb-icon.md +27 -0
- package/dist/ai/guides/migration/components/bb-offcanvas.md +63 -0
- package/dist/ai/guides/migration/components/bb-pagination.md +24 -0
- package/dist/ai/guides/migration/components/bb-popover.md +52 -0
- package/dist/ai/guides/migration/components/bb-rating.md +24 -0
- package/dist/ai/guides/migration/components/bb-select-popover.md +59 -0
- package/dist/ai/guides/migration/components/bb-select.md +69 -0
- package/dist/ai/guides/migration/components/bb-slider.md +25 -0
- package/dist/ai/guides/migration/components/bb-smooth-height.md +45 -0
- package/dist/ai/guides/migration/components/bb-spinner.md +23 -0
- package/dist/ai/guides/migration/components/bb-table.md +66 -0
- package/dist/ai/guides/migration/components/bb-tabs.md +47 -0
- package/dist/ai/guides/migration/components/bb-tag.md +29 -0
- package/dist/ai/guides/migration/components/bb-text-input.md +37 -0
- package/dist/ai/guides/migration/components/bb-toast.md +47 -0
- package/dist/ai/guides/migration/components/bb-tooltip.md +34 -0
- package/dist/ai/guides/migration/components/bb-tree.md +77 -0
- package/dist/ai/guides/migration/components/use-confirm.md +46 -0
- package/dist/ai/guides/migration/v2-to-v3.md +649 -0
- package/dist/ai/guides/options-items-playbook.md +222 -0
- package/dist/ai/guides/page-shell.md +113 -0
- package/dist/ai/guides/validated-forms.md +177 -0
- package/dist/ai/index.md +158 -32
- package/dist/ai/recipes/inertia/approvals-inbox.md +1635 -0
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +1765 -0
- package/dist/ai/recipes/inertia/layout-scaffold.md +385 -0
- package/dist/ai/recipes/inertia/onboarding.md +1791 -0
- package/dist/ai/recipes/inertia/ownership-atlas.md +1327 -0
- package/dist/ai/recipes/inertia/record-form.md +1489 -0
- package/dist/ai/recipes/inertia/records-workspace.md +1416 -0
- package/dist/ai/recipes/inertia/upload-center.md +2003 -0
- package/dist/ai/recipes/inertia/wizard-form.md +1500 -0
- package/dist/ai/recipes/nuxt/approvals-inbox.md +1578 -0
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +1703 -0
- package/dist/ai/recipes/nuxt/layout-scaffold.md +385 -0
- package/dist/ai/recipes/nuxt/onboarding.md +1724 -0
- package/dist/ai/recipes/nuxt/record-form.md +1502 -0
- package/dist/ai/recipes/nuxt/records-workspace.md +1329 -0
- package/dist/ai/recipes/nuxt/upload-center.md +1886 -0
- package/dist/ai/recipes/nuxt/wizard-form.md +1509 -0
- package/dist/ai/recipes/vue/approvals-inbox.md +1496 -0
- package/dist/ai/recipes/vue/inline-edit-workspace.md +1594 -0
- package/dist/ai/recipes/vue/layout-scaffold.md +385 -0
- package/dist/ai/recipes/vue/onboarding.md +1679 -0
- package/dist/ai/recipes/vue/record-form.md +1586 -0
- package/dist/ai/recipes/vue/records-workspace.md +1245 -0
- package/dist/ai/recipes/vue/upload-center.md +1845 -0
- package/dist/ai/recipes/vue/wizard-form.md +1441 -0
- package/dist/ai/source/BbAccordion.md +123 -0
- package/dist/ai/source/BbAlert.md +401 -0
- package/dist/ai/source/BbAsterisk.md +32 -0
- package/dist/ai/source/BbAvatar.md +258 -0
- package/dist/ai/source/BbBadge.md +560 -0
- package/dist/ai/source/BbBadgeButton.md +490 -0
- package/dist/ai/source/BbBaseButton.md +682 -0
- package/dist/ai/source/BbBaseCheckbox.md +461 -0
- package/dist/ai/source/BbBaseCheckboxGroup.md +554 -0
- package/dist/ai/source/BbBaseCheckboxIcon.md +201 -0
- package/dist/ai/source/BbBaseColorInput.md +416 -0
- package/dist/ai/source/BbBaseColorPalette.md +934 -0
- package/dist/ai/source/BbBaseDatePicker.md +1001 -0
- package/dist/ai/source/BbBaseDatePickerInput.md +1785 -0
- package/dist/ai/source/BbBaseInputContainer.md +1210 -0
- package/dist/ai/source/BbBaseNumberInput.md +617 -0
- package/dist/ai/source/BbBaseRadio.md +377 -0
- package/dist/ai/source/BbBaseRadioGroup.md +533 -0
- package/dist/ai/source/BbBaseRadioIcon.md +153 -0
- package/dist/ai/source/BbBaseRating.md +573 -0
- package/dist/ai/source/BbBaseSelect.md +898 -0
- package/dist/ai/source/BbBaseSlider.md +1085 -0
- package/dist/ai/source/BbBaseSwitch.md +246 -0
- package/dist/ai/source/BbBaseSwitchGroup.md +302 -0
- package/dist/ai/source/BbBaseSwitchIcon.md +206 -0
- package/dist/ai/source/BbBaseTag.md +694 -0
- package/dist/ai/source/BbBaseTextInput.md +511 -0
- package/dist/ai/source/BbBaseTextarea.md +480 -0
- package/dist/ai/source/BbBaseTimePickerInput.md +1031 -0
- package/dist/ai/source/BbBreadcrumbs.md +815 -0
- package/dist/ai/source/BbButton.md +1006 -0
- package/dist/ai/source/BbCheckbox.md +326 -0
- package/dist/ai/source/BbCheckboxGroup.md +419 -0
- package/dist/ai/source/BbCollapsible.md +137 -0
- package/dist/ai/source/BbColorInput.md +322 -0
- package/dist/ai/source/BbColorPalette.md +371 -0
- package/dist/ai/source/BbConfirm.md +193 -0
- package/dist/ai/source/BbConfirmPortal.md +74 -0
- package/dist/ai/source/BbDatePicker.md +729 -0
- package/dist/ai/source/BbDatePickerInput.md +525 -0
- package/dist/ai/source/BbDialog.md +818 -0
- package/dist/ai/source/BbDropdown.md +2387 -0
- package/dist/ai/source/BbDropdownButton.md +315 -0
- package/dist/ai/source/BbDropdownGroup.md +1259 -0
- package/dist/ai/source/BbDropzone.md +864 -0
- package/dist/ai/source/BbForm.md +100 -0
- package/dist/ai/source/BbIcon.md +214 -0
- package/dist/ai/source/BbIndicator.md +298 -0
- package/dist/ai/source/BbNumberInput.md +374 -0
- package/dist/ai/source/BbOffCanvas.md +1266 -0
- package/dist/ai/source/BbPagination.md +835 -0
- package/dist/ai/source/BbPopover.md +860 -0
- package/dist/ai/source/BbProgress.md +140 -0
- package/dist/ai/source/BbRadio.md +303 -0
- package/dist/ai/source/BbRadioGroup.md +420 -0
- package/dist/ai/source/BbRating.md +369 -0
- package/dist/ai/source/BbSelect.md +688 -0
- package/dist/ai/source/BbSelectPopover.md +2234 -0
- package/dist/ai/source/BbSlider.md +378 -0
- package/dist/ai/source/BbSmoothHeight.md +265 -0
- package/dist/ai/source/BbSpinner.md +127 -0
- package/dist/ai/source/BbSwitch.md +175 -0
- package/dist/ai/source/BbSwitchGroup.md +240 -0
- package/dist/ai/source/BbTable.md +3433 -0
- package/dist/ai/source/BbTabs.md +403 -0
- package/dist/ai/source/BbTabsList.md +578 -0
- package/dist/ai/source/BbTabsPanes.md +368 -0
- package/dist/ai/source/BbTabsRoot.md +372 -0
- package/dist/ai/source/BbTag.md +390 -0
- package/dist/ai/source/BbTextInput.md +352 -0
- package/dist/ai/source/BbTextarea.md +337 -0
- package/dist/ai/source/BbTimePicker.md +595 -0
- package/dist/ai/source/BbTimePickerInput.md +376 -0
- package/dist/ai/source/BbToast.md +525 -0
- package/dist/ai/source/BbToastPortal.md +482 -0
- package/dist/ai/source/BbTooltip.md +522 -0
- package/dist/ai/source/BbTree.md +323 -0
- package/dist/ai/source/ChipsBox.md +201 -0
- package/dist/ai/source/ClearableButton.md +70 -0
- package/dist/ai/source/CommaBox.md +202 -0
- package/dist/ai/source/CommonInputWrapper.md +554 -0
- package/dist/ai/source/CommonPopover.md +616 -0
- package/dist/ai/source/ErrorIcon.md +43 -0
- package/dist/ai/source/FlatListBox.md +396 -0
- package/dist/ai/source/GroupedListBox.md +540 -0
- package/dist/ai/source/GuidesComponent.md +383 -0
- package/dist/ai/source/ListBox.md +238 -0
- package/dist/ai/source/OptionsContainer.md +191 -0
- package/dist/ai/source/WarningIcon.md +47 -0
- package/dist/alert-variants.d.ts +19 -0
- package/dist/assets/css/reset.css_inline.js +4 -0
- package/dist/assets/svgs/alert.svg_raw.js +4 -0
- package/dist/assets/svgs/calendar.svg_raw.js +4 -0
- package/dist/assets/svgs/check_stroke.svg_raw.js +4 -0
- package/dist/assets/svgs/chevron_down.svg_raw.js +4 -0
- package/dist/assets/svgs/chevron_right.svg_raw.js +4 -0
- package/dist/assets/svgs/clear.svg_raw.js +4 -0
- package/dist/assets/svgs/clock.svg_raw.js +4 -0
- package/dist/assets/svgs/error.svg_raw.js +4 -0
- package/dist/assets/svgs/search.svg_raw.js +4 -0
- package/dist/assets/svgs/sort.svg_raw.js +4 -0
- package/dist/assets/svgs/spinner.svg_raw.js +4 -0
- package/dist/assets/svgs/user.svg_raw.js +4 -0
- package/dist/badge-variants.d.ts +19 -0
- package/dist/button-variants.d.ts +21 -0
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +9 -3
- package/dist/components/BbAccordion/BbAccordion.vue.js +6 -0
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +66 -0
- package/dist/components/BbAccordion/types.d.ts +12 -8
- package/dist/components/BbAlert/BbAlert.vue.d.ts +12 -3
- package/dist/components/BbAlert/BbAlert.vue.js +6 -0
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +65 -0
- package/dist/components/BbAlert/types.d.ts +56 -12
- package/dist/components/BbAsterisk/BbAsterisk.vue.d.ts +3 -0
- package/dist/components/BbAsterisk/BbAsterisk.vue.js +6 -0
- package/dist/components/BbAsterisk/BbAsterisk.vue_vue_type_script_setup_true_lang.js +13 -0
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +5 -0
- package/dist/components/BbAvatar/BbAvatar.vue.js +6 -0
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +78 -0
- package/dist/components/BbAvatar/types.d.ts +6 -5
- package/dist/components/BbBadge/BadgeAppendIcon.vue.d.ts +3 -0
- package/dist/components/BbBadge/BadgeAppendIcon.vue.js +5 -0
- package/dist/components/BbBadge/BadgeAppendIcon.vue_vue_type_script_setup_true_lang.js +22 -0
- package/dist/components/BbBadge/BadgeBodyContent.vue.d.ts +15 -0
- package/dist/components/BbBadge/BadgeBodyContent.vue.js +5 -0
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +34 -0
- package/dist/components/BbBadge/BbBadge.vue.d.ts +8 -1
- package/dist/components/BbBadge/BbBadge.vue.js +6 -0
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +83 -0
- package/dist/components/BbBadge/BbBadgeButton.vue.d.ts +12 -0
- package/dist/components/BbBadge/BbBadgeButton.vue.js +5 -0
- package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +54 -0
- package/dist/components/BbBadge/badgeButtonContext.d.ts +27 -0
- package/dist/components/BbBadge/badgeButtonContext.js +5 -0
- package/dist/components/BbBadge/types.d.ts +61 -16
- package/dist/components/BbBaseButton/BbBaseButton.vue.d.ts +13 -0
- package/dist/components/BbBaseButton/BbBaseButton.vue.js +6 -0
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +171 -0
- package/dist/components/BbBaseButton/RouterComponent.vue.js +5 -0
- package/dist/components/BbBaseButton/RouterComponent.vue_vue_type_script_setup_true_lang.js +29 -0
- package/dist/components/BbBaseButton/types.d.ts +191 -0
- package/dist/components/BbBaseButton/types.js +33 -0
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue.d.ts +40 -0
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue.js +6 -0
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue_vue_type_script_setup_true_lang.js +145 -0
- package/dist/components/BbBaseCheckbox/types.d.ts +224 -0
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue.d.ts +19 -0
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue.js +6 -0
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue_vue_type_script_setup_true_lang.js +190 -0
- package/dist/components/BbBaseCheckboxGroup/types.d.ts +257 -0
- package/dist/components/BbBaseCheckboxIcon/BbBaseCheckboxIcon.vue.d.ts +4 -0
- package/dist/components/BbBaseCheckboxIcon/BbBaseCheckboxIcon.vue.js +6 -0
- package/dist/components/BbBaseCheckboxIcon/BbBaseCheckboxIcon.vue_vue_type_script_setup_true_lang.js +43 -0
- package/dist/components/BbBaseCheckboxIcon/types.d.ts +47 -0
- package/dist/components/BbBaseColorInput/BbBaseColorInput.vue.d.ts +42 -0
- package/dist/components/BbBaseColorInput/BbBaseColorInput.vue.js +6 -0
- package/dist/components/BbBaseColorInput/BbBaseColorInput.vue_vue_type_script_setup_true_lang.js +178 -0
- package/dist/components/BbBaseColorInput/types.d.ts +210 -0
- package/dist/components/BbBaseColorPalette/BbBaseColorPalette.vue.d.ts +13 -0
- package/dist/components/BbBaseColorPalette/BbBaseColorPalette.vue.js +6 -0
- package/dist/components/BbBaseColorPalette/BbBaseColorPalette.vue_vue_type_script_setup_true_lang.js +395 -0
- package/dist/components/BbBaseColorPalette/types.d.ts +40 -0
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue.js +6 -0
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue_vue_type_script_setup_true_lang.js +300 -0
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.d.ts +44 -0
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.js +5 -0
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue_vue_type_script_setup_true_lang.js +310 -0
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue.d.ts +5 -0
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue.js +5 -0
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue_vue_type_script_setup_true_lang.js +63 -0
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerYearSelector.vue.d.ts +5 -0
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerYearSelector.vue.js +5 -0
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerYearSelector.vue_vue_type_script_setup_true_lang.js +75 -0
- package/dist/components/BbBaseDatePicker/typeahead.d.ts +112 -0
- package/dist/components/BbBaseDatePicker/typeahead.js +37 -0
- package/dist/components/BbBaseDatePicker/types.d.ts +97 -0
- package/dist/components/BbBaseDatePicker/useDatePickerContext.d.ts +58 -0
- package/dist/components/BbBaseDatePicker/useDatePickerContext.js +11 -0
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.d.ts +30 -0
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.js +6 -0
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue_vue_type_script_setup_true_lang.js +716 -0
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue.d.ts +30 -0
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue.js +6 -0
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue_vue_type_script_setup_true_lang.js +204 -0
- package/dist/components/BbBaseDatePickerInput/types.d.ts +311 -0
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue.d.ts +17 -0
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue.js +6 -0
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue_vue_type_script_setup_true_lang.js +191 -0
- package/dist/components/BbBaseInputContainer/types.d.ts +197 -0
- package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue.d.ts +52 -0
- package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue.js +6 -0
- package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue_vue_type_script_setup_true_lang.js +215 -0
- package/dist/components/BbBaseNumberInput/types.d.ts +211 -0
- package/dist/components/BbBaseRadio/BbBaseRadio.vue.d.ts +33 -0
- package/dist/components/BbBaseRadio/BbBaseRadio.vue.js +6 -0
- package/dist/components/BbBaseRadio/BbBaseRadio.vue_vue_type_script_setup_true_lang.js +114 -0
- package/dist/components/BbBaseRadio/types.d.ts +179 -0
- package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue.d.ts +19 -0
- package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue.js +6 -0
- package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue_vue_type_script_setup_true_lang.js +177 -0
- package/dist/components/BbBaseRadioGroup/types.d.ts +223 -0
- package/dist/components/BbBaseRadioIcon/BbBaseRadioIcon.vue.d.ts +4 -0
- package/dist/components/BbBaseRadioIcon/BbBaseRadioIcon.vue.js +6 -0
- package/dist/components/BbBaseRadioIcon/BbBaseRadioIcon.vue_vue_type_script_setup_true_lang.js +28 -0
- package/dist/components/BbBaseRadioIcon/types.d.ts +41 -0
- package/dist/components/BbBaseRating/BbBaseRating.vue.d.ts +38 -0
- package/dist/components/BbBaseRating/BbBaseRating.vue.js +6 -0
- package/dist/components/BbBaseRating/BbBaseRating.vue_vue_type_script_setup_true_lang.js +184 -0
- package/dist/components/BbBaseRating/types.d.ts +168 -0
- package/dist/components/BbBaseSelect/BbBaseSelect.vue.d.ts +19 -0
- package/dist/components/BbBaseSelect/BbBaseSelect.vue.js +6 -0
- package/dist/components/BbBaseSelect/BbBaseSelect.vue_vue_type_script_setup_true_lang.js +307 -0
- package/dist/components/BbBaseSelect/types.d.ts +297 -0
- package/dist/components/BbBaseSlider/BbBaseSlider.vue.d.ts +35 -0
- package/dist/components/BbBaseSlider/BbBaseSlider.vue.js +6 -0
- package/dist/components/BbBaseSlider/BbBaseSlider.vue_vue_type_script_setup_true_lang.js +324 -0
- package/dist/components/BbBaseSlider/types.d.ts +200 -0
- package/dist/components/BbBaseSwitch/BbBaseSwitch.vue.d.ts +35 -0
- package/dist/components/BbBaseSwitch/BbBaseSwitch.vue.js +6 -0
- package/dist/components/BbBaseSwitch/BbBaseSwitch.vue_vue_type_script_setup_true_lang.js +146 -0
- package/dist/components/BbBaseSwitch/types.d.ts +10 -0
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue.d.ts +19 -0
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue.js +6 -0
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue_vue_type_script_setup_true_lang.js +190 -0
- package/dist/components/BbBaseSwitchGroup/types.d.ts +8 -0
- package/dist/components/BbBaseSwitchIcon/BbBaseSwitchIcon.vue.d.ts +4 -0
- package/dist/components/BbBaseSwitchIcon/BbBaseSwitchIcon.vue.js +6 -0
- package/dist/components/BbBaseSwitchIcon/BbBaseSwitchIcon.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/components/BbBaseSwitchIcon/types.d.ts +48 -0
- package/dist/components/BbBaseTag/BbBaseTag.vue.d.ts +50 -0
- package/dist/components/BbBaseTag/BbBaseTag.vue.js +6 -0
- package/dist/components/BbBaseTag/BbBaseTag.vue_vue_type_script_setup_true_lang.js +266 -0
- package/dist/components/BbBaseTag/types.d.ts +160 -0
- package/dist/components/BbBaseTextInput/BbBaseTextInput.vue.d.ts +45 -0
- package/dist/components/BbBaseTextInput/BbBaseTextInput.vue.js +6 -0
- package/dist/components/BbBaseTextInput/BbBaseTextInput.vue_vue_type_script_setup_true_lang.js +200 -0
- package/dist/components/BbBaseTextInput/types.d.ts +209 -0
- package/dist/components/BbBaseTextarea/BbBaseTextarea.vue.d.ts +39 -0
- package/dist/components/BbBaseTextarea/BbBaseTextarea.vue.js +6 -0
- package/dist/components/BbBaseTextarea/BbBaseTextarea.vue_vue_type_script_setup_true_lang.js +175 -0
- package/dist/components/BbBaseTextarea/types.d.ts +170 -0
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue.d.ts +27 -0
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue.js +6 -0
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue_vue_type_script_setup_true_lang.js +522 -0
- package/dist/components/BbBaseTimePickerInput/types.d.ts +151 -0
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue.d.ts +0 -1
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue.js +6 -0
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +224 -0
- package/dist/components/BbBreadcrumbs/estimateBreadcrumbItemWidth.js +47 -0
- package/dist/components/BbBreadcrumbs/types.d.ts +37 -22
- package/dist/components/BbButton/BbButton.vue.d.ts +6 -5
- package/dist/components/BbButton/BbButton.vue.js +6 -0
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +181 -0
- package/dist/components/BbButton/types.d.ts +48 -47
- package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +4 -3
- package/dist/components/BbCheckbox/BbCheckbox.vue.js +6 -0
- package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +146 -0
- package/dist/components/BbCheckbox/types.d.ts +31 -10
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +2 -13
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.js +6 -0
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +190 -0
- package/dist/components/BbCheckboxGroup/types.d.ts +51 -23
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +2 -1
- package/dist/components/BbCollapsible/BbCollapsible.vue.js +6 -0
- package/dist/components/BbCollapsible/BbCollapsible.vue_vue_type_script_setup_true_lang.js +31 -0
- package/dist/components/BbCollapsible/types.d.ts +13 -8
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +10 -1
- package/dist/components/BbColorInput/BbColorInput.vue.js +6 -0
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +177 -0
- package/dist/components/BbColorInput/types.d.ts +44 -11
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +5 -8
- package/dist/components/BbColorPalette/BbColorPalette.vue.js +5 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +126 -0
- package/dist/components/BbColorPalette/types.d.ts +71 -52
- package/dist/components/BbConfirm/BbConfirm.vue.js +6 -0
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +138 -0
- package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +5 -6
- package/dist/components/BbConfirm/BbConfirmPortal.vue.js +5 -0
- package/dist/components/BbConfirm/BbConfirmPortal.vue_vue_type_script_setup_true_lang.js +19 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +37 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.js +6 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +319 -0
- package/dist/components/BbDatePicker/types.d.ts +159 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +3 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.js +6 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +179 -0
- package/dist/components/BbDatePickerInput/types.d.ts +134 -16
- package/dist/components/BbDialog/BbDialog.vue.d.ts +14 -6
- package/dist/components/BbDialog/BbDialog.vue.js +6 -0
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +214 -0
- package/dist/components/BbDialog/types.d.ts +146 -1
- package/dist/components/BbDialog/useDialogStack.d.ts +5 -0
- package/dist/components/BbDialog/useDialogStack.js +20 -0
- package/dist/components/BbDropdown/AdaptiveDropdown.vue.d.ts +24 -0
- package/dist/components/BbDropdown/AdaptiveDropdown.vue.js +6 -0
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +116 -0
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +14 -7
- package/dist/components/BbDropdown/BbDropdown.vue.js +6 -0
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +561 -0
- package/dist/components/BbDropdown/BbDropdownGroup.vue.d.ts +44 -0
- package/dist/components/BbDropdown/BbDropdownGroup.vue.js +5 -0
- package/dist/components/BbDropdown/BbDropdownGroup.vue_vue_type_script_setup_true_lang.js +36 -0
- package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +31 -0
- package/dist/components/BbDropdown/BbDropdownList.vue.js +6 -0
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +470 -0
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue.d.ts +16 -0
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue.js +5 -0
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +168 -0
- package/dist/components/BbDropdown/normalizeGroups.d.ts +18 -0
- package/dist/components/BbDropdown/normalizeGroups.js +46 -0
- package/dist/components/BbDropdown/types.d.ts +468 -46
- package/dist/components/BbDropdown/types.js +4 -0
- package/dist/components/BbDropdown/useDropdownContext.d.ts +89 -0
- package/dist/components/BbDropdown/useDropdownContext.js +9 -0
- package/dist/components/BbDropdown/useDropdownGroupRegistry.d.ts +108 -0
- package/dist/components/BbDropdown/useDropdownGroupRegistry.js +5 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +3 -3
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.js +6 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +119 -0
- package/dist/components/BbDropdownButton/types.d.ts +47 -52
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +5 -4
- package/dist/components/BbDropzone/BbDropzone.vue.js +6 -0
- package/dist/components/BbDropzone/BbDropzone.vue_vue_type_script_setup_true_lang.js +308 -0
- package/dist/components/BbDropzone/types.d.ts +77 -8
- package/dist/components/BbIcon/BbIcon.vue.d.ts +3 -2
- package/dist/components/BbIcon/BbIcon.vue.js +6 -0
- package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +65 -0
- package/dist/components/BbIcon/types.d.ts +6 -19
- package/dist/components/BbIndicator/BbIndicator.vue.d.ts +14 -0
- package/dist/components/BbIndicator/BbIndicator.vue.js +6 -0
- package/dist/components/BbIndicator/BbIndicator.vue_vue_type_script_setup_true_lang.js +56 -0
- package/dist/components/BbIndicator/types.d.ts +49 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +12 -6
- package/dist/components/BbNumberInput/BbNumberInput.vue.js +6 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +194 -0
- package/dist/components/BbNumberInput/types.d.ts +40 -4
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +16 -10
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.js +6 -0
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +284 -0
- package/dist/components/BbOffCanvas/types.d.ts +71 -39
- package/dist/components/BbOffCanvas/useOffCanvasStack.d.ts +25 -0
- package/dist/components/BbOffCanvas/useOffCanvasStack.js +68 -0
- package/dist/components/BbPagination/BbPagination.vue.d.ts +9 -4
- package/dist/components/BbPagination/BbPagination.vue.js +6 -0
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +244 -0
- package/dist/components/BbPagination/paginationFit.d.ts +38 -0
- package/dist/components/BbPagination/paginationFit.js +13 -0
- package/dist/components/BbPagination/types.d.ts +51 -16
- package/dist/components/BbPopover/BbPopover.vue.d.ts +16 -15
- package/dist/components/BbPopover/BbPopover.vue.js +6 -0
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +309 -0
- package/dist/components/BbPopover/escapeStack.d.ts +6 -0
- package/dist/components/BbPopover/escapeStack.js +10 -0
- package/dist/components/BbPopover/types.d.ts +90 -31
- package/dist/components/BbProgress/BbProgress.vue.d.ts +1 -0
- package/dist/components/BbProgress/BbProgress.vue.js +6 -0
- package/dist/components/BbProgress/BbProgress.vue_vue_type_script_setup_true_lang.js +36 -0
- package/dist/components/BbProgress/types.d.ts +15 -1
- package/dist/components/BbRadio/BbRadio.vue.d.ts +5 -3
- package/dist/components/BbRadio/BbRadio.vue.js +6 -0
- package/dist/components/BbRadio/BbRadio.vue_vue_type_script_setup_true_lang.js +133 -0
- package/dist/components/BbRadio/types.d.ts +32 -9
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +4 -14
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.js +6 -0
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +186 -0
- package/dist/components/BbRadioGroup/types.d.ts +48 -22
- package/dist/components/BbRating/BbRating.vue.d.ts +4 -1
- package/dist/components/BbRating/BbRating.vue.js +6 -0
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +150 -0
- package/dist/components/BbRating/types.d.ts +44 -10
- package/dist/components/BbSelect/BbSelect.vue.d.ts +2 -11
- package/dist/components/BbSelect/BbSelect.vue.js +6 -0
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +241 -0
- package/dist/components/BbSelect/types.d.ts +112 -59
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +1 -10
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.js +6 -0
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +639 -0
- package/dist/components/BbSelectPopover/types.d.ts +197 -105
- package/dist/components/BbSlider/BbSlider.vue.d.ts +3 -6
- package/dist/components/BbSlider/BbSlider.vue.js +6 -0
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +166 -0
- package/dist/components/BbSlider/types.d.ts +44 -13
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +3 -1
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.js +6 -0
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue_vue_type_script_setup_true_lang.js +79 -0
- package/dist/components/BbSmoothHeight/types.d.ts +17 -2
- package/dist/components/BbSpinner/BbSpinner.vue.d.ts +1 -1
- package/dist/components/BbSpinner/BbSpinner.vue.js +6 -0
- package/dist/components/BbSpinner/BbSpinner.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/components/BbSpinner/types.d.ts +10 -3
- package/dist/components/BbSwitch/BbSwitch.vue.d.ts +5 -3
- package/dist/components/BbSwitch/BbSwitch.vue.js +6 -0
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +142 -0
- package/dist/components/BbSwitch/types.d.ts +3 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +4 -14
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.js +6 -0
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +190 -0
- package/dist/components/BbSwitchGroup/types.d.ts +3 -22
- package/dist/components/BbTable/BbTable.vue.d.ts +58 -31
- package/dist/components/BbTable/BbTable.vue.js +6 -0
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +900 -0
- package/dist/components/BbTable/types.d.ts +213 -37
- package/dist/components/BbTable/utils.d.ts +9 -1
- package/dist/components/BbTable/utils.js +53 -0
- package/dist/components/BbTabs/BbTabs.vue.d.ts +20 -0
- package/dist/components/BbTabs/BbTabs.vue.js +6 -0
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +64 -0
- package/dist/components/BbTabs/BbTabsList.vue.d.ts +19 -0
- package/dist/components/BbTabs/BbTabsList.vue.js +6 -0
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +123 -0
- package/dist/components/BbTabs/BbTabsPanes.vue.d.ts +16 -0
- package/dist/components/BbTabs/BbTabsPanes.vue.js +6 -0
- package/dist/components/BbTabs/BbTabsPanes.vue_vue_type_script_setup_true_lang.js +35 -0
- package/dist/components/BbTabs/BbTabsRoot.vue.d.ts +20 -0
- package/dist/components/BbTabs/BbTabsRoot.vue.js +5 -0
- package/dist/components/BbTabs/BbTabsRoot.vue_vue_type_script_setup_true_lang.js +55 -0
- package/dist/components/BbTabs/types.d.ts +264 -0
- package/dist/components/BbTag/BbTag.vue.d.ts +19 -6
- package/dist/components/BbTag/BbTag.vue.js +6 -0
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +187 -0
- package/dist/components/BbTag/types.d.ts +55 -17
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +10 -1
- package/dist/components/BbTextInput/BbTextInput.vue.js +6 -0
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +195 -0
- package/dist/components/BbTextInput/types.d.ts +31 -4
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +10 -1
- package/dist/components/BbTextarea/BbTextarea.vue.js +6 -0
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +178 -0
- package/dist/components/BbTextarea/types.d.ts +33 -2
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +33 -0
- package/dist/components/BbTimePicker/BbTimePicker.vue.js +6 -0
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +244 -0
- package/dist/components/BbTimePicker/types.d.ts +133 -0
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +25 -0
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.js +6 -0
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +157 -0
- package/dist/components/BbTimePickerInput/types.d.ts +174 -0
- package/dist/components/BbToast/BbToast.vue.d.ts +2 -3
- package/dist/components/BbToast/BbToast.vue.js +6 -0
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +39 -0
- package/dist/components/BbToast/BbToastMessage.vue.d.ts +17 -8
- package/dist/components/BbToast/BbToastMessage.vue.js +5 -0
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +170 -0
- package/dist/components/BbToast/BbToastPortal.vue.d.ts +30 -0
- package/dist/components/BbToast/BbToastPortal.vue.js +5 -0
- package/dist/components/BbToast/BbToastPortal.vue_vue_type_script_setup_true_lang.js +19 -0
- package/dist/components/BbToast/BbToastRegion.vue.d.ts +8 -0
- package/dist/components/BbToast/BbToastRegion.vue.js +5 -0
- package/dist/components/BbToast/BbToastRegion.vue_vue_type_script_setup_true_lang.js +100 -0
- package/dist/components/BbToast/types.d.ts +69 -5
- package/dist/components/BbTooltip/BbTooltip.vue.d.ts +10 -3
- package/dist/components/BbTooltip/BbTooltip.vue.js +6 -0
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +160 -0
- package/dist/components/BbTooltip/types.d.ts +69 -11
- package/dist/components/BbTree/BbTree.vue.d.ts +28 -13
- package/dist/components/BbTree/BbTree.vue.js +6 -0
- package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +55 -0
- package/dist/components/BbTree/BbTreeLevel.vue.d.ts +19 -0
- package/dist/components/BbTree/BbTreeLevel.vue.js +5 -0
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +94 -0
- package/dist/components/BbTree/context.d.ts +17 -0
- package/dist/components/BbTree/context.js +4 -0
- package/dist/components/BbTree/types.d.ts +94 -41
- package/dist/components/ChipsBox/ChipsBox.vue.d.ts +2 -1
- package/dist/components/ChipsBox/ChipsBox.vue.js +5 -0
- package/dist/components/ChipsBox/ChipsBox.vue_vue_type_script_setup_true_lang.js +98 -0
- package/dist/components/ChipsBox/types.d.ts +12 -5
- package/dist/components/ClearableButton/ClearableButton.vue.d.ts +2 -1
- package/dist/components/ClearableButton/ClearableButton.vue.js +6 -0
- package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +19 -0
- package/dist/components/ClearableButton/types.d.ts +7 -1
- package/dist/components/CloseIcon/CloseButton.vue.d.ts +5 -0
- package/dist/components/CloseIcon/CloseButton.vue.js +7 -0
- package/dist/components/CloseIcon/CloseButton.vue_vue_type_script_setup_true_lang.js +23 -0
- package/dist/components/CloseIcon/types.d.ts +2 -0
- package/dist/components/CommaBox/CommaBox.vue.d.ts +2 -1
- package/dist/components/CommaBox/CommaBox.vue.js +6 -0
- package/dist/components/CommaBox/CommaBox.vue_vue_type_script_setup_true_lang.js +81 -0
- package/dist/components/CommaBox/types.d.ts +6 -7
- package/dist/components/CommonInputWrapper/CommonInputWrapper.vue.d.ts +19 -0
- package/dist/components/CommonInputWrapper/CommonInputWrapper.vue.js +6 -0
- package/dist/components/CommonInputWrapper/CommonInputWrapper.vue_vue_type_script_setup_true_lang.js +107 -0
- package/dist/components/CommonInputWrapper/types.d.ts +96 -0
- package/dist/components/CommonPopover/CommonPopover.vue.d.ts +9 -3
- package/dist/components/CommonPopover/CommonPopover.vue.js +6 -0
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +160 -0
- package/dist/components/CommonPopover/types.d.ts +65 -16
- package/dist/components/ErrorIcon/ErrorIcon.vue.d.ts +2 -0
- package/dist/components/ErrorIcon/ErrorIcon.vue.js +6 -0
- package/dist/components/ErrorIcon/ErrorIcon.vue_vue_type_script_setup_true_lang.js +16 -0
- package/dist/components/FlatListBox/FlatListBox.vue.d.ts +2 -5
- package/dist/components/FlatListBox/FlatListBox.vue.js +5 -0
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +167 -0
- package/dist/components/FlatListBox/types.d.ts +1 -1
- package/dist/components/GroupedListBox/GroupedListBox.vue.d.ts +2 -5
- package/dist/components/GroupedListBox/GroupedListBox.vue.js +5 -0
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +218 -0
- package/dist/components/ListBox/ListBox.vue.d.ts +3 -6
- package/dist/components/ListBox/ListBox.vue.js +5 -0
- package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +112 -0
- package/dist/components/ListBox/types.d.ts +1 -1
- package/dist/components/OptionsContainer/OptionsContainer.vue.d.ts +1 -0
- package/dist/components/OptionsContainer/OptionsContainer.vue.js +5 -0
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +52 -0
- package/dist/components/OptionsContainer/types.d.ts +14 -24
- package/dist/components/Transitions/ScaleFade.vue.d.ts +2 -2
- package/dist/components/Transitions/ScaleFade.vue.js +5 -0
- package/dist/components/Transitions/ScaleFade.vue_vue_type_script_setup_true_lang.js +47 -0
- package/dist/components/Transitions/Slide.vue.d.ts +15 -0
- package/dist/components/Transitions/Slide.vue.js +7 -0
- package/dist/components/Transitions/Slide.vue_vue_type_script_setup_true_lang.js +28 -0
- package/dist/components/WarningIcon/WarningIcon.vue.d.ts +5 -0
- package/dist/components/WarningIcon/WarningIcon.vue.js +6 -0
- package/dist/components/WarningIcon/WarningIcon.vue_vue_type_script_setup_true_lang.js +16 -0
- package/dist/components/WarningIcon/types.d.ts +3 -0
- package/dist/composables/__testResets.d.ts +1 -0
- package/dist/composables/useActiveInactiveState.d.ts +4 -0
- package/dist/composables/useActiveInactiveState.js +21 -0
- package/dist/composables/useBaseOptions.d.ts +3 -3
- package/dist/composables/useBaseOptions.js +31 -0
- package/dist/composables/useBbConfig.d.ts +8 -37
- package/dist/composables/useBbConfig.js +5 -0
- package/dist/composables/useBbDropdownContext.d.ts +89 -0
- package/dist/composables/useBbDropdownContext.js +46 -0
- package/dist/composables/useBbFormContext.d.ts +90 -0
- package/dist/composables/useBbFormContext.js +69 -0
- package/dist/composables/useBbTableContext.d.ts +195 -0
- package/dist/composables/useBbTableContext.js +208 -0
- package/dist/composables/useBbTabsContext.d.ts +111 -0
- package/dist/composables/useBbTabsContext.js +225 -0
- package/dist/composables/useBreakpoint.d.ts +13 -0
- package/dist/composables/useBreakpoint.js +39 -0
- package/dist/composables/useBroadcastChannelInstance.d.ts +1 -3
- package/dist/composables/useBroadcastChannelInstance.js +39 -0
- package/dist/composables/useCancelableFunction.js +37 -0
- package/dist/composables/useClosingInert.d.ts +28 -0
- package/dist/composables/useClosingInert.js +23 -0
- package/dist/composables/useCoherence.js +16 -0
- package/dist/composables/useConfirm.d.ts +278 -68
- package/dist/composables/useConfirm.js +130 -0
- package/dist/composables/useCountdown.js +42 -0
- package/dist/composables/useHashedWatcher.d.ts +17 -0
- package/dist/composables/useHashedWatcher.js +14 -0
- package/dist/composables/useId.d.ts +3 -2
- package/dist/composables/useIndexById.js +16 -0
- package/dist/composables/useInertiaPage.d.ts +10 -0
- package/dist/composables/useInertiaPage.js +8 -0
- package/dist/composables/useItemText.js +17 -0
- package/dist/composables/useItemValue.js +9 -0
- package/dist/composables/useItemsGetter.d.ts +1 -1
- package/dist/composables/useItemsGetter.js +30 -0
- package/dist/composables/useListboxFocus.js +66 -0
- package/dist/composables/useLocale.d.ts +1 -1
- package/dist/composables/useLocale.js +11 -0
- package/dist/composables/useLogger.d.ts +1 -1
- package/dist/composables/useLogger.js +10 -0
- package/dist/composables/useMinimalQueue.d.ts +1 -1
- package/dist/composables/useMobile.js +7 -0
- package/dist/composables/useOnFalsy.d.ts +2 -0
- package/dist/composables/useOnFalsy.js +9 -0
- package/dist/composables/useOnTruthy.d.ts +7 -0
- package/dist/composables/useOnTruthy.js +9 -0
- package/dist/composables/usePrefill.d.ts +2 -1
- package/dist/composables/usePrefill.js +24 -0
- package/dist/composables/useQuery.d.ts +15 -3
- package/dist/composables/useQuery.js +42 -0
- package/dist/composables/useRoute.js +11 -0
- package/dist/composables/useRouter.js +8 -0
- package/dist/composables/useSafeArea.d.ts +51 -0
- package/dist/composables/useSafeArea.js +16 -0
- package/dist/composables/useSegmentedFields.d.ts +104 -0
- package/dist/composables/useSegmentedFields.js +159 -0
- package/dist/composables/useTableWidthContext.d.ts +5 -0
- package/dist/composables/useTableWidthContext.js +42 -0
- package/dist/composables/useToast.d.ts +40 -70
- package/dist/composables/useToast.js +58 -0
- package/dist/composables/useTopLayer.d.ts +9 -0
- package/dist/composables/useTopLayer.js +7 -0
- package/dist/composables/useUntil.js +13 -0
- package/dist/composables/useViewportWidth.d.ts +17 -0
- package/dist/composables/useViewportWidth.js +6 -0
- package/dist/confirm-variants.d.ts +17 -0
- package/dist/deprecation/ai-deprecations.json.d.ts +784 -0
- package/dist/deprecation/ai-deprecations.json.js +4 -0
- package/dist/deprecation/removedProps.d.ts +3 -0
- package/dist/deprecation/removedProps.js +13 -0
- package/dist/directives/bbColor.d.ts +65 -0
- package/dist/directives/bbColor.js +24 -0
- package/dist/directives/bbDate.d.ts +66 -0
- package/dist/directives/bbDate.js +24 -0
- package/dist/directives/bbDropdown.d.ts +15 -11
- package/dist/directives/bbDropdown.js +23 -0
- package/dist/directives/bbTime.d.ts +64 -0
- package/dist/directives/bbTime.js +24 -0
- package/dist/directives/bbTooltip.d.ts +16 -11
- package/dist/directives/bbTooltip.js +24 -0
- package/dist/directives/createPopoverDirective.js +54 -0
- package/dist/dropdown-item-variants.d.ts +17 -0
- package/dist/i18n/index.d.ts +51 -3
- package/dist/i18n/index.js +27 -0
- package/dist/i18n/locales/cs.json +115 -0
- package/dist/i18n/locales/da.json +115 -0
- package/dist/i18n/locales/de.json +115 -0
- package/dist/i18n/locales/el.json +115 -0
- package/dist/i18n/locales/en.json +115 -0
- package/dist/i18n/locales/es.json +115 -0
- package/dist/i18n/locales/fi.json +115 -0
- package/dist/i18n/locales/fr.json +115 -0
- package/dist/i18n/locales/hu.json +115 -0
- package/dist/i18n/locales/it.json +115 -0
- package/dist/i18n/locales/ja.json +115 -0
- package/dist/i18n/locales/ko.json +115 -0
- package/dist/i18n/locales/nb.json +115 -0
- package/dist/i18n/locales/nl.json +115 -0
- package/dist/i18n/locales/pl.json +115 -0
- package/dist/i18n/locales/pt.json +115 -0
- package/dist/i18n/locales/ro.json +115 -0
- package/dist/i18n/locales/ru.json +115 -0
- package/dist/i18n/locales/sv.json +115 -0
- package/dist/i18n/locales/tr.json +115 -0
- package/dist/i18n/locales/uk.json +115 -0
- package/dist/i18n/locales/zh-cn.json +115 -0
- package/dist/icons-whitelist.d.ts +8 -0
- package/dist/index.d.ts +96 -79
- package/dist/index.js +76 -82
- package/dist/indicator-variants.d.ts +20 -0
- package/dist/llms-full.txt +79703 -0
- package/dist/llms-medium.txt +1514 -0
- package/dist/llms.txt +105 -0
- package/dist/locale-blueprint.json +141 -0
- package/dist/locale-registry.d.ts +37 -0
- package/dist/nuxt-module.d.ts +3 -0
- package/dist/nuxt.js +19 -0
- package/dist/plugin.d.ts +4 -0
- package/dist/plugin.js +22 -0
- package/dist/reset.css +1 -0
- package/dist/reset.d.ts +0 -0
- package/dist/runtime/nuxt-plugin.d.ts +2 -0
- package/dist/runtime/nuxt-plugin.js +24 -0
- package/dist/styles.css +2 -0
- package/dist/styles.d.ts +0 -0
- package/dist/toast-variants.d.ts +20 -0
- package/dist/tooltip-variants.d.ts +17 -0
- package/dist/types/ActionButton.d.ts +32 -0
- package/dist/types/AlertVariant.d.ts +16 -0
- package/dist/types/BadgeVariant.d.ts +16 -0
- package/dist/types/ButtonVariant.d.ts +17 -0
- package/dist/types/Classes.d.ts +1 -1
- package/dist/types/ColumnName.d.ts +1 -1
- package/dist/types/CommonProps.d.ts +68 -277
- package/dist/types/Config.d.ts +84 -0
- package/dist/types/ConfirmVariant.d.ts +15 -0
- package/dist/types/DropdownItemVariant.d.ts +18 -0
- package/dist/types/Icon.d.ts +5 -7
- package/dist/types/IndicatorVariant.d.ts +16 -0
- package/dist/types/InputDirection.d.ts +15 -0
- package/dist/types/ItemAccessor.d.ts +21 -0
- package/dist/types/Placement.d.ts +6 -0
- package/dist/types/ResponsiveSize.d.ts +20 -0
- package/dist/types/SizeScale.d.ts +8 -0
- package/dist/types/ToastVariant.d.ts +17 -0
- package/dist/types/TooltipVariant.d.ts +18 -0
- package/dist/utilities/functions/bytesToUnit.d.ts +2 -0
- package/dist/utilities/functions/bytesToUnit.js +18 -0
- package/dist/utilities/functions/clampPrecision.js +10 -0
- package/dist/utilities/functions/convertDateValue.d.ts +23 -10
- package/dist/utilities/functions/convertDateValue.js +12 -0
- package/dist/utilities/functions/deburr.js +5 -0
- package/dist/utilities/functions/empty.js +5 -0
- package/dist/utilities/functions/flattenTree.d.ts +1 -1
- package/dist/utilities/functions/hash.js +5 -0
- package/dist/utilities/functions/isDateDisabled.d.ts +1 -0
- package/dist/utilities/functions/isDateDisabled.js +20 -0
- package/dist/utilities/functions/isEqual.js +5 -0
- package/dist/utilities/functions/isNotEmpty.js +5 -0
- package/dist/utilities/functions/matchAnyKey.d.ts +1 -1
- package/dist/utilities/functions/matchAnyKey.js +15 -0
- package/dist/utilities/functions/parseSize.d.ts +1 -1
- package/dist/utilities/functions/parseSize.js +15 -0
- package/dist/utilities/functions/percentage.js +11 -0
- package/dist/utilities/functions/pipe.d.ts +1 -1
- package/dist/utilities/functions/reject.d.ts +25 -0
- package/dist/utilities/functions/reject.js +28 -0
- package/dist/utilities/functions/resolveEnumProp.d.ts +19 -0
- package/dist/utilities/functions/resolveEnumProp.js +5 -0
- package/dist/utilities/functions/slotKey.d.ts +13 -0
- package/dist/utilities/functions/slotKey.js +4 -0
- package/dist/utilities/functions/sort.d.ts +2 -2
- package/dist/utilities/functions/sort.js +19 -0
- package/dist/utilities/functions/throttle.js +5 -0
- package/dist/utilities/functions/waitFor.d.ts +9 -2
- package/dist/utilities/functions/waitFor.js +14 -0
- package/dist/utilities/functions/warnRemovedAttrs.d.ts +11 -0
- package/dist/utilities/functions/warnRemovedAttrs.js +20 -0
- package/dist/utilities/functions/when.js +5 -0
- package/dist/utilities/misc/iconsInjectionKey.d.ts +15 -0
- package/dist/utilities/misc/iconsInjectionKey.js +4 -0
- package/dist/utilities/misc/transitions.d.ts +5 -0
- package/dist/utilities/misc/transitions.js +8 -0
- package/dist/utils/injectLibraryStyles.d.ts +6 -0
- package/dist/utils/injectLibraryStyles.js +38 -0
- package/dist/validated/BbCheckbox.vue.d.ts +29 -0
- package/dist/validated/BbCheckbox.vue.js +5 -0
- package/dist/validated/BbCheckbox.vue_vue_type_script_setup_true_lang.js +75 -0
- package/dist/validated/BbCheckboxGroup.vue.d.ts +34 -0
- package/dist/validated/BbCheckboxGroup.vue.js +5 -0
- package/dist/validated/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +82 -0
- package/dist/validated/BbColorInput.vue.d.ts +36 -0
- package/dist/validated/BbColorInput.vue.js +5 -0
- package/dist/validated/BbColorInput.vue_vue_type_script_setup_true_lang.js +71 -0
- package/dist/validated/BbDatePickerInput.vue.d.ts +41 -0
- package/dist/validated/BbDatePickerInput.vue.js +5 -0
- package/dist/validated/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +90 -0
- package/dist/validated/BbDropzone.vue.d.ts +24 -0
- package/dist/validated/BbDropzone.vue.js +5 -0
- package/dist/validated/BbDropzone.vue_vue_type_script_setup_true_lang.js +45 -0
- package/dist/validated/BbForm.vue.d.ts +28 -0
- package/dist/validated/BbForm.vue.js +5 -0
- package/dist/validated/BbForm.vue_vue_type_script_setup_true_lang.js +42 -0
- package/dist/validated/BbNumberInput.vue.d.ts +36 -0
- package/dist/validated/BbNumberInput.vue.js +5 -0
- package/dist/validated/BbNumberInput.vue_vue_type_script_setup_true_lang.js +72 -0
- package/dist/validated/BbRadioGroup.vue.d.ts +34 -0
- package/dist/validated/BbRadioGroup.vue.js +5 -0
- package/dist/validated/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +78 -0
- package/dist/validated/BbRating.vue.d.ts +30 -0
- package/dist/validated/BbRating.vue.js +5 -0
- package/dist/validated/BbRating.vue_vue_type_script_setup_true_lang.js +63 -0
- package/dist/validated/BbSelect.vue.d.ts +46 -0
- package/dist/validated/BbSelect.vue.js +5 -0
- package/dist/validated/BbSelect.vue_vue_type_script_setup_true_lang.js +109 -0
- package/dist/validated/BbSlider.vue.d.ts +36 -0
- package/dist/validated/BbSlider.vue.js +5 -0
- package/dist/validated/BbSlider.vue_vue_type_script_setup_true_lang.js +69 -0
- package/dist/validated/BbSwitch.vue.d.ts +29 -0
- package/dist/validated/BbSwitch.vue.js +5 -0
- package/dist/validated/BbSwitch.vue_vue_type_script_setup_true_lang.js +75 -0
- package/dist/validated/BbSwitchGroup.vue.d.ts +34 -0
- package/dist/validated/BbSwitchGroup.vue.js +5 -0
- package/dist/validated/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +82 -0
- package/dist/validated/BbTag.vue.d.ts +36 -0
- package/dist/validated/BbTag.vue.js +5 -0
- package/dist/validated/BbTag.vue_vue_type_script_setup_true_lang.js +72 -0
- package/dist/validated/BbTextInput.vue.d.ts +36 -0
- package/dist/validated/BbTextInput.vue.js +5 -0
- package/dist/validated/BbTextInput.vue_vue_type_script_setup_true_lang.js +72 -0
- package/dist/validated/BbTextarea.vue.d.ts +36 -0
- package/dist/validated/BbTextarea.vue.js +5 -0
- package/dist/validated/BbTextarea.vue_vue_type_script_setup_true_lang.js +70 -0
- package/dist/validated/BbTimePickerInput.vue.d.ts +37 -0
- package/dist/validated/BbTimePickerInput.vue.js +5 -0
- package/dist/validated/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +81 -0
- package/dist/validated/index.d.ts +29 -0
- package/dist/validated/useValidatedField.d.ts +93 -0
- package/dist/validated/useValidatedField.js +51 -0
- package/dist/validated.js +21 -0
- package/dist/vite-plugin.d.ts +261 -0
- package/dist/vite.js +603 -0
- package/llms.txt +107 -0
- package/package.json +181 -60
- package/scripts/lib/__fixtures__/validated-manifest.json +65 -0
- package/scripts/lib/ensure-manifest.mjs +39 -0
- package/scripts/lib/eslint-plugin-autofix.node.test.mjs +109 -0
- package/scripts/lib/eslint-plugin-recommended.node.test.mjs +87 -0
- package/scripts/lib/eslint-plugin-slots.node.test.mjs +271 -0
- package/scripts/lib/eslint-plugin.mjs +702 -0
- package/scripts/lib/eslint-plugin.node.test.mjs +193 -0
- package/scripts/lib/html-attributes.mjs +191 -0
- package/scripts/lib/mcp-config.mjs +126 -0
- package/scripts/lib/migrate-fix.mjs +115 -0
- package/scripts/lib/validate-bb-markup.mjs +488 -0
- package/dist/ai/BaseButton.md +0 -449
- package/dist/ai/BaseCheckbox.md +0 -512
- package/dist/ai/BaseCheckboxGroup.md +0 -597
- package/dist/ai/BaseColorInput.md +0 -461
- package/dist/ai/BaseDatePicker.md +0 -739
- package/dist/ai/BaseDatePickerInput.md +0 -1517
- package/dist/ai/BaseDialog.md +0 -610
- package/dist/ai/BaseInputContainer.md +0 -570
- package/dist/ai/BaseNumberInput.md +0 -509
- package/dist/ai/BaseRadio.md +0 -405
- package/dist/ai/BaseRadioGroup.md +0 -535
- package/dist/ai/BaseRating.md +0 -489
- package/dist/ai/BaseSelect.md +0 -1742
- package/dist/ai/BaseSlider.md +0 -871
- package/dist/ai/BaseSwitch.md +0 -322
- package/dist/ai/BaseSwitchGroup.md +0 -298
- package/dist/ai/BaseTag.md +0 -623
- package/dist/ai/BaseTextInput.md +0 -392
- package/dist/ai/BaseTextarea.md +0 -398
- package/dist/ai/BbChip.md +0 -147
- package/dist/ai/BbIntersection.md +0 -120
- package/dist/ai/BbRatio.md +0 -61
- package/dist/ai/BbRows.md +0 -307
- package/dist/ai/BbTab.md +0 -950
- package/dist/ai/CommonInputInnerContainer.md +0 -414
- package/dist/ai/CommonInputOuterContainer.md +0 -55
- package/dist/components/BaseButton/BaseButton.vue.d.ts +0 -14
- package/dist/components/BaseButton/types.d.ts +0 -159
- package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +0 -39
- package/dist/components/BaseCheckbox/types.d.ts +0 -213
- package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +0 -30
- package/dist/components/BaseCheckboxGroup/types.d.ts +0 -282
- package/dist/components/BaseColorInput/BaseColorInput.vue.d.ts +0 -35
- package/dist/components/BaseColorInput/ColorPalette.vue.d.ts +0 -13
- package/dist/components/BaseColorInput/types.d.ts +0 -233
- package/dist/components/BaseDatePicker/BaseDatePickerHeader.vue.d.ts +0 -15
- package/dist/components/BaseDatePicker/BaseDatePickerInputDaySelector.vue.d.ts +0 -58
- package/dist/components/BaseDatePicker/BaseDatePickerMonthSelector.vue.d.ts +0 -12
- package/dist/components/BaseDatePicker/BaseDatePickerYearSelector.vue.d.ts +0 -12
- package/dist/components/BaseDatePicker/types.d.ts +0 -100
- package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +0 -26
- package/dist/components/BaseDatePickerInput/types.d.ts +0 -206
- package/dist/components/BaseDialog/BaseDialog.vue.d.ts +0 -37
- package/dist/components/BaseDialog/types.d.ts +0 -180
- package/dist/components/BaseInputContainer/BaseInputContainer.vue.d.ts +0 -18
- package/dist/components/BaseInputContainer/types.d.ts +0 -126
- package/dist/components/BaseNumberInput/BaseNumberInput.vue.d.ts +0 -46
- package/dist/components/BaseNumberInput/types.d.ts +0 -191
- package/dist/components/BaseRadio/BaseRadio.vue.d.ts +0 -31
- package/dist/components/BaseRadio/types.d.ts +0 -173
- package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +0 -30
- package/dist/components/BaseRadioGroup/types.d.ts +0 -240
- package/dist/components/BaseRating/BaseRating.vue.d.ts +0 -35
- package/dist/components/BaseRating/types.d.ts +0 -144
- package/dist/components/BaseSelect/BaseSelect.vue.d.ts +0 -28
- package/dist/components/BaseSelect/types.d.ts +0 -470
- package/dist/components/BaseSlider/BaseSlider.vue.d.ts +0 -38
- package/dist/components/BaseSlider/types.d.ts +0 -201
- package/dist/components/BaseSwitch/BaseSwitch.vue.d.ts +0 -34
- package/dist/components/BaseSwitch/types.d.ts +0 -25
- package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +0 -30
- package/dist/components/BaseSwitchGroup/types.d.ts +0 -8
- package/dist/components/BaseTag/BaseTag.vue.d.ts +0 -37
- package/dist/components/BaseTag/types.d.ts +0 -136
- package/dist/components/BaseTextInput/BaseTextInput.vue.d.ts +0 -33
- package/dist/components/BaseTextInput/types.d.ts +0 -166
- package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +0 -31
- package/dist/components/BaseTextarea/types.d.ts +0 -151
- package/dist/components/BbChip/BbChip.vue.d.ts +0 -17
- package/dist/components/BbChip/types.d.ts +0 -23
- package/dist/components/BbIntersection/BbIntersection.vue.d.ts +0 -23
- package/dist/components/BbIntersection/types.d.ts +0 -36
- package/dist/components/BbRatio/BbRatio.vue.d.ts +0 -14
- package/dist/components/BbRatio/types.d.ts +0 -15
- package/dist/components/BbRows/BbRows.vue.d.ts +0 -62
- package/dist/components/BbRows/types.d.ts +0 -21
- package/dist/components/BbTab/BbTab.vue.d.ts +0 -27
- package/dist/components/BbTab/types.d.ts +0 -186
- package/dist/components/CommonInputInnerContainer/CommonInputInnerContainer.vue.d.ts +0 -15
- package/dist/components/CommonInputInnerContainer/types.d.ts +0 -47
- package/dist/components/CommonInputOuterContainer/CommonInputOuterContainer.vue.d.ts +0 -11
- package/dist/components/CommonInputOuterContainer/types.d.ts +0 -16
- package/dist/composables/useModalsState.d.ts +0 -5
- package/dist/composables/useQueue.d.ts +0 -58
- package/dist/composables/useWizard.d.ts +0 -85
- package/dist/i18n/en.d.ts +0 -67
- package/dist/i18n/it.d.ts +0 -67
- package/dist/index.css +0 -2
- package/dist/index100.js +0 -6
- package/dist/index101.js +0 -300
- package/dist/index102.js +0 -16
- package/dist/index103.js +0 -16
- package/dist/index104.js +0 -27
- package/dist/index109.js +0 -19
- package/dist/index11.js +0 -42
- package/dist/index110.js +0 -12
- package/dist/index111.js +0 -19
- package/dist/index112.js +0 -25
- package/dist/index114.js +0 -7
- package/dist/index115.js +0 -241
- package/dist/index116.js +0 -5
- package/dist/index117.js +0 -42
- package/dist/index118.js +0 -5
- package/dist/index119.js +0 -53
- package/dist/index120.js +0 -5
- package/dist/index121.js +0 -32
- package/dist/index122.js +0 -5
- package/dist/index124.js +0 -52
- package/dist/index125.js +0 -5
- package/dist/index126.js +0 -223
- package/dist/index128.js +0 -6
- package/dist/index129.js +0 -162
- package/dist/index13.js +0 -92
- package/dist/index130.js +0 -25
- package/dist/index131.js +0 -51
- package/dist/index132.js +0 -5
- package/dist/index133.js +0 -607
- package/dist/index135.js +0 -6
- package/dist/index136.js +0 -14
- package/dist/index137.js +0 -153
- package/dist/index139.js +0 -6
- package/dist/index14.js +0 -306
- package/dist/index140.js +0 -224
- package/dist/index141.js +0 -5
- package/dist/index143.js +0 -128
- package/dist/index145.js +0 -6
- package/dist/index146.js +0 -8
- package/dist/index147.js +0 -182
- package/dist/index149.js +0 -6
- package/dist/index15.js +0 -10
- package/dist/index151.js +0 -4
- package/dist/index152.js +0 -95
- package/dist/index154.js +0 -6
- package/dist/index155.js +0 -168
- package/dist/index157.js +0 -6
- package/dist/index158.js +0 -145
- package/dist/index16.js +0 -59
- package/dist/index160.js +0 -6
- package/dist/index161.js +0 -53
- package/dist/index163.js +0 -6
- package/dist/index164.js +0 -16
- package/dist/index166.js +0 -35
- package/dist/index168.js +0 -6
- package/dist/index169.js +0 -89
- package/dist/index171.js +0 -6
- package/dist/index172.js +0 -82
- package/dist/index174.js +0 -6
- package/dist/index175.js +0 -38
- package/dist/index176.js +0 -461
- package/dist/index177.js +0 -28
- package/dist/index178.js +0 -66
- package/dist/index18.js +0 -35
- package/dist/index180.js +0 -162
- package/dist/index181.js +0 -5
- package/dist/index182.js +0 -217
- package/dist/index183.js +0 -5
- package/dist/index184.js +0 -112
- package/dist/index185.js +0 -5
- package/dist/index186.js +0 -459
- package/dist/index188.js +0 -6
- package/dist/index19.js +0 -4
- package/dist/index192.js +0 -268
- package/dist/index194.js +0 -6
- package/dist/index195.js +0 -124
- package/dist/index197.js +0 -6
- package/dist/index198.js +0 -174
- package/dist/index2.js +0 -20
- package/dist/index20.js +0 -9
- package/dist/index200.js +0 -6
- package/dist/index201.js +0 -224
- package/dist/index203.js +0 -6
- package/dist/index204.js +0 -135
- package/dist/index206.js +0 -6
- package/dist/index207.js +0 -5
- package/dist/index208.js +0 -170
- package/dist/index21.js +0 -35
- package/dist/index210.js +0 -6
- package/dist/index211.js +0 -37
- package/dist/index213.js +0 -6
- package/dist/index214.js +0 -63
- package/dist/index216.js +0 -6
- package/dist/index217.js +0 -74
- package/dist/index219.js +0 -6
- package/dist/index22.js +0 -6
- package/dist/index220.js +0 -65
- package/dist/index222.js +0 -6
- package/dist/index223.js +0 -67
- package/dist/index225.js +0 -6
- package/dist/index226.js +0 -41
- package/dist/index228.js +0 -6
- package/dist/index229.js +0 -10
- package/dist/index23.js +0 -7
- package/dist/index230.js +0 -22
- package/dist/index232.js +0 -8
- package/dist/index233.js +0 -297
- package/dist/index235.js +0 -6
- package/dist/index236.js +0 -47
- package/dist/index237.js +0 -165
- package/dist/index239.js +0 -6
- package/dist/index24.js +0 -9
- package/dist/index241.js +0 -159
- package/dist/index243.js +0 -6
- package/dist/index244.js +0 -134
- package/dist/index246.js +0 -6
- package/dist/index247.js +0 -167
- package/dist/index249.js +0 -6
- package/dist/index25.js +0 -24
- package/dist/index250.js +0 -147
- package/dist/index252.js +0 -6
- package/dist/index253.js +0 -35
- package/dist/index255.js +0 -6
- package/dist/index256.js +0 -65
- package/dist/index258.js +0 -6
- package/dist/index259.js +0 -19
- package/dist/index260.js +0 -5
- package/dist/index261.js +0 -160
- package/dist/index263.js +0 -6
- package/dist/index264.js +0 -60
- package/dist/index266.js +0 -6
- package/dist/index267.js +0 -134
- package/dist/index269.js +0 -6
- package/dist/index27.js +0 -4
- package/dist/index271.js +0 -206
- package/dist/index273.js +0 -6
- package/dist/index274.js +0 -85
- package/dist/index275.js +0 -5
- package/dist/index276.js +0 -55
- package/dist/index277.js +0 -5
- package/dist/index278.js +0 -164
- package/dist/index28.js +0 -8
- package/dist/index280.js +0 -6
- package/dist/index281.js +0 -145
- package/dist/index283.js +0 -6
- package/dist/index284.js +0 -11
- package/dist/index285.js +0 -200
- package/dist/index287.js +0 -6
- package/dist/index288.js +0 -241
- package/dist/index29.js +0 -7
- package/dist/index290.js +0 -6
- package/dist/index291.js +0 -21
- package/dist/index293.js +0 -6
- package/dist/index294.js +0 -125
- package/dist/index296.js +0 -6
- package/dist/index297.js +0 -161
- package/dist/index299.js +0 -6
- package/dist/index30.js +0 -118
- package/dist/index300.js +0 -127
- package/dist/index302.js +0 -6
- package/dist/index303.js +0 -20
- package/dist/index305.js +0 -6
- package/dist/index306.js +0 -116
- package/dist/index307.js +0 -5
- package/dist/index308.js +0 -507
- package/dist/index31.js +0 -10
- package/dist/index310.js +0 -6
- package/dist/index311.js +0 -196
- package/dist/index313.js +0 -6
- package/dist/index314.js +0 -142
- package/dist/index316.js +0 -6
- package/dist/index317.js +0 -134
- package/dist/index319.js +0 -6
- package/dist/index32.js +0 -28
- package/dist/index320.js +0 -162
- package/dist/index322.js +0 -6
- package/dist/index323.js +0 -319
- package/dist/index325.js +0 -6
- package/dist/index326.js +0 -40
- package/dist/index327.js +0 -43
- package/dist/index328.js +0 -665
- package/dist/index33.js +0 -5
- package/dist/index330.js +0 -6
- package/dist/index331.js +0 -155
- package/dist/index333.js +0 -6
- package/dist/index334.js +0 -142
- package/dist/index336.js +0 -6
- package/dist/index337.js +0 -155
- package/dist/index339.js +0 -6
- package/dist/index34.js +0 -112
- package/dist/index340.js +0 -58
- package/dist/index341.js +0 -5
- package/dist/index342.js +0 -20
- package/dist/index344.js +0 -6
- package/dist/index345.js +0 -142
- package/dist/index347.js +0 -6
- package/dist/index349.js +0 -109
- package/dist/index351.js +0 -6
- package/dist/index352.js +0 -55
- package/dist/index353.js +0 -24
- package/dist/index354.js +0 -23
- package/dist/index355.js +0 -839
- package/dist/index356.js +0 -474
- package/dist/index357.js +0 -52
- package/dist/index358.js +0 -7
- package/dist/index36.js +0 -6
- package/dist/index38.js +0 -63
- package/dist/index39.js +0 -63
- package/dist/index40.js +0 -9
- package/dist/index42.js +0 -8
- package/dist/index43.js +0 -179
- package/dist/index44.js +0 -21
- package/dist/index46.js +0 -385
- package/dist/index48.js +0 -6
- package/dist/index49.js +0 -33
- package/dist/index5.js +0 -34
- package/dist/index50.js +0 -12
- package/dist/index51.js +0 -8
- package/dist/index52.js +0 -106
- package/dist/index53.js +0 -330
- package/dist/index54.js +0 -97
- package/dist/index55.js +0 -328
- package/dist/index56.js +0 -28
- package/dist/index57.js +0 -102
- package/dist/index58.js +0 -157
- package/dist/index6.js +0 -38
- package/dist/index60.js +0 -6
- package/dist/index61.js +0 -131
- package/dist/index62.js +0 -5
- package/dist/index65.js +0 -35
- package/dist/index66.js +0 -26
- package/dist/index68.js +0 -6
- package/dist/index69.js +0 -54
- package/dist/index7.js +0 -58
- package/dist/index71.js +0 -6
- package/dist/index72.js +0 -14
- package/dist/index74.js +0 -6
- package/dist/index75.js +0 -159
- package/dist/index77.js +0 -6
- package/dist/index78.js +0 -4
- package/dist/index79.js +0 -4
- package/dist/index80.js +0 -54
- package/dist/index81.js +0 -5
- package/dist/index82.js +0 -5
- package/dist/index83.js +0 -141
- package/dist/index85.js +0 -6
- package/dist/index86.js +0 -65
- package/dist/index88.js +0 -6
- package/dist/index89.js +0 -30
- package/dist/index9.js +0 -11
- package/dist/index90.js +0 -19
- package/dist/index91.js +0 -17
- package/dist/index92.js +0 -9
- package/dist/index93.js +0 -34
- package/dist/index95.js +0 -16
- package/dist/index96.js +0 -10
- package/dist/index97.js +0 -18
- package/dist/index98.js +0 -189
- package/dist/types/VoidHtmlElements.d.ts +0 -1
- package/dist/utilities/functions/add.d.ts +0 -1
- package/dist/utilities/functions/booleanishToBoolean.d.ts +0 -6
- package/dist/utilities/functions/capitalize.d.ts +0 -4
- package/dist/utilities/functions/cloneDeep.d.ts +0 -1
- package/dist/utilities/functions/debounce.d.ts +0 -1
- package/dist/utilities/functions/drop.d.ts +0 -1
- package/dist/utilities/functions/exceedsPrecision.d.ts +0 -1
- package/dist/utilities/functions/findRight.d.ts +0 -4
- package/dist/utilities/functions/findRightIndex.d.ts +0 -4
- package/dist/utilities/functions/flow.d.ts +0 -1
- package/dist/utilities/functions/getHueFromRGB.d.ts +0 -9
- package/dist/utilities/functions/groupBy.d.ts +0 -6
- package/dist/utilities/functions/gt.d.ts +0 -7
- package/dist/utilities/functions/hexToRGB.d.ts +0 -7
- package/dist/utilities/functions/hslToHex.d.ts +0 -1
- package/dist/utilities/functions/includes.d.ts +0 -1
- package/dist/utilities/functions/initial.d.ts +0 -1
- package/dist/utilities/functions/isCssColor.d.ts +0 -5
- package/dist/utilities/functions/lt.d.ts +0 -7
- package/dist/utilities/functions/makeUrl.d.ts +0 -1
- package/dist/utilities/functions/mapKeys.d.ts +0 -5
- package/dist/utilities/functions/mapValues.d.ts +0 -1
- package/dist/utilities/functions/matchesPropertyInsensitive.d.ts +0 -1
- package/dist/utilities/functions/max.d.ts +0 -2
- package/dist/utilities/functions/mean.d.ts +0 -4
- package/dist/utilities/functions/merge.d.ts +0 -11
- package/dist/utilities/functions/millisecondsTo.d.ts +0 -1
- package/dist/utilities/functions/negate.d.ts +0 -4
- package/dist/utilities/functions/normalizeItemGroups.d.ts +0 -13
- package/dist/utilities/functions/omit.d.ts +0 -2
- package/dist/utilities/functions/overEvery.d.ts +0 -4
- package/dist/utilities/functions/pick.d.ts +0 -1
- package/dist/utilities/functions/replace.d.ts +0 -1
- package/dist/utilities/functions/replaceInTree.d.ts +0 -4
- package/dist/utilities/functions/retry.d.ts +0 -5
- package/dist/utilities/functions/roundToTheNearest.d.ts +0 -8
- package/dist/utilities/functions/set.d.ts +0 -15
- package/dist/utilities/functions/stub.d.ts +0 -6
- package/dist/utilities/functions/transposePercent.d.ts +0 -9
- package/dist/utilities/functions/tryTo.d.ts +0 -2
- package/dist/utilities/functions/uniqBy.d.ts +0 -1
- /package/dist/{index64.js → _virtual/_plugin-vue_export-helper.js} +0 -0
- /package/dist/components/{BaseButton → BbBaseButton}/RouterComponent.vue.d.ts +0 -0
- /package/dist/components/{BaseDatePicker/BaseDatePicker.vue.d.ts → BbBaseDatePicker/BbBaseDatePicker.vue.d.ts} +0 -0
- /package/dist/{index165.js → composables/useArray.js} +0 -0
- /package/dist/{index17.js → composables/useFrameworkDetection.js} +0 -0
- /package/dist/{index12.js → composables/useId.js} +0 -0
- /package/dist/{index107.js → utilities/functions/chunk.js} +0 -0
- /package/dist/{index8.js → utilities/functions/clamp.js} +0 -0
- /package/dist/{index150.js → utilities/functions/curry.js} +0 -0
- /package/dist/{index45.js → utilities/functions/extractDomContainer.js} +0 -0
- /package/dist/{index270.js → utilities/functions/findInTree.js} +0 -0
- /package/dist/{index348.js → utilities/functions/flattenTree.js} +0 -0
- /package/dist/{index41.js → utilities/functions/get.js} +0 -0
- /package/dist/{index189.js → utilities/functions/head.js} +0 -0
- /package/dist/{index108.js → utilities/functions/identity.js} +0 -0
- /package/dist/{index179.js → utilities/functions/indexBy.js} +0 -0
- /package/dist/{index37.js → utilities/functions/isHex.js} +0 -0
- /package/dist/{index94.js → utilities/functions/isNil.js} +0 -0
- /package/dist/{index26.js → utilities/functions/isNotNil.js} +0 -0
- /package/dist/{index105.js → utilities/functions/last.js} +0 -0
- /package/dist/{index142.js → utilities/functions/noop.js} +0 -0
- /package/dist/{index231.js → utilities/functions/parseWidthString.js} +0 -0
- /package/dist/{index240.js → utilities/functions/pickBy.js} +0 -0
- /package/dist/{index123.js → utilities/functions/range.js} +0 -0
- /package/dist/{index190.js → utilities/functions/snapToStep.js} +0 -0
- /package/dist/{index191.js → utilities/functions/transpose.js} +0 -0
- /package/dist/{index106.js → utilities/functions/validateDateFormat.js} +0 -0
- /package/dist/{index10.js → utilities/functions/wait.js} +0 -0
|
@@ -0,0 +1,1266 @@
|
|
|
1
|
+
# BbOffCanvas — Implementation Source
|
|
2
|
+
|
|
3
|
+
> Full implementation for deep dives. For everyday usage read the typed contract: [../BbOffCanvas.md](../BbOffCanvas.md).
|
|
4
|
+
|
|
5
|
+
## Template & Script
|
|
6
|
+
|
|
7
|
+
```vue
|
|
8
|
+
<template>
|
|
9
|
+
<dialog
|
|
10
|
+
ref="dialog"
|
|
11
|
+
:aria-labelledby="hasRenderedAtLeastOnce && title ? titleId : undefined"
|
|
12
|
+
:aria-live="model ? 'polite' : 'off'"
|
|
13
|
+
class="bb-offcanvas"
|
|
14
|
+
:class="
|
|
15
|
+
[
|
|
16
|
+
{
|
|
17
|
+
'bb-offcanvas--open': model,
|
|
18
|
+
'bb-offcanvas--visible': isVisible,
|
|
19
|
+
'bb-offcanvas--fullscreen': isFullscreen,
|
|
20
|
+
'bb-offcanvas--deny-close': denyClose,
|
|
21
|
+
'bb-offcanvas--dragging': isDragging,
|
|
22
|
+
'bb-offcanvas--instant-stack': instantStack,
|
|
23
|
+
'bb-offcanvas--covered': isCovered,
|
|
24
|
+
'bb-offcanvas--has-handle': draggable,
|
|
25
|
+
'bb-offcanvas--no-header': !renderHeader(),
|
|
26
|
+
[`bb-offcanvas--${props.side}`]: true,
|
|
27
|
+
},
|
|
28
|
+
].flat()
|
|
29
|
+
"
|
|
30
|
+
:inert="(!model && !isVisible) || isCovered"
|
|
31
|
+
:style="{
|
|
32
|
+
'--max-size': maxSize,
|
|
33
|
+
'--transition-duration': `${props.transitionDuration}ms`,
|
|
34
|
+
'--stack-gap': `${props.stackGap}px`,
|
|
35
|
+
...stackStyle,
|
|
36
|
+
}"
|
|
37
|
+
@cancel="cancelableClose"
|
|
38
|
+
@click.self="onBackdropClick"
|
|
39
|
+
@pointercancel="resetBackdropPointerState"
|
|
40
|
+
@pointerdown="onPanelPointerDown"
|
|
41
|
+
>
|
|
42
|
+
<template v-if="hasRenderedAtLeastOnce">
|
|
43
|
+
<div
|
|
44
|
+
v-if="draggable"
|
|
45
|
+
aria-hidden="true"
|
|
46
|
+
class="bb-offcanvas__handle"
|
|
47
|
+
></div>
|
|
48
|
+
<div v-if="renderHeader()" class="bb-offcanvas__header">
|
|
49
|
+
<slot :close="close" name="header" :title="title" :title-id="titleId">
|
|
50
|
+
<span :id="titleId" class="bb-offcanvas__title">
|
|
51
|
+
<slot name="title" :text="title">{{ title }}</slot>
|
|
52
|
+
</span>
|
|
53
|
+
<CloseButton
|
|
54
|
+
v-if="!hideClose"
|
|
55
|
+
:aria-label="t('offCanvas.closeLabel').value"
|
|
56
|
+
@click="onCloseButtonClick"
|
|
57
|
+
/>
|
|
58
|
+
</slot>
|
|
59
|
+
</div>
|
|
60
|
+
<div ref="body" class="bb-offcanvas__body scrollbar-border">
|
|
61
|
+
<div class="bb-offcanvas__body-content">
|
|
62
|
+
<slot :close="close"></slot>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<div class="bb-offcanvas__footer">
|
|
67
|
+
<slot name="footer"></slot>
|
|
68
|
+
</div>
|
|
69
|
+
</template>
|
|
70
|
+
</dialog>
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<script setup lang="ts">
|
|
74
|
+
import {
|
|
75
|
+
computed,
|
|
76
|
+
nextTick,
|
|
77
|
+
onBeforeUnmount,
|
|
78
|
+
onMounted,
|
|
79
|
+
ref,
|
|
80
|
+
watch,
|
|
81
|
+
type Ref,
|
|
82
|
+
} from 'vue';
|
|
83
|
+
import { useWindowSize } from '@vueuse/core';
|
|
84
|
+
import { parseSize } from '@/utilities/functions/parseSize';
|
|
85
|
+
import { useId } from '@/composables/useId';
|
|
86
|
+
import { useLocale } from '@/composables/useLocale';
|
|
87
|
+
import { useMobile } from '@/composables/useMobile';
|
|
88
|
+
import { useBreakpoint } from '@/composables/useBreakpoint';
|
|
89
|
+
import { useUntil } from '@/composables/useUntil';
|
|
90
|
+
import { removedPropsFor } from '@/deprecation/removedProps';
|
|
91
|
+
import { warnRemovedAttrs } from '@/utilities/functions/warnRemovedAttrs';
|
|
92
|
+
import { wait } from '@/utilities/functions/wait';
|
|
93
|
+
import { transitions } from '@/utilities/misc/transitions';
|
|
94
|
+
import { config } from 'virtual:bitboss-ui/config';
|
|
95
|
+
import CloseButton from '../CloseIcon/CloseButton.vue';
|
|
96
|
+
import { useOffCanvasStack } from './useOffCanvasStack';
|
|
97
|
+
import { registerTopLayerHost } from '@/composables/useTopLayer';
|
|
98
|
+
import type {
|
|
99
|
+
BbOffCanvasProps,
|
|
100
|
+
BbOffCanvasEvents,
|
|
101
|
+
BbOffCanvasSlots,
|
|
102
|
+
Sizes,
|
|
103
|
+
} from './types';
|
|
104
|
+
export type { BbOffCanvasProps, BbOffCanvasEvents, BbOffCanvasSlots, Sizes };
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Used by v-model to open / close the panel. A panel with no `v-model`
|
|
108
|
+
* starts closed.
|
|
109
|
+
*
|
|
110
|
+
* @defaultValue `false`
|
|
111
|
+
*/
|
|
112
|
+
const model = defineModel<boolean>({ default: false });
|
|
113
|
+
|
|
114
|
+
const props = withDefaults(defineProps<BbOffCanvasProps>(), {
|
|
115
|
+
side: 'left',
|
|
116
|
+
size: 'sm',
|
|
117
|
+
transitionDuration: transitions.medium,
|
|
118
|
+
draggable: false,
|
|
119
|
+
stackGap: 60,
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
const emit = defineEmits<BbOffCanvasEvents>();
|
|
123
|
+
|
|
124
|
+
const slots = defineSlots<BbOffCanvasSlots>();
|
|
125
|
+
|
|
126
|
+
if (process.env.NODE_ENV !== 'production')
|
|
127
|
+
warnRemovedAttrs('BbOffCanvas', removedPropsFor('BbOffCanvas'));
|
|
128
|
+
|
|
129
|
+
const { t } = useLocale();
|
|
130
|
+
// A function, not a cached computed: `$slots` is not a reactive dependency, so a
|
|
131
|
+
// computed would latch its first value and miss a slot that appears later (e.g.
|
|
132
|
+
// BbDropdown's adaptive sheet only provides `#header` once you drill into a
|
|
133
|
+
// submenu). Evaluated per render, it tracks the slot's presence correctly.
|
|
134
|
+
const renderHeader = () => !!props.title || !!slots.header;
|
|
135
|
+
const shouldPreventClose = computed(
|
|
136
|
+
() => !!(props.disabled || props.persistent)
|
|
137
|
+
);
|
|
138
|
+
const hasDocument = () => typeof document !== 'undefined';
|
|
139
|
+
|
|
140
|
+
const dialog = ref<HTMLDialogElement | null>(null);
|
|
141
|
+
const hasRenderedAtLeastOnce: Ref<boolean> = useUntil(
|
|
142
|
+
() => model.value || props.eager,
|
|
143
|
+
{
|
|
144
|
+
initialValue: model.value || props.eager,
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
|
|
148
|
+
const titleId = `title_${useId().id.value}`;
|
|
149
|
+
const openedTimes = ref(0);
|
|
150
|
+
const isVisible = ref(false);
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Maximum pointer travel (in px) that is still considered an intentional click.
|
|
154
|
+
*/
|
|
155
|
+
const BACKDROP_CLICK_MOVE_THRESHOLD = 4;
|
|
156
|
+
const backdropPointerState = ref<{
|
|
157
|
+
startX: number;
|
|
158
|
+
startY: number;
|
|
159
|
+
startedOnBackdrop: boolean;
|
|
160
|
+
} | null>(null);
|
|
161
|
+
|
|
162
|
+
const resetBackdropPointerState = () => {
|
|
163
|
+
backdropPointerState.value = null;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
const onBackdropPointerDown = (event: PointerEvent) => {
|
|
167
|
+
backdropPointerState.value = {
|
|
168
|
+
startX: event.clientX,
|
|
169
|
+
startY: event.clientY,
|
|
170
|
+
startedOnBackdrop: event.target === event.currentTarget,
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
const onBackdropClick = (event: MouseEvent) => {
|
|
175
|
+
const pointerState = backdropPointerState.value;
|
|
176
|
+
resetBackdropPointerState();
|
|
177
|
+
|
|
178
|
+
if (pointerState && !pointerState.startedOnBackdrop) return;
|
|
179
|
+
|
|
180
|
+
const movedTooMuch =
|
|
181
|
+
pointerState &&
|
|
182
|
+
(Math.abs(event.clientX - pointerState.startX) >
|
|
183
|
+
BACKDROP_CLICK_MOVE_THRESHOLD ||
|
|
184
|
+
Math.abs(event.clientY - pointerState.startY) >
|
|
185
|
+
BACKDROP_CLICK_MOVE_THRESHOLD);
|
|
186
|
+
if (movedTooMuch) return;
|
|
187
|
+
|
|
188
|
+
cancelableClose(event);
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
let denyCloseTimer: ReturnType<typeof setTimeout> | undefined;
|
|
192
|
+
const triggerDenyCloseFeedback = (durationMs: number) => {
|
|
193
|
+
clearTimeout(denyCloseTimer);
|
|
194
|
+
denyClose.value = true;
|
|
195
|
+
denyCloseTimer = setTimeout(() => {
|
|
196
|
+
denyClose.value = false;
|
|
197
|
+
}, durationMs);
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
const addEscapeListener = () => {
|
|
201
|
+
if (!hasDocument()) return;
|
|
202
|
+
document.addEventListener('keydown', handleKeyDown, { capture: true });
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
const removeEscapeListener = () => {
|
|
206
|
+
if (!hasDocument()) return;
|
|
207
|
+
document.removeEventListener('keydown', handleKeyDown, { capture: true });
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
const focusDialogTarget = () => {
|
|
211
|
+
if (!props.focusTarget) return;
|
|
212
|
+
const element = dialog.value?.querySelector(props.focusTarget);
|
|
213
|
+
if (!(element instanceof HTMLElement)) return;
|
|
214
|
+
element.focus();
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
// Nested surfaces that own their own Escape handling (dropdown menus and any
|
|
218
|
+
// CommonPopover-based flyout: select popover, tooltip, popover, color palette).
|
|
219
|
+
const NESTED_ESCAPE_SURFACES =
|
|
220
|
+
'[data-bb-dropdown-surface], [popover]:popover-open';
|
|
221
|
+
|
|
222
|
+
const handleKeyDown = (e: KeyboardEvent) => {
|
|
223
|
+
if (e.key !== 'Escape') return;
|
|
224
|
+
// A covered panel (a deeper member of the same stack sits on top) must not
|
|
225
|
+
// consume the global Escape — the visible top member owns it.
|
|
226
|
+
if (isCovered.value) return;
|
|
227
|
+
// Escape fired inside an open nested surface: let that surface's own handler
|
|
228
|
+
// run instead of stealing the key and closing the panel underneath it.
|
|
229
|
+
if ((e.target as Element | null)?.closest?.(NESTED_ESCAPE_SURFACES)) return;
|
|
230
|
+
e.stopImmediatePropagation();
|
|
231
|
+
if (shouldPreventClose.value) {
|
|
232
|
+
e.preventDefault();
|
|
233
|
+
triggerDenyCloseFeedback(200);
|
|
234
|
+
return false;
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
let releaseTopLayer: (() => void) | null = null;
|
|
238
|
+
const toggleDialog = async (value: boolean) => {
|
|
239
|
+
if (value) {
|
|
240
|
+
emit('show');
|
|
241
|
+
openedTimes.value++;
|
|
242
|
+
// On first opening set variable for scrollbar width that is used to pad the body
|
|
243
|
+
if (
|
|
244
|
+
hasDocument() &&
|
|
245
|
+
!document.documentElement.style.getPropertyValue('--scrollbar-width')
|
|
246
|
+
) {
|
|
247
|
+
document.documentElement.style.setProperty(
|
|
248
|
+
'--scrollbar-width',
|
|
249
|
+
`${getScrollBarWidth()}px`
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
addEscapeListener();
|
|
253
|
+
await nextTick();
|
|
254
|
+
isVisible.value = true;
|
|
255
|
+
// Guard against double-open: a reopen during the close transition (below)
|
|
256
|
+
// resumes here while still natively open, and showModal() throws on an
|
|
257
|
+
// already-open dialog. enterStack/registerTopLayerHost dedupe.
|
|
258
|
+
if (dialog.value && !dialog.value.open) dialog.value.showModal();
|
|
259
|
+
// Register after showModal so the panel can be measured at full size.
|
|
260
|
+
enterStack();
|
|
261
|
+
// Host toasts inside the modal so they stay interactive (see useTopLayer).
|
|
262
|
+
if (dialog.value) releaseTopLayer = registerTopLayerHost(dialog.value);
|
|
263
|
+
focusDialogTarget();
|
|
264
|
+
emit('shown');
|
|
265
|
+
} else {
|
|
266
|
+
emit('hide');
|
|
267
|
+
const currentOpenedTimes = openedTimes.value;
|
|
268
|
+
await wait(props.transitionDuration);
|
|
269
|
+
// Reopened during the transition — keep it open, and keep its stack
|
|
270
|
+
// membership + top-layer host intact (they were never released).
|
|
271
|
+
if (currentOpenedTimes !== openedTimes.value) return;
|
|
272
|
+
removeEscapeListener();
|
|
273
|
+
leaveStack();
|
|
274
|
+
dialog.value?.close();
|
|
275
|
+
// Release the top-layer host only after close(): releasing at close-start
|
|
276
|
+
// would re-home body toasts under a still-modal panel, freezing them for
|
|
277
|
+
// the whole transition.
|
|
278
|
+
releaseTopLayer?.();
|
|
279
|
+
releaseTopLayer = null;
|
|
280
|
+
isVisible.value = false;
|
|
281
|
+
clearDragVisual();
|
|
282
|
+
emit('hidden');
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
watch(model, toggleDialog);
|
|
287
|
+
onMounted(() => {
|
|
288
|
+
if (model.value) toggleDialog(true);
|
|
289
|
+
});
|
|
290
|
+
onBeforeUnmount(() => {
|
|
291
|
+
clearTimeout(denyCloseTimer);
|
|
292
|
+
removeEscapeListener();
|
|
293
|
+
teardownGestureListeners();
|
|
294
|
+
leaveStack();
|
|
295
|
+
releaseTopLayer?.();
|
|
296
|
+
releaseTopLayer = null;
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
const maxSize = computed(() => {
|
|
300
|
+
if (isFullscreen.value) return '100%';
|
|
301
|
+
// Resolve the responsive size first: a bare size never reads the reactive
|
|
302
|
+
// breakpoint (see useBreakpoint), so a static panel stays width-inert; only
|
|
303
|
+
// a per-breakpoint map reacts to resize. `'auto'` can sit in any entry.
|
|
304
|
+
const size = resolveResponsive(props.size);
|
|
305
|
+
if (size === 'auto') return 'fit-content';
|
|
306
|
+
return parseSize(size, config.offCanvasDefaultSizes);
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* This function is called when the user attempts to close the dialog.
|
|
311
|
+
* It differs from programmatically closing the dialog in that it allows for
|
|
312
|
+
* custom logic to be executed.
|
|
313
|
+
*/
|
|
314
|
+
const cancelableClose = (event: Event) => {
|
|
315
|
+
event.preventDefault();
|
|
316
|
+
if (shouldPreventClose.value) {
|
|
317
|
+
triggerDenyCloseFeedback(300);
|
|
318
|
+
return false;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
close();
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
const close = () => {
|
|
325
|
+
model.value = false;
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Header close (×) button handler. Unlike backdrop/Escape, the × still closes
|
|
330
|
+
* a `persistent` drawer (it is the documented escape hatch), but it must
|
|
331
|
+
* respect `disabled` — a busy drawer (e.g. save in flight) cannot be
|
|
332
|
+
* dismissed. Denial plays the same nudge feedback as backdrop/Escape.
|
|
333
|
+
*/
|
|
334
|
+
const onCloseButtonClick = () => {
|
|
335
|
+
if (props.disabled) {
|
|
336
|
+
triggerDenyCloseFeedback(300);
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
close();
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
const denyClose = ref(false);
|
|
343
|
+
|
|
344
|
+
const getScrollBarWidth = () => {
|
|
345
|
+
if (!hasDocument()) return 0;
|
|
346
|
+
return window.innerWidth - document.documentElement.clientWidth;
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
const { isMobile } = useMobile();
|
|
350
|
+
const { resolve: resolveResponsive } = useBreakpoint();
|
|
351
|
+
const isFullscreen = computed(
|
|
352
|
+
() =>
|
|
353
|
+
props.fullscreen === true ||
|
|
354
|
+
(props.fullscreen === 'mobile' && isMobile.value)
|
|
355
|
+
);
|
|
356
|
+
|
|
357
|
+
// ---------------------------------------------------------------------------
|
|
358
|
+
// Stacking — parents shift inward so a band peeks past the front-most child.
|
|
359
|
+
// ---------------------------------------------------------------------------
|
|
360
|
+
const stackId = Symbol('bb-offcanvas');
|
|
361
|
+
const {
|
|
362
|
+
stacks,
|
|
363
|
+
push: pushStack,
|
|
364
|
+
setSize: setStackSize,
|
|
365
|
+
remove: removeStack,
|
|
366
|
+
offset,
|
|
367
|
+
openOrder,
|
|
368
|
+
registerOpen,
|
|
369
|
+
deregisterOpen,
|
|
370
|
+
} = useOffCanvasStack();
|
|
371
|
+
|
|
372
|
+
/** Axis the panel travels along: horizontal for left/right, vertical otherwise. */
|
|
373
|
+
const dragAxis = computed<'x' | 'y'>(() =>
|
|
374
|
+
props.side === 'left' || props.side === 'right' ? 'x' : 'y'
|
|
375
|
+
);
|
|
376
|
+
/** +1 when the panel exits toward the positive axis end (right / bottom). */
|
|
377
|
+
const closeSign = computed(() =>
|
|
378
|
+
props.side === 'right' || props.side === 'bottom' ? 1 : -1
|
|
379
|
+
);
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* The stack this drawer joins. Falls back to a per-instance unique name so a
|
|
383
|
+
* drawer with no `stack` prop stacks with nothing.
|
|
384
|
+
*/
|
|
385
|
+
const autoStackName = `bb-offcanvas-${useId().id.value}`;
|
|
386
|
+
const stackName = computed(() => props.stack || autoStackName);
|
|
387
|
+
/** The name we are currently registered under, so we can migrate/unregister cleanly. */
|
|
388
|
+
let registeredStack: string | null = null;
|
|
389
|
+
|
|
390
|
+
/** Rendered extent of the panel along its travel axis, in px. */
|
|
391
|
+
const measureSize = () => {
|
|
392
|
+
const rect = dialog.value?.getBoundingClientRect();
|
|
393
|
+
if (!rect) return 0;
|
|
394
|
+
return dragAxis.value === 'x' ? rect.width : rect.height;
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
// Keep the registry in sync when the panel's own size changes (content grows,
|
|
398
|
+
// `size="auto"` reflow, responsive layout …) so the whole stack re-evaluates.
|
|
399
|
+
let sizeObserver: ResizeObserver | null = null;
|
|
400
|
+
const observeSize = () => {
|
|
401
|
+
if (typeof ResizeObserver === 'undefined' || !dialog.value) return;
|
|
402
|
+
sizeObserver = new ResizeObserver(() => {
|
|
403
|
+
if (registeredStack !== null)
|
|
404
|
+
setStackSize(registeredStack, stackId, measureSize());
|
|
405
|
+
});
|
|
406
|
+
sizeObserver.observe(dialog.value);
|
|
407
|
+
};
|
|
408
|
+
const unobserveSize = () => {
|
|
409
|
+
sizeObserver?.disconnect();
|
|
410
|
+
sizeObserver = null;
|
|
411
|
+
};
|
|
412
|
+
|
|
413
|
+
const enterStack = () => {
|
|
414
|
+
registeredStack = stackName.value;
|
|
415
|
+
pushStack(
|
|
416
|
+
registeredStack,
|
|
417
|
+
stackId,
|
|
418
|
+
props.side,
|
|
419
|
+
measureSize(),
|
|
420
|
+
props.stackGap
|
|
421
|
+
);
|
|
422
|
+
registerOpen(stackId);
|
|
423
|
+
observeSize();
|
|
424
|
+
};
|
|
425
|
+
const leaveStack = () => {
|
|
426
|
+
unobserveSize();
|
|
427
|
+
deregisterOpen(stackId);
|
|
428
|
+
if (registeredStack === null) return;
|
|
429
|
+
removeStack(registeredStack, stackId);
|
|
430
|
+
registeredStack = null;
|
|
431
|
+
};
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* The top *two* open offcanvases keep their blurred/dimmed backdrop; every panel
|
|
435
|
+
* beneath them is `covered` (transparent backdrop). Two rather than one so that
|
|
436
|
+
* when the front panel closes, the panel behind it is already blurred — there is
|
|
437
|
+
* no frame where the reinstating blur leaves an unblurred surface showing.
|
|
438
|
+
*/
|
|
439
|
+
const BLURRED_LAYERS = 2;
|
|
440
|
+
const isCovered = computed(() => {
|
|
441
|
+
const index = openOrder.value.indexOf(stackId);
|
|
442
|
+
return (
|
|
443
|
+
isVisible.value &&
|
|
444
|
+
index !== -1 &&
|
|
445
|
+
index < openOrder.value.length - BLURRED_LAYERS
|
|
446
|
+
);
|
|
447
|
+
});
|
|
448
|
+
|
|
449
|
+
// Re-register if the `stack` name, `direction` or `stackGap` changes while open,
|
|
450
|
+
// so the registry's bookkeeping (order, direction, size, gap) stays in sync.
|
|
451
|
+
watch([stackName, () => props.side, () => props.stackGap], ([name]) => {
|
|
452
|
+
if (registeredStack === null) return;
|
|
453
|
+
removeStack(registeredStack, stackId);
|
|
454
|
+
registeredStack = name;
|
|
455
|
+
pushStack(name, stackId, props.side, measureSize(), props.stackGap);
|
|
456
|
+
});
|
|
457
|
+
|
|
458
|
+
const { width: viewportWidth, height: viewportHeight } = useWindowSize();
|
|
459
|
+
/** Page margin a dialog keeps from the viewport edge (mirrors `--page-padding`). */
|
|
460
|
+
const pageMargin = computed(() => (isMobile.value ? 14 : 20));
|
|
461
|
+
|
|
462
|
+
const stackStyle = computed<Record<string, string>>(() => {
|
|
463
|
+
// Touch `stacks` so the offset recomputes when any peer opens/closes/resizes.
|
|
464
|
+
void stacks.value;
|
|
465
|
+
const viewport =
|
|
466
|
+
dragAxis.value === 'x' ? viewportWidth.value : viewportHeight.value;
|
|
467
|
+
const shift = offset(stackName.value, stackId, viewport, pageMargin.value);
|
|
468
|
+
const key = dragAxis.value === 'x' ? '--stack-x' : '--stack-y';
|
|
469
|
+
// `--stack-fill` pads the panel's colour back out to the anchored screen edge
|
|
470
|
+
// so no empty band shows when a descendant is dragged away or resized smaller.
|
|
471
|
+
return {
|
|
472
|
+
[key]: `${-closeSign.value * shift}px`,
|
|
473
|
+
'--stack-fill': `${shift}px`,
|
|
474
|
+
};
|
|
475
|
+
});
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Snap the stack instantly (no transition) while a peer is resizing — a resize
|
|
479
|
+
* fires continuously, and a 250ms transition would leave parents lagging far
|
|
480
|
+
* behind the live size, tearing a gap. Open/close still animates: those change
|
|
481
|
+
* the stack's member count, whereas a resize only changes a size.
|
|
482
|
+
*/
|
|
483
|
+
const instantStack = ref(false);
|
|
484
|
+
let prevPeerCount = 0;
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Whether a later-opened, same-direction peer sits in front of this panel —
|
|
488
|
+
* i.e. this panel is a shifted parent. Only those need to snap-track a resize:
|
|
489
|
+
* the front-most panel's own open/close slide rides on the very same
|
|
490
|
+
* `translate` duration, so zeroing it there would cut short an in-flight
|
|
491
|
+
* entrance (e.g. when async content resizes the sheet as it opens).
|
|
492
|
+
*/
|
|
493
|
+
const isBehindSameDirectionPeer = () => {
|
|
494
|
+
const list = stacks.value[stackName.value];
|
|
495
|
+
if (!list) return false;
|
|
496
|
+
const chain = list.filter((entry) => entry.direction === props.side);
|
|
497
|
+
const selfIndex = chain.findIndex((entry) => entry.id === stackId);
|
|
498
|
+
return selfIndex !== -1 && selfIndex !== chain.length - 1;
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
watch(
|
|
502
|
+
() => stacks.value[stackName.value],
|
|
503
|
+
(list) => {
|
|
504
|
+
const count = list?.length ?? 0;
|
|
505
|
+
const isResize = count > 0 && count === prevPeerCount;
|
|
506
|
+
prevPeerCount = count;
|
|
507
|
+
instantStack.value = isResize && isBehindSameDirectionPeer();
|
|
508
|
+
// Clear the flag once the resize update has applied so a *later* open/close
|
|
509
|
+
// animates. It re-arms on the next resize frame, so a live resize still
|
|
510
|
+
// snaps; without this, the flag stays set and the next panel to open would
|
|
511
|
+
// enter instantly (its `--open` fires before its own `enterStack` resets it).
|
|
512
|
+
if (instantStack.value) nextTick(() => (instantStack.value = false));
|
|
513
|
+
}
|
|
514
|
+
);
|
|
515
|
+
|
|
516
|
+
// ---------------------------------------------------------------------------
|
|
517
|
+
// Pointer drag — drag-to-dismiss with velocity, rubber-band and scroll handoff.
|
|
518
|
+
// ---------------------------------------------------------------------------
|
|
519
|
+
const body = ref<HTMLElement | null>(null);
|
|
520
|
+
const isDragging = ref(false);
|
|
521
|
+
|
|
522
|
+
/** Pointer travel before a gesture is classified as a drag (vs. a tap/scroll). */
|
|
523
|
+
const DRAG_SLOP = 6;
|
|
524
|
+
/** Fraction of the panel that must be dragged away to dismiss on release. */
|
|
525
|
+
const DISMISS_DISTANCE_RATIO = 0.25;
|
|
526
|
+
/** Release velocity (px/ms, toward close) that dismisses regardless of distance. */
|
|
527
|
+
const DISMISS_VELOCITY = 0.5;
|
|
528
|
+
|
|
529
|
+
type DragGesture = {
|
|
530
|
+
pointerId: number;
|
|
531
|
+
startX: number;
|
|
532
|
+
startY: number;
|
|
533
|
+
size: number;
|
|
534
|
+
startedInBody: boolean;
|
|
535
|
+
decided: boolean;
|
|
536
|
+
active: boolean;
|
|
537
|
+
samples: Array<{ t: number; pos: number }>;
|
|
538
|
+
};
|
|
539
|
+
let gesture: DragGesture | null = null;
|
|
540
|
+
|
|
541
|
+
const axisDelta = (event: PointerEvent, g: DragGesture) =>
|
|
542
|
+
dragAxis.value === 'x' ? event.clientX - g.startX : event.clientY - g.startY;
|
|
543
|
+
|
|
544
|
+
const axisPos = (event: PointerEvent) =>
|
|
545
|
+
dragAxis.value === 'x' ? event.clientX : event.clientY;
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* The drag is driven imperatively (direct style writes, no per-frame Vue render)
|
|
549
|
+
* to stay smooth, and the transition is toggled inline so restoring it and the
|
|
550
|
+
* resting offset happen in the same synchronous tick — no race with Vue's flush.
|
|
551
|
+
*/
|
|
552
|
+
const beginDragVisual = () => {
|
|
553
|
+
if (dialog.value) dialog.value.style.transition = 'none';
|
|
554
|
+
};
|
|
555
|
+
|
|
556
|
+
const applyDragVisual = (closeAmount: number) => {
|
|
557
|
+
const el = dialog.value;
|
|
558
|
+
if (!el) return;
|
|
559
|
+
// Follow the pointer toward the exit edge with a direct compositor translate
|
|
560
|
+
// (no CSS var, no calc). Over-opening does nothing — no elastic stretch.
|
|
561
|
+
const px = closeAmount > 0 ? closeAmount * closeSign.value : 0;
|
|
562
|
+
el.style.transform =
|
|
563
|
+
dragAxis.value === 'x'
|
|
564
|
+
? `translate3d(${px}px, 0, 0)`
|
|
565
|
+
: `translate3d(0, ${px}px, 0)`;
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
/** Restore the transition; on spring-back also animate the transform to rest. */
|
|
569
|
+
const endDragVisual = (springBack: boolean) => {
|
|
570
|
+
const el = dialog.value;
|
|
571
|
+
if (!el) return;
|
|
572
|
+
el.style.transition = ''; // restore the CSS transition synchronously
|
|
573
|
+
// Spring back animates the transform to rest. On dismiss we keep it so the
|
|
574
|
+
// exit `translate` continues seamlessly from where the finger let go.
|
|
575
|
+
if (springBack) el.style.transform = '';
|
|
576
|
+
};
|
|
577
|
+
|
|
578
|
+
/** Hard reset with no animation, once the panel is fully hidden. */
|
|
579
|
+
const clearDragVisual = () => {
|
|
580
|
+
const el = dialog.value;
|
|
581
|
+
if (!el) return;
|
|
582
|
+
el.style.removeProperty('transition');
|
|
583
|
+
el.style.removeProperty('transform');
|
|
584
|
+
};
|
|
585
|
+
|
|
586
|
+
/** Whether the scrollable body should absorb the gesture as a scroll instead. */
|
|
587
|
+
const bodyAbsorbsScroll = (closeAmount: number) => {
|
|
588
|
+
if (dragAxis.value !== 'y' || !body.value) return false;
|
|
589
|
+
if (closeAmount <= 0) return true; // over-opening: let content scroll
|
|
590
|
+
return closeSign.value === 1
|
|
591
|
+
? body.value.scrollTop > 0 // bottom drawer: scroll up before dismissing
|
|
592
|
+
: body.value.scrollTop + body.value.clientHeight <
|
|
593
|
+
body.value.scrollHeight - 1; // top drawer: scroll down first
|
|
594
|
+
};
|
|
595
|
+
|
|
596
|
+
const teardownGestureListeners = () => {
|
|
597
|
+
window.removeEventListener('pointermove', onPanelPointerMove);
|
|
598
|
+
window.removeEventListener('pointerup', onPanelPointerUp);
|
|
599
|
+
window.removeEventListener('pointercancel', onPanelPointerCancel);
|
|
600
|
+
};
|
|
601
|
+
|
|
602
|
+
const abandonGesture = () => {
|
|
603
|
+
teardownGestureListeners();
|
|
604
|
+
gesture = null;
|
|
605
|
+
};
|
|
606
|
+
|
|
607
|
+
const onPanelPointerDown = (event: PointerEvent) => {
|
|
608
|
+
// Preserve backdrop-intent tracking used by the outside-click close.
|
|
609
|
+
onBackdropPointerDown(event);
|
|
610
|
+
// Drag-to-dismiss is opt-in via `draggable`.
|
|
611
|
+
if (!props.draggable) return;
|
|
612
|
+
// The dialog element itself is the backdrop — handled by click, not drag.
|
|
613
|
+
if (event.target === event.currentTarget) return;
|
|
614
|
+
if (event.button !== 0 || !dialog.value) return;
|
|
615
|
+
if (gesture) abandonGesture();
|
|
616
|
+
|
|
617
|
+
const rect = dialog.value.getBoundingClientRect();
|
|
618
|
+
gesture = {
|
|
619
|
+
pointerId: event.pointerId,
|
|
620
|
+
startX: event.clientX,
|
|
621
|
+
startY: event.clientY,
|
|
622
|
+
size: dragAxis.value === 'x' ? rect.width : rect.height,
|
|
623
|
+
startedInBody: !!(event.target as HTMLElement).closest?.(
|
|
624
|
+
'.bb-offcanvas__body'
|
|
625
|
+
),
|
|
626
|
+
decided: false,
|
|
627
|
+
active: false,
|
|
628
|
+
samples: [{ t: performance.now(), pos: axisPos(event) }],
|
|
629
|
+
};
|
|
630
|
+
window.addEventListener('pointermove', onPanelPointerMove, {
|
|
631
|
+
passive: false,
|
|
632
|
+
});
|
|
633
|
+
window.addEventListener('pointerup', onPanelPointerUp);
|
|
634
|
+
window.addEventListener('pointercancel', onPanelPointerCancel);
|
|
635
|
+
};
|
|
636
|
+
|
|
637
|
+
const onPanelPointerMove = (event: PointerEvent) => {
|
|
638
|
+
if (!gesture || event.pointerId !== gesture.pointerId) return;
|
|
639
|
+
const along = axisDelta(event, gesture);
|
|
640
|
+
const cross =
|
|
641
|
+
dragAxis.value === 'x'
|
|
642
|
+
? event.clientY - gesture.startY
|
|
643
|
+
: event.clientX - gesture.startX;
|
|
644
|
+
|
|
645
|
+
if (!gesture.decided) {
|
|
646
|
+
if (Math.abs(along) < DRAG_SLOP && Math.abs(cross) < DRAG_SLOP) return;
|
|
647
|
+
gesture.decided = true;
|
|
648
|
+
const closeAmount = along * closeSign.value;
|
|
649
|
+
const dominantAlongAxis = Math.abs(along) >= Math.abs(cross);
|
|
650
|
+
// Cross-axis swipe, or one the body can scroll: hand off to native scroll.
|
|
651
|
+
if (
|
|
652
|
+
!dominantAlongAxis ||
|
|
653
|
+
(gesture.startedInBody && bodyAbsorbsScroll(closeAmount))
|
|
654
|
+
) {
|
|
655
|
+
abandonGesture();
|
|
656
|
+
return;
|
|
657
|
+
}
|
|
658
|
+
gesture.active = true;
|
|
659
|
+
isDragging.value = true;
|
|
660
|
+
beginDragVisual();
|
|
661
|
+
}
|
|
662
|
+
if (!gesture.active) return;
|
|
663
|
+
|
|
664
|
+
event.preventDefault();
|
|
665
|
+
gesture.samples.push({ t: performance.now(), pos: axisPos(event) });
|
|
666
|
+
if (gesture.samples.length > 6) gesture.samples.shift();
|
|
667
|
+
|
|
668
|
+
// Write synchronously (no rAF hop): the panel stays glued to the pointer with
|
|
669
|
+
// no added latency. Multiple moves per frame just overwrite the inline
|
|
670
|
+
// `transform`; the browser still paints once, at the frame boundary.
|
|
671
|
+
applyDragVisual(along * closeSign.value);
|
|
672
|
+
};
|
|
673
|
+
|
|
674
|
+
/** Close-direction velocity (px/ms) from the most recent ~50ms of samples. */
|
|
675
|
+
const releaseVelocity = (samples: DragGesture['samples']) => {
|
|
676
|
+
if (samples.length < 2) return 0;
|
|
677
|
+
const last = samples[samples.length - 1];
|
|
678
|
+
let start = samples[0];
|
|
679
|
+
for (let i = samples.length - 2; i >= 0; i--) {
|
|
680
|
+
start = samples[i];
|
|
681
|
+
if (last.t - samples[i].t >= 50) break;
|
|
682
|
+
}
|
|
683
|
+
const dt = last.t - start.t;
|
|
684
|
+
return dt > 0 ? ((last.pos - start.pos) / dt) * closeSign.value : 0;
|
|
685
|
+
};
|
|
686
|
+
|
|
687
|
+
const onPanelPointerUp = (event: PointerEvent) => {
|
|
688
|
+
if (!gesture || event.pointerId !== gesture.pointerId) return;
|
|
689
|
+
const { active, size, samples } = gesture;
|
|
690
|
+
const closeAmount = axisDelta(event, gesture) * closeSign.value;
|
|
691
|
+
teardownGestureListeners();
|
|
692
|
+
gesture = null;
|
|
693
|
+
if (!active) return;
|
|
694
|
+
|
|
695
|
+
isDragging.value = false; // restore the transition for settle / exit
|
|
696
|
+
const dismiss =
|
|
697
|
+
closeAmount > size * DISMISS_DISTANCE_RATIO ||
|
|
698
|
+
(releaseVelocity(samples) > DISMISS_VELOCITY && closeAmount > DRAG_SLOP);
|
|
699
|
+
|
|
700
|
+
if (dismiss && !shouldPreventClose.value) {
|
|
701
|
+
// Restore the transition but keep the offset so the exit continues from
|
|
702
|
+
// where the finger let go; it is reset once the panel is fully hidden.
|
|
703
|
+
endDragVisual(false);
|
|
704
|
+
close();
|
|
705
|
+
return;
|
|
706
|
+
}
|
|
707
|
+
endDragVisual(true); // spring back to fully open
|
|
708
|
+
if (dismiss) triggerDenyCloseFeedback(300);
|
|
709
|
+
};
|
|
710
|
+
|
|
711
|
+
const onPanelPointerCancel = (event: PointerEvent) => {
|
|
712
|
+
if (!gesture || event.pointerId !== gesture.pointerId) return;
|
|
713
|
+
const wasActive = gesture.active;
|
|
714
|
+
teardownGestureListeners();
|
|
715
|
+
gesture = null;
|
|
716
|
+
if (wasActive) {
|
|
717
|
+
isDragging.value = false;
|
|
718
|
+
endDragVisual(true);
|
|
719
|
+
}
|
|
720
|
+
};
|
|
721
|
+
</script>
|
|
722
|
+
|
|
723
|
+
<style lang="postcss">
|
|
724
|
+
@import './index.css';
|
|
725
|
+
</style>
|
|
726
|
+
```
|
|
727
|
+
|
|
728
|
+
## Types
|
|
729
|
+
|
|
730
|
+
```ts
|
|
731
|
+
import type { Size } from '@/types/CommonProps';
|
|
732
|
+
import type { Sizes } from '@/types/SizeScale';
|
|
733
|
+
import type { Responsive } from '@/types/ResponsiveSize';
|
|
734
|
+
export type { Sizes };
|
|
735
|
+
type OffCanvasSize = NonNullable<Size<Sizes>['size']> | 'auto';
|
|
736
|
+
|
|
737
|
+
export type BbOffCanvasProps = {
|
|
738
|
+
/**
|
|
739
|
+
* Disable EVERY user-initiated dismissal: backdrop click, Escape,
|
|
740
|
+
* drag-to-dismiss AND the header close (×) button (denied attempts play the
|
|
741
|
+
* deny nudge). Use it while an operation is in flight (e.g. a save) so the
|
|
742
|
+
* drawer cannot be dismissed mid-work. Compare `persistent`, which blocks
|
|
743
|
+
* backdrop/Escape but leaves the × working. Programmatic close (v-model) is
|
|
744
|
+
* still allowed.
|
|
745
|
+
*/
|
|
746
|
+
disabled?: boolean;
|
|
747
|
+
/**
|
|
748
|
+
* Render offcanvas content immediately instead of waiting for the first open.
|
|
749
|
+
*/
|
|
750
|
+
eager?: boolean;
|
|
751
|
+
/**
|
|
752
|
+
* CSS selector of the element to focus after opening. Defaults to the first tabbable element.
|
|
753
|
+
*/
|
|
754
|
+
focusTarget?: string;
|
|
755
|
+
/**
|
|
756
|
+
* Display the offcanvas fullscreen. Use `'mobile'` to restrict fullscreen to small devices.
|
|
757
|
+
*/
|
|
758
|
+
fullscreen?: boolean | 'mobile';
|
|
759
|
+
/**
|
|
760
|
+
* Enable drag-to-dismiss. The panel can be dragged from anywhere toward its
|
|
761
|
+
* edge to close, and a grab handle is shown on the inner edge as the
|
|
762
|
+
* affordance. When `false`, the panel is static (dismiss via the close button,
|
|
763
|
+
* backdrop, or Escape only).
|
|
764
|
+
* @defaultValue `false`
|
|
765
|
+
*/
|
|
766
|
+
draggable?: boolean;
|
|
767
|
+
/**
|
|
768
|
+
* Name of the stack this drawer belongs to. Drawers sharing the same `stack`
|
|
769
|
+
* value step back behind one another as later ones open; drawers in different
|
|
770
|
+
* stacks never affect each other. When omitted, the drawer stacks with nothing.
|
|
771
|
+
*/
|
|
772
|
+
stack?: string;
|
|
773
|
+
/**
|
|
774
|
+
* Pixels each stacked parent drawer shifts inward when a child opens on top,
|
|
775
|
+
* leaving a peeking band of the parent visible.
|
|
776
|
+
* @defaultValue `60`
|
|
777
|
+
*/
|
|
778
|
+
stackGap?: number;
|
|
779
|
+
/**
|
|
780
|
+
* Prevent closing via outside clicks, Escape key or drag-to-dismiss. The
|
|
781
|
+
* header close (×) button STILL closes a persistent drawer — that is the
|
|
782
|
+
* documented escape hatch; combine with `hideClose` to remove it, or use
|
|
783
|
+
* `disabled` to block every dismissal. Programmatic close is still allowed.
|
|
784
|
+
*/
|
|
785
|
+
persistent?: boolean;
|
|
786
|
+
/**
|
|
787
|
+
* Hides the default close (×) button in the header (e.g. for a `persistent`
|
|
788
|
+
* drawer you don't want dismissible — the × otherwise still closes a
|
|
789
|
+
* persistent drawer).
|
|
790
|
+
* @defaultValue `false`
|
|
791
|
+
*/
|
|
792
|
+
hideClose?: boolean;
|
|
793
|
+
/**
|
|
794
|
+
* Controls the maximum size of the offcanvas panel. Accepts named presets from `'xs'` to `'2xl'`,
|
|
795
|
+
* `'auto'`, a custom CSS size string, or a numeric pixel value — or a
|
|
796
|
+
* per-breakpoint map (e.g. `{ default: 'sm', lg: 'lg' }`) to switch responsively.
|
|
797
|
+
* @defaultValue `'sm'`
|
|
798
|
+
*/
|
|
799
|
+
size?: Responsive<OffCanvasSize>;
|
|
800
|
+
/**
|
|
801
|
+
* Title text announced to assistive technologies. If omitted, no header is rendered and
|
|
802
|
+
* accessibility must be handled manually.
|
|
803
|
+
*/
|
|
804
|
+
title?: string;
|
|
805
|
+
/**
|
|
806
|
+
* Controls the duration of the open and close animations.
|
|
807
|
+
* @defaultValue `250`
|
|
808
|
+
*/
|
|
809
|
+
transitionDuration?: number;
|
|
810
|
+
/**
|
|
811
|
+
* Which viewport edge the offcanvas docks to (and slides in from).
|
|
812
|
+
*
|
|
813
|
+
* @defaultValue `'left'`
|
|
814
|
+
*/
|
|
815
|
+
side?: 'left' | 'top' | 'right' | 'bottom';
|
|
816
|
+
};
|
|
817
|
+
|
|
818
|
+
export type BbOffCanvasEvents = {
|
|
819
|
+
/** Emitted as soon as the user triggers the open action (model becomes true). */
|
|
820
|
+
(e: 'show'): void;
|
|
821
|
+
/** Emitted as soon as the user triggers the close action (model becomes false). */
|
|
822
|
+
(e: 'hide'): void;
|
|
823
|
+
/** Emitted after the offcanvas is fully opened using `showModal()`. */
|
|
824
|
+
(e: 'shown'): void;
|
|
825
|
+
/** Emitted after the close transition completes and the offcanvas is fully dismissed. */
|
|
826
|
+
(e: 'hidden'): void;
|
|
827
|
+
};
|
|
828
|
+
|
|
829
|
+
/** Props exposed by the `header` slot. */
|
|
830
|
+
export type BbOffCanvasHeaderSlotProps = {
|
|
831
|
+
/** The `id` assigned to the title element, wired to `aria-labelledby`. */
|
|
832
|
+
titleId: string;
|
|
833
|
+
/** Programmatically closes the off-canvas panel. */
|
|
834
|
+
close: () => void;
|
|
835
|
+
/** The `title` prop value. */
|
|
836
|
+
title: BbOffCanvasProps['title'];
|
|
837
|
+
};
|
|
838
|
+
|
|
839
|
+
/** Props exposed by the `title` slot. */
|
|
840
|
+
export type BbOffCanvasTitleSlotProps = {
|
|
841
|
+
/** The `title` prop value. */
|
|
842
|
+
text: BbOffCanvasProps['title'];
|
|
843
|
+
};
|
|
844
|
+
|
|
845
|
+
export type BbOffCanvasSlots = {
|
|
846
|
+
/**
|
|
847
|
+
* Replaces the entire off-canvas header section (title + close button). Maintains accessibility wiring via the provided props.
|
|
848
|
+
*/
|
|
849
|
+
header?: (props: BbOffCanvasHeaderSlotProps) => any;
|
|
850
|
+
/**
|
|
851
|
+
* Replaces the default title text inside the header. Remains linked to the panel through `aria-labelledby`.
|
|
852
|
+
*/
|
|
853
|
+
title?: (props: BbOffCanvasTitleSlotProps) => any;
|
|
854
|
+
/**
|
|
855
|
+
* Primary body content of the off-canvas panel, rendered in the scrollable body area.
|
|
856
|
+
*/
|
|
857
|
+
default?: (props: { close: () => void }) => any;
|
|
858
|
+
/**
|
|
859
|
+
* Content rendered in the panel footer, below the body area. Typically used for action buttons.
|
|
860
|
+
*/
|
|
861
|
+
footer?: (props: object) => any;
|
|
862
|
+
};
|
|
863
|
+
```
|
|
864
|
+
|
|
865
|
+
## Styles
|
|
866
|
+
|
|
867
|
+
```css
|
|
868
|
+
/* @inherit --transition-duration --max-size — set inline from props; @inherit --scrollbar-width — set on body by the scroll lock */
|
|
869
|
+
.bb-offcanvas {
|
|
870
|
+
--translate-x: 0%;
|
|
871
|
+
--translate-y: 0%;
|
|
872
|
+
--translate: 1;
|
|
873
|
+
/* Inward shift applied to a parent panel while a child is stacked on top. */
|
|
874
|
+
--stack-x: 0px;
|
|
875
|
+
--stack-y: 0px;
|
|
876
|
+
/* Length of the pad (see `::after`) that fills from the panel's anchored edge
|
|
877
|
+
out to the screen edge, so no empty band shows when a descendant is dragged
|
|
878
|
+
away or shrinks. */
|
|
879
|
+
--stack-fill: 0px;
|
|
880
|
+
/* Duration for the stack shift + pad. Zeroed while a peer resizes so parents
|
|
881
|
+
track the live size instead of lagging behind a 250ms animation. */
|
|
882
|
+
--stack-transition-duration: var(--transition-duration);
|
|
883
|
+
--transition-timing-function: var(--bb-ease);
|
|
884
|
+
background-color: var(--bb-panel);
|
|
885
|
+
border: 1px solid var(--bb-border);
|
|
886
|
+
box-shadow: var(--bb-shadow);
|
|
887
|
+
color: var(--bb-text);
|
|
888
|
+
display: flex;
|
|
889
|
+
flex-direction: column;
|
|
890
|
+
margin: 0 0;
|
|
891
|
+
outline: none;
|
|
892
|
+
/* Visible so the `::after` stack pad can extend past the panel to the screen
|
|
893
|
+
edge; the scrollable body clips its own content via `overflow: auto`. */
|
|
894
|
+
overflow: visible;
|
|
895
|
+
overscroll-behavior: contain;
|
|
896
|
+
position: fixed;
|
|
897
|
+
transition:
|
|
898
|
+
max-width var(--transition-duration) var(--transition-timing-function),
|
|
899
|
+
max-height var(--transition-duration) var(--transition-timing-function),
|
|
900
|
+
transform var(--transition-duration) var(--transition-timing-function),
|
|
901
|
+
box-shadow var(--transition-duration) var(--transition-timing-function),
|
|
902
|
+
/* Stack shift uses a duration that drops to 0 while resizing so parents
|
|
903
|
+
track the live size (see `--instant-stack`); the pad `::after` matches it. */
|
|
904
|
+
translate var(--stack-transition-duration) var(--transition-timing-function),
|
|
905
|
+
display var(--transition-duration) var(--transition-duration)
|
|
906
|
+
var(--transition-timing-function);
|
|
907
|
+
transition-behavior: allow-discrete;
|
|
908
|
+
/* Open/close/stack ride on `translate`; the live drag rides on `transform`
|
|
909
|
+
(a direct translate3d/scale written in JS) so it stays compositor-only. */
|
|
910
|
+
translate: calc(var(--translate-x) * var(--translate) + var(--stack-x))
|
|
911
|
+
calc(var(--translate-y) * var(--translate) + var(--stack-y));
|
|
912
|
+
z-index: var(--bb-z-overlay);
|
|
913
|
+
|
|
914
|
+
/* Promote the panel to its own compositor layer while it is on screen. The
|
|
915
|
+
live drag then moves only this layer via `transform`, leaving the blurred
|
|
916
|
+
backdrop static and cached — so the blur stays on with no per-frame
|
|
917
|
+
re-rasterisation, and the first drag frame has no layer-creation hitch. */
|
|
918
|
+
&.bb-offcanvas--visible {
|
|
919
|
+
will-change: transform;
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
/* A closed panel keeps `display: flex` (author rule above overrides the UA
|
|
923
|
+
`dialog:not([open])` hide), so it stays laid out just translated fully
|
|
924
|
+
off-screen. Its drop shadow would still bleed a sliver back onto the screen
|
|
925
|
+
edge — drop it until the panel is actually on screen. It stays `--visible`
|
|
926
|
+
through the whole close transition, so the shadow still animates out. */
|
|
927
|
+
&:not(.bb-offcanvas--visible) {
|
|
928
|
+
box-shadow: none;
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
/* While a peer resizes, the stack tracks the live size with no animation. */
|
|
932
|
+
&.bb-offcanvas--instant-stack {
|
|
933
|
+
--stack-transition-duration: 0s;
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
/* Only the top-most open panel blurs + dims its backdrop. Every panel beneath
|
|
937
|
+
it is `covered`: its backdrop goes transparent so N stacked panels cost one
|
|
938
|
+
blur pass instead of N (stacked `backdrop-filter`s each reblur the whole
|
|
939
|
+
scene and choke the GPU past a handful). It also drops its `will-change`
|
|
940
|
+
layer, since a covered panel can't be dragged. Must follow `--visible` to
|
|
941
|
+
win the equal-specificity `will-change`. */
|
|
942
|
+
&.bb-offcanvas--covered {
|
|
943
|
+
will-change: auto;
|
|
944
|
+
|
|
945
|
+
&::backdrop {
|
|
946
|
+
-webkit-backdrop-filter: none;
|
|
947
|
+
backdrop-filter: none;
|
|
948
|
+
background-color: transparent;
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
/* Stack pad: fills from the panel's anchored edge out to the screen edge, so a
|
|
953
|
+
shifted parent never shows an empty band when a descendant is dragged away
|
|
954
|
+
or shrinks. A real box (not a box-shadow copy) → fills any width with square
|
|
955
|
+
corners. Sits under the front child while it covers the edge. Its length
|
|
956
|
+
tracks the shift in lockstep with `translate` (shared duration). */
|
|
957
|
+
&::after {
|
|
958
|
+
background-color: var(--bb-panel);
|
|
959
|
+
content: '';
|
|
960
|
+
pointer-events: none;
|
|
961
|
+
position: absolute;
|
|
962
|
+
transition:
|
|
963
|
+
width var(--stack-transition-duration) var(--transition-timing-function),
|
|
964
|
+
height var(--stack-transition-duration) var(--transition-timing-function);
|
|
965
|
+
}
|
|
966
|
+
&.bb-offcanvas--right::after {
|
|
967
|
+
bottom: 0;
|
|
968
|
+
left: 100%;
|
|
969
|
+
top: 0;
|
|
970
|
+
width: var(--stack-fill);
|
|
971
|
+
}
|
|
972
|
+
&.bb-offcanvas--left::after {
|
|
973
|
+
bottom: 0;
|
|
974
|
+
right: 100%;
|
|
975
|
+
top: 0;
|
|
976
|
+
width: var(--stack-fill);
|
|
977
|
+
}
|
|
978
|
+
&.bb-offcanvas--top::after {
|
|
979
|
+
bottom: 100%;
|
|
980
|
+
height: var(--stack-fill);
|
|
981
|
+
left: 0;
|
|
982
|
+
right: 0;
|
|
983
|
+
}
|
|
984
|
+
&.bb-offcanvas--bottom::after {
|
|
985
|
+
height: var(--stack-fill);
|
|
986
|
+
left: 0;
|
|
987
|
+
right: 0;
|
|
988
|
+
top: 100%;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
/* The transition is toggled inline (in JS) so it can be restored in the same
|
|
992
|
+
tick as the resting transform; here we only set drag affordances. */
|
|
993
|
+
&.bb-offcanvas--dragging {
|
|
994
|
+
cursor: grabbing;
|
|
995
|
+
user-select: none;
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
/* Horizontal panels: claim horizontal swipes, leave vertical scroll native. */
|
|
999
|
+
&.bb-offcanvas--left,
|
|
1000
|
+
&.bb-offcanvas--right {
|
|
1001
|
+
height: 100%;
|
|
1002
|
+
max-height: 100%;
|
|
1003
|
+
max-width: var(--max-size);
|
|
1004
|
+
top: 0px;
|
|
1005
|
+
touch-action: pan-y;
|
|
1006
|
+
width: 100%;
|
|
1007
|
+
}
|
|
1008
|
+
&.bb-offcanvas--left {
|
|
1009
|
+
--translate-x: -100%;
|
|
1010
|
+
border-radius: 0 var(--bb-radius-surface) var(--bb-radius-surface) 0;
|
|
1011
|
+
left: 0px;
|
|
1012
|
+
transform-origin: left center;
|
|
1013
|
+
}
|
|
1014
|
+
&.bb-offcanvas--right {
|
|
1015
|
+
--translate-x: 100%;
|
|
1016
|
+
border-radius: var(--bb-radius-surface) 0 0 var(--bb-radius-surface);
|
|
1017
|
+
left: auto;
|
|
1018
|
+
right: 0px;
|
|
1019
|
+
transform-origin: right center;
|
|
1020
|
+
}
|
|
1021
|
+
&.bb-offcanvas--top,
|
|
1022
|
+
&.bb-offcanvas--bottom {
|
|
1023
|
+
height: var(--max-size);
|
|
1024
|
+
left: 0;
|
|
1025
|
+
/* `height` already applies `--max-size` (a length or the `fit-content`
|
|
1026
|
+
keyword for `size="auto"`); this only caps the panel to the viewport so a
|
|
1027
|
+
tall/auto sheet scrolls internally instead of overflowing off-screen. Must
|
|
1028
|
+
stay a plain percentage — `min(fit-content, 100%)` is invalid and would
|
|
1029
|
+
drop the cap entirely, letting a bottom sheet run past the top edge. */
|
|
1030
|
+
max-height: 100%;
|
|
1031
|
+
max-width: 100%;
|
|
1032
|
+
right: 0;
|
|
1033
|
+
width: 100%;
|
|
1034
|
+
}
|
|
1035
|
+
&.bb-offcanvas--top {
|
|
1036
|
+
--translate-y: -100%;
|
|
1037
|
+
border-radius: 0 0 var(--bb-radius-surface) var(--bb-radius-surface);
|
|
1038
|
+
bottom: auto;
|
|
1039
|
+
top: 0px;
|
|
1040
|
+
transform-origin: center top;
|
|
1041
|
+
}
|
|
1042
|
+
&.bb-offcanvas--bottom {
|
|
1043
|
+
--translate-y: 100%;
|
|
1044
|
+
border-radius: var(--bb-radius-surface) var(--bb-radius-surface) 0 0;
|
|
1045
|
+
bottom: 0px;
|
|
1046
|
+
top: auto;
|
|
1047
|
+
transform-origin: center bottom;
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
&.bb-offcanvas--fullscreen {
|
|
1051
|
+
border-radius: 0;
|
|
1052
|
+
height: 100%;
|
|
1053
|
+
width: 100%;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
&.bb-offcanvas--open {
|
|
1057
|
+
--translate: 0;
|
|
1058
|
+
|
|
1059
|
+
/* A sheet nested in another overlay's body is `display: none` while closed
|
|
1060
|
+
(see the nested-overlay rule in `__body`), so opening it is a first render
|
|
1061
|
+
and the `translate` transition has no before-change state to animate from.
|
|
1062
|
+
`@starting-style` supplies it — fully off-screen — mirroring the nested
|
|
1063
|
+
`@starting-style` entrance BbDialog uses. Panels that stay rendered while
|
|
1064
|
+
closed are unaffected: their normal transition path still applies. */
|
|
1065
|
+
@starting-style {
|
|
1066
|
+
--translate: 1;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
&::backdrop {
|
|
1070
|
+
opacity: 1;
|
|
1071
|
+
|
|
1072
|
+
@starting-style {
|
|
1073
|
+
opacity: 0;
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
&.bb-offcanvas--deny-close {
|
|
1078
|
+
animation-duration: 220ms;
|
|
1079
|
+
animation-fill-mode: both;
|
|
1080
|
+
animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
/* Deny wobble scales the panel toward its anchored edge (origin set per
|
|
1084
|
+
direction), so the inner edge wobbles inward while the anchored edge stays
|
|
1085
|
+
flush — never past 100%, never an empty band at the screen edge. */
|
|
1086
|
+
&.bb-offcanvas--left.bb-offcanvas--deny-close,
|
|
1087
|
+
&.bb-offcanvas--right.bb-offcanvas--deny-close {
|
|
1088
|
+
animation-name: bb-offcanvas-deny-bounce-x;
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
&.bb-offcanvas--top.bb-offcanvas--deny-close,
|
|
1092
|
+
&.bb-offcanvas--bottom.bb-offcanvas--deny-close {
|
|
1093
|
+
animation-name: bb-offcanvas-deny-bounce-y;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
&::backdrop {
|
|
1097
|
+
/* Keep blur subtle to reduce GPU cost while softening page content. */
|
|
1098
|
+
-webkit-backdrop-filter: blur(var(--bb-overlay-blur, 2px));
|
|
1099
|
+
backdrop-filter: blur(var(--bb-overlay-blur, 2px));
|
|
1100
|
+
background-color: var(--bb-overlay);
|
|
1101
|
+
opacity: 0;
|
|
1102
|
+
/* Also transition the dim: when a panel becomes `covered` its dim fades out
|
|
1103
|
+
in step with the next backdrop's dim fading in, so the total stays
|
|
1104
|
+
constant during open/close instead of flicking lighter/darker. */
|
|
1105
|
+
transition:
|
|
1106
|
+
opacity var(--transition-duration) cubic-bezier(0.4, 0, 0.2, 1),
|
|
1107
|
+
background-color var(--transition-duration) cubic-bezier(0.4, 0, 0.2, 1);
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
/* Grab handle: reliable drag surface on touch, centred on the inner edge. */
|
|
1111
|
+
.bb-offcanvas__handle {
|
|
1112
|
+
background-color: var(--bb-border);
|
|
1113
|
+
border-radius: 999px;
|
|
1114
|
+
cursor: grab;
|
|
1115
|
+
flex-shrink: 0;
|
|
1116
|
+
position: absolute;
|
|
1117
|
+
touch-action: none;
|
|
1118
|
+
z-index: 1;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
&.bb-offcanvas--bottom .bb-offcanvas__handle,
|
|
1122
|
+
&.bb-offcanvas--top .bb-offcanvas__handle {
|
|
1123
|
+
height: 4px;
|
|
1124
|
+
left: 50%;
|
|
1125
|
+
translate: -50% 0;
|
|
1126
|
+
width: 36px;
|
|
1127
|
+
}
|
|
1128
|
+
&.bb-offcanvas--bottom .bb-offcanvas__handle {
|
|
1129
|
+
top: 8px;
|
|
1130
|
+
}
|
|
1131
|
+
&.bb-offcanvas--top .bb-offcanvas__handle {
|
|
1132
|
+
bottom: 8px;
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
&.bb-offcanvas--left .bb-offcanvas__handle,
|
|
1136
|
+
&.bb-offcanvas--right .bb-offcanvas__handle {
|
|
1137
|
+
height: 36px;
|
|
1138
|
+
top: 50%;
|
|
1139
|
+
translate: 0 -50%;
|
|
1140
|
+
width: 4px;
|
|
1141
|
+
}
|
|
1142
|
+
&.bb-offcanvas--left .bb-offcanvas__handle {
|
|
1143
|
+
right: 8px;
|
|
1144
|
+
}
|
|
1145
|
+
&.bb-offcanvas--right .bb-offcanvas__handle {
|
|
1146
|
+
left: 8px;
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
/* Headerless panel: the body sits flush at the top, so it must supply the top
|
|
1150
|
+
padding the header would otherwise provide. Keyed off the class rather than
|
|
1151
|
+
`:first-child` because an absolutely-positioned drag handle can precede the
|
|
1152
|
+
body in the DOM, which would defeat `:first-child`. */
|
|
1153
|
+
&.bb-offcanvas--no-header .bb-offcanvas__body-content {
|
|
1154
|
+
padding-top: var(--bb-panel-p);
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
/* Make room for the handle so it does not overlap header content. */
|
|
1158
|
+
&.bb-offcanvas--has-handle.bb-offcanvas--bottom .bb-offcanvas__header,
|
|
1159
|
+
&.bb-offcanvas--has-handle.bb-offcanvas--bottom.bb-offcanvas--no-header
|
|
1160
|
+
.bb-offcanvas__body-content {
|
|
1161
|
+
padding-top: calc(var(--bb-panel-p) + 12px);
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
.bb-offcanvas__header {
|
|
1165
|
+
align-items: center;
|
|
1166
|
+
column-gap: 12px;
|
|
1167
|
+
display: flex;
|
|
1168
|
+
flex-shrink: 0;
|
|
1169
|
+
justify-content: space-between;
|
|
1170
|
+
padding: var(--bb-panel-p) var(--bb-panel-p) calc(var(--bb-panel-p) / 2)
|
|
1171
|
+
var(--bb-panel-p);
|
|
1172
|
+
position: relative;
|
|
1173
|
+
/* Header is a dependable drag surface even when content scrolls. */
|
|
1174
|
+
touch-action: none;
|
|
1175
|
+
|
|
1176
|
+
.bb-offcanvas__title {
|
|
1177
|
+
font-size: var(--dialog-title-fs, calc(var(--bb-fs) + 2px));
|
|
1178
|
+
font-weight: 500;
|
|
1179
|
+
line-height: var(--dialog-title-fs, calc(var(--bb-fs) + 2px));
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
> .bb-close-button {
|
|
1183
|
+
--size: 28px;
|
|
1184
|
+
--p: 7px;
|
|
1185
|
+
position: absolute;
|
|
1186
|
+
right: calc(var(--bb-panel-p) - var(--p));
|
|
1187
|
+
top: calc(var(--bb-panel-p) - var(--p));
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
.bb-offcanvas__body {
|
|
1192
|
+
flex: 1 1 auto;
|
|
1193
|
+
overflow: auto;
|
|
1194
|
+
position: relative;
|
|
1195
|
+
|
|
1196
|
+
&:first-child {
|
|
1197
|
+
.bb-offcanvas__body-content {
|
|
1198
|
+
padding-top: var(--bb-panel-p);
|
|
1199
|
+
|
|
1200
|
+
> .bb-close-button {
|
|
1201
|
+
--size: 28px;
|
|
1202
|
+
--p: 7px;
|
|
1203
|
+
position: absolute;
|
|
1204
|
+
right: calc(var(--bb-panel-p) - var(--p));
|
|
1205
|
+
top: calc(var(--bb-panel-p) - var(--p));
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
.bb-offcanvas__body-content {
|
|
1211
|
+
padding: 0px var(--bb-panel-p) var(--dialog-gap, var(--bb-panel-p));
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
/* Keep nested overlays out of flow while closed, mirroring dialog behavior. */
|
|
1215
|
+
.bb-offcanvas:not(.bb-offcanvas--open),
|
|
1216
|
+
.bb-dialog:not(.bb-dialog--open) {
|
|
1217
|
+
display: none;
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
.bb-offcanvas__footer {
|
|
1222
|
+
border-top: 1px solid var(--bb-border);
|
|
1223
|
+
padding: var(--dialog-gap, var(--bb-panel-p)) var(--bb-panel-p);
|
|
1224
|
+
pointer-events: auto;
|
|
1225
|
+
|
|
1226
|
+
&:empty {
|
|
1227
|
+
display: none;
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
body:has(.bb-offcanvas--visible) {
|
|
1233
|
+
overflow: hidden;
|
|
1234
|
+
padding-right: var(--scrollbar-width);
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
@keyframes bb-offcanvas-deny-bounce-x {
|
|
1238
|
+
0% {
|
|
1239
|
+
transform: scaleX(1);
|
|
1240
|
+
}
|
|
1241
|
+
35% {
|
|
1242
|
+
transform: scaleX(0.965);
|
|
1243
|
+
}
|
|
1244
|
+
65% {
|
|
1245
|
+
transform: scaleX(0.99);
|
|
1246
|
+
}
|
|
1247
|
+
100% {
|
|
1248
|
+
transform: scaleX(1);
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
@keyframes bb-offcanvas-deny-bounce-y {
|
|
1253
|
+
0% {
|
|
1254
|
+
transform: scaleY(1);
|
|
1255
|
+
}
|
|
1256
|
+
35% {
|
|
1257
|
+
transform: scaleY(0.965);
|
|
1258
|
+
}
|
|
1259
|
+
65% {
|
|
1260
|
+
transform: scaleY(0.99);
|
|
1261
|
+
}
|
|
1262
|
+
100% {
|
|
1263
|
+
transform: scaleY(1);
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
```
|