bitboss-ui 3.0.0-beta.64 → 3.0.0-beta.66
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 +78 -16
- package/bin/bitboss-ui-mcp.mjs +8 -8
- package/bin/bitboss-ui.mjs +73 -12
- package/dist/ai/BbAccordion.md +4 -3
- package/dist/ai/BbAlert.md +1 -1
- package/dist/ai/BbBadge.md +1 -0
- package/dist/ai/BbBadgeButton.md +4 -3
- package/dist/ai/BbBaseButton.md +25 -20
- package/dist/ai/BbBaseCheckboxIcon.md +1 -0
- package/dist/ai/BbBaseRadioIcon.md +1 -0
- package/dist/ai/BbBaseSwitchIcon.md +1 -0
- package/dist/ai/BbBreadcrumbs.md +8 -0
- package/dist/ai/BbButton.md +67 -21
- package/dist/ai/BbCalendar.md +56 -3
- package/dist/ai/BbCheckbox.md +1 -1
- package/dist/ai/BbCheckboxGroup.md +44 -8
- package/dist/ai/BbColorInput.md +3 -2
- package/dist/ai/BbColorPalette.md +7 -3
- package/dist/ai/BbConfirm.md +36 -80
- package/dist/ai/BbConfirmPortal.md +1 -1
- package/dist/ai/BbDatePicker.md +41 -5
- package/dist/ai/BbDatePickerInput.md +38 -6
- package/dist/ai/BbDialog.md +63 -58
- package/dist/ai/BbDropdown.md +25 -24
- package/dist/ai/BbDropdownButton.md +5 -12
- package/dist/ai/BbDropzone.md +2 -3
- package/dist/ai/BbForm.md +66 -42
- package/dist/ai/BbHost.md +29 -41
- package/dist/ai/BbIcon.md +3 -0
- package/dist/ai/BbNumberInput.md +2 -2
- package/dist/ai/BbOffCanvas.md +16 -9
- package/dist/ai/BbPagination.md +17 -17
- package/dist/ai/BbPopover.md +8 -3
- package/dist/ai/BbPtScope.md +5 -5
- package/dist/ai/BbRadio.md +1 -1
- package/dist/ai/BbRadioGroup.md +44 -7
- package/dist/ai/BbRating.md +1 -0
- package/dist/ai/BbSelect.md +146 -21
- package/dist/ai/BbSelectPopover.md +16 -12
- package/dist/ai/BbSlider.md +5 -3
- package/dist/ai/BbSwitch.md +1 -1
- package/dist/ai/BbTable.md +51 -39
- package/dist/ai/BbTabs.md +127 -63
- package/dist/ai/BbTabsList.md +4 -2
- package/dist/ai/BbTabsPanels.md +3 -1
- package/dist/ai/BbTabsRoot.md +4 -4
- package/dist/ai/BbTag.md +2 -2
- package/dist/ai/BbTextInput.md +23 -9
- package/dist/ai/BbTextarea.md +3 -3
- package/dist/ai/BbTimePicker.md +5 -4
- package/dist/ai/BbTimePickerInput.md +3 -3
- package/dist/ai/BbToast.md +33 -87
- package/dist/ai/BbToastPortal.md +1 -1
- package/dist/ai/CommonFieldInput.md +2 -1
- package/dist/ai/FlatListBox.md +1 -1
- package/dist/ai/GroupedListBox.md +1 -1
- package/dist/ai/ListBox.md +1 -1
- package/dist/ai/OptionsContainer.md +1 -1
- package/dist/ai/changelog.json +444 -4
- package/dist/ai/components.json +87 -83
- package/dist/ai/composables/useBbConfig.md +8 -1
- package/dist/ai/composables/{useBbDialogContext.md → useBbDialog.md} +18 -18
- package/dist/ai/composables/{useBbDropdownContext.md → useBbDropdown.md} +31 -31
- package/dist/ai/composables/{useBbFormContext.md → useBbForm.md} +11 -11
- package/dist/ai/composables/useBbFormField.md +2 -2
- package/dist/ai/composables/{useBbOffCanvasContext.md → useBbOffCanvas.md} +13 -13
- package/dist/ai/composables/{useBbTableContext.md → useBbTable.md} +20 -20
- package/dist/ai/composables/{useBbTabsContext.md → useBbTabs.md} +12 -12
- package/dist/ai/composables/useConfirm.md +42 -54
- package/dist/ai/composables/useToast.md +9 -26
- package/dist/ai/guides/agent-contract.md +57 -43
- package/dist/ai/guides/ai-router.md +1 -1
- package/dist/ai/guides/app-layout.md +32 -23
- package/dist/ai/guides/coherence-playbook.md +4 -2
- package/dist/ai/guides/component-picker.md +35 -32
- package/dist/ai/guides/design-language.md +26 -12
- package/dist/ai/guides/design-tokens.md +73 -32
- package/dist/ai/guides/eslint-rules.md +8 -4
- package/dist/ai/guides/fetch-items-playbook.md +3 -3
- package/dist/ai/guides/floating-bottom-panel.md +1 -1
- package/dist/ai/guides/inertia-helpers.md +1640 -337
- package/dist/ai/guides/installation-and-plugin-setup.md +6 -3
- package/dist/ai/guides/migration/adoption-checklist.md +44 -2
- package/dist/ai/guides/migration/components/bb-dialog.md +13 -13
- package/dist/ai/guides/migration/components/bb-dropdown.md +16 -16
- package/dist/ai/guides/migration/components/bb-host.md +15 -14
- package/dist/ai/guides/migration/components/bb-offcanvas.md +10 -10
- package/dist/ai/guides/migration/components/bb-pagination.md +9 -9
- package/dist/ai/guides/migration/components/bb-select.md +1 -1
- package/dist/ai/guides/migration/components/bb-table.md +12 -12
- package/dist/ai/guides/migration/components/bb-tabs.md +1 -1
- package/dist/ai/guides/migration/from-async-validator.md +9 -9
- package/dist/ai/guides/migration/v2-to-v3.md +206 -13
- package/dist/ai/guides/options-items-playbook.md +2 -2
- package/dist/ai/guides/page-shell.md +15 -3
- package/dist/ai/guides/passthrough.md +13 -7
- package/dist/ai/guides/preset-components.md +102 -43
- package/dist/ai/guides/typescript-generic-components.md +21 -5
- package/dist/ai/guides/validated-forms.md +20 -11
- package/dist/ai/guides/validation-providers.md +3 -3
- package/dist/ai/helpers/definePreset.json +11 -4
- package/dist/ai/helpers/definePreset.ts +98 -41
- package/dist/ai/helpers/inertia/manifest.json +332 -91
- package/dist/ai/helpers/inertia/messages.ts +33 -0
- package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +133 -21
- package/dist/ai/helpers/inertia/useHasChanged.ts +34 -16
- package/dist/ai/helpers/inertia/useLazyProp.ts +102 -36
- package/dist/ai/helpers/inertia/useLazyPropGetter.ts +3 -1
- package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +129 -24
- package/dist/ai/helpers/inertia/usePromiseForm.ts +38 -44
- package/dist/ai/helpers/inertia/usePromiseRouter.ts +295 -0
- package/dist/ai/helpers/inertia/useQuery.ts +133 -11
- package/dist/ai/helpers/inertia/useQueryObject.ts +104 -66
- package/dist/ai/helpers/inertia/useResourceContext.ts +60 -14
- package/dist/ai/helpers/inertia/useRouteQuery.ts +57 -33
- package/dist/ai/helpers/inertia/useScreenSizes.ts +9 -7
- package/dist/ai/helpers/inertia/useTableContext.ts +5 -2
- package/dist/ai/helpers/inertia/utils.ts +57 -0
- package/dist/ai/index.md +15 -15
- package/dist/ai/manifest/common.json +2 -1
- package/dist/ai/manifest/components/BbAccordion.tree.json +3 -1
- package/dist/ai/manifest/components/BbAlert.json +1 -1
- package/dist/ai/manifest/components/BbBadge.tree.json +3 -1
- package/dist/ai/manifest/components/BbBadgeButton.json +9 -4
- package/dist/ai/manifest/components/BbBadgeButton.tree.json +1 -0
- package/dist/ai/manifest/components/BbBaseButton.json +9 -4
- package/dist/ai/manifest/components/BbBaseCheckboxIcon.tree.json +3 -1
- package/dist/ai/manifest/components/BbBaseRadioIcon.tree.json +3 -1
- package/dist/ai/manifest/components/BbBaseSwitchIcon.tree.json +3 -1
- package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +7 -3
- package/dist/ai/manifest/components/BbButton.json +9 -4
- package/dist/ai/manifest/components/BbButton.tree.json +5 -3
- package/dist/ai/manifest/components/BbCalendar.json +4 -3
- package/dist/ai/manifest/components/BbCalendar.tree.json +10 -1
- package/dist/ai/manifest/components/BbCheckbox.json +1 -1
- package/dist/ai/manifest/components/BbCheckbox.tree.json +1 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.json +1 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +62 -3
- package/dist/ai/manifest/components/BbCollapsible.json +4 -1
- package/dist/ai/manifest/components/BbColorInput.json +1 -1
- package/dist/ai/manifest/components/BbColorInput.tree.json +5 -3
- package/dist/ai/manifest/components/BbColorPalette.json +3 -0
- package/dist/ai/manifest/components/BbColorPalette.tree.json +7 -2
- package/dist/ai/manifest/components/BbConfirm.tree.json +2 -2
- package/dist/ai/manifest/components/BbDatePicker.json +7 -3
- package/dist/ai/manifest/components/BbDatePicker.tree.json +3 -4
- package/dist/ai/manifest/components/BbDatePickerInput.json +4 -3
- package/dist/ai/manifest/components/BbDatePickerInput.tree.json +5 -3
- package/dist/ai/manifest/components/BbDialog.json +1 -1
- package/dist/ai/manifest/components/BbDialog.tree.json +2 -2
- package/dist/ai/manifest/components/BbDropdown.json +3 -3
- package/dist/ai/manifest/components/BbDropdown.tree.json +2 -2
- package/dist/ai/manifest/components/BbDropdownButton.json +11 -6
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -3
- package/dist/ai/manifest/components/BbDropzone.json +4 -1
- package/dist/ai/manifest/components/BbForm.json +2 -2
- package/dist/ai/manifest/components/BbHost.json +1 -1
- package/dist/ai/manifest/components/BbHost.tree.json +1 -1
- package/dist/ai/manifest/components/BbHoverCard.json +1 -1
- package/dist/ai/manifest/components/BbNumberInput.json +1 -1
- package/dist/ai/manifest/components/BbNumberInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbOffCanvas.json +1 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +3 -1
- package/dist/ai/manifest/components/BbPagination.json +4 -4
- package/dist/ai/manifest/components/BbPagination.tree.json +2 -1
- package/dist/ai/manifest/components/BbPopover.json +1 -1
- package/dist/ai/manifest/components/BbPopover.tree.json +1 -1
- package/dist/ai/manifest/components/BbProgress.json +4 -1
- package/dist/ai/manifest/components/BbRadio.json +1 -1
- package/dist/ai/manifest/components/BbRadio.tree.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +5 -5
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +62 -3
- package/dist/ai/manifest/components/BbRating.tree.json +3 -1
- package/dist/ai/manifest/components/BbSelect.json +5 -5
- package/dist/ai/manifest/components/BbSelect.tree.json +3 -3
- package/dist/ai/manifest/components/BbSelectPopover.json +7 -3
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +2 -2
- package/dist/ai/manifest/components/BbSlider.json +3 -3
- package/dist/ai/manifest/components/BbSlider.tree.json +3 -0
- package/dist/ai/manifest/components/BbSmoothHeight.json +4 -1
- package/dist/ai/manifest/components/BbSwitch.json +1 -1
- package/dist/ai/manifest/components/BbSwitch.tree.json +1 -1
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +1 -1
- package/dist/ai/manifest/components/BbTable.json +6 -2
- package/dist/ai/manifest/components/BbTable.tree.json +4 -1
- package/dist/ai/manifest/components/BbTabs.json +9 -12
- package/dist/ai/manifest/components/BbTabs.tree.json +4 -1
- package/dist/ai/manifest/components/BbTabsList.json +4 -7
- package/dist/ai/manifest/components/BbTabsList.tree.json +4 -1
- package/dist/ai/manifest/components/BbTabsPanels.json +1 -1
- package/dist/ai/manifest/components/BbTabsPanels.tree.json +4 -1
- package/dist/ai/manifest/components/BbTabsRoot.json +5 -5
- 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 +4 -4
- package/dist/ai/manifest/components/BbTextInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbTextarea.json +2 -2
- package/dist/ai/manifest/components/BbTextarea.tree.json +1 -1
- package/dist/ai/manifest/components/BbTimePicker.json +4 -1
- package/dist/ai/manifest/components/BbTimePicker.tree.json +5 -3
- package/dist/ai/manifest/components/BbTimePickerInput.json +2 -2
- package/dist/ai/manifest/components/BbTimePickerInput.tree.json +5 -3
- package/dist/ai/manifest/components/BbToast.json +1 -1
- package/dist/ai/manifest/components/BbToast.tree.json +3 -1
- package/dist/ai/manifest/components/BbTooltip.json +3 -0
- package/dist/ai/manifest/components/ChipsBox.tree.json +1 -1
- package/dist/ai/manifest/components/CommonField.tree.json +1 -0
- package/dist/ai/manifest/components/CommonFieldInput.tree.json +4 -2
- package/dist/ai/manifest/components/CommonTimeSelector.tree.json +1 -0
- package/dist/ai/manifest/components/FlatListBox.json +1 -1
- package/dist/ai/manifest/components/GroupedListBox.json +1 -1
- package/dist/ai/manifest/components/ListBox.json +1 -1
- package/dist/ai/manifest/components/OptionsContainer.json +2 -2
- package/dist/ai/manifest/index.json +3 -3
- package/dist/ai/manifest/meta.json +31 -16
- package/dist/ai/manifest/types.advanced.json +15 -11
- package/dist/ai/manifest/types.api.json +2 -2
- package/dist/ai/recipes/inertia/approvals-inbox.md +87 -116
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +113 -121
- package/dist/ai/recipes/inertia/layout-scaffold.md +15 -4
- package/dist/ai/recipes/inertia/onboarding.md +76 -58
- package/dist/ai/recipes/inertia/ownership-atlas.md +75 -106
- package/dist/ai/recipes/inertia/record-form.md +18 -7
- package/dist/ai/recipes/inertia/records-workspace.md +107 -128
- package/dist/ai/recipes/inertia/settings-workspace.md +131 -73
- package/dist/ai/recipes/inertia/upload-center.md +98 -122
- package/dist/ai/recipes/inertia/wizard-form.md +25 -15
- package/dist/ai/recipes/nuxt/approvals-inbox.md +67 -48
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +73 -58
- package/dist/ai/recipes/nuxt/layout-scaffold.md +15 -4
- package/dist/ai/recipes/nuxt/onboarding.md +27 -10
- package/dist/ai/recipes/nuxt/ownership-atlas.md +40 -22
- package/dist/ai/recipes/nuxt/record-form.md +20 -7
- package/dist/ai/recipes/nuxt/records-workspace.md +120 -96
- package/dist/ai/recipes/nuxt/settings-workspace.md +36 -23
- package/dist/ai/recipes/nuxt/upload-center.md +63 -37
- package/dist/ai/recipes/nuxt/wizard-form.md +28 -16
- package/dist/ai/recipes/vue/approvals-inbox.md +74 -46
- package/dist/ai/recipes/vue/inline-edit-workspace.md +83 -56
- package/dist/ai/recipes/vue/layout-scaffold.md +15 -4
- package/dist/ai/recipes/vue/onboarding.md +27 -10
- package/dist/ai/recipes/vue/ownership-atlas.md +40 -22
- package/dist/ai/recipes/vue/record-form.md +20 -7
- package/dist/ai/recipes/vue/records-workspace.md +132 -95
- package/dist/ai/recipes/vue/settings-workspace.md +36 -23
- package/dist/ai/recipes/vue/upload-center.md +73 -37
- package/dist/ai/recipes/vue/wizard-form.md +28 -16
- package/dist/ai/source/BbAccordion.md +36 -6
- package/dist/ai/source/BbAlert.md +11 -5
- package/dist/ai/source/BbAsterisk.md +4 -1
- package/dist/ai/source/BbAvatar.md +11 -5
- package/dist/ai/source/BbBadge.md +42 -11
- package/dist/ai/source/BbBadgeButton.md +41 -8
- package/dist/ai/source/BbBaseButton.md +57 -15
- package/dist/ai/source/BbBaseCheckboxIcon.md +37 -13
- package/dist/ai/source/BbBaseRadioIcon.md +32 -9
- package/dist/ai/source/BbBaseSwitchIcon.md +31 -7
- package/dist/ai/source/BbBreadcrumbs.md +32 -9
- package/dist/ai/source/BbButton.md +91 -27
- package/dist/ai/source/BbCalendar.md +571 -300
- package/dist/ai/source/BbCheckbox.md +18 -7
- package/dist/ai/source/BbCheckboxGroup.md +16 -5
- package/dist/ai/source/BbCollapsible.md +15 -6
- package/dist/ai/source/BbColorInput.md +68 -20
- package/dist/ai/source/BbColorPalette.md +107 -23
- package/dist/ai/source/BbConfirmPortal.md +1 -1
- package/dist/ai/source/BbDatePicker.md +106 -25
- package/dist/ai/source/BbDatePickerInput.md +105 -42
- package/dist/ai/source/BbDialog.md +60 -44
- package/dist/ai/source/BbDropdown.md +44 -32
- package/dist/ai/source/BbDropdownButton.md +26 -20
- package/dist/ai/source/BbDropdownGroup.md +5 -5
- package/dist/ai/source/BbDropzone.md +53 -16
- package/dist/ai/source/BbForm.md +18 -7
- package/dist/ai/source/BbHost.md +25 -12
- package/dist/ai/source/BbHoverCard.md +20 -9
- package/dist/ai/source/BbIcon.md +9 -3
- package/dist/ai/source/BbIndicator.md +11 -4
- package/dist/ai/source/BbNumberInput.md +23 -6
- package/dist/ai/source/BbOffCanvas.md +73 -32
- package/dist/ai/source/BbPagination.md +59 -31
- package/dist/ai/source/BbPopover.md +28 -16
- package/dist/ai/source/BbProgress.md +13 -5
- package/dist/ai/source/BbRadio.md +16 -9
- package/dist/ai/source/BbRadioGroup.md +15 -4
- package/dist/ai/source/BbRating.md +51 -10
- package/dist/ai/source/BbSelect.md +56 -27
- package/dist/ai/source/BbSelectPopover.md +106 -36
- package/dist/ai/source/BbSlider.md +111 -33
- package/dist/ai/source/BbSmoothHeight.md +16 -7
- package/dist/ai/source/BbSpinner.md +9 -3
- package/dist/ai/source/BbSwitch.md +16 -9
- package/dist/ai/source/BbSwitchGroup.md +18 -7
- package/dist/ai/source/BbTable.md +172 -38
- package/dist/ai/source/BbTabs.md +58 -40
- package/dist/ai/source/BbTabsList.md +109 -50
- package/dist/ai/source/BbTabsPanels.md +65 -31
- package/dist/ai/source/BbTabsRoot.md +35 -24
- package/dist/ai/source/BbTag.md +18 -4
- package/dist/ai/source/BbTextInput.md +20 -3
- package/dist/ai/source/BbTextarea.md +15 -1
- package/dist/ai/source/BbTimePicker.md +81 -21
- package/dist/ai/source/BbTimePickerInput.md +63 -15
- package/dist/ai/source/BbToast.md +20 -3
- package/dist/ai/source/BbToastPortal.md +21 -4
- package/dist/ai/source/BbTooltip.md +16 -8
- package/dist/ai/source/BbTree.md +10 -3
- package/dist/ai/source/ClearableButton.md +5 -1
- package/dist/ai/source/CommonField.md +65 -9
- package/dist/ai/source/CommonFieldInput.md +61 -27
- package/dist/ai/source/CommonPopover.md +17 -6
- package/dist/ai/source/CommonTimeSelector.md +21 -2
- package/dist/ai/source/ErrorIcon.md +4 -0
- package/dist/ai/source/ListBox.md +9 -1
- package/dist/ai/source/OptionsContainer.md +5 -1
- package/dist/ai/source/WarningIcon.md +4 -0
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +2 -1
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/components/BbAlert/BbAlert.vue.d.ts +2 -1
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +10 -10
- package/dist/components/BbAsterisk/BbAsterisk.vue.d.ts +3 -1
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +3 -1
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/BbBadge/BbBadge.vue.d.ts +5 -3
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/BbBadge/BbBadgeButton.vue.d.ts +3 -1
- package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/BbBaseButton/BbBaseButton.vue.d.ts +3 -1
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +85 -85
- package/dist/components/BbBaseButton/types.d.ts +8 -5
- package/dist/components/BbBaseButton/useLinkState.d.ts +2 -0
- package/dist/components/BbBaseButton/useLinkState.js +21 -20
- package/dist/components/BbBaseCheckboxIcon/BbBaseCheckboxIcon.vue.d.ts +3 -1
- package/dist/components/BbBaseRadioIcon/BbBaseRadioIcon.vue.d.ts +3 -1
- package/dist/components/BbBaseSwitchIcon/BbBaseSwitchIcon.vue.d.ts +3 -1
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue.d.ts +3 -1
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/BbButton/BbButton.vue.d.ts +2 -1
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +93 -93
- package/dist/components/BbButton/types.d.ts +7 -4
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +157 -30
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +364 -331
- package/dist/components/BbCalendar/CalendarMonthPanel.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbCalendar/types.d.ts +36 -8
- package/dist/components/BbCalendar/useCalendarGrid.d.ts +133 -0
- package/dist/components/BbCalendar/useCalendarGrid.js +193 -183
- package/dist/components/BbCalendar/useDayGrid.d.ts +24 -19
- package/dist/components/BbCalendar/useDayGrid.js +105 -102
- package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +4 -2
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +327 -2
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +3 -1
- package/dist/components/BbCollapsible/BbCollapsible.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +8 -5
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbColorInput/types.d.ts +2 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +7 -5
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +216 -215
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +25 -25
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +206 -41
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +112 -106
- package/dist/components/BbDatePicker/types.d.ts +27 -8
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +519 -37
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +11 -8
- package/dist/components/BbDatePickerInput/types.d.ts +31 -9
- package/dist/components/BbDialog/BbDialog.vue.d.ts +6 -5
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +231 -233
- package/dist/components/BbDialog/types.d.ts +7 -7
- package/dist/components/BbDialog/useDialogStack.d.ts +2 -0
- package/dist/components/BbDialog/useDialogStack.js +6 -2
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +25 -25
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +8 -6
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +226 -225
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +49 -49
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/BbDropdown/normalizeGroups.js +14 -14
- package/dist/components/BbDropdown/types.d.ts +5 -5
- package/dist/components/BbDropdown/useDropdownContext.js +1 -1
- package/dist/components/BbDropdown/useDropdownGroupRegistry.d.ts +1 -1
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +6 -4
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +36 -38
- package/dist/components/BbDropdownButton/types.js +4 -4
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +57 -22
- package/dist/components/BbDropzone/BbDropzone.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/BbDropzone/types.d.ts +16 -4
- package/dist/components/BbForm/BbForm.vue.d.ts +52 -4
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +19 -23
- package/dist/components/BbHost/BbHostOpening.js +1 -1
- package/dist/components/BbHoverCard/BbHoverCard.vue.d.ts +5 -4
- package/dist/components/BbHoverCard/BbHoverCard.vue_vue_type_script_setup_true_lang.js +116 -116
- package/dist/components/BbIcon/BbIcon.vue.d.ts +3 -1
- package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/BbIndicator/BbIndicator.vue.d.ts +3 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +6 -3
- package/dist/components/BbNumberInput/types.d.ts +2 -0
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +5 -4
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +366 -369
- package/dist/components/BbOffCanvas/sheetAttrs.d.ts +9 -0
- package/dist/components/BbOffCanvas/sheetAttrs.js +10 -0
- package/dist/components/BbOffCanvas/types.d.ts +7 -7
- package/dist/components/BbOffCanvas/useOffCanvasStack.d.ts +2 -0
- package/dist/components/BbOffCanvas/useOffCanvasStack.js +7 -3
- package/dist/components/BbPagination/BbPagination.vue.d.ts +2 -1
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/BbPagination/types.d.ts +5 -5
- package/dist/components/BbPopover/BbPopover.vue.d.ts +5 -4
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +92 -91
- package/dist/components/BbProgress/BbProgress.vue.d.ts +6 -1
- package/dist/components/BbRadio/BbRadio.vue.d.ts +4 -2
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +281 -1
- package/dist/components/BbRating/BbRating.vue.d.ts +4 -2
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/BbSelect/BbSelect.vue.d.ts +575 -4
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/BbSelect/types.d.ts +12 -2
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +105 -3
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +695 -680
- package/dist/components/BbSelectPopover/types.d.ts +9 -1
- package/dist/components/BbSlider/BbSlider.vue.d.ts +135 -33
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbSlider/types.d.ts +19 -4
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +3 -1
- package/dist/components/BbSpinner/BbSpinner.vue.d.ts +3 -1
- package/dist/components/BbSwitch/BbSwitch.vue.d.ts +4 -2
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +131 -1
- package/dist/components/BbTable/BbTable.vue.d.ts +5 -2
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +593 -578
- package/dist/components/BbTable/types.d.ts +14 -1
- package/dist/components/BbTable/utils.d.ts +2 -1
- package/dist/components/BbTable/utils.js +37 -38
- package/dist/components/BbTabs/BbTabs.vue.d.ts +96 -2
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +8 -6
- package/dist/components/BbTabs/BbTabsList.vue.d.ts +11 -1
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +102 -92
- package/dist/components/BbTabs/BbTabsPanels.vue.d.ts +9 -1
- package/dist/components/BbTabs/BbTabsPanels.vue_vue_type_script_setup_true_lang.js +20 -17
- package/dist/components/BbTabs/BbTabsRoot.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbTabs/types.d.ts +34 -23
- package/dist/components/BbTag/BbTag.vue.d.ts +5 -2
- package/dist/components/BbTag/types.d.ts +2 -0
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +195 -2
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbTextInput/types.d.ts +2 -0
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +193 -2
- package/dist/components/BbTextarea/types.d.ts +2 -0
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +78 -38
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +138 -137
- package/dist/components/BbTimePicker/types.d.ts +18 -4
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +272 -33
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +16 -16
- package/dist/components/BbTimePickerInput/types.d.ts +20 -5
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/components/BbToast/BbToastRegion.vue_vue_type_script_setup_true_lang.js +20 -20
- package/dist/components/BbTooltip/BbTooltip.vue.d.ts +3 -2
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +109 -109
- package/dist/components/BbTree/BbTree.vue.d.ts +1 -1
- package/dist/components/ClearableButton/ClearableButton.vue.d.ts +3 -1
- package/dist/components/CloseIcon/CloseButton.vue.d.ts +3 -1
- package/dist/components/CloseIcon/CloseButton.vue.js +1 -1
- package/dist/components/CommonField/CommonField.vue.d.ts +3 -1
- package/dist/components/CommonFieldInput/CommonFieldInput.vue.d.ts +5 -3
- package/dist/components/CommonPopover/CommonPopover.vue.d.ts +5 -4
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +55 -55
- package/dist/components/ErrorIcon/ErrorIcon.vue.d.ts +3 -1
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +124 -124
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +71 -71
- package/dist/components/ListBox/ListBox.vue.d.ts +1 -1
- package/dist/components/OptionsContainer/OptionsContainer.vue.d.ts +1 -1
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/Transitions/Slide.vue.d.ts +1 -1
- package/dist/components/WarningIcon/WarningIcon.vue.d.ts +3 -1
- package/dist/composables/autoHost.d.ts +22 -0
- package/dist/composables/autoHost.js +20 -0
- package/dist/composables/hostOpenings.d.ts +3 -3
- package/dist/composables/hostOpenings.js +1 -1
- package/dist/composables/hostRegistry.d.ts +10 -2
- package/dist/composables/hostRegistry.js +5 -3
- package/dist/composables/overlayRegistry.d.ts +1 -1
- package/dist/composables/overlayRegistry.js +2 -2
- package/dist/composables/useBbConfig.d.ts +1 -0
- package/dist/composables/useBbConfig.js +11 -7
- package/dist/composables/{useBbDialogContext.d.ts → useBbDialog.d.ts} +9 -9
- package/dist/composables/{useBbDialogContext.js → useBbDialog.js} +4 -4
- package/dist/composables/{useBbDropdownContext.d.ts → useBbDropdown.d.ts} +14 -14
- package/dist/composables/{useBbDropdownContext.js → useBbDropdown.js} +2 -2
- package/dist/composables/{useBbFormContext.d.ts → useBbForm.d.ts} +8 -8
- package/dist/composables/{useBbFormContext.js → useBbForm.js} +3 -3
- package/dist/composables/useBbOffCanvas.d.ts +23 -0
- package/dist/composables/{useBbOffCanvasContext.js → useBbOffCanvas.js} +3 -3
- package/dist/composables/{useBbTableContext.d.ts → useBbTable.d.ts} +29 -29
- package/dist/composables/{useBbTableContext.js → useBbTable.js} +2 -2
- package/dist/composables/{useBbTabsContext.d.ts → useBbTabs.d.ts} +19 -3
- package/dist/composables/useBbTabs.js +266 -0
- package/dist/composables/useConfirm.d.ts +6 -7
- package/dist/composables/useConfirm.js +1 -1
- package/dist/composables/useOnDemandOpener.d.ts +4 -4
- package/dist/composables/useOnDemandOpener.js +1 -1
- package/dist/composables/useToast.d.ts +4 -5
- package/dist/composables/useToast.js +1 -1
- package/dist/directives/bbDialog.d.ts +1 -1
- package/dist/directives/bbDropdown.js +3 -3
- package/dist/directives/bbOffCanvas.d.ts +1 -1
- package/dist/directives/overlayTrigger.js +18 -18
- package/dist/index.d.ts +15 -15
- package/dist/index.js +55 -55
- package/dist/llms-full.txt +5397 -2894
- package/dist/llms-medium.txt +127 -93
- package/dist/llms.txt +12 -12
- package/dist/nuxt-auto-imports.js +6 -6
- package/dist/nuxt.js +1 -1
- package/dist/plugin.js +30 -28
- package/dist/runtime/nuxt-plugin.js +30 -28
- package/dist/styles.css +2 -2
- package/dist/types/ShapeErased.d.ts +15 -0
- package/dist/types/fallthrough.d.ts +134 -0
- package/dist/utilities/functions/normalizeDateBound.d.ts +7 -5
- package/dist/utilities/functions/normalizeDateBound.js +9 -9
- package/dist/utils/versionCheck.js +1 -1
- package/llms.txt +12 -12
- package/package.json +3 -2
- package/scripts/lib/adoption-checklist.json +2 -1
- package/scripts/lib/css-class-surface.mjs +39 -3
- package/scripts/lib/eslint-disable.mjs +9 -1
- package/scripts/lib/eslint-plugin.d.ts +7 -1
- package/scripts/lib/eslint-plugin.mjs +280 -3
- package/scripts/lib/form-v-model.mjs +2 -2
- package/scripts/lib/helper-canon.mjs +34 -2
- package/scripts/lib/helpers-add.mjs +106 -15
- package/scripts/lib/hidden-label-placeholder.mjs +138 -0
- package/scripts/lib/html-attributes.mjs +82 -0
- package/scripts/lib/idiom-scan.mjs +175 -2
- package/scripts/lib/portal-names.mjs +3 -3
- package/scripts/lib/prefer-v-bb-dialog.mjs +1 -1
- package/scripts/lib/tab-links.mjs +209 -0
- package/scripts/lib/token-color-mix.mjs +114 -0
- package/scripts/lib/toolchain-check.mjs +34 -3
- package/scripts/lib/unstyled-variants.mjs +57 -0
- package/scripts/lib/validate-bb-markup.mjs +72 -1
- package/dist/composables/useBbOffCanvasContext.d.ts +0 -23
- package/dist/composables/useBbTabsContext.js +0 -252
package/dist/ai/BbDialog.md
CHANGED
|
@@ -53,6 +53,20 @@ the `default`/`footer` slots, `default-data`, `navigation`, `persistent`,
|
|
|
53
53
|
`focus-target`, `eager`, `stack`, `transition-duration`), so moving a surface
|
|
54
54
|
between them is mostly a tag swap.
|
|
55
55
|
|
|
56
|
+
#### Which one?
|
|
57
|
+
|
|
58
|
+
How you open it follows from where its state lives:
|
|
59
|
+
|
|
60
|
+
- **A dialog in its own file whose state must start fresh** (a form, a
|
|
61
|
+
fetched step), **or one opened with a row's data** → on demand,
|
|
62
|
+
`useBbDialog(EditMember).show(member)`: every opening mounts a new
|
|
63
|
+
instance, so there is nothing to reset ([On-demand dialogs](#on-demand-dialogs-open-a-component)).
|
|
64
|
+
- **A page-level dialog that needs the URL or Back** → a placed `<BbDialog id>`
|
|
65
|
+
opened by id, `v-bb-dialog="'invite'"` ([In the URL](#in-the-url-navigation)).
|
|
66
|
+
- **A yes / no** → `useConfirm`, not a dialog.
|
|
67
|
+
|
|
68
|
+
A `v-model` is for state your page already owns.
|
|
69
|
+
|
|
56
70
|
### Open and close with v-model
|
|
57
71
|
|
|
58
72
|
With a `v-model`, the model owns visibility: bind a boolean and flip it.
|
|
@@ -201,7 +215,7 @@ reads `data` in two places:
|
|
|
201
215
|
|
|
202
216
|
- in the template, the `default`, `header` and `footer` slots receive it as
|
|
203
217
|
`data` (typed `any`, so `data.name` reads with no cast);
|
|
204
|
-
- in code, `
|
|
218
|
+
- in code, `useBbDialog<T>(id)` returns it typed, along with `open`,
|
|
205
219
|
`show(data?)` and `hide()`. A component inside the dialog can call it too.
|
|
206
220
|
A `show()` on an open dialog changes nothing: it joins the opening (its
|
|
207
221
|
promise, its data); the new data, trigger and `onComplete` are ignored. A
|
|
@@ -216,7 +230,7 @@ closes with `complete(data)`, handing the edited copy to the row's
|
|
|
216
230
|
|
|
217
231
|
The rules:
|
|
218
232
|
|
|
219
|
-
- **Lookup nearest to the trigger.** The directive (and the
|
|
233
|
+
- **Lookup nearest to the trigger.** The directive (and the handle) looks
|
|
220
234
|
for the dialog in the component whose template it is written in and in the
|
|
221
235
|
components that one renders, nearest first. Then it moves up to the parent
|
|
222
236
|
and repeats. So a dialog wrapped in a component of its own works:
|
|
@@ -228,14 +242,14 @@ The rules:
|
|
|
228
242
|
page's topbar, a toolbar or a selection bar opens the page's dialog with
|
|
229
243
|
`v-bb-dialog` itself: the lookup climbs from the topbar to the page that
|
|
230
244
|
renders `<CreateInvoiceDialog />`. Don't emit an event (`emit('create')`)
|
|
231
|
-
that the page turns into `
|
|
245
|
+
that the page turns into `useBbDialog(id).show()`. That's more
|
|
232
246
|
wiring, and the button loses `aria-haspopup`, `aria-expanded` and
|
|
233
247
|
`aria-controls`. Keep
|
|
234
248
|
`show()` for opens no button makes: a keyboard shortcut, a menu item, an
|
|
235
249
|
open after a fetch.
|
|
236
250
|
- **`v-model` still wins.** On a dialog that has one, the directive writes the
|
|
237
251
|
model. A parent that refuses the change keeps the dialog closed.
|
|
238
|
-
- **Three closes.** `complete(value)` (slots and
|
|
252
|
+
- **Three closes.** `complete(value)` (slots and handle) closes with a
|
|
239
253
|
result, and `hide()` is the code's close, like setting the model to
|
|
240
254
|
`false`. Both close even under `prevent-close`; use one after a save. The
|
|
241
255
|
slots' `close()` stays the user's close, and `prevent-close` refuses it.
|
|
@@ -255,7 +269,7 @@ The rules:
|
|
|
255
269
|
is safe: it takes the same open and user-close paths. Prefer `v-bb-dialog`.
|
|
256
270
|
|
|
257
271
|
`bitboss-ui check` and the ESLint rule `bitboss-ui/portal-names` report a
|
|
258
|
-
`v-bb-dialog` or `
|
|
272
|
+
`v-bb-dialog` or `useBbDialog` id that no `<BbDialog id>` in the
|
|
259
273
|
project declares (`unknown-dialog`). A dialog that lives in a dependency is
|
|
260
274
|
listed in `dialogIdsWhitelist` (`bitboss-ui.check.json`, or the `"bitboss-ui"`
|
|
261
275
|
key of package.json).
|
|
@@ -267,7 +281,7 @@ An opening hands back how it ended. The directive takes `onComplete`, and
|
|
|
267
281
|
fetch):
|
|
268
282
|
|
|
269
283
|
```ts
|
|
270
|
-
const edit =
|
|
284
|
+
const edit = useBbDialog<Member, Member>('edit-member');
|
|
271
285
|
const result = await edit.show(member);
|
|
272
286
|
if (result.completed) replace(result.value);
|
|
273
287
|
```
|
|
@@ -315,7 +329,7 @@ const replace = (saved: Member) => {
|
|
|
315
329
|
```
|
|
316
330
|
|
|
317
331
|
- `complete(value)` (the `default`, `header` and `footer` slots, and
|
|
318
|
-
`
|
|
332
|
+
`useBbDialog(id).complete`) closes the dialog and resolves
|
|
319
333
|
`{ completed: true, value }`. It wins over `prevent-close`, like `hide()`.
|
|
320
334
|
- Every other close is a dismissal, `{ completed: false, reason }`:
|
|
321
335
|
|
|
@@ -383,7 +397,7 @@ the user edits it.
|
|
|
383
397
|
<script setup lang="ts">
|
|
384
398
|
import { ref } from 'vue';
|
|
385
399
|
|
|
386
|
-
const fieldErrors = ref<Record<string, string[]>>({});
|
|
400
|
+
const fieldErrors = ref<Record<string, string | string[]>>({});
|
|
387
401
|
</script>
|
|
388
402
|
|
|
389
403
|
<template>
|
|
@@ -394,8 +408,9 @@ const fieldErrors = ref<Record<string, string[]>>({});
|
|
|
394
408
|
@submit="
|
|
395
409
|
() =>
|
|
396
410
|
complete(data).catch((error) => {
|
|
397
|
-
// Your save's rejection
|
|
398
|
-
|
|
411
|
+
// Your save's rejection. With the Inertia helpers it IS the
|
|
412
|
+
// error bag (messages by field path); an Error has no bag.
|
|
413
|
+
fieldErrors = error instanceof Error ? {} : error;
|
|
399
414
|
})
|
|
400
415
|
"
|
|
401
416
|
>
|
|
@@ -411,29 +426,21 @@ record-form recipe (`ai/recipes/inertia/record-form.md`) binds
|
|
|
411
426
|
`<BbForm :field-errors="form.errors">` the same way.
|
|
412
427
|
|
|
413
428
|
An Inertia visit (`router.put`, `form.put`) returns no promise and never
|
|
414
|
-
rejects on its own
|
|
415
|
-
|
|
416
|
-
and a visit
|
|
429
|
+
rejects on its own. Save through the Inertia helpers' `usePromiseRouter`
|
|
430
|
+
(Inertia helpers guide § usePromiseRouter) instead: its promise resolves when
|
|
431
|
+
the server answered (and on a visit another visit cut short, closing the
|
|
432
|
+
dialog), and on a validation error it **rejects with the error bag itself**,
|
|
433
|
+
`{ name: 'The name is taken.' }`, not `{ errors }`: the example above binds
|
|
434
|
+
the rejection as it is. Anything else (an error page, a network error)
|
|
435
|
+
rejects with an `Error`, which has no bag.
|
|
417
436
|
|
|
418
437
|
```ts
|
|
419
|
-
import {
|
|
438
|
+
import { usePromiseRouter } from '@/composables/inertia-helpers/usePromiseRouter';
|
|
420
439
|
|
|
421
440
|
type User = { id: number; name: string };
|
|
422
441
|
|
|
423
|
-
const
|
|
424
|
-
|
|
425
|
-
router.put(`/users/${user.id}`, user, {
|
|
426
|
-
onSuccess: () => resolve(),
|
|
427
|
-
onError: (errors) => reject({ errors }),
|
|
428
|
-
// Cancelled or interrupted: close. Anything else that ends here
|
|
429
|
-
// unsettled (a 500, a network error) keeps the dialog open.
|
|
430
|
-
// Both are no-ops after onSuccess / onError.
|
|
431
|
-
onFinish: (visit) =>
|
|
432
|
-
visit.cancelled || visit.interrupted
|
|
433
|
-
? resolve()
|
|
434
|
-
: reject(new Error('The save failed')),
|
|
435
|
-
});
|
|
436
|
-
});
|
|
442
|
+
const { put } = usePromiseRouter();
|
|
443
|
+
const save = (user: User) => put(`/users/${user.id}`, user);
|
|
437
444
|
```
|
|
438
445
|
|
|
439
446
|
#### The data is a copy
|
|
@@ -453,7 +460,7 @@ a `File`, a `Map`) is the same object you passed. So:
|
|
|
453
460
|
saved. A dialog with no round trip (a local filters panel) returns the edit
|
|
454
461
|
itself with `complete(data)`.
|
|
455
462
|
- `data` is not the object you passed (`data !== row`), so compare by id, never
|
|
456
|
-
by identity. The slots' `data` and `
|
|
463
|
+
by identity. The slots' `data` and `useBbDialog(id).data` are the
|
|
457
464
|
same copy, and it is reactive: a title bound to `data.name` follows the
|
|
458
465
|
typing.
|
|
459
466
|
|
|
@@ -558,7 +565,7 @@ const save = (saved: Member) => {
|
|
|
558
565
|
</script>
|
|
559
566
|
```
|
|
560
567
|
|
|
561
|
-
- **`reset()`** (the slots', or `
|
|
568
|
+
- **`reset()`** (the slots', or `useBbDialog(id).reset()`) restores
|
|
562
569
|
the keys `default-data` declares from a fresh copy, on an edit too, and keeps
|
|
563
570
|
every key it doesn't declare: the row's `id` stays, so a cleared edit still
|
|
564
571
|
saves as an edit. It doesn't go back to the row's values; Cancel is what
|
|
@@ -571,7 +578,7 @@ const save = (saved: Member) => {
|
|
|
571
578
|
|
|
572
579
|
**Whose surroundings the dialog takes.** The directive sits on the trigger in
|
|
573
580
|
the template, so the dialog it opens follows the trigger's surroundings: a
|
|
574
|
-
`<BbPtScope>` around the button themes it. A
|
|
581
|
+
`<BbPtScope>` around the button themes it. A handle call (`edit.show()`) is
|
|
575
582
|
the code form of opening and knows nothing about the element that led to
|
|
576
583
|
it: it inherits only what the calling component's setup sees (the page's
|
|
577
584
|
provides), not a `<BbPtScope>` the page writes around the button in its own
|
|
@@ -621,13 +628,13 @@ const save = async (values: Record<string, unknown>): Promise<User> => ({
|
|
|
621
628
|
```
|
|
622
629
|
|
|
623
630
|
Open it from a button with the directive, the tersest form, or from code with
|
|
624
|
-
the
|
|
631
|
+
the handle. Both take explicit `<In, Out>`; nothing is inferred from the
|
|
625
632
|
component:
|
|
626
633
|
|
|
627
634
|
```vue
|
|
628
635
|
<script setup lang="ts">
|
|
629
636
|
import { ref } from 'vue';
|
|
630
|
-
import { BbButton,
|
|
637
|
+
import { BbButton, useBbDialog } from 'bitboss-ui';
|
|
631
638
|
import UserCreateDialog from './UserCreateDialog.vue';
|
|
632
639
|
|
|
633
640
|
type User = { id: number; name: string; team: string };
|
|
@@ -635,7 +642,7 @@ const users = ref<User[]>([]);
|
|
|
635
642
|
const add = (user: User) => users.value.push(user);
|
|
636
643
|
|
|
637
644
|
// From code: a shortcut, an open after a fetch.
|
|
638
|
-
const create =
|
|
645
|
+
const create = useBbDialog<{ team: string }, User>(UserCreateDialog);
|
|
639
646
|
const createForDesign = async () => {
|
|
640
647
|
const result = await create.show({ team: 'Design' });
|
|
641
648
|
if (result.completed) add(result.value);
|
|
@@ -660,29 +667,32 @@ const createForDesign = async () => {
|
|
|
660
667
|
</template>
|
|
661
668
|
```
|
|
662
669
|
|
|
663
|
-
- **It
|
|
664
|
-
every confirm and toast)
|
|
665
|
-
|
|
670
|
+
- **It renders in `<BbHost />`**, which the plugin renders beside the app (it
|
|
671
|
+
renders every confirm and toast too): nothing to mount. Without the plugin
|
|
672
|
+
there is no host, and the opening waits a second, then settles
|
|
673
|
+
`'unmounted'` with a dev warning.
|
|
666
674
|
- **Results** are the dialog's own, as in the section above: `complete(value)`
|
|
667
675
|
resolves `{ completed: true, value }`, every other close a dismissal, at
|
|
668
676
|
close start. The instance unmounts after the close transition.
|
|
669
677
|
- **It injects like its opener.** The directive's dialog takes the trigger's
|
|
670
678
|
surroundings (a row's `provide`, a `<BbPtScope>` around the button, an
|
|
671
|
-
enclosing `BbForm`); a
|
|
679
|
+
enclosing `BbForm`); a handle's takes the calling component's. It paints
|
|
672
680
|
in the host, outside the page's DOM.
|
|
673
681
|
- **Lifetime.** The opening is dismissed (`'unmounted'`) when what opened it
|
|
674
682
|
goes away: the page on a route change, a row that re-renders away, a
|
|
675
|
-
KeepAlive park
|
|
683
|
+
KeepAlive park, a button in a closing panel (a select's `#empty`, which
|
|
684
|
+
unmounts as the dialog takes focus). Open those from a handle made in setup,
|
|
685
|
+
`useBbDialog(Component)`, which lives as long as its component. A flow that changes the URL inside one dialog (a wizard
|
|
676
686
|
whose steps are routes) opens it from the parent route or the persistent
|
|
677
687
|
layout, which stays mounted. A `show()` from a store lives until closed.
|
|
678
688
|
- **From a store.** Create the handle in the setup store's body (or under
|
|
679
689
|
`app.runWithContext()`), then `show()` / `hide()` from its actions or a
|
|
680
690
|
router hook. Created in a plain module, outside any injection context,
|
|
681
691
|
`show()` settles `'failed'` with a dev warning.
|
|
682
|
-
- **One handle, one dialog.** `
|
|
692
|
+
- **One handle, one dialog.** `useBbDialog(Component)` is the same
|
|
683
693
|
handle as the id form (`isReady`, `open`, `data`, `show`, `hide`,
|
|
684
694
|
`complete`, `reset`), about its own dialog: a `show()` while it is open
|
|
685
|
-
joins it. Another handle (another `
|
|
695
|
+
joins it. Another handle (another `useBbDialog(Component)` call, or
|
|
686
696
|
another trigger element) opens its own instance on top, with its own
|
|
687
697
|
promise. `isReady` says a `<BbHost />` is mounted to render it.
|
|
688
698
|
- **Each opening gets its own DOM id**, so two stacked instances stay valid
|
|
@@ -691,7 +701,7 @@ const createForDesign = async () => {
|
|
|
691
701
|
e.g. `getByRole('dialog', { name: 'Edit account' })`: its HTML id is
|
|
692
702
|
generated per opening.
|
|
693
703
|
- **It must render its dialog.** A component that renders no `<BbDialog>` /
|
|
694
|
-
`<BbOffCanvas>`, or whose `
|
|
704
|
+
`<BbOffCanvas>`, or whose `useBbDialog(id)` names another id than its
|
|
695
705
|
dialog's, settles `'failed'` with a dev warning instead of hanging. So does a
|
|
696
706
|
`defineAsyncComponent` whose chunk fails to load. Define an async component
|
|
697
707
|
once, at module scope: an inline `defineAsyncComponent(() => import(…))` per
|
|
@@ -1015,19 +1025,13 @@ Two rules keep dialog forms honest:
|
|
|
1015
1025
|
|
|
1016
1026
|
Close only when the save worked. When the server answers with field errors
|
|
1017
1027
|
(a 422), don't call `complete` or `hide`: hand the errors to the form with
|
|
1018
|
-
`
|
|
1028
|
+
`useBbForm(id).setErrors`, and the dialog stays open with each message
|
|
1019
1029
|
under its field and focus on the first one. The user fixes it and submits
|
|
1020
1030
|
again; Cancel still throws the copy away.
|
|
1021
1031
|
|
|
1022
1032
|
```vue
|
|
1023
1033
|
<script setup lang="ts">
|
|
1024
|
-
import {
|
|
1025
|
-
BbButton,
|
|
1026
|
-
BbDialog,
|
|
1027
|
-
BbForm,
|
|
1028
|
-
BbTextInput,
|
|
1029
|
-
useBbFormContext,
|
|
1030
|
-
} from 'bitboss-ui';
|
|
1034
|
+
import { BbButton, BbDialog, BbForm, BbTextInput, useBbForm } from 'bitboss-ui';
|
|
1031
1035
|
|
|
1032
1036
|
type Member = { id: number; name: string; email: string };
|
|
1033
1037
|
type FieldErrors = Record<string, string[]>;
|
|
@@ -1038,7 +1042,7 @@ const save = async (member: Member): Promise<Member | FieldErrors> =>
|
|
|
1038
1042
|
? { ...member }
|
|
1039
1043
|
: { email: ['Use your work address.'] };
|
|
1040
1044
|
|
|
1041
|
-
const form =
|
|
1045
|
+
const form = useBbForm('edit-member-form');
|
|
1042
1046
|
</script>
|
|
1043
1047
|
|
|
1044
1048
|
<template>
|
|
@@ -1093,7 +1097,7 @@ transition completes. A surface closed before it finished opening fires no
|
|
|
1093
1097
|
`shown`.
|
|
1094
1098
|
|
|
1095
1099
|
`@show` carries no payload: read the opening's `data` from the slots or
|
|
1096
|
-
`
|
|
1100
|
+
`useBbDialog(id).data`.
|
|
1097
1101
|
|
|
1098
1102
|
Every way to close, side by side:
|
|
1099
1103
|
|
|
@@ -1101,8 +1105,8 @@ Every way to close, side by side:
|
|
|
1101
1105
|
| ------------------------------------------------------- | ------------ | ------------------------------------- | --------------------------------------------- | ----------------------------------------------------------------------------------- |
|
|
1102
1106
|
| the ✕, the slots' `close()` | the user | yes: `prevent-close`, a saving form | `{ completed: false, reason: 'close' }` | on the click |
|
|
1103
1107
|
| Escape, Back on a URL dialog, a backdrop click, a swipe | the user | yes: `persistent` too | `reason: 'escape'` / `'backdrop'` / `'swipe'` | on the key, Back, click or swipe |
|
|
1104
|
-
| `hide()` (
|
|
1105
|
-
| `complete(value)` (slots,
|
|
1108
|
+
| `hide()` (handle), the model set to `false` | your code | no | `{ completed: false, reason: 'hide' }` | at once |
|
|
1109
|
+
| `complete(value)` (slots, handle) | your code | no | `{ completed: true, value }` | at once |
|
|
1106
1110
|
| `@hide` | the dialog | it reports a close, it can't stop one | emits it (the same object) | as any close above **starts** |
|
|
1107
1111
|
| `@hidden` | the dialog | it reports a close, it can't stop one | already settled | after the close transition; focus returns, `data` clears and the body unmounts then |
|
|
1108
1112
|
|
|
@@ -1110,7 +1114,7 @@ A refused close fires nothing and settles nothing. Use `@hide` for what
|
|
|
1110
1114
|
follows the decision (a toast, a refresh), `@hidden` for teardown. `@hide`
|
|
1111
1115
|
carries the opening's result, so a live preview reverts on a dismissal with
|
|
1112
1116
|
no flag of its own: `@hide="(r) => { if (!r.completed) restore() }"`. To
|
|
1113
|
-
tell a save from a cancel, close a save with `complete()` (slots or
|
|
1117
|
+
tell a save from a cancel, close a save with `complete()` (slots or handle),
|
|
1114
1118
|
not by writing the model: on a `v-model` dialog too, it closes through the
|
|
1115
1119
|
model and reports `{ completed: true }`.
|
|
1116
1120
|
|
|
@@ -1537,8 +1541,9 @@ with `default-data`:
|
|
|
1537
1541
|
<BbButton v-bb-dialog="'create-patient'">New patient</BbButton>
|
|
1538
1542
|
```
|
|
1539
1543
|
|
|
1540
|
-
|
|
1541
|
-
|
|
1544
|
+
Everything else can stay on demand: an opening that needs no URL (a dialog
|
|
1545
|
+
that must start fresh, per-row data, a command palette, a store action,
|
|
1546
|
+
stacked copies of one dialog) needs no placed dialog either.
|
|
1542
1547
|
|
|
1543
1548
|
On the phone the adaptive
|
|
1544
1549
|
sheet is the same dialog: one key, and Back is refused by the sheet's own
|
|
@@ -1783,7 +1788,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
1783
1788
|
| `focusTarget` | `string \| undefined` | | | CSS selector of the element to focus after opening. Defaults to the first tabbable element. |
|
|
1784
1789
|
| `fullscreen` | `boolean \| "mobile" \| undefined` | | | Display the dialog fullscreen. Use `'mobile'` to restrict fullscreen to small devices. |
|
|
1785
1790
|
| `hideClose` | `boolean \| undefined` | `false` | | Hide the default close (×) button. The button is shown by default; set this to remove it (e.g. for a `persistent` dialog you don't want dismissible — the × otherwise still closes a persistent dialog). |
|
|
1786
|
-
| `id` | `string \| undefined` | | | Names the dialog for `v-bb-dialog="'edit'"` and `
|
|
1791
|
+
| `id` | `string \| undefined` | | | Names the dialog for `v-bb-dialog="'edit'"` and `useBbDialog`, found nearest to the trigger, so two pages may reuse an id. Also the DOM `id`: one dialog per id, rows pass `data`. |
|
|
1787
1792
|
| `modelValue` | `boolean \| undefined` | `false` | | Used by v-model to open / close the dialog. A dialog with no `v-model` starts closed. |
|
|
1788
1793
|
| `navigation` | `boolean \| undefined` | `false` | | Syncs the open state with the URL: opening writes `?<queryKey>=true`, closing removes it, a URL with the key opens the dialog on load, and Back closes it (refused whenever Escape is). Template dialogs only; keep a record id in your own query. |
|
|
1789
1794
|
| `offCanvasProps` | `Partial<BbOffCanvasProps> \| undefined` | | | Props for the phone sheet (the `BbOffCanvas` that `adaptive` renders on mobile), spread over its defaults. A `pt` inside it styles only the sheet (passthrough guide § Inside the sheet). |
|
package/dist/ai/BbDropdown.md
CHANGED
|
@@ -57,7 +57,7 @@ An `items` entry is one of three shapes, and you can mix them freely:
|
|
|
57
57
|
[Titled sections](#titled-sections-group-true-or-groupby) compares it with
|
|
58
58
|
`groupBy`, which titles the rows of one group. A group's heading is its `label` too;
|
|
59
59
|
add `hideLabel` to keep the `label` for the adaptive sheet title / chips /
|
|
60
|
-
`
|
|
60
|
+
`useBbDropdown` while rendering no heading in the menu.
|
|
61
61
|
|
|
62
62
|
Each item extends `BbBaseButton`'s prop surface, so an item is an action, a
|
|
63
63
|
link, or a submenu opener depending on which fields it carries:
|
|
@@ -98,7 +98,7 @@ hook, an `aria-*`) goes through `pt:item`, per row with the function form:
|
|
|
98
98
|
|
|
99
99
|
Note how the destructive item below follows the design rule end to end: its
|
|
100
100
|
`onClick` awaits [useConfirm](./composables/useConfirm.md) and acts only on a
|
|
101
|
-
yes (`<BbHost />`
|
|
101
|
+
yes (the plugin's `<BbHost />` renders it; nothing to mount).
|
|
102
102
|
|
|
103
103
|
**A mixed action menu**
|
|
104
104
|
|
|
@@ -130,18 +130,11 @@ yes (`<BbHost />` mounts once per app, at the root).
|
|
|
130
130
|
/>
|
|
131
131
|
</template>
|
|
132
132
|
</BbDropdown>
|
|
133
|
-
|
|
134
|
-
<!--
|
|
135
|
-
Standalone example: it mounts its own host because it has no app root.
|
|
136
|
-
A real app mounts exactly one <BbHost /> at the app root, and pages
|
|
137
|
-
mount none. See ai/guides/agent-contract.md § Global Host Rule.
|
|
138
|
-
-->
|
|
139
|
-
<BbHost />
|
|
140
133
|
</div>
|
|
141
134
|
</template>
|
|
142
135
|
<script setup lang="ts">
|
|
143
136
|
import { ref } from 'vue';
|
|
144
|
-
import { BbButton,
|
|
137
|
+
import { BbButton, BbDropdown, useConfirm } from 'bitboss-ui';
|
|
145
138
|
import type { BbDropdownItem } from 'bitboss-ui';
|
|
146
139
|
|
|
147
140
|
const last = ref('No action yet');
|
|
@@ -435,7 +428,7 @@ const statusGroup = {
|
|
|
435
428
|
selected ones stay live so the user can swap.
|
|
436
429
|
- The function receives the **row object** in a hand-written group and the
|
|
437
430
|
**raw fetched item** in a fetched group.
|
|
438
|
-
- `
|
|
431
|
+
- `useBbDropdown(id).groups[groupId].selectable` stays a plain `true`.
|
|
439
432
|
|
|
440
433
|
This is also how a fetched row gets disabled — see
|
|
441
434
|
[why fetched rows have no `disabled`](#additional-row-fields-itemprops).
|
|
@@ -913,7 +906,7 @@ const assigneeGroup = {
|
|
|
913
906
|
};
|
|
914
907
|
```
|
|
915
908
|
|
|
916
|
-
**Fetched assignees: description, icon, selectable gate,
|
|
909
|
+
**Fetched assignees: description, icon, selectable gate, handle**
|
|
917
910
|
|
|
918
911
|
```vue
|
|
919
912
|
<template>
|
|
@@ -953,7 +946,7 @@ import {
|
|
|
953
946
|
BbButton,
|
|
954
947
|
BbDropdown,
|
|
955
948
|
BbDropdownGroup,
|
|
956
|
-
|
|
949
|
+
useBbDropdown,
|
|
957
950
|
} from 'bitboss-ui';
|
|
958
951
|
import type { BbDropdownItem } from 'bitboss-ui';
|
|
959
952
|
|
|
@@ -999,11 +992,11 @@ const items: BbDropdownItem[] = [
|
|
|
999
992
|
|
|
1000
993
|
const assignees = ref<string[]>(['u1']);
|
|
1001
994
|
|
|
1002
|
-
// The resolved description is on the
|
|
995
|
+
// The resolved description is on the handle's `selectedOptions` too — no
|
|
1003
996
|
// second fetch to show the picked emails outside the menu.
|
|
1004
|
-
const
|
|
997
|
+
const assigneeMenu = useBbDropdown('invoice-assignees');
|
|
1005
998
|
const emails = computed(() =>
|
|
1006
|
-
(
|
|
999
|
+
(assigneeMenu.groups.value.assignees?.selectedOptions ?? [])
|
|
1007
1000
|
.map((option) => option.description)
|
|
1008
1001
|
.filter(Boolean)
|
|
1009
1002
|
.join(', ')
|
|
@@ -1095,7 +1088,7 @@ structure — `value`, `label`, `items`, `group` — and `disabled`:
|
|
|
1095
1088
|
|
|
1096
1089
|
- `description` — a muted second line under the text, announced as the row's
|
|
1097
1090
|
description (never part of its name), searched with the text, and exposed as
|
|
1098
|
-
`description` on `
|
|
1091
|
+
`description` on `useBbDropdown(id).groups[groupId].selectedOptions`.
|
|
1099
1092
|
- `prepend:icon`, `append:icon`, `variant`.
|
|
1100
1093
|
- `onClick`, `href`, `to`, `target`, `rel`, `download`, `external`, and the
|
|
1101
1094
|
Inertia visit options.
|
|
@@ -1223,15 +1216,15 @@ searchable group in the menu:
|
|
|
1223
1216
|
|
|
1224
1217
|
A searchable surface is a `role="dialog"`, not a `menu` — see Accessibility.
|
|
1225
1218
|
|
|
1226
|
-
### Reading a dropdown from anywhere: `
|
|
1219
|
+
### Reading a dropdown from anywhere: `useBbDropdown`
|
|
1227
1220
|
|
|
1228
1221
|
Give the dropdown an explicit `id` and any component — no shared parent needed —
|
|
1229
1222
|
can read its live state. This is how you render **filter chips outside the menu
|
|
1230
1223
|
without a second fetch**: the dropdown already resolved each pick's label when
|
|
1231
|
-
the user chose it, so the
|
|
1224
|
+
the user chose it, so the handle hands it back.
|
|
1232
1225
|
|
|
1233
1226
|
```ts
|
|
1234
|
-
const { isReady, open, groups } =
|
|
1227
|
+
const { isReady, open, groups } = useBbDropdown('invoice-filters');
|
|
1235
1228
|
```
|
|
1236
1229
|
|
|
1237
1230
|
- `isReady` — a dropdown with that id is mounted.
|
|
@@ -1253,7 +1246,7 @@ still want a chip prefix.
|
|
|
1253
1246
|
Two rules worth knowing:
|
|
1254
1247
|
|
|
1255
1248
|
- **It is read-only.** To change a selection, write to that group's own
|
|
1256
|
-
`v-model` — the
|
|
1249
|
+
`v-model` — the handle never mutates.
|
|
1257
1250
|
- **It is lazy.** Reading never triggers a fetch, so a seeded value in a
|
|
1258
1251
|
search-first group stays `{ value }` (no label) until that group loads. Set
|
|
1259
1252
|
`prefill: true` on the group to resolve a seeded selection eagerly.
|
|
@@ -1781,7 +1774,7 @@ selectable group, no fetched `items`) goes back to sleep once it has closed, or
|
|
|
1781
1774
|
when focus leaves an element whose menu never opened, so only the open menu
|
|
1782
1775
|
is ever a component. Measured on 3,000 elements: mount and re-render cost
|
|
1783
1776
|
about the same as the bare elements. Two things opt a binding out: `eager`, and
|
|
1784
|
-
an explicit `id` (it must stay resolvable by `
|
|
1777
|
+
an explicit `id` (it must stay resolvable by `useBbDropdown(id)`). Each
|
|
1785
1778
|
then mounts a full `BbDropdown` (about 1 ms per element), so leave both off on
|
|
1786
1779
|
long lists.
|
|
1787
1780
|
|
|
@@ -2237,6 +2230,11 @@ own sizes.
|
|
|
2237
2230
|
a check in `item:append`). Make the group `selectable` and bind its
|
|
2238
2231
|
`v-model` to the current id — the check, `aria-checked` and the radio role
|
|
2239
2232
|
come with it.
|
|
2233
|
+
- **An on/off entry ("Show deleted") is a selectable group too**, never an
|
|
2234
|
+
action row with a check icon drawn in: a screen reader hears that as a plain
|
|
2235
|
+
`menuitem`, with no state. Make it a `multiple` group of one row (a
|
|
2236
|
+
`menuitemcheckbox` with `aria-checked`), bound to a one-value array; add
|
|
2237
|
+
`close-on-select` when the menu should close after the toggle.
|
|
2240
2238
|
- **A server-searched group needs `filterBy: false`.** The default local
|
|
2241
2239
|
match runs on the getter's answer too, so a row the server matched on a field
|
|
2242
2240
|
the menu doesn't show (an email, a fiscal code) is fetched and then hidden.
|
|
@@ -2263,7 +2261,10 @@ own sizes.
|
|
|
2263
2261
|
referenced element — don't hand-write your own `aria-*` there either; it's
|
|
2264
2262
|
the same double-set conflict as skipping the slot `props`.
|
|
2265
2263
|
- An icon-only trigger still needs an `aria-label` (see the nested-menu
|
|
2266
|
-
example).
|
|
2264
|
+
example). A trigger with visible text (an account row: name and email)
|
|
2265
|
+
takes none: an `aria-label` replaces the words on screen, and a voice user
|
|
2266
|
+
saying them misses the button (WCAG 2.5.3). The activator `props` already
|
|
2267
|
+
carry `aria-haspopup` / `aria-expanded`.
|
|
2267
2268
|
- The panel is a `role="menu"` labelled by the activator; rows render as
|
|
2268
2269
|
`menuitem`, or `menuitemradio` / `menuitemcheckbox` with `aria-checked` in
|
|
2269
2270
|
selectable groups; submenu openers carry their own `aria-haspopup` /
|
|
@@ -2336,7 +2337,7 @@ it, and at the top level closes the sheet.
|
|
|
2336
2337
|
| `emptyText` | `string \| undefined` | | | Default placeholder text shown when a pipeline group resolves to no items. A group's own `emptyText` overrides this; both fall back to the localized `common.emptyText` (`'No data to display'`). |
|
|
2337
2338
|
| `enforceCoherence` | `boolean \| undefined` | `false` | | Default for pipeline groups: drop selections that are no longer present in a group's current items (e.g. after a `dependencies` re-fetch) from the selection and `v-model`. A group's own `enforceCoherence` overrides this. |
|
|
2338
2339
|
| `failedText` | `string \| undefined` | | | Default placeholder text shown when a pipeline group's latest load FAILED (its `items` getter threw). A group's own `failedText` overrides this; both fall back to the localized `common.failedText` (`"Couldn't load items"`). |
|
|
2339
|
-
| `id` | `string \| undefined` | | | Names this dropdown: the activator's id (unless it already has one), the menu's `menu_<id>`, and the key `
|
|
2340
|
+
| `id` | `string \| undefined` | | | Names this dropdown: the activator's id (unless it already has one), the menu's `menu_<id>`, and the key `useBbDropdown(id)` and a companion `BbDropdownGroup` pair by. Generated when omitted. |
|
|
2340
2341
|
| `items` | `BbDropdownItem[]` | `[]` | yes | The menu rows, each a `BbBaseButton` (`button`, `a` or `router-link`): a flat array for one group, nested arrays for divider-separated groups, or `InternalGroup` objects for titled / selectable sections. A row's own `items` opens a submenu. |
|
|
2341
2342
|
| `loadingText` | `string \| undefined` | | | Default placeholder text shown while a pipeline group's async items load. A group's own `loadingText` overrides this; both fall back to the localized `common.loadingText` (`'Loading...'`). |
|
|
2342
2343
|
| `offCanvasProps` | `Partial<BbOffCanvasProps> \| undefined` | | | Props for the phone sheet (the `BbOffCanvas` that `adaptive` renders on mobile), spread over its defaults. A `pt` inside it styles only the sheet (passthrough guide § Inside the sheet). The sheet hides its ✕; `{ hideClose: false }` brings it back. |
|
|
@@ -309,18 +309,11 @@ not the one that needs a second thought.
|
|
|
309
309
|
Redeploy
|
|
310
310
|
</BbDropdownButton>
|
|
311
311
|
</div>
|
|
312
|
-
|
|
313
|
-
<!--
|
|
314
|
-
Standalone example: it mounts its own host because it has no app root.
|
|
315
|
-
A real app mounts exactly one <BbHost /> at the app root, and pages
|
|
316
|
-
mount none. See ai/guides/agent-contract.md § Global Host Rule.
|
|
317
|
-
-->
|
|
318
|
-
<BbHost />
|
|
319
312
|
</div>
|
|
320
313
|
</template>
|
|
321
314
|
<script setup lang="ts">
|
|
322
315
|
import { ref } from 'vue';
|
|
323
|
-
import {
|
|
316
|
+
import { BbDropdownButton, useConfirm } from 'bitboss-ui';
|
|
324
317
|
import type { BbDropdownItem } from 'bitboss-ui';
|
|
325
318
|
|
|
326
319
|
const status = ref('dpl_7k2f · deployed 2026-07-08 14:32');
|
|
@@ -648,7 +641,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
648
641
|
| `activeClass` | `string \| undefined` | | | Class to apply when the link is active. |
|
|
649
642
|
| `adaptive` | `boolean \| undefined` | ``config.adaptive` (`true`)` | | On mobile (below `config.mobileMaxWidth`), renders the menu as a bottom sheet that drills into submenus one level at a time instead of hover flyouts; slots and selection are unchanged. Unset: the global `config.adaptive`. |
|
|
650
643
|
| `append:icon` | `string \| undefined` | | | Icon to be added on the right of the text. |
|
|
651
|
-
| `ariaCurrentValue` | `"
|
|
644
|
+
| `ariaCurrentValue` | `"time" \| "true" \| "false" \| "page" \| "step" \| "location" \| "date" \| undefined` | `'page'` | | Value passed to the attribute `aria-current` when the link is exact active. |
|
|
652
645
|
| `async` | `boolean \| undefined` | `false` | | Inertia: runs the visit without blocking — the page stays interactive and several async visits can be in flight at once. |
|
|
653
646
|
| `block` | `boolean \| undefined` | `false` | | Displays the component as full width. |
|
|
654
647
|
| `cacheFor` | `string \| number \| (string \| number)[] \| undefined` | | | Inertia: how long a prefetched response stays fresh before it is re-fetched. A single duration, or `[staleAfter, expiresAfter]`. Typed platform-agnostically (matching BbButton) so the library's types never require `@inertiajs/vue3` to be installed. |
|
|
@@ -666,9 +659,9 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
666
659
|
| `external` | `boolean \| undefined` | `false` | | Forces an `href` link to render as a plain `<a>` (native navigation), bypassing Inertia/router interception — same intent as Nuxt's `external`. A native-anchor signal alongside `target` and `download`. |
|
|
667
660
|
| `form` | `string \| undefined` | | | The id of the `BbForm` the main button submits from outside it (the native `form` attribute), with `type="submit"`. |
|
|
668
661
|
| `headers` | `object \| undefined` | | | Additional HTTP headers forwarded to Inertia when navigating via `href` in an Inertia-enabled app. |
|
|
669
|
-
| `href` | `string \| undefined` | | |
|
|
662
|
+
| `href` | `string \| { url: string; method: "get" \| "post" \| "put" \| "patch" \| "delete"; } \| undefined` | | | The link target: renders an anchor (an Inertia `<Link>` under Inertia). Also takes Inertia's `{ url, method }`, a Wayfinder route: Inertia visits with its method; elsewhere the link is its `url`. |
|
|
670
663
|
| `icon` | `string \| undefined` | | | Used when only an icon with no text should be displayed. |
|
|
671
|
-
| `id` | `string \| undefined` | | | Names this dropdown: the activator's id (unless it already has one), the menu's `menu_<id>`, and the key `
|
|
664
|
+
| `id` | `string \| undefined` | | | Names this dropdown: the activator's id (unless it already has one), the menu's `menu_<id>`, and the key `useBbDropdown(id)` and a companion `BbDropdownGroup` pair by. Generated when omitted. |
|
|
672
665
|
| `instant` | `boolean \| undefined` | `false` | | Inertia: navigate optimistically on click and reconcile when the response lands, instead of waiting for the round trip. |
|
|
673
666
|
| `interactiveWhileLoading` | `boolean \| undefined` | `false` | | Keeps the button clickable while it is loading. Buttons are disabled while loading by default; this escape hatch exists for toggles that must stay interactive (e.g. the dropdown-button caret). |
|
|
674
667
|
| `items` | `BbDropdownItem[] \| undefined` | | | The menu: every entry is a row (BbDropdown's item model, groups and submenus included). The main action is the component itself (its default slot, `@click`, `href` / `to`, `type`), never an item. Unset or empty with no `#dropdown` slot: no toggle, a plain button. |
|
|
@@ -704,7 +697,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
704
697
|
| `to` | `string \| wt \| bt \| undefined` | | | Route Location the link should navigate to when clicked on. |
|
|
705
698
|
| `toggle:icon` | `string \| undefined` | | | Replaces the chevron shown inside the dropdown toggle button. A constrained alternative to a slot: only the toggle's icon changes, so the button keeps its semantics. Named after the part it sits in (the `toggle`), the way `prepend:icon` / `append:icon` name theirs. |
|
|
706
699
|
| `transitionDuration` | `number \| undefined` | `150` | | How long the transition has to last in milliseconds. Menus use the fast transition (150) rather than the medium one (250) the other popovers default to: a menu is opened to pick one command and is gone again, so it answers faster than a panel the user reads or edits in. |
|
|
707
|
-
| `type` | `"button" \| "
|
|
700
|
+
| `type` | `"button" \| "reset" \| "submit" \| undefined` | | | Gets the classification and default behavior of the button. |
|
|
708
701
|
| `variant` | `'outline'` \| `'primary'` \| `'destructive'` \| `'secondary'` \| `'none'` \| `'ghost'` \| `'link'` | `"primary"` | | Visual variant shared by both buttons of the split control. `'none'` takes no look (you own hover, focus and disabled); register a real one with the plugin's `buttonVariants` and style `.bb-button--<name>`. |
|
|
709
702
|
| `viewTransition` | `boolean \| undefined` | `false` | | Inertia: run the page swap inside a View Transition, where the browser supports one. |
|
|
710
703
|
| `width` | `string \| number \| undefined` | `'auto'` | | Width of the dropdown in pixels, percentage, or 'auto' to fit content. |
|
package/dist/ai/BbDropzone.md
CHANGED
|
@@ -1179,8 +1179,7 @@ onBeforeUnmount(() => controller?.abort());
|
|
|
1179
1179
|
</style>
|
|
1180
1180
|
```
|
|
1181
1181
|
|
|
1182
|
-
`useToast`
|
|
1183
|
-
toasts are enqueued but never shown. This demo fakes the transfer with a timer;
|
|
1182
|
+
`useToast` renders in the plugin's `<BbHost />`; nothing to mount. This demo fakes the transfer with a timer;
|
|
1184
1183
|
the wiring is identical against real `XHR`/`fetch` progress events. **Abort and
|
|
1185
1184
|
retry live in your request layer, not in `BbDropzone`** — the component has no
|
|
1186
1185
|
cancel/retry API. Use an `AbortController` for cancellation and re-issue the
|
|
@@ -1672,7 +1671,7 @@ button, grows with every file added, and changes mid-drag. So:
|
|
|
1672
1671
|
| `maxFiles` | `number \| undefined` | | | Maximum number of acceptable files. |
|
|
1673
1672
|
| `maxSize` | `number \| undefined` | | | Max size of the files in bytes. |
|
|
1674
1673
|
| `modelValue` | `File \| File[] \| null \| undefined` | | | Used by v-model. |
|
|
1675
|
-
| `multiple` | `boolean
|
|
1674
|
+
| `multiple` | `boolean` | `false` | | Allows the selection of multiple items. |
|
|
1676
1675
|
| `name` | `string \| undefined` | | | Defines the name of the input. |
|
|
1677
1676
|
| `readonly` | `boolean \| undefined` | `false` | | Shows the files; the user cannot change them: drop, the file picker and the `open()` slot prop do nothing, yet the input stays focusable and a `name`d zone still submits its files (unlike `disabled`). Your slot renders the list: hide your remove buttons with the slot's `readonly`. |
|
|
1678
1677
|
| `rules` | `RuleExpression<File \| File[] \| null>` | | | vee-validate rules for this field. Only inside a `BbForm`. |
|