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
|
@@ -22,6 +22,13 @@ type DropdownEntryBase = {
|
|
|
22
22
|
* group (the check is), or when an append slot fills the region.
|
|
23
23
|
*/
|
|
24
24
|
'append:icon'?: IconType;
|
|
25
|
+
/**
|
|
26
|
+
* Leaves the entry out: not rendered, not reachable by keyboard or
|
|
27
|
+
* search. A row takes its submenu with it, a group all its rows; a group
|
|
28
|
+
* left with no visible row drops with its divider and label. A selected
|
|
29
|
+
* value stays in the model.
|
|
30
|
+
*/
|
|
31
|
+
hidden?: boolean;
|
|
25
32
|
/**
|
|
26
33
|
* Your own data for this entry, carried untouched to its slots (as
|
|
27
34
|
* `item.meta`) and to per-item `pt` functions. The dropdown never reads it
|
|
@@ -77,7 +84,7 @@ export type BbDropdownItemProps<T = any> = ItemProps<T, DropdownItemFields>;
|
|
|
77
84
|
* discriminates `group`/`selectable`/`multiple` a few lines below.
|
|
78
85
|
*/
|
|
79
86
|
type SubmenuExclusive = {
|
|
80
|
-
items:
|
|
87
|
+
items: ItemEntry[];
|
|
81
88
|
/** A submenu row opens its submenu; it cannot also run an action. */
|
|
82
89
|
onClick?: never;
|
|
83
90
|
/** A submenu row opens its submenu; it cannot also navigate. */
|
|
@@ -88,6 +95,8 @@ type SubmenuExclusive = {
|
|
|
88
95
|
items?: undefined;
|
|
89
96
|
};
|
|
90
97
|
export type InternalItem = Omit<BbBaseButtonProps, 'block' | 'tag' | 'type' | 'text'> & SubmenuExclusive & DropdownEntryBase & {
|
|
98
|
+
/** Rows have no search box (a group has); declared so a group's `searchable` discriminates. */
|
|
99
|
+
searchable?: never;
|
|
91
100
|
/** The row's text. */
|
|
92
101
|
label: string;
|
|
93
102
|
/**
|
|
@@ -148,27 +157,32 @@ export type InternalItem = Omit<BbBaseButtonProps, 'block' | 'tag' | 'type' | 't
|
|
|
148
157
|
* when its latest load FAILED (`'failed'`: the footer under whatever rows a
|
|
149
158
|
* `stash` keeps listed). Rendered as a non-interactive row that
|
|
150
159
|
* shows `label` or, when provided, the dropdown's `loading` / `empty` slot.
|
|
151
|
-
*
|
|
160
|
+
*
|
|
161
|
+
* @internal Set by `BbDropdownGroup`.
|
|
152
162
|
*/
|
|
153
163
|
placeholder?: 'loading' | 'empty' | 'failed';
|
|
154
164
|
/**
|
|
155
165
|
* On a `'failed'` placeholder: what the group's `items` load rejected
|
|
156
|
-
* with
|
|
157
|
-
*
|
|
166
|
+
* with, handed to the `empty` slot as `error`.
|
|
167
|
+
*
|
|
168
|
+
* @internal Set by the pipeline resolver.
|
|
158
169
|
*/
|
|
159
170
|
error?: unknown;
|
|
160
171
|
/**
|
|
161
172
|
* Marks a row built by the pipeline resolver from a fetched item. Its
|
|
162
173
|
* `selectable` predicate already ran against the RAW item there, so
|
|
163
174
|
* `normalizeGroups` must not run it again against this row object.
|
|
164
|
-
*
|
|
175
|
+
*
|
|
176
|
+
* @internal
|
|
165
177
|
*/
|
|
166
178
|
fetched?: true;
|
|
167
179
|
/**
|
|
168
180
|
* Optional slot token used to resolve per-item named slots. Primarily set
|
|
169
181
|
* by the pipeline resolver so slot names can be derived from the resolved
|
|
170
182
|
* `itemValue` (readable), while `rowKey` remains the hash-based selection
|
|
171
|
-
* id.
|
|
183
|
+
* id.
|
|
184
|
+
*
|
|
185
|
+
* @internal
|
|
172
186
|
*/
|
|
173
187
|
slotKey?: string;
|
|
174
188
|
};
|
|
@@ -198,12 +212,18 @@ export type InternalItem = Omit<BbBaseButtonProps, 'block' | 'tag' | 'type' | 't
|
|
|
198
212
|
*
|
|
199
213
|
* A provider signals a failure by THROWING, never by returning `[]`: the
|
|
200
214
|
* rows are cleared, nothing is pruned, and the `empty` placeholder shows
|
|
201
|
-
* `failedText` with the error. Zero-argument providers keep working.
|
|
202
|
-
*
|
|
215
|
+
* `failedText` with the error. Zero-argument providers keep working. An
|
|
216
|
+
* unannotated getter reads its context typed (`query` a string on a
|
|
217
|
+
* `searchable` group); a provider shared with other components is annotated
|
|
218
|
+
* `BbDropdownGroupItemsContext`.
|
|
203
219
|
*/
|
|
204
|
-
export type DropdownGroupItemsGetter =
|
|
220
|
+
export type DropdownGroupItemsGetter = PlainGetter | SearchGetter;
|
|
221
|
+
/** A group without a search box: no `query` arrives. */
|
|
222
|
+
type PlainGetter = (context: BbDropdownGroupItemsContext) => any[] | Promise<any[]>;
|
|
223
|
+
/** A `searchable` group: `query` always arrives, `''` until typed. */
|
|
224
|
+
type SearchGetter = (context: BbDropdownGroupItemsContext & {
|
|
205
225
|
query: string;
|
|
206
|
-
}) => any[] | Promise<any[]
|
|
226
|
+
}) => any[] | Promise<any[]>;
|
|
207
227
|
export type InternalGroup = DropdownEntryBase & {
|
|
208
228
|
/**
|
|
209
229
|
* The group's identity: REQUIRED on a `selectable` group (its picks are
|
|
@@ -242,19 +262,9 @@ export type InternalGroup = DropdownEntryBase & {
|
|
|
242
262
|
*/
|
|
243
263
|
group?: true;
|
|
244
264
|
/**
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
* `({ reason, modelValue, signal }) => Item[] | Promise<Item[]>` (plus
|
|
249
|
-
* `query` when the group is `searchable`; see {@link DropdownGroupItemsGetter})
|
|
250
|
-
* and pair it with `itemText`/`itemValue`. A `<BbDropdownGroup :id v-model>`
|
|
251
|
-
* companion resolves such a group and surfaces the selected `itemValue`(s)
|
|
252
|
-
* through `v-model`.
|
|
253
|
-
*/
|
|
254
|
-
items: Array<InternalItem | InternalItem[]> | any[] | DropdownGroupItemsGetter;
|
|
255
|
-
/**
|
|
256
|
-
* Pipeline groups only. Path/getter producing each item's display text
|
|
257
|
-
* (a primitive item is its own text; a getter still maps it).
|
|
265
|
+
* Pipeline groups only. Path/getter producing each item's display text.
|
|
266
|
+
* A string or number row needs none, fetched or written: it is its own
|
|
267
|
+
* text and value (a getter here still maps a fetched one).
|
|
258
268
|
*
|
|
259
269
|
* Unset: own `label`, else `text` (`{ label, value }` needs no accessor).
|
|
260
270
|
*
|
|
@@ -349,17 +359,6 @@ export type InternalGroup = DropdownEntryBase & {
|
|
|
349
359
|
* @defaultValue `'interaction'`
|
|
350
360
|
*/
|
|
351
361
|
prefill?: boolean | 'interaction';
|
|
352
|
-
/**
|
|
353
|
-
* Renders a search field at the top of THIS group (so, inside its submenu when
|
|
354
|
-
* the group is one), scoped to this group alone — the nested "category ›
|
|
355
|
-
* searchable options" pattern. Typing narrows this group's rows by
|
|
356
|
-
* the ranked search (see `filterBy`) and, for an async group, passes
|
|
357
|
-
* the typed text to its getter as the context's `query` (a user search arrives
|
|
358
|
-
* with `reason: 'search'`, as on `BbSelect`; see
|
|
359
|
-
* `BbDropdownGroupItemsContext`). Each searchable group owns its own query,
|
|
360
|
-
* independent of its siblings.
|
|
361
|
-
*/
|
|
362
|
-
searchable?: boolean;
|
|
363
362
|
/** Placeholder for this group's search field. Defaults to the localized label. */
|
|
364
363
|
searchPlaceholder?: string;
|
|
365
364
|
/**
|
|
@@ -414,7 +413,55 @@ export type InternalGroup = DropdownEntryBase & {
|
|
|
414
413
|
* category, yet still wants a label for chips.
|
|
415
414
|
*/
|
|
416
415
|
hideLabel?: boolean;
|
|
416
|
+
} & GroupSource;
|
|
417
|
+
type GroupSource = {
|
|
418
|
+
/**
|
|
419
|
+
* Renders a search field at the top of THIS group (so, inside its submenu when
|
|
420
|
+
* the group is one), scoped to this group alone — the nested "category ›
|
|
421
|
+
* searchable options" pattern. Typing narrows this group's rows by
|
|
422
|
+
* the ranked search (see `filterBy`) and, for an async group, passes
|
|
423
|
+
* the typed text to its getter as the context's `query` (a user search arrives
|
|
424
|
+
* with `reason: 'search'`, as on `BbSelect`; see
|
|
425
|
+
* `BbDropdownGroupItemsContext`). Each searchable group owns its own query,
|
|
426
|
+
* independent of its siblings.
|
|
427
|
+
*/
|
|
428
|
+
searchable: true;
|
|
429
|
+
/**
|
|
430
|
+
* Items of the group. Plain arrays are flattened.
|
|
431
|
+
*
|
|
432
|
+
* For a **pipeline group**, pass raw objects (`any[]`) or an (async) getter
|
|
433
|
+
* `({ reason, modelValue, signal }) => Item[] | Promise<Item[]>` (plus
|
|
434
|
+
* `query` when the group is `searchable`; see {@link DropdownGroupItemsGetter})
|
|
435
|
+
* and pair it with `itemText`/`itemValue`. A `<BbDropdownGroup :id v-model>`
|
|
436
|
+
* companion resolves such a group and surfaces the selected `itemValue`(s)
|
|
437
|
+
* through `v-model`.
|
|
438
|
+
*/
|
|
439
|
+
items: GroupRows | SearchGetter;
|
|
440
|
+
} | {
|
|
441
|
+
/**
|
|
442
|
+
* Renders a search field at the top of THIS group (so, inside its submenu when
|
|
443
|
+
* the group is one), scoped to this group alone — the nested "category ›
|
|
444
|
+
* searchable options" pattern. Typing narrows this group's rows by
|
|
445
|
+
* the ranked search (see `filterBy`) and, for an async group, passes
|
|
446
|
+
* the typed text to its getter as the context's `query` (a user search arrives
|
|
447
|
+
* with `reason: 'search'`, as on `BbSelect`; see
|
|
448
|
+
* `BbDropdownGroupItemsContext`). Each searchable group owns its own query,
|
|
449
|
+
* independent of its siblings.
|
|
450
|
+
*/
|
|
451
|
+
searchable?: false;
|
|
452
|
+
/**
|
|
453
|
+
* Items of the group. Plain arrays are flattened.
|
|
454
|
+
*
|
|
455
|
+
* For a **pipeline group**, pass raw objects (`any[]`) or an (async) getter
|
|
456
|
+
* `({ reason, modelValue, signal }) => Item[] | Promise<Item[]>` (plus
|
|
457
|
+
* `query` when the group is `searchable`; see {@link DropdownGroupItemsGetter})
|
|
458
|
+
* and pair it with `itemText`/`itemValue`. A `<BbDropdownGroup :id v-model>`
|
|
459
|
+
* companion resolves such a group and surfaces the selected `itemValue`(s)
|
|
460
|
+
* through `v-model`.
|
|
461
|
+
*/
|
|
462
|
+
items: GroupRows | PlainGetter;
|
|
417
463
|
};
|
|
464
|
+
type GroupRows = Array<InternalItem | InternalItem[]> | any[];
|
|
418
465
|
/**
|
|
419
466
|
* A group's items as a raw array, or `[]` when the items are still an
|
|
420
467
|
* unresolved async getter. Used by the synchronous traversal/normalization,
|
|
@@ -422,6 +469,17 @@ export type InternalGroup = DropdownEntryBase & {
|
|
|
422
469
|
* the `<BbDropdownGroup>` companion before they reach here).
|
|
423
470
|
*/
|
|
424
471
|
export declare const groupItemsAsArray: (items: InternalGroup["items"] | undefined) => Array<InternalItem | InternalItem[]>;
|
|
472
|
+
/**
|
|
473
|
+
* A string or number row: its own text and value (`'Google'` reads "Google"
|
|
474
|
+
* and picks `'Google'`), loose, in a section, in a group's `items` or in a
|
|
475
|
+
* submenu's `items`. It declares `searchable` like every entry, so a group
|
|
476
|
+
* literal beside it still picks its plain or searchable getter.
|
|
477
|
+
*/
|
|
478
|
+
export type PrimitiveRow = (string | number) & {
|
|
479
|
+
searchable?: never;
|
|
480
|
+
};
|
|
481
|
+
/** One entry of an `items` array: an {@link Item} or a {@link PrimitiveRow}. */
|
|
482
|
+
export type ItemEntry = Item | PrimitiveRow;
|
|
425
483
|
/**
|
|
426
484
|
* Items accepted by the dropdown. Entries can be:
|
|
427
485
|
* - a single {@link InternalItem};
|
|
@@ -430,7 +488,9 @@ export declare const groupItemsAsArray: (items: InternalGroup["items"] | undefin
|
|
|
430
488
|
*
|
|
431
489
|
* The shapes can be mixed, e.g. `[item, [item, item], { id, label, items }]`.
|
|
432
490
|
*/
|
|
433
|
-
export type Item = InternalItem | InternalGroup |
|
|
491
|
+
export type Item = InternalItem | InternalGroup | (ItemEntry[] & {
|
|
492
|
+
searchable?: never;
|
|
493
|
+
});
|
|
434
494
|
/** Unwraps the item type out of the (possibly nested) {@link Items} shape. */
|
|
435
495
|
export type FlatItem<T> = T extends Array<infer U> ? U : T;
|
|
436
496
|
/**
|
|
@@ -450,7 +510,9 @@ export type FlatItem<T> = T extends Array<infer U> ? U : T;
|
|
|
450
510
|
export declare const isSelectableGroup: (entry: Pick<InternalGroup, "selectable" | "multiple">) => boolean;
|
|
451
511
|
/** The group's per-row `selectable` predicate, when it passed one. */
|
|
452
512
|
export declare const selectablePredicateOf: (entry: Pick<InternalGroup, "selectable">) => ((item: any) => boolean) | undefined;
|
|
453
|
-
|
|
513
|
+
/** A string or number row: its own text and value (normalizeGroups maps it). */
|
|
514
|
+
export declare const isPrimitiveRow: (entry: ItemEntry | InternalItem | InternalItem[]) => entry is PrimitiveRow;
|
|
515
|
+
export declare const isGroup: (entry: ItemEntry) => entry is InternalGroup;
|
|
454
516
|
/**
|
|
455
517
|
* A group after normalization: anonymous arrays and loose items become
|
|
456
518
|
* non-selectable groups; {@link InternalGroup} objects keep their metadata. Selection
|
|
@@ -688,7 +750,13 @@ export type BbDropdownProps = BbDropdownPtProps & {
|
|
|
688
750
|
*
|
|
689
751
|
* @defaultValue `[]`
|
|
690
752
|
*/
|
|
691
|
-
items: Item
|
|
753
|
+
items: Array<Item | PrimitiveRow>;
|
|
754
|
+
/**
|
|
755
|
+
* Keeps the trigger when no row is visible (by default it is hidden):
|
|
756
|
+
* inert, no popup ARIA, `empty` in the activator slot. A `contextMenu`
|
|
757
|
+
* trigger always stays.
|
|
758
|
+
*/
|
|
759
|
+
keepActivator?: boolean;
|
|
692
760
|
/**
|
|
693
761
|
* Default placeholder text shown while a pipeline group's async items load.
|
|
694
762
|
* A group's own `loadingText` overrides this; both fall back to the localized
|
|
@@ -727,9 +795,8 @@ export type BbDropdownProps = BbDropdownPtProps & {
|
|
|
727
795
|
*/
|
|
728
796
|
padding?: number;
|
|
729
797
|
/**
|
|
730
|
-
* Position
|
|
731
|
-
*
|
|
732
|
-
* (No arrow is drawn either way — arrows are tooltip-only in v3.)
|
|
798
|
+
* Position relative to the activator; `'cursor'` anchors at the
|
|
799
|
+
* mouse/touch point. No arrow (tooltips only).
|
|
733
800
|
*
|
|
734
801
|
* @defaultValue `'bottom'`
|
|
735
802
|
*/
|
|
@@ -743,8 +810,8 @@ export type BbDropdownProps = BbDropdownPtProps & {
|
|
|
743
810
|
queryDebounceTime?: number;
|
|
744
811
|
/**
|
|
745
812
|
* The open / close transition in milliseconds. Menus take the fast one
|
|
746
|
-
* (150), not the popovers' medium 250: a menu is
|
|
747
|
-
*
|
|
813
|
+
* (150), not the popovers' medium 250: a menu is picked from and gone, so
|
|
814
|
+
* it answers faster than a panel you read or edit in.
|
|
748
815
|
*
|
|
749
816
|
* @defaultValue `150`
|
|
750
817
|
*/
|
|
@@ -777,8 +844,7 @@ export type BbDropdownEvents = {
|
|
|
777
844
|
/**
|
|
778
845
|
* The user selected a row in a selectable group, at the click — also when a
|
|
779
846
|
* controlled companion's app then refuses the value. The payload is the
|
|
780
|
-
* row's value (its `item-value` for pipeline groups, else its `value`)
|
|
781
|
-
* symmetric with `BbTable`'s `item:selected`.
|
|
847
|
+
* row's value (its `item-value` for pipeline groups, else its `value`).
|
|
782
848
|
*/
|
|
783
849
|
(e: 'item:selected', value: any): void;
|
|
784
850
|
/**
|
|
@@ -797,6 +863,8 @@ export type BbDropdownActivatorProps = {
|
|
|
797
863
|
export type BbDropdownActivatorSlotProps = {
|
|
798
864
|
/** Whether the dropdown is globally disabled. */
|
|
799
865
|
disabled?: boolean;
|
|
866
|
+
/** No row is visible: the trigger is inert. */
|
|
867
|
+
empty: boolean;
|
|
800
868
|
/**
|
|
801
869
|
* Whether any item's async `onClick` is currently in flight. Use to reflect a
|
|
802
870
|
* global busy state on the trigger.
|
|
@@ -944,9 +1012,8 @@ export type BbDropdownSlots = {
|
|
|
944
1012
|
*/
|
|
945
1013
|
activator?: (props: BbDropdownActivatorSlotProps) => any;
|
|
946
1014
|
/**
|
|
947
|
-
*
|
|
948
|
-
*
|
|
949
|
-
* divider — for a title or a filter field.
|
|
1015
|
+
* Pinned above the rows, outside their scroll, with a divider — for a
|
|
1016
|
+
* title or a filter field.
|
|
950
1017
|
*/
|
|
951
1018
|
header?: (props: BbDropdownEdgeSlotProps) => any;
|
|
952
1019
|
/**
|
|
@@ -961,9 +1028,8 @@ export type BbDropdownSlots = {
|
|
|
961
1028
|
*/
|
|
962
1029
|
'item:append'?: (props: BbDropdownItemSlotProps) => any;
|
|
963
1030
|
/**
|
|
964
|
-
*
|
|
965
|
-
*
|
|
966
|
-
* divider — for action buttons.
|
|
1031
|
+
* Pinned below the rows, outside their scroll, with a divider — for
|
|
1032
|
+
* action buttons.
|
|
967
1033
|
*/
|
|
968
1034
|
footer?: (props: BbDropdownEdgeSlotProps) => any;
|
|
969
1035
|
} & Record<string, (props: BbDropdownItemSlotProps) => any>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DROPDOWN_ITEM_VARIANTS as e } from "../../types/DropdownItemVariant.js";
|
|
2
2
|
// src/components/BbDropdown/types.ts
|
|
3
|
-
var t = (e) => Array.isArray(e) ? e : [], n = (e) => e.selectable == null ? e.multiple != null : !!e.selectable, r = (e) => typeof e.selectable == "function" ? e.selectable : void 0, i = (e) => !Array.isArray(e) && (e.group === !0 || "selectable" in e || "multiple" in e || typeof e.items == "function"),
|
|
3
|
+
var t = (e) => Array.isArray(e) ? e : [], n = (e) => e.selectable == null ? e.multiple != null : !!e.selectable, r = (e) => typeof e.selectable == "function" ? e.selectable : void 0, i = (e) => typeof e == "string" || typeof e == "number", a = (e) => typeof e == "object" && !!e && !Array.isArray(e) && (e.group === !0 || "selectable" in e || "multiple" in e || typeof e.items == "function"), o = {
|
|
4
4
|
parts: [
|
|
5
5
|
"root",
|
|
6
6
|
"panel",
|
|
@@ -68,4 +68,4 @@ var t = (e) => Array.isArray(e) ? e : [], n = (e) => e.selectable == null ? e.mu
|
|
|
68
68
|
]
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
|
-
export {
|
|
71
|
+
export { o as BB_DROPDOWN_PT, t as groupItemsAsArray, a as isGroup, i as isPrimitiveRow, n as isSelectableGroup, r as selectablePredicateOf };
|
package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import e from "../BbButton/BbButton.vue.js";
|
|
2
2
|
import { useLinkState as t } from "../BbBaseButton/useLinkState.js";
|
|
3
3
|
import n from "../BbDropdown/BbDropdown.vue.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
4
|
+
import { hasVisibleRow as r } from "../BbDropdown/normalizeGroups.js";
|
|
5
|
+
import { BB_BUTTON_PT as i } from "../BbButton/types.js";
|
|
6
|
+
import { BB_DROPDOWN_PT as a } from "../BbDropdown/types.js";
|
|
7
|
+
import { BUTTON_VARIANTS as o } from "../../types/ButtonVariant.js";
|
|
8
|
+
import { DROPDOWN_ITEM_VARIANTS as s } from "../../types/DropdownItemVariant.js";
|
|
9
|
+
import { useLocale as c } from "../../composables/useLocale.js";
|
|
10
|
+
import { removedPropsFor as l } from "../../deprecation/removedProps.js";
|
|
11
|
+
import { warnRemovedAttrs as u } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
11
12
|
import "../../assets/svgs/chevron_down.svg_raw.js";
|
|
12
|
-
import { BB_DROPDOWN_BUTTON_PT as
|
|
13
|
-
import { registeredVariantNames as
|
|
14
|
-
import { useConfigDefaults as
|
|
15
|
-
import { computed as
|
|
13
|
+
import { BB_DROPDOWN_BUTTON_PT as d } from "./types.js";
|
|
14
|
+
import { registeredVariantNames as f, usePassthrough as p, variantPt as m } from "../../composables/usePassthrough.js";
|
|
15
|
+
import { useConfigDefaults as h } from "../../composables/useConfigDefaults.js";
|
|
16
|
+
import { computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createSlots as b, createVNode as x, defineComponent as S, guardReactiveProps as C, mergeProps as w, normalizeProps as T, onMounted as E, openBlock as D, ref as O, renderList as k, renderSlot as A, unref as j, useAttrs as M, useSlots as N, useTemplateRef as ee, withCtx as P } from "vue";
|
|
16
17
|
// src/components/BbDropdownButton/BbDropdownButton.vue?vue&type=script&setup=true&lang.ts
|
|
17
|
-
var
|
|
18
|
-
mixins: [
|
|
18
|
+
var F = /*@__PURE__*/ S({
|
|
19
|
+
mixins: [m(d)],
|
|
19
20
|
inheritAttrs: !1,
|
|
20
21
|
__name: "BbDropdownButton",
|
|
21
22
|
props: {
|
|
@@ -200,7 +201,7 @@ var N = /*@__PURE__*/ x({
|
|
|
200
201
|
href: {},
|
|
201
202
|
download: { type: [Boolean, String] },
|
|
202
203
|
external: { type: Boolean },
|
|
203
|
-
|
|
204
|
+
iconOnly: { type: [Boolean, Object] },
|
|
204
205
|
loading: { type: Boolean },
|
|
205
206
|
method: {},
|
|
206
207
|
onBefore: {},
|
|
@@ -262,18 +263,19 @@ var N = /*@__PURE__*/ x({
|
|
|
262
263
|
"item:selected",
|
|
263
264
|
"item:unselected"
|
|
264
265
|
],
|
|
265
|
-
setup(
|
|
266
|
-
let
|
|
266
|
+
setup(m, { emit: S }) {
|
|
267
|
+
let F = m, I = S, L = N(), R = h("BbDropdownButton", F, { block: !1 }), z = h("BbButton", F, {
|
|
267
268
|
size: "md",
|
|
268
269
|
variant: "primary"
|
|
269
|
-
}),
|
|
270
|
+
}), B = /* @__PURE__ */ new Set([
|
|
270
271
|
"activator",
|
|
271
272
|
"default",
|
|
272
273
|
"dropdown",
|
|
273
|
-
"icon",
|
|
274
274
|
"prepend:icon",
|
|
275
275
|
"append:icon"
|
|
276
|
-
]),
|
|
276
|
+
]), V = () => Object.keys(L).filter((e) => !B.has(e)), H = () => F.items ?? [], U = () => r(H()) || !!L.dropdown, W = O(!1), G = O(!1);
|
|
277
|
+
E(() => G.value = !0);
|
|
278
|
+
let K = () => U() && (!G.value || W.value), q = /* @__PURE__ */ new Set([
|
|
277
279
|
"adaptive",
|
|
278
280
|
"closeOnSelect",
|
|
279
281
|
"compact",
|
|
@@ -289,139 +291,138 @@ var N = /*@__PURE__*/ x({
|
|
|
289
291
|
"toggle:icon",
|
|
290
292
|
"block",
|
|
291
293
|
"pt"
|
|
292
|
-
]),
|
|
294
|
+
]), J = () => Object.fromEntries(Object.entries(F).filter(([e, t]) => t !== void 0 && !q.has(e) && !e.startsWith("pt:"))), Y = /^(on[A-Z].*|aria-.*|name|value|autofocus|title|formaction|formenctype|formmethod|formnovalidate|formtarget)$/, X = () => {
|
|
293
295
|
let e = {}, t = {};
|
|
294
|
-
for (let [n, r] of Object.entries(
|
|
296
|
+
for (let [n, r] of Object.entries(Q.rootAttrs)) (Y.test(n) ? e : t)[n] = r;
|
|
295
297
|
return {
|
|
296
298
|
main: e,
|
|
297
299
|
root: t
|
|
298
300
|
};
|
|
299
|
-
},
|
|
301
|
+
}, Z = t(F), Q = p({
|
|
300
302
|
component: "BbDropdownButton",
|
|
301
|
-
attrs:
|
|
302
|
-
props:
|
|
303
|
-
parts:
|
|
304
|
-
states:
|
|
303
|
+
attrs: M(),
|
|
304
|
+
props: F,
|
|
305
|
+
parts: d.parts,
|
|
306
|
+
states: d.states,
|
|
305
307
|
active: {
|
|
306
|
-
loading: () => !!
|
|
307
|
-
disabled: () => !!
|
|
308
|
+
loading: () => !!F.loading,
|
|
309
|
+
disabled: () => !!F.disabled,
|
|
308
310
|
open: () => $.value,
|
|
309
|
-
activeLink: () =>
|
|
310
|
-
exactActiveLink: () =>
|
|
311
|
+
activeLink: () => Z.value.activeLink,
|
|
312
|
+
exactActiveLink: () => Z.value.exactActiveLink
|
|
311
313
|
},
|
|
312
314
|
variant: [{
|
|
313
|
-
...
|
|
314
|
-
current: () =>
|
|
315
|
-
},
|
|
316
|
-
}),
|
|
317
|
-
...
|
|
315
|
+
...d.variant[0],
|
|
316
|
+
current: () => z.variant
|
|
317
|
+
}, d.variant[1]]
|
|
318
|
+
}), te = [...i.states, ...f(o, "buttonVariants")], ne = [...a.states, ...f(s, "dropdownItemVariants")], re = ["activeLink", "exactActiveLink"], ie = () => Q.forward({ toggle: "root" }, ["disabled", ...f(o, "buttonVariants")]), ae = () => ({
|
|
319
|
+
...Q.forward([
|
|
318
320
|
"panel",
|
|
319
321
|
"sheet",
|
|
320
322
|
"header",
|
|
321
323
|
"footer",
|
|
322
324
|
"input",
|
|
323
325
|
"submenu"
|
|
324
|
-
],
|
|
325
|
-
...
|
|
326
|
+
], a.states.filter((e) => e !== "disabled" && !re.includes(e))),
|
|
327
|
+
...Q.forward([
|
|
326
328
|
"item",
|
|
327
329
|
"itemText",
|
|
328
330
|
"itemIcon",
|
|
329
331
|
"itemDescription",
|
|
330
332
|
"check"
|
|
331
|
-
],
|
|
333
|
+
], ne)
|
|
332
334
|
});
|
|
333
|
-
process.env.NODE_ENV !== "production" &&
|
|
334
|
-
let
|
|
335
|
-
$.value = !0,
|
|
336
|
-
},
|
|
337
|
-
$.value = !1,
|
|
338
|
-
},
|
|
339
|
-
return (t, r) => (
|
|
335
|
+
process.env.NODE_ENV !== "production" && u("BbDropdownButton", l("BbDropdownButton"));
|
|
336
|
+
let oe = g(() => F["toggle:icon"] ?? "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M6 9l6 6l6 -6\" />\n</svg>\n"), { t: se } = c(), ce = ee("root-el"), $ = O(!1), le = () => {
|
|
337
|
+
$.value = !0, I("show");
|
|
338
|
+
}, ue = () => {
|
|
339
|
+
$.value = !1, I("hide");
|
|
340
|
+
}, de = g(() => se("dropdownButton.open").value);
|
|
341
|
+
return (t, r) => (D(), y("span", w({
|
|
340
342
|
ref: "root-el",
|
|
341
|
-
class: ["bb-dropdown-button", { "bb-dropdown-button--block":
|
|
342
|
-
},
|
|
343
|
-
...
|
|
344
|
-
...
|
|
343
|
+
class: ["bb-dropdown-button", { "bb-dropdown-button--block": j(R).block }]
|
|
344
|
+
}, X().root), [x(e, w({
|
|
345
|
+
...J(),
|
|
346
|
+
...X().main
|
|
345
347
|
}, {
|
|
346
348
|
class: "bb-dropdown-button__main",
|
|
347
|
-
group:
|
|
348
|
-
pt:
|
|
349
|
+
group: K(),
|
|
350
|
+
pt: j(Q).forward({
|
|
349
351
|
main: "root",
|
|
350
352
|
icon: "icon",
|
|
351
353
|
spinner: "spinner",
|
|
352
354
|
text: "text"
|
|
353
|
-
},
|
|
354
|
-
}),
|
|
355
|
-
|
|
355
|
+
}, te)
|
|
356
|
+
}), b({ _: 2 }, [
|
|
357
|
+
L.default ? {
|
|
356
358
|
name: "default",
|
|
357
|
-
fn:
|
|
359
|
+
fn: P(() => [A(t.$slots, "default")]),
|
|
358
360
|
key: "0"
|
|
359
361
|
} : void 0,
|
|
360
|
-
|
|
361
|
-
name: "icon",
|
|
362
|
-
fn: M((e) => [O(t.$slots, "icon", w(S(e)))]),
|
|
363
|
-
key: "1"
|
|
364
|
-
} : void 0,
|
|
365
|
-
F["prepend:icon"] ? {
|
|
362
|
+
L["prepend:icon"] ? {
|
|
366
363
|
name: "prepend:icon",
|
|
367
|
-
fn:
|
|
368
|
-
key: "
|
|
364
|
+
fn: P((e) => [A(t.$slots, "prepend:icon", T(C(e)))]),
|
|
365
|
+
key: "1"
|
|
369
366
|
} : void 0,
|
|
370
|
-
|
|
367
|
+
L["append:icon"] ? {
|
|
371
368
|
name: "append:icon",
|
|
372
|
-
fn:
|
|
373
|
-
key: "
|
|
369
|
+
fn: P((e) => [A(t.$slots, "append:icon", T(C(e)))]),
|
|
370
|
+
key: "2"
|
|
374
371
|
} : void 0
|
|
375
|
-
]), 1040, ["group", "pt"]),
|
|
372
|
+
]), 1040, ["group", "pt"]), U() ? (D(), _(n, {
|
|
376
373
|
key: 0,
|
|
377
|
-
id:
|
|
378
|
-
adaptive:
|
|
379
|
-
anchor:
|
|
380
|
-
"close-on-select":
|
|
381
|
-
compact:
|
|
382
|
-
disabled:
|
|
383
|
-
eager:
|
|
384
|
-
items:
|
|
385
|
-
"off-canvas-props":
|
|
386
|
-
offset:
|
|
387
|
-
padding:
|
|
388
|
-
placement:
|
|
389
|
-
pt:
|
|
390
|
-
"transition-duration":
|
|
391
|
-
width:
|
|
392
|
-
onHidden: r[
|
|
393
|
-
onHide:
|
|
394
|
-
"onItem:selected": r[
|
|
395
|
-
"onItem:unselected": r[
|
|
396
|
-
onShow:
|
|
397
|
-
onShown: r[
|
|
398
|
-
},
|
|
399
|
-
activator:
|
|
400
|
-
"aria-label": oe.value,
|
|
374
|
+
id: m.id,
|
|
375
|
+
adaptive: m.adaptive,
|
|
376
|
+
anchor: ce.value,
|
|
377
|
+
"close-on-select": m.closeOnSelect,
|
|
378
|
+
compact: m.compact,
|
|
379
|
+
disabled: m.disabled,
|
|
380
|
+
eager: m.eager,
|
|
381
|
+
items: H(),
|
|
382
|
+
"off-canvas-props": m.offCanvasProps,
|
|
383
|
+
offset: m.offset,
|
|
384
|
+
padding: m.padding,
|
|
385
|
+
placement: m.placement,
|
|
386
|
+
pt: ae(),
|
|
387
|
+
"transition-duration": m.transitionDuration,
|
|
388
|
+
width: m.width,
|
|
389
|
+
onHidden: r[2] ||= (e) => I("hidden"),
|
|
390
|
+
onHide: ue,
|
|
391
|
+
"onItem:selected": r[3] ||= (e) => I("item:selected", e),
|
|
392
|
+
"onItem:unselected": r[4] ||= (e) => I("item:unselected", e),
|
|
393
|
+
onShow: le,
|
|
394
|
+
onShown: r[5] ||= (e) => I("shown")
|
|
395
|
+
}, b({
|
|
396
|
+
activator: P(({ props: t, loading: n }) => [x(e, w({
|
|
401
397
|
class: "bb-dropdown-button__toggle",
|
|
402
398
|
"disable-auto-loading": "",
|
|
403
|
-
disabled:
|
|
399
|
+
disabled: m.disabled,
|
|
404
400
|
group: "",
|
|
405
|
-
icon:
|
|
401
|
+
"icon-only": "",
|
|
406
402
|
"interactive-while-loading": "",
|
|
407
403
|
loading: n,
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
404
|
+
"prepend:icon": oe.value,
|
|
405
|
+
pt: ie(),
|
|
406
|
+
size: j(z).size,
|
|
407
|
+
text: de.value,
|
|
408
|
+
variant: j(z).variant
|
|
409
|
+
}, t, {
|
|
410
|
+
onVnodeMounted: r[0] ||= (e) => W.value = !0,
|
|
411
|
+
onVnodeUnmounted: r[1] ||= (e) => W.value = !1
|
|
412
|
+
}), null, 16, [
|
|
413
413
|
"disabled",
|
|
414
|
-
"icon",
|
|
415
414
|
"loading",
|
|
415
|
+
"prepend:icon",
|
|
416
416
|
"pt",
|
|
417
417
|
"size",
|
|
418
|
+
"text",
|
|
418
419
|
"variant"
|
|
419
420
|
])]),
|
|
420
|
-
default:
|
|
421
|
+
default: P(() => [A(t.$slots, "dropdown")]),
|
|
421
422
|
_: 2
|
|
422
|
-
}, [
|
|
423
|
+
}, [k(V(), (e) => ({
|
|
423
424
|
name: e,
|
|
424
|
-
fn:
|
|
425
|
+
fn: P((n) => [A(t.$slots, e, T(C(n)))])
|
|
425
426
|
}))]), 1032, [
|
|
426
427
|
"id",
|
|
427
428
|
"adaptive",
|
|
@@ -438,7 +439,7 @@ var N = /*@__PURE__*/ x({
|
|
|
438
439
|
"pt",
|
|
439
440
|
"transition-duration",
|
|
440
441
|
"width"
|
|
441
|
-
])) :
|
|
442
|
+
])) : v("", !0)], 16));
|
|
442
443
|
}
|
|
443
444
|
});
|
|
444
|
-
export {
|
|
445
|
+
export { F as default };
|
|
@@ -258,11 +258,9 @@ export type BbDropdownButtonSlots = {
|
|
|
258
258
|
*/
|
|
259
259
|
default?: () => any;
|
|
260
260
|
/**
|
|
261
|
-
* The main button's icon, replacing
|
|
262
|
-
*
|
|
261
|
+
* The main button's leading icon, replacing `prepend:icon` (the one
|
|
262
|
+
* `icon-only` shows); inside its `icon` part, with its states.
|
|
263
263
|
*/
|
|
264
|
-
icon?: (props: BbButtonIconSlotProps) => any;
|
|
265
|
-
/** The main button's leading icon, replacing `prepend:icon`. */
|
|
266
264
|
'prepend:icon'?: (props: BbButtonIconSlotProps) => any;
|
|
267
265
|
/** The main button's trailing icon, replacing `append:icon`. */
|
|
268
266
|
'append:icon'?: (props: BbButtonIconSlotProps) => any;
|