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