bitboss-ui 3.0.0-beta.63 → 3.0.0-beta.65
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 +25 -20
- package/bin/bitboss-ui.mjs +73 -7
- package/dist/ai/BbAlert.md +10 -1
- package/dist/ai/BbBadge.md +35 -3
- package/dist/ai/BbBadgeButton.md +4 -2
- package/dist/ai/BbBaseButton.md +9 -3
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +113 -8
- package/dist/ai/BbCheckbox.md +1 -1
- package/dist/ai/BbCheckboxGroup.md +94 -6
- package/dist/ai/BbColorInput.md +4 -1
- package/dist/ai/BbColorPalette.md +2 -1
- package/dist/ai/BbConfirm.md +7 -3
- package/dist/ai/BbDatePicker.md +2 -1
- package/dist/ai/BbDatePickerInput.md +4 -1
- package/dist/ai/BbDialog.md +12 -11
- package/dist/ai/BbDropdown.md +189 -38
- package/dist/ai/BbDropdownButton.md +27 -7
- package/dist/ai/BbForm.md +55 -22
- package/dist/ai/BbHost.md +2 -2
- package/dist/ai/BbHoverCard.md +7 -3
- package/dist/ai/BbIcon.md +12 -6
- package/dist/ai/BbIndicator.md +11 -1
- package/dist/ai/BbNumberInput.md +4 -1
- package/dist/ai/BbOffCanvas.md +37 -3
- package/dist/ai/BbPopover.md +2 -1
- package/dist/ai/BbRadio.md +1 -1
- package/dist/ai/BbRadioGroup.md +102 -10
- package/dist/ai/BbSelect.md +52 -17
- package/dist/ai/BbSelectPopover.md +93 -26
- package/dist/ai/BbSwitch.md +1 -1
- package/dist/ai/BbSwitchGroup.md +30 -3
- package/dist/ai/BbTable.md +17 -10
- package/dist/ai/BbTabs.md +8 -3
- package/dist/ai/BbTabsList.md +4 -1
- package/dist/ai/BbTag.md +5 -2
- package/dist/ai/BbTextInput.md +4 -1
- package/dist/ai/BbTextarea.md +4 -1
- package/dist/ai/BbTimePicker.md +2 -1
- package/dist/ai/BbTimePickerInput.md +4 -1
- package/dist/ai/BbToast.md +9 -3
- package/dist/ai/BbTooltip.md +71 -9
- package/dist/ai/ChipsBox.md +1 -1
- package/dist/ai/CommonField.md +1 -1
- package/dist/ai/OptionsContainer.md +42 -0
- package/dist/ai/changelog.json +494 -6
- package/dist/ai/components.json +50 -48
- package/dist/ai/composables/useBbConfig.md +8 -1
- package/dist/ai/composables/useConfirm.md +39 -1
- package/dist/ai/design-tokens.json +6 -6
- package/dist/ai/guides/agent-contract.md +2 -2
- package/dist/ai/guides/ai-router.md +24 -23
- package/dist/ai/guides/app-layout.md +5 -0
- package/dist/ai/guides/component-picker.md +9 -2
- package/dist/ai/guides/design-language.md +24 -24
- package/dist/ai/guides/design-tokens.md +15 -8
- package/dist/ai/guides/icons-policy.md +9 -2
- package/dist/ai/guides/inertia-helpers.md +1183 -301
- package/dist/ai/guides/installation-and-plugin-setup.md +12 -2
- package/dist/ai/guides/migration/adoption-checklist.md +235 -0
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +16 -15
- package/dist/ai/guides/migration/components/bb-dialog.md +9 -9
- package/dist/ai/guides/migration/components/bb-dropdown.md +7 -2
- package/dist/ai/guides/migration/components/bb-popover.md +4 -2
- package/dist/ai/guides/migration/components/bb-select.md +19 -0
- package/dist/ai/guides/migration/components/bb-table.md +1 -0
- package/dist/ai/guides/migration/components/bb-toast.md +4 -0
- package/dist/ai/guides/migration/components/bb-tooltip.md +15 -12
- package/dist/ai/guides/migration/components/use-confirm.md +25 -2
- package/dist/ai/guides/migration/v2-to-v3.md +211 -9
- package/dist/ai/guides/migration/v3-beta-css-classes.md +7 -3
- package/dist/ai/guides/options-items-playbook.md +2 -1
- package/dist/ai/guides/passthrough.md +149 -85
- package/dist/ai/guides/preset-components.md +140 -15
- package/dist/ai/helpers/definePreset.json +7 -0
- package/dist/ai/helpers/definePreset.ts +123 -11
- package/dist/ai/helpers/inertia/manifest.json +151 -62
- package/dist/ai/helpers/inertia/messages.ts +33 -0
- package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +120 -20
- package/dist/ai/helpers/inertia/useHasChanged.ts +34 -16
- package/dist/ai/helpers/inertia/useLazyProp.ts +102 -36
- package/dist/ai/helpers/inertia/useLazyPropGetter.ts +3 -1
- package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +154 -34
- package/dist/ai/helpers/inertia/usePromiseForm.ts +121 -14
- package/dist/ai/helpers/inertia/useQuery.ts +133 -11
- package/dist/ai/helpers/inertia/useQueryObject.ts +74 -67
- package/dist/ai/helpers/inertia/useResourceContext.ts +60 -14
- package/dist/ai/helpers/inertia/useRouteQuery.ts +38 -27
- package/dist/ai/helpers/inertia/useScreenSizes.ts +9 -7
- package/dist/ai/helpers/inertia/useTableContext.ts +5 -2
- package/dist/ai/helpers/inertia/utils.ts +14 -0
- package/dist/ai/index.md +1 -0
- package/dist/ai/manifest/common.json +0 -1
- package/dist/ai/manifest/components/BbAlert.json +7 -2
- package/dist/ai/manifest/components/BbBadge.json +13 -4
- package/dist/ai/manifest/components/BbBadge.tree.json +2 -0
- package/dist/ai/manifest/components/BbBadgeButton.json +4 -2
- package/dist/ai/manifest/components/BbBaseButton.json +4 -2
- package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
- package/dist/ai/manifest/components/BbButton.json +14 -3
- package/dist/ai/manifest/components/BbButton.tree.json +5 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.json +13 -8
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +11 -1
- package/dist/ai/manifest/components/BbColorInput.json +18 -15
- package/dist/ai/manifest/components/BbColorPalette.json +1 -1
- package/dist/ai/manifest/components/BbConfirm.json +4 -2
- package/dist/ai/manifest/components/BbConfirm.tree.json +1 -1
- package/dist/ai/manifest/components/BbDatePicker.json +1 -1
- package/dist/ai/manifest/components/BbDatePickerInput.json +17 -14
- package/dist/ai/manifest/components/BbDialog.tree.json +2 -1
- package/dist/ai/manifest/components/BbDropdown.json +24 -19
- package/dist/ai/manifest/components/BbDropdown.tree.json +9 -2
- package/dist/ai/manifest/components/BbDropdownButton.json +33 -20
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -2
- package/dist/ai/manifest/components/BbForm.json +2 -2
- package/dist/ai/manifest/components/BbHost.tree.json +1 -1
- package/dist/ai/manifest/components/BbHoverCard.json +1 -1
- package/dist/ai/manifest/components/BbIndicator.json +8 -2
- package/dist/ai/manifest/components/BbNumberInput.json +5 -2
- package/dist/ai/manifest/components/BbOffCanvas.json +2 -2
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +1 -1
- package/dist/ai/manifest/components/BbPopover.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +17 -12
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +8 -1
- package/dist/ai/manifest/components/BbSelect.json +21 -18
- package/dist/ai/manifest/components/BbSelect.tree.json +2 -2
- package/dist/ai/manifest/components/BbSelectPopover.json +10 -10
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +3 -2
- package/dist/ai/manifest/components/BbSwitchGroup.json +1 -1
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +3 -1
- package/dist/ai/manifest/components/BbTable.tree.json +14 -1
- package/dist/ai/manifest/components/BbTabs.json +9 -6
- package/dist/ai/manifest/components/BbTabs.tree.json +1 -1
- package/dist/ai/manifest/components/BbTabsList.json +6 -3
- package/dist/ai/manifest/components/BbTag.json +19 -16
- package/dist/ai/manifest/components/BbTag.tree.json +1 -1
- package/dist/ai/manifest/components/BbTextInput.json +6 -3
- package/dist/ai/manifest/components/BbTextarea.json +6 -3
- package/dist/ai/manifest/components/BbTimePicker.json +1 -1
- package/dist/ai/manifest/components/BbTimePickerInput.json +10 -7
- package/dist/ai/manifest/components/BbToast.json +7 -2
- package/dist/ai/manifest/components/BbToast.tree.json +4 -2
- package/dist/ai/manifest/components/BbTooltip.json +6 -5
- package/dist/ai/manifest/components/ChipsBox.tree.json +1 -1
- package/dist/ai/manifest/components/CommonField.json +1 -1
- package/dist/ai/manifest/components/OptionsContainer.json +3 -1
- package/dist/ai/manifest/components/OptionsContainer.tree.json +38 -0
- package/dist/ai/manifest/index.json +3 -3
- package/dist/ai/manifest/meta.json +5 -3
- package/dist/ai/manifest/types.advanced.json +5 -2
- package/dist/ai/manifest/types.api.json +9 -7
- package/dist/ai/recipes/inertia/approvals-inbox.md +1 -1
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/inertia/layout-scaffold.md +19 -6
- package/dist/ai/recipes/inertia/ownership-atlas.md +1 -1
- package/dist/ai/recipes/inertia/records-workspace.md +50 -14
- package/dist/ai/recipes/inertia/upload-center.md +1 -1
- package/dist/ai/recipes/nuxt/layout-scaffold.md +19 -6
- package/dist/ai/recipes/nuxt/records-workspace.md +42 -12
- package/dist/ai/recipes/vue/layout-scaffold.md +19 -6
- package/dist/ai/recipes/vue/records-workspace.md +42 -12
- package/dist/ai/source/BbAlert.md +94 -76
- package/dist/ai/source/BbBadge.md +174 -72
- package/dist/ai/source/BbBadgeButton.md +130 -65
- package/dist/ai/source/BbBaseButton.md +46 -124
- package/dist/ai/source/BbBaseCheckboxIcon.md +38 -0
- package/dist/ai/source/BbBaseRadioIcon.md +18 -0
- package/dist/ai/source/BbBaseSwitchIcon.md +51 -0
- package/dist/ai/source/BbButton.md +153 -36
- package/dist/ai/source/BbCheckboxGroup.md +142 -18
- package/dist/ai/source/BbColorInput.md +240 -204
- package/dist/ai/source/BbColorPalette.md +7 -4
- package/dist/ai/source/BbConfirm.md +34 -11
- package/dist/ai/source/BbConfirmPortal.md +24 -9
- package/dist/ai/source/BbDatePicker.md +11 -7
- package/dist/ai/source/BbDatePickerInput.md +306 -269
- package/dist/ai/source/BbDialog.md +49 -14
- package/dist/ai/source/BbDropdown.md +314 -197
- package/dist/ai/source/BbDropdownButton.md +197 -31
- package/dist/ai/source/BbDropdownGroup.md +274 -176
- package/dist/ai/source/BbForm.md +50 -6
- package/dist/ai/source/BbHoverCard.md +12 -5
- package/dist/ai/source/BbIcon.md +4 -3
- package/dist/ai/source/BbIndicator.md +73 -52
- package/dist/ai/source/BbNumberInput.md +293 -257
- package/dist/ai/source/BbOffCanvas.md +55 -29
- package/dist/ai/source/BbPopover.md +14 -10
- package/dist/ai/source/BbRadioGroup.md +413 -297
- package/dist/ai/source/BbSelect.md +549 -435
- package/dist/ai/source/BbSelectPopover.md +153 -34
- package/dist/ai/source/BbSwitchGroup.md +70 -10
- package/dist/ai/source/BbTable.md +369 -37
- package/dist/ai/source/BbTabs.md +115 -39
- package/dist/ai/source/BbTabsList.md +106 -38
- package/dist/ai/source/BbTabsPanels.md +96 -36
- package/dist/ai/source/BbTabsRoot.md +96 -36
- package/dist/ai/source/BbTag.md +267 -233
- package/dist/ai/source/BbTextInput.md +261 -225
- package/dist/ai/source/BbTextarea.md +251 -215
- package/dist/ai/source/BbTimePicker.md +11 -7
- package/dist/ai/source/BbTimePickerInput.md +257 -220
- package/dist/ai/source/BbToast.md +73 -32
- package/dist/ai/source/BbToastPortal.md +65 -30
- package/dist/ai/source/BbTooltip.md +148 -113
- package/dist/ai/source/CommonPopover.md +6 -1
- package/dist/ai/source/FlatListBox.md +19 -9
- package/dist/ai/source/GroupedListBox.md +19 -9
- package/dist/ai/source/OptionsContainer.md +25 -9
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +61 -36
- package/dist/components/BbAlert/types.d.ts +9 -5
- package/dist/components/BbAlert/types.js +8 -3
- package/dist/components/BbBadge/BadgeBodyContent.vue.d.ts +3 -3
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +26 -17
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +103 -50
- package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +20 -15
- package/dist/components/BbBadge/badgeButtonContext.d.ts +12 -1
- package/dist/components/BbBadge/types.d.ts +45 -15
- package/dist/components/BbBadge/types.js +12 -3
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +89 -126
- package/dist/components/BbBaseButton/types.d.ts +23 -4
- package/dist/components/BbBaseButton/types.js +7 -1
- package/dist/components/BbBaseButton/useLinkState.d.ts +41 -0
- package/dist/components/BbBaseButton/useLinkState.js +70 -0
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +130 -74
- package/dist/components/BbButton/types.d.ts +50 -13
- package/dist/components/BbButton/types.js +10 -3
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +148 -95
- package/dist/components/BbCheckboxGroup/types.d.ts +34 -11
- package/dist/components/BbCheckboxGroup/types.js +9 -4
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +1 -1
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +134 -93
- package/dist/components/BbColorInput/types.d.ts +11 -4
- package/dist/components/BbColorInput/types.js +9 -3
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +82 -59
- package/dist/components/BbConfirm/types.d.ts +9 -4
- package/dist/components/BbConfirm/types.js +8 -3
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +68 -67
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +1 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +259 -215
- package/dist/components/BbDatePickerInput/types.d.ts +12 -5
- package/dist/components/BbDatePickerInput/types.js +9 -3
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +223 -219
- package/dist/components/BbDialog/useDialogStack.d.ts +1 -1
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +104 -89
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +1 -0
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +323 -285
- package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +1 -0
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +411 -319
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +100 -98
- package/dist/components/BbDropdown/DropdownRow.vue.d.ts +4 -3
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +49 -28
- package/dist/components/BbDropdown/normalizeGroups.d.ts +6 -0
- package/dist/components/BbDropdown/normalizeGroups.js +21 -15
- package/dist/components/BbDropdown/types.d.ts +59 -12
- package/dist/components/BbDropdown/types.js +16 -3
- package/dist/components/BbDropdown/useDropdownContext.d.ts +6 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -1
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +179 -68
- package/dist/components/BbDropdownButton/types.d.ts +44 -16
- package/dist/components/BbDropdownButton/types.js +28 -3
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +111 -89
- package/dist/components/BbForm/formSchema.d.ts +13 -0
- package/dist/components/BbHoverCard/BbHoverCard.vue_vue_type_script_setup_true_lang.js +100 -100
- package/dist/components/BbIndicator/BbIndicator.vue_vue_type_script_setup_true_lang.js +40 -25
- package/dist/components/BbIndicator/types.d.ts +9 -5
- package/dist/components/BbIndicator/types.js +8 -3
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +243 -202
- package/dist/components/BbNumberInput/types.d.ts +12 -5
- package/dist/components/BbNumberInput/types.js +9 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +401 -399
- package/dist/components/BbOffCanvas/types.d.ts +6 -2
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +81 -80
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +158 -105
- package/dist/components/BbRadioGroup/types.d.ts +21 -7
- package/dist/components/BbRadioGroup/types.js +9 -4
- package/dist/components/BbSelect/BbSelect.vue.d.ts +4 -3
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +181 -137
- package/dist/components/BbSelect/types.d.ts +36 -22
- package/dist/components/BbSelect/types.js +22 -3
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +4 -4
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +600 -577
- package/dist/components/BbSelectPopover/knownItems.d.ts +5 -0
- package/dist/components/BbSelectPopover/types.d.ts +46 -12
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +1 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbSwitchGroup/types.d.ts +14 -4
- package/dist/components/BbSwitchGroup/types.js +8 -3
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1102 -995
- package/dist/components/BbTable/estimatedFloors.golden.d.ts +25 -0
- package/dist/components/BbTable/measuredFloors.d.ts +46 -0
- package/dist/components/BbTable/measuredFloors.js +322 -0
- package/dist/components/BbTable/measuredFloorsTestKit.d.ts +27 -0
- package/dist/components/BbTable/textRuler.d.ts +71 -0
- package/dist/components/BbTable/textRuler.js +121 -0
- package/dist/components/BbTable/utils.d.ts +113 -6
- package/dist/components/BbTable/utils.js +118 -65
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +53 -35
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +62 -45
- package/dist/components/BbTabs/types.d.ts +26 -11
- package/dist/components/BbTabs/types.js +23 -8
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +205 -164
- package/dist/components/BbTag/types.d.ts +11 -4
- package/dist/components/BbTag/types.js +9 -3
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +98 -57
- package/dist/components/BbTextInput/types.d.ts +12 -5
- package/dist/components/BbTextInput/types.js +9 -3
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +137 -96
- package/dist/components/BbTextarea/types.d.ts +12 -5
- package/dist/components/BbTextarea/types.js +9 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +105 -104
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +241 -197
- package/dist/components/BbTimePickerInput/types.d.ts +12 -5
- package/dist/components/BbTimePickerInput/types.js +9 -3
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +74 -32
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +47 -47
- package/dist/components/BbToast/types.d.ts +10 -5
- package/dist/components/BbToast/types.js +18 -3
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +85 -71
- package/dist/components/BbTooltip/types.d.ts +13 -8
- package/dist/components/BbTooltip/types.js +8 -3
- package/dist/components/CommonField/CommonField.vue.d.ts +1 -1
- package/dist/components/CommonPopover/CommonPopover.vue.d.ts +1 -1
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +69 -69
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +53 -50
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +146 -143
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +7 -2
- package/dist/components/OptionsContainer/types.d.ts +14 -3
- package/dist/composables/useBbConfig.d.ts +1 -0
- package/dist/composables/useBbConfig.js +11 -7
- package/dist/composables/useBbFormContext.d.ts +4 -3
- package/dist/composables/useBbTabsContext.js +99 -85
- package/dist/composables/useChoiceIndicator.d.ts +58 -0
- package/dist/composables/useChoiceIndicator.js +197 -0
- package/dist/composables/useConfirm.d.ts +4 -4
- package/dist/composables/usePassthrough.d.ts +54 -1
- package/dist/composables/usePassthrough.js +100 -71
- package/dist/directives/bbTooltip.d.ts +12 -6
- package/dist/directives/createPopoverDirective.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/llms-full.txt +3467 -801
- package/dist/llms-medium.txt +71 -53
- package/dist/llms.txt +2 -1
- package/dist/passthrough-deduper.js +6 -3
- package/dist/project-dts.d.ts +24 -0
- package/dist/project-dts.js +43 -17
- package/dist/styles.css +2 -2
- package/dist/types/AlertVariant.d.ts +14 -0
- package/dist/types/AlertVariant.js +9 -0
- package/dist/types/BadgeVariant.d.ts +14 -0
- package/dist/types/BadgeVariant.js +9 -0
- package/dist/types/ButtonVariant.d.ts +16 -0
- package/dist/types/ButtonVariant.js +11 -0
- package/dist/types/CheckboxVariant.d.ts +38 -0
- package/dist/types/CheckboxVariant.js +4 -0
- package/dist/types/CommonProps.d.ts +4 -3
- package/dist/types/Config.d.ts +7 -0
- package/dist/types/ConfirmVariant.d.ts +12 -0
- package/dist/types/ConfirmVariant.js +4 -0
- package/dist/types/DropdownItemVariant.d.ts +12 -0
- package/dist/types/DropdownItemVariant.js +4 -0
- package/dist/types/IndicatorVariant.d.ts +15 -0
- package/dist/types/IndicatorVariant.js +10 -0
- package/dist/types/InputVariant.d.ts +13 -0
- package/dist/types/InputVariant.js +8 -0
- package/dist/types/RadioVariant.d.ts +38 -0
- package/dist/types/RadioVariant.js +4 -0
- package/dist/types/TabsVariant.d.ts +13 -0
- package/dist/types/TabsVariant.js +8 -0
- package/dist/types/ToastVariant.d.ts +15 -0
- package/dist/types/ToastVariant.js +10 -0
- package/dist/types/TooltipVariant.d.ts +12 -0
- package/dist/types/TooltipVariant.js +4 -0
- package/dist/types/passthrough.d.ts +83 -15
- package/dist/types/passthrough.js +2 -2
- package/dist/types/ptComponentMap.d.ts +35 -23
- package/dist/utilities/functions/extractDomContainer.d.ts +20 -1
- package/dist/utilities/functions/extractDomContainer.js +8 -3
- package/dist/utils/focusVisibility.d.ts +6 -0
- package/dist/utils/focusVisibility.js +4 -1
- package/dist/utils/passthroughDeduper.d.ts +14 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +64 -7
- package/dist/vite.js +385 -259
- package/llms.txt +2 -1
- package/package.json +5 -4
- package/scripts/lib/adoption-checklist.json +312 -0
- package/scripts/lib/eslint-plugin.d.ts +13 -0
- package/scripts/lib/eslint-plugin.mjs +75 -11
- package/scripts/lib/helpers-add.mjs +26 -2
- package/scripts/lib/idiom-scan.mjs +65 -0
- package/scripts/lib/mcp-config.mjs +203 -9
- package/scripts/lib/migrate-fix.mjs +42 -1
- package/scripts/lib/project-variant-dts.mjs +18 -0
- package/scripts/lib/validate-bb-markup.mjs +99 -2
package/dist/ai/BbHost.md
CHANGED
|
@@ -143,10 +143,10 @@ without a mismatch.
|
|
|
143
143
|
- Listed nodes are the ones `BbHost`'s API reaches or that declare a documented CSS variable; the rest fold into "also mounts". The complete tree, repeats and undocumented locals included, is `manifest/components/BbHost.tree.json`.
|
|
144
144
|
|
|
145
145
|
- `BbHost` _(this component)_
|
|
146
|
-
- `BbToast` _(internal — not importable, reach it through `BbToast`)_ — documented CSS variables: `--gap`, `--offset`, `--width`, `--lift`, `--stack-y`, `--stack-scale`, `--enter-y`, `--swipe-amount`, `--z`, `--r`, `--ring-size`, `--bg`, `--border-color`, `--fg`, `--icon-color`
|
|
146
|
+
- `BbToast` _(internal — not importable, reach it through `BbToast`)_ — documented CSS variables: `--gap`, `--offset`, `--width`, `--lift`, `--stack-y`, `--stack-scale`, `--enter-y`, `--swipe-amount`, `--z`, `--r`, `--ring-size`, `--bg`, `--border-color`, `--bw`, `--fg`, `--icon-color`
|
|
147
147
|
- `BbToastRegion` _(internal — not importable, reach it through `BbToast`)_ — its own pt parts (`BbToast`): `root` → `ol.bb-toast`
|
|
148
148
|
- `BbToastMessage` _(internal — not importable, reach it through `BbToast`)_ — also mounts `BbIcon`, `BbSpinner`
|
|
149
|
-
- `BbButton` _(public — [contract](./BbButton.md))_ — its own pt parts (`BbButton`): `root` → `BbBaseButton`, `spinner` → `BbSpinner`, `icon` → `BbIcon`, `text` → `span.bb-button__text`; documented CSS variables: `--h-xs`, `--h`, `--icon-size`, `--px`, `--fs`, `--r`, `--gap`, `--bg`, `--bg-hover`, `--bg-pressed`, `--fg`, `--border-color`, `--ring-color`, `--ring-size`, `--bw`, `--fg-hover`, `--border-hover`, `--fg-pressed`, `--border-pressed`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--opacity-disabled`, `--elev-tier`, `--elev`; also mounts `BbIcon`, `BbSpinner`
|
|
149
|
+
- `BbButton` _(public — [contract](./BbButton.md))_ — its own pt parts (`BbButton`): `root` → `BbBaseButton`, `spinner` → `BbSpinner`, `icon` → `span.bb-button__icon`, `icon` → `BbIcon`, `icon` → `span.bb-button__prepend-icon`, `text` → `span.bb-button__text`, `icon` → `span.bb-button__append-icon`; documented CSS variables: `--h-xs`, `--h`, `--icon-size`, `--px`, `--fs`, `--r`, `--gap`, `--bg`, `--bg-hover`, `--bg-pressed`, `--fg`, `--border-color`, `--ring-color`, `--ring-size`, `--bw`, `--fg-hover`, `--border-hover`, `--fg-pressed`, `--border-pressed`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--opacity-disabled`, `--elev-tier`, `--elev`; also mounts `BbIcon`, `BbSpinner`
|
|
150
150
|
- `BbBaseButton` _(public — [contract](./BbBaseButton.md))_ — its own pt parts (`BbBaseButton`): `root` → `RouterComponent`, `root` → `a`, `root` → `component`; also mounts `RouterComponent`
|
|
151
151
|
|
|
152
152
|
## See Also
|
package/dist/ai/BbHoverCard.md
CHANGED
|
@@ -253,7 +253,8 @@ the card. The same holds for `BbTooltip` / `v-bb-tooltip`.
|
|
|
253
253
|
### Placement, offset and width
|
|
254
254
|
|
|
255
255
|
The same props as `BbPopover`, with the same defaults: `placement` (`bottom`,
|
|
256
|
-
auto-flipping near an edge
|
|
256
|
+
auto-flipping near an edge, read at open: a change while open applies at the
|
|
257
|
+
next open), `offset` (`4`), `padding` (`10`), `boundary`, and
|
|
257
258
|
`width` in pixels or as a percentage of the activator. A hover card never has an
|
|
258
259
|
arrow. `placement="cursor"` is `BbPopover`'s alone (it anchors at a click
|
|
259
260
|
point).
|
|
@@ -432,8 +433,11 @@ value written in `<script>` is typed as `BbHoverCardProps['pt']`.
|
|
|
432
433
|
wanders off. That is `BbPopover`.
|
|
433
434
|
- **Don't use it for one line of text** — that is `BbTooltip`, which also
|
|
434
435
|
describes the activator to a screen reader.
|
|
435
|
-
- **Don't put it on a non-focusable element** (a bare `<span
|
|
436
|
-
|
|
436
|
+
- **Don't put it on a non-focusable element** (a bare `<span>`, a `BbIcon`, an
|
|
437
|
+
`<svg>`). It opens there on hover, but keyboard focus never reaches it, so
|
|
438
|
+
for a keyboard or touch user the card does not exist. Host it on a link (a
|
|
439
|
+
person's name) or a button (an icon-only ghost `BbButton`, its slot text the
|
|
440
|
+
name); never add a `tabindex` to an icon instead.
|
|
437
441
|
- **Don't open it from `@click`** — a click never toggles a hover card; bind
|
|
438
442
|
`v-model` if something else must open it.
|
|
439
443
|
|
package/dist/ai/BbIcon.md
CHANGED
|
@@ -441,12 +441,18 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
441
441
|
### Accessibility
|
|
442
442
|
|
|
443
443
|
A meaningful icon needs a `label`: it adds `role="img"` and an `aria-label` —
|
|
444
|
-
no native `title`, so no browser tooltip ever appears
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
444
|
+
no native `title`, so no browser tooltip ever appears. Omit `label` for
|
|
445
|
+
**decorative** icons that sit beside a visible text label, so assistive tech
|
|
446
|
+
does not announce the same thing twice. `BbIcon` is **never focusable**
|
|
447
|
+
(`focusable="false"` is always set) — it is not interactive; interactivity
|
|
448
|
+
belongs to the `BbButton`/`BbBaseButton` wrapping it.
|
|
449
|
+
|
|
450
|
+
An info icon with a tip is therefore a button, not a bare icon: an icon-only
|
|
451
|
+
ghost `BbButton` takes keyboard focus, which opens the tip, and its slot text
|
|
452
|
+
is the name (`<BbButton variant="ghost" icon="lucide:info" v-bb-tooltip="'Prices include VAT'">About prices</BbButton>`).
|
|
453
|
+
For text that must be readable on touch, use a `BbPopover` toggletip. A
|
|
454
|
+
`v-bb-tooltip` on a bare `BbIcon` is a pointer-only hint: keyboard and touch
|
|
455
|
+
never open it.
|
|
450
456
|
|
|
451
457
|
**Meaningful vs decorative**
|
|
452
458
|
|
package/dist/ai/BbIndicator.md
CHANGED
|
@@ -325,7 +325,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
325
325
|
|
|
326
326
|
| Prop | Type | Default | Required | Description |
|
|
327
327
|
| --- | --- | --- | --- | --- |
|
|
328
|
-
| `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `bubble`, `root`. States:
|
|
328
|
+
| `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `bubble`, `root`. States: `default`, `destructive`, `info`, `success`, `warning`. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbIndicatorProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
|
|
329
329
|
| `bottom` | `boolean \| undefined` | `false` | | Anchors the indicator to the bottom edge of the wrapped element instead of the top. |
|
|
330
330
|
| `dot` | `boolean \| undefined` | `false` | | Renders a small contentless dot instead of a labelled bubble. Takes precedence over `text`. |
|
|
331
331
|
| `left` | `boolean \| undefined` | `false` | | Anchors the indicator to the left edge of the wrapped element instead of the right. |
|
|
@@ -343,6 +343,16 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
343
343
|
| `root` | The anchor wrapper the bubble is positioned in. Sizing lives here: `size`, `--fs` and `--offset` (the corner overhang) are tokens on `root`. |
|
|
344
344
|
| `bubble` | The count or dot itself — rendered only while there is a `text` or `dot`. Put the look here, the sizing on `root`. |
|
|
345
345
|
|
|
346
|
+
States are listed in precedence order: when two are on at once and their entries conflict, the later one wins.
|
|
347
|
+
|
|
348
|
+
| State | When it is on |
|
|
349
|
+
| --- | --- |
|
|
350
|
+
| `default` | Component-wide: `variant: 'default'`. Merged after the part's base entry and before its states, so the real states still win. |
|
|
351
|
+
| `destructive` | Component-wide: `variant: 'destructive'`. Below the real states, like every variant. |
|
|
352
|
+
| `info` | Component-wide: `variant: 'info'`. Below the real states, like every variant. |
|
|
353
|
+
| `success` | Component-wide: `variant: 'success'`. Below the real states, like every variant. |
|
|
354
|
+
| `warning` | Component-wide: `variant: 'warning'`. Below the real states, like every variant. |
|
|
355
|
+
|
|
346
356
|
## Events
|
|
347
357
|
|
|
348
358
|
- None.
|
package/dist/ai/BbNumberInput.md
CHANGED
|
@@ -858,7 +858,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
858
858
|
|
|
859
859
|
| Prop | Type | Default | Required | Description |
|
|
860
860
|
| --- | --- | --- | --- | --- |
|
|
861
|
-
| `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `box`, `clear`, `description`, `hint`, `icon`, `input`, `label`, `message`, `prefix`, `root`, `spinner`, `suffix`. States: `disabled`, `errors`, `hasValue`, `loading`, `readonly`, `warnings`. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbNumberInputProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
|
|
861
|
+
| `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `box`, `clear`, `description`, `hint`, `icon`, `input`, `label`, `message`, `prefix`, `root`, `spinner`, `suffix`. States: `disabled`, `errors`, `ghost`, `hasValue`, `loading`, `outline`, `readonly`, `secondary`, `warnings`. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbNumberInputProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
|
|
862
862
|
| `append:icon` | `string \| undefined` | | | Name of the icon to be added at the end of the input. |
|
|
863
863
|
| `autocomplete` | `string \| undefined` | `"off"` | | Guides the browser as to the type of information expected in the field. |
|
|
864
864
|
| `autofocus` | `Booleanish \| undefined` | | | Focuses the field when it mounts (a dialog already open included), unless the user is typing in another field. |
|
|
@@ -931,6 +931,9 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
931
931
|
| `warnings` | Component-wide: the control is in its warning state (`warnings` / `has-warnings`) and not in an error state — errors win, so the two are never on together. |
|
|
932
932
|
| `errors` | Component-wide: the control is in its error state (`errors` / `has-errors`, or its validation) — the message line and the box turn red. |
|
|
933
933
|
| `loading` | Component-wide: `loading` is on; the box shows its `spinner`. |
|
|
934
|
+
| `ghost` | On the field's parts: `variant: 'ghost'`. Below the real states, like every variant. |
|
|
935
|
+
| `outline` | On the field's parts: `variant: 'outline'`. Merged after the part's base entry and before its states, so the real states still win. |
|
|
936
|
+
| `secondary` | On the field's parts: `variant: 'secondary'`. Below the real states, like every variant. |
|
|
934
937
|
|
|
935
938
|
## Events
|
|
936
939
|
|
package/dist/ai/BbOffCanvas.md
CHANGED
|
@@ -218,6 +218,40 @@ const { data: side } = useBbOffCanvasContext<Side>('edge-panel');
|
|
|
218
218
|
</script>
|
|
219
219
|
```
|
|
220
220
|
|
|
221
|
+
#### A different side per breakpoint
|
|
222
|
+
|
|
223
|
+
`side` also takes a per-breakpoint map, the same ladder as `size` and
|
|
224
|
+
BbButton's `size` (`default`, `sm`, `md`, `lg`, `xl`, `2xl`; a breakpoint with
|
|
225
|
+
no entry falls back to the nearest smaller one). The classic case is a bottom
|
|
226
|
+
sheet on a phone that becomes a right drawer on a desktop:
|
|
227
|
+
|
|
228
|
+
**Bottom on a phone, right from md**
|
|
229
|
+
|
|
230
|
+
```vue
|
|
231
|
+
<div>
|
|
232
|
+
<BbButton v-bb-off-canvas="'responsive-side'" variant="outline">Details</BbButton>
|
|
233
|
+
<BbOffCanvas
|
|
234
|
+
id="responsive-side"
|
|
235
|
+
:side="{ default: 'bottom', md: 'right' }"
|
|
236
|
+
title="Details"
|
|
237
|
+
>
|
|
238
|
+
<p class="m-0 text-sm">
|
|
239
|
+
A sheet below 768px, a drawer from <code>md</code> up. Resize, then
|
|
240
|
+
close and reopen it.
|
|
241
|
+
</p>
|
|
242
|
+
</BbOffCanvas>
|
|
243
|
+
</div>
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
The side is chosen **when the panel opens** and kept until it closes: an open
|
|
247
|
+
panel never swings to another edge on a resize (or a phone rotation); the
|
|
248
|
+
next opening picks again. Everything that follows the side follows that
|
|
249
|
+
choice: the slide, the drag axis, the safe-area insets, the rounded edge, the
|
|
250
|
+
snap points (bottom only) and stacking. On the server the map resolves at the
|
|
251
|
+
SSR width (`ssrViewportWidth`, desktop by default), like every width-derived
|
|
252
|
+
binding; a panel open on load takes the real width as the page hydrates,
|
|
253
|
+
before it paints.
|
|
254
|
+
|
|
221
255
|
### Header, footer and body
|
|
222
256
|
|
|
223
257
|
A `title` prop renders the standard header (title text + close button) and wires
|
|
@@ -842,12 +876,12 @@ drill in: opening a child shifts the parent inward by `stack-gap` (default
|
|
|
842
876
|
Closing the child brings the parent forward. Panels with **different names (or
|
|
843
877
|
none) are independent** and simply layer by open order.
|
|
844
878
|
|
|
845
|
-
Each stacked panel dims the panels beneath it (via `--bb-overlay-
|
|
879
|
+
Each stacked panel dims the panels beneath it (via `--bb-overlay-above`, the same
|
|
846
880
|
dim as `--bb-overlay` by default); only the bottom-most blurs. So a child opening
|
|
847
881
|
over a parent visibly darkens the parent, closing it fades that dim out with it,
|
|
848
882
|
and the bottom panel's blurred backdrop is never handed off — nothing behind
|
|
849
883
|
brightens or re-blurs, and a three-deep stack still costs one blur pass. Set
|
|
850
|
-
`--bb-overlay-
|
|
884
|
+
`--bb-overlay-above: transparent` for a single dim under the whole pile.
|
|
851
885
|
Backdrop layering follows **open order across all off-canvases**, whatever their
|
|
852
886
|
`stack` name — the name only controls the step-back. Use a stack for master →
|
|
853
887
|
detail flows where the trail should stay visible; if the parent should be fully
|
|
@@ -1388,7 +1422,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
1388
1422
|
| `preventClose` | `boolean \| undefined` | ``undefined` (follows a saving form inside)` | | Refuses every user close (backdrop, Escape, drag, the ✕, the slots' `close`) with the deny nudge; `v-model` still closes. Unset: locked while a `BbForm` inside saves (an async `@submit`). `true`: always; `false`: never, not even mid-save. Beside a form: `busy \|\| undefined`. |
|
|
1389
1423
|
| `queryKey` | `string \| undefined` | `"offcanvas"` | | The query key `navigation` writes. |
|
|
1390
1424
|
| `replace` | `boolean \| undefined` | `false` | | With `navigation`, replaces the history entry instead of pushing one, so Back leaves the page instead of closing the panel. |
|
|
1391
|
-
| `side` | `"left" \| "top" \| "bottom" \| "right" \| undefined` | `"left"` | | Which viewport edge the offcanvas docks to (and slides in from). |
|
|
1425
|
+
| `side` | `Responsive<"left" \| "top" \| "bottom" \| "right"> \| undefined` | `"left"` | | Which viewport edge the offcanvas docks to (and slides in from). Also a per-breakpoint map (e.g. `{ default: 'bottom', md: 'right' }`), resolved when the panel opens: an open panel keeps its side through a resize. |
|
|
1392
1426
|
| `size` | `Responsive<OffCanvasSize> \| undefined` | `"sm"` | | The panel's extent along its axis: a left/right panel's width (shrinks with a narrower viewport) or a top/bottom one's height (capped at the viewport). A preset `'xs'`–`'2xl'`, `'auto'`, a CSS size, a pixel number, or a per-breakpoint map (e.g. `{ default: 'sm', lg: 'lg' }`). |
|
|
1393
1427
|
| `snap` | `BbSnapPoint \| undefined` | | | The snap stop the sheet rests at, written as one of the `snapPoints` entries (Q71.8). Updated once the sheet settles on another stop; setting it moves the sheet there. Unbound, every opening starts at the first stop. |
|
|
1394
1428
|
| `snapPoints` | `BbSnapPoint[] \| undefined` | | | Heights a draggable bottom sheet rests at, smallest first: a fraction of the screen (`0.5`, `1` = full) or `'240px'`. The first is the opening height; `v-model:snap` holds the stop. Ignored on other sides and `fullscreen` (guide § Snap points). |
|
package/dist/ai/BbPopover.md
CHANGED
|
@@ -468,7 +468,8 @@ const rename = (report: Report, close: () => void) => {
|
|
|
468
468
|
`bottom` / `left` families, each with `-start` / `-end` alignment variants
|
|
469
469
|
(e.g. `bottom-start`). It defaults to `bottom`. The panel **auto-flips** to stay
|
|
470
470
|
in view near a viewport edge, so pick the placement that reads best in the
|
|
471
|
-
common case and let it correct itself.
|
|
471
|
+
common case and let it correct itself. `placement` is read at open: a change
|
|
472
|
+
while open applies at the next open.
|
|
472
473
|
|
|
473
474
|
Fine-tune the geometry with:
|
|
474
475
|
|
package/dist/ai/BbRadio.md
CHANGED
|
@@ -441,7 +441,7 @@ const strategy = ref<MergeMethod>('squash');
|
|
|
441
441
|
</script>
|
|
442
442
|
```
|
|
443
443
|
|
|
444
|
-
An attribute in `attrs` wins over ours. The
|
|
444
|
+
An attribute in `attrs` wins over ours. The invisible native input under the glyph is
|
|
445
445
|
not a part — plain attributes on the component land on the root. A listener in `attrs` runs after the control's own
|
|
446
446
|
handler, never instead of it. The full grammar, the merge rules and the global
|
|
447
447
|
map are in the [passthrough guide](./guides/passthrough.md).
|
package/dist/ai/BbRadioGroup.md
CHANGED
|
@@ -33,6 +33,27 @@
|
|
|
33
33
|
| `--elev` | `pt:icon` | `BbBaseRadioIcon` | Same resting lift as the checkbox glyph — see BbBaseCheckboxIcon. |
|
|
34
34
|
| `--bg` | `pt:icon` | `BbBaseRadioIcon` | The glyph plate. DECLARED here, not consumed bare, because this glyph renders inside surfaces that declare `--bg` themselves — a table row or header cell, a dialog, an off-canvas sheet. Without the declaration it would inherit that surface's fill, which happens to match at the shipped default and would diverge the moment anyone writes `.my-table { --bg: … }`. Identical to the raw tokens it replaces at every theme. |
|
|
35
35
|
| `--ctrl-line` | `pt:label` | `CommonField` | Where the control's first line is centred, from the top of the control column (half the box height by default); the label's first line aligns to it in side-by-side layouts. |
|
|
36
|
+
| `--list-bg` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | The strip behind the triggers |
|
|
37
|
+
| `--list-border` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | The strip's edge line, --bb-border-w thick, painted inside the strip: under the triggers (beside them when vertical). `pill` draws none; `line` sets it to --bb-border |
|
|
38
|
+
| `--p` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | strip inner padding — the gutter the indicator sits in, and the scroll inset |
|
|
39
|
+
| `--list-r` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | strip corners |
|
|
40
|
+
| `--list-h` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | strip min height |
|
|
41
|
+
| `--fs` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | trigger label size |
|
|
42
|
+
| `--trigger-gap` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | space between triggers |
|
|
43
|
+
| `--trigger-px` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | trigger side padding |
|
|
44
|
+
| `--trigger-r` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | Trigger corners, concentric inside --list-r |
|
|
45
|
+
| `--trigger-min-h` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | Trigger height inside the padded strip |
|
|
46
|
+
| `--list-fg` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | unchecked trigger label |
|
|
47
|
+
| `--hover-fg` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | hovered trigger label |
|
|
48
|
+
| `--active-fg` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | checked trigger label |
|
|
49
|
+
| `--active-fw` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | checked trigger label weight (unchecked labels are 500) |
|
|
50
|
+
| `--indicator-bg` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | the indicator's fill |
|
|
51
|
+
| `--indicator-border` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | The indicator's edge |
|
|
52
|
+
| `--indicator-r` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | The indicator's corners — the pill's, concentric inside --list-r |
|
|
53
|
+
| `--indicator-h` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | The indicator's thickness: its height, its width on a vertical strip. `initial` fills the whole trigger box — the pill; a bar is `2px`, on the trigger's bottom edge (inline-end edge when vertical) |
|
|
54
|
+
| `--indicator-inset` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | Inset of the indicator from the trigger box — shrinks the pill; a bar keeps its thickness, shortens by it at both ends and floats it above the edge |
|
|
55
|
+
| `--elev` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | The theme's resting lift, composed UNDER the indicator's own shadow |
|
|
56
|
+
| `--indicator-shadow` | `pt:list`, `pt:item`, `pt:label`, `pt:itemDescription` | `OptionsContainer` | Indicator lift, painted on top of --elev |
|
|
36
57
|
|
|
37
58
|
## Usage & Guidelines
|
|
38
59
|
|
|
@@ -326,10 +347,68 @@ const method = ref<string>('standard');
|
|
|
326
347
|
|
|
327
348
|
#### Segmented control
|
|
328
349
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
350
|
+
Pick a value → `BbRadioGroup`; switch views → `BbTabs`. A strip that picks a
|
|
351
|
+
value a form or a filter submits (a status filter, a period) is still a
|
|
352
|
+
radiogroup (arrow keys, "2 of 4"), so give the group a tab strip's look:
|
|
353
|
+
`variant="pill"` (a muted strip, a raised pill under the pick) or
|
|
354
|
+
`variant="line"` (a baseline across the field, a bar under the pick). The
|
|
355
|
+
strip, its triggers and the indicator measure exactly as BbTabs', and the
|
|
356
|
+
indicator slides as a tab strip's does. The dot is hidden (an `icon` slot
|
|
357
|
+
shows before the label, like a tab's icon) and the strip never wraps (it
|
|
358
|
+
scrolls); `list-layout="vertical"` stacks it into a column (the indicator
|
|
359
|
+
slides on the Y axis), `"vertical-stretch"` spans the field, and the other
|
|
360
|
+
layouts and `item-layout` do not apply. The legend, errors, `compact` and
|
|
361
|
+
`hide-legend` work as on any group. `pt:indicator` reaches the pill or the
|
|
362
|
+
bar, and `pt:<part>:pill` / `pt:<part>:line` style a part in one look only.
|
|
363
|
+
|
|
364
|
+
**Pick a value with the tabs look**
|
|
365
|
+
|
|
366
|
+
```vue
|
|
367
|
+
<template>
|
|
368
|
+
<div class="flex flex-col gap-4">
|
|
369
|
+
<BbRadioGroup
|
|
370
|
+
v-model="status"
|
|
371
|
+
hide-legend
|
|
372
|
+
:items="statuses"
|
|
373
|
+
legend="Status"
|
|
374
|
+
variant="pill"
|
|
375
|
+
/>
|
|
376
|
+
<BbRadioGroup
|
|
377
|
+
v-model="period"
|
|
378
|
+
hide-legend
|
|
379
|
+
:items="periods"
|
|
380
|
+
legend="Period"
|
|
381
|
+
variant="line"
|
|
382
|
+
/>
|
|
383
|
+
</div>
|
|
384
|
+
</template>
|
|
385
|
+
|
|
386
|
+
<script setup lang="ts">
|
|
387
|
+
import { ref } from 'vue';
|
|
388
|
+
import { BbRadioGroup } from 'bitboss-ui';
|
|
389
|
+
|
|
390
|
+
// BbTabs' two looks on a value picker: `pill` (a muted strip, a raised pill
|
|
391
|
+
// under the pick) and `line` (a baseline across the field, a bar under the
|
|
392
|
+
// pick). The indicator slides like a tab strip's, and it is still a
|
|
393
|
+
// radiogroup: arrow keys move and pick, a form submits the value.
|
|
394
|
+
const statuses = ['All', 'Open', 'Closed', 'Archived'];
|
|
395
|
+
const status = ref('Open');
|
|
396
|
+
const periods = ['Day', 'Week', 'Month', 'Year'];
|
|
397
|
+
const period = ref('Week');
|
|
398
|
+
</script>
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
The strip has its own tokens, named and valued as a tab strip's (`--list-bg`,
|
|
402
|
+
`--p`, `--trigger-px`, `--indicator-bg`, `--indicator-h`, `--active-fg`, …):
|
|
403
|
+
set them on `pt:list` to retune one group. A look of your own app-wide is a
|
|
404
|
+
registered variant: `radioVariants: ['brand']` in the build plugin, then the
|
|
405
|
+
same tokens on `.bb-radio-group__list--brand` in your CSS. A tabs theme does
|
|
406
|
+
not reach a choice strip, nor the other way round.
|
|
407
|
+
|
|
408
|
+
For a look of your own, build the tiles from `pt` instead: equal tiles, the
|
|
409
|
+
dot hidden with `pt:icon="hidden"`, the checked label recoloured on
|
|
410
|
+
`pt:label:checked` (the label cell paints its own colour, so a colour on
|
|
411
|
+
`pt:item` never reaches it):
|
|
333
412
|
|
|
334
413
|
**Segmented range picker**
|
|
335
414
|
|
|
@@ -344,7 +423,7 @@ colour on `pt:item` never reaches it:
|
|
|
344
423
|
list-layout="tiles"
|
|
345
424
|
name="range"
|
|
346
425
|
pt:icon="hidden"
|
|
347
|
-
pt:item="justify-items-center
|
|
426
|
+
pt:item="justify-items-center rounded-[calc(var(--bb-radius)-2px)] py-1.5"
|
|
348
427
|
pt:item:checked="bg-(--bb-primary)"
|
|
349
428
|
pt:item:focus-visible="ring-2 ring-(--bb-primary-ring)"
|
|
350
429
|
pt:label="text-sm"
|
|
@@ -563,6 +642,15 @@ so without it a keyboard user cannot see which tile has focus.
|
|
|
563
642
|
slot does not remove it: the default dot is the slot's fallback and renders
|
|
564
643
|
whenever the slot is empty.
|
|
565
644
|
|
|
645
|
+
A side hidden with the library's or Tailwind's hiding classes takes its gap
|
|
646
|
+
with it: a dot hidden with `pt:icon="hidden"` (or `sr-only`), or a label
|
|
647
|
+
hidden with `hide-label` or `pt:label="sr-only"`, leaves the other side
|
|
648
|
+
centred, no `gap-0` needed. In `list-layout="tiles"` the whole tile is the
|
|
649
|
+
click and hover target, padding included (a tooltip whose activator is the
|
|
650
|
+
row's input shows anywhere on it); a link or a button inside a tile keeps its
|
|
651
|
+
own click. List rows keep the dot as the target, beside a label that selects
|
|
652
|
+
too.
|
|
653
|
+
|
|
566
654
|
**Theme selection tiles**
|
|
567
655
|
|
|
568
656
|
```vue
|
|
@@ -817,7 +905,7 @@ ours, an attribute in `attrs` wins over ours. The full grammar, the merge rules
|
|
|
817
905
|
and the global map are in the [passthrough guide](./guides/passthrough.md).
|
|
818
906
|
|
|
819
907
|
A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
820
|
-
`pt` prop) is typed as `BbRadioGroupProps<Row>['pt']`, or `BbRadioGroupProps['pt']`
|
|
908
|
+
`pt` prop) is typed as `BbRadioGroupProps<Row>['pt']`, or `BbRadioGroupProps<object>['pt']`
|
|
821
909
|
for a preset that fits any row type (never `<any>`), not an imported
|
|
822
910
|
`PtValue`: see
|
|
823
911
|
[passthrough § Typing `pt` in `<script>`](./guides/passthrough.md#typing-pt-in-script).
|
|
@@ -881,7 +969,7 @@ for a preset that fits any row type (never `<any>`), not an imported
|
|
|
881
969
|
|
|
882
970
|
| Prop | Type | Default | Required | Description |
|
|
883
971
|
| --- | --- | --- | --- | --- |
|
|
884
|
-
| `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `description`, `hint`, `icon`, `item`, `itemDescription`, `label`, `legend`, `list`, `message`, `root`. States: `disabled`, `errors`, `hasValue`, `loading`, `readonly`, `warnings`, `checked`, `focused`, `focusVisible`. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbRadioGroupProps<Row>['pt']` (`BbRadioGroupProps['pt']` for a preset that fits any row type, never `<any>`) (`PtValue` is not exported): § Typing `pt` in `<script>`. |
|
|
972
|
+
| `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `description`, `hint`, `icon`, `indicator`, `item`, `itemDescription`, `label`, `legend`, `list`, `message`, `root`. States: `disabled`, `errors`, `hasValue`, `line`, `loading`, `pill`, `readonly`, `warnings`, `checked`, `focused`, `focusVisible`. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbRadioGroupProps<Row>['pt']` (`BbRadioGroupProps<object>['pt']` for a preset that fits any row type, never `<any>`) (`PtValue` is not exported): § Typing `pt` in `<script>`. |
|
|
885
973
|
| `autofocus` | `Booleanish \| undefined` | | | Focuses the field when it mounts (a dialog already open included), unless the user is typing in another field. |
|
|
886
974
|
| `compact` | `boolean \| undefined` | `false` | | Compact density. Swaps `--bb-label-spacing-y` for `--bb-label-spacing-y-compact`, so tune a compact group's label gap with the `-compact` token, not the base one. |
|
|
887
975
|
| `dependencies` | `unknown[] \| undefined` | | | Defines an array of dependencies that will trigger actions in the component upon change. |
|
|
@@ -927,6 +1015,7 @@ for a preset that fits any row type (never `<any>`), not an imported
|
|
|
927
1015
|
| `selectable` | `boolean \| ((item: T) => boolean) \| undefined` | `true` | | Defines whether options are selectable. Can be a global boolean that affects all options or a function that accepts an item and returns a boolean that only affects that item. Non-selectable options are rendered disabled. |
|
|
928
1016
|
| `validationLabel` | `string \| undefined` | | | The field's name in validation messages (`{field}`): "Email is not valid". Defaults to the `label` (or `legend`), then "This field"; never the `name`. Set it when the label is hidden or reads badly in a sentence (icon-only, a question). `BbForm` only. |
|
|
929
1017
|
| `validationMode` | `'aggressive'` \| `'balanced'` \| `'lazy'` \| `'submit-only'` \| `'submit-live'` | | | When the field validates: `aggressive` (each change), `balanced` (on leave, then live while in error), `lazy` (on leave), `submit-only`, `submit-live`. Unset: the `BbForm`'s `validation-mode`, then `formControls.validationMode` (`'balanced'`). `BbForm` only. |
|
|
1018
|
+
| `variant` | `'pill'` \| `'line'` | | | A tab-strip look (Q76.11 d): `'pill'` (a raised pill under the pick) or `'line'` (a bar on a baseline); the indicator slides like a tab strip's. `list-layout="vertical"` stacks it. Register more with `radioVariants`. Unset: the group's own rows. |
|
|
930
1019
|
| `warnings` | `string \| string[] \| undefined` | | | Warning messages under the field, a string or array: amber, in their own `aria-live` region and in the control's `aria-describedby` after the errors. Non-empty turns on the warning state; errors win when both are set. |
|
|
931
1020
|
|
|
932
1021
|
## Passthrough parts and states
|
|
@@ -940,7 +1029,8 @@ for a preset that fits any row type (never `<any>`), not an imported
|
|
|
940
1029
|
| `description` | The muted line under the legend (the `description` prop). |
|
|
941
1030
|
| `message` | The errors / warnings line. A node of its own: it can show at the same time as `hint`. |
|
|
942
1031
|
| `hint` | The helper line (the `hint` prop), shown on focus, or always with `persistent-hint`. |
|
|
943
|
-
| `list` | The node that lays the rows out (flex + wrap, gaps on `--gap` / `--row-gap`): `pt:list="grid grid-cols-3"` re-lays them, `pt:list="[--gap:8px]"` tightens them. Takes the group-wide states only. |
|
|
1032
|
+
| `list` | The node that lays the rows out (flex + wrap, gaps on `--gap` / `--row-gap`): `pt:list="grid grid-cols-3"` re-lays them, `pt:list="[--gap:8px]"` tightens them. With a `variant`, the tab strip. Takes the group-wide states only. |
|
|
1033
|
+
| `indicator` | With a `variant`: the shape under the checked option, BbTabs' indicator — the sliding pill or bar of a radio group, a checkbox group's pill per run of adjacent picks (or bar per pick). Takes the group-wide states only. |
|
|
944
1034
|
| `item` | One option row — a broadcast, resolved per option with its own `checked` / `disabled` / focus. Takes a per-item function. |
|
|
945
1035
|
| `icon` | One row's drawn glyph — the default one: a consumer `icon` slot replaces it. Takes a per-item function. |
|
|
946
1036
|
| `label` | One option's label text (the `label` slot's default). Takes a per-item function. |
|
|
@@ -959,6 +1049,8 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
959
1049
|
| `focused` | Per row, on the row parts: that option's input has focus — any focus, mouse included. |
|
|
960
1050
|
| `focusVisible` | Per row, on the row parts: that option's focus is keyboard-visible — where a focus ring belongs. |
|
|
961
1051
|
| `loading` | Component-wide: the items are being fetched. |
|
|
1052
|
+
| `line` | On every part: `variant: 'line'`. Below the real states, like every variant. |
|
|
1053
|
+
| `pill` | On every part: `variant: 'pill'`. Merged after the part's base entry and before its states, so the real states still win. |
|
|
962
1054
|
|
|
963
1055
|
## Events
|
|
964
1056
|
|
|
@@ -1004,9 +1096,9 @@ Set these on the element, or on a class you put on it, to retune this component
|
|
|
1004
1096
|
- **CSS custom properties** listed on a node are declared on THAT node's root and read by elements inside it. Set one on that node's root or on the element inside it that reads it — the pt part that lands there is how you reach it (`pt:box="[--border-color:…]"` on a text input) — never on `BbRadioGroup`'s root, where the node's own declaration masks it (design-tokens guide, _Overriding one from a consumer app_, rule 0).
|
|
1005
1097
|
- Listed nodes are the ones `BbRadioGroup`'s API reaches or that declare a documented CSS variable; the rest fold into "also mounts". The complete tree, repeats and undocumented locals included, is `manifest/components/BbRadioGroup.tree.json`.
|
|
1006
1098
|
|
|
1007
|
-
- `BbRadioGroup` _(this component)_ — its own template binds: `icon` → `BbBaseRadioIcon`
|
|
1099
|
+
- `BbRadioGroup` _(this component)_ — its own template binds: `indicator` → `span.bb-radio-group__indicator`, `icon` → `BbBaseRadioIcon`
|
|
1008
1100
|
- `CommonField` _(internal — not importable, reach it through `BbRadioGroup`)_ — `BbRadioGroup`'s pt parts land here: `root` → `div.bb-field`, `label` → `component`, `description` → `span.bb-field__description`, `hint` → `span.bb-field__hint`, `counter` → `span.bb-field__counter`, `message` → `div.bb-field__message`; documented CSS variables: `--ctrl-line`; also mounts `BbAsterisk`
|
|
1009
|
-
- `OptionsContainer` _(internal — not importable, reach it through `BbRadioGroup`)_ — `BbRadioGroup`'s pt parts land here: `list` → `span`, `item` → `label`, `label` → `span`, `itemDescription` → `span`
|
|
1101
|
+
- `OptionsContainer` _(internal — not importable, reach it through `BbRadioGroup`)_ — `BbRadioGroup`'s pt parts land here: `list` → `span`, `item` → `label`, `label` → `span`, `itemDescription` → `span`; documented CSS variables: `--list-bg`, `--list-border`, `--p`, `--list-r`, `--list-h`, `--fs`, `--trigger-gap`, `--trigger-px`, `--trigger-r`, `--trigger-min-h`, `--list-fg`, `--hover-fg`, `--active-fg`, `--active-fw`, `--indicator-bg`, `--indicator-border`, `--indicator-r`, `--indicator-h`, `--indicator-inset`, `--elev`, `--indicator-shadow`
|
|
1010
1102
|
- Also mounts `BbBaseRadioIcon`
|
|
1011
1103
|
|
|
1012
1104
|
## See Also
|
package/dist/ai/BbSelect.md
CHANGED
|
@@ -972,11 +972,37 @@ Laziness), until the user opens it:
|
|
|
972
972
|
- **Shape and matching.** A known row is `{ value, label }`: `value` is what
|
|
973
973
|
the `v-model` holds, matched exactly (`"7"` does not name `7`), and `label`
|
|
974
974
|
is its text. `item-value`, `item-text`, `item-props`, `selectable` and
|
|
975
|
-
`group-by` are the options' and never run on it
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
975
|
+
`group-by` are the options' and never run on it. A value no row names loads
|
|
976
|
+
as it would without the prop, so missing or wrong rows are never worse than
|
|
977
|
+
today; entries without a `value` key (`null`, a record in the options'
|
|
978
|
+
shape) are skipped.
|
|
979
|
+
- **Slots: check `known`.** Until the list brings the real row, the `option`
|
|
980
|
+
and `chip` slots get the `{ value, label }` row as `item`, with
|
|
981
|
+
`known: true`. On a select that binds `known-items` the slot's `item` is
|
|
982
|
+
typed `YourRow | BbSelectKnownItem`, so reading an option field straight
|
|
983
|
+
off it (`item.full_name`) is a type error: it would render blank until the
|
|
984
|
+
list loads. Test `known` first; `text` and `value` are right on both:
|
|
985
|
+
|
|
986
|
+
```vue
|
|
987
|
+
<template #option="{ item, known, text }">
|
|
988
|
+
{{ text }}
|
|
989
|
+
<small v-if="!known">{{ item.email }}</small>
|
|
990
|
+
</template>
|
|
991
|
+
```
|
|
992
|
+
|
|
993
|
+
A helper that takes the whole scope is typed with `BbSelectSlotRow<YourRow>`
|
|
994
|
+
(`row.known ? row.item.label : row.item.full_name`). Selects without
|
|
995
|
+
`known-items` keep `item: YourRow` and `known: false`; so does a preset
|
|
996
|
+
made with `definePreset(BbSelect<YourRow>, …)` (rev 4) until its caller
|
|
997
|
+
binds `known-items`, and then it narrows the same way. A preset's own
|
|
998
|
+
default `slots` get `known` too, always: it cannot know whether a caller
|
|
999
|
+
binds them. A `pt` per-item
|
|
1000
|
+
function on the option parts gets the same `{ item, known }`
|
|
1001
|
+
(`option: ({ item, known }) => !known && item.vip && 'font-bold'`). The
|
|
1002
|
+
type alone, `BbSelectProps<YourRow>` (a wrapper's props, a `pt` const), is
|
|
1003
|
+
the bound case, since it cannot know where it lands; write
|
|
1004
|
+
`BbSelectProps<YourRow, undefined>` for code that never binds `known-items`.
|
|
1005
|
+
|
|
980
1006
|
- **They are not options.** A known row is listed only while its value is
|
|
981
1007
|
selected; the others name a value the model may take later, still with no
|
|
982
1008
|
request (after a parent change, see Coherence below).
|
|
@@ -1617,11 +1643,11 @@ const createLabel = (text: string) => {
|
|
|
1617
1643
|
Set `group-by` to a field path (or a function) to bucket options under headers.
|
|
1618
1644
|
The `#group` slot styles the header and receives
|
|
1619
1645
|
`{ text, item, index, length, disabled }` — `length` is the number of options
|
|
1620
|
-
in the group, `index` the list index of its first option.
|
|
1621
|
-
`group-by` gives `null` or `undefined` has
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1646
|
+
in the group, `index` the list index of its first option. Groups keep the order
|
|
1647
|
+
of their first option. A row whose `group-by` gives `null` or `undefined` has
|
|
1648
|
+
no group: those rows are listed **first**, before every header, and `#group` is
|
|
1649
|
+
not called for them (a known row is listed the same way). `BbDropdown`'s
|
|
1650
|
+
`groupBy` follows the same rule.
|
|
1625
1651
|
|
|
1626
1652
|
A grouped list virtualizes **whole groups, not rows**: a group mounts only
|
|
1627
1653
|
when it scrolls into range, but all of its rows mount together. Many
|
|
@@ -1908,7 +1934,13 @@ Shipped behavior — never reimplement it:
|
|
|
1908
1934
|
|
|
1909
1935
|
- `compact` — denser control and panel (24px options, 24px group headers).
|
|
1910
1936
|
- The panel width always matches the control; the control fills its container,
|
|
1911
|
-
so size it with layout classes on a wrapper (`class="max-w-xs"` etc.).
|
|
1937
|
+
so size it with layout classes on a wrapper (`class="max-w-xs"` etc.). There
|
|
1938
|
+
is no panel-width prop.
|
|
1939
|
+
- **A narrow column with long option labels** (a role in a three-column row):
|
|
1940
|
+
a field that narrow barely shows the picked option, and its panel truncates
|
|
1941
|
+
every row. Use a `BbSelectPopover` on a `BbBadgeButton` instead: the badge is
|
|
1942
|
+
the compact trigger and the panel takes a `width` of its own
|
|
1943
|
+
([`BbSelectPopover` § A narrow column](./BbSelectPopover.md#a-narrow-column-a-badge-trigger-and-a-panel-of-its-own)).
|
|
1912
1944
|
- `layout` works whenever the resolved label mode is `'outside'` (the
|
|
1913
1945
|
library default) — `layout="horizontal"` gives a label-beside-field row,
|
|
1914
1946
|
and a per-breakpoint map (`{ default: 'vertical', md: 'horizontal' }`)
|
|
@@ -2075,7 +2107,7 @@ The full grammar, the merge rules and the global map are in the
|
|
|
2075
2107
|
[passthrough guide](./guides/passthrough.md).
|
|
2076
2108
|
|
|
2077
2109
|
A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
2078
|
-
`pt` prop) is typed as `BbSelectProps<Row>['pt']`, or `BbSelectProps['pt']`
|
|
2110
|
+
`pt` prop) is typed as `BbSelectProps<Row>['pt']`, or `BbSelectProps<object>['pt']`
|
|
2079
2111
|
for a preset that fits any row type (never `<any>`), not an imported
|
|
2080
2112
|
`PtValue`: see
|
|
2081
2113
|
[passthrough § Typing `pt` in `<script>`](./guides/passthrough.md#typing-pt-in-script).
|
|
@@ -2217,7 +2249,7 @@ it: [passthrough guide § Typing `pt` in `<script>`](./guides/passthrough.md#typ
|
|
|
2217
2249
|
|
|
2218
2250
|
| Prop | Type | Default | Required | Description |
|
|
2219
2251
|
| --- | --- | --- | --- | --- |
|
|
2220
|
-
| `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `activator`, `badge`, `box`, `clear`, `comma`, `description`, `footer`, `header`, `hint`, `icon`, `input`, `itemDescription`, `itemIcon`, `itemText`, `label`, `list`, `message`, `option`, `panel`, `prefix`, `root`, `sheet`, `spinner`, `suffix`. States: `disabled`, `errors`, `hasValue`, `loading`, `open`, `readonly`, `selected`, `warnings`. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbSelectProps<Row>['pt']` (`BbSelectProps['pt']` for a preset that fits any row type, never `<any>`) (`PtValue` is not exported): § Typing `pt` in `<script>`. |
|
|
2252
|
+
| `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `activator`, `badge`, `box`, `clear`, `comma`, `description`, `footer`, `header`, `hint`, `icon`, `input`, `itemDescription`, `itemIcon`, `itemText`, `label`, `list`, `message`, `option`, `panel`, `prefix`, `root`, `sheet`, `spinner`, `suffix`. States: `disabled`, `errors`, `ghost`, `hasValue`, `loading`, `open`, `outline`, `readonly`, `secondary`, `selected`, `warnings`. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbSelectProps<Row>['pt']` (`BbSelectProps<object>['pt']` for a preset that fits any row type, never `<any>`) (`PtValue` is not exported): § Typing `pt` in `<script>`. |
|
|
2221
2253
|
| `adaptive` | `boolean \| undefined` | ``config.adaptive` (`true`)` | | When `true`, the options panel opens as a bottom off-canvas sheet on mobile viewports instead of a floating popover; on desktop it stays a popover. When unset, falls back to the global `config.adaptive`. |
|
|
2222
2254
|
| `append:icon` | `string \| undefined` | `the chevron-down glyph` | | Name of the icon to be added at the end of the input. |
|
|
2223
2255
|
| `autocomplete` | `string \| undefined` | | | Guides to the browser as to the type of information expected in the field. |
|
|
@@ -2249,7 +2281,7 @@ it: [passthrough guide § Typing `pt` in `<script>`](./guides/passthrough.md#typ
|
|
|
2249
2281
|
| `items` | `T[] \| ((context: BbSelectItemsContext) => T[] \| Promise<T[]>)` | | yes | The options: an array, or a provider called with a `BbSelectItemsContext` (`query`, `reason`, `modelValue`, `signal`), sync or async. Branch on `reason !== 'search'` to resolve the selection by id. A provider fails by THROWING, never by returning `[]`. |
|
|
2250
2282
|
| `itemText` | `ItemAccessor<T, string> \| undefined` | `own `label`, else `text`, else `JSON.stringify(item)`` | | Defines a path that returns a property of the object to use as text or a function that returns a string. Unset: own `label`, else `text` (`{ label, value }` needs no accessor). |
|
|
2251
2283
|
| `itemValue` | `ItemAccessor<T> \| undefined` | `own `value`, else the whole item` | | Defines a path that returns a property of the object to use as value or a function that returns any value. Unset: own `value`, even `null`. |
|
|
2252
|
-
| `knownItems` | `(
|
|
2284
|
+
| `knownItems` | `([Known] extends [undefined] ? BbSelectKnownItems : Known) \| undefined` | | | `{ value, label }` rows naming the value the app already holds, whatever the options' shape: no request until the first open (`prefill: true` still loads). Not options; the options' accessors never run on them; slots get the row as `item`, with `known: true`, until the list brings its own. |
|
|
2253
2285
|
| `label` | `string` | | yes | Text content of the label of the element. |
|
|
2254
2286
|
| `labelAlign` | `'top'` \| `'center'` \| `'bottom'` | | | Vertical position of the label block in a side-by-side row; not `labelPosition`, the horizontal one. Omitted, the label's first line meets the control's. |
|
|
2255
2287
|
| `labelMode` | `"outside" \| "floating" \| "inside" \| undefined` | | | Label rendering mode. |
|
|
@@ -2325,6 +2357,9 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
2325
2357
|
| `errors` | Component-wide: the control is in its error state (`errors` / `has-errors`, or its validation) — the message line and the box turn red. |
|
|
2326
2358
|
| `open` | Component-wide: the options surface is showing. |
|
|
2327
2359
|
| `loading` | Component-wide: `loading` is on; the box shows its `spinner`. |
|
|
2360
|
+
| `ghost` | On the field's parts: `variant: 'ghost'`. Below the real states, like every variant. |
|
|
2361
|
+
| `outline` | On the field's parts: `variant: 'outline'`. Merged after the part's base entry and before its states, so the real states still win. |
|
|
2362
|
+
| `secondary` | On the field's parts: `variant: 'secondary'`. Below the real states, like every variant. |
|
|
2328
2363
|
|
|
2329
2364
|
## Events
|
|
2330
2365
|
|
|
@@ -2346,7 +2381,7 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
2346
2381
|
|
|
2347
2382
|
- `append` — scope: `{ query: string; focus: () => void; close: () => Promise<void>; }` — Content appended inside the input field, after the value area.
|
|
2348
2383
|
- `append:outer` — scope: `{ query: string; close: () => Promise<void>; }` — Content appended outside the input field wrapper.
|
|
2349
|
-
- `chip` — scope: `BbSelectChipSlotProps<T>` `{ item: T; text: string; value: any; disabled: boolean; deselect: () => void }` — Replaces the default badge rendered for each selection in `multiple` mode. Not called in `comma` mode, nor for the collapsed "+N" summary.
|
|
2384
|
+
- `chip` — scope: `BbSelectChipSlotProps<T, Known>` `{ known: boolean; item: BbSelectKnownItem \| T; text: string; value: any; disabled: boolean; deselect: () => void }` — Replaces the default badge rendered for each selection in `multiple` mode. Not called in `comma` mode, nor for the collapsed "+N" summary. With `known-items` bound, `item` is the known `{ value, label }` row (`known: true`) until the list brings the real one.
|
|
2350
2385
|
- `description` — scope: `BbSelectDescriptionSlotProps` `{ text: string; hasErrors: boolean; hasWarnings: boolean }` — Replaces the description text. Provided alone (no `description` prop) it still renders the description region and wires it into `aria-describedby`.
|
|
2351
2386
|
- `empty` — scope: `{ query: string; focus: () => void; error: unknown; }` — Content shown when no options match the query or the list is empty. `error` is what the latest failed load threw, untouched (`null` when none).
|
|
2352
2387
|
- `footer` — scope: `BbSelectPanelSlotProps` `{ close: () => Promise<void>; clear: () => void; focus: () => void; query: string; selectedOptions: BbSelectResolvedOption[] }` — Content pinned to the bottom of the options panel, below the options list. Rendered in both the desktop popover and the adaptive sheet.
|
|
@@ -2354,7 +2389,7 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
2354
2389
|
- `header` — scope: `BbSelectPanelSlotProps` `{ close: () => Promise<void>; clear: () => void; focus: () => void; query: string; selectedOptions: BbSelectResolvedOption[] }` — Content pinned to the top of the options panel, above the search field. Rendered in both the desktop popover and the adaptive sheet.
|
|
2355
2390
|
- `label` — scope: `BbSelectLabelSlotProps` `{ showAsterisk?: boolean; text: string; hasErrors: boolean; hasWarnings: boolean }` — Replaces the default label text rendered above the input.
|
|
2356
2391
|
- `loading` — scope: `{ query: string; }` — Content shown inside the options dropdown while items are loading.
|
|
2357
|
-
- `option` — scope: `BbSelectOptionSlotProps<T>` `{ disabled: boolean; focused: boolean; index: number; hasErrors?: boolean;
|
|
2392
|
+
- `option` — scope: `BbSelectOptionSlotProps<T, Known>` `{ known: boolean; item: T \| BbSelectKnownItem; disabled: boolean; focused: boolean; index: number; hasErrors?: boolean; loading: boolean; selected: boolean; text: string; value: any; description: string }` — Replaces the default rendering of each option row in the dropdown. With `known-items` bound, a row the list has not brought yet is the known `{ value, label }` row, `known: true`: check `known` before reading an option field off `item`.
|
|
2358
2393
|
- `prefix` — scope: `object` — Content rendered as an inline prefix inside the input field.
|
|
2359
2394
|
- `prepend` — scope: `{ query: string; focus: () => void; close: () => Promise<void>; }` — Content prepended inside the input field, before the value area.
|
|
2360
2395
|
- `prepend:outer` — scope: `{ query: string; close: () => Promise<void>; }` — Content prepended outside the input field wrapper.
|
|
@@ -2381,7 +2416,7 @@ Set these on the element, or on a class you put on it, to retune this component
|
|
|
2381
2416
|
- `BbSelect` _(this component)_ — its own template binds: `badge` → `CommonField`, `activator` → `input.bb-select__activator`, `badge` → `input.bb-select__activator`, `comma` → `span.bb-select__comma`, `badge` → `span.bb-select__comma`, `badge` → `BbBadge`, `controlAttrs` → `input`, `badge` → `input`; hands `BbSelectPopover` the pt map `{ panel: 'panel', sheet: 'sheet', header: 'header', footer: 'footer', input: 'input', list: 'list', option: 'option', itemText: 'itemText', itemIcon: 'itemIcon', itemDescription: 'itemDescription' }` (ours → theirs)
|
|
2382
2417
|
- `CommonField` _(internal — not importable, reach it through `BbSelect`)_ — `BbSelect`'s pt parts land here: `root` → `div.bb-field`, `label` → `component`, `description` → `span.bb-field__description`, `hint` → `span.bb-field__hint`, `counter` → `span.bb-field__counter`, `message` → `div.bb-field__message`; documented CSS variables: `--ctrl-line`; also mounts `BbAsterisk`
|
|
2383
2418
|
- `CommonFieldInput` _(internal — not importable, reach it through `BbSelect`)_ — `BbSelect`'s pt parts land here: `box` → `span.bb-field-input__box`, `prefix` → `span.bb-field-input__prefix`, `icon` → `BbIcon`, `clear` → `ClearableButton`, `spinner` → `BbSpinner`, `suffix` → `span.bb-field-input__suffix`; documented CSS variables: `--bg`, `--bg-hover`, `--bg-focus`, `--bg-disabled`, `--fg-disabled`, `--border-color`, `--border-focus`, `--ring-size`, `--ring-color`, `--elev`, `--frost`, `--inside-label-clearance`; also mounts `ErrorIcon`, `WarningIcon`, `ClearableButton`, `BbIcon`, `BbSpinner`
|
|
2384
|
-
- `BbBadge` _(public — [contract](./BbBadge.md))_ — its own pt parts (`BbBadge`): `spinner` → `BbSpinner`, `icon` → `BbIcon`, `clear` → `button.bb-badge__clear`; documented CSS variables: `--bg`, `--fg`, `--bw`, `--ring-color`, `--ring-size`, `--min-size-md`, `--min-size`, `--elev`, `--r`, `--fs`, `--icon-size`, `--gap`, `--px`, `--clear-size`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--pad-left`; also mounts `BbIcon`, `BbSpinner`, `BadgeBodyContent`
|
|
2419
|
+
- `BbBadge` _(public — [contract](./BbBadge.md))_ — its own pt parts (`BbBadge`): `spinner` → `BbSpinner`, `icon` → `span.bb-badge__append-icon`, `icon` → `BbIcon`, `clear` → `button.bb-badge__clear`; documented CSS variables: `--bg`, `--fg`, `--bw`, `--ring-color`, `--ring-size`, `--min-size-md`, `--min-size`, `--elev`, `--r`, `--fs`, `--icon-size`, `--gap`, `--px`, `--clear-size`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--pad-left`; also mounts `BbIcon`, `BbSpinner`, `BadgeBodyContent`
|
|
2385
2420
|
- `BbSelectPopover` _(public — [contract](./BbSelectPopover.md))_ — its own pt parts (`BbSelectPopover`): `input` → `input.bb-select-popover__input`, `clear` → `ClearableButton`, `panel` → `CommonPopover`, `root` → `CommonPopover`, `header` → `div.bb-select-popover__header`, `footer` → `div.bb-select-popover__footer`; hands `BbOffCanvas` the pt map `{ header: 'header', footer: 'footer', panel: 'root', sheet: 'root' }` (ours → theirs); also mounts `BbBadge`, `BbIcon`, `ClearableButton`, `CommonPopover`, `ErrorIcon`, `WarningIcon`, `BbSmoothHeight`
|
|
2386
2421
|
- `BbOffCanvas` _(public — [contract](./BbOffCanvas.md))_ — its own pt parts (`BbOffCanvas`): `header` → `div.bb-offcanvas__header`, `title` → `span.bb-offcanvas__title`, `description` → `p.bb-offcanvas__description`, `close` → `CloseButton`, `content` → `div.bb-offcanvas__content`, `footer` → `div.bb-offcanvas__footer`; documented CSS variables: `--stack-x`, `--snap-y`, `--stack-fill`, `--stack-transition-duration`, `--px`, `--handle-w`, `--handle-h`, `--handle-bg`, `--safe-top`, `--close-size`
|
|
2387
2422
|
- `CloseButton` _(internal — not importable, reach it through `BbOffCanvas`)_ — documented CSS variables: `--size`, `--p`
|