bitboss-ui 3.0.0-beta.2 → 3.0.0-beta.21
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/README.md +72 -33
- package/dist/ai/BbAccordion.md +3 -3
- package/dist/ai/BbAlert.md +9 -5
- package/dist/ai/BbAsterisk.md +17 -0
- package/dist/ai/BbAvatar.md +12 -3
- package/dist/ai/BbBadge.md +15 -10
- package/dist/ai/BbBadgeButton.md +16 -16
- package/dist/ai/BbBaseButton.md +16 -16
- package/dist/ai/BbBaseCheckbox.md +8 -8
- package/dist/ai/BbBaseCheckboxGroup.md +13 -13
- package/dist/ai/BbBaseCheckboxIcon.md +26 -9
- package/dist/ai/BbBaseColorInput.md +11 -11
- package/dist/ai/BbBaseDatePicker.md +6 -6
- package/dist/ai/BbBaseDatePickerInput.md +15 -15
- package/dist/ai/BbBaseInputContainer.md +12 -12
- package/dist/ai/BbBaseNumberInput.md +8 -8
- package/dist/ai/BbBaseRadio.md +5 -5
- package/dist/ai/BbBaseRadioGroup.md +7 -7
- package/dist/ai/BbBaseRadioIcon.md +25 -9
- package/dist/ai/BbBaseRating.md +5 -5
- package/dist/ai/BbBaseSelect.md +22 -21
- package/dist/ai/BbBaseSlider.md +9 -9
- package/dist/ai/BbBaseSwitch.md +8 -8
- package/dist/ai/BbBaseSwitchGroup.md +13 -13
- package/dist/ai/BbBaseSwitchIcon.md +28 -10
- package/dist/ai/BbBaseTag.md +10 -10
- package/dist/ai/BbBaseTextInput.md +9 -9
- package/dist/ai/BbBaseTextarea.md +9 -9
- package/dist/ai/BbBaseTimePickerInput.md +13 -13
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +15 -15
- package/dist/ai/BbCheckbox.md +18 -17
- package/dist/ai/BbCheckboxGroup.md +15 -14
- package/dist/ai/BbCollapsible.md +11 -9
- package/dist/ai/BbColorInput.md +15 -15
- package/dist/ai/BbColorPalette.md +12 -6
- package/dist/ai/BbConfirm.md +12 -5
- package/dist/ai/BbDatePicker.md +13 -13
- package/dist/ai/BbDatePickerInput.md +20 -20
- package/dist/ai/BbDialog.md +78 -12
- package/dist/ai/BbDropdown.md +132 -22
- package/dist/ai/BbDropdownButton.md +12 -12
- package/dist/ai/BbDropdownGroup.md +1 -1
- package/dist/ai/BbDropzone.md +4 -4
- package/dist/ai/BbForm.md +49 -14
- package/dist/ai/BbIcon.md +6 -0
- package/dist/ai/BbIndicator.md +5 -5
- package/dist/ai/BbNumberInput.md +11 -11
- package/dist/ai/BbOffCanvas.md +90 -20
- package/dist/ai/BbPagination.md +3 -3
- package/dist/ai/BbPopover.md +32 -17
- package/dist/ai/BbProgress.md +7 -4
- package/dist/ai/BbRadio.md +16 -15
- package/dist/ai/BbRadioGroup.md +20 -17
- package/dist/ai/BbRating.md +11 -11
- package/dist/ai/BbSelect.md +138 -37
- package/dist/ai/BbSelectPopover.md +40 -41
- package/dist/ai/BbSlider.md +37 -22
- package/dist/ai/BbSmoothHeight.md +1 -1
- package/dist/ai/BbSwitch.md +25 -10
- package/dist/ai/BbSwitchGroup.md +17 -14
- package/dist/ai/BbTable.md +920 -109
- package/dist/ai/BbTabs.md +28 -14
- package/dist/ai/BbTabsList.md +1 -1
- package/dist/ai/BbTabsPanes.md +1 -1
- package/dist/ai/BbTabsRoot.md +10 -10
- package/dist/ai/BbTag.md +14 -14
- package/dist/ai/BbTextInput.md +16 -15
- package/dist/ai/BbTextarea.md +13 -13
- package/dist/ai/BbTimePicker.md +10 -10
- package/dist/ai/BbTimePickerInput.md +17 -17
- package/dist/ai/BbToast.md +1 -1
- package/dist/ai/BbToastPortal.md +1 -1
- package/dist/ai/BbTooltip.md +12 -10
- package/dist/ai/BbTree.md +1 -1
- package/dist/ai/ChipsBox.md +1 -1
- package/dist/ai/CommonInputWrapper.md +10 -10
- package/dist/ai/CommonPopover.md +6 -6
- package/dist/ai/FlatListBox.md +5 -5
- package/dist/ai/GroupedListBox.md +5 -5
- package/dist/ai/ListBox.md +4 -4
- package/dist/ai/OptionsContainer.md +4 -4
- package/dist/ai/changelog.json +128 -2
- package/dist/ai/components.json +917 -100
- package/dist/ai/composables/useBbConfig.md +72 -11
- package/dist/ai/composables/useConfirm.md +5 -3
- package/dist/ai/guides/ai-router.md +9 -4
- package/dist/ai/guides/component-picker.md +18 -18
- package/dist/ai/guides/design-language.md +14 -14
- package/dist/ai/guides/design-tokens.md +25 -18
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/icons-policy.md +11 -5
- package/dist/ai/guides/installation-and-plugin-setup.md +85 -23
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +30 -0
- package/dist/ai/guides/migration/components/bb-checkbox.md +37 -3
- package/dist/ai/guides/migration/components/bb-collapsible.md +5 -5
- package/dist/ai/guides/migration/components/bb-dialog.md +62 -34
- package/dist/ai/guides/migration/components/bb-offcanvas.md +29 -13
- package/dist/ai/guides/migration/components/bb-rating.md +8 -2
- package/dist/ai/guides/migration/components/bb-select.md +5 -2
- package/dist/ai/guides/migration/components/bb-table.md +560 -28
- package/dist/ai/guides/migration/components/bb-text-input.md +6 -6
- package/dist/ai/guides/migration/v2-to-v3.md +260 -89
- package/dist/ai/guides/ssr-prefill.md +120 -0
- package/dist/ai/index.md +10 -9
- package/dist/ai/recipes/inertia/approvals-inbox.md +0 -1
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +0 -1
- package/dist/ai/recipes/inertia/layout-scaffold.md +5 -1
- package/dist/ai/recipes/inertia/ownership-atlas.md +49 -29
- package/dist/ai/recipes/inertia/record-form.md +0 -1
- package/dist/ai/recipes/inertia/records-workspace.md +26 -8
- package/dist/ai/recipes/inertia/upload-center.md +0 -1
- package/dist/ai/recipes/nuxt/approvals-inbox.md +0 -1
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +0 -1
- package/dist/ai/recipes/nuxt/layout-scaffold.md +5 -1
- package/dist/ai/recipes/nuxt/record-form.md +0 -1
- package/dist/ai/recipes/nuxt/records-workspace.md +26 -8
- package/dist/ai/recipes/nuxt/upload-center.md +0 -1
- package/dist/ai/recipes/vue/approvals-inbox.md +0 -1
- package/dist/ai/recipes/vue/inline-edit-workspace.md +0 -1
- package/dist/ai/recipes/vue/layout-scaffold.md +5 -1
- package/dist/ai/recipes/vue/records-workspace.md +26 -8
- package/dist/ai/recipes/vue/upload-center.md +0 -1
- package/dist/ai/source/BbAlert.md +60 -2
- package/dist/ai/source/BbAvatar.md +3 -3
- package/dist/ai/source/BbBadge.md +60 -15
- package/dist/ai/source/BbBadgeButton.md +8 -2
- package/dist/ai/source/BbBaseButton.md +3 -1
- package/dist/ai/source/BbBaseCheckboxGroup.md +6 -2
- package/dist/ai/source/BbBaseDatePicker.md +3 -1
- package/dist/ai/source/BbBaseDatePickerInput.md +5 -1
- package/dist/ai/source/BbBaseInputContainer.md +52 -1
- package/dist/ai/source/BbBaseRadioGroup.md +4 -0
- package/dist/ai/source/BbBaseRating.md +3 -1
- package/dist/ai/source/BbBaseSelect.md +71 -16
- package/dist/ai/source/BbBaseSwitchGroup.md +4 -0
- package/dist/ai/source/BbBaseTimePickerInput.md +5 -1
- package/dist/ai/source/BbBreadcrumbs.md +31 -0
- package/dist/ai/source/BbButton.md +51 -24
- package/dist/ai/source/BbCheckbox.md +15 -1
- package/dist/ai/source/BbCheckboxGroup.md +2 -1
- package/dist/ai/source/BbCollapsible.md +7 -1
- package/dist/ai/source/BbColorInput.md +3 -4
- package/dist/ai/source/BbColorPalette.md +3 -4
- package/dist/ai/source/BbDatePicker.md +5 -1
- package/dist/ai/source/BbDatePickerInput.md +5 -1
- package/dist/ai/source/BbDialog.md +175 -19
- package/dist/ai/source/BbDropdown.md +376 -69
- package/dist/ai/source/BbDropdownGroup.md +330 -59
- package/dist/ai/source/BbForm.md +93 -5
- package/dist/ai/source/BbIcon.md +46 -36
- package/dist/ai/source/BbNumberInput.md +3 -4
- package/dist/ai/source/BbOffCanvas.md +474 -194
- package/dist/ai/source/BbPopover.md +24 -17
- package/dist/ai/source/BbProgress.md +2 -2
- package/dist/ai/source/BbRadio.md +15 -1
- package/dist/ai/source/BbRadioGroup.md +3 -1
- package/dist/ai/source/BbSelect.md +50 -2
- package/dist/ai/source/BbSelectPopover.md +171 -23
- package/dist/ai/source/BbSlider.md +3 -4
- package/dist/ai/source/BbSwitch.md +15 -1
- package/dist/ai/source/BbSwitchGroup.md +8 -5
- package/dist/ai/source/BbTable.md +5092 -1446
- package/dist/ai/source/BbTabs.md +6 -7
- package/dist/ai/source/BbTabsList.md +6 -7
- package/dist/ai/source/BbTabsPanes.md +6 -7
- package/dist/ai/source/BbTabsRoot.md +6 -7
- package/dist/ai/source/BbTag.md +3 -4
- package/dist/ai/source/BbTextInput.md +3 -4
- package/dist/ai/source/BbTextarea.md +3 -4
- package/dist/ai/source/BbTimePicker.md +4 -1
- package/dist/ai/source/BbTimePickerInput.md +5 -1
- package/dist/ai/source/BbToast.md +3 -1
- package/dist/ai/source/BbTooltip.md +5 -1
- package/dist/ai/source/CommonInputWrapper.md +4 -0
- package/dist/ai/source/CommonPopover.md +6 -0
- package/dist/ai/source/FlatListBox.md +11 -5
- package/dist/ai/source/GroupedListBox.md +7 -5
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/BbAlert/types.d.ts +10 -1
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -1
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +33 -33
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +22 -16
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +36 -15
- package/dist/components/BbBadge/badgeButtonContext.d.ts +21 -8
- package/dist/components/BbBadge/types.d.ts +8 -2
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +47 -47
- package/dist/components/BbBaseButton/RouterComponent.vue_vue_type_script_setup_true_lang.js +14 -14
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue_vue_type_script_setup_true_lang.js +30 -28
- package/dist/components/BbBaseCheckboxGroup/types.d.ts +2 -2
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue_vue_type_script_setup_true_lang.js +167 -167
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.d.ts +9 -9
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue_vue_type_script_setup_true_lang.js +78 -78
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue_vue_type_script_setup_true_lang.js +64 -64
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.d.ts +1 -1
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue_vue_type_script_setup_true_lang.js +138 -138
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue_vue_type_script_setup_true_lang.js +24 -22
- package/dist/components/BbBaseRating/BbBaseRating.vue_vue_type_script_setup_true_lang.js +40 -40
- package/dist/components/BbBaseSelect/BbBaseSelect.vue_vue_type_script_setup_true_lang.js +74 -65
- package/dist/components/BbBaseSelect/types.d.ts +22 -0
- package/dist/components/BbBaseSlider/BbBaseSlider.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue_vue_type_script_setup_true_lang.js +30 -28
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue.d.ts +1 -1
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue_vue_type_script_setup_true_lang.js +104 -104
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +35 -35
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +85 -81
- package/dist/components/BbCheckboxGroup/types.d.ts +2 -1
- package/dist/components/BbCollapsible/types.d.ts +7 -1
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +1 -1
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +18 -18
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -2
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +50 -50
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +100 -100
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +21 -21
- package/dist/components/BbDialog/BbDialog.vue.d.ts +1 -1
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +133 -107
- package/dist/components/BbDialog/types.d.ts +29 -2
- package/dist/components/BbDropdown/AdaptiveDropdown.vue.d.ts +2 -0
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +99 -100
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +2 -2
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +208 -201
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +225 -208
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +21 -21
- package/dist/components/BbDropdown/types.d.ts +20 -5
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +46 -46
- package/dist/components/BbIcon/iconCache.d.ts +33 -0
- package/dist/components/BbIcon/iconCache.js +17 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +15 -15
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +254 -208
- package/dist/components/BbOffCanvas/types.d.ts +30 -5
- package/dist/components/BbPagination/BbPagination.vue.d.ts +1 -1
- package/dist/components/BbPopover/BbPopover.vue.d.ts +2 -2
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +149 -146
- package/dist/components/BbPopover/types.d.ts +3 -2
- package/dist/components/BbRadioGroup/types.d.ts +3 -1
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +27 -23
- package/dist/components/BbSelect/types.d.ts +32 -0
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +221 -213
- package/dist/components/BbSlider/BbSlider.vue.d.ts +1 -1
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +20 -20
- package/dist/components/BbTable/BbTable.vue.d.ts +10 -4
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1433 -600
- package/dist/components/BbTable/BbTableDataRow.d.ts +162 -0
- package/dist/components/BbTable/BbTableDataRow.js +136 -0
- package/dist/components/BbTable/BbTableExpandRow.d.ts +73 -0
- package/dist/components/BbTable/BbTableExpandRow.js +52 -0
- package/dist/components/BbTable/types.d.ts +324 -111
- package/dist/components/BbTable/utils.d.ts +92 -4
- package/dist/components/BbTable/utils.js +71 -36
- package/dist/components/BbTabs/types.d.ts +0 -8
- package/dist/components/BbTag/BbTag.vue.d.ts +1 -1
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +18 -18
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +1 -1
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +18 -18
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +1 -1
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +54 -54
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +1 -1
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +80 -80
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +61 -61
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +13 -13
- package/dist/components/BbTooltip/types.d.ts +5 -1
- package/dist/components/ChipsBox/ChipsBox.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +83 -83
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +56 -56
- package/dist/composables/useBaseOptions.js +30 -20
- package/dist/composables/useBbConfig.d.ts +27 -6
- package/dist/composables/useBbConfig.js +8 -2
- package/dist/composables/useConfig.d.ts +59 -0
- package/dist/composables/useConfig.js +9 -0
- package/dist/composables/useItemsGetter.d.ts +11 -0
- package/dist/composables/useItemsGetter.js +44 -18
- package/dist/composables/useLocale.js +10 -7
- package/dist/composables/useMobile.js +5 -5
- package/dist/composables/usePrefill.d.ts +21 -2
- package/dist/composables/usePrefill.js +25 -19
- package/dist/composables/useSsrState.d.ts +20 -0
- package/dist/composables/useSsrState.js +13 -0
- package/dist/composables/useTableWidthContext.d.ts +24 -4
- package/dist/composables/useTableWidthContext.js +31 -28
- package/dist/composables/useToast.js +5 -5
- package/dist/deprecation/ai-deprecations.json.d.ts +121 -11
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/directives/bbDropdown.d.ts +15 -4
- package/dist/directives/bbDropdown.js +31 -9
- package/dist/directives/createPopoverDirective.d.ts +62 -0
- package/dist/directives/createPopoverDirective.js +63 -23
- package/dist/i18n/locales/cs.json +4 -1
- package/dist/i18n/locales/da.json +4 -1
- package/dist/i18n/locales/de.json +4 -1
- package/dist/i18n/locales/el.json +4 -1
- package/dist/i18n/locales/en.json +4 -1
- package/dist/i18n/locales/es.json +4 -1
- package/dist/i18n/locales/fi.json +4 -1
- package/dist/i18n/locales/fr.json +4 -1
- package/dist/i18n/locales/hu.json +4 -1
- package/dist/i18n/locales/it.json +4 -1
- package/dist/i18n/locales/ja.json +4 -1
- package/dist/i18n/locales/ko.json +4 -1
- package/dist/i18n/locales/nb.json +4 -1
- package/dist/i18n/locales/nl.json +4 -1
- package/dist/i18n/locales/pl.json +4 -1
- package/dist/i18n/locales/pt.json +4 -1
- package/dist/i18n/locales/ro.json +4 -1
- package/dist/i18n/locales/ru.json +4 -1
- package/dist/i18n/locales/sv.json +4 -1
- package/dist/i18n/locales/tr.json +4 -1
- package/dist/i18n/locales/uk.json +4 -1
- package/dist/i18n/locales/zh-cn.json +4 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.js +69 -67
- package/dist/llms-full.txt +3997 -1458
- package/dist/llms-medium.txt +140 -73
- package/dist/llms.txt +7 -6
- package/dist/locale-blueprint.json +4 -1
- package/dist/nuxt-auto-imports.d.ts +100 -0
- package/dist/nuxt-auto-imports.js +55 -0
- package/dist/nuxt-module.d.ts +22 -1
- package/dist/nuxt.js +22 -8
- package/dist/plugin.d.ts +10 -1
- package/dist/plugin.js +20 -19
- package/dist/runtime/nuxt-plugin.js +28 -21
- package/dist/styles.css +1 -1
- package/dist/utilities/misc/listboxMetrics.d.ts +3 -3
- package/dist/utilities/misc/listboxMetrics.js +2 -2
- package/dist/utilities/misc/ssrStateInjectionKey.d.ts +42 -0
- package/dist/utilities/misc/ssrStateInjectionKey.js +4 -0
- package/dist/validated/BbForm.vue_vue_type_script_setup_true_lang.js +45 -27
- package/dist/validated/BbSelect.vue.d.ts +2 -0
- package/dist/validated/BbSelect.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/validated/useValidatedField.js +25 -23
- package/dist/vite.js +7 -3
- package/llms.txt +8 -7
- package/package.json +2 -2
- package/scripts/lib/eslint-plugin.d.ts +19 -1
- package/scripts/lib/eslint-plugin.mjs +155 -14
- package/scripts/lib/html-attributes.mjs +91 -0
- package/scripts/lib/validate-bb-markup.mjs +59 -11
- package/dist/assets/svgs/sort.svg_raw.js +0 -4
- package/dist/components/BbBadge/BadgeAppendIcon.vue.d.ts +0 -3
- package/dist/components/BbBadge/BadgeAppendIcon.vue.js +0 -5
- package/dist/components/BbBadge/BadgeAppendIcon.vue_vue_type_script_setup_true_lang.js +0 -22
|
@@ -1,32 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
1
|
+
import { useConfig as e } from "../../composables/useConfig.js";
|
|
2
|
+
import { useId as t } from "../../composables/useId.js";
|
|
3
|
+
import { useUntil as n } from "../../composables/useUntil.js";
|
|
4
|
+
import { removedPropsFor as ee } from "../../deprecation/removedProps.js";
|
|
5
|
+
import { useLogger as te } from "../../composables/useLogger.js";
|
|
6
|
+
import { warnRemovedAttrs as ne } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
7
|
+
import { transitions as re } from "../../utilities/misc/transitions.js";
|
|
8
|
+
import { overlaySurfaceIsolation as ie } from "../../utils/overlaySurfaceIsolation.js";
|
|
9
|
+
import { isTopEscapeEntry as ae, pushEscapeEntry as oe, removeEscapeEntry as se } from "../../utils/overlayEscapeStack.js";
|
|
10
|
+
import { useMobile as ce } from "../../composables/useMobile.js";
|
|
11
|
+
import { wait as le } from "../../utilities/functions/wait.js";
|
|
12
|
+
import { useLocale as ue } from "../../composables/useLocale.js";
|
|
13
|
+
import { parseSize as de } from "../../utilities/functions/parseSize.js";
|
|
14
|
+
import { viewportHeight as fe, viewportWidth as pe } from "../../composables/useViewportWidth.js";
|
|
15
|
+
import { useBreakpoint as me } from "../../composables/useBreakpoint.js";
|
|
16
|
+
import he from "../CloseIcon/CloseButton.vue.js";
|
|
17
|
+
import { useOffCanvasStack as ge } from "./useOffCanvasStack.js";
|
|
18
|
+
import { registerTopLayerHost as _e } from "../../composables/useTopLayer.js";
|
|
19
|
+
import { Fragment as ve, computed as r, createBlock as ye, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as be, defineComponent as xe, mergeModels as s, mergeProps as Se, nextTick as Ce, onBeforeUnmount as we, onMounted as Te, openBlock as c, ref as l, renderSlot as u, toDisplayString as Ee, toHandlers as De, unref as d, useModel as Oe, useSlots as ke, watch as f, withModifiers as Ae } from "vue";
|
|
20
|
+
import { useSwipe as je } from "@vueuse/core";
|
|
19
21
|
//#region src/components/BbOffCanvas/BbOffCanvas.vue?vue&type=script&setup=true&lang.ts
|
|
20
|
-
var
|
|
22
|
+
var Me = [
|
|
23
|
+
"aria-describedby",
|
|
24
|
+
"aria-labelledby",
|
|
25
|
+
"inert"
|
|
26
|
+
], Ne = {
|
|
21
27
|
key: 0,
|
|
22
28
|
"aria-hidden": "true",
|
|
23
29
|
class: "bb-offcanvas__handle"
|
|
24
|
-
},
|
|
30
|
+
}, Pe = {
|
|
25
31
|
key: 1,
|
|
26
32
|
class: "bb-offcanvas__header"
|
|
27
|
-
},
|
|
33
|
+
}, Fe = { class: "bb-offcanvas__body-content" }, Ie = { class: "bb-offcanvas__footer" }, Le = 4, Re = 2, ze = 50, Be = 8, p = 500, Ve = "cubic-bezier(0.32, 0.72, 0, 1)", m = /*@__PURE__*/ xe({
|
|
28
34
|
__name: "BbOffCanvas",
|
|
29
|
-
props: /*@__PURE__*/
|
|
35
|
+
props: /*@__PURE__*/ s({
|
|
36
|
+
description: {},
|
|
30
37
|
disabled: { type: Boolean },
|
|
31
38
|
eager: { type: Boolean },
|
|
32
39
|
focusTarget: {},
|
|
@@ -41,7 +48,7 @@ var Ee = ["aria-labelledby", "inert"], De = {
|
|
|
41
48
|
hideClose: { type: Boolean },
|
|
42
49
|
size: { default: "sm" },
|
|
43
50
|
title: {},
|
|
44
|
-
transitionDuration: { default:
|
|
51
|
+
transitionDuration: { default: re.medium },
|
|
45
52
|
side: { default: "left" }
|
|
46
53
|
}, {
|
|
47
54
|
modelValue: {
|
|
@@ -50,233 +57,272 @@ var Ee = ["aria-labelledby", "inert"], De = {
|
|
|
50
57
|
},
|
|
51
58
|
modelModifiers: {}
|
|
52
59
|
}),
|
|
53
|
-
emits: /*@__PURE__*/
|
|
60
|
+
emits: /*@__PURE__*/ s([
|
|
54
61
|
"show",
|
|
55
62
|
"hide",
|
|
56
63
|
"shown",
|
|
57
64
|
"hidden"
|
|
58
65
|
], ["update:modelValue"]),
|
|
59
|
-
setup(
|
|
60
|
-
let
|
|
61
|
-
process.env.NODE_ENV !== "production" &&
|
|
62
|
-
let { t:
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
+
setup(re, { emit: xe }) {
|
|
67
|
+
let s = Oe(re, "modelValue"), m = re, h = xe, g = ke(), He = e();
|
|
68
|
+
process.env.NODE_ENV !== "production" && ne("BbOffCanvas", ee("BbOffCanvas"));
|
|
69
|
+
let { t: Ue } = ue(), _ = () => !!m.title || !!g.title, v = () => _() || !!g.header || w(), y = r(() => !!(m.disabled || m.persistent)), b = () => typeof document < "u", x = l(null), S = n(() => s.value || m.eager, { initialValue: s.value || m.eager }), C = `title_${t().id.value}`, We = `desc_${t().id.value}`, w = () => !!m.description || !!g.description, T = l(0), E = l(!1), D = l(null), Ge = () => {
|
|
70
|
+
D.value = null;
|
|
71
|
+
}, Ke = (e) => {
|
|
72
|
+
D.value = {
|
|
66
73
|
startX: e.clientX,
|
|
67
74
|
startY: e.clientY,
|
|
68
75
|
startedOnBackdrop: e.target === e.currentTarget
|
|
69
76
|
};
|
|
70
|
-
},
|
|
71
|
-
let t =
|
|
72
|
-
|
|
73
|
-
},
|
|
74
|
-
clearTimeout(
|
|
75
|
-
|
|
77
|
+
}, qe = (e) => {
|
|
78
|
+
let t = D.value;
|
|
79
|
+
Ge(), !(t && !t.startedOnBackdrop) && (t && (Math.abs(e.clientX - t.startX) > Le || Math.abs(e.clientY - t.startY) > Le) || tt(e));
|
|
80
|
+
}, O, k = (e) => {
|
|
81
|
+
clearTimeout(O), N.value = !0, O = setTimeout(() => {
|
|
82
|
+
N.value = !1;
|
|
76
83
|
}, e);
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
},
|
|
82
|
-
if (!
|
|
83
|
-
let e =
|
|
84
|
+
}, A = Symbol("bb-off-canvas-escape"), Je = () => {
|
|
85
|
+
oe(A), b() && document.addEventListener("keydown", Ze, { capture: !0 });
|
|
86
|
+
}, Ye = () => {
|
|
87
|
+
se(A), b() && document.removeEventListener("keydown", Ze, { capture: !0 });
|
|
88
|
+
}, Xe = () => {
|
|
89
|
+
if (!m.focusTarget) return;
|
|
90
|
+
let e = x.value?.querySelector(m.focusTarget);
|
|
84
91
|
e instanceof HTMLElement && e.focus();
|
|
85
|
-
},
|
|
86
|
-
if (e.key === "Escape" && !
|
|
87
|
-
},
|
|
88
|
-
if (e)
|
|
92
|
+
}, Ze = (e) => {
|
|
93
|
+
if (e.key === "Escape" && !H.value && ae(A) && (e.stopImmediatePropagation(), y.value)) return e.preventDefault(), k(200), !1;
|
|
94
|
+
}, j = null, Qe = async (e) => {
|
|
95
|
+
if (e) h("show"), T.value++, b() && !document.documentElement.style.getPropertyValue("--scrollbar-width") && document.documentElement.style.setProperty("--scrollbar-width", `${rt()}px`), Je(), await Ce(), E.value = !0, x.value && !x.value.open && x.value.showModal(), _t(), x.value && (j = _e(x.value)), Xe(), h("shown");
|
|
89
96
|
else {
|
|
90
|
-
|
|
91
|
-
let e =
|
|
92
|
-
if (await
|
|
93
|
-
|
|
97
|
+
h("hide");
|
|
98
|
+
let e = T.value;
|
|
99
|
+
if (await le(m.transitionDuration), e !== T.value) return;
|
|
100
|
+
Ye(), vt(), x.value?.close(), j?.(), j = null, E.value = !1, q = !1, K.value = !1, kt(), h("hidden");
|
|
94
101
|
}
|
|
102
|
+
}, $e = () => {
|
|
103
|
+
process.env.NODE_ENV !== "production" && (!g.header || m.title || Ce(() => {
|
|
104
|
+
!x.value || document.getElementById(C) || te().warn(`BbOffCanvas: the #header slot does not contain an element with id="${C}", so aria-labelledby points at nothing and the panel announces as unnamed. Bind the slot's \`titleId\` to your heading: <template #header="{ titleId }"><h2 :id="titleId">…</h2></template>.`);
|
|
105
|
+
}));
|
|
95
106
|
};
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}),
|
|
99
|
-
clearTimeout(
|
|
107
|
+
f(s, Qe), Te(() => {
|
|
108
|
+
s.value && Qe(!0), $e();
|
|
109
|
+
}), we(() => {
|
|
110
|
+
clearTimeout(O), Ye(), W.value?.removeEventListener("scroll", Ct), J?.disconnect(), J = null, vt(), j?.(), j = null;
|
|
100
111
|
});
|
|
101
|
-
let
|
|
102
|
-
if (
|
|
103
|
-
let e =
|
|
104
|
-
return e === "auto" ? "fit-content" :
|
|
105
|
-
}),
|
|
106
|
-
if (e.preventDefault(),
|
|
107
|
-
|
|
108
|
-
},
|
|
109
|
-
|
|
110
|
-
},
|
|
111
|
-
if (
|
|
112
|
-
|
|
112
|
+
let et = r(() => {
|
|
113
|
+
if (ot.value) return "100%";
|
|
114
|
+
let e = at(m.size);
|
|
115
|
+
return e === "auto" ? "fit-content" : de(e, He.offCanvasDefaultSizes);
|
|
116
|
+
}), tt = (e) => {
|
|
117
|
+
if (e.preventDefault(), y.value) return k(300), !1;
|
|
118
|
+
M();
|
|
119
|
+
}, M = () => {
|
|
120
|
+
s.value = !1;
|
|
121
|
+
}, nt = () => {
|
|
122
|
+
if (m.disabled) {
|
|
123
|
+
k(300);
|
|
113
124
|
return;
|
|
114
125
|
}
|
|
115
|
-
|
|
116
|
-
},
|
|
117
|
-
let e =
|
|
118
|
-
return e ?
|
|
119
|
-
},
|
|
120
|
-
typeof ResizeObserver > "u" || !
|
|
121
|
-
|
|
122
|
-
}),
|
|
123
|
-
},
|
|
124
|
-
|
|
125
|
-
},
|
|
126
|
-
|
|
127
|
-
},
|
|
128
|
-
|
|
129
|
-
},
|
|
130
|
-
let e =
|
|
131
|
-
return
|
|
126
|
+
M();
|
|
127
|
+
}, N = l(!1), rt = () => b() ? window.innerWidth - document.documentElement.clientWidth : 0, { isMobile: it } = ce(), { resolve: at } = me(), ot = r(() => m.fullscreen === !0 || m.fullscreen === "mobile" && it.value), P = Symbol("bb-offcanvas"), { stacks: F, push: st, setSize: ct, remove: lt, offset: ut, openOrder: dt, registerOpen: ft, deregisterOpen: pt } = ge(), I = r(() => m.side === "left" || m.side === "right" ? "x" : "y"), L = r(() => m.side === "right" || m.side === "bottom" ? 1 : -1), mt = `bb-offcanvas-${t().id.value}`, R = r(() => m.stack || mt), z = null, B = () => {
|
|
128
|
+
let e = x.value?.getBoundingClientRect();
|
|
129
|
+
return e ? I.value === "x" ? e.width : e.height : 0;
|
|
130
|
+
}, V = null, ht = () => {
|
|
131
|
+
typeof ResizeObserver > "u" || !x.value || (V = new ResizeObserver(() => {
|
|
132
|
+
z !== null && ct(z, P, B());
|
|
133
|
+
}), V.observe(x.value));
|
|
134
|
+
}, gt = () => {
|
|
135
|
+
V?.disconnect(), V = null;
|
|
136
|
+
}, _t = () => {
|
|
137
|
+
z = R.value, st(z, P, m.side, B(), m.stackGap), ft(P), ht();
|
|
138
|
+
}, vt = () => {
|
|
139
|
+
gt(), pt(P), z !== null && (lt(z, P), z = null);
|
|
140
|
+
}, H = r(() => {
|
|
141
|
+
let e = dt.value.indexOf(P);
|
|
142
|
+
return E.value && e !== -1 && e < dt.value.length - Re;
|
|
132
143
|
});
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
() =>
|
|
136
|
-
() =>
|
|
144
|
+
f([
|
|
145
|
+
R,
|
|
146
|
+
() => m.side,
|
|
147
|
+
() => m.stackGap
|
|
137
148
|
], ([e]) => {
|
|
138
|
-
|
|
149
|
+
z !== null && (lt(z, P), z = e, st(e, P, m.side, B(), m.stackGap));
|
|
139
150
|
});
|
|
140
|
-
let
|
|
141
|
-
|
|
142
|
-
let e =
|
|
151
|
+
let yt = r(() => it.value ? 14 : 20), bt = r(() => {
|
|
152
|
+
F.value;
|
|
153
|
+
let e = I.value === "x" ? pe.value : fe.value, t = ut(R.value, P, e, yt.value);
|
|
143
154
|
return {
|
|
144
|
-
[
|
|
155
|
+
[I.value === "x" ? "--stack-x" : "--stack-y"]: `${-L.value * t}px`,
|
|
145
156
|
"--stack-fill": `${t}px`
|
|
146
157
|
};
|
|
147
|
-
}),
|
|
148
|
-
let e =
|
|
158
|
+
}), U = l(!1), xt = 0, St = () => {
|
|
159
|
+
let e = F.value[R.value];
|
|
149
160
|
if (!e) return !1;
|
|
150
|
-
let t = e.filter((e) => e.direction ===
|
|
161
|
+
let t = e.filter((e) => e.direction === m.side), n = t.findIndex((e) => e.id === P);
|
|
151
162
|
return n !== -1 && n !== t.length - 1;
|
|
152
163
|
};
|
|
153
|
-
|
|
154
|
-
let t = e?.length ?? 0, n = t > 0 && t ===
|
|
155
|
-
|
|
164
|
+
f(() => F.value[R.value], (e) => {
|
|
165
|
+
let t = e?.length ?? 0, n = t > 0 && t === xt;
|
|
166
|
+
xt = t, U.value = n && St(), U.value && Ce(() => U.value = !1);
|
|
156
167
|
});
|
|
157
|
-
let
|
|
158
|
-
|
|
159
|
-
},
|
|
160
|
-
|
|
168
|
+
let W = l(null), G = l(!1), K = l(!1), q = !1, J = null, Y = !1, X = !1, Z = !1, Q = !1, $ = () => {
|
|
169
|
+
W.value?.style.removeProperty("touch-action");
|
|
170
|
+
}, Ct = () => $();
|
|
171
|
+
f(W, (e, t) => {
|
|
172
|
+
t?.removeEventListener("scroll", Ct), J?.disconnect(), J = null, e && (e.addEventListener("scroll", Ct, { passive: !0 }), typeof ResizeObserver < "u" && (J = new ResizeObserver(() => $()), J.observe(e)), $());
|
|
173
|
+
}, { flush: "post" }), f([
|
|
174
|
+
() => m.draggable,
|
|
175
|
+
() => m.side,
|
|
176
|
+
E
|
|
177
|
+
], () => $());
|
|
178
|
+
let wt = () => I.value === "y" ? L.value === 1 ? -It.value : It.value : L.value === 1 ? -Ft.value : Ft.value, Tt = () => {
|
|
179
|
+
x.value && (x.value.style.transition = "none"), W.value && I.value === "y" && (W.value.style.touchAction = "none");
|
|
180
|
+
}, Et = (e) => {
|
|
181
|
+
let t = x.value;
|
|
161
182
|
if (!t) return;
|
|
162
|
-
let n = e > 0 ? e *
|
|
163
|
-
t.style.transform =
|
|
164
|
-
},
|
|
165
|
-
let
|
|
166
|
-
|
|
167
|
-
},
|
|
168
|
-
let
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}, _t = (e) => {
|
|
175
|
-
if (Re(e), !y.draggable || e.target === e.currentTarget || e.button !== 0 || !w.value) return;
|
|
176
|
-
Z && gt();
|
|
177
|
-
let t = w.value.getBoundingClientRect();
|
|
178
|
-
Z = {
|
|
179
|
-
pointerId: e.pointerId,
|
|
180
|
-
startX: e.clientX,
|
|
181
|
-
startY: e.clientY,
|
|
182
|
-
size: V.value === "x" ? t.width : t.height,
|
|
183
|
-
startedInBody: !!e.target.closest?.(".bb-offcanvas__body"),
|
|
184
|
-
decided: !1,
|
|
185
|
-
active: !1,
|
|
186
|
-
samples: [{
|
|
187
|
-
t: performance.now(),
|
|
188
|
-
pos: dt(e)
|
|
189
|
-
}]
|
|
190
|
-
}, window.addEventListener("pointermove", vt, { passive: !1 }), window.addEventListener("pointerup", bt), window.addEventListener("pointercancel", xt);
|
|
191
|
-
}, vt = (e) => {
|
|
192
|
-
if (!Z || e.pointerId !== Z.pointerId) return;
|
|
193
|
-
let t = ut(e, Z), n = V.value === "x" ? e.clientY - Z.startY : e.clientX - Z.startX;
|
|
194
|
-
if (!Z.decided) {
|
|
195
|
-
if (Math.abs(t) < v && Math.abs(n) < v) return;
|
|
196
|
-
Z.decided = !0;
|
|
197
|
-
let e = t * H.value;
|
|
198
|
-
if (!(Math.abs(t) >= Math.abs(n)) || Z.startedInBody && ht(e)) {
|
|
199
|
-
gt();
|
|
183
|
+
let n = e > 0 ? e * L.value : 0;
|
|
184
|
+
t.style.transform = I.value === "x" ? `translate3d(${n}px, 0, 0)` : `translate3d(0, ${n}px, 0)`;
|
|
185
|
+
}, Dt = () => {
|
|
186
|
+
let e = x.value;
|
|
187
|
+
e && (e.style.transform = m.side === "bottom" ? "translate3d(0, 100%, 0)" : m.side === "top" ? "translate3d(0, -100%, 0)" : m.side === "left" ? "translate3d(-100%, 0, 0)" : "translate3d(100%, 0, 0)");
|
|
188
|
+
}, Ot = (e) => {
|
|
189
|
+
let t = x.value;
|
|
190
|
+
if (t) {
|
|
191
|
+
if (e) {
|
|
192
|
+
t.style.transition = `transform ${p}ms ${Ve}`, t.style.transform = "translate3d(0, 0, 0)", window.setTimeout(() => {
|
|
193
|
+
!t.isConnected || q || (t.style.removeProperty("transform"), t.style.removeProperty("transition"), $());
|
|
194
|
+
}, p);
|
|
200
195
|
return;
|
|
201
196
|
}
|
|
202
|
-
|
|
197
|
+
t.style.transition = "", $();
|
|
203
198
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
if (e
|
|
210
|
-
|
|
211
|
-
for (let r = e.length - 2; r >= 0 && (n = e[r], !(t.t - e[r].t >= 50)); r--);
|
|
212
|
-
let r = t.t - n.t;
|
|
213
|
-
return r > 0 ? (t.pos - n.pos) / r * H.value : 0;
|
|
214
|
-
}, bt = (e) => {
|
|
215
|
-
if (!Z || e.pointerId !== Z.pointerId) return;
|
|
216
|
-
let { active: t, size: n, samples: r } = Z, i = ut(e, Z) * H.value;
|
|
217
|
-
if ($(), Z = null, !t) return;
|
|
218
|
-
X.value = !1;
|
|
219
|
-
let a = i > n * Me || yt(r) > Ne && i > v;
|
|
220
|
-
if (a && !S.value) {
|
|
221
|
-
Q(!1), F();
|
|
199
|
+
}, kt = () => {
|
|
200
|
+
let e = x.value;
|
|
201
|
+
e && (q || (e.style.removeProperty("transition"), e.style.removeProperty("transform")));
|
|
202
|
+
}, At = async () => {
|
|
203
|
+
let e = x.value;
|
|
204
|
+
if (!e) {
|
|
205
|
+
M();
|
|
222
206
|
return;
|
|
223
207
|
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
}
|
|
230
|
-
|
|
208
|
+
if (q = !0, K.value = !0, e.style.transition = `transform ${p}ms ${Ve}`, Dt(), await le(p), !s.value) {
|
|
209
|
+
q = !1, K.value = !1, e.style.removeProperty("transform"), e.style.removeProperty("transition"), $();
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
e.style.transition = "none", Dt(), M();
|
|
213
|
+
}, jt = (e) => {
|
|
214
|
+
let { overflowY: t } = getComputedStyle(e);
|
|
215
|
+
return t !== "auto" && t !== "scroll" ? !1 : e.scrollHeight > e.clientHeight + 1;
|
|
216
|
+
}, Mt = (e) => L.value === 1 ? e.scrollTop <= 1 : e.scrollTop + e.clientHeight >= e.scrollHeight - 1, Nt = (e) => {
|
|
217
|
+
let t = x.value;
|
|
218
|
+
if (!t) return !1;
|
|
219
|
+
let n = e;
|
|
220
|
+
for (; n && n !== t;) {
|
|
221
|
+
if (n instanceof HTMLElement && jt(n) && !Mt(n)) return !0;
|
|
222
|
+
n = n.parentElement;
|
|
223
|
+
}
|
|
224
|
+
return !1;
|
|
225
|
+
}, Pt = () => {
|
|
226
|
+
Y = !1, X = !1, Z = !1, Q = !1, G.value = !1;
|
|
227
|
+
}, { lengthX: Ft, lengthY: It } = je(x, {
|
|
228
|
+
threshold: Be,
|
|
229
|
+
passive: !1,
|
|
230
|
+
onSwipeStart: (e) => {
|
|
231
|
+
if (Pt(), !m.draggable || !E.value || e.target === x.value) return;
|
|
232
|
+
let t = e.target;
|
|
233
|
+
t instanceof Element && (Y = !0, X = !!t.closest(".bb-offcanvas__body"), Q = X && Nt(t));
|
|
234
|
+
},
|
|
235
|
+
onSwipe: (e) => {
|
|
236
|
+
if (!Y || !m.draggable || Q) return;
|
|
237
|
+
let t = wt();
|
|
238
|
+
if (!Z) {
|
|
239
|
+
if (X && t < -8) {
|
|
240
|
+
Q = !0;
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
if (t < Be) return;
|
|
244
|
+
Z = !0, G.value = !0, Tt();
|
|
245
|
+
}
|
|
246
|
+
e.preventDefault(), Et(t);
|
|
247
|
+
},
|
|
248
|
+
onSwipeEnd: () => {
|
|
249
|
+
if (!Z) {
|
|
250
|
+
Pt();
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
let e = wt();
|
|
254
|
+
if (Pt(), e >= ze && !y.value) {
|
|
255
|
+
At();
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
Ot(!0), e >= ze && k(300);
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
return (e, t) => (c(), a("dialog", Se({
|
|
231
262
|
ref_key: "dialog",
|
|
232
|
-
ref:
|
|
233
|
-
"aria-
|
|
263
|
+
ref: x,
|
|
264
|
+
"aria-describedby": d(S) && w() ? We : void 0,
|
|
265
|
+
"aria-labelledby": d(S) && (_() || e.$slots.header) ? C : void 0,
|
|
234
266
|
class: ["bb-offcanvas", [{
|
|
235
|
-
"bb-offcanvas--open":
|
|
236
|
-
"bb-offcanvas--visible":
|
|
237
|
-
"bb-offcanvas--fullscreen":
|
|
238
|
-
"bb-offcanvas--deny-close":
|
|
239
|
-
"bb-offcanvas--dragging":
|
|
240
|
-
"bb-offcanvas--
|
|
241
|
-
"bb-offcanvas--
|
|
267
|
+
"bb-offcanvas--open": s.value,
|
|
268
|
+
"bb-offcanvas--visible": E.value,
|
|
269
|
+
"bb-offcanvas--fullscreen": ot.value,
|
|
270
|
+
"bb-offcanvas--deny-close": N.value,
|
|
271
|
+
"bb-offcanvas--dragging": G.value,
|
|
272
|
+
"bb-offcanvas--swipe-exit": K.value,
|
|
273
|
+
"bb-offcanvas--instant-stack": U.value,
|
|
274
|
+
"bb-offcanvas--covered": H.value,
|
|
242
275
|
"bb-offcanvas--has-handle": e.draggable,
|
|
243
|
-
"bb-offcanvas--no-header": !
|
|
244
|
-
[`bb-offcanvas--${
|
|
276
|
+
"bb-offcanvas--no-header": !v(),
|
|
277
|
+
[`bb-offcanvas--${m.side}`]: !0
|
|
245
278
|
}].flat()],
|
|
246
|
-
inert: !
|
|
279
|
+
inert: !s.value && !E.value || H.value,
|
|
247
280
|
style: {
|
|
248
|
-
"--max-size":
|
|
249
|
-
"--transition-duration": `${
|
|
250
|
-
"--stack-gap": `${
|
|
251
|
-
...
|
|
281
|
+
"--max-size": et.value,
|
|
282
|
+
"--transition-duration": `${m.transitionDuration}ms`,
|
|
283
|
+
"--stack-gap": `${m.stackGap}px`,
|
|
284
|
+
...bt.value
|
|
252
285
|
}
|
|
253
|
-
},
|
|
254
|
-
onCancel:
|
|
255
|
-
onClick:
|
|
256
|
-
onPointercancel:
|
|
257
|
-
onPointerdown:
|
|
258
|
-
}), [
|
|
259
|
-
e.draggable ? (
|
|
260
|
-
|
|
261
|
-
close:
|
|
286
|
+
}, De(d(ie), !0), {
|
|
287
|
+
onCancel: tt,
|
|
288
|
+
onClick: Ae(qe, ["self"]),
|
|
289
|
+
onPointercancel: Ge,
|
|
290
|
+
onPointerdown: Ke
|
|
291
|
+
}), [d(S) ? (c(), a(ve, { key: 0 }, [
|
|
292
|
+
e.draggable ? (c(), a("div", Ne)) : i("", !0),
|
|
293
|
+
v() ? (c(), a("div", Pe, [u(e.$slots, "header", {
|
|
294
|
+
close: M,
|
|
262
295
|
title: e.title,
|
|
263
|
-
titleId:
|
|
264
|
-
}, () => [
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
"
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
296
|
+
titleId: C
|
|
297
|
+
}, () => [
|
|
298
|
+
_() ? (c(), a("span", {
|
|
299
|
+
key: 0,
|
|
300
|
+
id: C,
|
|
301
|
+
class: "bb-offcanvas__title"
|
|
302
|
+
}, [u(e.$slots, "title", { text: e.title }, () => [be(Ee(e.title), 1)])])) : i("", !0),
|
|
303
|
+
w() ? (c(), a("p", {
|
|
304
|
+
key: 1,
|
|
305
|
+
id: We,
|
|
306
|
+
class: "bb-offcanvas__description"
|
|
307
|
+
}, [u(e.$slots, "description", { text: e.description }, () => [be(Ee(e.description), 1)])])) : i("", !0),
|
|
308
|
+
e.hideClose ? i("", !0) : (c(), ye(he, {
|
|
309
|
+
key: 2,
|
|
310
|
+
"aria-label": d(Ue)("offCanvas.closeLabel").value,
|
|
311
|
+
onClick: nt
|
|
312
|
+
}, null, 8, ["aria-label"]))
|
|
313
|
+
])])) : i("", !0),
|
|
314
|
+
o("div", {
|
|
273
315
|
ref_key: "body",
|
|
274
|
-
ref:
|
|
316
|
+
ref: W,
|
|
275
317
|
class: "bb-offcanvas__body scrollbar-border"
|
|
276
|
-
}, [
|
|
277
|
-
|
|
278
|
-
|
|
318
|
+
}, [o("div", Fe, [u(e.$slots, "default", { close: M }), !v() && !e.hideClose ? (c(), ye(he, {
|
|
319
|
+
key: 0,
|
|
320
|
+
"aria-label": d(Ue)("offCanvas.closeLabel").value,
|
|
321
|
+
onClick: nt
|
|
322
|
+
}, null, 8, ["aria-label"])) : i("", !0)])], 512),
|
|
323
|
+
o("div", Ie, [u(e.$slots, "footer")])
|
|
324
|
+
], 64)) : i("", !0)], 16, Me));
|
|
279
325
|
}
|
|
280
326
|
});
|
|
281
327
|
//#endregion
|
|
282
|
-
export {
|
|
328
|
+
export { m as default };
|
|
@@ -4,6 +4,18 @@ import { Responsive } from '../../types/ResponsiveSize';
|
|
|
4
4
|
export type { Sizes };
|
|
5
5
|
type OffCanvasSize = NonNullable<Size<Sizes>['size']> | 'auto';
|
|
6
6
|
export type BbOffCanvasProps = {
|
|
7
|
+
/**
|
|
8
|
+
* One short line under the title, in the header — the shadcn
|
|
9
|
+
* `DialogDescription` shape: same block as the title, lower hierarchy,
|
|
10
|
+
* muted.
|
|
11
|
+
*
|
|
12
|
+
* It is also what `aria-describedby` points at. That wiring was dropped in
|
|
13
|
+
* v3 along with the old `description` prop, on the reasoning that pointing
|
|
14
|
+
* it at arbitrary body content would read whole forms aloud — true, and the
|
|
15
|
+
* reason it aims at THIS element only. Keep it to a sentence; anything
|
|
16
|
+
* longer belongs in the body.
|
|
17
|
+
*/
|
|
18
|
+
description?: string;
|
|
7
19
|
/**
|
|
8
20
|
* Disable EVERY user-initiated dismissal: backdrop click, Escape,
|
|
9
21
|
* drag-to-dismiss AND the header close (×) button (denied attempts play the
|
|
@@ -26,10 +38,10 @@ export type BbOffCanvasProps = {
|
|
|
26
38
|
*/
|
|
27
39
|
fullscreen?: boolean | 'mobile';
|
|
28
40
|
/**
|
|
29
|
-
* Enable drag-to-dismiss
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* backdrop, or Escape only).
|
|
41
|
+
* Enable drag-to-dismiss via VueUse `useSwipe` (fixed ~50px threshold toward
|
|
42
|
+
* the exit edge, including from the scrollable body once it is at its scroll
|
|
43
|
+
* edge). A grab handle on the inner edge is the visual cue. When `false`, the
|
|
44
|
+
* panel is static (dismiss via the close button, backdrop, or Escape only).
|
|
33
45
|
* @defaultValue `false`
|
|
34
46
|
*/
|
|
35
47
|
draggable?: boolean;
|
|
@@ -103,17 +115,30 @@ export type BbOffCanvasHeaderSlotProps = {
|
|
|
103
115
|
title: BbOffCanvasProps['title'];
|
|
104
116
|
};
|
|
105
117
|
/** Props exposed by the `title` slot. */
|
|
118
|
+
/** Props exposed by the `description` slot. */
|
|
119
|
+
export type BbOffCanvasDescriptionSlotProps = {
|
|
120
|
+
/** The `description` prop value. */
|
|
121
|
+
text: BbOffCanvasProps['description'];
|
|
122
|
+
};
|
|
106
123
|
export type BbOffCanvasTitleSlotProps = {
|
|
107
124
|
/** The `title` prop value. */
|
|
108
125
|
text: BbOffCanvasProps['title'];
|
|
109
126
|
};
|
|
110
127
|
export type BbOffCanvasSlots = {
|
|
128
|
+
/**
|
|
129
|
+
* Replaces the description text under the title. Renders the header even
|
|
130
|
+
* when `title` and `description` are unset — a slotted description is a
|
|
131
|
+
* description, the same rule `#title` follows.
|
|
132
|
+
*/
|
|
133
|
+
description?: (props: BbOffCanvasDescriptionSlotProps) => any;
|
|
111
134
|
/**
|
|
112
135
|
* Replaces the entire off-canvas header section (title + close button). Maintains accessibility wiring via the provided props.
|
|
113
136
|
*/
|
|
114
137
|
header?: (props: BbOffCanvasHeaderSlotProps) => any;
|
|
115
138
|
/**
|
|
116
|
-
* Replaces the default title text inside the header. Remains linked to the
|
|
139
|
+
* Replaces the default title text inside the header. Remains linked to the
|
|
140
|
+
* panel through `aria-labelledby`. Providing this slot renders the header even
|
|
141
|
+
* when `title` is unset — a slotted title is a title.
|
|
117
142
|
*/
|
|
118
143
|
title?: (props: BbOffCanvasTitleSlotProps) => any;
|
|
119
144
|
/**
|
|
@@ -18,9 +18,9 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {
|
|
|
18
18
|
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
19
19
|
}>, {
|
|
20
20
|
queryKey: string;
|
|
21
|
-
align: "left" | "right" | "center";
|
|
22
21
|
ellipsis: string;
|
|
23
22
|
maxSize: number | string;
|
|
23
|
+
align: "left" | "right" | "center";
|
|
24
24
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
25
25
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
26
|
declare const _default: typeof __VLS_export;
|