bitboss-ui 3.0.0-beta.70 → 3.0.0-beta.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/bin/cli.mjs +6 -1
- package/dist/ai/BbAccordion.md +38 -19
- package/dist/ai/BbBadge.md +25 -22
- package/dist/ai/BbBreadcrumbs.md +4 -1
- package/dist/ai/BbButton.md +32 -27
- package/dist/ai/BbCalendar.md +1 -0
- package/dist/ai/BbCarousel.md +6 -4
- package/dist/ai/BbCheckbox.md +5 -6
- package/dist/ai/BbCheckboxGroup.md +27 -27
- package/dist/ai/BbColorInput.md +4 -5
- package/dist/ai/BbConfirm.md +65 -81
- package/dist/ai/BbConfirmPortal.md +2 -2
- package/dist/ai/BbDatePicker.md +1 -6
- package/dist/ai/BbDatePickerInput.md +5 -6
- package/dist/ai/BbDialog.md +230 -164
- package/dist/ai/BbDropdown.md +87 -17
- package/dist/ai/BbDropdownButton.md +15 -15
- package/dist/ai/BbDropzone.md +12 -8
- package/dist/ai/BbForm.md +93 -7
- package/dist/ai/BbHost.md +2 -2
- package/dist/ai/BbHoverCardPortal.md +1 -1
- package/dist/ai/BbIcon.md +1 -1
- package/dist/ai/BbIndicator.md +17 -15
- package/dist/ai/BbNumberInput.md +10 -9
- package/dist/ai/BbOffCanvas.md +29 -7
- package/dist/ai/BbPagination.md +2 -2
- package/dist/ai/BbPopover.md +15 -9
- package/dist/ai/BbPopoverPortal.md +1 -1
- package/dist/ai/BbRadio.md +5 -6
- package/dist/ai/BbRadioGroup.md +53 -37
- package/dist/ai/BbRating.md +11 -16
- package/dist/ai/BbSelect.md +25 -5
- package/dist/ai/BbSelectPopover.md +9 -3
- package/dist/ai/BbSlider.md +15 -17
- package/dist/ai/BbSpinner.md +3 -2
- package/dist/ai/BbSwitch.md +9 -9
- package/dist/ai/BbSwitchGroup.md +11 -13
- package/dist/ai/BbTable.md +205 -82
- package/dist/ai/BbTabs.md +29 -4
- package/dist/ai/BbTag.md +4 -5
- package/dist/ai/BbTextInput.md +18 -16
- package/dist/ai/BbTextarea.md +12 -11
- package/dist/ai/BbTimePickerInput.md +4 -5
- package/dist/ai/BbToast.md +3 -2
- package/dist/ai/BbTooltip.md +39 -30
- package/dist/ai/BbTree.md +49 -24
- package/dist/ai/CommonField.md +2 -10
- package/dist/ai/CommonFieldInput.md +1 -1
- package/dist/ai/OptionsContainer.md +5 -13
- package/dist/ai/changelog.json +278 -10
- package/dist/ai/components.json +59 -58
- package/dist/ai/composables/useBbDialog.md +5 -8
- package/dist/ai/composables/useBbForm.md +3 -0
- package/dist/ai/composables/useConfirm.md +65 -56
- package/dist/ai/composables/useToast.md +2 -1
- package/dist/ai/guides/agent-contract.md +3 -3
- package/dist/ai/guides/app-layout.md +3 -2
- package/dist/ai/guides/eslint-rules.md +3 -1
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/floating-bottom-panel.md +3 -2
- package/dist/ai/guides/icons-policy.md +7 -5
- package/dist/ai/guides/inertia-helpers.md +35 -30
- package/dist/ai/guides/installation-and-plugin-setup.md +17 -14
- package/dist/ai/guides/migration/adoption-checklist.md +2 -2
- package/dist/ai/guides/migration/components/bb-badge.md +12 -1
- package/dist/ai/guides/migration/components/bb-button.md +24 -0
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +11 -0
- package/dist/ai/guides/migration/components/bb-tabs.md +2 -2
- package/dist/ai/guides/migration/components/bb-toast.md +11 -0
- package/dist/ai/guides/migration/components/use-confirm.md +69 -26
- package/dist/ai/guides/migration/v2-to-v3.md +78 -12
- package/dist/ai/guides/migration/v3-beta-css-classes.md +1 -1
- package/dist/ai/guides/options-items-playbook.md +4 -3
- package/dist/ai/guides/passthrough.md +2 -2
- package/dist/ai/guides/preset-components.md +35 -10
- package/dist/ai/helpers/definePreset.json +8 -1
- package/dist/ai/helpers/definePreset.ts +35 -10
- package/dist/ai/helpers/inertia/manifest.json +28 -15
- package/dist/ai/helpers/inertia/messages.ts +3 -3
- package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +10 -10
- package/dist/ai/helpers/inertia/usePromiseForm.ts +1 -1
- package/dist/ai/helpers/inertia/usePromiseRouter.ts +7 -2
- package/dist/ai/index.md +3 -3
- package/dist/ai/manifest/common.json +5 -5
- package/dist/ai/manifest/components/BbAccordion.json +8 -5
- package/dist/ai/manifest/components/BbAccordion.tree.json +1 -0
- package/dist/ai/manifest/components/BbBadge.json +8 -7
- package/dist/ai/manifest/components/BbBadge.removed.json +3 -1
- package/dist/ai/manifest/components/BbBadge.tree.json +73 -0
- package/dist/ai/manifest/components/BbBreadcrumbs.json +2 -2
- package/dist/ai/manifest/components/BbButton.json +5 -6
- package/dist/ai/manifest/components/BbButton.removed.json +3 -1
- package/dist/ai/manifest/components/BbButton.tree.json +24 -7
- package/dist/ai/manifest/components/BbCalendar.json +2 -1
- package/dist/ai/manifest/components/BbCheckbox.json +2 -2
- package/dist/ai/manifest/components/BbCheckbox.tree.json +1 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +9 -19
- package/dist/ai/manifest/components/BbColorInput.json +3 -3
- package/dist/ai/manifest/components/BbColorInput.tree.json +2 -2
- package/dist/ai/manifest/components/BbConfirm.json +2 -2
- package/dist/ai/manifest/components/BbConfirm.removed.json +9 -0
- package/dist/ai/manifest/components/BbConfirm.tree.json +4 -5
- package/dist/ai/manifest/components/BbConfirmPortal.json +3 -3
- package/dist/ai/manifest/components/BbConfirmPortal.removed.json +7 -0
- package/dist/ai/manifest/components/BbDatePicker.json +2 -1
- package/dist/ai/manifest/components/BbDatePicker.tree.json +0 -6
- package/dist/ai/manifest/components/BbDatePickerInput.json +2 -2
- package/dist/ai/manifest/components/BbDatePickerInput.tree.json +2 -2
- package/dist/ai/manifest/components/BbDialog.json +6 -1
- package/dist/ai/manifest/components/BbDialog.tree.json +41 -1
- package/dist/ai/manifest/components/BbDropdown.json +10 -9
- package/dist/ai/manifest/components/BbDropdown.tree.json +4 -0
- package/dist/ai/manifest/components/BbDropdownButton.json +9 -10
- package/dist/ai/manifest/components/BbDropdownButton.removed.json +3 -1
- package/dist/ai/manifest/components/BbForm.json +3 -1
- package/dist/ai/manifest/components/BbNumberInput.json +1 -1
- package/dist/ai/manifest/components/BbNumberInput.tree.json +2 -2
- package/dist/ai/manifest/components/BbOffCanvas.json +6 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +40 -0
- package/dist/ai/manifest/components/BbPagination.json +1 -1
- package/dist/ai/manifest/components/BbRadio.tree.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +4 -3
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +8 -18
- package/dist/ai/manifest/components/BbRating.json +2 -2
- package/dist/ai/manifest/components/BbRating.tree.json +1 -1
- package/dist/ai/manifest/components/BbSelect.json +2 -1
- package/dist/ai/manifest/components/BbSelect.tree.json +2 -2
- package/dist/ai/manifest/components/BbSelectPopover.json +1 -0
- package/dist/ai/manifest/components/BbSlider.tree.json +1 -1
- package/dist/ai/manifest/components/BbSwitch.json +4 -4
- package/dist/ai/manifest/components/BbSwitch.tree.json +1 -1
- package/dist/ai/manifest/components/BbSwitchGroup.json +7 -7
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +2 -2
- package/dist/ai/manifest/components/BbTable.json +15 -14
- package/dist/ai/manifest/components/BbTable.tree.json +2 -0
- package/dist/ai/manifest/components/BbTabs.json +3 -3
- package/dist/ai/manifest/components/BbTabsList.json +1 -1
- package/dist/ai/manifest/components/BbTabsRoot.json +1 -1
- package/dist/ai/manifest/components/BbTag.json +1 -1
- package/dist/ai/manifest/components/BbTag.tree.json +2 -2
- package/dist/ai/manifest/components/BbTextInput.json +1 -1
- package/dist/ai/manifest/components/BbTextInput.tree.json +2 -2
- package/dist/ai/manifest/components/BbTextarea.json +1 -1
- package/dist/ai/manifest/components/BbTextarea.tree.json +2 -2
- package/dist/ai/manifest/components/BbTimePicker.json +1 -1
- package/dist/ai/manifest/components/BbTimePickerInput.json +1 -1
- package/dist/ai/manifest/components/BbTimePickerInput.tree.json +2 -2
- package/dist/ai/manifest/components/BbToast.removed.json +2 -1
- package/dist/ai/manifest/components/BbTooltip.json +1 -1
- package/dist/ai/manifest/components/BbTooltip.tree.json +2 -2
- package/dist/ai/manifest/components/BbTree.json +2 -2
- package/dist/ai/manifest/components/CommonField.tree.json +5 -10
- package/dist/ai/manifest/components/CommonFieldInput.tree.json +3 -3
- package/dist/ai/manifest/components/OptionsContainer.tree.json +5 -13
- package/dist/ai/manifest/index.json +4 -4
- package/dist/ai/manifest/meta.json +5 -1
- package/dist/ai/manifest/types.advanced.json +9 -9
- package/dist/ai/manifest/types.api.json +7 -6
- package/dist/ai/recipes/inertia/approvals-inbox.md +23 -16
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +12 -5
- package/dist/ai/recipes/inertia/layout-scaffold.md +5 -3
- package/dist/ai/recipes/inertia/onboarding.md +23 -12
- package/dist/ai/recipes/inertia/ownership-atlas.md +34 -18
- package/dist/ai/recipes/inertia/record-form.md +12 -8
- package/dist/ai/recipes/inertia/records-workspace.md +14 -7
- package/dist/ai/recipes/inertia/settings-workspace.md +75 -60
- package/dist/ai/recipes/inertia/upload-center.md +17 -9
- package/dist/ai/recipes/inertia/wizard-form.md +2 -2
- package/dist/ai/recipes/nuxt/approvals-inbox.md +23 -16
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +12 -5
- package/dist/ai/recipes/nuxt/layout-scaffold.md +5 -3
- package/dist/ai/recipes/nuxt/onboarding.md +5 -4
- package/dist/ai/recipes/nuxt/ownership-atlas.md +34 -18
- package/dist/ai/recipes/nuxt/record-form.md +14 -10
- package/dist/ai/recipes/nuxt/records-workspace.md +14 -7
- package/dist/ai/recipes/nuxt/settings-workspace.md +70 -60
- package/dist/ai/recipes/nuxt/upload-center.md +17 -9
- package/dist/ai/recipes/nuxt/wizard-form.md +4 -4
- package/dist/ai/recipes/vue/approvals-inbox.md +23 -16
- package/dist/ai/recipes/vue/inline-edit-workspace.md +12 -5
- package/dist/ai/recipes/vue/layout-scaffold.md +5 -3
- package/dist/ai/recipes/vue/onboarding.md +5 -4
- package/dist/ai/recipes/vue/ownership-atlas.md +34 -18
- package/dist/ai/recipes/vue/record-form.md +14 -10
- package/dist/ai/recipes/vue/records-workspace.md +14 -7
- package/dist/ai/recipes/vue/settings-workspace.md +70 -60
- package/dist/ai/recipes/vue/upload-center.md +17 -9
- package/dist/ai/recipes/vue/wizard-form.md +4 -4
- package/dist/ai/source/BbAccordion.md +50 -16
- package/dist/ai/source/BbBadge.md +420 -26
- package/dist/ai/source/BbBadgeButton.md +378 -12
- package/dist/ai/source/BbBreadcrumbs.md +31 -12
- package/dist/ai/source/BbButton.md +205 -55
- package/dist/ai/source/BbCalendar.md +5 -0
- package/dist/ai/source/BbCheckbox.md +36 -42
- package/dist/ai/source/BbCheckboxGroup.md +40 -17
- package/dist/ai/source/BbColorInput.md +2 -4
- package/dist/ai/source/BbConfigScope.md +19 -2
- package/dist/ai/source/BbConfirm.md +74 -80
- package/dist/ai/source/BbConfirmPortal.md +6 -6
- package/dist/ai/source/BbDatePicker.md +9 -2
- package/dist/ai/source/BbDatePickerInput.md +5 -5
- package/dist/ai/source/BbDialog.md +53 -2
- package/dist/ai/source/BbDropdown.md +360 -99
- package/dist/ai/source/BbDropdownButton.md +24 -13
- package/dist/ai/source/BbDropdownGroup.md +145 -60
- package/dist/ai/source/BbForm.md +144 -10
- package/dist/ai/source/BbNumberInput.md +2 -4
- package/dist/ai/source/BbOffCanvas.md +53 -2
- package/dist/ai/source/BbPagination.md +1 -1
- package/dist/ai/source/BbRadio.md +36 -42
- package/dist/ai/source/BbRadioGroup.md +74 -14
- package/dist/ai/source/BbRating.md +32 -36
- package/dist/ai/source/BbSelect.md +40 -13
- package/dist/ai/source/BbSelectPopover.md +105 -34
- package/dist/ai/source/BbSlider.md +2 -4
- package/dist/ai/source/BbSwitch.md +57 -46
- package/dist/ai/source/BbSwitchGroup.md +67 -21
- package/dist/ai/source/BbTable.md +363 -49
- package/dist/ai/source/BbTabs.md +6 -0
- package/dist/ai/source/BbTabsList.md +10 -0
- package/dist/ai/source/BbTabsPanels.md +6 -0
- package/dist/ai/source/BbTabsRoot.md +6 -0
- package/dist/ai/source/BbTag.md +2 -4
- package/dist/ai/source/BbTextInput.md +2 -4
- package/dist/ai/source/BbTextarea.md +2 -4
- package/dist/ai/source/BbTimePickerInput.md +2 -4
- package/dist/ai/source/BbTooltip.md +9 -3
- package/dist/ai/source/BbTree.md +14 -4
- package/dist/ai/source/CommonField.md +17 -106
- package/dist/ai/source/CommonFieldInput.md +2 -1
- package/dist/ai/source/GuidesComponent.md +3 -0
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +7 -3
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +52 -38
- package/dist/components/BbAccordion/ptKeys.generated.d.ts +20 -0
- package/dist/components/BbAccordion/types.d.ts +21 -7
- package/dist/components/BbAccordion/types.js +1 -1
- package/dist/components/BbAlert/BbAlert.vue.d.ts +1 -1
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbBadge/BbBadge.vue.d.ts +1 -1
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +65 -42
- package/dist/components/BbBadge/types.d.ts +15 -12
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +106 -106
- package/dist/components/BbBreadcrumbs/types.d.ts +6 -0
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +79 -73
- package/dist/components/BbButton/types.d.ts +7 -6
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +2 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/BbCalendar/types.d.ts +5 -0
- package/dist/components/BbCalendar/useCalendarGrid.js +1 -1
- package/dist/components/BbCalendar/useDayGrid.js +1 -1
- package/dist/components/BbCheckbox/types.d.ts +2 -4
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +10 -4
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbCheckboxGroup/types.d.ts +4 -6
- package/dist/components/BbColorInput/types.d.ts +2 -4
- package/dist/components/BbConfigScope/BbConfigScope.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +71 -132
- package/dist/components/BbConfirm/ptKeys.generated.d.ts +5 -5
- package/dist/components/BbConfirm/types.d.ts +5 -5
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +2 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +3 -0
- package/dist/components/BbDatePicker/types.d.ts +5 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +1 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +2 -0
- package/dist/components/BbDatePickerInput/types.d.ts +4 -5
- package/dist/components/BbDialog/BbDialog.vue.d.ts +3 -0
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +263 -235
- package/dist/components/BbDialog/overlayActions.js +94 -0
- package/dist/components/BbDialog/types.d.ts +24 -0
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +4 -3
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +384 -332
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +121 -120
- package/dist/components/BbDropdown/dropdownHandle.js +6 -0
- package/dist/components/BbDropdown/normalizeGroups.js +58 -44
- package/dist/components/BbDropdown/types.d.ts +116 -50
- package/dist/components/BbDropdown/types.js +2 -2
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +105 -104
- package/dist/components/BbDropdownButton/types.d.ts +2 -4
- package/dist/components/BbForm/BbForm.vue.d.ts +2 -1
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +240 -198
- package/dist/components/BbForm/recognizeValidation.d.ts +9 -0
- package/dist/components/BbForm/recognizeValidation.js +55 -0
- package/dist/components/BbForm/validationError.d.ts +10 -0
- package/dist/components/BbForm/validationError.js +11 -0
- package/dist/components/BbNumberInput/types.d.ts +2 -4
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +3 -0
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +414 -389
- package/dist/components/BbOffCanvas/sheetAttrs.js +5 -5
- package/dist/components/BbOffCanvas/types.d.ts +24 -0
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/BbRadio/types.d.ts +2 -4
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +10 -4
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +173 -157
- package/dist/components/BbRadioGroup/types.d.ts +11 -7
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +126 -119
- package/dist/components/BbRating/types.d.ts +5 -6
- package/dist/components/BbSelect/BbSelect.vue.d.ts +17 -10
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +3 -1
- package/dist/components/BbSelect/types.d.ts +12 -6
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +11 -4
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +513 -502
- package/dist/components/BbSelectPopover/types.d.ts +10 -2
- package/dist/components/BbSlider/types.d.ts +2 -4
- package/dist/components/BbSwitch/BbSwitch.vue.d.ts +2 -0
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +85 -73
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +10 -4
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +171 -152
- package/dist/components/BbSwitchGroup/types.d.ts +1 -1
- package/dist/components/BbTable/BbTable.vue.d.ts +36 -25
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1338 -1215
- package/dist/components/BbTable/BbTableDataRow.js +2 -1
- package/dist/components/BbTable/BbTableRowMenu.js +36 -0
- package/dist/components/BbTable/types.d.ts +33 -18
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbTabs/types.d.ts +6 -0
- package/dist/components/BbTag/types.d.ts +2 -4
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +1 -1
- package/dist/components/BbTextInput/types.d.ts +2 -4
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +1 -1
- package/dist/components/BbTextarea/types.d.ts +2 -4
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +1 -1
- package/dist/components/BbTimePickerInput/types.d.ts +2 -4
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +88 -94
- package/dist/components/BbTooltip/ptKeys.generated.d.ts +4 -4
- package/dist/components/BbTooltip/types.d.ts +3 -1
- package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/components/BbTree/types.d.ts +8 -2
- package/dist/components/CommonField/types.d.ts +2 -4
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +39 -39
- package/dist/composables/formSubmitLock.js +15 -8
- package/dist/composables/overlayRegistry.d.ts +5 -0
- package/dist/composables/overlayRegistry.js +154 -148
- package/dist/composables/useBbDropdown.d.ts +8 -0
- package/dist/composables/useBbDropdown.js +3 -1
- package/dist/composables/useBbTabs.js +138 -138
- package/dist/composables/useChoiceIndicator.js +67 -64
- package/dist/composables/useConfirm.d.ts +63 -52
- package/dist/composables/useConfirm.js +22 -18
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/directives/bbDropdown.d.ts +7 -7
- package/dist/directives/bbDropdown.js +22 -15
- package/dist/directives/bbTooltip.d.ts +3 -3
- package/dist/directives/createPopoverDirective.js +57 -35
- package/dist/i18n/locales/ar.json +5 -1
- package/dist/i18n/locales/cs.json +5 -1
- package/dist/i18n/locales/da.json +5 -1
- package/dist/i18n/locales/de-CH.json +5 -1
- package/dist/i18n/locales/de.json +5 -1
- package/dist/i18n/locales/el.json +5 -1
- package/dist/i18n/locales/en-GB.json +5 -1
- package/dist/i18n/locales/en.json +5 -1
- package/dist/i18n/locales/es-MX.json +5 -1
- package/dist/i18n/locales/es.json +5 -1
- package/dist/i18n/locales/fa.json +5 -1
- package/dist/i18n/locales/fi.json +5 -1
- package/dist/i18n/locales/fr.json +5 -1
- package/dist/i18n/locales/he.json +5 -1
- package/dist/i18n/locales/hu.json +5 -1
- package/dist/i18n/locales/it.json +5 -1
- package/dist/i18n/locales/ja.json +5 -1
- package/dist/i18n/locales/ko.json +5 -1
- package/dist/i18n/locales/nb.json +5 -1
- package/dist/i18n/locales/nl.json +5 -1
- package/dist/i18n/locales/pl.json +5 -1
- package/dist/i18n/locales/pt-BR.json +5 -1
- package/dist/i18n/locales/pt-PT.json +5 -1
- package/dist/i18n/locales/ro.json +5 -1
- package/dist/i18n/locales/ru.json +5 -1
- package/dist/i18n/locales/sv.json +5 -1
- package/dist/i18n/locales/tr.json +5 -1
- package/dist/i18n/locales/uk.json +5 -1
- package/dist/i18n/locales/zh-CN.json +5 -1
- package/dist/i18n/locales/zh-HK.json +5 -1
- package/dist/i18n/locales/zh-TW.json +5 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -3
- package/dist/llms-full.txt +2216 -1332
- package/dist/llms-medium.txt +21 -18
- package/dist/llms.txt +2 -2
- package/dist/locale-blueprint.json +5 -1
- package/dist/plugin.js +17 -40
- package/dist/pluginCore.js +30 -0
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +26 -5
- package/dist/types/ActionButton.js +11 -0
- package/dist/types/ConfigDefaults.d.ts +34 -3
- package/dist/types/ConfigDefaults.js +14 -8
- package/dist/types/FieldLayout.d.ts +4 -1
- package/dist/types/ItemAccessor.d.ts +3 -1
- package/dist/types/ItemPath.d.ts +62 -0
- package/dist/types/ptComponentMap.d.ts +1 -1
- package/dist/utilities/functions/clickCount.js +14 -0
- package/dist/utils/versionCheck.js +1 -1
- package/llms.txt +2 -2
- package/package.json +16 -4
- package/scripts/README.md +35 -29
- package/scripts/lib/adoption-checklist.json +2 -2
- package/scripts/lib/define-preset-copy.mjs +1 -1
- package/scripts/lib/eslint-disable.mjs +5 -3
- package/scripts/lib/eslint-plugin.d.ts +2 -0
- package/scripts/lib/eslint-plugin.mjs +213 -1
- package/scripts/lib/redundant-item-accessor.mjs +4 -1
- package/scripts/lib/release-results.mjs +32 -1
- package/scripts/lib/renamed-item-field.mjs +4 -1
- package/scripts/lib/setup.mjs +8 -0
- package/scripts/lib/tab-links.mjs +4 -1
- package/scripts/lib/toolchain-check.mjs +125 -7
- package/scripts/lib/tree-default-expandable.mjs +53 -0
- package/scripts/lib/validate-bb-markup.mjs +537 -53
|
@@ -9,12 +9,15 @@
|
|
|
9
9
|
```vue
|
|
10
10
|
<template>
|
|
11
11
|
<BbDialog
|
|
12
|
+
:actions="dialogActions"
|
|
12
13
|
:aria-describedby="hasText && current?.title ? textId : undefined"
|
|
14
|
+
:cancel="dialogCancel"
|
|
13
15
|
:class="dialogClasses"
|
|
14
16
|
:focus-target="current?.focusTarget"
|
|
15
17
|
:fullscreen="current?.fullscreen"
|
|
16
18
|
:hide-close="isBusy || !!current?.hideClose"
|
|
17
19
|
:model-value="state.processing"
|
|
20
|
+
:ok="dialogOk"
|
|
18
21
|
:persistent="isBusy || !!current?.persistent"
|
|
19
22
|
:pt="passthrough.forward(DIALOG_PARTS, BB_DIALOG_PT.states)"
|
|
20
23
|
v-bind="dialogAttrs"
|
|
@@ -36,65 +39,19 @@
|
|
|
36
39
|
</div>
|
|
37
40
|
<component :is="portalContent" v-else v-bind="portalBindings" />
|
|
38
41
|
</div>
|
|
39
|
-
<!-- eslint-disable vue/attributes-order -- `pt:action` binds LAST so a consumer listener runs after ours (PASSTHROUGH.md T17) -->
|
|
40
|
-
<template v-if="showActions" #footer>
|
|
41
|
-
<template v-if="resolvedActions">
|
|
42
|
-
<BbButton
|
|
43
|
-
v-for="(action, index) in resolvedActions"
|
|
44
|
-
:key="index"
|
|
45
|
-
:append:icon="action['append:icon']"
|
|
46
|
-
:block="action.block"
|
|
47
|
-
:disabled="state.actionBusy !== null && state.actionBusy !== index"
|
|
48
|
-
:icon="action.icon"
|
|
49
|
-
:loading="state.actionBusy === index"
|
|
50
|
-
:prepend:icon="action['prepend:icon']"
|
|
51
|
-
:size="action.size"
|
|
52
|
-
:text="action.text"
|
|
53
|
-
:variant="action.variant"
|
|
54
|
-
@click="action.onClick()"
|
|
55
|
-
class="bb-confirm__action"
|
|
56
|
-
v-bind="passthrough.action"
|
|
57
|
-
/>
|
|
58
|
-
</template>
|
|
59
|
-
|
|
60
|
-
<BbButton
|
|
61
|
-
v-if="resolvedNo"
|
|
62
|
-
:append:icon="resolvedNo['append:icon']"
|
|
63
|
-
:block="resolvedNo.block"
|
|
64
|
-
:disabled="state.yesBusy"
|
|
65
|
-
:icon="resolvedNo.icon"
|
|
66
|
-
:loading="state.noBusy"
|
|
67
|
-
:prepend:icon="resolvedNo['prepend:icon']"
|
|
68
|
-
:size="resolvedNo.size"
|
|
69
|
-
:text="resolvedNo.text"
|
|
70
|
-
:variant="resolvedNo.variant"
|
|
71
|
-
@click="resolvedNo.onClick()"
|
|
72
|
-
class="bb-confirm__action"
|
|
73
|
-
v-bind="passthrough.action"
|
|
74
|
-
/>
|
|
75
|
-
|
|
76
|
-
<BbButton
|
|
77
|
-
v-if="resolvedYes"
|
|
78
|
-
:append:icon="resolvedYes['append:icon']"
|
|
79
|
-
:block="resolvedYes.block"
|
|
80
|
-
:disabled="state.noBusy"
|
|
81
|
-
:icon="resolvedYes.icon"
|
|
82
|
-
:loading="state.yesBusy"
|
|
83
|
-
:prepend:icon="resolvedYes['prepend:icon']"
|
|
84
|
-
:size="resolvedYes.size"
|
|
85
|
-
:text="resolvedYes.text"
|
|
86
|
-
:variant="resolvedYes.variant"
|
|
87
|
-
@click="resolvedYes.onClick()"
|
|
88
|
-
class="bb-confirm__action"
|
|
89
|
-
v-bind="passthrough.action"
|
|
90
|
-
/>
|
|
91
|
-
</template>
|
|
92
|
-
<!-- eslint-enable vue/attributes-order -->
|
|
93
42
|
</BbDialog>
|
|
94
43
|
</template>
|
|
95
44
|
|
|
96
45
|
<script setup lang="ts">
|
|
97
|
-
import {
|
|
46
|
+
import {
|
|
47
|
+
computed,
|
|
48
|
+
inject,
|
|
49
|
+
markRaw,
|
|
50
|
+
mergeProps,
|
|
51
|
+
onMounted,
|
|
52
|
+
provide,
|
|
53
|
+
useAttrs,
|
|
54
|
+
} from 'vue';
|
|
98
55
|
import {
|
|
99
56
|
CONFIRM_STACK,
|
|
100
57
|
namedPortalRegistry,
|
|
@@ -111,7 +68,10 @@ import { usePassthrough, variantPt } from '@/composables/usePassthrough';
|
|
|
111
68
|
import { BB_DIALOG_PT } from '../BbDialog/types';
|
|
112
69
|
import { BB_CONFIRM_PT, type BbConfirmProps } from './types';
|
|
113
70
|
import { CONFIRM_ENTRY } from './confirmEntry';
|
|
114
|
-
import
|
|
71
|
+
import { BB_OVERLAY_ACTION_ATTRS } from '../BbDialog/overlayActions';
|
|
72
|
+
import type { BbActionLook } from '@/types/ActionButton';
|
|
73
|
+
import { ACTION_LOOK_KEYS } from '@/types/ConfigDefaults';
|
|
74
|
+
import type { ResolvedButtonConfig } from '@/composables/useConfirm';
|
|
115
75
|
|
|
116
76
|
// Describes the dialog by its plain-text message (WAI-APG dialog pattern): a
|
|
117
77
|
// confirm's text is short and static, so aria-describedby is safe here —
|
|
@@ -195,7 +155,7 @@ onMounted(() => {
|
|
|
195
155
|
});
|
|
196
156
|
|
|
197
157
|
const isBusy = computed(
|
|
198
|
-
() => state.
|
|
158
|
+
() => state.okBusy || state.cancelBusy || state.actionBusy !== null
|
|
199
159
|
);
|
|
200
160
|
|
|
201
161
|
const hasText = computed(() => Boolean(current.value?.text));
|
|
@@ -203,8 +163,8 @@ const hasText = computed(() => Boolean(current.value?.text));
|
|
|
203
163
|
/** What a named portal's slot gets: this confirm's own data and answers. */
|
|
204
164
|
const portalScope = {
|
|
205
165
|
data: current.value.data ?? {},
|
|
206
|
-
|
|
207
|
-
|
|
166
|
+
ok: () => processMessage(true, false, entry),
|
|
167
|
+
cancel: () => processMessage(false, true, entry),
|
|
208
168
|
};
|
|
209
169
|
|
|
210
170
|
const portalContent = computed(() => {
|
|
@@ -223,24 +183,58 @@ const portalBindings = computed(() => {
|
|
|
223
183
|
return data;
|
|
224
184
|
});
|
|
225
185
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
186
|
+
/*
|
|
187
|
+
* The buttons render through BbDialog's `ok` / `cancel` / `actions`. Each
|
|
188
|
+
* click runs the confirm's own handler, which settles the promise and closes
|
|
189
|
+
* the confirm itself (a failing action closes it and rejects `confirm()`:
|
|
190
|
+
* the caller owns the error), then answers `false`, so the dialog neither
|
|
191
|
+
* completes nor reports anything.
|
|
192
|
+
*/
|
|
193
|
+
const okProps = useConfigSetting<BbActionLook>(
|
|
194
|
+
'BbConfirm',
|
|
195
|
+
ACTION_LOOK_KEYS.ok
|
|
196
|
+
);
|
|
197
|
+
const cancelProps = useConfigSetting<BbActionLook>(
|
|
198
|
+
'BbConfirm',
|
|
199
|
+
ACTION_LOOK_KEYS.cancel
|
|
200
|
+
);
|
|
201
|
+
const forDialog = (
|
|
202
|
+
button: ResolvedButtonConfig | undefined,
|
|
203
|
+
look?: BbActionLook
|
|
204
|
+
) => {
|
|
205
|
+
if (!button) return false;
|
|
206
|
+
const { onClick, defaulted = [], ...own } = button;
|
|
207
|
+
const out: Record<string, unknown> = { ...own };
|
|
208
|
+
for (const [key, value] of Object.entries(look ?? {}))
|
|
209
|
+
if (
|
|
210
|
+
value !== undefined &&
|
|
211
|
+
(out[key] === undefined || (defaulted as readonly string[]).includes(key))
|
|
212
|
+
)
|
|
213
|
+
out[key] = value;
|
|
214
|
+
return {
|
|
215
|
+
...out,
|
|
216
|
+
onClick: async () => {
|
|
217
|
+
await onClick();
|
|
218
|
+
return false;
|
|
219
|
+
},
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
const dialogOk = computed(() => forDialog(current.value?.ok, okProps()));
|
|
223
|
+
const dialogCancel = computed(() =>
|
|
224
|
+
forDialog(current.value?.cancel, cancelProps())
|
|
225
|
+
);
|
|
226
|
+
// `false`: no footer; an array replaces ok / cancel; unset: ok / cancel.
|
|
227
|
+
const dialogActions = computed(() => {
|
|
231
228
|
const actions = current.value?.actions;
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
const btn = current.value?.no;
|
|
237
|
-
return btn || null;
|
|
238
|
-
});
|
|
239
|
-
|
|
240
|
-
const resolvedYes = computed(() => {
|
|
241
|
-
const btn = current.value?.yes;
|
|
242
|
-
return btn || null;
|
|
229
|
+
if (actions === false) return false;
|
|
230
|
+
return Array.isArray(actions) && actions.length
|
|
231
|
+
? actions.map((action) => forDialog(action) as Record<string, unknown>)
|
|
232
|
+
: undefined;
|
|
243
233
|
});
|
|
234
|
+
// Each footer button carries our class and `pt:action`.
|
|
235
|
+
provide(BB_OVERLAY_ACTION_ATTRS, () =>
|
|
236
|
+
mergeProps({ class: 'bb-confirm__action' }, passthrough.action)
|
|
237
|
+
);
|
|
244
238
|
|
|
245
239
|
const dialogClasses = computed(() => [
|
|
246
240
|
'bb-confirm',
|
|
@@ -289,7 +283,7 @@ import type { BbConfirmPtKeys } from './ptKeys.generated';
|
|
|
289
283
|
* @part text - The confirm's plain-text body — not a portal's content.
|
|
290
284
|
* @part footer - The action buttons' band.
|
|
291
285
|
* @part close - The ✕.
|
|
292
|
-
* @part action - Every footer button —
|
|
286
|
+
* @part action - Every footer button — ok, cancel and each custom `actions`
|
|
293
287
|
* entry — at the button's root. A broadcast.
|
|
294
288
|
*/
|
|
295
289
|
export type BbConfirmPtPart =
|
|
@@ -372,10 +366,10 @@ export type BbConfirmProps = BbConfirmPtProps & {
|
|
|
372
366
|
export type BbConfirmPortalSlotProps<P = any> = {
|
|
373
367
|
/** The `data` the `confirm()` passed. */
|
|
374
368
|
data: P;
|
|
375
|
-
/** Resolves the confirm with `true
|
|
376
|
-
|
|
377
|
-
/** Resolves the confirm with `false
|
|
378
|
-
|
|
369
|
+
/** Resolves the confirm with `true` (through `ok.onClick` when set). */
|
|
370
|
+
ok: () => void;
|
|
371
|
+
/** Resolves the confirm with `false` (through `cancel.onClick` when set). */
|
|
372
|
+
cancel: () => void;
|
|
379
373
|
};
|
|
380
374
|
```
|
|
381
375
|
|
|
@@ -25,7 +25,7 @@ watchEffect((onCleanup) => {
|
|
|
25
25
|
// Never populated during SSR — the registry is module state and would leak
|
|
26
26
|
// across requests (same guard as useBbTabs's tabsRegistry).
|
|
27
27
|
if (typeof window === 'undefined') return;
|
|
28
|
-
// The bare slot: each confirm calls it with its own `{
|
|
28
|
+
// The bare slot: each confirm calls it with its own `{ ok, cancel, data }`,
|
|
29
29
|
// so two open confirms never answer each other.
|
|
30
30
|
const cleanup = registerNamedPortal(props.name, (scope) =>
|
|
31
31
|
slots.default?.(scope)
|
|
@@ -67,7 +67,7 @@ import type { BbConfirmPtKeys } from './ptKeys.generated';
|
|
|
67
67
|
* @part text - The confirm's plain-text body — not a portal's content.
|
|
68
68
|
* @part footer - The action buttons' band.
|
|
69
69
|
* @part close - The ✕.
|
|
70
|
-
* @part action - Every footer button —
|
|
70
|
+
* @part action - Every footer button — ok, cancel and each custom `actions`
|
|
71
71
|
* entry — at the button's root. A broadcast.
|
|
72
72
|
*/
|
|
73
73
|
export type BbConfirmPtPart =
|
|
@@ -150,10 +150,10 @@ export type BbConfirmProps = BbConfirmPtProps & {
|
|
|
150
150
|
export type BbConfirmPortalSlotProps<P = any> = {
|
|
151
151
|
/** The `data` the `confirm()` passed. */
|
|
152
152
|
data: P;
|
|
153
|
-
/** Resolves the confirm with `true
|
|
154
|
-
|
|
155
|
-
/** Resolves the confirm with `false
|
|
156
|
-
|
|
153
|
+
/** Resolves the confirm with `true` (through `ok.onClick` when set). */
|
|
154
|
+
ok: () => void;
|
|
155
|
+
/** Resolves the confirm with `false` (through `cancel.onClick` when set). */
|
|
156
|
+
cancel: () => void;
|
|
157
157
|
};
|
|
158
158
|
```
|
|
159
159
|
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
<BbCalendar
|
|
40
40
|
:active-segment="activeSegment"
|
|
41
41
|
:ampm="ampm"
|
|
42
|
+
:clearable="clearable"
|
|
42
43
|
:disabled="disabled"
|
|
43
44
|
:first-day-of-week="firstDayOfWeek"
|
|
44
45
|
:floating="floating"
|
|
@@ -893,6 +894,11 @@ export type BbDatePickerBaseProps = BbDatePickerPtProps & {
|
|
|
893
894
|
disabled?: boolean;
|
|
894
895
|
/** Prevents opening while keeping the activator visible. */
|
|
895
896
|
readonly?: boolean;
|
|
897
|
+
/**
|
|
898
|
+
* Clicking the selected date (week, month, year) again clears a single
|
|
899
|
+
* value. Off: re-picking keeps it. `multiple` and `range` ignore it.
|
|
900
|
+
*/
|
|
901
|
+
clearable?: boolean;
|
|
896
902
|
/**
|
|
897
903
|
* On mobile, open in a bottom off-canvas sheet instead of a floating popover.
|
|
898
904
|
* When unset, falls back to the global `all.adaptive`.
|
|
@@ -1106,8 +1112,9 @@ export type BbDatePickerSlots = {
|
|
|
1106
1112
|
the box inherits them. `pt:panel="[--px:2px]"` then retunes the grid on
|
|
1107
1113
|
both surfaces; declared on the box, a sheet-level value would never reach
|
|
1108
1114
|
it. `--sheet-cell` is here so the time rail (the grid's sibling inside the
|
|
1109
|
-
calendar) can align its wheels to the same column grid.
|
|
1110
|
-
.
|
|
1115
|
+
calendar) can align its wheels to the same column grid. Two classes so
|
|
1116
|
+
the sheet's own `--px` / `--py` never win on load order. */
|
|
1117
|
+
.bb-offcanvas.bb-date-picker__sheet {
|
|
1111
1118
|
--sheet-cell: 40px;
|
|
1112
1119
|
--cell: var(--sheet-cell);
|
|
1113
1120
|
--px: 6px;
|
|
@@ -210,6 +210,7 @@
|
|
|
210
210
|
:adaptive="configDefaults.adaptive"
|
|
211
211
|
:ampm="ampm"
|
|
212
212
|
:anchor="wrapper"
|
|
213
|
+
:clearable="clearable"
|
|
213
214
|
:disabled="disabled"
|
|
214
215
|
:first-day-of-week="firstDayOfWeek"
|
|
215
216
|
:floating="configDefaults.floating"
|
|
@@ -2778,7 +2779,8 @@ export type BbDatePickerInputBaseProps = BbDatePickerInputPtProps & {
|
|
|
2778
2779
|
autofocus?: InputHTMLAttributes['autofocus'];
|
|
2779
2780
|
|
|
2780
2781
|
/**
|
|
2781
|
-
* Displays a clear button when the input has a value and is being
|
|
2782
|
+
* Displays a clear button when the input has a value and is being
|
|
2783
|
+
* interacted with, and lets re-picking the selected date clear it.
|
|
2782
2784
|
*/
|
|
2783
2785
|
clearable?: boolean;
|
|
2784
2786
|
|
|
@@ -2809,15 +2811,13 @@ export type BbDatePickerInputBaseProps = BbDatePickerInputPtProps & {
|
|
|
2809
2811
|
|
|
2810
2812
|
/**
|
|
2811
2813
|
* Vertical position of the label block in a side-by-side row; not
|
|
2812
|
-
* `labelPosition`, the horizontal one. Omitted,
|
|
2813
|
-
* meets the control's.
|
|
2814
|
+
* `labelPosition`, the horizontal one. Omitted, `'top'`.
|
|
2814
2815
|
*/
|
|
2815
2816
|
labelAlign?: FieldCrossAlign;
|
|
2816
2817
|
|
|
2817
2818
|
/**
|
|
2818
2819
|
* Vertical position of the control in a side-by-side row; not
|
|
2819
|
-
* `inputPosition`, the horizontal one. Omitted,
|
|
2820
|
-
* meets the label's.
|
|
2820
|
+
* `inputPosition`, the horizontal one. Omitted, `'top'`.
|
|
2821
2821
|
*/
|
|
2822
2822
|
inputAlign?: FieldCrossAlign;
|
|
2823
2823
|
|
|
@@ -182,7 +182,9 @@
|
|
|
182
182
|
:data="overlay.data.value"
|
|
183
183
|
name="footer"
|
|
184
184
|
:reset="overlay.reset"
|
|
185
|
-
|
|
185
|
+
>
|
|
186
|
+
<FooterActions />
|
|
187
|
+
</slot>
|
|
186
188
|
</div>
|
|
187
189
|
</template>
|
|
188
190
|
<!-- A refused close is announced, not only shaken. -->
|
|
@@ -247,6 +249,7 @@ import { registerTopLayerHost } from '@/composables/useTopLayer';
|
|
|
247
249
|
import { useBodyScrollLock } from '@/composables/useBodyScrollLock';
|
|
248
250
|
import { useRefusedCloseAnnouncement } from '@/composables/useRefusedCloseAnnouncement';
|
|
249
251
|
import { provideOverlaySubmitGuard } from '@/composables/formSubmitLock';
|
|
252
|
+
import { ownCompleteListener, useOverlayActions } from './overlayActions';
|
|
250
253
|
import {
|
|
251
254
|
type OverlayCloseReason,
|
|
252
255
|
provideOverlayStandIn,
|
|
@@ -288,6 +291,9 @@ const props = withDefaults(
|
|
|
288
291
|
// reach the config default, while keeping the Boolean type so the valueless
|
|
289
292
|
// `<Dialog adaptive>` shorthand still resolves to `true`.
|
|
290
293
|
adaptive: undefined,
|
|
294
|
+
// `undefined` keeps "unset" apart from `false` (no buttons): a Boolean in
|
|
295
|
+
// the type would cast an absent `actions` to `false`.
|
|
296
|
+
actions: undefined,
|
|
291
297
|
// Three-state the same way: unset follows a saving BbForm
|
|
292
298
|
// inside, `true` always locks, `false` stays closable mid-save.
|
|
293
299
|
preventClose: undefined,
|
|
@@ -340,6 +346,7 @@ const overlay = useOverlayHost('dialog', {
|
|
|
340
346
|
model,
|
|
341
347
|
element: () => rootElementOf(instance),
|
|
342
348
|
defaultData: () => props.defaultData,
|
|
349
|
+
onComplete: () => ownCompleteListener(instance),
|
|
343
350
|
});
|
|
344
351
|
provideOverlayStandIn();
|
|
345
352
|
/*
|
|
@@ -435,6 +442,9 @@ const canvasBindings = computed<Partial<BbOffCanvasProps>>(() => ({
|
|
|
435
442
|
size: 'auto',
|
|
436
443
|
snapPoints: props.snapPoints,
|
|
437
444
|
snap: snapModel.value,
|
|
445
|
+
ok: footerActions.resolved.value.ok ?? undefined,
|
|
446
|
+
cancel: footerActions.resolved.value.cancel ?? undefined,
|
|
447
|
+
actions: footerActions.resolved.value.actions,
|
|
438
448
|
'onUpdate:snap': (value: BbSnapPoint) => {
|
|
439
449
|
snapModel.value = value;
|
|
440
450
|
},
|
|
@@ -528,7 +538,23 @@ const hasDocument = () => typeof document !== 'undefined';
|
|
|
528
538
|
* `prevent-close` says otherwise (`true` always, `false` never). On the phone
|
|
529
539
|
* the sheet gets `prevent-close` as is and its own forms register with it.
|
|
530
540
|
*/
|
|
531
|
-
const
|
|
541
|
+
const formGuard = provideOverlaySubmitGuard();
|
|
542
|
+
const formSaving = formGuard.saving;
|
|
543
|
+
/*
|
|
544
|
+
* `ok` / `cancel` / `actions`: the footer slot's
|
|
545
|
+
* fallback, so a `#footer` replaces them all. The phone sheet is handed them
|
|
546
|
+
* resolved (the look applied) and renders its own.
|
|
547
|
+
*/
|
|
548
|
+
const footerActions = useOverlayActions({
|
|
549
|
+
component: 'BbDialog',
|
|
550
|
+
props: () => props,
|
|
551
|
+
surface: formGuard,
|
|
552
|
+
complete: overlay.complete,
|
|
553
|
+
data: () => overlay.data.value,
|
|
554
|
+
close: () => requestClose(),
|
|
555
|
+
block: 'bb-dialog',
|
|
556
|
+
});
|
|
557
|
+
const FooterActions = () => footerActions.render();
|
|
532
558
|
// an opener's `onComplete` promise locks it like a saving form.
|
|
533
559
|
const isLocked = computed(
|
|
534
560
|
() => props.preventClose ?? (formSaving() || overlay.completing.value)
|
|
@@ -996,6 +1022,7 @@ onDeactivated(() => closeWith('unmounted'));
|
|
|
996
1022
|
```ts
|
|
997
1023
|
import type { BbDialogResult } from '@/composables/overlayRegistry';
|
|
998
1024
|
import type { Size } from '@/types/CommonProps';
|
|
1025
|
+
import type { ActionButtonConfig, BbAction } from '@/types/ActionButton';
|
|
999
1026
|
import type { PtCompoundProps, PtMap } from '@/types/passthrough';
|
|
1000
1027
|
import type { Sizes } from '@/types/SizeScale';
|
|
1001
1028
|
import type { Responsive } from '@/types/ResponsiveSize';
|
|
@@ -1197,6 +1224,23 @@ export type BbDialogProps = BbDialogPtProps & {
|
|
|
1197
1224
|
* so Back leaves the page instead of closing the dialog.
|
|
1198
1225
|
*/
|
|
1199
1226
|
replace?: boolean;
|
|
1227
|
+
/**
|
|
1228
|
+
* The primary footer button: `true` (the locale's OK), a label, or a
|
|
1229
|
+
* button config. Clicked: its `onClick`, else it submits the one `BbForm`
|
|
1230
|
+
* inside, else `complete(data)`. Unset: no button. Config sets its look.
|
|
1231
|
+
*/
|
|
1232
|
+
ok?: BbAction;
|
|
1233
|
+
/**
|
|
1234
|
+
* The dismiss button, before `ok`: `true` (the locale's Cancel), a label,
|
|
1235
|
+
* or a button config. Clicked: its `onClick`, then the dialog closes as a
|
|
1236
|
+
* dismissal (`reason: 'close'`). Unset: no button.
|
|
1237
|
+
*/
|
|
1238
|
+
cancel?: BbAction;
|
|
1239
|
+
/**
|
|
1240
|
+
* Footer buttons replacing `ok` / `cancel`, in order: each runs its
|
|
1241
|
+
* `onClick`, then completes the dialog with `data`. `false`: none.
|
|
1242
|
+
*/
|
|
1243
|
+
actions?: false | readonly ActionButtonConfig[];
|
|
1200
1244
|
/**
|
|
1201
1245
|
* Title text announced to assistive technologies. If omitted, no header is
|
|
1202
1246
|
* rendered (unless a `header` slot is supplied) and accessibility must be
|
|
@@ -1211,6 +1255,13 @@ export type BbDialogProps = BbDialogPtProps & {
|
|
|
1211
1255
|
};
|
|
1212
1256
|
|
|
1213
1257
|
export type BbDialogEvents = {
|
|
1258
|
+
/**
|
|
1259
|
+
* The dialog completes (`ok`, `complete(value)`): the same value as the
|
|
1260
|
+
* opener's `onComplete`, before it. Return a promise to keep the dialog
|
|
1261
|
+
* open and locked until it settles; `false` or a throw keeps it open.
|
|
1262
|
+
*/
|
|
1263
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- the opening's value is `any`, like `data`
|
|
1264
|
+
(e: 'complete', value: any): unknown;
|
|
1214
1265
|
/** Emitted as soon as the dialog starts to open (model becomes true). */
|
|
1215
1266
|
(e: 'show'): void;
|
|
1216
1267
|
/**
|