bitboss-ui 3.0.0-beta.2 → 3.0.0-beta.21
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 +72 -33
- package/dist/ai/BbAccordion.md +3 -3
- package/dist/ai/BbAlert.md +9 -5
- package/dist/ai/BbAsterisk.md +17 -0
- package/dist/ai/BbAvatar.md +12 -3
- package/dist/ai/BbBadge.md +15 -10
- package/dist/ai/BbBadgeButton.md +16 -16
- package/dist/ai/BbBaseButton.md +16 -16
- package/dist/ai/BbBaseCheckbox.md +8 -8
- package/dist/ai/BbBaseCheckboxGroup.md +13 -13
- package/dist/ai/BbBaseCheckboxIcon.md +26 -9
- package/dist/ai/BbBaseColorInput.md +11 -11
- package/dist/ai/BbBaseDatePicker.md +6 -6
- package/dist/ai/BbBaseDatePickerInput.md +15 -15
- package/dist/ai/BbBaseInputContainer.md +12 -12
- package/dist/ai/BbBaseNumberInput.md +8 -8
- package/dist/ai/BbBaseRadio.md +5 -5
- package/dist/ai/BbBaseRadioGroup.md +7 -7
- package/dist/ai/BbBaseRadioIcon.md +25 -9
- package/dist/ai/BbBaseRating.md +5 -5
- package/dist/ai/BbBaseSelect.md +22 -21
- package/dist/ai/BbBaseSlider.md +9 -9
- package/dist/ai/BbBaseSwitch.md +8 -8
- package/dist/ai/BbBaseSwitchGroup.md +13 -13
- package/dist/ai/BbBaseSwitchIcon.md +28 -10
- package/dist/ai/BbBaseTag.md +10 -10
- package/dist/ai/BbBaseTextInput.md +9 -9
- package/dist/ai/BbBaseTextarea.md +9 -9
- package/dist/ai/BbBaseTimePickerInput.md +13 -13
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +15 -15
- package/dist/ai/BbCheckbox.md +18 -17
- package/dist/ai/BbCheckboxGroup.md +15 -14
- package/dist/ai/BbCollapsible.md +11 -9
- package/dist/ai/BbColorInput.md +15 -15
- package/dist/ai/BbColorPalette.md +12 -6
- package/dist/ai/BbConfirm.md +12 -5
- package/dist/ai/BbDatePicker.md +13 -13
- package/dist/ai/BbDatePickerInput.md +20 -20
- package/dist/ai/BbDialog.md +78 -12
- package/dist/ai/BbDropdown.md +132 -22
- package/dist/ai/BbDropdownButton.md +12 -12
- package/dist/ai/BbDropdownGroup.md +1 -1
- package/dist/ai/BbDropzone.md +4 -4
- package/dist/ai/BbForm.md +49 -14
- package/dist/ai/BbIcon.md +6 -0
- package/dist/ai/BbIndicator.md +5 -5
- package/dist/ai/BbNumberInput.md +11 -11
- package/dist/ai/BbOffCanvas.md +90 -20
- package/dist/ai/BbPagination.md +3 -3
- package/dist/ai/BbPopover.md +32 -17
- package/dist/ai/BbProgress.md +7 -4
- package/dist/ai/BbRadio.md +16 -15
- package/dist/ai/BbRadioGroup.md +20 -17
- package/dist/ai/BbRating.md +11 -11
- package/dist/ai/BbSelect.md +138 -37
- package/dist/ai/BbSelectPopover.md +40 -41
- package/dist/ai/BbSlider.md +37 -22
- package/dist/ai/BbSmoothHeight.md +1 -1
- package/dist/ai/BbSwitch.md +25 -10
- package/dist/ai/BbSwitchGroup.md +17 -14
- package/dist/ai/BbTable.md +920 -109
- package/dist/ai/BbTabs.md +28 -14
- package/dist/ai/BbTabsList.md +1 -1
- package/dist/ai/BbTabsPanes.md +1 -1
- package/dist/ai/BbTabsRoot.md +10 -10
- package/dist/ai/BbTag.md +14 -14
- package/dist/ai/BbTextInput.md +16 -15
- package/dist/ai/BbTextarea.md +13 -13
- package/dist/ai/BbTimePicker.md +10 -10
- package/dist/ai/BbTimePickerInput.md +17 -17
- package/dist/ai/BbToast.md +1 -1
- package/dist/ai/BbToastPortal.md +1 -1
- package/dist/ai/BbTooltip.md +12 -10
- package/dist/ai/BbTree.md +1 -1
- package/dist/ai/ChipsBox.md +1 -1
- package/dist/ai/CommonInputWrapper.md +10 -10
- package/dist/ai/CommonPopover.md +6 -6
- package/dist/ai/FlatListBox.md +5 -5
- package/dist/ai/GroupedListBox.md +5 -5
- package/dist/ai/ListBox.md +4 -4
- package/dist/ai/OptionsContainer.md +4 -4
- package/dist/ai/changelog.json +128 -2
- package/dist/ai/components.json +917 -100
- package/dist/ai/composables/useBbConfig.md +72 -11
- package/dist/ai/composables/useConfirm.md +5 -3
- package/dist/ai/guides/ai-router.md +9 -4
- package/dist/ai/guides/component-picker.md +18 -18
- package/dist/ai/guides/design-language.md +14 -14
- package/dist/ai/guides/design-tokens.md +25 -18
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/icons-policy.md +11 -5
- package/dist/ai/guides/installation-and-plugin-setup.md +85 -23
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +30 -0
- package/dist/ai/guides/migration/components/bb-checkbox.md +37 -3
- package/dist/ai/guides/migration/components/bb-collapsible.md +5 -5
- package/dist/ai/guides/migration/components/bb-dialog.md +62 -34
- package/dist/ai/guides/migration/components/bb-offcanvas.md +29 -13
- package/dist/ai/guides/migration/components/bb-rating.md +8 -2
- package/dist/ai/guides/migration/components/bb-select.md +5 -2
- package/dist/ai/guides/migration/components/bb-table.md +560 -28
- package/dist/ai/guides/migration/components/bb-text-input.md +6 -6
- package/dist/ai/guides/migration/v2-to-v3.md +260 -89
- package/dist/ai/guides/ssr-prefill.md +120 -0
- package/dist/ai/index.md +10 -9
- package/dist/ai/recipes/inertia/approvals-inbox.md +0 -1
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +0 -1
- package/dist/ai/recipes/inertia/layout-scaffold.md +5 -1
- package/dist/ai/recipes/inertia/ownership-atlas.md +49 -29
- package/dist/ai/recipes/inertia/record-form.md +0 -1
- package/dist/ai/recipes/inertia/records-workspace.md +26 -8
- package/dist/ai/recipes/inertia/upload-center.md +0 -1
- package/dist/ai/recipes/nuxt/approvals-inbox.md +0 -1
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +0 -1
- package/dist/ai/recipes/nuxt/layout-scaffold.md +5 -1
- package/dist/ai/recipes/nuxt/record-form.md +0 -1
- package/dist/ai/recipes/nuxt/records-workspace.md +26 -8
- package/dist/ai/recipes/nuxt/upload-center.md +0 -1
- package/dist/ai/recipes/vue/approvals-inbox.md +0 -1
- package/dist/ai/recipes/vue/inline-edit-workspace.md +0 -1
- package/dist/ai/recipes/vue/layout-scaffold.md +5 -1
- package/dist/ai/recipes/vue/records-workspace.md +26 -8
- package/dist/ai/recipes/vue/upload-center.md +0 -1
- package/dist/ai/source/BbAlert.md +60 -2
- package/dist/ai/source/BbAvatar.md +3 -3
- package/dist/ai/source/BbBadge.md +60 -15
- package/dist/ai/source/BbBadgeButton.md +8 -2
- package/dist/ai/source/BbBaseButton.md +3 -1
- package/dist/ai/source/BbBaseCheckboxGroup.md +6 -2
- package/dist/ai/source/BbBaseDatePicker.md +3 -1
- package/dist/ai/source/BbBaseDatePickerInput.md +5 -1
- package/dist/ai/source/BbBaseInputContainer.md +52 -1
- package/dist/ai/source/BbBaseRadioGroup.md +4 -0
- package/dist/ai/source/BbBaseRating.md +3 -1
- package/dist/ai/source/BbBaseSelect.md +71 -16
- package/dist/ai/source/BbBaseSwitchGroup.md +4 -0
- package/dist/ai/source/BbBaseTimePickerInput.md +5 -1
- package/dist/ai/source/BbBreadcrumbs.md +31 -0
- package/dist/ai/source/BbButton.md +51 -24
- package/dist/ai/source/BbCheckbox.md +15 -1
- package/dist/ai/source/BbCheckboxGroup.md +2 -1
- package/dist/ai/source/BbCollapsible.md +7 -1
- package/dist/ai/source/BbColorInput.md +3 -4
- package/dist/ai/source/BbColorPalette.md +3 -4
- package/dist/ai/source/BbDatePicker.md +5 -1
- package/dist/ai/source/BbDatePickerInput.md +5 -1
- package/dist/ai/source/BbDialog.md +175 -19
- package/dist/ai/source/BbDropdown.md +376 -69
- package/dist/ai/source/BbDropdownGroup.md +330 -59
- package/dist/ai/source/BbForm.md +93 -5
- package/dist/ai/source/BbIcon.md +46 -36
- package/dist/ai/source/BbNumberInput.md +3 -4
- package/dist/ai/source/BbOffCanvas.md +474 -194
- package/dist/ai/source/BbPopover.md +24 -17
- package/dist/ai/source/BbProgress.md +2 -2
- package/dist/ai/source/BbRadio.md +15 -1
- package/dist/ai/source/BbRadioGroup.md +3 -1
- package/dist/ai/source/BbSelect.md +50 -2
- package/dist/ai/source/BbSelectPopover.md +171 -23
- package/dist/ai/source/BbSlider.md +3 -4
- package/dist/ai/source/BbSwitch.md +15 -1
- package/dist/ai/source/BbSwitchGroup.md +8 -5
- package/dist/ai/source/BbTable.md +5092 -1446
- package/dist/ai/source/BbTabs.md +6 -7
- package/dist/ai/source/BbTabsList.md +6 -7
- package/dist/ai/source/BbTabsPanes.md +6 -7
- package/dist/ai/source/BbTabsRoot.md +6 -7
- package/dist/ai/source/BbTag.md +3 -4
- package/dist/ai/source/BbTextInput.md +3 -4
- package/dist/ai/source/BbTextarea.md +3 -4
- package/dist/ai/source/BbTimePicker.md +4 -1
- package/dist/ai/source/BbTimePickerInput.md +5 -1
- package/dist/ai/source/BbToast.md +3 -1
- package/dist/ai/source/BbTooltip.md +5 -1
- package/dist/ai/source/CommonInputWrapper.md +4 -0
- package/dist/ai/source/CommonPopover.md +6 -0
- package/dist/ai/source/FlatListBox.md +11 -5
- package/dist/ai/source/GroupedListBox.md +7 -5
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/BbAlert/types.d.ts +10 -1
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -1
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +33 -33
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +22 -16
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +36 -15
- package/dist/components/BbBadge/badgeButtonContext.d.ts +21 -8
- package/dist/components/BbBadge/types.d.ts +8 -2
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +47 -47
- package/dist/components/BbBaseButton/RouterComponent.vue_vue_type_script_setup_true_lang.js +14 -14
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue_vue_type_script_setup_true_lang.js +30 -28
- package/dist/components/BbBaseCheckboxGroup/types.d.ts +2 -2
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue_vue_type_script_setup_true_lang.js +167 -167
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.d.ts +9 -9
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue_vue_type_script_setup_true_lang.js +78 -78
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue_vue_type_script_setup_true_lang.js +64 -64
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.d.ts +1 -1
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue_vue_type_script_setup_true_lang.js +138 -138
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue_vue_type_script_setup_true_lang.js +24 -22
- package/dist/components/BbBaseRating/BbBaseRating.vue_vue_type_script_setup_true_lang.js +40 -40
- package/dist/components/BbBaseSelect/BbBaseSelect.vue_vue_type_script_setup_true_lang.js +74 -65
- package/dist/components/BbBaseSelect/types.d.ts +22 -0
- package/dist/components/BbBaseSlider/BbBaseSlider.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue_vue_type_script_setup_true_lang.js +30 -28
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue.d.ts +1 -1
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue_vue_type_script_setup_true_lang.js +104 -104
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +35 -35
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +85 -81
- package/dist/components/BbCheckboxGroup/types.d.ts +2 -1
- package/dist/components/BbCollapsible/types.d.ts +7 -1
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +1 -1
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +18 -18
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -2
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +50 -50
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +100 -100
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +21 -21
- package/dist/components/BbDialog/BbDialog.vue.d.ts +1 -1
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +133 -107
- package/dist/components/BbDialog/types.d.ts +29 -2
- package/dist/components/BbDropdown/AdaptiveDropdown.vue.d.ts +2 -0
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +99 -100
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +2 -2
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +208 -201
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +225 -208
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +21 -21
- package/dist/components/BbDropdown/types.d.ts +20 -5
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +46 -46
- package/dist/components/BbIcon/iconCache.d.ts +33 -0
- package/dist/components/BbIcon/iconCache.js +17 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +15 -15
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +254 -208
- package/dist/components/BbOffCanvas/types.d.ts +30 -5
- package/dist/components/BbPagination/BbPagination.vue.d.ts +1 -1
- package/dist/components/BbPopover/BbPopover.vue.d.ts +2 -2
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +149 -146
- package/dist/components/BbPopover/types.d.ts +3 -2
- package/dist/components/BbRadioGroup/types.d.ts +3 -1
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +27 -23
- package/dist/components/BbSelect/types.d.ts +32 -0
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +221 -213
- package/dist/components/BbSlider/BbSlider.vue.d.ts +1 -1
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +20 -20
- package/dist/components/BbTable/BbTable.vue.d.ts +10 -4
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1433 -600
- package/dist/components/BbTable/BbTableDataRow.d.ts +162 -0
- package/dist/components/BbTable/BbTableDataRow.js +136 -0
- package/dist/components/BbTable/BbTableExpandRow.d.ts +73 -0
- package/dist/components/BbTable/BbTableExpandRow.js +52 -0
- package/dist/components/BbTable/types.d.ts +324 -111
- package/dist/components/BbTable/utils.d.ts +92 -4
- package/dist/components/BbTable/utils.js +71 -36
- package/dist/components/BbTabs/types.d.ts +0 -8
- package/dist/components/BbTag/BbTag.vue.d.ts +1 -1
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +18 -18
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +1 -1
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +18 -18
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +1 -1
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +54 -54
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +1 -1
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +80 -80
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +61 -61
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +13 -13
- package/dist/components/BbTooltip/types.d.ts +5 -1
- package/dist/components/ChipsBox/ChipsBox.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +83 -83
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +56 -56
- package/dist/composables/useBaseOptions.js +30 -20
- package/dist/composables/useBbConfig.d.ts +27 -6
- package/dist/composables/useBbConfig.js +8 -2
- package/dist/composables/useConfig.d.ts +59 -0
- package/dist/composables/useConfig.js +9 -0
- package/dist/composables/useItemsGetter.d.ts +11 -0
- package/dist/composables/useItemsGetter.js +44 -18
- package/dist/composables/useLocale.js +10 -7
- package/dist/composables/useMobile.js +5 -5
- package/dist/composables/usePrefill.d.ts +21 -2
- package/dist/composables/usePrefill.js +25 -19
- package/dist/composables/useSsrState.d.ts +20 -0
- package/dist/composables/useSsrState.js +13 -0
- package/dist/composables/useTableWidthContext.d.ts +24 -4
- package/dist/composables/useTableWidthContext.js +31 -28
- package/dist/composables/useToast.js +5 -5
- package/dist/deprecation/ai-deprecations.json.d.ts +121 -11
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/directives/bbDropdown.d.ts +15 -4
- package/dist/directives/bbDropdown.js +31 -9
- package/dist/directives/createPopoverDirective.d.ts +62 -0
- package/dist/directives/createPopoverDirective.js +63 -23
- package/dist/i18n/locales/cs.json +4 -1
- package/dist/i18n/locales/da.json +4 -1
- package/dist/i18n/locales/de.json +4 -1
- package/dist/i18n/locales/el.json +4 -1
- package/dist/i18n/locales/en.json +4 -1
- package/dist/i18n/locales/es.json +4 -1
- package/dist/i18n/locales/fi.json +4 -1
- package/dist/i18n/locales/fr.json +4 -1
- package/dist/i18n/locales/hu.json +4 -1
- package/dist/i18n/locales/it.json +4 -1
- package/dist/i18n/locales/ja.json +4 -1
- package/dist/i18n/locales/ko.json +4 -1
- package/dist/i18n/locales/nb.json +4 -1
- package/dist/i18n/locales/nl.json +4 -1
- package/dist/i18n/locales/pl.json +4 -1
- package/dist/i18n/locales/pt.json +4 -1
- package/dist/i18n/locales/ro.json +4 -1
- package/dist/i18n/locales/ru.json +4 -1
- package/dist/i18n/locales/sv.json +4 -1
- package/dist/i18n/locales/tr.json +4 -1
- package/dist/i18n/locales/uk.json +4 -1
- package/dist/i18n/locales/zh-cn.json +4 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.js +69 -67
- package/dist/llms-full.txt +3997 -1458
- package/dist/llms-medium.txt +140 -73
- package/dist/llms.txt +7 -6
- package/dist/locale-blueprint.json +4 -1
- package/dist/nuxt-auto-imports.d.ts +100 -0
- package/dist/nuxt-auto-imports.js +55 -0
- package/dist/nuxt-module.d.ts +22 -1
- package/dist/nuxt.js +22 -8
- package/dist/plugin.d.ts +10 -1
- package/dist/plugin.js +20 -19
- package/dist/runtime/nuxt-plugin.js +28 -21
- package/dist/styles.css +1 -1
- package/dist/utilities/misc/listboxMetrics.d.ts +3 -3
- package/dist/utilities/misc/listboxMetrics.js +2 -2
- package/dist/utilities/misc/ssrStateInjectionKey.d.ts +42 -0
- package/dist/utilities/misc/ssrStateInjectionKey.js +4 -0
- package/dist/validated/BbForm.vue_vue_type_script_setup_true_lang.js +45 -27
- package/dist/validated/BbSelect.vue.d.ts +2 -0
- package/dist/validated/BbSelect.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/validated/useValidatedField.js +25 -23
- package/dist/vite.js +7 -3
- package/llms.txt +8 -7
- package/package.json +2 -2
- package/scripts/lib/eslint-plugin.d.ts +19 -1
- package/scripts/lib/eslint-plugin.mjs +155 -14
- package/scripts/lib/html-attributes.mjs +91 -0
- package/scripts/lib/validate-bb-markup.mjs +59 -11
- package/dist/assets/svgs/sort.svg_raw.js +0 -4
- package/dist/components/BbBadge/BadgeAppendIcon.vue.d.ts +0 -3
- package/dist/components/BbBadge/BadgeAppendIcon.vue.js +0 -5
- package/dist/components/BbBadge/BadgeAppendIcon.vue_vue_type_script_setup_true_lang.js +0 -22
package/dist/ai/BbDropdown.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
- Safety level: **Consumer API**
|
|
6
6
|
- Group: **Overlay**
|
|
7
|
-
- Description: Displays contextual action menus and menu content.
|
|
7
|
+
- Description: Displays contextual action menus and menu content (includes the co-located BbDropdownGroup export, which is how a selectable group is bound).
|
|
8
8
|
- Usage rule: Prefer this component for consumer-facing implementations.
|
|
9
9
|
- Implementation source (only when the contract below is not enough): [source/BbDropdown.md](./source/BbDropdown.md)
|
|
10
10
|
|
|
@@ -85,7 +85,7 @@ yes (the `<BbConfirm>` host mounts once per app, e.g. in the root layout).
|
|
|
85
85
|
248 KB · <span data-last>{{ last }}</span>
|
|
86
86
|
</p>
|
|
87
87
|
</div>
|
|
88
|
-
<BbDropdown :items="items" placement="bottom-end"
|
|
88
|
+
<BbDropdown :items="items" placement="bottom-end">
|
|
89
89
|
<template #activator="{ props }">
|
|
90
90
|
<BbButton
|
|
91
91
|
v-bind="props"
|
|
@@ -204,7 +204,7 @@ selectable group the menu stays open instead, and the row itself carries
|
|
|
204
204
|
</div>
|
|
205
205
|
<!-- `adaptive` is pinned off so the demo behaves identically on any
|
|
206
206
|
viewport; leave it at the project default in real apps. -->
|
|
207
|
-
<BbDropdown :adaptive="false" :items="items"
|
|
207
|
+
<BbDropdown :adaptive="false" :items="items">
|
|
208
208
|
<template #activator="{ props, loading }">
|
|
209
209
|
<!-- The slot's `loading` flag is true while any item's async
|
|
210
210
|
`onClick` is in flight — even after the menu has closed. -->
|
|
@@ -271,7 +271,7 @@ nesting shallow (two levels is plenty).
|
|
|
271
271
|
class="flex max-w-xs items-center justify-between gap-2 rounded-[var(--bb-radius)] border p-2"
|
|
272
272
|
>
|
|
273
273
|
<span class="text-sm font-medium">Acme Studio</span>
|
|
274
|
-
<BbDropdown :items="items" placement="bottom-end"
|
|
274
|
+
<BbDropdown :items="items" placement="bottom-end">
|
|
275
275
|
<template #activator="{ props }">
|
|
276
276
|
<BbButton
|
|
277
277
|
v-bind="props"
|
|
@@ -362,7 +362,7 @@ must point at a _group_ (not a plain item, not a missing key).
|
|
|
362
362
|
<span class="pr-1 text-xs font-medium text-[color:var(--bb-text-muted)]"
|
|
363
363
|
>Invoices</span
|
|
364
364
|
>
|
|
365
|
-
<BbDropdown :adaptive="false" :items="items" :width="
|
|
365
|
+
<BbDropdown :adaptive="false" :items="items" :width="200">
|
|
366
366
|
<template #activator="{ props }">
|
|
367
367
|
<BbButton
|
|
368
368
|
v-bind="props"
|
|
@@ -429,10 +429,11 @@ The full grammar:
|
|
|
429
429
|
|
|
430
430
|
- `items: (prefill, modelValue) => raw[] | Promise<raw[]>` — called lazily on
|
|
431
431
|
the menu's **first open**, never on mount, and again whenever `dependencies`
|
|
432
|
-
change. `modelValue` is the group's current selection
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
432
|
+
change. `modelValue` is the group's current selection. A plain raw array also
|
|
433
|
+
works when you just need the mapping.
|
|
434
|
+
On a **`searchable`** group the signature gains a leading query argument —
|
|
435
|
+
`(query, prefill, modelValue)`, identical to `BbSelect`'s — which is why the
|
|
436
|
+
same provider drops into both.
|
|
436
437
|
- `itemText` / `itemValue` — a path string or getter producing each raw item's
|
|
437
438
|
label and value. `v-model` on the companion surfaces the selected value(s);
|
|
438
439
|
internally the selection key is a hash of the value. BbBaseButton props on the
|
|
@@ -543,7 +544,7 @@ a valid selection.
|
|
|
543
544
|
:adaptive="false"
|
|
544
545
|
:items="menu"
|
|
545
546
|
loading-text="Loading members…"
|
|
546
|
-
:width="
|
|
547
|
+
:width="200"
|
|
547
548
|
>
|
|
548
549
|
<template #activator="{ props, loading }">
|
|
549
550
|
<BbButton
|
|
@@ -637,6 +638,72 @@ const assigneeNames = computed(() =>
|
|
|
637
638
|
</script>
|
|
638
639
|
```
|
|
639
640
|
|
|
641
|
+
### Searchable groups
|
|
642
|
+
|
|
643
|
+
A group can render **its own search field**, scoped to itself alone — the
|
|
644
|
+
nested "category › searchable options" pattern. Set `searchable` on the group,
|
|
645
|
+
not on the dropdown: there is no dropdown-level search, and each searchable
|
|
646
|
+
group owns an independent query.
|
|
647
|
+
|
|
648
|
+
```vue
|
|
649
|
+
<BbDropdown
|
|
650
|
+
:items="[
|
|
651
|
+
{
|
|
652
|
+
id: 'assignee',
|
|
653
|
+
label: 'Assignee',
|
|
654
|
+
searchable: true,
|
|
655
|
+
searchPlaceholder: 'Find a teammate…',
|
|
656
|
+
selectable: true,
|
|
657
|
+
multiple: true,
|
|
658
|
+
stash: true,
|
|
659
|
+
prefill: false,
|
|
660
|
+
items: (query, prefill, modelValue) => api.users({ q: query }),
|
|
661
|
+
itemText: 'name',
|
|
662
|
+
itemValue: 'id',
|
|
663
|
+
},
|
|
664
|
+
]"
|
|
665
|
+
/>
|
|
666
|
+
```
|
|
667
|
+
|
|
668
|
+
What each knob does:
|
|
669
|
+
|
|
670
|
+
- **`searchable`** puts the field at the top of that group — inside its submenu
|
|
671
|
+
when the group is nested. Typing narrows the group's rows by case-insensitive
|
|
672
|
+
substring, and on an async group passes the query to the getter as the
|
|
673
|
+
**leading** argument: `(query, prefill, modelValue)`, the same shape
|
|
674
|
+
`BbSelect` uses, so one provider serves both.
|
|
675
|
+
- **`filterBy`** picks which raw fields the local substring match reads. Empty
|
|
676
|
+
(the default) matches the resolved display text.
|
|
677
|
+
- **`searchPlaceholder`** overrides the field's placeholder; it defaults to the
|
|
678
|
+
localized label.
|
|
679
|
+
- **`prefill: false`** means _search-first_ — nothing loads until the user
|
|
680
|
+
types, and the group shows a hint row until then. It **requires**
|
|
681
|
+
`searchable`, which is the one place the three-state `prefill` differs from a
|
|
682
|
+
plain menu group (`'interaction'`, the default, fetches when the group is
|
|
683
|
+
first reached; `true` fetches on mount).
|
|
684
|
+
- **`stash`** accumulates the items behind _selected_ keys so they stay
|
|
685
|
+
resolvable after the query changes. Without it, selecting in one search and
|
|
686
|
+
then searching for something else leaves the earlier selection unresolvable
|
|
687
|
+
and breaks the `v-model` round-trip. **Recommended for every `multiple`
|
|
688
|
+
searchable group.**
|
|
689
|
+
- **`maxHeight`** defaults to `280` (≈ 10 rows) on a searchable group **in the
|
|
690
|
+
flyout**, because a searched list should scroll rather than grow. The
|
|
691
|
+
adaptive sheet ignores that default (and any explicit cap): the off-canvas
|
|
692
|
+
body is the only scrollport, so a downward swipe on a row can dismiss the
|
|
693
|
+
sheet the same way a swipe on the handle does. Non-searchable flyout groups
|
|
694
|
+
are uncapped unless you set it.
|
|
695
|
+
|
|
696
|
+
Two knobs live on the **dropdown**, not the group, because they apply to every
|
|
697
|
+
searchable group in the menu:
|
|
698
|
+
|
|
699
|
+
- **`queryDebounceTime`** (default `300`) debounces the async re-fetch a
|
|
700
|
+
searchable group fires as the user types. Distinct from the per-group
|
|
701
|
+
`depsDebounceTime`, which debounces refetches caused by `dependencies`
|
|
702
|
+
changing.
|
|
703
|
+
- **`compact`** tightens the rows, search field included.
|
|
704
|
+
|
|
705
|
+
A searchable surface is a `role="dialog"`, not a `menu` — see Accessibility.
|
|
706
|
+
|
|
640
707
|
### Reading a dropdown from anywhere: `useBbDropdownContext`
|
|
641
708
|
|
|
642
709
|
Give the dropdown an explicit `id` and any component — no shared parent needed —
|
|
@@ -711,7 +778,7 @@ the edge slots, to replace one row's content use its key.
|
|
|
711
778
|
>
|
|
712
779
|
<!-- `adaptive` is pinned off so the demo behaves identically on any
|
|
713
780
|
viewport; leave it at the project default in real apps. -->
|
|
714
|
-
<BbDropdown :adaptive="false" :items="items"
|
|
781
|
+
<BbDropdown :adaptive="false" :items="items">
|
|
715
782
|
<template #activator="{ props }">
|
|
716
783
|
<BbButton
|
|
717
784
|
v-bind="props"
|
|
@@ -851,7 +918,6 @@ behaves exactly as with a click menu.
|
|
|
851
918
|
:items="items"
|
|
852
919
|
placement="cursor"
|
|
853
920
|
:trigger="['click', 'contextMenu']"
|
|
854
|
-
:width="200"
|
|
855
921
|
>
|
|
856
922
|
<template #activator="{ props }">
|
|
857
923
|
<BbButton
|
|
@@ -1008,6 +1074,46 @@ too, the same as it would to the slot's `props`; don't hand-write your own
|
|
|
1008
1074
|
</BbButton>
|
|
1009
1075
|
```
|
|
1010
1076
|
|
|
1077
|
+
### Density: `compact`
|
|
1078
|
+
|
|
1079
|
+
`compact` walks the same ladder `BbSelect` does, so a dense toolbar can hold a
|
|
1080
|
+
select and a menu that agree: flyout rows go 28px → 24px, sheet rows 44px →
|
|
1081
|
+
36px. The label does not shrink — density here is height, exactly as it is for a
|
|
1082
|
+
select.
|
|
1083
|
+
|
|
1084
|
+
The sheet stops at 36px and never follows the flyout down to 24px. A menu row is
|
|
1085
|
+
a touch target whose mis-tap fires the neighbouring **command**, where a
|
|
1086
|
+
mis-tapped option merely picks the wrong value and can be picked again; 36px is
|
|
1087
|
+
the same floor the select's own sheet holds.
|
|
1088
|
+
|
|
1089
|
+
**A compact menu beside a compact select**
|
|
1090
|
+
|
|
1091
|
+
```vue
|
|
1092
|
+
<div class="flex items-center gap-2">
|
|
1093
|
+
<BbSelect
|
|
1094
|
+
v-model="state.owner"
|
|
1095
|
+
compact
|
|
1096
|
+
hide-label
|
|
1097
|
+
label="Owner"
|
|
1098
|
+
:items="['Ada', 'Grace', 'Alan']"
|
|
1099
|
+
placeholder="Owner"
|
|
1100
|
+
/>
|
|
1101
|
+
<BbButton
|
|
1102
|
+
v-bb-dropdown="{
|
|
1103
|
+
compact: true,
|
|
1104
|
+
items: [
|
|
1105
|
+
{ key: 'rename', text: 'Rename' },
|
|
1106
|
+
{ key: 'duplicate', text: 'Duplicate' },
|
|
1107
|
+
],
|
|
1108
|
+
}"
|
|
1109
|
+
size="sm"
|
|
1110
|
+
variant="outline"
|
|
1111
|
+
>
|
|
1112
|
+
Actions
|
|
1113
|
+
</BbButton>
|
|
1114
|
+
</div>
|
|
1115
|
+
```
|
|
1116
|
+
|
|
1011
1117
|
### Mobile: the adaptive sheet
|
|
1012
1118
|
|
|
1013
1119
|
On viewports below the config's `mobileMaxWidth`, the menu renders as a
|
|
@@ -1022,8 +1128,11 @@ mid-session never swaps a live menu between flyout and sheet.
|
|
|
1022
1128
|
stay a flyout everywhere — e.g. deterministic UI tests or dense desktop-only
|
|
1023
1129
|
tooling.
|
|
1024
1130
|
- `offCanvasProps` forwards overrides to the underlying `BbOffCanvas` (merged
|
|
1025
|
-
over `direction: 'bottom'`, `size: 'auto'`, `draggable: true
|
|
1026
|
-
ignored when `adaptive` resolves to `false`.
|
|
1131
|
+
over `direction: 'bottom'`, `size: 'auto'`, `draggable: true`,
|
|
1132
|
+
`hideClose: true`); it is ignored when `adaptive` resolves to `false`.
|
|
1133
|
+
Pass `hideClose: false` to bring the close control back. The sheet search
|
|
1134
|
+
field (on `searchable` groups) uses the same soft filled treatment as
|
|
1135
|
+
`BbSelect`'s adaptive sheet.
|
|
1027
1136
|
|
|
1028
1137
|
### Works well with
|
|
1029
1138
|
|
|
@@ -1104,22 +1213,23 @@ mid-session never swaps a live menu between flyout and sheet.
|
|
|
1104
1213
|
| Prop | Type | Default | Required | Description |
|
|
1105
1214
|
| --- | --- | --- | --- | --- |
|
|
1106
1215
|
| `activator` | `Record<string, any> \| HTMLElement \| null \| undefined` | | | External activator element or component ref. When provided, the activator slot is not rendered and event listeners are attached programmatically to the referenced element. ARIA (`aria-haspopup`/`aria-expanded`/`aria-controls`) is attached p… |
|
|
1107
|
-
| `adaptive` | `boolean \| undefined` | `
|
|
1108
|
-
| `anchor` | `Record<string, any> \| HTMLElement \| null \| undefined` |
|
|
1216
|
+
| `adaptive` | `boolean \| undefined` | ``config.adaptive` (`true`)` | | On mobile viewports (below `config.mobileMaxWidth`), render the dropdown as a bottom-anchored, auto-sized off-canvas sheet that **navigates** through nested submenus (drilling one level at a time with a back control) instead of showing hove… |
|
|
1217
|
+
| `anchor` | `Record<string, any> \| HTMLElement \| null \| undefined` | `the activator element` | | Element the panel positions itself against, when it should differ from the activator — e.g. a wrapper that the activator is only a part of, so the menu aligns to the whole control while a single button opens it. Accepts an HTMLElement or a … |
|
|
1109
1218
|
| `boundary` | `string \| Record<string, any> \| HTMLElement \| null \| undefined` | | | Constrains the dropdown within a bounding element. Accepts an HTMLElement, a Vue component ref, or a CSS selector string. |
|
|
1110
|
-
| `
|
|
1111
|
-
| `
|
|
1112
|
-
| `
|
|
1219
|
+
| `compact` | `boolean \| undefined` | `false` | | Apply the compact density variant — the same ladder `BbSelect` uses, on both surfaces: flyout rows go 28px → 24px, sheet rows 44px → 36px. The label size does not change; density here is height, as it is for a select. A menu row is a touch … |
|
|
1220
|
+
| `disabled` | `boolean \| undefined` | `false` | | Disables the component |
|
|
1221
|
+
| `eager` | `boolean \| undefined` | `false` | | Prevents rendering content before it's made visible. |
|
|
1222
|
+
| `enforceCoherence` | `boolean \| undefined` | `false` | | Default for pipeline groups: drop selections that are no longer present in a group's current items (e.g. after a `dependencies` re-fetch) from the selection and `v-model`. A group's own `enforceCoherence` overrides this. |
|
|
1113
1223
|
| `id` | `string \| undefined` | | | The identifier of the component. |
|
|
1114
|
-
| `items` | `Item[]` |
|
|
1224
|
+
| `items` | `Item[]` | `[]` | yes | Array used to render each dropdown button. They can act as `button`, as `a`, or as `router-link` as they are based on the functionality provided by `BbBaseButton`. Pass a flat array for a single group, nest arrays for divider-separated grou… |
|
|
1115
1225
|
| `loadingText` | `string \| undefined` | | | Default placeholder text shown while a pipeline group's async items load. A group's own `loadingText` overrides this; both fall back to the localized `common.loadingText` (`'Loading...'`). |
|
|
1116
1226
|
| `noDataText` | `string \| undefined` | | | Default placeholder text shown when a pipeline group resolves to no items. A group's own `noDataText` overrides this; both fall back to the localized `common.noDataText` (`'No data to display'`). |
|
|
1117
1227
|
| `offCanvasProps` | `Partial<BbOffCanvasProps> \| undefined` | | | Overrides forwarded to the underlying `BbOffCanvas` when `adaptive` renders the sheet on mobile. Merged over the adaptive defaults (`direction: 'bottom'`, `size: 'auto'`, `draggable: true`). Ignored when `adaptive` is `false`. |
|
|
1118
1228
|
| `offset` | `number \| undefined` | `3` | | Space the floating container will maintain from the activator. |
|
|
1119
1229
|
| `padding` | `number \| undefined` | `10` | | Minimum empty space to keep from the edge of the page |
|
|
1120
|
-
| `placement` | `Placement \| "cursor" \| undefined` | `"bottom"` | | Position of the dropdown relative to the activator. Use `'cursor'` to anchor at the mouse/touch coordinates (
|
|
1230
|
+
| `placement` | `Placement \| "cursor" \| undefined` | `"bottom"` | | Position of the dropdown relative to the activator. Use `'cursor'` to anchor at the mouse/touch coordinates. (No arrow is drawn either way — arrows are tooltip-only in v3.) |
|
|
1121
1231
|
| `queryDebounceTime` | `number \| undefined` | `300` | | Debounce (ms) applied to the async re-fetch a `searchable` group fires as the user types. Applies to every searchable group in the menu. |
|
|
1122
|
-
| `transitionDuration` | `number \| undefined` | `
|
|
1232
|
+
| `transitionDuration` | `number \| undefined` | `150` | | How long the transition has to last in milliseconds. Menus use the fast transition rather than the medium one the other popovers default to. |
|
|
1123
1233
|
| `trigger` | `DropdownTrigger \| DropdownTrigger[] \| undefined` | `"click"` | | Interaction(s) that open the dropdown. Accepts a single trigger or an array to combine them. - `'click'` — left-click / tap (default) - `'contextMenu'` — right-click on desktop, long-press on mobile |
|
|
1124
1234
|
| `width` | `string \| number \| undefined` | `"auto"` | | Width of the dropdown in pixels, percentage, or 'auto' to fit content. |
|
|
1125
1235
|
|
|
@@ -516,22 +516,22 @@ the split control) and `boundary`.
|
|
|
516
516
|
| Prop | Type | Default | Required | Description |
|
|
517
517
|
| --- | --- | --- | --- | --- |
|
|
518
518
|
| `append:icon` | `string \| undefined` | | | Icon to be added on the right of the text. |
|
|
519
|
-
| `block` | `boolean \| undefined` |
|
|
520
|
-
| `disableAutoLoading` | `boolean \| undefined` |
|
|
521
|
-
| `disabled` | `boolean \| undefined` |
|
|
522
|
-
| `eager` | `boolean \| undefined` |
|
|
519
|
+
| `block` | `boolean \| undefined` | `false` | | Displays the component as full width. |
|
|
520
|
+
| `disableAutoLoading` | `boolean \| undefined` | `false` | | Disables the automatic loading state that tracks async actions (enabled by default). Only affects the main action button: the split toggle half still mirrors the dropdown's internal async-action loading state. |
|
|
521
|
+
| `disabled` | `boolean \| undefined` | `false` | | Disables the component |
|
|
522
|
+
| `eager` | `boolean \| undefined` | `false` | | Prevents rendering content before it's made visible. |
|
|
523
523
|
| `id` | `string \| undefined` | | | The identifier of the component. |
|
|
524
|
-
| `items` | `Item[]` |
|
|
525
|
-
| `loading` | `boolean \| undefined` |
|
|
526
|
-
| `offset` | `number \| undefined` |
|
|
527
|
-
| `padding` | `number \| undefined` |
|
|
528
|
-
| `placement` | `Placement \| "cursor" \| undefined` |
|
|
524
|
+
| `items` | `Item[]` | `[]` | yes | Array used to render each dropdown button. They can act as `button`, as `a`, or as `router-link` as they are based on the functionality provided by `BbBaseButton`. Pass a flat array for a single group, nest arrays for divider-separated grou… |
|
|
525
|
+
| `loading` | `boolean \| undefined` | `false` | | Triggers a loading indicator. |
|
|
526
|
+
| `offset` | `number \| undefined` | `3` | | Space the floating container will maintain from the activator. |
|
|
527
|
+
| `padding` | `number \| undefined` | `10` | | Minimum empty space to keep from the edge of the page |
|
|
528
|
+
| `placement` | `Placement \| "cursor" \| undefined` | `'bottom'` | | Position of the dropdown relative to the activator. Use `'cursor'` to anchor at the mouse/touch coordinates. (No arrow is drawn either way — arrows are tooltip-only in v3.) |
|
|
529
529
|
| `prepend:icon` | `string \| undefined` | | | Icon to be added on the left of the text. |
|
|
530
530
|
| `right:icon` | `string \| undefined` | | | Replaces the chevron shown inside the right-side dropdown toggle button. A constrained alternative to a slot: only the toggle's icon changes, so the button keeps its semantics. Named for consistency with `prepend:icon` / `append:icon`. |
|
|
531
531
|
| `size` | `Responsive<Sizes> \| undefined` | `"md"` | | Sets the size of the button. When the value is a string, it will be applied to all screen sizes. Otherwise, it will be applied to the screen size specified by the object. |
|
|
532
|
-
| `transitionDuration` | `number \| undefined` |
|
|
532
|
+
| `transitionDuration` | `number \| undefined` | `150` | | How long the transition has to last in milliseconds. Menus use the fast transition rather than the medium one the other popovers default to. |
|
|
533
533
|
| `variant` | `ButtonVariantType \| undefined` | `"primary"` | | Visual variant shared by both buttons of the split control. |
|
|
534
|
-
| `width` | `string \| number \| undefined` |
|
|
534
|
+
| `width` | `string \| number \| undefined` | `'auto'` | | Width of the dropdown in pixels, percentage, or 'auto' to fit content. |
|
|
535
535
|
|
|
536
536
|
## Events
|
|
537
537
|
|
|
@@ -550,5 +550,5 @@ the split control) and `boundary`.
|
|
|
550
550
|
## See Also
|
|
551
551
|
|
|
552
552
|
- [BbButton](./BbButton.md) — Button with loading state, tooltip, and icon support.
|
|
553
|
-
- [BbDropdown](./BbDropdown.md) — Displays contextual action menus and menu content.
|
|
553
|
+
- [BbDropdown](./BbDropdown.md) — Displays contextual action menus and menu content (includes the co-located BbDropdownGroup export, which is how a selectable group is bound).
|
|
554
554
|
- [BbBaseButton](./BbBaseButton.md) — Unstyled button/link primitive: element resolution (button/anchor/router link) and the full navigation engine, with no visual chrome. Use for any clickable or navigable surface that is not a variant-first BbButton — cards, list rows, custom links.
|
|
@@ -31,4 +31,4 @@
|
|
|
31
31
|
|
|
32
32
|
## See Also
|
|
33
33
|
|
|
34
|
-
- [BbDropdown](./BbDropdown.md) — Displays contextual action menus and menu content.
|
|
34
|
+
- [BbDropdown](./BbDropdown.md) — Displays contextual action menus and menu content (includes the co-located BbDropdownGroup export, which is how a selectable group is bound).
|
package/dist/ai/BbDropzone.md
CHANGED
|
@@ -1338,15 +1338,15 @@ button, grows with every file added, and changes mid-drag. So:
|
|
|
1338
1338
|
| --- | --- | --- | --- | --- |
|
|
1339
1339
|
| `accept` | `string[] \| undefined` | | | Array of MIME types (`'image/png'`), wildcards (`'image/*'`), extensions (`'.png'`) or bare tokens (`'png'`) to filter selectable files. A bare token upgrades to its extension instantly and is enriched with its MIME type from the lazily-imp… |
|
|
1340
1340
|
| `autofocus` | `Booleanish \| undefined` | | | Sets autofocus on page load. |
|
|
1341
|
-
| `disabled` | `boolean \| undefined` |
|
|
1341
|
+
| `disabled` | `boolean \| undefined` | `false` | | Disables the component |
|
|
1342
1342
|
| `errors` | `string \| string[] \| undefined` | | | Can be a string or an array of string containing the messages to display. They render in an `aria-live="polite"` region (announced when they appear) and, while the list is non-empty, are referenced FIRST from the control's `aria-describedby… |
|
|
1343
|
-
| `hasErrors` | `boolean \| undefined` |
|
|
1344
|
-
| `hasWarning` | `boolean \| undefined` |
|
|
1343
|
+
| `hasErrors` | `boolean \| undefined` | `false` | | Define if the component should be in an error state. It usually attaches a CSS class for styling purposes. |
|
|
1344
|
+
| `hasWarning` | `boolean \| undefined` | `false` | | Define if the component should be in a warning state. Same chrome as errors with `--bb-warn`; errors take priority. |
|
|
1345
1345
|
| `id` | `string \| undefined` | | | The identifier of the component. |
|
|
1346
1346
|
| `maxFiles` | `number \| undefined` | | | Maximum number of acceptable files. |
|
|
1347
1347
|
| `maxSize` | `number \| undefined` | | | Max size of the files in bytes. |
|
|
1348
1348
|
| `modelValue` | `File \| File[] \| null` | | yes | Used by v-model. |
|
|
1349
|
-
| `multiple` | `boolean \| undefined` |
|
|
1349
|
+
| `multiple` | `boolean \| undefined` | `false` | | Allows the selection of multiple items. |
|
|
1350
1350
|
| `name` | `string \| undefined` | | | Defines the name of the input. |
|
|
1351
1351
|
| `tag` | `LayoutTag \| undefined` | `"div"` | | Element rendered as the component's wrapper. |
|
|
1352
1352
|
| `warnings` | `string \| string[] \| undefined` | | | Warning messages to display beneath the dropzone, in their own `aria-live` region and amber (`--bb-text-warn`). A string or array; a non-empty list implies the warning state. Errors suppress warnings when both are set. While displayed they … |
|
package/dist/ai/BbForm.md
CHANGED
|
@@ -42,27 +42,22 @@ and stays put.
|
|
|
42
42
|
|
|
43
43
|
```vue
|
|
44
44
|
<script setup lang="ts">
|
|
45
|
-
import { ref } from 'vue';
|
|
46
45
|
import { BbButton } from 'bitboss-ui';
|
|
47
46
|
import { BbForm, BbTextInput } from 'bitboss-ui/validated';
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
// Just await the work — no `saving` ref. The form tracks it (see below).
|
|
51
49
|
const save = async (values: Record<string, unknown>) => {
|
|
52
|
-
|
|
53
|
-
try {
|
|
54
|
-
await api.contacts.create(values);
|
|
55
|
-
} finally {
|
|
56
|
-
saving.value = false;
|
|
57
|
-
}
|
|
50
|
+
await api.contacts.create(values);
|
|
58
51
|
};
|
|
59
52
|
</script>
|
|
60
53
|
|
|
61
54
|
<template>
|
|
62
|
-
<BbForm @submit="save">
|
|
55
|
+
<BbForm v-slot="{ isSubmitting }" @submit="save">
|
|
63
56
|
<BbTextInput label="Full name" rules="required" />
|
|
64
57
|
<BbTextInput label="Email" rules="required|email" type="email" />
|
|
65
|
-
<BbButton :loading="
|
|
58
|
+
<BbButton :loading="isSubmitting" type="submit" variant="primary">
|
|
59
|
+
Save
|
|
60
|
+
</BbButton>
|
|
66
61
|
</BbForm>
|
|
67
62
|
</template>
|
|
68
63
|
```
|
|
@@ -72,6 +67,44 @@ from the control's `label` unless you set `vid`. `Full name` above arrives as
|
|
|
72
67
|
`fullname`; when two fields in one form would collide (rows in a `v-for`), give
|
|
73
68
|
those a `vid`.
|
|
74
69
|
|
|
70
|
+
### `isSubmitting` covers your submit, not just validation
|
|
71
|
+
|
|
72
|
+
Bind a button's `loading` to `isSubmitting` (or to `submitting` from
|
|
73
|
+
`useBbFormContext`) and it stays on for as long as your handler is actually
|
|
74
|
+
working — **return the promise** and the form waits for it:
|
|
75
|
+
|
|
76
|
+
```vue
|
|
77
|
+
<!-- the spinner runs until save() settles -->
|
|
78
|
+
<BbForm
|
|
79
|
+
@submit="
|
|
80
|
+
async (values) => {
|
|
81
|
+
await api.save(values);
|
|
82
|
+
}
|
|
83
|
+
"
|
|
84
|
+
/>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
A synchronous handler resolves immediately, as you would expect. If your
|
|
88
|
+
handler throws or rejects, the flag still clears (so the button never spins
|
|
89
|
+
forever) and the error is routed to `app.config.errorHandler`, the same place
|
|
90
|
+
Vue sends any other event-handler failure — so a global reporter keeps seeing
|
|
91
|
+
it.
|
|
92
|
+
|
|
93
|
+
> Fixed in 3.0.0-beta.15 (Q18.3). Before that, `isSubmitting` cleared as soon
|
|
94
|
+
> as _validation_ resolved, so the spinner flashed for a frame and the user
|
|
95
|
+
> could double-submit a save still in flight. If you worked around it with your
|
|
96
|
+
> own `saving` ref, you can drop it.
|
|
97
|
+
|
|
98
|
+
### `resetForm()` clears the fields, and your model
|
|
99
|
+
|
|
100
|
+
Resetting publishes the new value back through `update:modelValue`, so the
|
|
101
|
+
control, the form's own state and whatever ref you bound all agree afterwards.
|
|
102
|
+
The same holds for vee-validate's `resetField` and `setFieldValue`.
|
|
103
|
+
|
|
104
|
+
> Fixed in 3.0.0-beta.15 (Q18.4). Before that the value pipe only ran one way:
|
|
105
|
+
> a reset moved the form's internal value but never told your model, so the
|
|
106
|
+
> form reported itself pristine while the user's text was still on screen.
|
|
107
|
+
|
|
75
108
|
### Reading form state in the slot
|
|
76
109
|
|
|
77
110
|
The default slot is scoped, so the chrome around the fields can react without
|
|
@@ -183,9 +216,11 @@ through `useValidatedField`.
|
|
|
183
216
|
|
|
184
217
|
#### There is no template-ref handle
|
|
185
218
|
|
|
186
|
-
`BbForm`
|
|
187
|
-
|
|
188
|
-
|
|
219
|
+
`BbForm` exposes exactly one thing — `$el`, the native `<form>` — and nothing
|
|
220
|
+
else, so a template ref gives you no `form.value.submitForm()` / `.isValid` /
|
|
221
|
+
`.validate()` / `.reset()`. That is deliberate, not an oversight: state and
|
|
222
|
+
actions live on `useBbFormContext(id)`, so there is no second,
|
|
223
|
+
instance-shaped API to keep in step with it. Use the context for all four.
|
|
189
224
|
|
|
190
225
|
The native form element is still right there, though — `$el` is public-instance
|
|
191
226
|
API and unaffected:
|
package/dist/ai/BbIcon.md
CHANGED
|
@@ -173,6 +173,12 @@ workflow and the heroicons `-20-`/`-16-` size-variant caveat.
|
|
|
173
173
|
`local:*` is for brand art in `iconDir`. The deploy card below cycles stages
|
|
174
174
|
with full `local:` literals from that folder — the canonical brand-mark demo.
|
|
175
175
|
|
|
176
|
+
**Every `local:` name in this guide is one of _this repository's_ fixture SVGs**
|
|
177
|
+
(`clock`, `loader`, `check_circle`, `alert_circle`, …). They are illustrative,
|
|
178
|
+
not a shipped set: copy the pattern, not the names. In your project a
|
|
179
|
+
`local:` name resolves only if `<name>.svg` exists in your own `iconDir`, and a
|
|
180
|
+
missing one throws at mount.
|
|
181
|
+
|
|
176
182
|
**Brand marks via local: — deploy stages**
|
|
177
183
|
|
|
178
184
|
```vue
|
package/dist/ai/BbIndicator.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
- Safety level: **Consumer API**
|
|
6
6
|
- Group: **Feedback**
|
|
7
|
-
- Description: Anchors a notification bubble (count/short text) or a dot over a wrapped element
|
|
7
|
+
- Description: Anchors a notification bubble (count/short text) or a dot over a wrapped element.
|
|
8
8
|
- Usage rule: Prefer this component for consumer-facing implementations.
|
|
9
9
|
- Implementation source (only when the contract below is not enough): [source/BbIndicator.md](./source/BbIndicator.md)
|
|
10
10
|
|
|
@@ -261,9 +261,9 @@ const onClear = () => {
|
|
|
261
261
|
|
|
262
262
|
| Prop | Type | Default | Required | Description |
|
|
263
263
|
| --- | --- | --- | --- | --- |
|
|
264
|
-
| `bottom` | `boolean \| undefined` |
|
|
265
|
-
| `dot` | `boolean \| undefined` |
|
|
266
|
-
| `left` | `boolean \| undefined` |
|
|
264
|
+
| `bottom` | `boolean \| undefined` | `false` | | Anchors the indicator to the bottom edge of the wrapped element instead of the top. |
|
|
265
|
+
| `dot` | `boolean \| undefined` | `false` | | Renders a small contentless dot instead of a labelled bubble. Takes precedence over `text`. |
|
|
266
|
+
| `left` | `boolean \| undefined` | `false` | | Anchors the indicator to the left edge of the wrapped element instead of the right. |
|
|
267
267
|
| `max` | `number \| undefined` | | | Caps a numeric `text` count: values above `max` render as `${max}+` (e.g. `max: 99` shows `99+`). Ignored for string `text`. |
|
|
268
268
|
| `size` | `keyof Sizes \| undefined` | `"md"` | | Preset size of the indicator. |
|
|
269
269
|
| `text` | `string \| number \| undefined` | | | Content shown inside the indicator bubble. A `number` is accepted for count ergonomics (e.g. `:text="unread"`). When omitted the indicator renders only if `dot` is set. |
|
|
@@ -279,5 +279,5 @@ const onClear = () => {
|
|
|
279
279
|
|
|
280
280
|
## See Also
|
|
281
281
|
|
|
282
|
-
- [BbBadge](./BbBadge.md) — Displays compact status
|
|
282
|
+
- [BbBadge](./BbBadge.md) — Displays a compact inline status counter or label. It sits in the flow — for a bubble or dot anchored OVER another element, use BbIndicator (includes the co-located BbBadgeButton export).
|
|
283
283
|
- [BbAvatar](./BbAvatar.md) — Displays an avatar and has a fallback content slot.
|
package/dist/ai/BbNumberInput.md
CHANGED
|
@@ -662,32 +662,32 @@ const timeoutSeconds = ref<number | null>(30);
|
|
|
662
662
|
| `append:icon` | `string \| undefined` | | | Name of the icon to be added at the end of the input. |
|
|
663
663
|
| `autocomplete` | `string \| undefined` | | | Guides the browser as to the type of information expected in the field. |
|
|
664
664
|
| `autofocus` | `Booleanish \| undefined` | | | Sets autofocus on page load. |
|
|
665
|
-
| `clearable` | `boolean \| undefined` |
|
|
666
|
-
| `compact` | `boolean \| undefined` |
|
|
665
|
+
| `clearable` | `boolean \| undefined` | `false` | | Displays a clear button when the input has a value and is being interacted with. |
|
|
666
|
+
| `compact` | `boolean \| undefined` | `false` | | Sets the component in a compact state. |
|
|
667
667
|
| `description` | `string \| undefined` | | | Descriptive text displayed below the label and above the input. Unlike the hint it is always visible, and it is linked to the input via `aria-describedby` (after any `errors` / `warnings`, before the `hint`). |
|
|
668
668
|
| `direction` | `InputDirection \| undefined` | | | Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`. |
|
|
669
|
-
| `disabled` | `boolean \| undefined` |
|
|
669
|
+
| `disabled` | `boolean \| undefined` | `false` | | Disables the component. |
|
|
670
670
|
| `errors` | `string \| string[] \| undefined` | | | Can be a string or an array of string containing the messages to display. They render in an `aria-live="polite"` region (announced when they appear) and, while the list is non-empty, are referenced FIRST from the control's `aria-describedby… |
|
|
671
|
-
| `hasErrors` | `boolean \| undefined` |
|
|
672
|
-
| `hasWarning` | `boolean \| undefined` |
|
|
673
|
-
| `hideLabel` | `boolean \| undefined` |
|
|
671
|
+
| `hasErrors` | `boolean \| undefined` | `false` | | Define if the component should be in an error state. It usually attaches a CSS class for styling purposes. |
|
|
672
|
+
| `hasWarning` | `boolean \| undefined` | `false` | | Define if the component should be in a warning state. Same chrome as errors with `--bb-warn`; errors take priority. |
|
|
673
|
+
| `hideLabel` | `boolean \| undefined` | `false` | | Visually hides the label of the input while maintaining accessibility. |
|
|
674
674
|
| `hint` | `string \| undefined` | | | Text box to be displayed near the input, usually to indicate instructions. |
|
|
675
675
|
| `id` | `string \| undefined` | | | The identifier of the component. |
|
|
676
676
|
| `label` | `string` | | yes | Text content of the label of the element. |
|
|
677
677
|
| `labelMode` | `"floating" \| "outside" \| "inside" \| undefined` | | | Label rendering mode. |
|
|
678
678
|
| `labelPosition` | `"left" \| "center" \| "right" \| undefined` | | | Sets the text alignment of the label. |
|
|
679
|
-
| `loading` | `boolean \| undefined` |
|
|
679
|
+
| `loading` | `boolean \| undefined` | `false` | | Sets the component in a loading state, usually triggering some visual styles. |
|
|
680
680
|
| `max` | `number \| undefined` | | | Maximum value cap. |
|
|
681
681
|
| `maxPrecision` | `number \| undefined` | | | Maximum precision of the number. |
|
|
682
682
|
| `min` | `number \| undefined` | | | Minimum value cap. |
|
|
683
683
|
| `modelValue` | `string \| number \| null` | `null` | yes | Used by v-model. |
|
|
684
684
|
| `name` | `string \| undefined` | | | Defines the name of the input. |
|
|
685
|
-
| `persistentHint` | `boolean \| undefined` |
|
|
685
|
+
| `persistentHint` | `boolean \| undefined` | `false` | | Keeps the hint displayed. |
|
|
686
686
|
| `placeholder` | `string \| undefined` | | | String displayed when there's no data. |
|
|
687
687
|
| `prepend:icon` | `string \| undefined` | | | Name of the icon to be added at the start of the input. |
|
|
688
|
-
| `readonly` | `boolean \| undefined` |
|
|
689
|
-
| `required` | `boolean \| undefined` |
|
|
690
|
-
| `reverse` | `boolean \| undefined` |
|
|
688
|
+
| `readonly` | `boolean \| undefined` | `false` | | Sets the input in a readonly state. |
|
|
689
|
+
| `required` | `boolean \| undefined` | `false` | | Sets the input as required. |
|
|
690
|
+
| `reverse` | `boolean \| undefined` | `false` | | Reverses the layout. Applicable in every direction the order of the label and the input is swapped. |
|
|
691
691
|
| `step` | `number \| undefined` | | | Incremental unit used in the exposed `increase` and `decrease` functions. It is NOT applied to manual input as a step of 5 would prevent the user from inserting a value like `115` because of rounding down. |
|
|
692
692
|
| `warnings` | `string \| string[] \| undefined` | | | Warning messages to display beneath the field, in their own `aria-live` region and amber (`--bb-text-warn`). A string or array; a non-empty list implies the warning state. Errors suppress warnings when both are set. While displayed they are… |
|
|
693
693
|
|