bitboss-ui 3.0.0-beta.48 → 3.0.0-beta.49
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 +24 -7
- package/bin/bitboss-ui-mcp.mjs +15 -3
- package/bin/bitboss-ui.mjs +115 -13
- package/dist/ai/BbAvatar.md +1 -1
- package/dist/ai/BbBreadcrumbs.md +65 -65
- package/dist/ai/BbButton.md +16 -5
- package/dist/ai/BbCheckbox.md +0 -2
- package/dist/ai/BbCheckboxGroup.md +13 -20
- package/dist/ai/BbDatePickerInput.md +4 -2
- package/dist/ai/BbDialog.md +1 -8
- package/dist/ai/BbDropdown.md +231 -220
- package/dist/ai/BbDropdownButton.md +65 -65
- package/dist/ai/BbDropdownGroup.md +2 -2
- package/dist/ai/BbDropzone.md +10 -10
- package/dist/ai/BbForm.md +43 -52
- package/dist/ai/BbHoverCard.md +4 -2
- package/dist/ai/BbNumberInput.md +88 -21
- package/dist/ai/BbPopover.md +29 -23
- package/dist/ai/BbProgress.md +48 -22
- package/dist/ai/BbRadioGroup.md +13 -19
- package/dist/ai/BbSelect.md +16 -36
- package/dist/ai/BbSelectPopover.md +14 -30
- package/dist/ai/BbSmoothHeight.md +0 -2
- package/dist/ai/BbSwitchGroup.md +13 -20
- package/dist/ai/BbTable.md +11 -10
- package/dist/ai/BbTabs.md +106 -105
- package/dist/ai/BbTabsList.md +2 -2
- package/dist/ai/BbTabsPanels.md +1 -1
- package/dist/ai/BbTabsRoot.md +2 -2
- package/dist/ai/BbTooltip.md +24 -10
- package/dist/ai/BbTree.md +14 -11
- package/dist/ai/changelog.json +256 -5
- package/dist/ai/components.json +36 -34
- package/dist/ai/composables/useBbDropdownContext.md +16 -16
- package/dist/ai/composables/useBbFormField.md +5 -1
- package/dist/ai/composables/useBbTabsContext.md +14 -14
- package/dist/ai/guides/agent-contract.md +27 -27
- package/dist/ai/guides/ai-router.md +1 -1
- package/dist/ai/guides/component-picker.md +3 -3
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/icons-policy.md +10 -10
- package/dist/ai/guides/inertia-helpers.md +120 -67
- package/dist/ai/guides/installation-and-plugin-setup.md +43 -15
- package/dist/ai/guides/migration/components/bb-breadcrumbs.md +3 -2
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +16 -16
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +9 -8
- package/dist/ai/guides/migration/components/bb-dropdown.md +15 -14
- package/dist/ai/guides/migration/components/bb-radio-group.md +2 -1
- package/dist/ai/guides/migration/components/bb-select-popover.md +6 -1
- package/dist/ai/guides/migration/components/bb-select.md +10 -2
- package/dist/ai/guides/migration/components/bb-switch-group.md +2 -1
- package/dist/ai/guides/migration/components/bb-tabs.md +9 -8
- package/dist/ai/guides/migration/components/bb-tooltip.md +1 -1
- package/dist/ai/guides/migration/v2-to-v3.md +114 -17
- package/dist/ai/guides/migration/v3-beta-tooling.md +11 -0
- package/dist/ai/guides/options-items-playbook.md +30 -24
- package/dist/ai/guides/passthrough.md +2 -2
- package/dist/ai/guides/preset-components.md +18 -3
- package/dist/ai/guides/typescript-generic-components.md +1 -1
- package/dist/ai/guides/validated-forms.md +11 -22
- package/dist/ai/guides/validation-providers.md +4 -3
- package/dist/ai/helpers/inertia/manifest.json +636 -0
- package/dist/ai/helpers/inertia/types.ts +15 -0
- package/dist/ai/helpers/inertia/useAsyncFn.ts +110 -0
- package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +102 -0
- package/dist/ai/helpers/inertia/useDeleteCmd.ts +30 -0
- package/dist/ai/helpers/inertia/useHasChanged.ts +36 -0
- package/dist/ai/helpers/inertia/useIndexById.ts +23 -0
- package/dist/ai/helpers/inertia/useLazyProp.ts +148 -0
- package/dist/ai/helpers/inertia/useLazyPropGetter.ts +50 -0
- package/dist/ai/helpers/inertia/useLoading.ts +20 -0
- package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +88 -0
- package/dist/ai/helpers/inertia/usePromiseForm.ts +62 -0
- package/dist/ai/helpers/inertia/useProp.ts +63 -0
- package/dist/ai/helpers/inertia/useQuery.ts +19 -0
- package/dist/ai/helpers/inertia/useQueryObject.ts +116 -0
- package/dist/ai/helpers/inertia/useResourceContext.ts +69 -0
- package/dist/ai/helpers/inertia/useRouteQuery.ts +54 -0
- package/dist/ai/helpers/inertia/useScreenSizes.ts +23 -0
- package/dist/ai/helpers/inertia/useTableContext.ts +34 -0
- package/dist/ai/helpers/inertia/useTableSelectionContext.ts +48 -0
- package/dist/ai/helpers/inertia/useUntil.ts +33 -0
- package/dist/ai/helpers/inertia/utils.ts +24 -0
- package/dist/ai/index.md +6 -6
- package/dist/ai/manifest/components/BbBreadcrumbs.json +10 -6
- package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
- package/dist/ai/manifest/components/BbButton.json +1 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
- package/dist/ai/manifest/components/BbDropdown.json +23 -20
- package/dist/ai/manifest/components/BbDropdown.tree.json +2 -2
- package/dist/ai/manifest/components/BbDropdownButton.json +22 -19
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +1 -1
- package/dist/ai/manifest/components/BbDropdownGroup.json +2 -2
- package/dist/ai/manifest/components/BbForm.json +1 -0
- package/dist/ai/manifest/components/BbNumberInput.json +6 -1
- package/dist/ai/manifest/components/BbNumberInput.tree.json +2 -1
- package/dist/ai/manifest/components/BbPopover.json +1 -0
- package/dist/ai/manifest/components/BbProgress.json +6 -6
- package/dist/ai/manifest/components/BbProgress.tree.json +1 -0
- package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
- package/dist/ai/manifest/components/BbSelect.json +2 -2
- package/dist/ai/manifest/components/BbSelectPopover.json +2 -2
- package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
- package/dist/ai/manifest/components/BbTabs.json +7 -6
- package/dist/ai/manifest/components/BbTabsList.json +3 -3
- package/dist/ai/manifest/components/BbTabsPanels.json +1 -1
- package/dist/ai/manifest/components/BbTabsRoot.json +5 -4
- package/dist/ai/manifest/components/BbTooltip.json +1 -1
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +2 -0
- package/dist/ai/manifest/types.advanced.json +10 -9
- package/dist/ai/manifest/types.api.json +5 -4
- package/dist/ai/recipes/inertia/approvals-inbox.md +16 -18
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +23 -33
- package/dist/ai/recipes/inertia/layout-scaffold.md +16 -16
- package/dist/ai/recipes/inertia/onboarding.md +6 -10
- package/dist/ai/recipes/inertia/ownership-atlas.md +15 -18
- package/dist/ai/recipes/inertia/record-form.md +11 -11
- package/dist/ai/recipes/inertia/records-workspace.md +38 -41
- package/dist/ai/recipes/inertia/settings-workspace.md +26 -38
- package/dist/ai/recipes/inertia/upload-center.md +31 -39
- package/dist/ai/recipes/inertia/wizard-form.md +10 -19
- package/dist/ai/recipes/nuxt/approvals-inbox.md +7 -8
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +14 -24
- package/dist/ai/recipes/nuxt/layout-scaffold.md +16 -16
- package/dist/ai/recipes/nuxt/onboarding.md +2 -6
- package/dist/ai/recipes/nuxt/ownership-atlas.md +7 -9
- package/dist/ai/recipes/nuxt/record-form.md +5 -5
- package/dist/ai/recipes/nuxt/records-workspace.md +29 -31
- package/dist/ai/recipes/nuxt/settings-workspace.md +22 -34
- package/dist/ai/recipes/nuxt/upload-center.md +22 -29
- package/dist/ai/recipes/nuxt/wizard-form.md +3 -11
- package/dist/ai/recipes/vue/approvals-inbox.md +7 -8
- package/dist/ai/recipes/vue/inline-edit-workspace.md +14 -24
- package/dist/ai/recipes/vue/layout-scaffold.md +16 -16
- package/dist/ai/recipes/vue/onboarding.md +2 -6
- package/dist/ai/recipes/vue/ownership-atlas.md +7 -9
- package/dist/ai/recipes/vue/record-form.md +5 -5
- package/dist/ai/recipes/vue/records-workspace.md +29 -31
- package/dist/ai/recipes/vue/settings-workspace.md +22 -34
- package/dist/ai/recipes/vue/upload-center.md +22 -29
- package/dist/ai/recipes/vue/wizard-form.md +3 -11
- package/dist/ai/source/BbAccordion.md +1 -1
- package/dist/ai/source/BbAlert.md +3 -3
- package/dist/ai/source/BbBadge.md +2 -2
- package/dist/ai/source/BbBadgeButton.md +5 -4
- package/dist/ai/source/BbBaseButton.md +1 -1
- package/dist/ai/source/BbBaseRadioIcon.md +1 -0
- package/dist/ai/source/BbBaseSwitchIcon.md +1 -0
- package/dist/ai/source/BbBreadcrumbs.md +63 -42
- package/dist/ai/source/BbButton.md +71 -33
- package/dist/ai/source/BbCalendar.md +17 -16
- package/dist/ai/source/BbCheckbox.md +3 -2
- package/dist/ai/source/BbCheckboxGroup.md +11 -4
- package/dist/ai/source/BbColorInput.md +10 -9
- package/dist/ai/source/BbConfirm.md +1 -1
- package/dist/ai/source/BbConfirmPortal.md +1 -1
- package/dist/ai/source/BbDatePicker.md +2 -2
- package/dist/ai/source/BbDatePickerInput.md +47 -20
- package/dist/ai/source/BbDialog.md +5 -5
- package/dist/ai/source/BbDropdown.md +230 -158
- package/dist/ai/source/BbDropdownButton.md +19 -12
- package/dist/ai/source/BbDropdownGroup.md +126 -93
- package/dist/ai/source/BbForm.md +25 -1
- package/dist/ai/source/BbIndicator.md +4 -0
- package/dist/ai/source/BbNumberInput.md +855 -19
- package/dist/ai/source/BbOffCanvas.md +27 -11
- package/dist/ai/source/BbPagination.md +3 -3
- package/dist/ai/source/BbPopover.md +152 -8
- package/dist/ai/source/BbPopoverPortal.md +11 -0
- package/dist/ai/source/BbProgress.md +82 -18
- package/dist/ai/source/BbRadioGroup.md +12 -5
- package/dist/ai/source/BbRating.md +11 -9
- package/dist/ai/source/BbSelect.md +16 -10
- package/dist/ai/source/BbSelectPopover.md +29 -23
- package/dist/ai/source/BbSlider.md +12 -6
- package/dist/ai/source/BbSwitch.md +3 -2
- package/dist/ai/source/BbSwitchGroup.md +5 -2
- package/dist/ai/source/BbTable.md +102 -18
- package/dist/ai/source/BbTabs.md +27 -23
- package/dist/ai/source/BbTabsList.md +26 -22
- package/dist/ai/source/BbTabsPanels.md +26 -22
- package/dist/ai/source/BbTabsRoot.md +25 -21
- package/dist/ai/source/BbTag.md +10 -9
- package/dist/ai/source/BbTextInput.md +5 -4
- package/dist/ai/source/BbTextarea.md +6 -5
- package/dist/ai/source/BbTimePicker.md +1 -1
- package/dist/ai/source/BbTimePickerInput.md +46 -9
- package/dist/ai/source/BbToast.md +10 -7
- package/dist/ai/source/BbToastPortal.md +10 -7
- package/dist/ai/source/BbTooltip.md +54 -8
- package/dist/ai/source/BbTree.md +21 -3
- package/dist/ai/source/CommonField.md +6 -4
- package/dist/ai/source/CommonFieldInput.md +15 -10
- package/dist/ai/source/CommonPopover.md +6 -0
- package/dist/ai/source/CommonTimeSelector.md +5 -4
- package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +10 -8
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +45 -45
- package/dist/components/BbBreadcrumbs/types.d.ts +25 -17
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +84 -71
- package/dist/components/BbButton/toggleRoving.d.ts +6 -0
- package/dist/components/BbButton/toggleRoving.js +45 -0
- package/dist/components/BbButton/types.d.ts +4 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +178 -178
- package/dist/components/BbCalendar/CalendarMonthPanel.vue_vue_type_script_setup_true_lang.js +15 -15
- package/dist/components/BbCalendar/CalendarYearPanel.vue_vue_type_script_setup_true_lang.js +28 -28
- package/dist/components/BbCalendar/useCalendarGrid.js +141 -139
- package/dist/components/BbCalendar/useDayjsLocale.d.ts +38 -15
- package/dist/components/BbCalendar/useDayjsLocale.js +31 -30
- package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +48 -48
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +81 -80
- package/dist/components/BbCheckboxGroup/types.d.ts +6 -2
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +69 -69
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +363 -349
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +91 -86
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +298 -289
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +322 -356
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +17 -15
- package/dist/components/BbDropdown/DropdownRow.vue.d.ts +40 -0
- package/dist/components/BbDropdown/DropdownRow.vue.js +5 -0
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +60 -0
- package/dist/components/BbDropdown/normalizeGroups.d.ts +8 -2
- package/dist/components/BbDropdown/normalizeGroups.js +60 -46
- package/dist/components/BbDropdown/types.d.ts +119 -88
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +11 -2
- package/dist/components/BbDropdownButton/types.d.ts +2 -2
- package/dist/components/BbForm/BbForm.vue.d.ts +9 -0
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +114 -105
- package/dist/components/BbForm/BbFormCustomField.js +1 -1
- package/dist/components/BbForm/bindFormField.js +2 -1
- package/dist/components/BbForm/formFields.d.ts +5 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +0 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +452 -125
- package/dist/components/BbNumberInput/numberDisplay.d.ts +256 -0
- package/dist/components/BbNumberInput/numberDisplay.js +499 -0
- package/dist/components/BbNumberInput/types.d.ts +54 -1
- package/dist/components/BbNumberInput/warroom/corpus.d.ts +58 -0
- package/dist/components/BbNumberInput/warroom/currency-verify.rows.d.ts +28 -0
- package/dist/components/BbNumberInput/warroom/currency.rows.d.ts +2 -0
- package/dist/components/BbNumberInput/warroom/harness.d.ts +217 -0
- package/dist/components/BbNumberInput/warroom/oracle.d.ts +150 -0
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/BbPopover/BbPopover.vue.d.ts +1 -0
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +207 -164
- package/dist/components/BbPopover/types.d.ts +11 -0
- package/dist/components/BbProgress/BbProgress.vue_vue_type_script_setup_true_lang.js +15 -7
- package/dist/components/BbProgress/types.d.ts +23 -7
- package/dist/components/BbProgress/types.js +1 -1
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +102 -101
- package/dist/components/BbRadioGroup/types.d.ts +6 -2
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +63 -63
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +156 -154
- package/dist/components/BbSelect/types.d.ts +6 -2
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/BbSelectPopover/types.d.ts +6 -2
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +153 -153
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +62 -62
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +131 -130
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +711 -676
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbTabs/types.d.ts +25 -21
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +76 -76
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +58 -58
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +82 -82
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +246 -236
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +102 -97
- package/dist/components/BbTooltip/tooltipWarmup.d.ts +23 -0
- package/dist/components/BbTooltip/tooltipWarmup.js +7 -0
- package/dist/components/BbTooltip/types.d.ts +7 -2
- package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +29 -21
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +10 -7
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +37 -36
- package/dist/components/CommonTimeSelector/CommonTimeSelector.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/composables/formSubmitLock.d.ts +6 -0
- package/dist/composables/formSubmitLock.js +4 -0
- package/dist/composables/useBaseOptions.d.ts +7 -1
- package/dist/composables/useBaseOptions.js +32 -32
- package/dist/composables/useBbDropdownContext.d.ts +8 -8
- package/dist/composables/useBbFormField.d.ts +9 -0
- package/dist/composables/useBbFormField.js +5 -3
- package/dist/composables/useBbTabsContext.d.ts +10 -10
- package/dist/composables/useBbTabsContext.js +18 -18
- package/dist/composables/useFormBinding.d.ts +11 -0
- package/dist/composables/useFormBinding.js +15 -13
- package/dist/composables/useItemText.d.ts +5 -1
- package/dist/composables/useItemText.js +8 -3
- package/dist/composables/useItemValue.d.ts +5 -1
- package/dist/composables/useItemValue.js +8 -3
- package/dist/composables/useLocale.js +10 -9
- package/dist/deprecation/ai-deprecations.json.d.ts +130 -0
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/deprecation/removedProps.js +1 -1
- package/dist/directives/bbDropdown.js +1 -1
- package/dist/i18n/index.d.ts +7 -12
- package/dist/i18n/locales/cs.json +11 -14
- package/dist/i18n/locales/da.json +13 -16
- package/dist/i18n/locales/de-CH.json +137 -0
- package/dist/i18n/locales/de.json +14 -17
- package/dist/i18n/locales/el.json +10 -13
- package/dist/i18n/locales/en-GB.json +137 -0
- package/dist/i18n/locales/en.json +8 -11
- package/dist/i18n/locales/es-MX.json +137 -0
- package/dist/i18n/locales/es.json +16 -19
- package/dist/i18n/locales/fi.json +8 -11
- package/dist/i18n/locales/fr.json +23 -26
- package/dist/i18n/locales/hu.json +8 -11
- package/dist/i18n/locales/it.json +12 -15
- package/dist/i18n/locales/ja.json +13 -16
- package/dist/i18n/locales/ko.json +10 -13
- package/dist/i18n/locales/nb.json +13 -16
- package/dist/i18n/locales/nl.json +21 -24
- package/dist/i18n/locales/pl.json +10 -13
- package/dist/i18n/locales/{pt.json → pt-BR.json} +19 -22
- package/dist/i18n/locales/pt-PT.json +137 -0
- package/dist/i18n/locales/ro.json +22 -25
- package/dist/i18n/locales/ru.json +11 -14
- package/dist/i18n/locales/sv.json +16 -19
- package/dist/i18n/locales/tr.json +14 -17
- package/dist/i18n/locales/uk.json +11 -14
- package/dist/i18n/locales/{zh-cn.json → zh-CN.json} +10 -13
- package/dist/i18n/locales/zh-HK.json +137 -0
- package/dist/i18n/locales/zh-TW.json +137 -0
- package/dist/i18n/regionHints.d.ts +16 -0
- package/dist/i18n/regionHints.js +49 -0
- package/dist/i18n/regions.d.ts +286 -0
- package/dist/i18n/regions.js +265 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/llms-full.txt +1785 -1637
- package/dist/llms-medium.txt +74 -46
- package/dist/llms.txt +7 -7
- package/dist/locale-blueprint.json +16 -13
- package/dist/styles.css +2 -2
- package/dist/types/ptComponentMap.d.ts +1 -1
- package/dist/utilities/functions/slotKey.d.ts +2 -2
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +22 -19
- package/dist/vite.js +309 -297
- package/llms.txt +7 -7
- package/package.json +5 -3
- package/scripts/lib/agent-manifest.mjs +2 -1
- package/scripts/lib/eslint-disable.mjs +12 -4
- package/scripts/lib/eslint-plugin.d.ts +5 -1
- package/scripts/lib/eslint-plugin.mjs +187 -6
- package/scripts/lib/helper-canon.mjs +176 -0
- package/scripts/lib/helpers-add.mjs +1303 -0
- package/scripts/lib/local-components.mjs +33 -4
- package/scripts/lib/locale-check.mjs +165 -0
- package/scripts/lib/redundant-item-accessor.mjs +398 -0
- package/scripts/lib/renamed-item-field.mjs +343 -0
- package/scripts/lib/slot-key.mjs +2 -2
- package/scripts/lib/slot-renames.mjs +1 -1
- package/scripts/lib/validate-bb-markup.mjs +123 -56
- package/dist/i18n/index.js +0 -27
|
@@ -16,7 +16,7 @@ selected option, without template refs and without being in the dropdown's
|
|
|
16
16
|
subtree.
|
|
17
17
|
|
|
18
18
|
The point is chips and summaries **without a twin fetch**: the dropdown already
|
|
19
|
-
resolved a pick's
|
|
19
|
+
resolved a pick's label when the user chose it, so `selectedOptions` hands it
|
|
20
20
|
back. It is the dropdown sibling of
|
|
21
21
|
[`useBbTableContext`](./useBbTableContext.md) and
|
|
22
22
|
[`useBbTabsContext`](./useBbTabsContext.md): same id-rendezvous pattern, same
|
|
@@ -47,16 +47,16 @@ const { isReady, open, groups } = useBbDropdownContext(id);
|
|
|
47
47
|
|
|
48
48
|
Individual computed refs — safe to destructure. Nothing on it is writable.
|
|
49
49
|
|
|
50
|
-
| Member | Type | Description
|
|
51
|
-
| --------- | ----------------------------------------------------- |
|
|
52
|
-
| `isReady` | `ComputedRef<boolean>` | A dropdown with this id is currently mounted.
|
|
53
|
-
| `open` | `ComputedRef<boolean>` | The dropdown's panel / sheet is open (`false` until it mounts).
|
|
54
|
-
| `groups` | `ComputedRef<Record<string, BbDropdownContextGroup>>` | One entry per **selectable** group, keyed by the group's `
|
|
50
|
+
| Member | Type | Description |
|
|
51
|
+
| --------- | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
|
|
52
|
+
| `isReady` | `ComputedRef<boolean>` | A dropdown with this id is currently mounted. |
|
|
53
|
+
| `open` | `ComputedRef<boolean>` | The dropdown's panel / sheet is open (`false` until it mounts). |
|
|
54
|
+
| `groups` | `ComputedRef<Record<string, BbDropdownContextGroup>>` | One entry per **selectable** group, keyed by the group's `id`. `{}` until the dropdown mounts. |
|
|
55
55
|
|
|
56
56
|
### A group entry (`BbDropdownContextGroup`)
|
|
57
57
|
|
|
58
58
|
**The group config you declared, with live state on top.** Every field you
|
|
59
|
-
passed in `items` rides through as-is (`
|
|
59
|
+
passed in `items` rides through as-is (`id`, `label`, `hideLabel`, `filterBy`,
|
|
60
60
|
`max`, `prepend:icon`, `variant`, …), so a chip can be rendered from one
|
|
61
61
|
declaration. The live fields win over anything of the same name:
|
|
62
62
|
|
|
@@ -74,12 +74,12 @@ is a fetcher, and a state snapshot must never invite calling it.
|
|
|
74
74
|
|
|
75
75
|
### A selected option (`BbDropdownContextOption`)
|
|
76
76
|
|
|
77
|
-
| Field | Type | Description
|
|
78
|
-
| ------------- | --------- |
|
|
79
|
-
| `value` | `unknown` | The selection's value (the group's `itemValue`, or the row `
|
|
80
|
-
| `
|
|
81
|
-
| `description` | `string` | The group's `itemProps.description` (or a literal row's `description`), when it has one.
|
|
82
|
-
| `original` | `unknown` | The raw item behind the value, once resolved.
|
|
77
|
+
| Field | Type | Description |
|
|
78
|
+
| ------------- | --------- | ------------------------------------------------------------------------------------------------------------------------- |
|
|
79
|
+
| `value` | `unknown` | The selection's value (the group's `itemValue`, by default the item's own `value`, or the row's `value`). Always present. |
|
|
80
|
+
| `label` | `string` | Resolved display label, once the group has the item. |
|
|
81
|
+
| `description` | `string` | The group's `itemProps.description` (or a literal row's `description`), when it has one. |
|
|
82
|
+
| `original` | `unknown` | The raw item behind the value, once resolved. |
|
|
83
83
|
|
|
84
84
|
## Usage example — picked assignees shown outside the menu
|
|
85
85
|
|
|
@@ -121,7 +121,7 @@ declare const api: { members: { list: () => Promise<Member[]> } };
|
|
|
121
121
|
const assignees = ref<string[]>([]);
|
|
122
122
|
const items: BbDropdownItem[] = [
|
|
123
123
|
{
|
|
124
|
-
|
|
124
|
+
id: 'assignees',
|
|
125
125
|
label: 'Assign to',
|
|
126
126
|
multiple: true,
|
|
127
127
|
items: () => api.members.list(),
|
|
@@ -148,11 +148,11 @@ const emails = computed(() =>
|
|
|
148
148
|
(which you own) — the context never mutates.
|
|
149
149
|
- **Lazy: reading never fetches.** A seeded value in a group that has not
|
|
150
150
|
loaded yet (a pipeline group the user never opened, a search-first group)
|
|
151
|
-
stays `{ value }` with no `
|
|
151
|
+
stays `{ value }` with no `label` until the group loads. Set `prefill: true` on
|
|
152
152
|
that group to resolve a seeded selection eagerly.
|
|
153
153
|
- **Callable before the dropdown mounts.** The handle starts at stable
|
|
154
154
|
baselines (`isReady` / `open` `false`, `groups` `{}`) and fills in when the
|
|
155
|
-
dropdown renders. Guard group lookups with `?.` —
|
|
155
|
+
dropdown renders. Guard group lookups with `?.` — an id is absent until then.
|
|
156
156
|
- **The id is a rendezvous key.** A typo does not error — `isReady` simply never
|
|
157
157
|
turns `true`. Check the spelling against the dropdown's `id` prop first.
|
|
158
158
|
- **Client-side only.** During SSR the handle is detached and empty; wire
|
|
@@ -136,8 +136,12 @@ Returns:
|
|
|
136
136
|
`aria-required` when a `required` rule or the schema makes it mandatory
|
|
137
137
|
(bind them on a role that supports it: textbox, combobox, listbox,
|
|
138
138
|
radiogroup, checkbox) and the marker a failed submit uses to focus the
|
|
139
|
-
first invalid field.
|
|
139
|
+
first invalid field. While the form saves it also carries `aria-readonly`.
|
|
140
140
|
- `errorAttrs` — bind on the element that shows the message (its stable id).
|
|
141
|
+
- `readonly` — `true` while the form saves (a `@submit` promise is pending
|
|
142
|
+
and the form has no `disable-submit-lock`). Act read-only meanwhile: keep
|
|
143
|
+
the control focusable and its value visible, refuse changes. Writes to
|
|
144
|
+
`value` are ignored until it is `false` again.
|
|
141
145
|
|
|
142
146
|
## Related
|
|
143
147
|
|
|
@@ -33,21 +33,21 @@ const tabs = useBbTabsContext<K>(id); // `K` is optional and defaults to `string
|
|
|
33
33
|
- **`id`** — must match the `id` prop on `<BbTabs id="…">` or
|
|
34
34
|
`<BbTabsRoot id="…">`. Give the component an explicit `id`; auto-generated
|
|
35
35
|
ids are not addressable.
|
|
36
|
-
- **`K`** — optional union of the tab
|
|
36
|
+
- **`K`** — optional union of the tab values, narrowing `current` and `select`.
|
|
37
37
|
|
|
38
38
|
### Returned handle (`BbTabsContextHandle<K>`)
|
|
39
39
|
|
|
40
40
|
Individual computed refs and functions — safe to destructure.
|
|
41
41
|
|
|
42
|
-
| Member | Type | Description
|
|
43
|
-
| -------------- | -------------------------------------------------------- |
|
|
44
|
-
| `isReady` | `ComputedRef<boolean>` | Whether a tabs instance with this id is currently mounted.
|
|
45
|
-
| `current` | `WritableComputedRef<K \| null>` | Active tab
|
|
46
|
-
| `currentIndex` | `ComputedRef<number>` | Zero-based index of the active tab (`-1` until mount).
|
|
47
|
-
| `isFirst` | `ComputedRef<boolean>` | Active tab is the first item.
|
|
48
|
-
| `isLast` | `ComputedRef<boolean>` | Active tab is the last item.
|
|
49
|
-
| `goTo` | `(t: 'first' \| 'previous' \| 'next' \| 'last') => void` | Relative navigation; skips `disabled` tabs.
|
|
50
|
-
| `select` | `(
|
|
42
|
+
| Member | Type | Description |
|
|
43
|
+
| -------------- | -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
44
|
+
| `isReady` | `ComputedRef<boolean>` | Whether a tabs instance with this id is currently mounted. |
|
|
45
|
+
| `current` | `WritableComputedRef<K \| null>` | Active tab value (`null` until the tabs mount). **Writable**: assigning a value selects it, exactly like `select(value)`. Setting `null` warns and is ignored — a tab is always selected. |
|
|
46
|
+
| `currentIndex` | `ComputedRef<number>` | Zero-based index of the active tab (`-1` until mount). |
|
|
47
|
+
| `isFirst` | `ComputedRef<boolean>` | Active tab is the first item. |
|
|
48
|
+
| `isLast` | `ComputedRef<boolean>` | Active tab is the last item. |
|
|
49
|
+
| `goTo` | `(t: 'first' \| 'previous' \| 'next' \| 'last') => void` | Relative navigation; skips `disabled` tabs. |
|
|
50
|
+
| `select` | `(value: K) => void` | Select by value. Unknown values warn and leave the selection untouched. |
|
|
51
51
|
|
|
52
52
|
Selection through the handle goes through the tabs' full pipeline: the
|
|
53
53
|
component's `v-model` is emitted, and URL / Inertia navigation runs when the
|
|
@@ -73,12 +73,12 @@ tabs have `navigation` — identical to clicking the trigger.
|
|
|
73
73
|
<BbTabs
|
|
74
74
|
id="settings-tabs"
|
|
75
75
|
:items="[
|
|
76
|
-
{
|
|
77
|
-
{
|
|
78
|
-
{
|
|
76
|
+
{ value: 'general', label: 'General' },
|
|
77
|
+
{ value: 'security', label: 'Security' },
|
|
78
|
+
{ value: 'billing', label: 'Billing' },
|
|
79
79
|
]"
|
|
80
80
|
>
|
|
81
|
-
<!-- one pane slot per
|
|
81
|
+
<!-- one pane slot per value -->
|
|
82
82
|
</BbTabs>
|
|
83
83
|
</template>
|
|
84
84
|
|
|
@@ -12,32 +12,32 @@ Use this contract before generating any UI code with `bitboss-ui`.
|
|
|
12
12
|
The names agents guess most often, and the real ones. There are no aliases:
|
|
13
13
|
a guessed name is an error (`npx bitboss-ui check` or `vue-tsc` says so).
|
|
14
14
|
|
|
15
|
-
| You'd guess | bitboss-ui
|
|
16
|
-
| -------------------------------------------------------------------------------------------- |
|
|
17
|
-
| `toast.success('Saved')`, `{ message }`, `{ description }`, `type` | `const { toast } = useToast(); toast({ title, text, variant: 'success' })`; variants `default` `success` `info` `warning` `destructive`
|
|
18
|
-
| `<BbToastStack>`, a toaster per page | one `<BbToast />` (and one `<BbConfirm />` for `useConfirm`) at the app root
|
|
19
|
-
| BbDialog `v-model:open`, `:open` | `v-model` (a boolean)
|
|
20
|
-
| BbDialog `@close`, `@confirm`, `@cancel`, `#actions` | `@hide` (closing starts) / `@hidden` (closed); your own buttons in `#footer="{ close }"`
|
|
21
|
-
| BbTable `sortable`, `v-model:sorted`, `sort-order`, `@sort` | `sortable: true` per column + `v-model:sort` (a `BbTableSortEntry[]`, `[key, 'asc' \| 'desc']`); the table never sorts: you do
|
|
22
|
-
| `@row-click`, `@row:click` | `@click:row="(event, item) => …"`
|
|
23
|
-
| `row-key` | `item-value`
|
|
24
|
-
| column `title`, `header` | column `label`
|
|
25
|
-
| `#cell:createdAt`, `#createdAt`, `{ row }` | `#<key>` in kebab-case (`createdAt` → `#created-at`), scope `{ item, value }`
|
|
26
|
-
| a column keyed `actions` | reserved: the `#actions="{ item }"` slot creates the actions column
|
|
27
|
-
| BbPagination `current-page`, `v-model:page`, `page-size` | `v-model` (the 1-based page) + `per-page` + `total-items` (or `total-pages`)
|
|
28
|
-
| `BbDateInput` | `BbDatePickerInput`
|
|
29
|
-
| `<BbDropdownItem>`, `<BbTableColumn>` | types, not components: rows are `items` objects (`{
|
|
30
|
-
| BbDropdown `#trigger`, `#button` | `#activator="{ props }"`, spread `v-bind="props"` on your button
|
|
31
|
-
| a menu row's click via `@select` / `@item:selected` | the item's `onClick` (or `href` / `to`); `@item:selected` fires only for `selectable` groups
|
|
32
|
-
| `icon` on BbTextInput / BbDropdownButton, `#icon` on BbButton | `prepend:icon` / `append:icon`; BbButton's `icon` is the icon-only button
|
|
33
|
-
| badge `success` / `warning` / `info` / `danger` | built-ins `primary` `secondary` `destructive` `outline`; register more (§ Variants Rule)
|
|
34
|
-
| BbBadge `text` / `label` prop | the default slot: `<BbBadge>Paid</BbBadge>`
|
|
35
|
-
| `label` on BbCheckboxGroup / BbRadioGroup / BbSwitchGroup / BbRating, a `selectable` BbTable | `legend` (they render a `<fieldset>`; the legend is its name)
|
|
36
|
-
| `{ label, value }` items as they are | `item-text
|
|
37
|
-
| BbSelect `searchable` | search is on by default; `disable-writing` hides it; `multiple` for a multi-select
|
|
38
|
-
| a native `<input>` in a filter bar (to skip the label) | `<BbTextInput label="Search" hide-label />`: the label stays for screen readers
|
|
39
|
-
| `--bb-text-secondary` | `--bb-text-muted`
|
|
40
|
-
| a 422 through each field's `errors` prop | inside `BbForm`: `setErrors(errors)` ([validated-forms § 4](./validated-forms.md#4-server-errors-seterrors-fields-unmatchederrors))
|
|
15
|
+
| You'd guess | bitboss-ui |
|
|
16
|
+
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
17
|
+
| `toast.success('Saved')`, `{ message }`, `{ description }`, `type` | `const { toast } = useToast(); toast({ title, text, variant: 'success' })`; variants `default` `success` `info` `warning` `destructive` |
|
|
18
|
+
| `<BbToastStack>`, a toaster per page | one `<BbToast />` (and one `<BbConfirm />` for `useConfirm`) at the app root |
|
|
19
|
+
| BbDialog `v-model:open`, `:open` | `v-model` (a boolean) |
|
|
20
|
+
| BbDialog `@close`, `@confirm`, `@cancel`, `#actions` | `@hide` (closing starts) / `@hidden` (closed); your own buttons in `#footer="{ close }"` |
|
|
21
|
+
| BbTable `sortable`, `v-model:sorted`, `sort-order`, `@sort` | `sortable: true` per column + `v-model:sort` (a `BbTableSortEntry[]`, `[key, 'asc' \| 'desc']`); the table never sorts: you do |
|
|
22
|
+
| `@row-click`, `@row:click` | `@click:row="(event, item) => …"` |
|
|
23
|
+
| `row-key` | `item-value` |
|
|
24
|
+
| column `title`, `header` | column `label` |
|
|
25
|
+
| `#cell:createdAt`, `#createdAt`, `{ row }` | `#<key>` in kebab-case (`createdAt` → `#created-at`), scope `{ item, value }` |
|
|
26
|
+
| a column keyed `actions` | reserved: the `#actions="{ item }"` slot creates the actions column |
|
|
27
|
+
| BbPagination `current-page`, `v-model:page`, `page-size` | `v-model` (the 1-based page) + `per-page` + `total-items` (or `total-pages`) |
|
|
28
|
+
| `BbDateInput` | `BbDatePickerInput` |
|
|
29
|
+
| `<BbDropdownItem>`, `<BbTableColumn>` | types, not components: rows are `items` objects (`{ value, label, onClick }`), columns are `columns` objects |
|
|
30
|
+
| BbDropdown `#trigger`, `#button` | `#activator="{ props }"`, spread `v-bind="props"` on your button |
|
|
31
|
+
| a menu row's click via `@select` / `@item:selected` | the item's `onClick` (or `href` / `to`); `@item:selected` fires only for `selectable` groups |
|
|
32
|
+
| `icon` on BbTextInput / BbDropdownButton, `#icon` on BbButton | `prepend:icon` / `append:icon`; BbButton's `icon` is the icon-only button |
|
|
33
|
+
| badge `success` / `warning` / `info` / `danger` | built-ins `primary` `secondary` `destructive` `outline`; register more (§ Variants Rule) |
|
|
34
|
+
| BbBadge `text` / `label` prop | the default slot: `<BbBadge>Paid</BbBadge>` |
|
|
35
|
+
| `label` on BbCheckboxGroup / BbRadioGroup / BbSwitchGroup / BbRating, a `selectable` BbTable | `legend` (they render a `<fieldset>`; the legend is its name) |
|
|
36
|
+
| `{ label, value }` items as they are | they work as they are, and so do `{ text, value }`: any other shape needs `item-text` / `item-value` (BbSelect, BbSelectPopover, the groups) |
|
|
37
|
+
| BbSelect `searchable` | search is on by default; `disable-writing` hides it; `multiple` for a multi-select |
|
|
38
|
+
| a native `<input>` in a filter bar (to skip the label) | `<BbTextInput label="Search" hide-label />`: the label stays for screen readers |
|
|
39
|
+
| `--bb-text-secondary` | `--bb-text-muted` |
|
|
40
|
+
| a 422 through each field's `errors` prop | inside `BbForm`: `setErrors(errors)` ([validated-forms § 4](./validated-forms.md#4-server-errors-seterrors-fields-unmatchederrors)) |
|
|
41
41
|
|
|
42
42
|
## Default API Boundary
|
|
43
43
|
|
|
@@ -213,7 +213,7 @@ recipe's conformance checklist.
|
|
|
213
213
|
|
|
214
214
|
For components accepting `items`:
|
|
215
215
|
|
|
216
|
-
- prefer declarative mapping with `item-text` and `item-value
|
|
216
|
+
- prefer declarative mapping with `item-text` and `item-value` (none when the items already carry `label` and `value`: never restate the default);
|
|
217
217
|
- use `dependencies` and `deps-debounce-time` for tied fields;
|
|
218
218
|
- use `enforce-coherence` instead of custom watchers for stale model cleanup;
|
|
219
219
|
- to style a row BY ITS DATA (a destructive entry, a tile by tier, a row by
|
|
@@ -102,7 +102,7 @@ inline-edit playbook) instead of inventing a new shape.
|
|
|
102
102
|
| ⌘K / Ctrl+K global command palette | [BbSelectPopover](../BbSelectPopover.md#a-k-command-palette) § A ⌘K command palette |
|
|
103
103
|
| Tied selects / stale model cleanup | [coherence-playbook](./coherence-playbook.md) |
|
|
104
104
|
| Async `items` providers / prefill | [fetch-items-playbook](./fetch-items-playbook.md) |
|
|
105
|
-
| `item-text` / `item-value` / disabled
|
|
105
|
+
| `item-text` / `item-value` / the default `label` / `value` keys / disabled | [options-items-playbook](./options-items-playbook.md) |
|
|
106
106
|
| Table cell edit ownership | [inline-edit-playbook](./inline-edit-playbook.md) |
|
|
107
107
|
| Table row → detail (identity cells) | [agent-contract](./agent-contract.md) § Inline Links |
|
|
108
108
|
| Peek that drills into related records | [agent-contract](./agent-contract.md) § Consult-Stack |
|
|
@@ -254,7 +254,7 @@ compose it or write it yourself.
|
|
|
254
254
|
| `useLiveFeed` / any polling or cross-tab feed helper | Does not exist, and neither does a cross-tab helper — `useBroadcastChannelInstance` was removed (cross-tab messaging is not a UI concern). Use `useBroadcastChannel` from `@vueuse/core`; the polling and the merge are yours. |
|
|
255
255
|
| `BbStepper` / `BbWizard` | Does not exist as a component; the wizard-form recipe under `recipes/<platform>/wizard-form.md` ([Vue](../recipes/vue/wizard-form.md) · [Nuxt](../recipes/nuxt/wizard-form.md) · [Inertia](../recipes/inertia/wizard-form.md)) composes one. |
|
|
256
256
|
| `BbSkeleton` (standalone) | Only `BbTable` ships skeletons, via the column `skeleton` field. |
|
|
257
|
-
| `BbWorkspaceSwitcher` / `BbTeamSwitcher` / `BbAccountSwitcher` / org, tenant or project switcher | Does not exist as a component — it is a [BbDropdown](../BbDropdown.md) pattern: a row for the current record whose submenu is a `selectable` (single), `searchable`, fetched group bound to the current id with `<BbDropdownGroup v-model>`. Carry each record to the slots with `meta` (`itemProps: (w) => ({ meta: w })`) and draw it with `#<
|
|
257
|
+
| `BbWorkspaceSwitcher` / `BbTeamSwitcher` / `BbAccountSwitcher` / org, tenant or project switcher | Does not exist as a component — it is a [BbDropdown](../BbDropdown.md) pattern: a row for the current record whose submenu is a `selectable` (single), `searchable`, fetched group bound to the current id with `<BbDropdownGroup v-model>`. Carry each record to the slots with `meta` (`itemProps: (w) => ({ meta: w })`) and draw it with `#<groupId>:item:prepend`, so the other rows keep their icons. See BbDropdown.md § Rows that stand for records. |
|
|
258
258
|
| `BbCommand` / command palette | Does not exist. Compose `BbDialog` + `BbSelectPopover` — do not hand-roll the search: [BbSelectPopover § A ⌘K command palette](../BbSelectPopover.md#a-k-command-palette) is the worked example (⌘K / Ctrl+K, grouped server results, debouncing and race protection from the popover, navigation per platform). |
|
|
259
259
|
| `BbSeatMap` / `BbSeatPicker` / `BbSeatGrid` / a seat map, desk or parking-bay picker | Does not exist, on purpose (a niche need), and there is no recipe for it. Build it in your app as a WAI-ARIA grid with one tab stop (roving `tabindex`, arrow keys move between positions) styled with the library tokens; do not give every seat its own tab stop. |
|
|
260
260
|
| `BbCalendar` as a scheduling / events view | [BbCalendar](../BbCalendar.md) is the picker's calendar rendered in place — a value control (day, range, set, month, year, datetime), not an events grid. Put per-day content in its `#day` / `#day:append` slots; an agenda or booking board is your own layout around it. |
|
|
@@ -273,13 +273,13 @@ recipe under `recipes/<platform>/layout-scaffold.md` ([Vue](../recipes/vue/layou
|
|
|
273
273
|
|
|
274
274
|
## Item-Driven Components
|
|
275
275
|
|
|
276
|
-
The following components accept an `items` prop (array or async provider function)
|
|
276
|
+
The following components accept an `items` prop (array or async provider function): object items are read through their own `label` (else `text`) and `value`, or through `item-text`/`item-value` when your fields are named otherwise. Consult the items playbooks before wiring them:
|
|
277
277
|
|
|
278
278
|
- [BbSelect](../BbSelect.md), [BbSelectPopover](../BbSelectPopover.md)
|
|
279
279
|
- [BbCheckboxGroup](../BbCheckboxGroup.md), [BbRadioGroup](../BbRadioGroup.md), [BbSwitchGroup](../BbSwitchGroup.md)
|
|
280
280
|
- [BbTable](../BbTable.md)
|
|
281
281
|
|
|
282
|
-
`BbDropdown`, `BbBreadcrumbs`, `BbTabs`, and `BbTree` are also declared through `items`, but with typed item objects (label
|
|
282
|
+
`BbDropdown`, `BbBreadcrumbs`, `BbTabs`, and `BbTree` are also declared through `items`, but with typed item objects (`value`/`label`/`href`/…) rather than arbitrary domain objects. `BbDropdown` bridges the two: a fetched group reads `label` / `value` like the pickers, or maps domain objects through `itemText` / `itemValue` / `itemProps`, and any row carries its domain object to the slots in `meta`.
|
|
283
283
|
|
|
284
284
|
See:
|
|
285
285
|
|
|
@@ -116,7 +116,7 @@ const searchMembers = async ({
|
|
|
116
116
|
};
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
-
Single select: normalize before the ids request — `const ids = Array.isArray(modelValue) ? modelValue : modelValue == null || modelValue === '' ? [] : [modelValue]`. Search-first: `if (reason === 'search' && !query.trim()) return []`. Dedupe on the field
|
|
119
|
+
Single select: normalize before the ids request — `const ids = Array.isArray(modelValue) ? modelValue : modelValue == null || modelValue === '' ? [] : [modelValue]`. Search-first: `if (reason === 'search' && !query.trim()) return []`. Dedupe on the field that is the option's value (`item-value`, or the own `value` key when you pass none). **The merge is select-only**: a table provider returns the page as it is.
|
|
120
120
|
|
|
121
121
|
### `signal`
|
|
122
122
|
|
|
@@ -128,7 +128,7 @@ exists.
|
|
|
128
128
|
```html
|
|
129
129
|
<BbDropdownButton
|
|
130
130
|
prepend:icon="lucide:download"
|
|
131
|
-
:items="[{
|
|
131
|
+
:items="[{ value: 'export', label: 'Export' }, ...exportFormats]"
|
|
132
132
|
/>
|
|
133
133
|
```
|
|
134
134
|
|
|
@@ -187,10 +187,10 @@ clear/stepper/toggle controls — prefer `prepend:icon` when in doubt):
|
|
|
187
187
|
|
|
188
188
|
```ts
|
|
189
189
|
const memberActions = [
|
|
190
|
-
{
|
|
190
|
+
{ value: 'edit', label: 'Edit member', 'prepend:icon': 'lucide:pencil' },
|
|
191
191
|
{
|
|
192
|
-
|
|
193
|
-
|
|
192
|
+
value: 'delete',
|
|
193
|
+
label: 'Delete',
|
|
194
194
|
variant: 'destructive',
|
|
195
195
|
'prepend:icon': 'lucide:trash-2',
|
|
196
196
|
},
|
|
@@ -205,19 +205,19 @@ the same way.
|
|
|
205
205
|
These surfaces take arbitrary content, so you place a `BbIcon` (or richer
|
|
206
206
|
markup) yourself:
|
|
207
207
|
|
|
208
|
-
- `BbTabs` / `BbTabsList` — per-tab `<
|
|
208
|
+
- `BbTabs` / `BbTabsList` — per-tab `<value>:label` slot (or the generic `label`
|
|
209
209
|
fallback):
|
|
210
210
|
|
|
211
211
|
```html
|
|
212
212
|
<BbTabs v-model="tab" :items="tabs">
|
|
213
|
-
<template #billing:label="{
|
|
214
|
-
<BbIcon icon="lucide:file-text" size="sm" /> {{
|
|
213
|
+
<template #billing:label="{ label }">
|
|
214
|
+
<BbIcon icon="lucide:file-text" size="sm" /> {{ label }}
|
|
215
215
|
</template>
|
|
216
216
|
</BbTabs>
|
|
217
217
|
```
|
|
218
218
|
|
|
219
219
|
- `BbBreadcrumbs` — `item:prepend` / `item:append` around every item, or a
|
|
220
|
-
named slot per `item.
|
|
220
|
+
named slot per `item.value` to replace one item's content:
|
|
221
221
|
|
|
222
222
|
```html
|
|
223
223
|
<BbBreadcrumbs :items="trail">
|
|
@@ -242,8 +242,8 @@ markup) yourself:
|
|
|
242
242
|
- `BbSwitch` — the `icon` slot replaces the toggle track visual (rarely
|
|
243
243
|
needed; the default track is correct for almost every case).
|
|
244
244
|
- `BbDropdown` — `item:prepend` / `item:append`, one group's
|
|
245
|
-
`<
|
|
246
|
-
`<
|
|
245
|
+
`<groupId>:item:prepend` / `:append`, or per-entry `<value>:prepend` /
|
|
246
|
+
`<value>:append` slots, when an entry's leading/trailing region needs more than
|
|
247
247
|
a named icon (e.g. an avatar). A slot replaces the icon, never sits beside it.
|
|
248
248
|
|
|
249
249
|
## Sizing and color
|