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
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<BbButton
|
|
18
18
|
v-bind="{ ...mainProps(), ...splitAttrs().main }"
|
|
19
19
|
class="bb-dropdown-button__main"
|
|
20
|
-
:group="
|
|
20
|
+
:group="grouped()"
|
|
21
21
|
:pt="
|
|
22
22
|
passthrough.forward(
|
|
23
23
|
{ main: 'root', icon: 'icon', spinner: 'spinner', text: 'text' },
|
|
@@ -27,9 +27,6 @@
|
|
|
27
27
|
>
|
|
28
28
|
<template v-if="slots.default" #default><slot /></template>
|
|
29
29
|
<!-- The main button's icon slots, with its states. -->
|
|
30
|
-
<template v-if="slots.icon" #icon="scope"
|
|
31
|
-
><slot name="icon" v-bind="scope"
|
|
32
|
-
/></template>
|
|
33
30
|
<template v-if="slots['prepend:icon']" #prepend:icon="scope"
|
|
34
31
|
><slot name="prepend:icon" v-bind="scope"
|
|
35
32
|
/></template>
|
|
@@ -68,18 +65,21 @@
|
|
|
68
65
|
menu button, not a toggle: no v-model, so no aria-pressed beside the
|
|
69
66
|
activator's aria-expanded, which alone paints it open (f397). -->
|
|
70
67
|
<BbButton
|
|
71
|
-
:aria-label="toggleLabel"
|
|
72
68
|
class="bb-dropdown-button__toggle"
|
|
73
69
|
disable-auto-loading
|
|
74
70
|
:disabled="disabled"
|
|
75
71
|
group
|
|
76
|
-
|
|
72
|
+
icon-only
|
|
77
73
|
interactive-while-loading
|
|
78
74
|
:loading="menuLoading"
|
|
75
|
+
:prepend:icon="toggleIcon"
|
|
79
76
|
:pt="toggleButtonPt()"
|
|
80
77
|
:size="button.size"
|
|
78
|
+
:text="toggleLabel"
|
|
81
79
|
:variant="button.variant"
|
|
82
80
|
v-bind="props"
|
|
81
|
+
@vue:mounted="toggleShown = true"
|
|
82
|
+
@vue:unmounted="toggleShown = false"
|
|
83
83
|
/>
|
|
84
84
|
</template>
|
|
85
85
|
|
|
@@ -96,10 +96,11 @@
|
|
|
96
96
|
|
|
97
97
|
<script setup lang="ts">
|
|
98
98
|
import type { FallthroughAttrs } from '@/types/fallthrough';
|
|
99
|
-
import { computed, ref, useAttrs, useTemplateRef } from 'vue';
|
|
99
|
+
import { computed, onMounted, ref, useAttrs, useTemplateRef } from 'vue';
|
|
100
100
|
import BbButton from '../BbButton/BbButton.vue';
|
|
101
101
|
import { useLinkState } from '../BbBaseButton/useLinkState';
|
|
102
102
|
import BbDropdown from '../BbDropdown/BbDropdown.vue';
|
|
103
|
+
import { hasVisibleRow } from '../BbDropdown/normalizeGroups';
|
|
103
104
|
import { BB_BUTTON_PT } from '../BbButton/types';
|
|
104
105
|
import { BB_DROPDOWN_PT } from '../BbDropdown/types';
|
|
105
106
|
import { BUTTON_VARIANTS } from '@/types/ButtonVariant';
|
|
@@ -180,7 +181,6 @@ const OWN_SLOTS = new Set([
|
|
|
180
181
|
'activator',
|
|
181
182
|
'default',
|
|
182
183
|
'dropdown',
|
|
183
|
-
'icon',
|
|
184
184
|
'prepend:icon',
|
|
185
185
|
'append:icon',
|
|
186
186
|
]);
|
|
@@ -196,7 +196,20 @@ const menuItems = () => props.items ?? [];
|
|
|
196
196
|
* companion) keeps the split. A function, like `forwardedSlots`: the slots
|
|
197
197
|
* object is not reactive.
|
|
198
198
|
*/
|
|
199
|
-
|
|
199
|
+
// Items that are all `hidden` are no menu either: the row-level
|
|
200
|
+
// filter lives in the dropdown, this only asks whether a row survives it.
|
|
201
|
+
const hasMenu = () => hasVisibleRow(menuItems()) || !!slots.dropdown;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* The main button joins the toggle while the toggle is there. The menu drops
|
|
205
|
+
* it when no row is left visible, also once a fetched group resolves all
|
|
206
|
+
* hidden, which only the dropdown knows: read off the toggle itself.
|
|
207
|
+
* Until mount (and on the server) the static answer stands.
|
|
208
|
+
*/
|
|
209
|
+
const toggleShown = ref(false);
|
|
210
|
+
const mounted = ref(false);
|
|
211
|
+
onMounted(() => (mounted.value = true));
|
|
212
|
+
const grouped = () => hasMenu() && (!mounted.value || toggleShown.value);
|
|
200
213
|
|
|
201
214
|
/**
|
|
202
215
|
* The props that are the menu's or the whole control's; every other declared
|
|
@@ -809,11 +822,9 @@ export type BbDropdownButtonSlots = {
|
|
|
809
822
|
*/
|
|
810
823
|
default?: () => any;
|
|
811
824
|
/**
|
|
812
|
-
* The main button's icon, replacing
|
|
813
|
-
*
|
|
825
|
+
* The main button's leading icon, replacing `prepend:icon` (the one
|
|
826
|
+
* `icon-only` shows); inside its `icon` part, with its states.
|
|
814
827
|
*/
|
|
815
|
-
icon?: (props: BbButtonIconSlotProps) => any;
|
|
816
|
-
/** The main button's leading icon, replacing `prepend:icon`. */
|
|
817
828
|
'prepend:icon'?: (props: BbButtonIconSlotProps) => any;
|
|
818
829
|
/** The main button's trailing icon, replacing `append:icon`. */
|
|
819
830
|
'append:icon'?: (props: BbButtonIconSlotProps) => any;
|
|
@@ -296,6 +296,13 @@ type DropdownEntryBase = {
|
|
|
296
296
|
* group (the check is), or when an append slot fills the region.
|
|
297
297
|
*/
|
|
298
298
|
'append:icon'?: IconType;
|
|
299
|
+
/**
|
|
300
|
+
* Leaves the entry out: not rendered, not reachable by keyboard or
|
|
301
|
+
* search. A row takes its submenu with it, a group all its rows; a group
|
|
302
|
+
* left with no visible row drops with its divider and label. A selected
|
|
303
|
+
* value stays in the model.
|
|
304
|
+
*/
|
|
305
|
+
hidden?: boolean;
|
|
299
306
|
/**
|
|
300
307
|
* Your own data for this entry, carried untouched to its slots (as
|
|
301
308
|
* `item.meta`) and to per-item `pt` functions. The dropdown never reads it
|
|
@@ -362,7 +369,7 @@ export type BbDropdownItemProps<T = any> = ItemProps<T, DropdownItemFields>;
|
|
|
362
369
|
*/
|
|
363
370
|
type SubmenuExclusive =
|
|
364
371
|
| {
|
|
365
|
-
items:
|
|
372
|
+
items: ItemEntry[];
|
|
366
373
|
/** A submenu row opens its submenu; it cannot also run an action. */
|
|
367
374
|
onClick?: never;
|
|
368
375
|
/** A submenu row opens its submenu; it cannot also navigate. */
|
|
@@ -378,6 +385,8 @@ export type InternalItem = Omit<
|
|
|
378
385
|
> &
|
|
379
386
|
SubmenuExclusive &
|
|
380
387
|
DropdownEntryBase & {
|
|
388
|
+
/** Rows have no search box (a group has); declared so a group's `searchable` discriminates. */
|
|
389
|
+
searchable?: never;
|
|
381
390
|
/** The row's text. */
|
|
382
391
|
label: string;
|
|
383
392
|
/**
|
|
@@ -439,27 +448,32 @@ export type InternalItem = Omit<
|
|
|
439
448
|
* when its latest load FAILED (`'failed'`: the footer under whatever rows a
|
|
440
449
|
* `stash` keeps listed). Rendered as a non-interactive row that
|
|
441
450
|
* shows `label` or, when provided, the dropdown's `loading` / `empty` slot.
|
|
442
|
-
*
|
|
451
|
+
*
|
|
452
|
+
* @internal Set by `BbDropdownGroup`.
|
|
443
453
|
*/
|
|
444
454
|
placeholder?: 'loading' | 'empty' | 'failed';
|
|
445
455
|
/**
|
|
446
456
|
* On a `'failed'` placeholder: what the group's `items` load rejected
|
|
447
|
-
* with
|
|
448
|
-
*
|
|
457
|
+
* with, handed to the `empty` slot as `error`.
|
|
458
|
+
*
|
|
459
|
+
* @internal Set by the pipeline resolver.
|
|
449
460
|
*/
|
|
450
461
|
error?: unknown;
|
|
451
462
|
/**
|
|
452
463
|
* Marks a row built by the pipeline resolver from a fetched item. Its
|
|
453
464
|
* `selectable` predicate already ran against the RAW item there, so
|
|
454
465
|
* `normalizeGroups` must not run it again against this row object.
|
|
455
|
-
*
|
|
466
|
+
*
|
|
467
|
+
* @internal
|
|
456
468
|
*/
|
|
457
469
|
fetched?: true;
|
|
458
470
|
/**
|
|
459
471
|
* Optional slot token used to resolve per-item named slots. Primarily set
|
|
460
472
|
* by the pipeline resolver so slot names can be derived from the resolved
|
|
461
473
|
* `itemValue` (readable), while `rowKey` remains the hash-based selection
|
|
462
|
-
* id.
|
|
474
|
+
* id.
|
|
475
|
+
*
|
|
476
|
+
* @internal
|
|
463
477
|
*/
|
|
464
478
|
slotKey?: string;
|
|
465
479
|
};
|
|
@@ -490,16 +504,24 @@ export type InternalItem = Omit<
|
|
|
490
504
|
*
|
|
491
505
|
* A provider signals a failure by THROWING, never by returning `[]`: the
|
|
492
506
|
* rows are cleared, nothing is pruned, and the `empty` placeholder shows
|
|
493
|
-
* `failedText` with the error. Zero-argument providers keep working.
|
|
494
|
-
*
|
|
507
|
+
* `failedText` with the error. Zero-argument providers keep working. An
|
|
508
|
+
* unannotated getter reads its context typed (`query` a string on a
|
|
509
|
+
* `searchable` group); a provider shared with other components is annotated
|
|
510
|
+
* `BbDropdownGroupItemsContext`.
|
|
495
511
|
*/
|
|
496
|
-
export type DropdownGroupItemsGetter =
|
|
512
|
+
export type DropdownGroupItemsGetter = PlainGetter | SearchGetter;
|
|
513
|
+
|
|
514
|
+
/** A group without a search box: no `query` arrives. */
|
|
515
|
+
type PlainGetter = (
|
|
516
|
+
context: BbDropdownGroupItemsContext
|
|
497
517
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- a fetched group's rows are the API's records: the dropdown is not generic, so their type cannot reach the accessors
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
518
|
+
) => any[] | Promise<any[]>;
|
|
519
|
+
|
|
520
|
+
/** A `searchable` group: `query` always arrives, `''` until typed. */
|
|
521
|
+
type SearchGetter = (
|
|
522
|
+
context: BbDropdownGroupItemsContext & { query: string }
|
|
523
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- a fetched group's rows are the API's records: the dropdown is not generic, so their type cannot reach the accessors
|
|
524
|
+
) => any[] | Promise<any[]>;
|
|
503
525
|
|
|
504
526
|
export type InternalGroup = DropdownEntryBase & {
|
|
505
527
|
/**
|
|
@@ -539,23 +561,9 @@ export type InternalGroup = DropdownEntryBase & {
|
|
|
539
561
|
*/
|
|
540
562
|
group?: true;
|
|
541
563
|
/**
|
|
542
|
-
*
|
|
543
|
-
*
|
|
544
|
-
*
|
|
545
|
-
* `({ reason, modelValue, signal }) => Item[] | Promise<Item[]>` (plus
|
|
546
|
-
* `query` when the group is `searchable`; see {@link DropdownGroupItemsGetter})
|
|
547
|
-
* and pair it with `itemText`/`itemValue`. A `<BbDropdownGroup :id v-model>`
|
|
548
|
-
* companion resolves such a group and surfaces the selected `itemValue`(s)
|
|
549
|
-
* through `v-model`.
|
|
550
|
-
*/
|
|
551
|
-
items:
|
|
552
|
-
| Array<InternalItem | InternalItem[]>
|
|
553
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- a fetched group's raw records, before normalisation (see `itemText`)
|
|
554
|
-
| any[]
|
|
555
|
-
| DropdownGroupItemsGetter;
|
|
556
|
-
/**
|
|
557
|
-
* Pipeline groups only. Path/getter producing each item's display text
|
|
558
|
-
* (a primitive item is its own text; a getter still maps it).
|
|
564
|
+
* Pipeline groups only. Path/getter producing each item's display text.
|
|
565
|
+
* A string or number row needs none, fetched or written: it is its own
|
|
566
|
+
* text and value (a getter here still maps a fetched one).
|
|
559
567
|
*
|
|
560
568
|
* Unset: own `label`, else `text` (`{ label, value }` needs no accessor).
|
|
561
569
|
*
|
|
@@ -652,17 +660,6 @@ export type InternalGroup = DropdownEntryBase & {
|
|
|
652
660
|
* @defaultValue `'interaction'`
|
|
653
661
|
*/
|
|
654
662
|
prefill?: boolean | 'interaction';
|
|
655
|
-
/**
|
|
656
|
-
* Renders a search field at the top of THIS group (so, inside its submenu when
|
|
657
|
-
* the group is one), scoped to this group alone — the nested "category ›
|
|
658
|
-
* searchable options" pattern. Typing narrows this group's rows by
|
|
659
|
-
* the ranked search (see `filterBy`) and, for an async group, passes
|
|
660
|
-
* the typed text to its getter as the context's `query` (a user search arrives
|
|
661
|
-
* with `reason: 'search'`, as on `BbSelect`; see
|
|
662
|
-
* `BbDropdownGroupItemsContext`). Each searchable group owns its own query,
|
|
663
|
-
* independent of its siblings.
|
|
664
|
-
*/
|
|
665
|
-
searchable?: boolean;
|
|
666
663
|
/** Placeholder for this group's search field. Defaults to the localized label. */
|
|
667
664
|
searchPlaceholder?: string;
|
|
668
665
|
/**
|
|
@@ -719,7 +716,65 @@ export type InternalGroup = DropdownEntryBase & {
|
|
|
719
716
|
* category, yet still wants a label for chips.
|
|
720
717
|
*/
|
|
721
718
|
hideLabel?: boolean;
|
|
722
|
-
};
|
|
719
|
+
} & GroupSource;
|
|
720
|
+
|
|
721
|
+
// `searchable` picks the getter's context: a searchable group's getter always
|
|
722
|
+
// gets `query`, any other group's none. Each side has one signature, so an
|
|
723
|
+
// unannotated getter reads its context typed (a union of the two did not).
|
|
724
|
+
type GroupSource =
|
|
725
|
+
| {
|
|
726
|
+
/**
|
|
727
|
+
* Renders a search field at the top of THIS group (so, inside its submenu when
|
|
728
|
+
* the group is one), scoped to this group alone — the nested "category ›
|
|
729
|
+
* searchable options" pattern. Typing narrows this group's rows by
|
|
730
|
+
* the ranked search (see `filterBy`) and, for an async group, passes
|
|
731
|
+
* the typed text to its getter as the context's `query` (a user search arrives
|
|
732
|
+
* with `reason: 'search'`, as on `BbSelect`; see
|
|
733
|
+
* `BbDropdownGroupItemsContext`). Each searchable group owns its own query,
|
|
734
|
+
* independent of its siblings.
|
|
735
|
+
*/
|
|
736
|
+
searchable: true;
|
|
737
|
+
/**
|
|
738
|
+
* Items of the group. Plain arrays are flattened.
|
|
739
|
+
*
|
|
740
|
+
* For a **pipeline group**, pass raw objects (`any[]`) or an (async) getter
|
|
741
|
+
* `({ reason, modelValue, signal }) => Item[] | Promise<Item[]>` (plus
|
|
742
|
+
* `query` when the group is `searchable`; see {@link DropdownGroupItemsGetter})
|
|
743
|
+
* and pair it with `itemText`/`itemValue`. A `<BbDropdownGroup :id v-model>`
|
|
744
|
+
* companion resolves such a group and surfaces the selected `itemValue`(s)
|
|
745
|
+
* through `v-model`.
|
|
746
|
+
*/
|
|
747
|
+
items: GroupRows | SearchGetter;
|
|
748
|
+
}
|
|
749
|
+
| {
|
|
750
|
+
/**
|
|
751
|
+
* Renders a search field at the top of THIS group (so, inside its submenu when
|
|
752
|
+
* the group is one), scoped to this group alone — the nested "category ›
|
|
753
|
+
* searchable options" pattern. Typing narrows this group's rows by
|
|
754
|
+
* the ranked search (see `filterBy`) and, for an async group, passes
|
|
755
|
+
* the typed text to its getter as the context's `query` (a user search arrives
|
|
756
|
+
* with `reason: 'search'`, as on `BbSelect`; see
|
|
757
|
+
* `BbDropdownGroupItemsContext`). Each searchable group owns its own query,
|
|
758
|
+
* independent of its siblings.
|
|
759
|
+
*/
|
|
760
|
+
searchable?: false;
|
|
761
|
+
/**
|
|
762
|
+
* Items of the group. Plain arrays are flattened.
|
|
763
|
+
*
|
|
764
|
+
* For a **pipeline group**, pass raw objects (`any[]`) or an (async) getter
|
|
765
|
+
* `({ reason, modelValue, signal }) => Item[] | Promise<Item[]>` (plus
|
|
766
|
+
* `query` when the group is `searchable`; see {@link DropdownGroupItemsGetter})
|
|
767
|
+
* and pair it with `itemText`/`itemValue`. A `<BbDropdownGroup :id v-model>`
|
|
768
|
+
* companion resolves such a group and surfaces the selected `itemValue`(s)
|
|
769
|
+
* through `v-model`.
|
|
770
|
+
*/
|
|
771
|
+
items: GroupRows | PlainGetter;
|
|
772
|
+
};
|
|
773
|
+
|
|
774
|
+
type GroupRows =
|
|
775
|
+
| Array<InternalItem | InternalItem[]>
|
|
776
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- a fetched group's raw records, before normalisation (see `itemText`)
|
|
777
|
+
| any[];
|
|
723
778
|
|
|
724
779
|
/**
|
|
725
780
|
* A group's items as a raw array, or `[]` when the items are still an
|
|
@@ -732,6 +787,17 @@ export const groupItemsAsArray = (
|
|
|
732
787
|
): Array<InternalItem | InternalItem[]> =>
|
|
733
788
|
Array.isArray(items) ? (items as Array<InternalItem | InternalItem[]>) : [];
|
|
734
789
|
|
|
790
|
+
/**
|
|
791
|
+
* A string or number row: its own text and value (`'Google'` reads "Google"
|
|
792
|
+
* and picks `'Google'`), loose, in a section, in a group's `items` or in a
|
|
793
|
+
* submenu's `items`. It declares `searchable` like every entry, so a group
|
|
794
|
+
* literal beside it still picks its plain or searchable getter.
|
|
795
|
+
*/
|
|
796
|
+
export type PrimitiveRow = (string | number) & { searchable?: never };
|
|
797
|
+
|
|
798
|
+
/** One entry of an `items` array: an {@link Item} or a {@link PrimitiveRow}. */
|
|
799
|
+
export type ItemEntry = Item | PrimitiveRow;
|
|
800
|
+
|
|
735
801
|
/**
|
|
736
802
|
* Items accepted by the dropdown. Entries can be:
|
|
737
803
|
* - a single {@link InternalItem};
|
|
@@ -740,7 +806,12 @@ export const groupItemsAsArray = (
|
|
|
740
806
|
*
|
|
741
807
|
* The shapes can be mixed, e.g. `[item, [item, item], { id, label, items }]`.
|
|
742
808
|
*/
|
|
743
|
-
export type Item =
|
|
809
|
+
export type Item =
|
|
810
|
+
| InternalItem
|
|
811
|
+
| InternalGroup
|
|
812
|
+
// The `searchable` guard lets an unwritten `searchable` pick a group's
|
|
813
|
+
// plain getter: every member of the union has to declare the property.
|
|
814
|
+
| (ItemEntry[] & { searchable?: never });
|
|
744
815
|
|
|
745
816
|
/** Unwraps the item type out of the (possibly nested) {@link Items} shape. */
|
|
746
817
|
export type FlatItem<T> = T extends Array<infer U> ? U : T;
|
|
@@ -771,7 +842,17 @@ export const selectablePredicateOf = (
|
|
|
771
842
|
): ((item: any) => boolean) | undefined =>
|
|
772
843
|
typeof entry.selectable === 'function' ? entry.selectable : undefined;
|
|
773
844
|
|
|
774
|
-
|
|
845
|
+
/** A string or number row: its own text and value (normalizeGroups maps it). */
|
|
846
|
+
export const isPrimitiveRow = (
|
|
847
|
+
entry: ItemEntry | InternalItem | InternalItem[]
|
|
848
|
+
): entry is PrimitiveRow =>
|
|
849
|
+
typeof entry === 'string' || typeof entry === 'number';
|
|
850
|
+
|
|
851
|
+
// A primitive row (`'Google'`, `3`) is its own text and value: never a group,
|
|
852
|
+
// and `in` throws on it, so the object check comes first.
|
|
853
|
+
export const isGroup = (entry: ItemEntry): entry is InternalGroup =>
|
|
854
|
+
typeof entry === 'object' &&
|
|
855
|
+
entry !== null &&
|
|
775
856
|
!Array.isArray(entry) &&
|
|
776
857
|
((entry as InternalGroup).group === true ||
|
|
777
858
|
'selectable' in entry ||
|
|
@@ -1116,7 +1197,13 @@ export type BbDropdownProps = BbDropdownPtProps & {
|
|
|
1116
1197
|
*
|
|
1117
1198
|
* @defaultValue `[]`
|
|
1118
1199
|
*/
|
|
1119
|
-
items: Item
|
|
1200
|
+
items: Array<Item | PrimitiveRow>;
|
|
1201
|
+
/**
|
|
1202
|
+
* Keeps the trigger when no row is visible (by default it is hidden):
|
|
1203
|
+
* inert, no popup ARIA, `empty` in the activator slot. A `contextMenu`
|
|
1204
|
+
* trigger always stays.
|
|
1205
|
+
*/
|
|
1206
|
+
keepActivator?: boolean;
|
|
1120
1207
|
/**
|
|
1121
1208
|
* Default placeholder text shown while a pipeline group's async items load.
|
|
1122
1209
|
* A group's own `loadingText` overrides this; both fall back to the localized
|
|
@@ -1155,9 +1242,8 @@ export type BbDropdownProps = BbDropdownPtProps & {
|
|
|
1155
1242
|
*/
|
|
1156
1243
|
padding?: number;
|
|
1157
1244
|
/**
|
|
1158
|
-
* Position
|
|
1159
|
-
*
|
|
1160
|
-
* (No arrow is drawn either way — arrows are tooltip-only in v3.)
|
|
1245
|
+
* Position relative to the activator; `'cursor'` anchors at the
|
|
1246
|
+
* mouse/touch point. No arrow (tooltips only).
|
|
1161
1247
|
*
|
|
1162
1248
|
* @defaultValue `'bottom'`
|
|
1163
1249
|
*/
|
|
@@ -1171,8 +1257,8 @@ export type BbDropdownProps = BbDropdownPtProps & {
|
|
|
1171
1257
|
queryDebounceTime?: number;
|
|
1172
1258
|
/**
|
|
1173
1259
|
* The open / close transition in milliseconds. Menus take the fast one
|
|
1174
|
-
* (150), not the popovers' medium 250: a menu is
|
|
1175
|
-
*
|
|
1260
|
+
* (150), not the popovers' medium 250: a menu is picked from and gone, so
|
|
1261
|
+
* it answers faster than a panel you read or edit in.
|
|
1176
1262
|
*
|
|
1177
1263
|
* @defaultValue `150`
|
|
1178
1264
|
*/
|
|
@@ -1206,8 +1292,7 @@ export type BbDropdownEvents = {
|
|
|
1206
1292
|
/**
|
|
1207
1293
|
* The user selected a row in a selectable group, at the click — also when a
|
|
1208
1294
|
* controlled companion's app then refuses the value. The payload is the
|
|
1209
|
-
* row's value (its `item-value` for pipeline groups, else its `value`)
|
|
1210
|
-
* symmetric with `BbTable`'s `item:selected`.
|
|
1295
|
+
* row's value (its `item-value` for pipeline groups, else its `value`).
|
|
1211
1296
|
*/
|
|
1212
1297
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- the row's resolved value, whatever a fetched group's `item-value` returns: the dropdown is not generic, and `unknown` would reject a handler annotated `(id: number)`
|
|
1213
1298
|
(e: 'item:selected', value: any): void;
|
|
@@ -1230,6 +1315,8 @@ export type BbDropdownActivatorProps = {
|
|
|
1230
1315
|
export type BbDropdownActivatorSlotProps = {
|
|
1231
1316
|
/** Whether the dropdown is globally disabled. */
|
|
1232
1317
|
disabled?: boolean;
|
|
1318
|
+
/** No row is visible: the trigger is inert. */
|
|
1319
|
+
empty: boolean;
|
|
1233
1320
|
/**
|
|
1234
1321
|
* Whether any item's async `onClick` is currently in flight. Use to reflect a
|
|
1235
1322
|
* global busy state on the trigger.
|
|
@@ -1383,9 +1470,8 @@ export type BbDropdownSlots = {
|
|
|
1383
1470
|
*/
|
|
1384
1471
|
activator?: (props: BbDropdownActivatorSlotProps) => any;
|
|
1385
1472
|
/**
|
|
1386
|
-
*
|
|
1387
|
-
*
|
|
1388
|
-
* divider — for a title or a filter field.
|
|
1473
|
+
* Pinned above the rows, outside their scroll, with a divider — for a
|
|
1474
|
+
* title or a filter field.
|
|
1389
1475
|
*/
|
|
1390
1476
|
header?: (props: BbDropdownEdgeSlotProps) => any;
|
|
1391
1477
|
/**
|
|
@@ -1400,9 +1486,8 @@ export type BbDropdownSlots = {
|
|
|
1400
1486
|
*/
|
|
1401
1487
|
'item:append'?: (props: BbDropdownItemSlotProps) => any;
|
|
1402
1488
|
/**
|
|
1403
|
-
*
|
|
1404
|
-
*
|
|
1405
|
-
* divider — for action buttons.
|
|
1489
|
+
* Pinned below the rows, outside their scroll, with a divider — for
|
|
1490
|
+
* action buttons.
|
|
1406
1491
|
*/
|
|
1407
1492
|
footer?: (props: BbDropdownEdgeSlotProps) => any;
|
|
1408
1493
|
} & Record<string, (props: BbDropdownItemSlotProps) => any>;
|
|
@@ -2341,7 +2426,7 @@ export type BbDropdownGroupEvents = {
|
|
|
2341
2426
|
/* Same chevron_right asset the submenu rows use, pointed back:
|
|
2342
2427
|
toward the inline start, which is already where it points in
|
|
2343
2428
|
rtl. */
|
|
2344
|
-
.bb-
|
|
2429
|
+
.bb-button__prepend-icon {
|
|
2345
2430
|
transform: rotate(180deg);
|
|
2346
2431
|
|
|
2347
2432
|
&:dir(rtl) {
|